diff options
19 files changed, 50 insertions, 49 deletions
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/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_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_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', |