diff options
Diffstat (limited to 'moonclient')
26 files changed, 2512 insertions, 70 deletions
diff --git a/moonclient/moonclient/metarules.py b/moonclient/moonclient/metarules.py index 9677c5f6..a980cd85 100644 --- a/moonclient/moonclient/metarules.py +++ b/moonclient/moonclient/metarules.py @@ -84,8 +84,8 @@ class AggregationAlgorithmSet(Command): authtoken=True) algorithm = self.__get_aggregation_algorithm_from_id(data['content']) return ( - ("id", "name", "description"), - ((data['content'], algorithm["name"], algorithm["description"]), ) + ("id",), + (algorithm,) ) diff --git a/moonclient/moonclient/shell.py b/moonclient/moonclient/shell.py index 60a5355f..49422a45 100644 --- a/moonclient/moonclient/shell.py +++ b/moonclient/moonclient/shell.py @@ -78,6 +78,18 @@ class MoonClient(App): self.host = creds["auth_url"].replace("https://", "").replace("http://", "").split("/")[0].split(":")[0] self.port = creds["auth_url"].replace("https://", "").replace("http://", "").split("/")[0].split(":")[1] self._tenant_name = creds["tenant_name"] + self.parser.add_argument( + '--username', + metavar='<username-str>', + help='Force OpenStack username', + default=None + ) + self.parser.add_argument( + '--tenant', + metavar='<tenantname-str>', + help='Force OpenStack tenant', + default=None + ) @property def tenant_id(self): @@ -142,9 +154,33 @@ class MoonClient(App): except ValueError: return {"content": content} + def auth_keystone(self, username=None, password=None, host=None, port=None): + """Send a new authentication request to Keystone + + :param username: user identification name + :return: + """ + if username: + self.post["auth"]["identity"]["password"]["user"]["name"] = username + if password: + self.post["auth"]["identity"]["password"]["user"]["password"] = password + if host: + self.host = host + if port: + self.port = port + data = self.get_url("/v3/auth/tokens", post_data=self.post) + if "token" not in data: + raise Exception("Authentication problem ({})".format(data)) + def initialize_app(self, argv): self.log.debug('initialize_app: {}'.format(argv)) - # TODO: get credentials from OS env + if self.options.username: + self.post["auth"]["identity"]["password"]["user"]["name"] = self.options.username + self.log.debug("change username {}".format(self.options.username)) + if self.options.tenant: + self.post["auth"]["scope"]["project"]["name"] = self.options.tenant + self._tenant_name = self.options.tenant + self.log.debug("change tenant {}".format(self.options.tenant)) data = self.get_url("/v3/auth/tokens", post_data=self.post) if "token" not in data: raise Exception("Authentication problem ({})".format(data)) diff --git a/moonclient/moonclient/tenants.py b/moonclient/moonclient/tenants.py index c1f99af6..b2e0aafa 100644 --- a/moonclient/moonclient/tenants.py +++ b/moonclient/moonclient/tenants.py @@ -123,6 +123,7 @@ class TenantSet(Command): log = logging.getLogger(__name__) + # TODO: could use a PATCH method also def get_parser(self, prog_name): parser = super(TenantSet, self).get_parser(prog_name) parser.add_argument( diff --git a/moonclient/moonclient/tests.py b/moonclient/moonclient/tests.py index 5badf4bc..ea722955 100644 --- a/moonclient/moonclient/tests.py +++ b/moonclient/moonclient/tests.py @@ -12,6 +12,7 @@ from cliff.command import Command from uuid import uuid4 import os import time +import subprocess class TestsLaunch(Lister): @@ -19,7 +20,8 @@ class TestsLaunch(Lister): log = logging.getLogger(__name__) result_vars = dict() - logfile = open("/tmp/moonclient_test_{}.log".format(time.strftime("%Y%m%d-%H%M%S")), "w") + logfile_name = "/tmp/moonclient_test_{}.log".format(time.strftime("%Y%m%d-%H%M%S")) + logfile = open(logfile_name, "w") def get_parser(self, prog_name): parser = super(TestsLaunch, self).get_parser(prog_name) @@ -31,9 +33,12 @@ class TestsLaunch(Lister): return parser def __replace_var_in_str(self, data_str): + self.log.debug("__replace_var_in_str " + data_str) for exp in re.findall("\$\w+", data_str): + self.log.debug("--->" + exp + str(self.result_vars)) if exp.replace("$", "") in self.result_vars: data_str = re.sub(exp.replace("$", "\$") + "(?!\w)", self.result_vars[exp.replace("$", "")], data_str) + self.log.debug("__replace_var_in_str " + data_str) return data_str def __compare_results(self, expected, observed): @@ -44,7 +49,7 @@ class TestsLaunch(Lister): return False def take_action(self, parsed_args): - self.log.info("Write tests output to {}".format(self.logfile)) + self.log.info("Write tests output to {}".format(self.logfile_name)) stdout_back = self.app.stdout if not parsed_args.testfile: self.log.error("You don't give a test filename.") @@ -56,37 +61,115 @@ class TestsLaunch(Lister): global_command_options = tests_dict["command_options"] data = list() for group_name, tests_list in tests_dict["tests_group"].iteritems(): + overall_result = True self.log.info("\n\033[1mgroup {}\033[0m".format(group_name)) self.logfile.write("{}:\n\n".format(group_name)) + test_count = len(tests_list) for test in tests_list: + result_str = "" + error_str = "" + if "auth_name" in test or "auth_password" in test or "auth_url" in test: + username = None + password = None + host = None + port = None + description = "" + if "auth_name" in test: + username = test["auth_name"] + if "auth_password" in test: + password = test["auth_password"] + if "auth_host" in test: + host = test["auth_host"] + if "auth_port" in test: + port = test["auth_port"] + if "description" in test: + description = test["description"] + self.app.auth_keystone(username, password, host, port) + title = "Change auth to " + if username: + title += username + if host: + title += "@" + host + if port: + title += ":" + port + title += "\n" + self.logfile.write(title) + self.log.info(title) + data_tmp = list() + data_tmp.append("") + data_tmp.append(title.strip()) + data_tmp.append("\033[32mOK\033[m") + data_tmp.append(description.strip()) + data.append(data_tmp) + continue data_tmp = list() tmp_filename = os.path.join("/tmp", uuid4().hex) tmp_filename_fd = open(tmp_filename, "w") self.log.debug("test={}".format(test)) - if "command_options" in test: - command = test["command"] + " " + test["command_options"] - else: - command = test["command"] + " " + global_command_options - command = self.__replace_var_in_str(command) - self.logfile.write("-----> {}\n".format(command)) - self.log.info(" \\-executing {}".format(command)) - self.app.stdout = tmp_filename_fd - result_id = self.app.run_subcommand(shlex.split(command)) - tmp_filename_fd.close() - self.app.stdout = stdout_back - result_str = open(tmp_filename, "r").read() - self.logfile.write("{}".format(result_str)) + if "command" not in test: + if "external_command" in test: + ext_command = test["external_command"] + else: + ext_command = test["shell_command"] + ext_command = self.__replace_var_in_str(ext_command) + self.logfile.write("-----> {}\n".format(ext_command)) + self.log.info(" \\-executing external \"{}\"".format(ext_command)) + if "external_command" in test: + pipe = subprocess.Popen(shlex.split(ext_command), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + else: + # Note (asteroide): security hazard! Must reduce the possible commands here. + pipe = subprocess.Popen(ext_command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + com = pipe.communicate() + result_str = com[0] + error_str = com[1] + self.logfile.write("stdout: {}\n".format(result_str)) + self.logfile.write("stderr: {}\n".format(error_str)) + if "command" in test: + if "command_options" in test: + command = test["command"] + " " + test["command_options"] + else: + command = test["command"] + " " + global_command_options + command = self.__replace_var_in_str(command) + self.logfile.write("-----> {}\n".format(command)) + self.log.info(" \\-executing {}".format(command)) + self.app.stdout = tmp_filename_fd + result_id = self.app.run_subcommand(shlex.split(command)) + tmp_filename_fd.close() + self.app.stdout = stdout_back + result_str = open(tmp_filename, "r").read() + self.logfile.write("{}".format(result_str)) data_tmp.append(group_name) data_tmp.append(test["name"]) compare = self.__compare_results(self.__replace_var_in_str(test["result"]), result_str) self.logfile.write("----->{} ({})\n\n".format(compare, self.__replace_var_in_str(test["result"]))) - if compare: - compare = "\033[32mTrue\033[m" + if error_str: + if compare: + compare = "\033[33mTrue\033[m" + overall_result = overall_result and True + else: + compare = "\033[1m\033[31mFalse\033[m" + overall_result = overall_result and False else: - compare = "\033[1m\033[31mFalse\033[m" + overall_result = overall_result and compare + if compare: + if overall_result: + compare = "\033[32mTrue\033[m" + else: + compare = "\033[mTrue\033[m" + else: + compare = "\033[1m\033[31mFalse\033[m" data_tmp.append(compare) data_tmp.append(test["description"]) data.append(data_tmp) + data_tmp = list() + data_tmp.append("\033[1m" + group_name + "\033[m") + data_tmp.append("\033[1mOverall results ({})\033[m".format(test_count)) + if overall_result: + data_tmp.append("\033[1m\033[32mTrue\033[m") + else: + data_tmp.append("\033[1m\033[31mFalse\033[m") + data_tmp.append(self.logfile_name) + data.append(data_tmp) return ( ("group_name", "test_name", "result", "description"), diff --git a/moonclient/moonclient/tests/functional_tests.sh b/moonclient/moonclient/tests/functional_tests.sh index 789b9161..505980cc 100644 --- a/moonclient/moonclient/tests/functional_tests.sh +++ b/moonclient/moonclient/tests/functional_tests.sh @@ -23,7 +23,7 @@ function test_cmd { } test_cmd "intraextension list" -test_cmd "intraextension create --policy_model policy_rbac func_test" +test_cmd "intraextension add --policy_model policy_rbac func_test" uuid=$(cat /tmp/_ | cut -d " " -f 3) test_cmd "intraextension tenant set $uuid $OS_TENANT_NAME" test_cmd "intraextension show $uuid" diff --git a/moonclient/moonclient/tests/tests_action_assignments.json b/moonclient/moonclient/tests/tests_action_assignments.json index 27027fae..dc9cb27e 100644 --- a/moonclient/moonclient/tests/tests_action_assignments.json +++ b/moonclient/moonclient/tests/tests_action_assignments.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -183,7 +183,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -196,7 +196,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_action_categories.json b/moonclient/moonclient/tests/tests_action_categories.json index dfd4be62..bf6a72ca 100644 --- a/moonclient/moonclient/tests/tests_action_categories.json +++ b/moonclient/moonclient/tests/tests_action_categories.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -118,7 +118,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -131,7 +131,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_action_scopes.json b/moonclient/moonclient/tests/tests_action_scopes.json index 5cba922b..437c8e6f 100644 --- a/moonclient/moonclient/tests/tests_action_scopes.json +++ b/moonclient/moonclient/tests/tests_action_scopes.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -127,7 +127,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -140,7 +140,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_actions.json b/moonclient/moonclient/tests/tests_actions.json index 17fd886f..f565ccad 100644 --- a/moonclient/moonclient/tests/tests_actions.json +++ b/moonclient/moonclient/tests/tests_actions.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -118,7 +118,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -131,7 +131,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_change_auth.json b/moonclient/moonclient/tests/tests_change_auth.json new file mode 100644 index 00000000..38d1d134 --- /dev/null +++ b/moonclient/moonclient/tests/tests_change_auth.json @@ -0,0 +1,32 @@ +{ + "command_options": "-f value", + "tests_group": { + "authz": [ + + { + "auth_name": "demo", + "description": "Change user to demo" + }, + + { + "name": "list tenant", + "command": "tenant list", + "result": "^$", + "description": "Check if user demo cannot read the list of all tenants." + }, + + { + "auth_name": "admin", + "description": "Change user to admin" + }, + + { + "name": "list tenant", + "command": "tenant list", + "result": "admin", + "description": "Check if user admin can read the list of all tenants." + } + + ] + } +}
\ No newline at end of file diff --git a/moonclient/moonclient/tests/tests_configuration.json b/moonclient/moonclient/tests/tests_configuration.json index c470cc1c..83b9fd64 100644 --- a/moonclient/moonclient/tests/tests_configuration.json +++ b/moonclient/moonclient/tests/tests_configuration.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -115,7 +115,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -128,7 +128,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_empty_policy_nova.json b/moonclient/moonclient/tests/tests_empty_policy_nova.json new file mode 100644 index 00000000..1320ecc9 --- /dev/null +++ b/moonclient/moonclient/tests/tests_empty_policy_nova.json @@ -0,0 +1,1013 @@ +{ + "command_options": "-f value", + "tests_group": { + "authz": [ + { + "name": "nova image-list", + "external_command": "nova image-list", + "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros-0.3.4-x86_64-uec", + "description": "Get an Image ID" + }, + { + "name": "nova boot new server", + "external_command": "nova boot --flavor m1.micro --image $uuid_image test_moonclient", + "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros-0.3.4-x86_64-uec", + "description": "Get an Image ID" + }, + { + "name": "sleep", + "external_command": "sleep 5", + "result": "", + "description": "time for server to really boot" + }, + { + "name": "nova get new server", + "external_command": "nova list", + "result": "\\| (?P<uuid_server>[\\w\\-]+)\\s+\\| test_moonclient\\s+\\| ACTIVE\\s+\\| [\\w\\-]+\\s+\\| Running", + "description": "Get the ID of the new server" + }, + { + "name": "list tenant", + "command": "tenant list", + "result": "(?!demo)", + "description": "Check if tenant demo is used." + }, + { + "name": "add tenant demo", + "command": "tenant add demo", + "result": "^$", + "description": "Add a new tenant", + "command_options": "" + }, + { + "name": "check tenant demo", + "command": "tenant list", + "result": "(?P<uuid>\\w+)\\s+demo", + "description": "Check that tenant demo has been correctly added" + }, + { + "name": "create_intraextension_authz", + "command": "intraextension add --policy_model policy_empty_authz empty_test", + "result": "IntraExtension created: (?P<uuid_authz>\\w+)", + "description": "Create an authz intra extension", + "command_options": "" + }, + { + "name": "list_intraextension_authz", + "command": "intraextension list", + "result": "$uuid_authz", + "description": "Check the existence of that authz intra extension" + }, + { + "name": "set_tenant_authz", + "command": "tenant set --authz $uuid_authz $uuid", + "result": "", + "description": "Connect the authz intra extension to the tenant demo", + "command_options": "" + }, + { + "name": "list tenant", + "command": "tenant list", + "result": "demo", + "description": "Check if tenant demo is used." + }, + { + "name": "select_authz_ie", + "command": "intraextension select $uuid_authz", + "result": "Select $uuid_authz IntraExtension.", + "description": "Select the authz IntraExtension", + "command_options": "" + }, + { + "name": "check_select_authz_ie", + "command": "intraextension show selected", + "result": "$uuid_authz", + "description": "Check the selected authz IntraExtension", + "command_options": "-c id -f value" + }, + { + "name": "add_subject", + "command": "subject add admin --password nomoresecrete", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_subject", + "command": "subject list", + "result": "(?P<uuid_subject_admin>\\w+)\\s+admin", + "description": "Check that admin subject was added." + }, + { + "name": "add_subject", + "command": "subject add demo --password nomoresecrete", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_subject", + "command": "subject list", + "result": "(?P<uuid_subject_demo>\\w+)\\s+demo", + "description": "Check that demo subject was added." + }, + { + "name": "add_object", + "command": "object add servers", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_object", + "command": "object list", + "result": "(?P<uuid_object_servers>\\w+)\\s+servers", + "description": "Check that servers subject was added." + }, + { + "name": "add_action", + "command": "action add pause", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_pause>\\w+)\\s+pause", + "description": "Check that pause action was added." + }, + { + "name": "add_action", + "command": "action add unpause", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_unpause>\\w+)\\s+unpause", + "description": "Check that unpause action was added." + }, + { + "name": "add_action", + "command": "action add list", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_list>\\w+)\\s+list", + "description": "Check that list action was added." + }, + { + "name": "add_action", + "command": "action add start", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_start>\\w+)\\s+start", + "description": "Check that start action was added." + }, + { + "name": "add_action", + "command": "action add stop", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_stop>\\w+)\\s+stop", + "description": "Check that stop action was added." + }, + { + "name": "add_action", + "command": "action add create", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_create>\\w+)\\s+create", + "description": "Check that create action was added." + }, + { + "name": "add_action", + "command": "action add upload", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_upload>\\w+)\\s+upload", + "description": "Check that upload action was added." + }, + { + "name": "add_action", + "command": "action add download", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_download>\\w+)\\s+download", + "description": "Check that download action was added." + }, + { + "name": "add_action", + "command": "action add post", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_post>\\w+)\\s+post", + "description": "Check that post action was added." + }, + { + "name": "add_action", + "command": "action add storage_list", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_storage_list>\\w+)\\s+storage_list", + "description": "Check that storage_list action was added." + }, + + { + "name": "add_subject_category", + "command": "subject category add subject_security_level", + "result": "", + "description": "Add the new subject category subject_security_level", + "command_options": "" + }, + { + "name": "list_subject_category", + "command": "subject category list", + "result": "(?P<uuid_subject_category>\\w+)\\s+subject_security_level", + "description": "Check that subject_security_level subject_category was added." + }, + { + "name": "add_object_category", + "command": "object category add object_security_level", + "result": "", + "description": "Add the new object category object_security_level", + "command_options": "" + }, + { + "name": "list_object_category", + "command": "object category list", + "result": "(?P<uuid_object_category>\\w+)\\s+object_security_level", + "description": "Check that object_security_level object_category was added." + }, + { + "name": "add_action_category", + "command": "action category add resource_action", + "result": "", + "description": "Add the new action category resource_action", + "command_options": "" + }, + { + "name": "list_subject_category", + "command": "action category list", + "result": "(?P<uuid_action_category>\\w+)\\s+resource_action", + "description": "Check that resource_action action_category was added." + }, + + { + "name": "add_scope", + "command": "subject scope add $uuid_subject_category high --description \"high\"", + "result": "^$", + "description": "Add one scope to subject category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "subject scope list $uuid_subject_category", + "result": "(?P<uuid_subject_scope_high>\\w+)\\s+high\\s+high", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "subject scope add $uuid_subject_category medium --description \"medium\"", + "result": "^$", + "description": "Add one scope to subject category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "subject scope list $uuid_subject_category", + "result": "(?P<uuid_subject_scope_medium>\\w+)\\s+medium\\s+medium", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "subject scope add $uuid_subject_category low --description \"low\"", + "result": "^$", + "description": "Add one scope to subject category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "subject scope list $uuid_subject_category", + "result": "(?P<uuid_subject_scope_low>\\w+)\\s+low\\s+low", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "object scope add $uuid_object_category high --description \"high\"", + "result": "^$", + "description": "Add one scope to object category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "object scope list $uuid_object_category", + "result": "(?P<uuid_object_scope_high>\\w+)\\s+high\\s+high", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "object scope add $uuid_object_category medium --description \"medium\"", + "result": "^$", + "description": "Add one scope to object category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "object scope list $uuid_object_category", + "result": "(?P<uuid_object_scope_medium>\\w+)\\s+medium\\s+medium", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "object scope add $uuid_object_category low --description \"low\"", + "result": "^$", + "description": "Add one scope to object category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "object scope list $uuid_object_category", + "result": "(?P<uuid_object_scope_low>\\w+)\\s+low\\s+low", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "action scope add $uuid_action_category vm_admin --description \"vm_admin\"", + "result": "^$", + "description": "Add one scope to action category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "action scope list $uuid_action_category", + "result": "(?P<uuid_action_scope_vm_admin>\\w+)\\s+vm_admin\\s+vm_admin", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "action scope add $uuid_action_category vm_access --description \"vm_access\"", + "result": "^$", + "description": "Add one scope to action category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "action scope list $uuid_action_category", + "result": "(?P<uuid_action_scope_vm_access>\\w+)\\s+vm_access\\s+vm_access", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "action scope add $uuid_action_category storage_admin --description \"storage_admin\"", + "result": "^$", + "description": "Add one scope to action category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "action scope list $uuid_action_category", + "result": "(?P<uuid_action_scope_storage_admin>\\w+)\\s+storage_admin\\s+storage_admin", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "action scope add $uuid_action_category storage_access --description \"storage_access\"", + "result": "^$", + "description": "Add one scope to action category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "action scope list $uuid_action_category", + "result": "(?P<uuid_action_scope_storage_access>\\w+)\\s+storage_access\\s+storage_access", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + + { + "name": "add_assignment", + "command": "subject assignment add $uuid_subject_admin $uuid_subject_category $uuid_subject_scope_high", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "subject assignment list $uuid_subject_admin $uuid_subject_category", + "result": "$uuid_subject_scope_high high", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "subject assignment add $uuid_subject_demo $uuid_subject_category $uuid_subject_scope_medium", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "subject assignment list $uuid_subject_demo $uuid_subject_category", + "result": "$uuid_subject_scope_medium medium", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "object assignment add $uuid_object_servers $uuid_object_category $uuid_object_scope_low", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "object assignment list $uuid_object_servers $uuid_object_category", + "result": "$uuid_object_scope_low low", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_pause $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_pause $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_unpause $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_unpause $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_start $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_start $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_stop $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_stop $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_list $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_list $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_list $uuid_action_category $uuid_action_scope_vm_access", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_list $uuid_action_category", + "result": "$uuid_action_scope_vm_access vm_access", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_create $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_create $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_storage_list $uuid_action_category $uuid_action_scope_storage_access", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_storage_list $uuid_action_category", + "result": "$uuid_action_scope_storage_access storage_access", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_download $uuid_action_category $uuid_action_scope_storage_access", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_download $uuid_action_category", + "result": "$uuid_action_scope_storage_access storage_access", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_upload $uuid_action_category $uuid_action_scope_storage_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_upload $uuid_action_category", + "result": "$uuid_action_scope_storage_admin storage_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_post $uuid_action_category $uuid_action_scope_storage_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_post $uuid_action_category", + "result": "$uuid_action_scope_storage_admin storage_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + + { + "name": "check_submetarules", + "command": "submetarule show", + "result": "(?P<submetarule_uuid>\\w+)", + "description": "Get one submetarule ID", + "command_options": "-c id -f value" + }, + { + "name": "set_submetarule", + "command": "submetarule set $submetarule_uuid --subject_category_id=\"$uuid_subject_category\" --object_category_id=\"$uuid_object_category\" --action_category_id=\"$uuid_action_category\"", + "result": "^$", + "description": "Set a new submetarule", + "command_options": "" + }, + { + "name": "check_submetarule", + "command": "submetarule show", + "result": "$submetarule_uuid \\s*subject_security_level", + "description": "Check the new submetarule", + "command_options": "-c id -c \"subject categories\" -f value" + }, + { + "name": "check_submetarule", + "command": "submetarule show", + "result": "$submetarule_uuid \\s*object_security_level", + "description": "Check the new submetarule", + "command_options": "-c id -c \"object categories\" -f value" + }, + { + "name": "check_submetarule", + "command": "submetarule show", + "result": "$submetarule_uuid \\s*resource_action", + "description": "Check the new submetarule", + "command_options": "-c id -c \"action categories\" -f value" + }, + + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,vm_admin,medium\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+vm_admin\\s+medium", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,vm_admin,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+vm_admin\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"medium,vm_admin,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+medium\\s+vm_admin\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,vm_access,medium\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+vm_access\\s+medium", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,vm_access,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+vm_access\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"medium,vm_access,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+medium\\s+vm_access\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,storage_admin,medium\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+storage_admin\\s+medium", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,storage_admin,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+storage_admin\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"medium,storage_admin,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+medium\\s+storage_admin\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,storage_access,medium\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+storage_access\\s+medium", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,storage_access,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+storage_access\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"medium,storage_access,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+medium\\s+storage_access\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "get aggregation algorithm", + "command": "aggregation algorithm list", + "result": "(?P<uuid_aggregation>\\w+)\\s+one_true", + "description": "Get aggregation algorithm.", + "command_options": "-c id -c name -f value" + }, + { + "name": "set aggregation algorithm", + "command": "aggregation algorithm set $uuid_aggregation", + "result": "", + "description": "Set aggregation algorithm to one_true.", + "command_options": "" + }, + { + "name": "get aggregation algorithm", + "command": "aggregation algorithm show", + "result": "$uuid_aggregation\\s+one_true", + "description": "Check aggregation algorithm.", + "command_options": "-c id -c name -f value" + }, + { + "name": "get submetarule algorithm", + "command": "submetarule algorithm list", + "result": "(?P<uuid_submetarule_algo>\\w+)\\s+inclusion", + "description": "Get submetarule algorithm named inclusion.", + "command_options": "-c id -c name -f value" + }, + { + "name": "set submetarule algorithm", + "command": "submetarule set --algorithm_name inclusion $submetarule_uuid", + "result": "", + "description": "Set submetarule algorithm to inclusion.", + "command_options": "" + }, + + { + "name": "check nova command", + "external_command": "nova list", + "result": "(?!test_moonclient)", + "description": "Check that we cannot list nova servers due to the current rules" + }, + { + "name": "try to pause nova instance", + "external_command": "nova pause $uuid_server", + "result": "^$", + "description": "Pausing the server must be impossible due to the current rules" + }, + + { + "name": "list tenant", + "command": "tenant list", + "result": "demo", + "description": "Check if tenant demo is used." + }, + + { + "name": "add_object", + "command": "object add $uuid_server", + "result": "", + "description": "Add the new nova server", + "command_options": "" + }, + { + "name": "list_object", + "command": "object list", + "result": "(?P<uuid_object_nova_server>\\w+)\\s+$uuid_server", + "description": "Check that the new nova server was added." + }, + { + "name": "add_assignment", + "command": "object assignment add $uuid_object_nova_server $uuid_object_category $uuid_object_scope_low", + "result": "^$", + "description": "Set the assignment 'low' to nova server", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "object assignment list $uuid_object_nova_server $uuid_object_category", + "result": "$uuid_object_scope_low low", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + + { + "name": "check nova command", + "external_command": "nova list", + "result": "\\| (?P<uuid_server>[\\w\\-]+)\\s+\\| test_moonclient\\s+\\| ACTIVE\\s+\\| [\\w\\-]+\\s+\\| Running", + "description": "Check that we can now list nova servers due to the current rules" + }, + { + "name": "try to pause nova instance", + "external_command": "nova pause $uuid_server", + "result": "^$", + "description": "Pausing the server must be possible now" + }, + { + "name": "check nova command", + "external_command": "nova list", + "result": "\\| (?P<uuid_server>[\\w\\-]+)\\s+\\| test_moonclient\\s+\\| PAUSED\\s+\\| [\\w\\-]+\\s+\\| Paused", + "description": "Check that we can still list nova servers due to the current rules" + }, + { + "name": "reactivate nova instance", + "external_command": "nova unpause $uuid_server", + "result": "^$", + "description": "Unpausing the server for next tests" + }, + + { + "name": "del_assignment", + "command": "object assignment delete $uuid_object_nova_server $uuid_object_category $uuid_object_scope_low", + "result": "^$", + "description": "Delete the assignment 'low' to nova server", + "command_options": "" + }, + { + "name": "add_assignment", + "command": "object assignment add $uuid_object_nova_server $uuid_object_category $uuid_object_scope_high", + "result": "^$", + "description": "Set the assignment 'high' to nova server", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "object assignment list $uuid_object_nova_server $uuid_object_category", + "result": "$uuid_object_scope_high high", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + + { + "name": "check nova command", + "external_command": "nova list", + "result": "\\| (?P<uuid_server>[\\w\\-]+)\\s+\\| test_moonclient\\s+\\| ACTIVE\\s+\\| [\\w\\-]+\\s+\\| Running", + "description": "Check that we can now list nova servers due to the current rules" + }, + { + "name": "try to pause nova instance", + "external_command": "nova pause $uuid_server", + "result": "^$", + "description": "Pausing the server must be not possible now" + }, + { + "name": "check nova command", + "external_command": "nova list", + "result": "\\| (?P<uuid_server>[\\w\\-]+)\\s+\\| test_moonclient\\s+\\| ACTIVE\\s+\\| [\\w\\-]+\\s+\\| Running", + "description": "Check that we can still list nova servers due to the current rules" + }, + + + { + "name": "delete_authz_intra_extension", + "command": "intraextension delete $uuid_authz", + "result": "", + "description": "Delete the authz intra extension", + "command_options": "" + }, + { + "name": "delete_tenant", + "command": "tenant delete $uuid", + "result": "", + "description": "Delete the tenant demo", + "command_options": "" + }, + { + "name": "nova delete new server", + "external_command": "nova delete $uuid_server", + "result": "", + "description": "Delete the new server" + } + ] + } +}
\ No newline at end of file diff --git a/moonclient/moonclient/tests/tests_empty_policy_swift.json b/moonclient/moonclient/tests/tests_empty_policy_swift.json new file mode 100644 index 00000000..e31e66c7 --- /dev/null +++ b/moonclient/moonclient/tests/tests_empty_policy_swift.json @@ -0,0 +1,1168 @@ +{ + "command_options": "-f value", + "tests_group": { + "authz": [ + { + "name": "swift list", + "external_command": "swift list", + "result": "(?!moonclient_test)", + "description": "Check Swift command" + }, + { + "name": "add swift container", + "external_command": "swift post moonclient_test", + "result": "", + "description": "Add a new container" + }, + { + "name": "swift list", + "external_command": "swift list", + "result": "moonclient_test", + "description": "Check the added container" + }, + { + "name": "get accound ID", + "external_command": "swift stat", + "result": "Account: (?P<uuid_account>[\\w_]+)", + "description": "Check the added container" + }, + + { + "name": "list tenant", + "command": "tenant list", + "result": "(?!demo)", + "description": "Check if tenant demo is used." + }, + { + "name": "add tenant demo", + "command": "tenant add demo", + "result": "^$", + "description": "Add a new tenant", + "command_options": "" + }, + { + "name": "check tenant demo", + "command": "tenant list", + "result": "(?P<uuid>\\w+)\\s+demo", + "description": "Check that tenant demo has been correctly added" + }, + { + "name": "create_intraextension_authz", + "command": "intraextension add --policy_model policy_empty_authz empty_test", + "result": "IntraExtension created: (?P<uuid_authz>\\w+)", + "description": "Create an authz intra extension", + "command_options": "" + }, + { + "name": "list_intraextension_authz", + "command": "intraextension list", + "result": "$uuid_authz", + "description": "Check the existence of that authz intra extension" + }, + { + "name": "set_tenant_authz", + "command": "tenant set --authz $uuid_authz $uuid", + "result": "", + "description": "Connect the authz intra extension to the tenant demo", + "command_options": "" + }, + { + "name": "list tenant", + "command": "tenant list", + "result": "demo", + "description": "Check if tenant demo is used." + }, + { + "name": "select_authz_ie", + "command": "intraextension select $uuid_authz", + "result": "Select $uuid_authz IntraExtension.", + "description": "Select the authz IntraExtension", + "command_options": "" + }, + { + "name": "check_select_authz_ie", + "command": "intraextension show selected", + "result": "$uuid_authz", + "description": "Check the selected authz IntraExtension", + "command_options": "-c id -f value" + }, + { + "name": "add_subject", + "command": "subject add admin --password nomoresecrete", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_subject", + "command": "subject list", + "result": "(?P<uuid_subject_admin>\\w+)\\s+admin", + "description": "Check that admin subject was added." + }, + { + "name": "add_subject", + "command": "subject add demo --password nomoresecrete", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_subject", + "command": "subject list", + "result": "(?P<uuid_subject_demo>\\w+)\\s+demo", + "description": "Check that demo subject was added." + }, + { + "name": "add_object", + "command": "object add servers", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_object", + "command": "object list", + "result": "(?P<uuid_object_servers>\\w+)\\s+servers", + "description": "Check that servers subject was added." + }, + { + "name": "add_action", + "command": "action add pause", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_pause>\\w+)\\s+pause", + "description": "Check that pause action was added." + }, + { + "name": "add_action", + "command": "action add unpause", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_unpause>\\w+)\\s+unpause", + "description": "Check that unpause action was added." + }, + { + "name": "add_action", + "command": "action add list", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_list>\\w+)\\s+list", + "description": "Check that list action was added." + }, + { + "name": "add_action", + "command": "action add start", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_start>\\w+)\\s+start", + "description": "Check that start action was added." + }, + { + "name": "add_action", + "command": "action add stop", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_stop>\\w+)\\s+stop", + "description": "Check that stop action was added." + }, + { + "name": "add_action", + "command": "action add create", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_create>\\w+)\\s+create", + "description": "Check that create action was added." + }, + { + "name": "add_action", + "command": "action add upload", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_upload>\\w+)\\s+upload", + "description": "Check that upload action was added." + }, + { + "name": "add_action", + "command": "action add download", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_download>\\w+)\\s+download", + "description": "Check that download action was added." + }, + { + "name": "add_action", + "command": "action add post", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_post>\\w+)\\s+post", + "description": "Check that post action was added." + }, + { + "name": "add_action", + "command": "action add storage_list", + "result": "", + "description": "", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_storage_list>\\w+)\\s+storage_list", + "description": "Check that storage_list action was added." + }, + + { + "name": "add_subject_category", + "command": "subject category add subject_security_level", + "result": "", + "description": "Add the new subject category subject_security_level", + "command_options": "" + }, + { + "name": "list_subject_category", + "command": "subject category list", + "result": "(?P<uuid_subject_category>\\w+)\\s+subject_security_level", + "description": "Check that subject_security_level subject_category was added." + }, + { + "name": "add_object_category", + "command": "object category add object_security_level", + "result": "", + "description": "Add the new object category object_security_level", + "command_options": "" + }, + { + "name": "list_object_category", + "command": "object category list", + "result": "(?P<uuid_object_category>\\w+)\\s+object_security_level", + "description": "Check that object_security_level object_category was added." + }, + { + "name": "add_action_category", + "command": "action category add resource_action", + "result": "", + "description": "Add the new action category resource_action", + "command_options": "" + }, + { + "name": "list_subject_category", + "command": "action category list", + "result": "(?P<uuid_action_category>\\w+)\\s+resource_action", + "description": "Check that resource_action action_category was added." + }, + + { + "name": "add_scope", + "command": "subject scope add $uuid_subject_category high --description \"high\"", + "result": "^$", + "description": "Add one scope to subject category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "subject scope list $uuid_subject_category", + "result": "(?P<uuid_subject_scope_high>\\w+)\\s+high\\s+high", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "subject scope add $uuid_subject_category medium --description \"medium\"", + "result": "^$", + "description": "Add one scope to subject category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "subject scope list $uuid_subject_category", + "result": "(?P<uuid_subject_scope_medium>\\w+)\\s+medium\\s+medium", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "subject scope add $uuid_subject_category low --description \"low\"", + "result": "^$", + "description": "Add one scope to subject category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "subject scope list $uuid_subject_category", + "result": "(?P<uuid_subject_scope_low>\\w+)\\s+low\\s+low", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "object scope add $uuid_object_category high --description \"high\"", + "result": "^$", + "description": "Add one scope to object category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "object scope list $uuid_object_category", + "result": "(?P<uuid_object_scope_high>\\w+)\\s+high\\s+high", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "object scope add $uuid_object_category medium --description \"medium\"", + "result": "^$", + "description": "Add one scope to object category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "object scope list $uuid_object_category", + "result": "(?P<uuid_object_scope_medium>\\w+)\\s+medium\\s+medium", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "object scope add $uuid_object_category low --description \"low\"", + "result": "^$", + "description": "Add one scope to object category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "object scope list $uuid_object_category", + "result": "(?P<uuid_object_scope_low>\\w+)\\s+low\\s+low", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "action scope add $uuid_action_category vm_admin --description \"vm_admin\"", + "result": "^$", + "description": "Add one scope to action category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "action scope list $uuid_action_category", + "result": "(?P<uuid_action_scope_vm_admin>\\w+)\\s+vm_admin\\s+vm_admin", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "action scope add $uuid_action_category vm_access --description \"vm_access\"", + "result": "^$", + "description": "Add one scope to action category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "action scope list $uuid_action_category", + "result": "(?P<uuid_action_scope_vm_access>\\w+)\\s+vm_access\\s+vm_access", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "action scope add $uuid_action_category storage_admin --description \"storage_admin\"", + "result": "^$", + "description": "Add one scope to action category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "action scope list $uuid_action_category", + "result": "(?P<uuid_action_scope_storage_admin>\\w+)\\s+storage_admin\\s+storage_admin", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + { + "name": "add_scope", + "command": "action scope add $uuid_action_category storage_access --description \"storage_access\"", + "result": "^$", + "description": "Add one scope to action category role", + "command_options": "" + }, + { + "name": "check_added_scope", + "command": "action scope list $uuid_action_category", + "result": "(?P<uuid_action_scope_storage_access>\\w+)\\s+storage_access\\s+storage_access", + "description": "Check added scope.", + "command_options": "-c id -c name -c description -f value" + }, + + { + "name": "add_assignment", + "command": "subject assignment add $uuid_subject_admin $uuid_subject_category $uuid_subject_scope_high", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "subject assignment list $uuid_subject_admin $uuid_subject_category", + "result": "$uuid_subject_scope_high high", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "subject assignment add $uuid_subject_demo $uuid_subject_category $uuid_subject_scope_medium", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "subject assignment list $uuid_subject_demo $uuid_subject_category", + "result": "$uuid_subject_scope_medium medium", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "object assignment add $uuid_object_servers $uuid_object_category $uuid_object_scope_low", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "object assignment list $uuid_object_servers $uuid_object_category", + "result": "$uuid_object_scope_low low", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_pause $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_pause $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_unpause $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_unpause $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_start $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_start $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_stop $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_stop $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_list $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_list $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_list $uuid_action_category $uuid_action_scope_vm_access", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_list $uuid_action_category", + "result": "$uuid_action_scope_vm_access vm_access", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_create $uuid_action_category $uuid_action_scope_vm_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_create $uuid_action_category", + "result": "$uuid_action_scope_vm_admin vm_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_storage_list $uuid_action_category $uuid_action_scope_storage_access", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_storage_list $uuid_action_category", + "result": "$uuid_action_scope_storage_access storage_access", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_download $uuid_action_category $uuid_action_scope_storage_access", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_download $uuid_action_category", + "result": "$uuid_action_scope_storage_access storage_access", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_upload $uuid_action_category $uuid_action_scope_storage_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_upload $uuid_action_category", + "result": "$uuid_action_scope_storage_admin storage_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_post $uuid_action_category $uuid_action_scope_storage_admin", + "result": "^$", + "description": "Add a new assignment", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_post $uuid_action_category", + "result": "$uuid_action_scope_storage_admin storage_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + + { + "name": "check_submetarules", + "command": "submetarule show", + "result": "(?P<submetarule_uuid>\\w+)", + "description": "Get one submetarule ID", + "command_options": "-c id -f value" + }, + { + "name": "set_submetarule", + "command": "submetarule set $submetarule_uuid --subject_category_id=\"$uuid_subject_category\" --object_category_id=\"$uuid_object_category\" --action_category_id=\"$uuid_action_category\"", + "result": "^$", + "description": "Set a new submetarule", + "command_options": "" + }, + { + "name": "check_submetarule", + "command": "submetarule show", + "result": "$submetarule_uuid \\s*subject_security_level", + "description": "Check the new submetarule", + "command_options": "-c id -c \"subject categories\" -f value" + }, + { + "name": "check_submetarule", + "command": "submetarule show", + "result": "$submetarule_uuid \\s*object_security_level", + "description": "Check the new submetarule", + "command_options": "-c id -c \"object categories\" -f value" + }, + { + "name": "check_submetarule", + "command": "submetarule show", + "result": "$submetarule_uuid \\s*resource_action", + "description": "Check the new submetarule", + "command_options": "-c id -c \"action categories\" -f value" + }, + + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,vm_admin,medium\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+vm_admin\\s+medium", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,vm_admin,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+vm_admin\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"medium,vm_admin,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+medium\\s+vm_admin\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,vm_access,medium\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+vm_access\\s+medium", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,vm_access,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+vm_access\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"medium,vm_access,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+medium\\s+vm_access\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,storage_admin,medium\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+storage_admin\\s+medium", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,storage_admin,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+storage_admin\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"medium,storage_admin,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+medium\\s+storage_admin\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,storage_access,medium\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+storage_access\\s+medium", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"high,storage_access,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+high\\s+storage_access\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "add_a_new_rule", + "command": "rule add $submetarule_uuid \"medium,storage_access,low\"", + "result": "^$", + "description": "Add a new rule.", + "command_options": "" + }, + { + "name": "check_added_rule", + "command": "rule list $submetarule_uuid", + "result": "(?P<rule_id>\\w+)\\s+medium\\s+storage_access\\s+low", + "description": "Check that the rule was correctly added.", + "command_options": "-c id -c s:subject_security_level -c a:resource_action -c o:object_security_level -f value" + }, + { + "name": "get aggregation algorithm", + "command": "aggregation algorithm list", + "result": "(?P<uuid_aggregation>\\w+)\\s+one_true", + "description": "Get aggregation algorithm.", + "command_options": "-c id -c name -f value" + }, + { + "name": "set aggregation algorithm", + "command": "aggregation algorithm set $uuid_aggregation", + "result": "", + "description": "Set aggregation algorithm to one_true.", + "command_options": "" + }, + { + "name": "get aggregation algorithm", + "command": "aggregation algorithm show", + "result": "$uuid_aggregation\\s+one_true", + "description": "Check aggregation algorithm.", + "command_options": "-c id -c name -f value" + }, + { + "name": "get submetarule algorithm", + "command": "submetarule algorithm list", + "result": "(?P<uuid_submetarule_algo>\\w+)\\s+inclusion", + "description": "Get submetarule algorithm named inclusion.", + "command_options": "-c id -c name -f value" + }, + { + "name": "set submetarule algorithm", + "command": "submetarule set --algorithm_name inclusion $submetarule_uuid", + "result": "", + "description": "Set submetarule algorithm to inclusion.", + "command_options": "" + }, + + { + "name": "swift list", + "external_command": "swift list", + "result": "(?!moonclient_test)", + "description": "Check Swift command, it must be impossible due to current rules" + }, + + { + "name": "list tenant", + "command": "tenant list", + "result": "demo", + "description": "Check if tenant demo is used." + }, + + { + "name": "add_object", + "command": "object add $uuid_account", + "result": "", + "description": "Add the new swift account", + "command_options": "" + }, + { + "name": "list_object", + "command": "object list", + "result": "(?P<uuid_object_swift_account>\\w+)\\s+$uuid_account", + "description": "Check that the new swift account was added." + }, + { + "name": "add_assignment", + "command": "object assignment add $uuid_object_swift_account $uuid_object_category $uuid_object_scope_low", + "result": "^$", + "description": "Set the assignment 'low' to swift account", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "object assignment list $uuid_object_swift_account $uuid_object_category", + "result": "$uuid_object_scope_low low", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_action", + "command": "action add get_account_details --description 'Swift action'", + "result": "", + "description": "Add the action get_account_details", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_swift_get_account_details>\\w+)\\s+get_account_details", + "description": "Check that the new swift action was added." + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_swift_get_account_details $uuid_action_category $uuid_action_scope_storage_access", + "result": "^$", + "description": "Set the assignment 'storage_access' to swift action", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_swift_get_account_details $uuid_action_category", + "result": "$uuid_action_scope_storage_access storage_access", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + + { + "name": "swift list", + "external_command": "swift list", + "result": "moonclient_test", + "description": "Check Swift command, it must be now possible due to current rules" + }, + { + "name": "create temp file", + "external_command": "touch /tmp/test.txt", + "result": "", + "description": "Create a temporary file to put in swift." + }, + { + "name": "swift post file", + "external_command": "swift upload moonclient_test /tmp/test.txt", + "result": "", + "description": "Try to put the test file in the container, impossible due to the absence of the object" + }, + { + "name": "swift list", + "external_command": "swift list moonclient_test", + "result": "(?!tmp/test.txt)", + "description": "Check that test file has not been uploaded." + }, + { + "name": "add_object", + "command": "object add AUTH_6c7f27a7aaf94423a28ea8ac30fea929-moonclient_test", + "result": "", + "description": "Add the new swift container", + "command_options": "" + }, + { + "name": "list_object", + "command": "object list", + "result": "(?P<uuid_object_swift_container>\\w+)\\s+AUTH_6c7f27a7aaf94423a28ea8ac30fea929-moonclient_test", + "description": "Check that the new swift container was added." + }, + { + "name": "add_assignment", + "command": "object assignment add $uuid_object_swift_container $uuid_object_category $uuid_object_scope_low", + "result": "^$", + "description": "Set the assignment 'low' to swift container", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "object assignment list $uuid_object_swift_container $uuid_object_category", + "result": "$uuid_object_scope_low low", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_object", + "command": "object add AUTH_6c7f27a7aaf94423a28ea8ac30fea929-moonclient_test-tmp-test-txt", + "result": "", + "description": "Add the new swift object", + "command_options": "" + }, + { + "name": "list_object", + "command": "object list", + "result": "(?P<uuid_object_swift_object>\\w+)\\s+AUTH_6c7f27a7aaf94423a28ea8ac30fea929-moonclient_test-tmp-test-txt", + "description": "Check that the new swift object was added." + }, + { + "name": "add_assignment", + "command": "object assignment add $uuid_object_swift_object $uuid_object_category $uuid_object_scope_low", + "result": "^$", + "description": "Set the assignment 'low' to swift object", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "object assignment list $uuid_object_swift_object $uuid_object_category", + "result": "$uuid_object_scope_low low", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_action", + "command": "action add get_container --description 'Swift action'", + "result": "", + "description": "Add the action get_container", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_swift_get_container>\\w+)\\s+get_container", + "description": "Check that the new swift action was added." + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_swift_get_container $uuid_action_category $uuid_action_scope_storage_access", + "result": "^$", + "description": "Set the assignment 'storage_access' to swift action", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_swift_get_container $uuid_action_category", + "result": "$uuid_action_scope_storage_access storage_access", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_action", + "command": "action add get_object_metadata --description 'Swift action'", + "result": "", + "description": "Add the action get_object_metadata", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_swift_get_object_metadata>\\w+)\\s+get_object_metadata", + "description": "Check that the new swift action was added." + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_swift_get_object_metadata $uuid_action_category $uuid_action_scope_storage_access", + "result": "^$", + "description": "Set the assignment 'storage_access' to swift action", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_swift_get_object_metadata $uuid_action_category", + "result": "$uuid_action_scope_storage_access storage_access", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_action", + "command": "action add create_object --description 'Swift action'", + "result": "", + "description": "Add the action create_object", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_swift_create_object>\\w+)\\s+create_object", + "description": "Check that the new swift action was added." + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_swift_create_object $uuid_action_category $uuid_action_scope_storage_admin", + "result": "^$", + "description": "Set the assignment 'storage_access' to swift action", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_swift_create_object $uuid_action_category", + "result": "$uuid_action_scope_storage_admin storage_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "add_action", + "command": "action add create_container --description 'Swift action'", + "result": "", + "description": "Add the action create_container", + "command_options": "" + }, + { + "name": "list_action", + "command": "action list", + "result": "(?P<uuid_action_swift_create_container>\\w+)\\s+create_container", + "description": "Check that the new swift action was added." + }, + { + "name": "add_assignment", + "command": "action assignment add $uuid_action_swift_create_container $uuid_action_category $uuid_action_scope_storage_admin", + "result": "^$", + "description": "Set the assignment 'storage_access' to swift action", + "command_options": "" + }, + { + "name": "check_added_assignment", + "command": "action assignment list $uuid_action_swift_create_container $uuid_action_category", + "result": "$uuid_action_scope_storage_admin storage_admin", + "description": "Check added assignment.", + "command_options": "-c id -c name -f value" + }, + { + "name": "swift post file", + "external_command": "swift upload moonclient_test /tmp/test.txt", + "result": "", + "description": "Put the test file in the container" + }, + { + "name": "swift list", + "external_command": "swift list moonclient_test", + "result": "tmp/test.txt", + "description": "Check that test file has been uploaded." + }, + + + { + "name": "delete_authz_intra_extension", + "command": "intraextension delete $uuid_authz", + "result": "", + "description": "Delete the authz intra extension", + "command_options": "" + }, + { + "name": "delete_tenant", + "command": "tenant delete $uuid", + "result": "", + "description": "Delete the tenant demo", + "command_options": "" + }, + { + "name": "swift delete new container", + "external_command": "swift delete moonclient_test", + "result": "", + "description": "Delete the new server" + } + ] + } +}
\ No newline at end of file diff --git a/moonclient/moonclient/tests/tests_external_commands.json b/moonclient/moonclient/tests/tests_external_commands.json new file mode 100644 index 00000000..0aa6f704 --- /dev/null +++ b/moonclient/moonclient/tests/tests_external_commands.json @@ -0,0 +1,109 @@ +{ + "command_options": "-f value", + "tests_group": { + "main": [ + { + "name": "list tenant", + "command": "tenant list", + "result": "(?!demo)", + "description": "List all tenants (must be empty)" + }, + { + "name": "add tenant demo", + "command": "tenant add demo", + "result": "^$", + "description": "Add a new tenant", + "command_options": "" + }, + { + "name": "check tenant demo", + "command": "tenant list", + "result": "(?P<uuid>\\w+)\\s+demo", + "description": "Check that tenant demo has been correctly added" + }, + { + "name": "create_intraextension_admin", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", + "result": "IntraExtension created: (?P<uuid_admin>\\w+)", + "description": "Create an admin intra extension", + "command_options": "" + }, + { + "name": "list_intraextension_admin", + "command": "intraextension list", + "result": "$uuid_admin", + "description": "Check the existence of that admin intra extension" + }, + { + "name": "create_intraextension_authz", + "command": "intraextension add --policy_model policy_authz authz_test", + "result": "IntraExtension created: (?P<uuid_authz>\\w+)", + "description": "Create an authz intra extension", + "command_options": "" + }, + { + "name": "list_intraextension_authz", + "command": "intraextension list", + "result": "$uuid_authz", + "description": "Check the existence of that authz intra extension" + }, + { + "name": "set_tenant_authz", + "command": "tenant set --authz $uuid_authz $uuid", + "result": "", + "description": "Connect the authz intra extension to the tenant demo", + "command_options": "" + }, + { + "name": "check authz ie for tenant demo", + "command": "tenant list", + "result": "demo $uuid_authz", + "description": "Check that authz ie has been correctly added for tenant demo ", + "command_options": "-c name -c intra_authz_extension_id -f value" + }, + { + "name": "set_tenant_admin", + "command": "tenant set --admin $uuid_admin $uuid", + "result": "", + "description": "Connect the admin intra extension to the tenant demo", + "command_options": "" + }, + { + "name": "check admin ie for tenant demo", + "command": "tenant list", + "result": "demo $uuid_admin", + "description": "Check that admin ie has been correctly added for tenant demo ", + "command_options": "-c name -c intra_admin_extension_id -f value" + }, + + { + "name": "check nova command", + "external_command": "nova list", + "result": "\\| (?P<uuid_server>[\\w\\-]+)\\s+\\| (?P<name_server>\\w+)\\s+\\| ACTIVE\\s+\\| [\\w\\-]+\\s+\\| Running", + "description": "Check that nova is running and get the ID of one running server" + }, + + { + "name": "delete_admin_intra_extension", + "command": "intraextension delete $uuid_admin", + "result": "", + "description": "Delete the admin intra extension", + "command_options": "" + }, + { + "name": "delete_authz_intra_extension", + "command": "intraextension delete $uuid_authz", + "result": "", + "description": "Delete the authz intra extension", + "command_options": "" + }, + { + "name": "delete_tenant", + "command": "tenant delete $uuid", + "result": "", + "description": "Delete the tenant demo", + "command_options": "" + } + ] + } +}
\ No newline at end of file diff --git a/moonclient/moonclient/tests/tests_object_assignments.json b/moonclient/moonclient/tests/tests_object_assignments.json index 450066a4..35fd34ab 100644 --- a/moonclient/moonclient/tests/tests_object_assignments.json +++ b/moonclient/moonclient/tests/tests_object_assignments.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -183,7 +183,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -196,7 +196,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_object_categories.json b/moonclient/moonclient/tests/tests_object_categories.json index cd7ad01a..a6464641 100644 --- a/moonclient/moonclient/tests/tests_object_categories.json +++ b/moonclient/moonclient/tests/tests_object_categories.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -118,7 +118,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -131,7 +131,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_object_scopes.json b/moonclient/moonclient/tests/tests_object_scopes.json index f298fa12..c9f832e5 100644 --- a/moonclient/moonclient/tests/tests_object_scopes.json +++ b/moonclient/moonclient/tests/tests_object_scopes.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -127,7 +127,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -140,7 +140,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_objects.json b/moonclient/moonclient/tests/tests_objects.json index cb4e766a..c3a70f4e 100644 --- a/moonclient/moonclient/tests/tests_objects.json +++ b/moonclient/moonclient/tests/tests_objects.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -118,7 +118,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -131,7 +131,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_rules.json b/moonclient/moonclient/tests/tests_rules.json index cfbedecb..5d3229b1 100644 --- a/moonclient/moonclient/tests/tests_rules.json +++ b/moonclient/moonclient/tests/tests_rules.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -190,7 +190,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -203,7 +203,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_subject_assignments.json b/moonclient/moonclient/tests/tests_subject_assignments.json index 3a9d93b5..7eb1e82c 100644 --- a/moonclient/moonclient/tests/tests_subject_assignments.json +++ b/moonclient/moonclient/tests/tests_subject_assignments.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -183,7 +183,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -196,7 +196,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_subject_categories.json b/moonclient/moonclient/tests/tests_subject_categories.json index 644d78b5..63bd349c 100644 --- a/moonclient/moonclient/tests/tests_subject_categories.json +++ b/moonclient/moonclient/tests/tests_subject_categories.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -118,7 +118,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -131,7 +131,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_subject_scopes.json b/moonclient/moonclient/tests/tests_subject_scopes.json index 7b16f42b..c6f7f309 100644 --- a/moonclient/moonclient/tests/tests_subject_scopes.json +++ b/moonclient/moonclient/tests/tests_subject_scopes.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -127,7 +127,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -140,7 +140,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_subjects.json b/moonclient/moonclient/tests/tests_subjects.json index 7453c6a7..7001e227 100644 --- a/moonclient/moonclient/tests/tests_subjects.json +++ b/moonclient/moonclient/tests/tests_subjects.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -118,7 +118,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -131,7 +131,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_submetarules.json b/moonclient/moonclient/tests/tests_submetarules.json index 64ca86ff..955f628d 100644 --- a/moonclient/moonclient/tests/tests_submetarules.json +++ b/moonclient/moonclient/tests/tests_submetarules.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -148,7 +148,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" @@ -161,7 +161,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" diff --git a/moonclient/moonclient/tests/tests_tenants.json b/moonclient/moonclient/tests/tests_tenants.json index 2f24a295..02b20754 100644 --- a/moonclient/moonclient/tests/tests_tenants.json +++ b/moonclient/moonclient/tests/tests_tenants.json @@ -23,7 +23,7 @@ }, { "name": "create_intraextension_admin", - "command": "intraextension create --policy_model policy_admin admin_test", + "command": "intraextension add --policy_model policy_rbac_admin admin_test", "result": "IntraExtension created: (?P<uuid_admin>\\w+)", "description": "Create an admin intra extension", "command_options": "" @@ -36,7 +36,7 @@ }, { "name": "create_intraextension_authz", - "command": "intraextension create --policy_model policy_authz authz_test", + "command": "intraextension add --policy_model policy_authz authz_test", "result": "IntraExtension created: (?P<uuid_authz>\\w+)", "description": "Create an authz intra extension", "command_options": "" diff --git a/moonclient/setup.py b/moonclient/setup.py index 44d89a9d..e048bf97 100644 --- a/moonclient/setup.py +++ b/moonclient/setup.py @@ -69,7 +69,7 @@ setup( 'tenant_delete = moonclient.tenants:TenantDelete', 'intraextension_select = moonclient.intraextension:IntraExtensionSelect', - 'intraextension_create = moonclient.intraextension:IntraExtensionCreate', + 'intraextension_add = moonclient.intraextension:IntraExtensionCreate', 'intraextension_list = moonclient.intraextension:IntraExtensionList', 'intraextension_delete = moonclient.intraextension:IntraExtensionDelete', 'intraextension_show = moonclient.intraextension:IntraExtensionShow', |