aboutsummaryrefslogtreecommitdiffstats
path: root/moonclient/moonclient
diff options
context:
space:
mode:
Diffstat (limited to 'moonclient/moonclient')
-rw-r--r--moonclient/moonclient/__init__.py1
-rw-r--r--moonclient/moonclient/action_assignments.py149
-rw-r--r--moonclient/moonclient/action_categories.py102
-rw-r--r--moonclient/moonclient/action_scopes.py123
-rw-r--r--moonclient/moonclient/actions.py102
-rw-r--r--moonclient/moonclient/configuration.py64
-rw-r--r--moonclient/moonclient/intraextension.py170
-rw-r--r--moonclient/moonclient/logs.py96
-rw-r--r--moonclient/moonclient/metarules.py214
-rw-r--r--moonclient/moonclient/object_assignments.py149
-rw-r--r--moonclient/moonclient/object_categories.py102
-rw-r--r--moonclient/moonclient/object_scopes.py123
-rw-r--r--moonclient/moonclient/objects.py102
-rw-r--r--moonclient/moonclient/rules.py242
-rw-r--r--moonclient/moonclient/shell.py264
-rw-r--r--moonclient/moonclient/subject_assignments.py149
-rw-r--r--moonclient/moonclient/subject_categories.py102
-rw-r--r--moonclient/moonclient/subject_scopes.py123
-rw-r--r--moonclient/moonclient/subjects.py119
-rw-r--r--moonclient/moonclient/tenants.py200
-rw-r--r--moonclient/moonclient/tests.py251
-rw-r--r--moonclient/moonclient/tests/functional_tests.sh131
-rw-r--r--moonclient/moonclient/tests/tests_action_assignments.json371
-rw-r--r--moonclient/moonclient/tests/tests_action_categories.json241
-rw-r--r--moonclient/moonclient/tests/tests_action_scopes.json259
-rw-r--r--moonclient/moonclient/tests/tests_actions.json241
-rw-r--r--moonclient/moonclient/tests/tests_admin_intraextensions.json128
-rw-r--r--moonclient/moonclient/tests/tests_configuration.json235
-rw-r--r--moonclient/moonclient/tests/tests_object_assignments.json385
-rw-r--r--moonclient/moonclient/tests/tests_object_categories.json241
-rw-r--r--moonclient/moonclient/tests/tests_object_scopes.json259
-rw-r--r--moonclient/moonclient/tests/tests_objects.json241
-rw-r--r--moonclient/moonclient/tests/tests_root_intraextensions.json47
-rw-r--r--moonclient/moonclient/tests/tests_rules.json378
-rw-r--r--moonclient/moonclient/tests/tests_subject_assignments.json371
-rw-r--r--moonclient/moonclient/tests/tests_subject_categories.json241
-rw-r--r--moonclient/moonclient/tests/tests_subject_scopes.json259
-rw-r--r--moonclient/moonclient/tests/tests_subjects.json241
-rw-r--r--moonclient/moonclient/tests/tests_submetarules.json294
-rw-r--r--moonclient/moonclient/tests/tests_tenants.json106
-rw-r--r--moonclient/moonclient/tests/todo/tests_empty_policy_new_user.json3627
-rw-r--r--moonclient/moonclient/tests/todo/tests_empty_policy_nova.json1079
-rw-r--r--moonclient/moonclient/tests/todo/tests_empty_policy_swift.json1175
-rw-r--r--moonclient/moonclient/tests/todo/tests_external_commands.json228
44 files changed, 0 insertions, 13725 deletions
diff --git a/moonclient/moonclient/__init__.py b/moonclient/moonclient/__init__.py
deleted file mode 100644
index 6a9beea8..00000000
--- a/moonclient/moonclient/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-__version__ = "0.4.0"
diff --git a/moonclient/moonclient/action_assignments.py b/moonclient/moonclient/action_assignments.py
deleted file mode 100644
index 5625a2f2..00000000
--- a/moonclient/moonclient/action_assignments.py
+++ /dev/null
@@ -1,149 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class ActionAssignmentsList(Lister):
- """List all action assignments."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionAssignmentsList, self).get_parser(prog_name)
- parser.add_argument(
- 'action_id',
- metavar='<action-uuid>',
- help='Action UUID',
- )
- parser.add_argument(
- 'action_category_id',
- metavar='<action-category-uuid>',
- help='Action category UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def __get_scope_from_id(self, intraextension_id, action_category_id, action_scope_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_scopes/{}".format(
- intraextension_id, action_category_id),
- authtoken=True)
- if action_scope_id in data:
- return data[action_scope_id]
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_assignments/{}/{}".format(
- parsed_args.intraextension, parsed_args.action_id, parsed_args.action_category_id),
- authtoken=True)
- return (
- ("id", "name"),
- ((_id, self.__get_scope_from_id(parsed_args.intraextension,
- parsed_args.action_category_id,
- _id)['name']) for _id in data)
- )
-
-
-class ActionAssignmentsAdd(Command):
- """Add a new action assignment."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionAssignmentsAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'action_id',
- metavar='<action-uuid>',
- help='Action UUID',
- )
- parser.add_argument(
- 'action_category_id',
- metavar='<action-category-uuid>',
- help='Action category UUID',
- )
- parser.add_argument(
- 'action_scope_id',
- metavar='<action-scope-uuid>',
- help='Action scope UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def __get_scope_from_id(self, intraextension_id, action_category_id, action_scope_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_scopes/{}".format(
- intraextension_id, action_category_id),
- authtoken=True)
- if action_scope_id in data:
- return data[action_scope_id]
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_assignments".format(parsed_args.intraextension),
- post_data={
- "action_id": parsed_args.action_id,
- "action_category_id": parsed_args.action_category_id,
- "action_scope_id": parsed_args.action_scope_id},
- authtoken=True)
- return (
- ("id", "name"),
- ((_id, self.__get_scope_from_id(parsed_args.intraextension,
- parsed_args.action_category_id,
- _id)['name']) for _id in data)
- )
-
-
-class ActionAssignmentsDelete(Command):
- """Delete an action assignment."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionAssignmentsDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'action_id',
- metavar='<action-uuid>',
- help='Action UUID',
- )
- parser.add_argument(
- 'action_category_id',
- metavar='<action-category-uuid>',
- help='Action category UUID',
- )
- parser.add_argument(
- 'action_scope_id',
- metavar='<action-scope-uuid>',
- help='Action scope UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_assignments/{}/{}/{}".format(
- parsed_args.intraextension,
- parsed_args.action_id,
- parsed_args.action_category_id,
- parsed_args.action_scope_id),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/action_categories.py b/moonclient/moonclient/action_categories.py
deleted file mode 100644
index bf7cb7e1..00000000
--- a/moonclient/moonclient/action_categories.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class ActionCategoriesList(Lister):
- """List all action categories."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionCategoriesList, self).get_parser(prog_name)
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_categories".format(parsed_args.intraextension),
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_uuid, data[_uuid]["name"], data[_uuid]["description"]) for _uuid in data)
- )
-
-
-class ActionCategoriesAdd(Command):
- """Add a new action category."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionCategoriesAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'action_category_name',
- metavar='<action_category-name>',
- help='Action category name',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- parser.add_argument(
- '--description',
- metavar='<description-str>',
- help='Action category description',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_categories".format(parsed_args.intraextension),
- post_data={
- "action_category_name": parsed_args.action_category_name,
- "action_category_description": parsed_args.description},
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_uuid, data[_uuid]["name"], data[_uuid]["description"]) for _uuid in data)
- )
-
-
-class ActionCategoriesDelete(Command):
- """Delete an action category."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionCategoriesDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'action_category_id',
- metavar='<action_category-uuid>',
- help='Action category UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_categories/{}".format(
- parsed_args.intraextension,
- parsed_args.action_category_id),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/action_scopes.py b/moonclient/moonclient/action_scopes.py
deleted file mode 100644
index 9ddf8d4e..00000000
--- a/moonclient/moonclient/action_scopes.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class ActionScopesList(Lister):
- """List all action scopes."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionScopesList, self).get_parser(prog_name)
- parser.add_argument(
- 'action_category_id',
- metavar='<action-category-uuid>',
- help='Action category UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_scopes/{}".format(
- parsed_args.intraextension, parsed_args.action_category_id),
- authtoken=True)
- self.log.debug(data)
- return (
- ("id", "name", "description"),
- ((_id, data[_id]["name"], data[_id]["description"]) for _id in data)
- )
-
-
-class ActionScopesAdd(Command):
- """Add a new action scope."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionScopesAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'action_category_id',
- metavar='<action-category-uuid>',
- help='Action category UUID',
- )
- parser.add_argument(
- 'action_scope_name',
- metavar='<action-scope-name>',
- help='Action scope name',
- )
- parser.add_argument(
- '--description',
- metavar='<description-str>',
- help='Description',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_scopes/{}".format(
- parsed_args.intraextension, parsed_args.action_category_id),
- post_data={
- "action_scope_name": parsed_args.action_scope_name,
- "action_scope_description": parsed_args.description,
- },
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_id, data[_id]["name"], data[_id]["description"]) for _id in data)
- )
-
-
-class ActionScopesDelete(Command):
- """Delete an action scope."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionScopesDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'action_category_id',
- metavar='<action-category-uuid>',
- help='Action category UUID',
- )
- parser.add_argument(
- 'action_scope_id',
- metavar='<action-scope-uuid>',
- help='Action scope UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_scopes/{}/{}".format(
- parsed_args.intraextension,
- parsed_args.action_category_id,
- parsed_args.action_scope_id
- ),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/actions.py b/moonclient/moonclient/actions.py
deleted file mode 100644
index 9fbad13a..00000000
--- a/moonclient/moonclient/actions.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class ActionsList(Lister):
- """List all actions."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionsList, self).get_parser(prog_name)
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/actions".format(parsed_args.intraextension),
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_uuid, data[_uuid]['name'], data[_uuid]['description']) for _uuid in data)
- )
-
-
-class ActionsAdd(Command):
- """Add a new action."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionsAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'action_name',
- metavar='<action-name>',
- help='Action name',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- parser.add_argument(
- '--description',
- metavar='<description-str>',
- help='Action description',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/actions".format(parsed_args.intraextension), # TODO: check method POST?
- post_data={
- "action_name": parsed_args.action_name,
- "action_description": parsed_args.description},
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_uuid, data[_uuid]['name'], data[_uuid]['description']) for _uuid in data)
- )
-
-
-class ActionsDelete(Command):
- """Delete an action."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ActionsDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'action_id',
- metavar='<action-uuid>',
- help='Action UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/actions/{}".format(
- parsed_args.intraextension,
- parsed_args.action_id),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/configuration.py b/moonclient/moonclient/configuration.py
deleted file mode 100644
index a05d7151..00000000
--- a/moonclient/moonclient/configuration.py
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-
-
-class TemplatesList(Lister):
- """List all policy templates."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(TemplatesList, self).get_parser(prog_name)
- return parser
-
- def take_action(self, parsed_args):
- templates = self.app.get_url(self.app.url_prefix+"/configuration/templates", authtoken=True)
- return (
- ("id", "name", "description"),
- ((template_id, templates[template_id]["name"], templates[template_id]["description"])
- for template_id in templates)
- )
-
-
-class AggregationAlgorithmsList(Lister):
- """List all aggregation algorithms."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(AggregationAlgorithmsList, self).get_parser(prog_name)
- return parser
-
- def take_action(self, parsed_args):
- templates = self.app.get_url(self.app.url_prefix+"/configuration/aggregation_algorithms", authtoken=True)
- return (
- ("id", "name", "description"),
- ((template_id, templates[template_id]["name"], templates[template_id]["description"])
- for template_id in templates)
- )
-
-
-class SubMetaRuleAlgorithmsList(Lister):
- """List all sub meta rule algorithms."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubMetaRuleAlgorithmsList, self).get_parser(prog_name)
- return parser
-
- def take_action(self, parsed_args):
- templates = self.app.get_url(self.app.url_prefix+"/configuration/sub_meta_rule_algorithms", authtoken=True)
- return (
- ("id", "name", "description"),
- ((template_id, templates[template_id]["name"], templates[template_id]["description"])
- for template_id in templates)
- )
-
-
diff --git a/moonclient/moonclient/intraextension.py b/moonclient/moonclient/intraextension.py
deleted file mode 100644
index f66aabbc..00000000
--- a/moonclient/moonclient/intraextension.py
+++ /dev/null
@@ -1,170 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.command import Command
-from cliff.lister import Lister
-from cliff.show import ShowOne
-import os
-
-
-class IntraExtensionSelect(Command):
- """Select an Intra_Extension to work with."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(IntraExtensionSelect, self).get_parser(prog_name)
- parser.add_argument(
- 'id',
- metavar='<intraextension-id>',
- help='IntraExtension UUID to select',
- )
- return parser
-
- def take_action(self, parsed_args):
- ie = self.app.get_url(self.app.url_prefix+"/intra_extensions", authtoken=True)
- if parsed_args.id in ie.keys():
- self.app.intraextension = parsed_args.id
- self.app.stdout.write("Select {} IntraExtension.\n".format(self.app.intraextension))
- else:
- self.app.stdout.write("IntraExtension {} unknown.\n".format(parsed_args.id))
- return
-
-
-class IntraExtensionCreate(Command):
- """Create a new Intra_Extension."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(IntraExtensionCreate, self).get_parser(prog_name)
- parser.add_argument(
- 'name',
- metavar='<intraextension-name>',
- help='New IntraExtension name',
- )
- parser.add_argument(
- '--policy_model',
- metavar='<policymodel-name>',
- help='Policy model name (Template for the new IntraExtension)',
- )
- parser.add_argument(
- '--description',
- metavar='<intraextension-description>',
- help='New IntraExtension description',
- default=""
- )
- return parser
-
- def take_action(self, parsed_args):
- post_data = {
- "intra_extension_name": parsed_args.name,
- "intra_extension_model": parsed_args.policy_model,
- "intra_extension_description": parsed_args.description
- }
- ie = self.app.get_url(self.app.url_prefix+"/intra_extensions", post_data=post_data, authtoken=True)
- if "id" not in ie:
- raise Exception("Error in command {}".format(ie))
- self.app.stdout.write("IntraExtension created: {}\n".format(ie["id"]))
- return
-
-
-class IntraExtensionList(Lister):
- """List all Intra_Extensions."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(IntraExtensionList, self).get_parser(prog_name)
- return parser
-
- def take_action(self, parsed_args):
- ie = self.app.get_url(self.app.url_prefix+"/intra_extensions", authtoken=True)
- return (
- ("id", "name", "model"),
- ((_id, ie[_id]["name"], ie[_id]["model"]) for _id in ie.keys())
- )
-
-
-class IntraExtensionDelete(Command):
- """Delete an Intra_Extension."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(IntraExtensionDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'uuid',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}".format(parsed_args.uuid),
- method="DELETE",
- authtoken=True)
-
-
-class IntraExtensionInit(Command):
- """Initialize the root Intra_Extension (if needed)."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(IntraExtensionInit, self).get_parser(prog_name)
- return parser
-
- def take_action(self, parsed_args):
- self.app.get_url(self.app.url_prefix+"/intra_extensions/init",
- method="GET",
- authtoken=True)
-
-
-class IntraExtensionShow(ShowOne):
- """Show detail about one Intra_Extension."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(IntraExtensionShow, self).get_parser(prog_name)
- parser.add_argument(
- 'uuid',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID (put "selected" if you want to show the selected IntraExtension)',
- default="selected"
- )
- return parser
-
- def take_action(self, parsed_args):
- intra_extension_id = parsed_args.uuid
- if parsed_args.uuid == "selected":
- intra_extension_id = self.app.intraextension
- self.log.debug("self.app.intraextension={}".format(intra_extension_id))
- ie = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}".format(intra_extension_id), authtoken=True)
- self.log.debug("ie={}".format(ie))
- if "id" not in ie:
- self.log.error("Unknown intraextension {}".format(intra_extension_id))
- raise Exception()
- try:
- columns = (
- "id",
- "name",
- "description",
- "model",
- "genre"
- )
- data = (
- ie["id"],
- ie["name"],
- ie["description"],
- ie["model"],
- ie["genre"]
- )
- return columns, data
- except Exception as e:
- self.app.stdout.write(str(e))
diff --git a/moonclient/moonclient/logs.py b/moonclient/moonclient/logs.py
deleted file mode 100644
index e65a530d..00000000
--- a/moonclient/moonclient/logs.py
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-from cliff.show import ShowOne
-
-
-class LogsList(Lister):
- """List all logs."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(LogsList, self).get_parser(prog_name)
- parser.add_argument(
- '--filter',
- metavar='<filter-str>',
- help='Filter strings (example: "OK" or "authz")',
- )
- parser.add_argument(
- '--fromdate',
- metavar='<from-date-str>',
- help='Filter logs by date (example: "2015-04-15-13:45:20")',
- )
- parser.add_argument(
- '--todate',
- metavar='<to-date-str>',
- help='Filter logs by date (example: "2015-04-15-13:45:20")',
- )
- parser.add_argument(
- '--number',
- metavar='<number-int>',
- help='Show only <number-int> logs',
- )
- return parser
-
- @staticmethod
- def split_into_line(line, max_char=60):
- """ Split a long line into multiple lines
-
- :param line: the line to split
- :param max_char: maximal characters to have on one line
- :return: a string with new lines
- """
- words = line.split(" ")
- return_line = ""
- prev_modulo = 0
- while True:
- try:
- modulo = len(return_line) % max_char
- if modulo < prev_modulo:
- return_line += "\n" + words.pop(0) + " "
- else:
- return_line += words.pop(0) + " "
- prev_modulo = modulo
- except IndexError:
- return return_line
-
- def split_time_message(self, line):
- """Split a log string into a table (date, message)
-
- :param line: the line to split
- :return: a table (date, message)
- """
- _time, _blank, _message = line.split(" ", 2)
- return _time, self.split_into_line(_message)
-
- def take_action(self, parsed_args):
- filter_str = parsed_args.filter
- from_date = parsed_args.fromdate
- to_date = parsed_args.todate
- number = parsed_args.number
- options = list()
- if filter_str:
- options.append("filter={}".format(filter_str))
- if from_date:
- options.append("from={}".format(from_date))
- if to_date:
- options.append("to={}".format(to_date))
- if number:
- options.append("event_number={}".format(number))
- if len(options) > 0:
- url = self.app.url_prefix+"/logs/{}".format(",".join(options))
- else:
- url = self.app.url_prefix+"/logs"
- data = self.app.get_url(url, authtoken=True)
- return (
- ("Time", "Message",),
- (self.split_time_message(log) for log in data)
- )
-
diff --git a/moonclient/moonclient/metarules.py b/moonclient/moonclient/metarules.py
deleted file mode 100644
index 6727711e..00000000
--- a/moonclient/moonclient/metarules.py
+++ /dev/null
@@ -1,214 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-from cliff.show import ShowOne
-
-
-class AggregationAlgorithmsList(Lister):
- """List all aggregation algorithms."""
-
- log = logging.getLogger(__name__)
-
- def __get_aggregation_algorithm_from_id(self, algorithm_id):
- algorithms = self.app.get_url(self.app.url_prefix+"/configuration/aggregation_algorithms", authtoken=True)
- if algorithm_id in algorithms:
- return algorithms[algorithm_id]
- return dict()
-
- def get_parser(self, prog_name):
- parser = super(AggregationAlgorithmsList, self).get_parser(prog_name)
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/aggregation_algorithm".format(
- parsed_args.intraextension),
- authtoken=True)
- algorithm = self.__get_aggregation_algorithm_from_id(data['aggregation_algorithm'])
- return (
- ("id", "name", "description"),
- ((data['aggregation_algorithm'], algorithm["name"], algorithm["description"]), )
- )
-
-
-class AggregationAlgorithmSet(Command):
- """Set the current aggregation algorithm."""
-
- log = logging.getLogger(__name__)
-
- def __get_aggregation_algorithm_from_id(self, algorithm_id):
- algorithms = self.app.get_url(self.app.url_prefix+"/configuration/aggregation_algorithms", authtoken=True)
- if algorithm_id in algorithms:
- return algorithms[algorithm_id]
- return dict()
-
- def get_parser(self, prog_name):
- parser = super(AggregationAlgorithmSet, self).get_parser(prog_name)
- parser.add_argument(
- 'aggregation_algorithm_id',
- metavar='<aggregation-algorithm-uuid>',
- help='Aggregation algorithm UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- parser.add_argument(
- '--description',
- metavar='<description-str>',
- help='Action description',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/aggregation_algorithm".format(
- parsed_args.intraextension),
- post_data={
- "aggregation_algorithm_id": parsed_args.aggregation_algorithm_id,
- "aggregation_algorithm_description": parsed_args.description},
- authtoken=True)
- algorithm = self.__get_aggregation_algorithm_from_id(data['aggregation_algorithm'])
- return (
- ("id",),
- (algorithm,)
- )
-
-
-class SubMetaRuleShow(Lister):
- """Show the current sub meta rule."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubMetaRuleShow, self).get_parser(prog_name)
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def __get_subject_category_name(self, intraextension, subject_category_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_categories".format(intraextension),
- authtoken=True)
- if subject_category_id in data:
- return data[subject_category_id]["name"]
-
- def __get_object_category_name(self, intraextension, object_category_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_categories".format(intraextension),
- authtoken=True)
- if object_category_id in data:
- return data[object_category_id]["name"]
-
- def __get_action_category_name(self, intraextension, action_category_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_categories".format(intraextension),
- authtoken=True)
- if action_category_id in data:
- return data[action_category_id]["name"]
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/sub_meta_rules".format(parsed_args.intraextension),
- authtoken=True)
- return (
- ("id", "name", "algorithm", "subject categories", "object categories", "action categories"),
- ((
- key,
- value["name"],
- value["algorithm"],
- ", ".join([self.__get_subject_category_name(parsed_args.intraextension, cat) for cat in value["subject_categories"]]),
- ", ".join([self.__get_object_category_name(parsed_args.intraextension, cat) for cat in value["object_categories"]]),
- ", ".join([self.__get_action_category_name(parsed_args.intraextension, cat) for cat in value["action_categories"]]),
- ) for key, value in data.iteritems())
- )
-
-
-class SubMetaRuleSet(Command):
- """Set the current sub meta rule."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubMetaRuleSet, self).get_parser(prog_name)
- parser.add_argument(
- 'submetarule_id',
- metavar='<sub-meta-rule-uuid>',
- help='Sub Meta Rule UUID (example: "12346")',
- )
- parser.add_argument(
- '--algorithm_name',
- metavar='<algorithm-str>',
- help='algorithm to use (example: "inclusion")',
- )
- parser.add_argument(
- '--name',
- metavar='<name-str>',
- help='name to set (example: "my new sub meta rule")',
- )
- parser.add_argument(
- '--subject_category_id',
- metavar='<subject-category-uuid>',
- help='subject category UUID (example: "12346,")',
- )
- parser.add_argument(
- '--object_category_id',
- metavar='<object-category-uuid>',
- help='object category UUID (example: "12346")',
- )
- parser.add_argument(
- '--action_category_id',
- metavar='<action-category-uuid>',
- help='action category UUID (example: "12346,0987654")',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- subject_category_id = parsed_args.subject_category_id
- if not subject_category_id:
- subject_category_id = ""
- object_category_id = parsed_args.object_category_id
- if not object_category_id:
- object_category_id = ""
- action_category_id = parsed_args.action_category_id
- if not action_category_id:
- action_category_id = ""
- subject_category_id = map(lambda x: x.strip(), subject_category_id.split(','))
- action_category_id = map(lambda x: x.strip(), action_category_id.split(','))
- object_category_id = map(lambda x: x.strip(), object_category_id.split(','))
- sub_meta_rule_id = parsed_args.submetarule_id
- post_data = dict()
- post_data["sub_meta_rule_name"] = parsed_args.name
- post_data["sub_meta_rule_algorithm"] = parsed_args.algorithm_name
- post_data["sub_meta_rule_subject_categories"] = filter(lambda x: x, subject_category_id)
- post_data["sub_meta_rule_object_categories"] = filter(lambda x: x, object_category_id)
- post_data["sub_meta_rule_action_categories"] = filter(lambda x: x, action_category_id)
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/sub_meta_rules/{}".format(parsed_args.intraextension,
- sub_meta_rule_id),
- post_data=post_data,
- method="POST",
- authtoken=True)
-
-
diff --git a/moonclient/moonclient/object_assignments.py b/moonclient/moonclient/object_assignments.py
deleted file mode 100644
index 0942aa6f..00000000
--- a/moonclient/moonclient/object_assignments.py
+++ /dev/null
@@ -1,149 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class ObjectAssignmentsList(Lister):
- """List all object assignments."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectAssignmentsList, self).get_parser(prog_name)
- parser.add_argument(
- 'object_id',
- metavar='<object-uuid>',
- help='Object UUID',
- )
- parser.add_argument(
- 'object_category_id',
- metavar='<object-category-uuid>',
- help='Object category UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def __get_scope_from_id(self, intraextension_id, object_category_id, object_scope_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_scopes/{}".format(
- intraextension_id, object_category_id),
- authtoken=True)
- if object_scope_id in data:
- return data[object_scope_id]
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_assignments/{}/{}".format(
- parsed_args.intraextension, parsed_args.object_id, parsed_args.object_category_id),
- authtoken=True)
- return (
- ("id", "name"),
- ((_id, self.__get_scope_from_id(parsed_args.intraextension,
- parsed_args.object_category_id,
- _id)['name']) for _id in data)
- )
-
-
-class ObjectAssignmentsAdd(Command):
- """Add a new object assignment."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectAssignmentsAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'object_id',
- metavar='<object-uuid>',
- help='Object UUID',
- )
- parser.add_argument(
- 'object_category_id',
- metavar='<object-category-uuid>',
- help='Object category UUID',
- )
- parser.add_argument(
- 'object_scope_id',
- metavar='<object-scope-uuid>',
- help='Object scope UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def __get_scope_from_id(self, intraextension_id, object_category_id, object_scope_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_scopes/{}".format(
- intraextension_id, object_category_id),
- authtoken=True)
- if object_scope_id in data:
- return data[object_scope_id]
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_assignments".format(parsed_args.intraextension),
- post_data={
- "object_id": parsed_args.object_id,
- "object_category_id": parsed_args.object_category_id,
- "object_scope_id": parsed_args.object_scope_id},
- authtoken=True)
- return (
- ("id", "name"),
- ((_id, self.__get_scope_from_id(parsed_args.intraextension,
- parsed_args.object_category_id,
- _id)['name']) for _id in data)
- )
-
-
-class ObjectAssignmentsDelete(Command):
- """Delete an object assignment."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectAssignmentsDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'object_id',
- metavar='<object-uuid>',
- help='Object UUID',
- )
- parser.add_argument(
- 'object_category_id',
- metavar='<object-category-id>',
- help='Object category UUID',
- )
- parser.add_argument(
- 'object_scope_id',
- metavar='<object-scope-id>',
- help='Object scope UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_assignments/{}/{}/{}".format(
- parsed_args.intraextension,
- parsed_args.object_id,
- parsed_args.object_category_id,
- parsed_args.object_scope_id),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/object_categories.py b/moonclient/moonclient/object_categories.py
deleted file mode 100644
index 5641f4bf..00000000
--- a/moonclient/moonclient/object_categories.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class ObjectCategoriesList(Lister):
- """List all Intra_Extensions."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectCategoriesList, self).get_parser(prog_name)
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_categories".format(parsed_args.intraextension),
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_uuid, data[_uuid]["name"], data[_uuid]["description"]) for _uuid in data)
- )
-
-
-class ObjectCategoriesAdd(Command):
- """Add a new object category."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectCategoriesAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'object_category_name',
- metavar='<object_category-name>',
- help='Object category name',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- parser.add_argument(
- '--description',
- metavar='<description-str>',
- help='Object category description',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_categories".format(parsed_args.intraextension),
- post_data={
- "object_category_name": parsed_args.object_category_name,
- "object_category_description": parsed_args.description},
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_uuid, data[_uuid]["name"], data[_uuid]["description"]) for _uuid in data)
- )
-
-
-class ObjectCategoriesDelete(Command):
- """Delete an object category."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectCategoriesDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'object_category_id',
- metavar='<object_category-uuid>',
- help='Object category UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_categories/{}".format(
- parsed_args.intraextension,
- parsed_args.object_category_id),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/object_scopes.py b/moonclient/moonclient/object_scopes.py
deleted file mode 100644
index 41b9aef6..00000000
--- a/moonclient/moonclient/object_scopes.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class ObjectScopesList(Lister):
- """List all object scopes."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectScopesList, self).get_parser(prog_name)
- parser.add_argument(
- 'object_category_id',
- metavar='<object-category-uuid>',
- help='Object category UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_scopes/{}".format(
- parsed_args.intraextension, parsed_args.object_category_id),
- authtoken=True)
- self.log.debug(data) # TODO: why log here?
- return (
- ("id", "name", "description"),
- ((_id, data[_id]["name"], data[_id]["description"]) for _id in data)
- )
-
-
-class ObjectScopesAdd(Command):
- """Add a new object scope."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectScopesAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'object_category_id',
- metavar='<object-category-uuid>',
- help='Object category UUID',
- )
- parser.add_argument(
- 'object_scope_name',
- metavar='<object-scope-str>',
- help='Object scope name',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- parser.add_argument(
- '--description',
- metavar='<description-str>',
- help='Description',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_scopes/{}".format(
- parsed_args.intraextension, parsed_args.object_category_id),
- post_data={
- "object_scope_name": parsed_args.object_scope_name,
- "object_scope_description": parsed_args.description,
- },
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_id, data[_id]["name"], data[_id]["description"]) for _id in data)
- )
-
-
-class ObjectScopesDelete(Command):
- """Delete an object scope."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectScopesDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'object_category_id',
- metavar='<object-category-uuid>',
- help='Object category UUID',
- )
- parser.add_argument(
- 'object_scope_id',
- metavar='<object-scope-uuid>',
- help='Object scope UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_scopes/{}/{}".format(
- parsed_args.intraextension,
- parsed_args.object_category_id,
- parsed_args.object_scope_id
- ),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/objects.py b/moonclient/moonclient/objects.py
deleted file mode 100644
index 0fc04ab8..00000000
--- a/moonclient/moonclient/objects.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class ObjectsList(Lister):
- """List all objects."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectsList, self).get_parser(prog_name)
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/objects".format(parsed_args.intraextension),
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_uuid, data[_uuid]["name"], data[_uuid]["description"]) for _uuid in data)
- )
-
-
-class ObjectsAdd(Command):
- """Add a new object."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectsAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'object_name',
- metavar='<object-name>',
- help='Object name',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- parser.add_argument(
- '--description',
- metavar='<description-str>',
- help='Object description',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/objects".format(parsed_args.intraextension),
- post_data={
- "object_name": parsed_args.object_name,
- "object_description": parsed_args.description},
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_uuid, data[_uuid]["name"], data[_uuid]["description"]) for _uuid in data)
- )
-
-
-class ObjectsDelete(Command):
- """List all Intra_Extensions."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(ObjectsDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'object_id',
- metavar='<object-uuid>',
- help='Object UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/objects/{}".format(
- parsed_args.intraextension,
- parsed_args.object_id),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/rules.py b/moonclient/moonclient/rules.py
deleted file mode 100644
index 207533a8..00000000
--- a/moonclient/moonclient/rules.py
+++ /dev/null
@@ -1,242 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-from cliff.show import ShowOne
-
-
-class RulesList(Lister):
- """List all rules."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(RulesList, self).get_parser(prog_name)
- parser.add_argument(
- 'submetarule_id',
- metavar='<submetarule-uuid>',
- help='Sub Meta Rule UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def __get_subject_category_name(self, intraextension, category_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_categories".format(intraextension),
- authtoken=True)
- if category_id in data:
- return data[category_id]["name"]
-
- def __get_object_category_name(self, intraextension, category_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_categories".format(intraextension),
- authtoken=True)
- if category_id in data:
- return data[category_id]["name"]
-
- def __get_action_category_name(self, intraextension, category_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_categories".format(intraextension),
- authtoken=True)
- if category_id in data:
- return data[category_id]["name"]
-
- def __get_subject_scope_name(self, intraextension, category_id, scope_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_scopes/{}".format(intraextension, category_id),
- authtoken=True)
- if scope_id in data:
- return data[scope_id]["name"]
- return scope_id
-
- def __get_object_scope_name(self, intraextension, category_id, scope_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_scopes/{}".format(intraextension, category_id),
- authtoken=True)
- if scope_id in data:
- return data[scope_id]["name"]
- return scope_id
-
- def __get_action_scope_name(self, intraextension, category_id, scope_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_scopes/{}".format(intraextension, category_id),
- authtoken=True)
- if scope_id in data:
- return data[scope_id]["name"]
- return scope_id
-
- def __get_headers(self, intraextension, submetarule_id):
- headers = list()
- headers.append("")
- headers.append("id")
- self.sub_meta_rules = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/sub_meta_rules".format(intraextension),
- authtoken=True)
- for cat in self.sub_meta_rules[submetarule_id]["subject_categories"]:
- headers.append("s:" + self.__get_subject_category_name(intraextension, cat))
- for cat in self.sub_meta_rules[submetarule_id]["action_categories"]:
- headers.append("a:" + self.__get_action_category_name(intraextension, cat))
- for cat in self.sub_meta_rules[submetarule_id]["object_categories"]:
- headers.append("o:" + self.__get_object_category_name(intraextension, cat))
- headers.append("enabled")
- return headers
-
- def __get_data(self, intraextension, submetarule_id, data_dict):
- rules = list()
- cpt = 0
- for key in data_dict:
- sub_rule = list()
- sub_rule.append(cpt)
- cpt += 1
- sub_rule.append(key)
- rule_item = list(data_dict[key])
- for cat in self.sub_meta_rules[submetarule_id]["subject_categories"]:
- sub_rule.append(self.__get_subject_scope_name(intraextension, cat, rule_item.pop(0)))
- for cat in self.sub_meta_rules[submetarule_id]["action_categories"]:
- sub_rule.append(self.__get_action_scope_name(intraextension, cat, rule_item.pop(0)))
- for cat in self.sub_meta_rules[submetarule_id]["object_categories"]:
- sub_rule.append(self.__get_object_scope_name(intraextension, cat, rule_item.pop(0)))
- sub_rule.append(rule_item.pop(0))
- rules.append(sub_rule)
- return rules
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/rule/{}".format(
- parsed_args.intraextension,
- parsed_args.submetarule_id,
- ),
- authtoken=True)
- self.log.debug(data)
- headers = self.__get_headers(parsed_args.intraextension, parsed_args.submetarule_id)
- data_list = self.__get_data(parsed_args.intraextension, parsed_args.submetarule_id, data)
- return (
- headers,
- data_list
- )
-
-
-class RuleAdd(Command):
- """Add a new rule."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(RuleAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'submetarule_id',
- metavar='<submetarule-uuid>',
- help='Sub Meta Rule UUID',
- )
- parser.add_argument(
- 'rule',
- metavar='<argument-list>',
- help='Rule list (example: admin,start,servers) with that ordering: subject, action, object',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def __get_subject_scope_id(self, intraextension, category_id, scope_name):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_scopes/{}".format(intraextension, category_id),
- authtoken=True)
- self.log.debug("__get_subject_scope_id {}".format(data))
- for scope_id in data:
- if data[scope_id]["name"] == scope_name:
- return scope_id
- return scope_name
-
- def __get_object_scope_id(self, intraextension, category_id, scope_name):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/object_scopes/{}".format(intraextension, category_id),
- authtoken=True)
- self.log.debug("__get_action_scope_id {}".format(data))
- for scope_id in data:
- if data[scope_id]["name"] == scope_name:
- return scope_id
- return scope_name
-
- def __get_action_scope_id(self, intraextension, category_id, scope_name):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/action_scopes/{}".format(intraextension, category_id),
- authtoken=True)
- self.log.debug("__get_object_scope_id {}".format(data))
- for scope_id in data:
- if data[scope_id]["name"] == scope_name:
- return scope_id
- return scope_name
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.sub_meta_rules = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/sub_meta_rules".format(
- parsed_args.intraextension),
- authtoken=True)
- new_rule = map(lambda x: x.strip(), parsed_args.rule.split(","))
- post = {
- "subject_categories": [],
- "object_categories": [],
- "action_categories": [],
- "enabled": True
- }
- for cat in self.sub_meta_rules[parsed_args.submetarule_id]["subject_categories"]:
- self.log.debug("annalysing s {}".format(cat))
- post["subject_categories"].append(self.__get_subject_scope_id(
- parsed_args.intraextension, cat, new_rule.pop(0))
- )
- for cat in self.sub_meta_rules[parsed_args.submetarule_id]["action_categories"]:
- self.log.debug("annalysing a {}".format(cat))
- post["action_categories"].append(self.__get_action_scope_id(
- parsed_args.intraextension, cat, new_rule.pop(0))
- )
- for cat in self.sub_meta_rules[parsed_args.submetarule_id]["object_categories"]:
- self.log.debug("annalysing o {}".format(cat))
- post["object_categories"].append(self.__get_object_scope_id(
- parsed_args.intraextension, cat, new_rule.pop(0))
- )
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/rule/{}".format(
- parsed_args.intraextension, parsed_args.submetarule_id),
- post_data=post,
- authtoken=True)
-
-
-class RuleDelete(Command):
- """Delete a new rule."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(RuleDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'submetarule_id',
- metavar='<submetarule-uuid>',
- help='Sub Meta Rule UUID',
- )
- parser.add_argument(
- 'rule_id',
- metavar='<rule-uuid>',
- help='Rule UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(
- self.app.url_prefix+"/intra_extensions/{intra_extensions_id}/rule/{submetarule_id}/{rule_id}".format(
- intra_extensions_id=parsed_args.intraextension,
- submetarule_id=parsed_args.submetarule_id,
- rule_id=parsed_args.rule_id
- ),
- method="DELETE",
- authtoken=True
- )
diff --git a/moonclient/moonclient/shell.py b/moonclient/moonclient/shell.py
deleted file mode 100644
index 8be73621..00000000
--- a/moonclient/moonclient/shell.py
+++ /dev/null
@@ -1,264 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-import sys
-import json
-import httplib
-import os
-
-from cliff.app import App
-from cliff.commandmanager import CommandManager
-import moonclient
-
-
-def get_env_creds(admin_token=False):
- d = dict()
- if 'OS_SERVICE_ENDPOINT' in os.environ.keys() or 'OS_USERNAME' in os.environ.keys():
- if admin_token:
- d['endpoint'] = os.environ['OS_SERVICE_ENDPOINT']
- d['token'] = os.environ['OS_SERVICE_TOKEN']
- else:
- d['username'] = os.environ['OS_USERNAME']
- d['password'] = os.environ['OS_PASSWORD']
- d['auth_url'] = os.environ['OS_AUTH_URL']
- d['tenant_name'] = os.environ['OS_TENANT_NAME']
- return d
-
-
-class MoonClient(App):
-
- log = logging.getLogger(__name__)
- x_subject_token = None
- host = "localhost"
- port = "35358"
- tenant = None
- _intraextension = None
- _tenant_id = None
- _tenant_name = None
- secureprotocol = False
- user_saving_file = ".moonclient"
- url_prefix = "/moon"
- _nb_error = 0
- post = {
- "auth": {
- "identity": {
- "methods": [
- "password"
- ],
- "password": {
- "user": {
- "domain": {
- "id": "Default"
- },
- "name": "admin",
- "password": "nomoresecrete"
- }
- }
- },
- "scope": {
- "project": {
- "domain": {
- "id": "Default"
- },
- "name": "demo"
- }
- }
- }
- }
-
- def __init__(self):
- super(MoonClient, self).__init__(
- description='Moon Python Client',
- version=moonclient.__version__,
- command_manager=CommandManager('moon.client'),
- )
- creds = get_env_creds()
- self.post["auth"]["identity"]["password"]["user"]["password"] = creds["password"]
- self.post["auth"]["identity"]["password"]["user"]["name"] = creds["username"]
- self.post["auth"]["scope"]["project"]["name"] = creds["tenant_name"]
- 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]
- if "https" in creds["auth_url"]:
- self.secureprotocol = True
- else:
- self.secureprotocol = False
- 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
- )
- self.parser.add_argument(
- '--password',
- metavar='<password-str>',
- help='Force OpenStack password',
- default=None
- )
- self.parser.add_argument(
- '--authurl',
- metavar='<authurl-str>',
- help='Force OpenStack authentication URL',
- default=None
- )
-
- @property
- def tenant_id(self):
- if not self._tenant_id:
- self._tenant_id = self.get_url("/v3/projects?name={}".format(self._tenant_name),
- authtoken=True, port=5000)["projects"][0]["id"]
- return self._tenant_id
-
- @property
- def tenant_name(self):
- return self._tenant_name
-
- @property
- def intraextension(self):
- return open(os.path.join(os.getenv('HOME'), self.user_saving_file)).read().strip()
-
- @intraextension.setter
- def intraextension(self, value):
- self._intraextension = value
- open(os.path.join(os.getenv('HOME'), self.user_saving_file), "w").write(value)
-
- @property
- def nb_error(self):
- return self._nb_error
-
- def incr_error(self, msg=""):
- self._nb_error += 1
- if not msg:
- print("INCREMENTING ERRORS {}".format(self._nb_error))
- else:
- print("INCREMENTING ERRORS {} [{}]".format(self._nb_error, msg))
-
- def get_tenant_uuid(self, tenant_name):
- return self.get_url("/v3/projects?name={}".format(tenant_name), authtoken=True, port=5000)["projects"][0]["id"]
-
- def get_url(self, url, post_data=None, delete_data=None, method="GET", authtoken=None, port=None):
- if post_data:
- method = "POST"
- if delete_data:
- method = "DELETE"
- self.log.debug("\033[32m{} {}\033[m".format(method, url))
- # TODO: we must manage authentication and requests with secure protocol (ie. HTTPS)
- if not port:
- port = self.port
- conn = httplib.HTTPConnection(self.host, int(port))
- self.log.debug("Host: {}:{}".format(self.host, self.port))
- headers = {
- "Content-type": "application/x-www-form-urlencoded",
- "Accept": "text/plain,text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
- }
- if authtoken:
- if self.x_subject_token:
- headers["X-Auth-Token"] = self.x_subject_token
- if post_data:
- method = "POST"
- headers["Content-type"] = "application/json"
- post_data = json.dumps(post_data)
- conn.request(method, url, post_data, headers=headers)
- elif delete_data:
- method = "DELETE"
- conn.request(method, url, json.dumps(delete_data), headers=headers)
- else:
- conn.request(method, url, headers=headers)
- resp = conn.getresponse()
- headers = resp.getheaders()
- try:
- self.x_subject_token = dict(headers)["x-subject-token"]
- except KeyError:
- pass
- content = resp.read()
- conn.close()
- if len(content) == 0:
- return {}
- try:
- content = json.loads(content)
- if "error" in content:
- try:
- raise Exception("Getting an error while requiring {} ({}: {}, {})".format(
- url,
- content['error']['code'],
- content['error']['title'],
- content['error']['message'],
- ))
- except ValueError:
- raise Exception("Bad error format while requiring {} ({})".format(url, content))
- return content
- except ValueError:
- raise Exception("Getting an error while requiring {} ({})".format(url, content))
- finally:
- self.log.debug(str(content))
-
- def auth_keystone(self, username=None, password=None, host=None, port=None, tenant=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 tenant:
- self.post["auth"]["scope"]["project"]["name"] = tenant
- 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))
- 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.password:
- self.post["auth"]["identity"]["password"]["user"]["password"] = self.options.password
- self.log.debug("change password")
- 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))
- if self.options.authurl:
- self.host = self.options.authurl.replace("https://", "").replace("http://", "").split("/")[0].split(":")[0]
- self.port = self.options.authurl.replace("https://", "").replace("http://", "").split("/")[0].split(":")[1]
- if "https" in self.options.authurl:
- self.secureprotocol = True
- else:
- self.secureprotocol = False
- data = self.get_url("/v3/auth/tokens", post_data=self.post)
- if "token" not in data:
- raise Exception("Authentication problem ({})".format(data))
-
- def prepare_to_run_command(self, cmd):
- self.log.debug('prepare_to_run_command %s', cmd.__class__.__name__)
-
- def clean_up(self, cmd, result, err):
- self.log.debug('clean_up %s', cmd.__class__.__name__)
- if err:
- self.log.debug('got an error: %s', err)
- self.log.debug("result: {}".format(result))
-
-
-def main(argv=sys.argv[1:]):
- myapp = MoonClient()
- myapp.run(argv)
- return myapp.nb_error
-
-
-if __name__ == '__main__':
- sys.exit(main(sys.argv[1:]))
diff --git a/moonclient/moonclient/subject_assignments.py b/moonclient/moonclient/subject_assignments.py
deleted file mode 100644
index ec5e9549..00000000
--- a/moonclient/moonclient/subject_assignments.py
+++ /dev/null
@@ -1,149 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class SubjectAssignmentsList(Lister):
- """List all subject assignments."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectAssignmentsList, self).get_parser(prog_name)
- parser.add_argument(
- 'subject_id',
- metavar='<subject-uuid>',
- help='Subject UUID',
- )
- parser.add_argument(
- 'subject_category_id',
- metavar='<subject-category-uuid>',
- help='Subject category UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def __get_scope_from_id(self, intraextension_id, subject_category_id, subject_scope_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_scopes/{}".format(
- intraextension_id, subject_category_id),
- authtoken=True)
- if subject_scope_id in data:
- return data[subject_scope_id]
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_assignments/{}/{}".format(
- parsed_args.intraextension, parsed_args.subject_id, parsed_args.subject_category_id),
- authtoken=True)
- return (
- ("id", "name"),
- ((_id, self.__get_scope_from_id(parsed_args.intraextension,
- parsed_args.subject_category_id,
- _id)['name']) for _id in data)
- )
-
-
-class SubjectAssignmentsAdd(Command):
- """Add a new subject assignment."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectAssignmentsAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'subject_id',
- metavar='<subject-uuid>',
- help='Subject UUID',
- )
- parser.add_argument(
- 'subject_category_id',
- metavar='<subject-category-uuid>',
- help='Subject category id',
- )
- parser.add_argument(
- 'subject_scope_id',
- metavar='<subject-scope-uuid>',
- help='Subject scope UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def __get_scope_from_id(self, intraextension_id, subject_category_id, subject_scope_id):
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_scopes/{}".format(
- intraextension_id, subject_category_id),
- authtoken=True)
- if subject_scope_id in data:
- return data[subject_scope_id]
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_assignments".format(parsed_args.intraextension),
- post_data={
- "subject_id": parsed_args.subject_id,
- "subject_category_id": parsed_args.subject_category_id,
- "subject_scope_id": parsed_args.subject_scope_id},
- authtoken=True)
- return (
- ("id", "name"),
- ((_id, self.__get_scope_from_id(parsed_args.intraextension,
- parsed_args.subject_category_id,
- _id)['name']) for _id in data)
- )
-
-
-class SubjectAssignmentsDelete(Command):
- """Delete a subject assignment."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectAssignmentsDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'subject_id',
- metavar='<subject-uuid>',
- help='Subject UUID',
- )
- parser.add_argument(
- 'subject_category_id',
- metavar='<subject-category-uuid>',
- help='Subject category UUID',
- )
- parser.add_argument(
- 'subject_scope_id',
- metavar='<subject-scope-uuid>',
- help='Subject scope UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_assignments/{}/{}/{}".format(
- parsed_args.intraextension,
- parsed_args.subject_id,
- parsed_args.subject_category_id,
- parsed_args.subject_scope_id),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/subject_categories.py b/moonclient/moonclient/subject_categories.py
deleted file mode 100644
index 810b0b5f..00000000
--- a/moonclient/moonclient/subject_categories.py
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class SubjectCategoriesList(Lister):
- """List all subject categories."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectCategoriesList, self).get_parser(prog_name)
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_categories".format(parsed_args.intraextension),
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_uuid, data[_uuid]["name"], data[_uuid]["description"]) for _uuid in data)
- )
-
-
-class SubjectCategoriesAdd(Command):
- """Add a new subject category."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectCategoriesAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'subject_category_name',
- metavar='<subject_category-name>',
- help='Subject category name',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- parser.add_argument(
- '--description',
- metavar='<description-str>',
- help='Subject category description',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_categories".format(parsed_args.intraextension),
- post_data={
- "subject_category_name": parsed_args.subject_category_name,
- "subject_category_description": parsed_args.description},
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_uuid, data[_uuid]["name"], data[_uuid]["description"]) for _uuid in data)
- )
-
-
-class SubjectCategoriesDelete(Command):
- """Delete a subject category."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectCategoriesDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'subject_category_id',
- metavar='<subject_category-uuid>',
- help='Subject category UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_categories/{}".format(
- parsed_args.intraextension,
- parsed_args.subject_category_id),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/subject_scopes.py b/moonclient/moonclient/subject_scopes.py
deleted file mode 100644
index 90cc5dcc..00000000
--- a/moonclient/moonclient/subject_scopes.py
+++ /dev/null
@@ -1,123 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class SubjectScopesList(Lister):
- """List all subject scopes."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectScopesList, self).get_parser(prog_name)
- parser.add_argument(
- 'subject_category_id',
- metavar='<subject-category-uuid>',
- help='Subject category UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_scopes/{}".format(
- parsed_args.intraextension,
- parsed_args.subject_category_id),
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_id, data[_id]["name"], data[_id]["description"]) for _id in data)
- )
-
-
-class SubjectScopesAdd(Command):
- """Add a new subject scope."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectScopesAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'subject_category_id',
- metavar='<subject-category-uuid>',
- help='Subject category UUID',
- )
- parser.add_argument(
- 'subject_scope_name',
- metavar='<subject-scope-str>',
- help='Subject scope Name',
- )
- parser.add_argument(
- '--description',
- metavar='<description-str>',
- help='Description',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_scopes/{}".format(
- parsed_args.intraextension, parsed_args.subject_category_id),
- post_data={
- "subject_scope_name": parsed_args.subject_scope_name,
- "subject_scope_description": parsed_args.description,
- },
- authtoken=True)
- return (
- ("id", "name", "description"),
- ((_id, data[_id]["name"], data[_id]["description"]) for _id in data)
- )
-
-
-class SubjectScopesDelete(Command):
- """Delete a subject scope."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectScopesDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'subject_category_id',
- metavar='<subject-category-uuid>',
- help='Subject category UUID',
- )
- parser.add_argument(
- 'subject_scope_id',
- metavar='<subject-scope-uuid>',
- help='Subject scope UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subject_scopes/{}/{}".format(
- parsed_args.intraextension,
- parsed_args.subject_category_id,
- parsed_args.subject_scope_id
- ),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/subjects.py b/moonclient/moonclient/subjects.py
deleted file mode 100644
index 678caf5b..00000000
--- a/moonclient/moonclient/subjects.py
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-import getpass
-
-
-class SubjectsList(Lister):
- """List all subjects."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectsList, self).get_parser(prog_name)
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subjects".format(parsed_args.intraextension),
- authtoken=True)
- return (
- ("id", "name", "Keystone ID"),
- ((_uuid, data[_uuid]["name"], data[_uuid]["keystone_id"]) for _uuid in data)
- )
-
-
-class SubjectsAdd(Command):
- """add a new subject."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectsAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'subject_name',
- metavar='<subject-name>',
- help='Subject name',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- parser.add_argument(
- '--description',
- metavar='<description-str>',
- help='Subject description',
- )
- parser.add_argument(
- '--subject_pass',
- metavar='<password-str>',
- help='Password for subject (if not given, user will be prompted for one)',
- )
- parser.add_argument(
- '--email',
- metavar='<email-str>',
- help='Email for the user',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- if not parsed_args.subject_pass:
- parsed_args.password = getpass.getpass("Password for user {}:".format(parsed_args.subject_name))
- data = self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subjects".format(parsed_args.intraextension),
- post_data={
- "subject_name": parsed_args.subject_name,
- "subject_description": parsed_args.description,
- "subject_password": parsed_args.subject_pass,
- "subject_email": parsed_args.email
- },
- authtoken=True)
- return (
- ("id", "name", "Keystone ID"),
- ((_uuid, data[_uuid]["name"], data[_uuid]["keystone_id"]) for _uuid in data)
- )
-
-
-class SubjectsDelete(Command):
- """Delete a subject."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(SubjectsDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'subject_id',
- metavar='<subject-uuid>',
- help='Subject UUID',
- )
- parser.add_argument(
- '--intraextension',
- metavar='<intraextension-uuid>',
- help='IntraExtension UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- if not parsed_args.intraextension:
- parsed_args.intraextension = self.app.intraextension
- self.app.get_url(self.app.url_prefix+"/intra_extensions/{}/subjects/{}".format(
- parsed_args.intraextension,
- parsed_args.subject_id
- ),
- method="DELETE",
- authtoken=True
- ) \ No newline at end of file
diff --git a/moonclient/moonclient/tenants.py b/moonclient/moonclient/tenants.py
deleted file mode 100644
index 99c6e501..00000000
--- a/moonclient/moonclient/tenants.py
+++ /dev/null
@@ -1,200 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-
-from cliff.lister import Lister
-from cliff.command import Command
-
-
-class TenantList(Lister):
- """List all tenants."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(TenantList, self).get_parser(prog_name)
- return parser
-
- def take_action(self, parsed_args):
- tenants = self.app.get_url(self.app.url_prefix+"/tenants", authtoken=True)
- self.log.debug(tenants)
- return (
- ("id", "name", "description", "intra_authz_extension_id", "intra_admin_extension_id"),
- ((
- tenant_id,
- tenants[tenant_id]["name"],
- tenants[tenant_id]["description"],
- tenants[tenant_id]["intra_authz_extension_id"],
- tenants[tenant_id]["intra_admin_extension_id"],
- )
- for tenant_id in tenants)
- )
-
-
-class TenantAdd(Command):
- """Add a tenant."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(TenantAdd, self).get_parser(prog_name)
- parser.add_argument(
- 'tenant_name',
- metavar='<tenant-name>',
- help='Tenant name',
- )
- parser.add_argument(
- '--authz',
- metavar='<authz-intraextension-uuid>',
- help='Authz IntraExtension UUID',
- )
- parser.add_argument(
- '--admin',
- metavar='<admin-intraextension-uuid>',
- help='Admin IntraExtension UUID',
- )
- parser.add_argument(
- '--desc',
- metavar='<tenant-description-str>',
- help='Tenant description',
- )
- return parser
-
- def take_action(self, parsed_args):
- post_data = dict()
- post_data["tenant_name"] = parsed_args.tenant_name
- if parsed_args.authz:
- post_data["tenant_intra_authz_extension_id"] = parsed_args.authz
- if parsed_args.admin:
- post_data["tenant_intra_admin_extension_id"] = parsed_args.admin
- if parsed_args.desc:
- post_data["tenant_description"] = parsed_args.desc
- tenants = self.app.get_url(self.app.url_prefix+"/tenants",
- post_data=post_data,
- authtoken=True)
- return (
- ("id", "name", "description", "intra_authz_extension_id", "intra_admin_extension_id"),
- ((
- tenant_id,
- tenants[tenant_id]["name"],
- tenants[tenant_id]["description"],
- tenants[tenant_id]["intra_authz_extension_id"],
- tenants[tenant_id]["intra_admin_extension_id"],
- )
- for tenant_id in tenants)
- )
-
-
-class TenantShow(Command):
- """Show information of one tenant."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(TenantShow, self).get_parser(prog_name)
- parser.add_argument(
- 'tenant_name',
- metavar='<tenant-name>',
- help='Tenant name',
- )
- return parser
-
- def take_action(self, parsed_args):
- tenants = self.app.get_url(self.app.url_prefix+"/tenants/{}".format(parsed_args.tenant_name),
- authtoken=True)
- return (
- ("id", "name", "description", "intra_authz_extension_id", "intra_admin_extension_id"),
- ((
- tenant_id,
- tenants[tenant_id]["name"],
- tenants[tenant_id]["description"],
- tenants[tenant_id]["intra_authz_extension_id"],
- tenants[tenant_id]["intra_admin_extension_id"],
- )
- for tenant_id in tenants)
- )
-
-
-class TenantSet(Command):
- """Modify a tenant."""
-
- 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(
- 'tenant_id',
- metavar='<tenant-id>',
- help='Tenant UUID',
- )
- parser.add_argument(
- '--name',
- metavar='<tenant-name>',
- help='Tenant name',
- )
- parser.add_argument(
- '--authz',
- metavar='<authz-intraextension-uuid>',
- help='Authz IntraExtension UUID',
- )
- parser.add_argument(
- '--admin',
- metavar='<admin-intraextension-uuid>',
- help='Admin IntraExtension UUID',
- )
- parser.add_argument(
- '--desc',
- metavar='<tenant-description-str>',
- help='Tenant description',
- )
- return parser
-
- def take_action(self, parsed_args):
- post_data = dict()
- post_data["tenant_id"] = parsed_args.tenant_id
- if parsed_args.name:
- post_data["tenant_name"] = parsed_args.tenant_name
- if parsed_args.authz is not None:
- post_data["tenant_intra_authz_extension_id"] = parsed_args.authz
- if parsed_args.admin is not None:
- post_data["tenant_intra_admin_extension_id"] = parsed_args.admin
- if parsed_args.desc is not None:
- post_data["tenant_description"] = parsed_args.desc
- tenants = self.app.get_url(self.app.url_prefix+"/tenants/{}".format(post_data["tenant_id"]),
- post_data=post_data,
- authtoken=True)
- return (
- ("id", "name", "description", "authz", "admin"),
- ((
- tenant_id,
- tenants[tenant_id]["name"],
- tenants[tenant_id]["description"],
- tenants[tenant_id]["intra_authz_extension_id"],
- tenants[tenant_id]["intra_admin_extension_id"],
- )
- for tenant_id in tenants)
- )
-
-
-class TenantDelete(Command):
- """Delete a tenant."""
-
- log = logging.getLogger(__name__)
-
- def get_parser(self, prog_name):
- parser = super(TenantDelete, self).get_parser(prog_name)
- parser.add_argument(
- 'tenant_id',
- metavar='<tenant-id>',
- help='Tenant UUID',
- )
- return parser
-
- def take_action(self, parsed_args):
- self.app.get_url(self.app.url_prefix+"/tenants/{}".format(parsed_args.tenant_id),
- method="DELETE",
- authtoken=True)
diff --git a/moonclient/moonclient/tests.py b/moonclient/moonclient/tests.py
deleted file mode 100644
index b2c02f11..00000000
--- a/moonclient/moonclient/tests.py
+++ /dev/null
@@ -1,251 +0,0 @@
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-import logging
-import json
-import shlex
-import re
-from cliff.lister import Lister
-from cliff.command import Command
-from uuid import uuid4
-import os
-import time
-import subprocess
-import glob
-
-
-class TestsLaunch(Lister):
- """Tests launcher."""
-
- log = logging.getLogger(__name__)
- result_vars = dict()
- logfile_name = "/tmp/moonclient_test_{}.log".format(time.strftime("%Y%m%d-%H%M%S"))
- logfile = open(logfile_name, "w")
- TIME_FORMAT = '%Y-%m-%d %H:%M:%S'
-
- def get_parser(self, prog_name):
- parser = super(TestsLaunch, self).get_parser(prog_name)
- parser.add_argument(
- '--stop-on-error', action="store_true",
- help='Stop the test on the first error',
- )
- parser.add_argument(
- '--self', action="store_true",
- help='Execute all internal tests',
- )
- parser.add_argument(
- 'testfile',
- metavar='<filename(s)>',
- nargs='?',
- help='Filenames that contains tests to run '
- '(examples: /path/to/test.json, /path/to/directory/, '
- '"/path/to/*-file.json" -- don\'t forget the quote)',
- )
- parser.add_argument(
- '--logfile',
- metavar='<logfile-str>',
- help='Force Log filename.',
- default=None
- )
- 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):
- match = re.search(expected, observed)
- if match:
- self.result_vars.update(match.groupdict())
- return True
- return False
-
- def take_action(self, parsed_args):
- if parsed_args.logfile:
- self.logfile_name = parsed_args.logfile
- self.log.info("Write tests output to {}".format(self.logfile_name))
- if parsed_args.self:
- import sys
- import moonclient # noqa
- parsed_args.testfile = os.path.join(sys.modules['moonclient'].__path__[0], "tests")
- if parsed_args.testfile and os.path.isfile(parsed_args.testfile):
- return self.test_file(parsed_args.testfile)
- else:
- cpt = 1
- filenames = []
- global_result = {}
- if os.path.isdir(parsed_args.testfile):
- filenames = glob.glob(parsed_args.testfile + "/*.json")
- else:
- filenames = glob.glob(parsed_args.testfile)
- for filename in filenames:
- if os.path.isfile(filename):
- self.log.info("\n\033[1m\033[32mExecuting {} ({}/{})\033[m".format(filename, cpt, len(filenames)))
- global_result[filename] = self.test_file(filename)
- cpt += 1
- results = []
- for result_id, result_values in global_result.iteritems():
- result_ok = True
- # self.log.info(result_id)
- # self.log.info(result_values[1])
- log_filename = ""
- for value in result_values[1]:
- if "False" in value[2]:
- result_ok = False
- if "Overall results" in value[1]:
- log_filename = value[3]
- if result_ok:
- results.append((result_id, "\033[32mTrue\033[m", log_filename))
- else:
- results.append((result_id, "\033[1m\033[31mFalse\033[m", log_filename))
- return (
- ("filename", "results", "log file"),
- results
- )
-
- def test_file(self, testfile):
- if not self.logfile_name:
- self.logfile_name = "/tmp/moonclient_test_{}.log".format(time.strftime("%Y%m%d-%H%M%S"))
- self.logfile = open(self.logfile_name, "a")
- self.logfile.write(80*"=" + "\n")
- self.logfile.write(testfile + "\n\n")
- stdout_back = self.app.stdout
- tests_dict = json.load(open(testfile))
- self.log.debug("tests_dict = {}".format(tests_dict))
- global_command_options = ""
- if "command_options" in tests_dict:
- 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
- tenant = None
- host = None
- port = None
- description = ""
- if "auth_name" in test:
- username = test["auth_name"]
- os.environ["OS_USERNAME"] = test["auth_name"]
- if "auth_password" in test:
- password = test["auth_password"]
- os.environ["OS_PASSWORD"] = test["auth_password"]
- if "auth_tenant" in test:
- tenant = test["auth_tenant"]
- os.environ["OS_TENANT_NAME"] = test["auth_tenant"]
- 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, tenant)
- title = "Change auth to "
- if username:
- title += username
- if host:
- title += "@" + host
- if port:
- title += ":" + port
- title += "\n"
- self.logfile.write(time.strftime(self.TIME_FORMAT) + " " + title + "\n")
- self.log.info(title.strip())
- 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", "moon_{}.tmp".format(uuid4().hex))
- tmp_filename_fd = open(tmp_filename, "w")
- self.log.debug("test={}".format(test))
- if "command" not in test:
- if "external_command" in test:
- ext_command = test["external_command"]
- else:
- continue
- ext_command = self.__replace_var_in_str(ext_command)
- self.logfile.write(time.strftime(self.TIME_FORMAT) + " " + "-----> {}\n".format(ext_command))
- self.log.info(" \\-executing external \"{}\"".format(ext_command))
- pipe = subprocess.Popen(shlex.split(ext_command), 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(time.strftime(self.TIME_FORMAT) + " " +
- test["name"] + " " +
- "-----> {}\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))
- os.unlink(tmp_filename)
- data_tmp.append(group_name)
- data_tmp.append(test["name"])
- if "result" in test:
- 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"])))
- else:
- compare = not self.__compare_results(self.__replace_var_in_str(test["no_result"]), result_str)
- self.logfile.write("\\---->{}: not {}\n\n".format(compare, self.__replace_var_in_str(test["no_result"])))
- if error_str:
- if compare:
- compare = "\033[33mTrue\033[m"
- overall_result = overall_result and True
- else:
- compare = "\033[1m\033[31mFalse\033[m"
- self.app.incr_error(error_str)
- overall_result = overall_result and False
- else:
- 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"
- self.app.incr_error()
- 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"),
- data
- )
diff --git a/moonclient/moonclient/tests/functional_tests.sh b/moonclient/moonclient/tests/functional_tests.sh
deleted file mode 100644
index 505980cc..00000000
--- a/moonclient/moonclient/tests/functional_tests.sh
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/bin/sh
-
-# Copyright 2015 Open Platform for NFV Project, Inc. and its contributors
-# This software is distributed under the terms and conditions of the 'Apache-2.0'
-# license which can be found in the file 'LICENSE' in this package distribution
-# or at 'http://www.apache.org/licenses/LICENSE-2.0'.
-
-
-PROG=moon
-OS_TENANT_NAME=demo
-DEMO_USER=$(keystone user-list | awk '/ demo / {print $2}')
-
-# must be authenticated with Keystone
-# ie. : "cd ~/devstack; . openrc admin"
-
-function test_cmd {
- echo -e "\033[33m$PROG $1\033[m"
- $PROG $1 | tee /tmp/_
- if [ $? != 0 ]; then
- echo -e "\033[31mError for test \"$1\" \033[m"
- exit 1
- fi
-}
-
-test_cmd "intraextension list"
-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"
-
-test_cmd "subjects list"
-test_cmd "subjects add $DEMO_USER"
-test_cmd "subjects list"
-
-test_cmd "objects list"
-test_cmd "objects add my_obj"
-test_cmd "objects list"
-
-test_cmd "actions list"
-test_cmd "actions add my_action"
-test_cmd "actions list"
-
-# Category
-
-test_cmd "subject categories list"
-test_cmd "subject categories add my_cat"
-test_cmd "subject categories list"
-
-test_cmd "object categories list"
-test_cmd "object categories add my_cat"
-test_cmd "object categories list"
-
-test_cmd "action categories list"
-test_cmd "action categories add my_cat"
-test_cmd "action categories list"
-
-# Category scope
-
-test_cmd "subject category scope list"
-test_cmd "subject category scope add my_cat my_scope"
-test_cmd "subject category scope list"
-
-test_cmd "object category scope list"
-test_cmd "object category scope add my_cat my_scope"
-test_cmd "object category scope list"
-
-test_cmd "action category scope list"
-test_cmd "action category scope add my_cat my_scope"
-test_cmd "action category scope list"
-
-# Assignments
-
-test_cmd "subject assignments list"
-test_cmd "subject assignments add $DEMO_USER my_cat my_scope"
-test_cmd "subject assignments list"
-
-test_cmd "object assignments list"
-test_cmd "object assignments add my_obj my_cat my_scope"
-test_cmd "object assignments list"
-
-test_cmd "action assignments list"
-test_cmd "action assignments add my_action my_cat my_scope"
-test_cmd "action assignments list"
-
-# Sub meta rules
-
-test_cmd "aggregation algorithms list"
-test_cmd "aggregation algorithm show"
-test_cmd "aggregation algorithm set test_aggregation"
-test_cmd "aggregation algorithm show"
-test_cmd "submetarule show"
-test_cmd "submetarule set relation_super subject_security_level,my_cat computing_action,my_cat object_security_level,my_cat"
-test_cmd "submetarule show"
-test_cmd "submetarule relation list"
-
-# Rules
-
-test_cmd "rules list"
-test_cmd "rules add relation_super high,my_scope,vm_access,my_scope,high,my_scope"
-test_cmd "rules delete relation_super high,my_scope,vm_access,my_scope,high,my_scope"
-
-#Delete all
-test_cmd "subject assignments delete $DEMO_USER my_cat my_scope"
-test_cmd "subject assignments list"
-test_cmd "object assignments delete my_obj my_cat my_scope"
-test_cmd "object assignments list"
-test_cmd "action assignments delete my_action my_cat my_scope"
-test_cmd "action assignments list"
-
-test_cmd "subject category scope delete my_cat my_scope"
-test_cmd "subject category scope list"
-test_cmd "object category scope delete my_cat my_scope"
-test_cmd "object category scope list"
-test_cmd "action category scope delete my_cat my_scope"
-test_cmd "action category scope list"
-
-test_cmd "subjects delete $DEMO_USER"
-test_cmd "subjects list"
-test_cmd "objects delete my_obj"
-test_cmd "objects list"
-test_cmd "actions delete my_action"
-test_cmd "actions list"
-test_cmd "subject categories delete my_cat"
-test_cmd "subject categories list"
-test_cmd "object categories delete my_cat"
-test_cmd "object categories list"
-test_cmd "action categories delete my_cat"
-test_cmd "action categories list"
-
-
-test_cmd "intraextension delete $uuid" \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_action_assignments.json b/moonclient/moonclient/tests/tests_action_assignments.json
deleted file mode 100644
index f5cabbbb..00000000
--- a/moonclient/moonclient/tests/tests_action_assignments.json
+++ /dev/null
@@ -1,371 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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_action",
- "command": "action add boot",
- "result": "",
- "description": "Add the new action category boot",
- "command_options": ""
- },
- {
- "name": "list_action",
- "command": "action list",
- "result": "(?P<uuid_action>\\w+)\\s+boot",
- "description": "Check that boot action was added."
- },
- {
- "name": "add_action_category",
- "command": "action category add my_new_action_category",
- "result": "",
- "description": "Add the new action category my_new_action_category",
- "command_options": ""
- },
- {
- "name": "list_action_category",
- "command": "action category list",
- "result": "(?P<uuid_action_category>\\w+)\\s+my_new_action_category",
- "description": "Check that my_new_action_category action_category was added."
- },
- {
- "name": "add_scope",
- "command": "action scope add $uuid_action_category testers --description \"test engineers\"",
- "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>\\w+)\\s+testers\\s+test engineers",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "action assignment add $uuid_action $uuid_action_category $uuid_action_scope",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "action assignment list $uuid_action $uuid_action_category",
- "result": "$uuid_action_scope testers",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "delete_assignment",
- "command": "action assignment delete $uuid_action $uuid_action_category $uuid_action_scope",
- "result": "^$",
- "description": "Delete the added assignment",
- "command_options": ""
- },
- {
- "name": "check_deleted_assignment",
- "command": "action assignment list $uuid_action $uuid_action_category",
- "no_result": "$uuid_action_scope",
- "description": "Check deleted assignment.",
- "command_options": "-c id -f value"
- },
-
- {
- "name": "delete_scope",
- "command": "action scope delete $uuid_action_category $uuid_action_scope",
- "result": "^$",
- "description": "Delete one scope from action category role",
- "command_options": ""
- },
- {
- "name": "delete_action_category",
- "command": "action category delete $uuid_action_category",
- "result": "^$",
- "description": "Delete my_new_action_category action_category.",
- "command_options": ""
- },
- {
- "name": "list_action_category",
- "command": "action category list",
- "no_result": "$uuid_action_category",
- "description": "Check that my_new_action_category action_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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_action",
- "command": "action add boot",
- "result": "",
- "description": "Add the new action category boot",
- "command_options": ""
- },
- {
- "name": "list_action",
- "command": "action list",
- "result": "(?P<uuid_action>\\w+)\\s+boot",
- "description": "Check that boot action was added."
- },
- {
- "name": "add_action_category",
- "command": "action category add my_new_action_category",
- "result": "",
- "description": "Add the new action category my_new_action_category",
- "command_options": ""
- },
- {
- "name": "list_action_category",
- "command": "action category list",
- "result": "(?P<uuid_action_category>\\w+)\\s+my_new_action_category",
- "description": "Check that my_new_action_category action_category was added."
- },
- {
- "name": "add_scope",
- "command": "action scope add $uuid_action_category testers --description \"test engineers\"",
- "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>\\w+)\\s+testers\\s+test engineers",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "action assignment add $uuid_action $uuid_action_category $uuid_action_scope",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "action assignment list $uuid_action $uuid_action_category",
- "result": "$uuid_action_scope testers",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "delete_assignment",
- "command": "action assignment delete $uuid_action $uuid_action_category $uuid_action_scope",
- "result": "^$",
- "description": "Delete the added assignment",
- "command_options": ""
- },
- {
- "name": "check_deleted_assignment",
- "command": "action assignment list $uuid_action $uuid_action_category",
- "no_result": "$uuid_action_scope",
- "description": "Check deleted assignment.",
- "command_options": "-c id -f value"
- },
-
- {
- "name": "delete_scope",
- "command": "action scope delete $uuid_action_category $uuid_action_scope",
- "result": "^$",
- "description": "Delete one scope from action category role",
- "command_options": ""
- },
- {
- "name": "delete_action_category",
- "command": "action category delete $uuid_action_category",
- "result": "^$",
- "description": "Delete my_new_action_category action_category.",
- "command_options": ""
- },
- {
- "name": "list_action_category",
- "command": "action category list",
- "no_result": "$uuid_action_category",
- "description": "Check that my_new_action_category action_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_action_categories.json b/moonclient/moonclient/tests/tests_action_categories.json
deleted file mode 100644
index 1932ffc0..00000000
--- a/moonclient/moonclient/tests/tests_action_categories.json
+++ /dev/null
@@ -1,241 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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_action_category",
- "command": "action category add my_new_action_category",
- "result": "",
- "description": "Add the new action category my_new_action_category",
- "command_options": ""
- },
- {
- "name": "list_action_category",
- "command": "action category list",
- "result": "(?P<uuid_action_category>\\w+)\\s+my_new_action_category",
- "description": "Check that my_new_action_category action_category was added."
- },
- {
- "name": "delete_action_category",
- "command": "action category delete $uuid_action_category",
- "result": "^$",
- "description": "Delete my_new_action_category action_category.",
- "command_options": ""
- },
- {
- "name": "list_action_category",
- "command": "action category list",
- "no_result": "$uuid_action_category",
- "description": "Check that my_new_action_category action_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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_action_category",
- "command": "action category add my_new_action_category",
- "result": "",
- "description": "Add the new action category my_new_action_category",
- "command_options": ""
- },
- {
- "name": "list_action_category",
- "command": "action category list",
- "result": "(?P<uuid_action_category>\\w+)\\s+my_new_action_category",
- "description": "Check that my_new_action_category action_category was added."
- },
- {
- "name": "delete_action_category",
- "command": "action category delete $uuid_action_category",
- "result": "^$",
- "description": "Delete my_new_action_category action_category.",
- "command_options": ""
- },
- {
- "name": "list_action_category",
- "command": "action category list",
- "no_result": "$uuid_action_category",
- "description": "Check that my_new_action_category action_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_action_scopes.json b/moonclient/moonclient/tests/tests_action_scopes.json
deleted file mode 100644
index 069af73e..00000000
--- a/moonclient/moonclient/tests/tests_action_scopes.json
+++ /dev/null
@@ -1,259 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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": "get_one_action_category",
- "command": "action category list",
- "result": "(?P<uuid_action_category>\\w+)\\s+resource_action",
- "description": "Get one action_category for next tests.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_scope",
- "command": "action scope add $uuid_action_category testers --description \"test engineers\"",
- "result": "^$",
- "description": "Add one scope to action category resource_action",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "action scope list $uuid_action_category",
- "result": "(?P<uuid_action_scope>\\w+)\\s+testers\\s+test engineers",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
- {
- "name": "delete_scope",
- "command": "action scope delete $uuid_action_category $uuid_action_scope",
- "result": "^$",
- "description": "Delete one scope from action category resource_action",
- "command_options": ""
- },
- {
- "name": "check_deleted_scope",
- "command": "action scope list $uuid_action_category",
- "no_result": "$uuid_action_scope",
- "description": "Check deleted scope.",
- "command_options": "-c id -f value"
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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": "get_one_action_category",
- "command": "action category list",
- "result": "(?P<uuid_action_category>\\w+)\\s+resource_action",
- "description": "Get one action_category for next tests.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_scope",
- "command": "action scope add $uuid_action_category testers --description \"test engineers\"",
- "result": "^$",
- "description": "Add one scope to action category resource_action",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "action scope list $uuid_action_category",
- "result": "(?P<uuid_action_scope>\\w+)\\s+testers\\s+test engineers",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
- {
- "name": "delete_scope",
- "command": "action scope delete $uuid_action_category $uuid_action_scope",
- "result": "^$",
- "description": "Delete one scope from action category resource_action",
- "command_options": ""
- },
- {
- "name": "check_deleted_scope",
- "command": "action scope list $uuid_action_category",
- "no_result": "$uuid_action_scope",
- "description": "Check deleted scope.",
- "command_options": "-c id -f value"
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_actions.json b/moonclient/moonclient/tests/tests_actions.json
deleted file mode 100644
index 07de9cc0..00000000
--- a/moonclient/moonclient/tests/tests_actions.json
+++ /dev/null
@@ -1,241 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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_action",
- "command": "action add new_action_1",
- "result": "",
- "description": "Add a new action.",
- "command_options": ""
- },
- {
- "name": "list_action",
- "command": "action list",
- "result": "(?P<uuid_action>\\w+)\\s+new_action_1",
- "description": "Check that new_action_1 action was added."
- },
- {
- "name": "delete_action",
- "command": "action delete $uuid_action",
- "result": "^$",
- "description": "Delete new_action_1 action.",
- "command_options": ""
- },
- {
- "name": "list_action",
- "command": "action list",
- "no_result": "$uuid_action",
- "description": "Check that new_action_1 action was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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_action",
- "command": "action add new_action_1",
- "result": "",
- "description": "Add a new action.",
- "command_options": ""
- },
- {
- "name": "list_action",
- "command": "action list",
- "result": "(?P<uuid_action>\\w+)\\s+new_action_1",
- "description": "Check that new_action_1 action was added."
- },
- {
- "name": "delete_action",
- "command": "action delete $uuid_action",
- "result": "^$",
- "description": "Delete new_action_1 action.",
- "command_options": ""
- },
- {
- "name": "list_action",
- "command": "action list",
- "no_result": "$uuid_action",
- "description": "Check that new_action_1 action was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_admin_intraextensions.json b/moonclient/moonclient/tests/tests_admin_intraextensions.json
deleted file mode 100644
index 16a47348..00000000
--- a/moonclient/moonclient/tests/tests_admin_intraextensions.json
+++ /dev/null
@@ -1,128 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "main": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "List all tenants (must be empty)"
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_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 alt_demo",
- "command_options": ""
- },
- {
- "name": "check authz ie for tenant alt_demo",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz ie has been correctly added for tenant alt_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 alt_demo",
- "command_options": ""
- },
- {
- "name": "check admin ie for tenant alt_demo",
- "command": "tenant list",
- "result": "alt_demo $uuid_admin",
- "description": "Check that admin ie has been correctly added for tenant alt_demo ",
- "command_options": "-c name -c intra_admin_extension_id -f value"
- },
-
- {
- "name": "select admin ie",
- "command": "intraextension select $uuid_admin",
- "result": "Select $uuid_admin IntraExtension.",
- "description": "Select the admin intra extension to work with",
- "command_options": ""
- },
- {
- "name": "check_admin_user",
- "command": "subject list",
- "result": "admin",
- "description": "Check that admin user was added"
- },
- {
- "name": "check_submetarule",
- "command": "submetarule show",
- "result": "rbac",
- "description": "Check that submetarule was added"
- },
-
-
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_configuration.json b/moonclient/moonclient/tests/tests_configuration.json
deleted file mode 100644
index de16ec9d..00000000
--- a/moonclient/moonclient/tests/tests_configuration.json
+++ /dev/null
@@ -1,235 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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": "list template",
- "command": "template list",
- "result": "policy_root",
- "description": "Check that we have the root policy templates",
- "command_options": "-c id -f value"
- },
- {
- "name": "list aggregation_algorithm",
- "command": "aggregation algorithm list",
- "result": "all_true",
- "description": "Check that the aggregation algorithm all_true exists.",
- "command_options": "-c name -f value"
- },
- {
- "name": "list submetarule_algorithm",
- "command": "submetarule algorithm list",
- "result": "comparison",
- "description": "Check that the aggregation algorithm all_true exists.",
- "command_options": "-c name -f value"
- },
-
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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": "lst template",
- "command": "template list",
- "result": "policy_root",
- "description": "Check that we have the root policy templates",
- "command_options": "-c id -f value"
- },
- {
- "name": "list aggregation_algorithm",
- "command": "aggregation algorithm list",
- "result": "all_true",
- "description": "Check that the aggregation algorithm all_true exists.",
- "command_options": "-c name -f value"
- },
- {
- "name": "list submetarule_algorithm",
- "command": "submetarule algorithm list",
- "result": "comparison",
- "description": "Check that the aggregation algorithm all_true exists.",
- "command_options": "-c name -f value"
- },
-
- {
- "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 alt_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
deleted file mode 100644
index 3ae555c2..00000000
--- a/moonclient/moonclient/tests/tests_object_assignments.json
+++ /dev/null
@@ -1,385 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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_object",
- "command": "object add nova_server_1",
- "result": "",
- "description": "Add the new object category nova_server_1",
- "command_options": ""
- },
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object>\\w+)\\s+nova_server_1",
- "description": "Check that nova_server_1 object was added."
- },
- {
- "name": "add_object_category",
- "command": "object category add my_new_object_category",
- "result": "",
- "description": "Add the new object category my_new_object_category",
- "command_options": ""
- },
- {
- "name": "list_object_category",
- "command": "object category list",
- "result": "(?P<uuid_object_category>\\w+)\\s+my_new_object_category",
- "description": "Check that my_new_object_category object_category was added."
- },
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category scope1 --description \"scope1 description\"",
- "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>\\w+)\\s+scope1\\s+scope1 description",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object $uuid_object_category $uuid_object_scope",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object $uuid_object_category",
- "result": "$uuid_object_scope scope1",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "delete_assignment",
- "command": "object assignment delete $uuid_object $uuid_object_category $uuid_object_scope",
- "result": "^$",
- "description": "Delete the added assignment",
- "command_options": ""
- },
- {
- "name": "check_deleted_assignment",
- "command": "object assignment list $uuid_object $uuid_object_category",
- "no_result": "$uuid_object_scope",
- "description": "Check deleted assignment.",
- "command_options": "-c id -f value"
- },
-
- {
- "name": "delete_scope",
- "command": "object scope delete $uuid_object_category $uuid_object_scope",
- "result": "^$",
- "description": "Delete one scope from object category role",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category",
- "no_result": "$uuid_object_scope",
- "description": "Check added scope was deleted.",
- "command_options": "-c id -f value"
- },
- {
- "name": "delete_object_category",
- "command": "object category delete $uuid_object_category",
- "result": "^$",
- "description": "Delete my_new_object_category object_category.",
- "command_options": ""
- },
- {
- "name": "list_object_category",
- "command": "object category list",
- "no_result": "$uuid_object_category",
- "description": "Check that my_new_object_category object_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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_object",
- "command": "object add nova_server_1",
- "result": "",
- "description": "Add the new object category nova_server_1",
- "command_options": ""
- },
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object>\\w+)\\s+nova_server_1",
- "description": "Check that nova_server_1 object was added."
- },
- {
- "name": "add_object_category",
- "command": "object category add my_new_object_category",
- "result": "",
- "description": "Add the new object category my_new_object_category",
- "command_options": ""
- },
- {
- "name": "list_object_category",
- "command": "object category list",
- "result": "(?P<uuid_object_category>\\w+)\\s+my_new_object_category",
- "description": "Check that my_new_object_category object_category was added."
- },
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category scope1 --description \"scope1 description\"",
- "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>\\w+)\\s+scope1\\s+scope1 description",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object $uuid_object_category $uuid_object_scope",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object $uuid_object_category",
- "result": "$uuid_object_scope scope1",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "delete_assignment",
- "command": "object assignment delete $uuid_object $uuid_object_category $uuid_object_scope",
- "result": "^$",
- "description": "Delete the added assignment",
- "command_options": ""
- },
- {
- "name": "check_deleted_assignment",
- "command": "object assignment list $uuid_object $uuid_object_category",
- "no_result": "$uuid_object_scope",
- "description": "Check deleted assignment.",
- "command_options": "-c id -f value"
- },
-
- {
- "name": "delete_scope",
- "command": "object scope delete $uuid_object_category $uuid_object_scope",
- "result": "^$",
- "description": "Delete one scope from object category role",
- "command_options": ""
- },
- {
- "name": "check_deleted_scope",
- "command": "object scope list $uuid_object_category",
- "no_result": "$uuid_object_scope",
- "description": "Check added scope was deleted.",
- "command_options": "-c id -f value"
- },
- {
- "name": "delete_object_category",
- "command": "object category delete $uuid_object_category",
- "result": "^$",
- "description": "Delete my_new_object_category object_category.",
- "command_options": ""
- },
- {
- "name": "list_object_category",
- "command": "object category list",
- "no_result": "$uuid_object_category",
- "description": "Check that my_new_object_category object_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_object_categories.json b/moonclient/moonclient/tests/tests_object_categories.json
deleted file mode 100644
index ac067a89..00000000
--- a/moonclient/moonclient/tests/tests_object_categories.json
+++ /dev/null
@@ -1,241 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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_object_category",
- "command": "object category add my_new_object_category",
- "result": "",
- "description": "Add the new object category my_new_object_category",
- "command_options": ""
- },
- {
- "name": "list_object_category",
- "command": "object category list",
- "result": "(?P<uuid_object_category>\\w+)\\s+my_new_object_category",
- "description": "Check that my_new_object_category object_category was added."
- },
- {
- "name": "delete_object_category",
- "command": "object category delete $uuid_object_category",
- "result": "^$",
- "description": "Delete my_new_object_category object_category.",
- "command_options": ""
- },
- {
- "name": "list_object_category",
- "command": "object category list",
- "no_result": "$uuid_object_category",
- "description": "Check that my_new_object_category object_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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_object_category",
- "command": "object category add my_new_object_category",
- "result": "",
- "description": "Add the new object category my_new_object_category",
- "command_options": ""
- },
- {
- "name": "list_object_category",
- "command": "object category list",
- "result": "(?P<uuid_object_category>\\w+)\\s+my_new_object_category",
- "description": "Check that my_new_object_category object_category was added."
- },
- {
- "name": "delete_object_category",
- "command": "object category delete $uuid_object_category",
- "result": "^$",
- "description": "Delete my_new_object_category object_category.",
- "command_options": ""
- },
- {
- "name": "list_object_category",
- "command": "object category list",
- "no_result": "$uuid_object_category",
- "description": "Check that my_new_object_category object_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_object_scopes.json b/moonclient/moonclient/tests/tests_object_scopes.json
deleted file mode 100644
index 52ac12fd..00000000
--- a/moonclient/moonclient/tests/tests_object_scopes.json
+++ /dev/null
@@ -1,259 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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": "get_one_object_category",
- "command": "object category list",
- "result": "(?P<uuid_object_category>\\w+)\\s+object_id",
- "description": "Get one object_category for next tests.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category testers --description \"test engineers\"",
- "result": "^$",
- "description": "Add one scope to object category object_id",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category",
- "result": "(?P<uuid_object_scope>\\w+)\\s+testers\\s+test engineers",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
- {
- "name": "delete_scope",
- "command": "object scope delete $uuid_object_category $uuid_object_scope",
- "result": "^$",
- "description": "Delete one scope from object category object_id",
- "command_options": ""
- },
- {
- "name": "check_deleted_scope",
- "command": "object scope list $uuid_object_category",
- "no_result": "$uuid_object_scope",
- "description": "Check deleted scope.",
- "command_options": "-c id -f value"
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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": "get_one_object_category",
- "command": "object category list",
- "result": "(?P<uuid_object_category>\\w+)\\s+object_id",
- "description": "Get one object_category for next tests.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category testers --description \"test engineers\"",
- "result": "^$",
- "description": "Add one scope to object category object_id",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category",
- "result": "(?P<uuid_object_scope>\\w+)\\s+testers\\s+test engineers",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
- {
- "name": "delete_scope",
- "command": "object scope delete $uuid_object_category $uuid_object_scope",
- "result": "^$",
- "description": "Delete one scope from object category object_id",
- "command_options": ""
- },
- {
- "name": "check_deleted_scope",
- "command": "object scope list $uuid_object_category",
- "no_result": "$uuid_object_scope",
- "description": "Check deleted scope.",
- "command_options": "-c id -f value"
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_objects.json b/moonclient/moonclient/tests/tests_objects.json
deleted file mode 100644
index ef17dd60..00000000
--- a/moonclient/moonclient/tests/tests_objects.json
+++ /dev/null
@@ -1,241 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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_object",
- "command": "object add nova_server_1",
- "result": "",
- "description": "Add a new object.",
- "command_options": ""
- },
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object>\\w+)\\s+nova_server_1",
- "description": "Check that nova_server_1 object was added."
- },
- {
- "name": "delete_object",
- "command": "object delete $uuid_object",
- "result": "^$",
- "description": "Delete nova_server_1 object.",
- "command_options": ""
- },
- {
- "name": "list_object",
- "command": "object list",
- "no_result": "$uuid_object",
- "description": "Check that nova_server_1 object was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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_object",
- "command": "object add nova_server_1",
- "result": "",
- "description": "Add a new object.",
- "command_options": ""
- },
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object>\\w+)\\s+nova_server_1",
- "description": "Check that nova_server_1 object was added."
- },
- {
- "name": "delete_object",
- "command": "object delete $uuid_object",
- "result": "^$",
- "description": "Delete nova_server_1 object.",
- "command_options": ""
- },
- {
- "name": "list_object",
- "command": "object list",
- "no_result": "$uuid_object",
- "description": "Check that nova_server_1 object was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_root_intraextensions.json b/moonclient/moonclient/tests/tests_root_intraextensions.json
deleted file mode 100644
index e24151d1..00000000
--- a/moonclient/moonclient/tests/tests_root_intraextensions.json
+++ /dev/null
@@ -1,47 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "main": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list_intraextension",
- "command": "intraextension list",
- "result": "(?P<uuid_root>\\w+)\\s+policy_root",
- "description": "Check the existence of the root intra extension",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "select root ie",
- "command": "intraextension select $uuid_root",
- "result": "Select $uuid_root IntraExtension.",
- "description": "Select the root intra extension to work with",
- "command_options": ""
- },
- {
- "name": "check_admin_user",
- "command": "subject list",
- "result": "admin",
- "description": "Check that admin user was added"
- },
- {
- "name": "check_submetarule",
- "command": "submetarule show",
- "result": "(?P<uuid_submetarule>\\w+)\\s+rbac_rule",
- "description": "Check that submetarule was added"
- },
- {
- "name": "check_rule",
- "command": "rule list $uuid_submetarule",
- "result": "root_role",
- "description": "Check that rules were added"
- }
-
-
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_rules.json b/moonclient/moonclient/tests/tests_rules.json
deleted file mode 100644
index 1950a1e3..00000000
--- a/moonclient/moonclient/tests/tests_rules.json
+++ /dev/null
@@ -1,378 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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": "check_submetarules",
- "command": "submetarule show",
- "result": "(?P<submetarule_uuid>\\w+)\\s+subject_security_level",
- "description": "Get one submetarule ID",
- "command_options": "-c id -c \"subject categories\" -f value"
- },
- {
- "name": "list_subject_categories",
- "command": "subject category list",
- "result": "(?P<category_slevel_uuid>\\w+)\\s+subject_security_level",
- "description": "Get one subject category.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "list_action_categories",
- "command": "action category list",
- "result": "(?P<category_action_uuid>\\w+)\\s+resource_action",
- "description": "Get one action category.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "list_object_categories",
- "command": "object category list",
- "result": "(?P<category_object_uuid>\\w+)\\s+object_security_level",
- "description": "Get one object category.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_subject_scope",
- "command": "subject scope add $category_slevel_uuid very_high",
- "result": "^$",
- "description": "Add one new scope.",
- "command_options": ""
- },
- {
- "name": "check_added_subject_scope",
- "command": "subject scope list $category_slevel_uuid",
- "result": "(?P<scope_subject>\\s+very_high)",
- "description": "Get the ID of the new scope.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "get_one_action_scope",
- "command": "action scope list $category_action_uuid",
- "result": "(?P<scope_action>\\s+storage_admin)",
- "description": "Get the ID of one action scope.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "get_one_object_scope",
- "command": "object scope list $category_object_uuid",
- "result": "(?P<scope_object>\\s+high)",
- "description": "Get the ID of one object scope.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid \"very_high,storage_admin,high\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid",
- "result": "(?P<rule_id>\\w+)\\s+very_high\\s+storage_admin\\s+high",
- "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": "delete_added_rule",
- "command": "rule delete $submetarule_uuid $rule_id",
- "result": "^$",
- "description": "Delete the added rule.",
- "command_options": ""
- },
- {
- "name": "check_deleted_rule",
- "command": "rule list $submetarule_uuid",
- "no_result": "very_high",
- "description": "Check that the rule was correctly deleted.",
- "command_options": "-c s:subject_security_level -f value"
- },
-
- {
- "name": "delete_authz_intra_extension",
- "command": "intraextension delete $uuid_authz",
- "result": "",
- "description": "Delete the authz intra extension",
- "command_options": ""
- },
- {
- "name": "list_intraextension_authz",
- "command": "intraextension list",
- "no_result": "$uuid_authz",
- "description": "Check the existence of that authz intra extension"
- },
- {
- "name": "delete_tenant",
- "command": "tenant delete $uuid",
- "result": "",
- "description": "Delete the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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": "check_submetarules",
- "command": "submetarule show",
- "result": "(?P<submetarule_uuid>\\w+)\\s+subject_security_level",
- "description": "Get one submetarule ID",
- "command_options": "-c id -c \"subject categories\" -f value"
- },
- {
- "name": "list_subject_categories",
- "command": "subject category list",
- "result": "(?P<category_slevel_uuid>\\w+)\\s+subject_security_level",
- "description": "Get one subject category.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "list_action_categories",
- "command": "action category list",
- "result": "(?P<category_action_uuid>\\w+)\\s+resource_action",
- "description": "Get one action category.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "list_object_categories",
- "command": "object category list",
- "result": "(?P<category_object_uuid>\\w+)\\s+object_security_level",
- "description": "Get one object category.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_subject_scope",
- "command": "subject scope add $category_slevel_uuid very_high",
- "result": "^$",
- "description": "Add one new scope.",
- "command_options": ""
- },
- {
- "name": "check_added_subject_scope",
- "command": "subject scope list $category_slevel_uuid",
- "result": "(?P<scope_subject>\\s+very_high)",
- "description": "Get the ID of the new scope.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "get_one_action_scope",
- "command": "action scope list $category_action_uuid",
- "result": "(?P<scope_action>\\s+storage_admin)",
- "description": "Get the ID of one action scope.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "get_one_object_scope",
- "command": "object scope list $category_object_uuid",
- "result": "(?P<scope_object>\\s+high)",
- "description": "Get the ID of one object scope.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid \"very_high,storage_admin,high\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid",
- "result": "(?P<rule_id>\\w+)\\s+very_high\\s+storage_admin\\s+high",
- "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": "delete_added_rule",
- "command": "rule delete $submetarule_uuid $rule_id",
- "result": "^$",
- "description": "Delete the added rule.",
- "command_options": ""
- },
- {
- "name": "check_deleted_rule",
- "command": "rule list $submetarule_uuid",
- "no_result": "very_high",
- "description": "Check that the rule was correctly deleted.",
- "command_options": "-c s:subject_security_level -f value"
- },
-
- {
- "name": "delete_authz_intra_extension",
- "command": "intraextension delete $uuid_authz",
- "result": "",
- "description": "Delete the authz intra extension",
- "command_options": ""
- },
- {
- "name": "list_intraextension_authz",
- "command": "intraextension list",
- "no_result": "$uuid_authz",
- "description": "Check the existence of that authz intra extension"
- },
- {
- "name": "delete_tenant",
- "command": "tenant delete $uuid",
- "result": "",
- "description": "Delete the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_subject_assignments.json b/moonclient/moonclient/tests/tests_subject_assignments.json
deleted file mode 100644
index e4615500..00000000
--- a/moonclient/moonclient/tests/tests_subject_assignments.json
+++ /dev/null
@@ -1,371 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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 alt_demo --subject_pass nomoresecrete",
- "result": "",
- "description": "Add the new subject category alt_demo",
- "command_options": ""
- },
- {
- "name": "list_subject",
- "command": "subject list",
- "result": "(?P<uuid_subject>\\w+)\\s+alt_demo",
- "description": "Check that alt_demo subject was added."
- },
- {
- "name": "add_subject_category",
- "command": "subject category add my_new_subject_category",
- "result": "",
- "description": "Add the new subject category my_new_subject_category",
- "command_options": ""
- },
- {
- "name": "list_subject_category",
- "command": "subject category list",
- "result": "(?P<uuid_subject_category>\\w+)\\s+my_new_subject_category",
- "description": "Check that my_new_subject_category subject_category was added."
- },
- {
- "name": "add_scope",
- "command": "subject scope add $uuid_subject_category testers --description \"test engineers\"",
- "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>\\w+)\\s+testers\\s+test engineers",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "subject assignment add $uuid_subject $uuid_subject_category $uuid_subject_scope",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "subject assignment list $uuid_subject $uuid_subject_category",
- "result": "$uuid_subject_scope testers",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "delete_assignment",
- "command": "subject assignment delete $uuid_subject $uuid_subject_category $uuid_subject_scope",
- "result": "^$",
- "description": "Delete the added assignment",
- "command_options": ""
- },
- {
- "name": "check_deleted_assignment",
- "command": "subject assignment list $uuid_subject $uuid_subject_category",
- "no_result": "$uuid_subject_scope",
- "description": "Check deleted assignment.",
- "command_options": "-c id -f value"
- },
-
- {
- "name": "delete_scope",
- "command": "subject scope delete $uuid_subject_category $uuid_subject_scope",
- "result": "^$",
- "description": "Delete one scope from subject category role",
- "command_options": ""
- },
- {
- "name": "delete_subject_category",
- "command": "subject category delete $uuid_subject_category",
- "result": "^$",
- "description": "Delete my_new_subject_category subject_category.",
- "command_options": ""
- },
- {
- "name": "list_subject_category",
- "command": "subject category list",
- "no_result": "$uuid_subject_category",
- "description": "Check that my_new_subject_category subject_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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 alt_demo --subject_pass nomoresecrete",
- "result": "",
- "description": "Add the new subject category alt_demo",
- "command_options": ""
- },
- {
- "name": "list_subject",
- "command": "subject list",
- "result": "(?P<uuid_subject>\\w+)\\s+alt_demo",
- "description": "Check that alt_demo subject was added."
- },
- {
- "name": "add_subject_category",
- "command": "subject category add my_new_subject_category",
- "result": "",
- "description": "Add the new subject category my_new_subject_category",
- "command_options": ""
- },
- {
- "name": "list_subject_category",
- "command": "subject category list",
- "result": "(?P<uuid_subject_category>\\w+)\\s+my_new_subject_category",
- "description": "Check that my_new_subject_category subject_category was added."
- },
- {
- "name": "add_scope",
- "command": "subject scope add $uuid_subject_category testers --description \"test engineers\"",
- "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>\\w+)\\s+testers\\s+test engineers",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "subject assignment add $uuid_subject $uuid_subject_category $uuid_subject_scope",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "subject assignment list $uuid_subject $uuid_subject_category",
- "result": "$uuid_subject_scope testers",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "delete_assignment",
- "command": "subject assignment delete $uuid_subject $uuid_subject_category $uuid_subject_scope",
- "result": "^$",
- "description": "Delete the added assignment",
- "command_options": ""
- },
- {
- "name": "check_deleted_assignment",
- "command": "subject assignment list $uuid_subject $uuid_subject_category",
- "no_result": "$uuid_subject_scope",
- "description": "Check deleted assignment.",
- "command_options": "-c id -f value"
- },
-
- {
- "name": "delete_scope",
- "command": "subject scope delete $uuid_subject_category $uuid_subject_scope",
- "result": "^$",
- "description": "Delete one scope from subject category role",
- "command_options": ""
- },
- {
- "name": "delete_subject_category",
- "command": "subject category delete $uuid_subject_category",
- "result": "^$",
- "description": "Delete my_new_subject_category subject_category.",
- "command_options": ""
- },
- {
- "name": "list_subject_category",
- "command": "subject category list",
- "no_result": "$uuid_subject_category",
- "description": "Check that my_new_subject_category subject_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_subject_categories.json b/moonclient/moonclient/tests/tests_subject_categories.json
deleted file mode 100644
index cd2be2d1..00000000
--- a/moonclient/moonclient/tests/tests_subject_categories.json
+++ /dev/null
@@ -1,241 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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_category",
- "command": "subject category add my_new_subject_category",
- "result": "",
- "description": "Add the new subject category my_new_subject_category",
- "command_options": ""
- },
- {
- "name": "list_subject_category",
- "command": "subject category list",
- "result": "(?P<uuid_subject_category>\\w+)\\s+my_new_subject_category",
- "description": "Check that my_new_subject_category subject_category was added."
- },
- {
- "name": "delete_subject_category",
- "command": "subject category delete $uuid_subject_category",
- "result": "^$",
- "description": "Delete my_new_subject_category subject_category.",
- "command_options": ""
- },
- {
- "name": "list_subject_category",
- "command": "subject category list",
- "no_result": "$uuid_subject_category",
- "description": "Check that my_new_subject_category subject_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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_category",
- "command": "subject category add my_new_subject_category",
- "result": "",
- "description": "Add the new subject category my_new_subject_category",
- "command_options": ""
- },
- {
- "name": "list_subject_category",
- "command": "subject category list",
- "result": "(?P<uuid_subject_category>\\w+)\\s+my_new_subject_category",
- "description": "Check that my_new_subject_category subject_category was added."
- },
- {
- "name": "delete_subject_category",
- "command": "subject category delete $uuid_subject_category",
- "result": "^$",
- "description": "Delete my_new_subject_category subject_category.",
- "command_options": ""
- },
- {
- "name": "list_subject_category",
- "command": "subject category list",
- "no_result": "$uuid_subject_category",
- "description": "Check that my_new_subject_category subject_category was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_subject_scopes.json b/moonclient/moonclient/tests/tests_subject_scopes.json
deleted file mode 100644
index bbf31c11..00000000
--- a/moonclient/moonclient/tests/tests_subject_scopes.json
+++ /dev/null
@@ -1,259 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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": "get_one_subject_category",
- "command": "subject category list",
- "result": "(?P<uuid_subject_category>\\w+)\\s+role",
- "description": "Get one subject_category for next tests.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_scope",
- "command": "subject scope add $uuid_subject_category testers --description \"test engineers\"",
- "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>\\w+)\\s+testers\\s+test engineers",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
- {
- "name": "delete_scope",
- "command": "subject scope delete $uuid_subject_category $uuid_subject_scope",
- "result": "^$",
- "description": "Delete one scope from subject category role",
- "command_options": ""
- },
- {
- "name": "check_deleted_scope",
- "command": "subject scope list $uuid_subject_category",
- "no_result": "$uuid_subject_scope",
- "description": "Check deleted scope.",
- "command_options": "-c id -f value"
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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": "get_one_subject_category",
- "command": "subject category list",
- "result": "(?P<uuid_subject_category>\\w+)\\s+role",
- "description": "Get one subject_category for next tests.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_scope",
- "command": "subject scope add $uuid_subject_category testers --description \"test engineers\"",
- "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>\\w+)\\s+testers\\s+test engineers",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
- {
- "name": "delete_scope",
- "command": "subject scope delete $uuid_subject_category $uuid_subject_scope",
- "result": "^$",
- "description": "Delete one scope from subject category role",
- "command_options": ""
- },
- {
- "name": "check_deleted_scope",
- "command": "subject scope list $uuid_subject_category",
- "no_result": "$uuid_subject_scope",
- "description": "Check deleted scope.",
- "command_options": "-c id -f value"
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_subjects.json b/moonclient/moonclient/tests/tests_subjects.json
deleted file mode 100644
index 97a45da6..00000000
--- a/moonclient/moonclient/tests/tests_subjects.json
+++ /dev/null
@@ -1,241 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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 alt_demo --subject_pass password",
- "result": "",
- "description": "Add the alt_demo subject",
- "command_options": ""
- },
- {
- "name": "list_subject",
- "command": "subject list",
- "result": "(?P<uuid_subject>\\w+)\\s+alt_demo",
- "description": "Check that alt_demo subject was added."
- },
- {
- "name": "delete_subject",
- "command": "subject delete $uuid_subject",
- "result": "^$",
- "description": "Delete alt_demo subject.",
- "command_options": ""
- },
- {
- "name": "list_subject",
- "command": "subject list",
- "no_result": "$uuid_subject",
- "description": "Check that alt_demo subject was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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 alt_demo --subject_pass password",
- "result": "",
- "description": "Add the alt_demo subject",
- "command_options": ""
- },
- {
- "name": "list_subject",
- "command": "subject list",
- "result": "(?P<uuid_subject>\\w+)\\s+alt_demo",
- "description": "Check that alt_demo subject was added."
- },
- {
- "name": "delete_subject",
- "command": "subject delete $uuid_subject",
- "result": "^$",
- "description": "Delete alt_demo subject.",
- "command_options": ""
- },
- {
- "name": "list_subject",
- "command": "subject list",
- "no_result": "$uuid_subject",
- "description": "Check that alt_demo subject was deleted."
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_submetarules.json b/moonclient/moonclient/tests/tests_submetarules.json
deleted file mode 100644
index cde01c27..00000000
--- a/moonclient/moonclient/tests/tests_submetarules.json
+++ /dev/null
@@ -1,294 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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 alt_demo",
- "command_options": ""
- },
- {
- "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": "check_submetarules",
- "command": "submetarule show",
- "result": "(?P<submetarule_uuid>\\w+)\\s+subject_security_level",
- "description": "Get one submetarule ID",
- "command_options": "-c id -c \"subject categories\" -f value"
- },
- {
- "name": "list_subject_categories",
- "command": "subject category list",
- "result": "(?P<category_domain_uuid>\\w+)\\s+domain",
- "description": "Get one subject category.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "list_subject_categories",
- "command": "subject category list",
- "result": "(?P<category_level_uuid>\\w+)\\s+subject_security_level",
- "description": "Get one subject category.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "set_submetarule",
- "command": "submetarule set $submetarule_uuid --subject_category_id=\"$category_level_uuid,$category_domain_uuid\"",
- "result": "^$",
- "description": "Set a new submetarule",
- "command_options": ""
- },
- {
- "name": "check_submetarule",
- "command": "submetarule show",
- "result": "$submetarule_uuid \\s*subject_security_level,\\s+domain",
- "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": "delete_authz_intra_extension",
- "command": "intraextension delete $uuid_authz",
- "result": "",
- "description": "Delete the authz intra extension",
- "command_options": ""
- },
- {
- "name": "list_intraextension_authz",
- "command": "intraextension list",
- "no_result": "$uuid_authz",
- "description": "Check the existence of that authz intra extension"
- },
- {
- "name": "delete_tenant",
- "command": "tenant delete $uuid",
- "result": "",
- "description": "Delete the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- }
- ],
- "authz_and_admin": [
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_demo has been correctly added"
- },
- {
- "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": "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": "set_tenant_authz",
- "command": "tenant set --authz $uuid_authz $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant demo",
- "command_options": ""
- },
- {
- "name": "set_tenant_admin",
- "command": "tenant set --admin $uuid_admin $uuid",
- "result": "",
- "description": "Connect the authz intra extension to the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo and authz ie",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz intra extension has been correctly added to the tenant.",
- "command_options": "-c name -c intra_authz_extension_id -f value"
- },
- {
- "name": "check tenant alt_demo and admin ie",
- "command": "tenant list",
- "result": "$uuid_admin",
- "description": "Check that admin intra extension has been correctly added to the tenant.",
- "command_options": "-c intra_admin_extension_id -f value"
- },
- {
- "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": "check_submetarules",
- "command": "submetarule show",
- "result": "(?P<submetarule_uuid>\\w+)\\s+subject_security_level",
- "description": "Get one submetarule ID",
- "command_options": "-c id -c \"subject categories\" -f value"
- },
- {
- "name": "list_subject_categories",
- "command": "subject category list",
- "result": "(?P<category_domain_uuid>\\w+)\\s+domain",
- "description": "Get one subject category.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "list_subject_categories",
- "command": "subject category list",
- "result": "(?P<category_level_uuid>\\w+)\\s+subject_security_level",
- "description": "Get one subject category.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "set_submetarule",
- "command": "submetarule set $submetarule_uuid --subject_category_id=\"$category_level_uuid,$category_domain_uuid\"",
- "result": "^$",
- "description": "Set a new submetarule",
- "command_options": ""
- },
- {
- "name": "check_submetarule",
- "command": "submetarule show",
- "result": "$submetarule_uuid \\s*subject_security_level,\\s+domain",
- "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": "delete_authz_intra_extension",
- "command": "intraextension delete $uuid_authz",
- "result": "",
- "description": "Delete the authz intra extension",
- "command_options": ""
- },
- {
- "name": "list_intraextension_authz",
- "command": "intraextension list",
- "no_result": "$uuid_authz",
- "description": "Check the existence of that authz intra extension"
- },
- {
- "name": "delete_tenant",
- "command": "tenant delete $uuid",
- "result": "",
- "description": "Delete the tenant alt_demo",
- "command_options": ""
- },
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "Check if tenant alt_demo is used."
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/tests_tenants.json b/moonclient/moonclient/tests/tests_tenants.json
deleted file mode 100644
index 719cdbfc..00000000
--- a/moonclient/moonclient/tests/tests_tenants.json
+++ /dev/null
@@ -1,106 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "main": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_result": "alt_demo",
- "description": "List all tenants (must be empty)"
- },
- {
- "name": "add tenant alt_demo",
- "command": "tenant add alt_demo",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant alt_demo",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+alt_demo",
- "description": "Check that tenant alt_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 alt_demo",
- "command_options": ""
- },
- {
- "name": "check authz ie for tenant alt_demo",
- "command": "tenant list",
- "result": "alt_demo $uuid_authz",
- "description": "Check that authz ie has been correctly added for tenant alt_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 alt_demo",
- "command_options": ""
- },
- {
- "name": "check admin ie for tenant alt_demo",
- "command": "tenant list",
- "result": "alt_demo $uuid_admin",
- "description": "Check that admin ie has been correctly added for tenant alt_demo ",
- "command_options": "-c name -c intra_admin_extension_id -f value"
- },
- {
- "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 alt_demo",
- "command_options": ""
- }
- ]
- }
-} \ No newline at end of file
diff --git a/moonclient/moonclient/tests/todo/tests_empty_policy_new_user.json b/moonclient/moonclient/tests/todo/tests_empty_policy_new_user.json
deleted file mode 100644
index ad9d7e52..00000000
--- a/moonclient/moonclient/tests/todo/tests_empty_policy_new_user.json
+++ /dev/null
@@ -1,3627 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "auth_password": "console",
- "auth_tenant": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "get cirros image",
- "external_command": "wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -o /tmp/cirros.img",
- "result": "",
- "description": "Download a Cirros image"
- },
- {
- "name": "install cirros image",
- "external_command": "glance image-create --name \"cirros\" --disk-format qcow2 --file /tmp/cirros.img --container-format bare",
- "result": "",
- "description": "Upload the Cirros image in glance"
- },
- {
- "name": "create secgroup",
- "external_command": "nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0",
- "result": "",
- "description": "Create a new secgroup in Nova"
- },
- {
- "name": "create secgroup",
- "external_command": "nova secgroup-add-rule default tcp 22 22 0.0.0.0/0",
- "result": "",
- "description": "Create a new secgroup in Nova"
- },
- {
- "name": "create router",
- "external_command": "neutron router-create demo-router",
- "result": "",
- "description": "Create a new router"
- },
- {
- "name": "set router",
- "external_command": "neutron router-gateway-set demo-router ext-net",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "set router",
- "external_command": "neutron net-create demo-net",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "set router",
- "external_command": "neutron subnet-create demo-net 192.168.1.0/24 --name demo-subnet --gateway 192.168.1.1",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "set router",
- "external_command": "neutron router-interface-add demo-router demo-subnet",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "openstack image list",
- "external_command": "nova image-list",
- "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros",
- "description": "Get an Image ID"
- },
- {
- "name": "create tenant test",
- "external_command": "openstack project create test_moonclient",
- "result": "",
- "description": "Create a new tenant"
- },
- {
- "name": "create user demo",
- "external_command": "openstack user create --password console demo",
- "result": "",
- "description": "Create user demo"
- },
- {
- "name": "add role admin to demo",
- "external_command": "openstack role add --project admin --user demo admin",
- "result": "",
- "description": "Force the admin role for the user demo on the project admin (for testing purpose)."
- },
- {
- "name": "neutron net-list",
- "external_command": "neutron net-list",
- "result": "(?P<uuid_net>[\\w-]+)\\s+\\| demo-net",
- "description": "Get an Net ID"
- },
- {
- "name": "nova boot new server",
- "external_command": "nova boot --flavor m1.tiny --image $uuid_image --nic net-id=$uuid_net --security-group default test_moonclient",
- "result": "",
- "description": "Get an Image ID"
- },
- {
- "name": "sleep",
- "external_command": "sleep 10",
- "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",
- "no_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": "add role admin to demo",
- "external_command": "openstack role add --project demo --user demo admin ",
- "result": "",
- "description": "Add role admin to user demo (an error may occurred)"
- },
- {
- "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 --subject_pass console",
- "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 --subject_pass console",
- "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_authz>\\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_authz>\\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_authz>\\w+)\\s+resource_action",
- "description": "Check that resource_action action_category was added."
- },
-
- {
- "name": "add_scope",
- "command": "subject scope add $uuid_subject_category_authz 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_authz",
- "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_authz 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_authz",
- "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_authz 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_authz",
- "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_authz 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_authz",
- "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_authz 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_authz",
- "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_authz 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_authz",
- "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_authz 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_authz",
- "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_authz 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_authz",
- "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_authz 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_authz",
- "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_authz 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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz $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_authz",
- "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_authz>\\w+)",
- "description": "Get one submetarule ID",
- "command_options": "-c id -f value"
- },
- {
- "name": "set_submetarule",
- "command": "submetarule set $submetarule_uuid_authz --subject_category_id=\"$uuid_subject_category_authz\" --object_category_id=\"$uuid_object_category_authz\" --action_category_id=\"$uuid_action_category_authz\"",
- "result": "^$",
- "description": "Set a new submetarule",
- "command_options": ""
- },
- {
- "name": "check_submetarule",
- "command": "submetarule show",
- "result": "$submetarule_uuid_authz \\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_authz \\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_authz \\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_authz \"high,vm_admin,medium\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz \"high,vm_admin,low\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz \"medium,vm_admin,low\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz \"high,vm_access,medium\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz \"high,vm_access,low\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz \"medium,vm_access,low\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz \"high,storage_admin,medium\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz \"high,storage_admin,low\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz \"medium,storage_admin,low\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz \"high,storage_access,medium\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz \"high,storage_access,low\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz \"medium,storage_access,low\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_authz",
- "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_authz",
- "result": "",
- "description": "Set submetarule algorithm to inclusion.",
- "command_options": ""
- },
-
- {
- "name": "create_intraextension_admin",
- "command": "intraextension add --policy_model policy_empty_admin empty_admin_test",
- "result": "IntraExtension created: (?P<uuid_admin>\\w+)",
- "description": "Create an admin intra extension",
- "command_options": ""
- },
- {
- "name": "list_intraextension_authz",
- "command": "intraextension list",
- "result": "$uuid_admin",
- "description": "Check the existence of that admin intra extension"
- },
- {
- "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": "list tenant",
- "command": "tenant list",
- "result": "demo",
- "description": "Check if tenant demo is used."
- },
- {
- "name": "select_admin_ie",
- "command": "intraextension select $uuid_admin",
- "result": "Select $uuid_admin IntraExtension.",
- "description": "Select the admin IntraExtension",
- "command_options": ""
- },
- {
- "name": "check_select_admin_ie",
- "command": "intraextension show selected",
- "result": "$uuid_admin",
- "description": "Check the selected admin IntraExtension",
- "command_options": "-c id -f value"
- },
-
- {
- "name": "add_subject",
- "command": "subject add admin --subject_pass console",
- "result": "",
- "description": "Add admin subject.",
- "command_options": ""
- },
- {
- "name": "list_subject",
- "command": "subject list",
- "result": "(?P<uuid_subject_admin>\\w+)\\s+admin",
- "description": "Check that admin subject was already there."
- },
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_subjects>\\w+)\\s+authz.subjects",
- "description": "Check that authz_subjects subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_objects>\\w+)\\s+authz.objects",
- "description": "Check that authz_objects subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_actions>\\w+)\\s+authz.actions",
- "description": "Check that authz_actions subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_subject_categories>\\w+)\\s+authz.subject_categories",
- "description": "Check that authz_subject_categories subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_object_categories>\\w+)\\s+authz.object_categories",
- "description": "Check that authz_object_categories subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_action_categories>\\w+)\\s+authz.action_categories",
- "description": "Check that authz_action_categories subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_subject_scopes>\\w+)\\s+authz.subject_scopes",
- "description": "Check that authz_subject_scopes subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_object_scopes>\\w+)\\s+authz.object_scopes",
- "description": "Check that authz_object_scopes subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_action_scopes>\\w+)\\s+authz.action_scopes",
- "description": "Check that authz_action_scopes subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_subject_assignments>\\w+)\\s+authz.subject_assignments",
- "description": "Check that authz_subject_assignments subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_object_assignments>\\w+)\\s+authz.object_assignments",
- "description": "Check that authz_object_assignments subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_action_assignments>\\w+)\\s+authz.action_assignments",
- "description": "Check that authz_action_assignments subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_aggregation_algorithm>\\w+)\\s+authz.aggregation_algorithm",
- "description": "Check that authz_aggregation_algorithm subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_sub_meta_rules>\\w+)\\s+authz.sub_meta_rules",
- "description": "Check that authz_sub_meta_rules subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_authz_rules>\\w+)\\s+authz.rules",
- "description": "Check that authz_rules subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_subjects>\\w+)\\s+admin.subjects",
- "description": "Check that admin_subjects subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_objects>\\w+)\\s+admin.objects",
- "description": "Check that admin_objects subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_actions>\\w+)\\s+admin.actions",
- "description": "Check that admin_actions subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_subject_categories>\\w+)\\s+admin.subject_categories",
- "description": "Check that admin_subject_categories subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_object_categories>\\w+)\\s+admin.object_categories",
- "description": "Check that admin_object_categories subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_action_categories>\\w+)\\s+admin.action_categories",
- "description": "Check that admin_action_categories subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_subject_scopes>\\w+)\\s+admin.subject_scopes",
- "description": "Check that admin_subject_scopes subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_object_scopes>\\w+)\\s+admin.object_scopes",
- "description": "Check that admin_object_scopes subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_action_scopes>\\w+)\\s+admin.action_scopes",
- "description": "Check that admin_action_scopes subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_subject_assignments>\\w+)\\s+admin.subject_assignments",
- "description": "Check that admin_subject_assignments subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_object_assignments>\\w+)\\s+admin.object_assignments",
- "description": "Check that admin_object_assignments subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_action_assignments>\\w+)\\s+admin.action_assignments",
- "description": "Check that admin_action_assignments subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_aggregation_algorithm>\\w+)\\s+admin.aggregation_algorithm",
- "description": "Check that admin_aggregation_algorithm subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_sub_meta_rules>\\w+)\\s+admin.sub_meta_rules",
- "description": "Check that admin_sub_meta_rules subject was already there."
- },
-
- {
- "name": "list_object",
- "command": "object list",
- "result": "(?P<uuid_object_admin_rules>\\w+)\\s+admin.rules",
- "description": "Check that admin_rules subject was already there."
- },
-
- {
- "name": "list_action",
- "command": "action list",
- "result": "(?P<uuid_action_read>\\w+)\\s+read",
- "description": "Check that read action was already there."
- },
-
- {
- "name": "list_action",
- "command": "action list",
- "result": "(?P<uuid_action_write>\\w+)\\s+write",
- "description": "Check that write action was already there."
- },
-
- {
- "name": "add_subject_category",
- "command": "subject category add role",
- "result": "",
- "description": "Add the new subject category role",
- "command_options": ""
- },
- {
- "name": "list_subject_category",
- "command": "subject category list",
- "result": "(?P<uuid_subject_category_admin>\\w+)\\s+role",
- "description": "Check that role subject_category was added."
- },
- {
- "name": "add_object_category",
- "command": "object category add object_id",
- "result": "",
- "description": "Add the new object category object_id",
- "command_options": ""
- },
- {
- "name": "list_object_category",
- "command": "object category list",
- "result": "(?P<uuid_object_category_admin>\\w+)\\s+object_id",
- "description": "Check that object_id object_category was added."
- },
- {
- "name": "add_action_category",
- "command": "action category add action_id",
- "result": "",
- "description": "Add the new action category action_id",
- "command_options": ""
- },
- {
- "name": "list_subject_category",
- "command": "action category list",
- "result": "(?P<uuid_action_category_admin>\\w+)\\s+action_id",
- "description": "Check that action_id action_category was added."
- },
-
- {
- "name": "add_scope",
- "command": "subject scope add $uuid_subject_category_admin root_role --description \"root role\"",
- "result": "^$",
- "description": "Add one scope to subject category role",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "subject scope list $uuid_subject_category_admin",
- "result": "(?P<uuid_subject_scope_root_role>\\w+)\\s+root_role\\s+root role",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
- {
- "name": "add_scope",
- "command": "subject scope add $uuid_subject_category_admin dev_role --description \"dev role\"",
- "result": "^$",
- "description": "Add one scope to subject category role",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "subject scope list $uuid_subject_category_admin",
- "result": "(?P<uuid_subject_scope_dev_role>\\w+)\\s+dev_role\\s+dev role",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_subjects --description \"authz subjects\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_subjects>\\w+)\\s+authz.subjects\\s+authz subjects",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_objects --description \"authz objects\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_objects>\\w+)\\s+authz.objects\\s+authz objects",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_actions --description \"authz actions\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_actions>\\w+)\\s+authz.actions\\s+authz actions",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_subject_categories --description \"authz subject categories\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_subject_categories>\\w+)\\s+authz.subject_categories\\s+authz subject categories",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_object_categories --description \"authz object categories\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_object_categories>\\w+)\\s+authz.object_categories\\s+authz object categories",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_action_categories --description \"authz action categories\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_action_categories>\\w+)\\s+authz.action_categories\\s+authz action categories",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_subject_scopes --description \"authz subject scopes\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_subject_scopes>\\w+)\\s+authz.subject_scopes\\s+authz subject scopes",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_object_scopes --description \"authz object scopes\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_object_scopes>\\w+)\\s+authz.object_scopes\\s+authz object scopes",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_action_scopes --description \"authz action scopes\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_action_scopes>\\w+)\\s+authz.action_scopes\\s+authz action scopes",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_subject_assignments --description \"authz subject assignments\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_subject_assignments>\\w+)\\s+authz.subject_assignments\\s+authz subject assignments",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_object_assignments --description \"authz object assignments\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_object_assignments>\\w+)\\s+authz.object_assignments\\s+authz object assignments",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_action_assignments --description \"authz action assignments\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_action_assignments>\\w+)\\s+authz.action_assignments\\s+authz action assignments",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_aggregation_algorithm --description \"authz aggregation algorithm\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_aggregation_algorithm>\\w+)\\s+authz.aggregation_algorithm\\s+authz aggregation algorithm",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_sub_meta_rules --description \"authz sub meta rules\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_sub_meta_rules>\\w+)\\s+authz.sub_meta_rules\\s+authz sub meta rules",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin authz_rules --description \"authz rules\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_authz_rules>\\w+)\\s+authz.rules\\s+authz rules",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_subjects --description \"admin subjects\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_subjects>\\w+)\\s+admin.subjects\\s+admin subjects",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_objects --description \"admin objects\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_objects>\\w+)\\s+admin.objects\\s+admin objects",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_actions --description \"admin actions\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_actions>\\w+)\\s+admin.actions\\s+admin actions",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_subject_categories --description \"admin subject categories\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_subject_categories>\\w+)\\s+admin.subject_categories\\s+admin subject categories",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_object_categories --description \"admin object categories\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_object_categories>\\w+)\\s+admin.object_categories\\s+admin object categories",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_action_categories --description \"admin action categories\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_action_categories>\\w+)\\s+admin.action_categories\\s+admin action categories",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_subject_scopes --description \"admin subject scopes\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_subject_scopes>\\w+)\\s+admin.subject_scopes\\s+admin subject scopes",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_object_scopes --description \"admin object scopes\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_object_scopes>\\w+)\\s+admin.object_scopes\\s+admin object scopes",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_action_scopes --description \"admin action scopes\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_action_scopes>\\w+)\\s+admin.action_scopes\\s+admin action scopes",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_subject_assignments --description \"admin subject assignments\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_subject_assignments>\\w+)\\s+admin.subject_assignments\\s+admin subject assignments",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_object_assignments --description \"admin object assignments\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_object_assignments>\\w+)\\s+admin.object_assignments\\s+admin object assignments",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_action_assignments --description \"admin action assignments\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_action_assignments>\\w+)\\s+admin.action_assignments\\s+admin action assignments",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_aggregation_algorithm --description \"admin aggregation algorithm\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_aggregation_algorithm>\\w+)\\s+admin.aggregation_algorithm\\s+admin aggregation algorithm",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_sub_meta_rules --description \"admin sub meta rules\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_sub_meta_rules>\\w+)\\s+admin.sub_meta_rules\\s+admin sub meta rules",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
-
- {
- "name": "add_scope",
- "command": "object scope add $uuid_object_category_admin admin_rules --description \"admin rules\"",
- "result": "^$",
- "description": "Add one scope to object category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "object scope list $uuid_object_category_admin",
- "result": "(?P<uuid_object_scope_admin_rules>\\w+)\\s+admin.rules\\s+admin rules",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
- {
- "name": "add_scope",
- "command": "action scope add $uuid_action_category_admin read --description \"read\"",
- "result": "^$",
- "description": "Add one scope to action category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "action scope list $uuid_action_category_admin",
- "result": "(?P<uuid_action_scope_read>\\w+)\\s+read\\s+read",
- "description": "Check added scope.",
- "command_options": "-c id -c name -c description -f value"
- },
- {
- "name": "add_scope",
- "command": "action scope add $uuid_action_category_admin write --description \"write\"",
- "result": "^$",
- "description": "Add one scope to action category",
- "command_options": ""
- },
- {
- "name": "check_added_scope",
- "command": "action scope list $uuid_action_category_admin",
- "result": "(?P<uuid_action_scope_write>\\w+)\\s+write\\s+write",
- "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_admin $uuid_subject_scope_root_role",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "subject assignment list $uuid_subject_admin $uuid_subject_category_admin",
- "result": "$uuid_subject_scope_root_role root_role",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_subjects $uuid_object_category_admin $uuid_object_scope_authz_subjects",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_subjects $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_subjects authz_subjects",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_objects $uuid_object_category_admin $uuid_object_scope_authz_objects",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_objects $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_objects authz_objects",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_actions $uuid_object_category_admin $uuid_object_scope_authz_actions",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_actions $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_actions authz_actions",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_subject_categories $uuid_object_category_admin $uuid_object_scope_authz_subject_categories",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_subject_categories $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_subject_categories authz_subject_categories",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_object_categories $uuid_object_category_admin $uuid_object_scope_authz_object_categories",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_object_categories $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_object_categories authz_object_categories",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_action_categories $uuid_object_category_admin $uuid_object_scope_authz_action_categories",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_action_categories $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_action_categories authz_action_categories",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_subject_scopes $uuid_object_category_admin $uuid_object_scope_authz_subject_scopes",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_subject_scopes $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_subject_scopes authz_subject_scopes",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_object_scopes $uuid_object_category_admin $uuid_object_scope_authz_object_scopes",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_object_scopes $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_object_scopes authz_object_scopes",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_action_scopes $uuid_object_category_admin $uuid_object_scope_authz_action_scopes",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_action_scopes $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_action_scopes authz_action_scopes",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_subject_assignments $uuid_object_category_admin $uuid_object_scope_authz_subject_assignments",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_subject_assignments $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_subject_assignments authz_subject_assignments",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_object_assignments $uuid_object_category_admin $uuid_object_scope_authz_object_assignments",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_object_assignments $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_object_assignments authz_object_assignments",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_action_assignments $uuid_object_category_admin $uuid_object_scope_authz_action_assignments",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_action_assignments $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_action_assignments authz_action_assignments",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_aggregation_algorithm $uuid_object_category_admin $uuid_object_scope_authz_aggregation_algorithm",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_aggregation_algorithm $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_aggregation_algorithm authz_aggregation_algorithm",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_sub_meta_rules $uuid_object_category_admin $uuid_object_scope_authz_sub_meta_rules",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_sub_meta_rules $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_sub_meta_rules authz_sub_meta_rules",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_authz_rules $uuid_object_category_admin $uuid_object_scope_authz_rules",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_authz_rules $uuid_object_category_admin",
- "result": "$uuid_object_scope_authz_rules authz_rules",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_subjects $uuid_object_category_admin $uuid_object_scope_admin_subjects",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_subjects $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_subjects admin_subjects",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_objects $uuid_object_category_admin $uuid_object_scope_admin_objects",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_objects $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_objects admin_objects",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_actions $uuid_object_category_admin $uuid_object_scope_admin_actions",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_actions $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_actions admin_actions",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_subject_categories $uuid_object_category_admin $uuid_object_scope_admin_subject_categories",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_subject_categories $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_subject_categories admin_subject_categories",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_object_categories $uuid_object_category_admin $uuid_object_scope_admin_object_categories",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_object_categories $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_object_categories admin_object_categories",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_action_categories $uuid_object_category_admin $uuid_object_scope_admin_action_categories",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_action_categories $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_action_categories admin_action_categories",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_subject_scopes $uuid_object_category_admin $uuid_object_scope_admin_subject_scopes",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_subject_scopes $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_subject_scopes admin_subject_scopes",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_object_scopes $uuid_object_category_admin $uuid_object_scope_admin_object_scopes",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_object_scopes $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_object_scopes admin_object_scopes",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_action_scopes $uuid_object_category_admin $uuid_object_scope_admin_action_scopes",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_action_scopes $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_action_scopes admin_action_scopes",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_subject_assignments $uuid_object_category_admin $uuid_object_scope_admin_subject_assignments",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_subject_assignments $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_subject_assignments admin_subject_assignments",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_object_assignments $uuid_object_category_admin $uuid_object_scope_admin_object_assignments",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_object_assignments $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_object_assignments admin_object_assignments",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_action_assignments $uuid_object_category_admin $uuid_object_scope_admin_action_assignments",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_action_assignments $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_action_assignments admin_action_assignments",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_aggregation_algorithm $uuid_object_category_admin $uuid_object_scope_admin_aggregation_algorithm",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_aggregation_algorithm $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_aggregation_algorithm admin_aggregation_algorithm",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_sub_meta_rules $uuid_object_category_admin $uuid_object_scope_admin_sub_meta_rules",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_sub_meta_rules $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_sub_meta_rules admin_sub_meta_rules",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "add_assignment",
- "command": "object assignment add $uuid_object_admin_rules $uuid_object_category_admin $uuid_object_scope_admin_rules",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "object assignment list $uuid_object_admin_rules $uuid_object_category_admin",
- "result": "$uuid_object_scope_admin_rules admin_rules",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_assignment",
- "command": "action assignment add $uuid_action_read $uuid_action_category_admin $uuid_action_scope_read",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "action assignment list $uuid_action_read $uuid_action_category_admin",
- "result": "$uuid_action_scope_read read",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_assignment",
- "command": "action assignment add $uuid_action_write $uuid_action_category_admin $uuid_action_scope_write",
- "result": "^$",
- "description": "Add a new assignment",
- "command_options": ""
- },
- {
- "name": "check_added_assignment",
- "command": "action assignment list $uuid_action_write $uuid_action_category_admin",
- "result": "$uuid_action_scope_write write",
- "description": "Check added assignment.",
- "command_options": "-c id -c name -f value"
- },
-
- {
- "name": "check_submetarules",
- "command": "submetarule show",
- "result": "(?P<submetarule_uuid_admin>\\w+)",
- "description": "Get one submetarule ID",
- "command_options": "-c id -f value"
- },
- {
- "name": "set_submetarule",
- "command": "submetarule set $submetarule_uuid_admin --subject_category_id=\"$uuid_subject_category_admin\" --object_category_id=\"$uuid_object_category_admin\" --action_category_id=\"$uuid_action_category_admin\"",
- "result": "^$",
- "description": "Set a new submetarule",
- "command_options": ""
- },
- {
- "name": "check_submetarule",
- "command": "submetarule show",
- "result": "$submetarule_uuid_admin \\s*role",
- "description": "Check the new submetarule",
- "command_options": "-c id -c \"subject categories\" -f value"
- },
- {
- "name": "check_submetarule",
- "command": "submetarule show",
- "result": "$submetarule_uuid_admin \\s*object_id",
- "description": "Check the new submetarule",
- "command_options": "-c id -c \"object categories\" -f value"
- },
- {
- "name": "check_submetarule",
- "command": "submetarule show",
- "result": "$submetarule_uuid_admin \\s*action_id",
- "description": "Check the new submetarule",
- "command_options": "-c id -c \"action categories\" -f value"
- },
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_subjects\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.subjects",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_objects\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.objects",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_actions\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.actions",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_subject_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.subject_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_object_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.object_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_action_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.action_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_subject_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.subject_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_object_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.object_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_action_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.action_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_subject_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.subject_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_object_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.object_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_action_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.action_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_aggregation_algorithm\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.aggregation_algorithm",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_sub_meta_rules\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.sub_meta_rules",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,authz_rules\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+authz.rules",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_subjects\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.subjects",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_objects\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.objects",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_actions\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.actions",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_subject_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.subject_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_object_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.object_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_action_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.action_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_subject_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.subject_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_object_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.object_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_action_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.action_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_subject_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.subject_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_object_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.object_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_action_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.action_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_aggregation_algorithm\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.aggregation_algorithm",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_sub_meta_rules\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.sub_meta_rules",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,authz_rules\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+authz.rules",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_subjects\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.subjects",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_objects\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.objects",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_actions\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.actions",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_subject_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.subject_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_object_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.object_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_action_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.action_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_subject_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.subject_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_object_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.object_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_action_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.action_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_subject_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.subject_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_object_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.object_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_action_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.action_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_aggregation_algorithm\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.aggregation_algorithm",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_sub_meta_rules\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.sub_meta_rules",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,read,admin_rules\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+read\\s+admin.rules",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_subjects\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.subjects",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_objects\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.objects",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_actions\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.actions",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_subject_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.subject_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_object_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.object_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_action_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.action_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_subject_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.subject_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_object_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.object_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_action_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.action_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_subject_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.subject_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_object_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.object_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_action_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.action_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_aggregation_algorithm\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.aggregation_algorithm",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_sub_meta_rules\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.sub_meta_rules",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"root_role,write,admin_rules\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+root_role\\s+write\\s+admin.rules",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -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_admin",
- "result": "",
- "description": "Set submetarule algorithm to inclusion.",
- "command_options": ""
- },
-
- {
- "name": "select_admin_ie",
- "command": "intraextension select $uuid_admin",
- "result": "Select $uuid_admin IntraExtension.",
- "description": "Select the admin IntraExtension",
- "command_options": ""
- },
- {
- "name": "check_select_admin_ie",
- "command": "intraextension show selected",
- "result": "$uuid_admin",
- "description": "Check the selected admin IntraExtension",
- "command_options": "-c id -f value"
- },
- {
- "name": "add_subject",
- "command": "subject add demo --subject_pass console",
- "result": "",
- "description": "Add demo subject.",
- "command_options": ""
- },
- {
- "name": "list_subject",
- "command": "subject list",
- "result": "(?P<uuid_subject_demo_admin>\\w+)\\s+demo",
- "description": "Check that demo subject was added."
- },
- {
- "name": "add_new_role",
- "command": "subject scope add $uuid_subject_category_admin demo_role",
- "result": "",
- "description": "Add demo_role to demo subject.",
- "command_options": ""
- },
- {
- "name": "check_new_role",
- "command": "subject scope list $uuid_subject_category_admin",
- "result": "(?P<uuid_subject_scope_demo_role>\\w+)\\s+demo_role",
- "description": "Check that demo_role was added."
- },
- {
- "name": "add_new_assignment",
- "command": "subject assignment add $uuid_subject_demo_admin $uuid_subject_category_admin $uuid_subject_scope_demo_role",
- "result": "",
- "description": "Link the demo subject to the demo_role scope.",
- "command_options": ""
- },
- {
- "name": "check_new_assignment",
- "command": "subject assignment list $uuid_subject_demo_admin $uuid_subject_category_admin",
- "result": "$uuid_subject_scope_demo_role demo_role",
- "description": "Check that assignment was added.",
- "command_options": "-c id -c name -f value"
- },
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"demo_role,read,authz_objects\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+demo_role\\s+read\\s+authz_objects",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"demo_role,write,authz_objects\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+demo_role\\s+write\\s+authz_objects",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"demo_role,read,authz_object_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+demo_role\\s+read\\s+authz_object_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"demo_role,write,authz_object_assignments\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+demo_role\\s+write\\s+authz_object_assignments",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"demo_role,read,authz_object_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+demo_role\\s+read\\s+authz_object_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"demo_role,write,authz_object_scopes\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+demo_role\\s+write\\s+authz_object_scopes",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"demo_role,read,authz_object_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+demo_role\\s+read\\s+authz_object_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
- {
- "name": "add_a_new_rule",
- "command": "rule add $submetarule_uuid_admin \"demo_role,write,authz_object_categories\"",
- "result": "^$",
- "description": "Add a new rule.",
- "command_options": ""
- },
- {
- "name": "check_added_rule",
- "command": "rule list $submetarule_uuid_admin",
- "result": "(?P<rule_id>\\w+)\\s+demo_role\\s+write\\s+authz_object_categories",
- "description": "Check that the rule was correctly added.",
- "command_options": "-c id -c s:role -c a:action_id -c o:object_id -f value"
- },
-
- {
- "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 admin IntraExtension",
- "command_options": "-c id -f value"
- },
- {
- "name": "add_subject",
- "command": "subject add demo --subject_pass console",
- "result": "",
- "description": "Add demo subject.",
- "command_options": ""
- },
- {
- "name": "list_subject",
- "command": "subject list",
- "result": "(?P<uuid_subject_demo_admin>\\w+)\\s+demo",
- "description": "Check that admin subject was added."
- },
-
- {
- "name": "demo: check nova command",
- "external_command": "nova --os-user-name demo --os-project-name demo --os-password console list",
- "result": "test_moonclient",
- "description": "Check demo can list nova servers due to the current rules"
- },
- {
- "name": "demo: try to pause nova instance",
- "external_command": "nova --os-username demo --os-project-name demo --os-password console pause $uuid_server",
- "result": "^$",
- "description": "Pausing the server must be impossible due to the current rules"
- },
- {
- "name": "check nova command",
- "external_command": "nova --os-user-name demo --os-project-name demo --os-password console list",
- "result": "\\| (?P<uuid_server>[\\w\\-]+)\\s+\\| test_moonclient\\s+\\| ACTIVE\\s+\\| [\\w\\-]+\\s+\\| Running",
- "description": "Check that nova server is still in running state."
- },
-
- {
- "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"
- },
-
- {
- "auth_name": "demo",
- "auth_password": "console",
- "auth_tenant": "demo",
- "description": "Change user to demo"
- },
-
- {
- "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_authz $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_authz",
- "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_authz $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_authz $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_authz",
- "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"
- },
-
-
- {
- "auth_name": "admin",
- "auth_tenant": "admin",
- "description": "Change user to admin"
- },
-
- {
- "name": "delete_authz_intra_extension",
- "command": "intraextension delete $uuid_authz",
- "result": "",
- "description": "Delete the authz intra extension",
- "command_options": ""
- },
- {
- "name": "delete_admin_intra_extension",
- "command": "intraextension delete $uuid_admin",
- "result": "",
- "description": "Delete the admin 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"
- }
- ]
- }
-}
diff --git a/moonclient/moonclient/tests/todo/tests_empty_policy_nova.json b/moonclient/moonclient/tests/todo/tests_empty_policy_nova.json
deleted file mode 100644
index 399710be..00000000
--- a/moonclient/moonclient/tests/todo/tests_empty_policy_nova.json
+++ /dev/null
@@ -1,1079 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "get cirros image",
- "external_command": "wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -o /tmp/cirros.img",
- "result": "",
- "description": "Download a Cirros image"
- },
- {
- "name": "install cirros image",
- "external_command": "glance image-create --name \"cirros\" --disk-format qcow2 --file /tmp/cirros.img --container-format bare",
- "result": "",
- "description": "Upload the Cirros image in glance"
- },
- {
- "name": "create secgroup",
- "external_command": "nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0",
- "result": "",
- "description": "Create a new secgroup in Nova"
- },
- {
- "name": "create secgroup",
- "external_command": "nova secgroup-add-rule default tcp 22 22 0.0.0.0/0",
- "result": "",
- "description": "Create a new secgroup in Nova"
- },
- {
- "name": "create router",
- "external_command": "neutron router-create demo-router",
- "result": "",
- "description": "Create a new router"
- },
- {
- "name": "set router",
- "external_command": "neutron router-gateway-set demo-router ext-net",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "set router",
- "external_command": "neutron net-create demo-net",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "set router",
- "external_command": "neutron subnet-create demo-net 192.168.1.0/24 --name demo-subnet --gateway 192.168.1.1",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "set router",
- "external_command": "neutron router-interface-add demo-router demo-subnet",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "nova image-list",
- "external_command": "nova image-list",
- "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros",
- "description": "Get an Image ID"
- },
- {
- "name": "neutron net-list",
- "external_command": "neutron net-list",
- "result": "(?P<uuid_net>[\\w-]+)\\s+\\| ext-net",
- "description": "Get an Net ID"
- },
- {
- "name": "nova boot new server",
- "external_command": "nova boot --flavor m1.tiny --image $uuid_image --nic net-id=$uuid_net --security-group default test_moonclient",
- "result": "",
- "description": "Get an Image ID"
- },
- {
- "name": "sleep",
- "external_command": "sleep 10",
- "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",
- "no_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": "check nova command",
- "external_command": "nova list",
- "no_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": "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 --subject_pass password",
- "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 --subject_pass password",
- "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": "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/todo/tests_empty_policy_swift.json b/moonclient/moonclient/tests/todo/tests_empty_policy_swift.json
deleted file mode 100644
index e935da98..00000000
--- a/moonclient/moonclient/tests/todo/tests_empty_policy_swift.json
+++ /dev/null
@@ -1,1175 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "authz": [
- {
- "auth_name": "admin",
- "auth_password": "console",
- "auth_tenant": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "swift list",
- "external_command": "swift list",
- "no_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",
- "no_result": "admin",
- "description": "Check if tenant demo is used."
- },
- {
- "name": "add tenant admin",
- "command": "tenant add admin",
- "result": "^$",
- "description": "Add a new tenant",
- "command_options": ""
- },
- {
- "name": "check tenant admin",
- "command": "tenant list",
- "result": "(?P<uuid>\\w+)\\s+admin",
- "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": "admin",
- "description": "Check if tenant admin 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 --subject_pass password",
- "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 --subject_pass password",
- "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",
- "no_result": "moonclient_test",
- "description": "Check Swift command, it must be impossible due to current rules"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "result": "admin",
- "description": "Check if tenant admin 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",
- "no_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 admin",
- "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/todo/tests_external_commands.json b/moonclient/moonclient/tests/todo/tests_external_commands.json
deleted file mode 100644
index 4caa0df1..00000000
--- a/moonclient/moonclient/tests/todo/tests_external_commands.json
+++ /dev/null
@@ -1,228 +0,0 @@
-{
- "command_options": "-f value",
- "tests_group": {
- "main": [
- {
- "auth_name": "admin",
- "description": "Change user to admin (just in case...)"
- },
-
- {
- "name": "list tenant",
- "command": "tenant list",
- "no_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": "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": "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": "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 cirros image",
- "external_command": "wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -o /tmp/cirros.img",
- "result": "",
- "description": "Download a Cirros image"
- },
- {
- "name": "install cirros image",
- "external_command": "glance image-create --name \"cirros\" --disk-format qcow2 --file /tmp/cirros.img --container-format bare",
- "result": "",
- "description": "Upload the Cirros image in glance"
- },
- {
- "name": "create secgroup",
- "external_command": "nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0",
- "result": "",
- "description": "Create a new secgroup in Nova"
- },
- {
- "name": "create secgroup",
- "external_command": "nova secgroup-add-rule default tcp 22 22 0.0.0.0/0",
- "result": "",
- "description": "Create a new secgroup in Nova"
- },
- {
- "name": "create router",
- "external_command": "neutron router-create demo-router",
- "result": "",
- "description": "Create a new router"
- },
- {
- "name": "set router",
- "external_command": "neutron router-gateway-set demo-router ext-net",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "set router",
- "external_command": "neutron net-create demo-net",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "set router",
- "external_command": "neutron subnet-create demo-net 192.168.1.0/24 --name demo-subnet --gateway 192.168.1.1",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "set router",
- "external_command": "neutron router-interface-add demo-router demo-subnet",
- "result": "",
- "description": "Configure the new router"
- },
- {
- "name": "nova image-list",
- "external_command": "nova image-list",
- "result": "(?P<uuid_image>[\\w-]+)\\s+\\| cirros",
- "description": "Get an Image ID"
- },
- {
- "name": "neutron net-list",
- "external_command": "neutron net-list",
- "result": "(?P<uuid_net>[\\w-]+)\\s+\\| ext-net",
- "description": "Get an Net ID"
- },
- {
- "name": "nova boot new server",
- "external_command": "nova boot --flavor m1.tiny --image $uuid_image --nic net-id=$uuid_net --security-group default test_moonclient",
- "result": "",
- "description": "Get an Image ID"
- },
- {
- "name": "sleep",
- "external_command": "sleep 10",
- "result": "",
- "description": "time for server to really boot"
- },
- {
- "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