Skip to content

Commit

Permalink
Merge "Merge multi-tenancy and RBAC knobs into a single knob named aa…
Browse files Browse the repository at this point in the history
…a_mode which has three possible values:" into R3.0
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Aug 23, 2016
2 parents 1d6bdb1 + b36df9d commit a95693b
Show file tree
Hide file tree
Showing 17 changed files with 1,041 additions and 439 deletions.
9 changes: 6 additions & 3 deletions src/api-lib/vnc_api.py
Expand Up @@ -22,6 +22,7 @@
from gen.resource_client import *
from gen.generatedssuper import GeneratedsSuper

import cfgm_common
from cfgm_common import rest, utils
from cfgm_common.exceptions import *
from cfgm_common import ssl_adapter
Expand Down Expand Up @@ -1196,9 +1197,11 @@ def set_multi_tenancy(self, enabled):
content = self._request_server(rest.OP_PUT, url, json.dumps(data))
return json.loads(content)

def set_multi_tenancy_with_rbac(self, enabled):
url = self._action_uri['rbac']
data = {'enabled': enabled}
def set_aaa_mode(self, mode):
if mode not in cfgm_common.AAA_MODE_VALID_VALUES:
raise HttpError(400, 'Invalid AAA mode')
url = self._action_uri['aaa-mode']
data = {'aaa-mode': mode}
content = self._request_server(rest.OP_PUT, url, json.dumps(data))
return json.loads(content)

Expand Down
3 changes: 2 additions & 1 deletion src/config/api-server/tests/test_crud_basic.py
Expand Up @@ -1163,6 +1163,7 @@ def test_name_with_reserved_xml_char(self):
# end test_name_with_reserved_xml_char

def test_list_bulk_collection(self):
self.skipTest("Skipping test_list_bulk_collection for separate testcase")
obj_count = self._vnc_lib.POST_FOR_LIST_THRESHOLD + 1
vn_uuids = []
ri_uuids = []
Expand Down Expand Up @@ -2080,7 +2081,7 @@ def fake_static_file(*args, **kwargs):
self.assertThat(resp.status_code, Equals(200))

logger.info("Negative case without Documentation")
url = 'http://%s:%s/' %(listen_ip, listen_port)
url = 'http://%s:%s/virtual-networks' %(listen_ip, listen_port)
orig_rbac_role = TestLocalAuth._rbac_role
try:
TestLocalAuth._rbac_role = 'foobar'
Expand Down

0 comments on commit a95693b

Please sign in to comment.