aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md322
-rw-r--r--kubernetes/README.md39
-rw-r--r--moon_forming/Dockerfile (renamed from templates/moon_forming/Dockerfile)0
-rw-r--r--moon_forming/README.md44
-rw-r--r--moon_forming/conf/mls.py (renamed from templates/moon_forming/conf/mls.py)0
-rw-r--r--moon_forming/conf/rbac.py (renamed from templates/moon_forming/conf/rbac.py)0
-rw-r--r--moon_forming/conf2consul.py (renamed from templates/moon_forming/conf2consul.py)0
-rw-r--r--moon_forming/moon.conf (renamed from templates/moon_forming/moon.conf)0
-rw-r--r--moon_forming/populate_default_values.py (renamed from templates/moon_forming/populate_default_values.py)0
-rw-r--r--moon_forming/run.sh (renamed from templates/moon_forming/run.sh)0
-rw-r--r--moon_forming/utils/__init__.py (renamed from templates/moon_forming/utils/__init__.py)0
-rw-r--r--moon_forming/utils/config.py (renamed from templates/moon_forming/utils/config.py)0
-rw-r--r--moon_forming/utils/models.py (renamed from templates/moon_forming/utils/models.py)0
-rw-r--r--moon_forming/utils/pdp.py (renamed from templates/moon_forming/utils/pdp.py)0
-rw-r--r--moon_forming/utils/policies.py (renamed from templates/moon_forming/utils/policies.py)0
-rw-r--r--moon_gui/README.md110
-rw-r--r--moon_pythonunittest/Dockerfile (renamed from templates/moon_pythonunittest/Dockerfile)0
-rw-r--r--moon_pythonunittest/README.md (renamed from templates/moon_pythonunittest/README.md)0
-rw-r--r--moon_pythonunittest/requirements.txt (renamed from templates/moon_pythonunittest/requirements.txt)0
-rw-r--r--moon_pythonunittest/run_tests.sh (renamed from templates/moon_pythonunittest/run_tests.sh)0
-rw-r--r--moonclient/Changelog29
-rw-r--r--moonclient/LICENSE176
-rw-r--r--moonclient/MANIFEST.in5
-rw-r--r--moonclient/README.rst17
-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
-rw-r--r--moonclient/requirements.txt3
-rw-r--r--moonclient/setup.py133
-rw-r--r--templates/moon_forming/README.md12
-rw-r--r--tests/functional/get_keystone_projects.py (renamed from tests/get_keystone_projects.py)0
-rw-r--r--tests/functional/populate_default_values.py (renamed from tests/populate_default_values.py)0
-rw-r--r--tests/functional/scenario/delegation.py (renamed from tests/scenario/delegation.py)0
-rw-r--r--tests/functional/scenario/mls.py (renamed from tests/scenario/mls.py)0
-rw-r--r--tests/functional/scenario/rbac.py (renamed from tests/scenario/rbac.py)0
-rw-r--r--tests/functional/scenario/rbac_custom_100.py (renamed from tests/scenario/rbac_custom_100.py)0
-rw-r--r--tests/functional/scenario/rbac_custom_1000.py (renamed from tests/scenario/rbac_custom_1000.py)0
-rw-r--r--tests/functional/scenario/rbac_custom_50.py (renamed from tests/scenario/rbac_custom_50.py)0
-rw-r--r--tests/functional/scenario/rbac_large.py (renamed from tests/scenario/rbac_large.py)0
-rw-r--r--tests/functional/scenario/rbac_mls.py (renamed from tests/scenario/rbac_mls.py)0
-rw-r--r--tests/functional/scenario/session.py (renamed from tests/scenario/session.py)0
-rw-r--r--tests/functional/scenario/session_large.py (renamed from tests/scenario/session_large.py)0
-rw-r--r--tests/functional/send_authz.py (renamed from tests/send_authz.py)0
-rw-r--r--tools/bin/README.md (renamed from bin/README.md)0
-rw-r--r--tools/bin/bootstrap.py (renamed from bin/bootstrap.py)0
-rw-r--r--tools/bin/build_all.sh (renamed from bin/build_all.sh)0
-rw-r--r--tools/bin/build_all_pip.sh (renamed from bin/build_all_pip.sh)0
-rw-r--r--tools/bin/delete_orchestrator.sh (renamed from bin/delete_orchestrator.sh)0
-rw-r--r--tools/bin/moon_lib_update.sh (renamed from bin/moon_lib_update.sh)0
-rw-r--r--tools/bin/set_auth.src (renamed from bin/set_auth.src)0
-rwxr-xr-xtools/bin/start.sh (renamed from bin/start.sh)0
-rw-r--r--tools/moon/moon.conf (renamed from templates/moon/moon.conf)0
-rw-r--r--tools/moon_keystone/Dockerfile (renamed from templates/moon_keystone/Dockerfile)0
-rw-r--r--tools/moon_keystone/README.md (renamed from templates/moon_keystone/README.md)0
-rw-r--r--tools/moon_keystone/run.sh (renamed from templates/moon_keystone/run.sh)0
-rw-r--r--tools/moon_kubernetes/README.md82
-rw-r--r--tools/moon_kubernetes/conf/password_moon.txt (renamed from kubernetes/conf/password_moon.txt)0
-rw-r--r--tools/moon_kubernetes/conf/password_root.txt (renamed from kubernetes/conf/password_root.txt)0
-rw-r--r--tools/moon_kubernetes/conf/ports.conf (renamed from kubernetes/conf/ports.conf)0
-rw-r--r--tools/moon_kubernetes/init_k8s.sh (renamed from kubernetes/init_k8s.sh)0
-rw-r--r--tools/moon_kubernetes/start_moon.sh (renamed from kubernetes/start_moon.sh)0
-rw-r--r--tools/moon_kubernetes/templates/consul.yaml (renamed from kubernetes/templates/consul.yaml)0
-rw-r--r--tools/moon_kubernetes/templates/db.yaml (renamed from kubernetes/templates/db.yaml)0
-rw-r--r--tools/moon_kubernetes/templates/keystone.yaml (renamed from kubernetes/templates/keystone.yaml)0
-rw-r--r--tools/moon_kubernetes/templates/kube-dns.yaml (renamed from kubernetes/templates/kube-dns.yaml)0
-rw-r--r--tools/moon_kubernetes/templates/moon_configuration.yaml (renamed from kubernetes/templates/moon_configuration.yaml)0
-rw-r--r--tools/moon_kubernetes/templates/moon_gui.yaml (renamed from kubernetes/templates/moon_gui.yaml)0
-rw-r--r--tools/moon_kubernetes/templates/moon_manager.yaml (renamed from kubernetes/templates/moon_manager.yaml)0
-rw-r--r--tools/moon_kubernetes/templates/moon_orchestrator.yaml (renamed from kubernetes/templates/moon_orchestrator.yaml)0
-rw-r--r--tools/openstack/README.md73
-rw-r--r--tools/openstack/glance/policy.json (renamed from templates/openstack/glance/policy.json)0
-rw-r--r--tools/openstack/nova/policy.json (renamed from templates/openstack/nova/policy.json)0
113 files changed, 289 insertions, 14481 deletions
diff --git a/README.md b/README.md
index ba3604d6..566d8280 100644
--- a/README.md
+++ b/README.md
@@ -3,241 +3,50 @@ __Version 4.3__
This directory contains all the modules for running the Moon platform.
-## Installation
-### kubeadm
-You must follow those explanations to install `kubeadm`:
-> https://kubernetes.io/docs/setup/independent/install-kubeadm/
-
-To summarize, you must install `docker`:
-```bash
-apt update
-apt install -y docker.io
-```
-
-And then, install `kubeadm`:
-```bash
-apt update && apt install -y apt-transport-https
-curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
-cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
-deb http://apt.kubernetes.io/ kubernetes-xenial main
-EOF
-apt update
-apt install -y kubelet kubeadm kubectl
-```
-
-### Moon
-The Moon code is not necessary to start the platform but you need
-Kubernetes configuration files from the GIT repository.
-
-The easy way is to clone the Moon code:
-```bash
-git clone https://git.opnfv.org/moon
-cd moon/moonv4
-export MOON=$(pwd)
-```
-
-### OpenStack
-You must have the following OpenStack components installed somewhere:
-- nova, see [Nova install](https://docs.openstack.org/mitaka/install-guide-ubuntu/nova-controller-install.html)
-- glance, see [Glance install](https://docs.openstack.org/glance/pike/install/)
-
-A Keystone component is automatically installed and configured in the Moon platform.
-After the Moon platform installation, the Keystone server will be available
-at: `http://localhost:30005 or http://\<servername\>:30005`
-
-You can also use your own Keystone server if you want.
-
-## Initialisation
-### kubeadm
-The `kubeadm` platform can be initialized with the following shell script:
-```bash
-sh kubernetes/init_k8s.sh
-```
-
-Wait until all the kubeadm containers are in the `running` state:
-```bash
-watch kubectl get po --namespace=kube-system
-```
-
-You must see something like this:
-
- $ kubectl get po --namespace=kube-system
- NAME READY STATUS RESTARTS AGE
- calico-etcd-7qgjb 1/1 Running 0 1h
- calico-node-f8zvm 2/2 Running 1 1h
- calico-policy-controller-59fc4f7888-ns9kv 1/1 Running 0 1h
- etcd-varuna 1/1 Running 0 1h
- kube-apiserver-varuna 1/1 Running 0 1h
- kube-controller-manager-varuna 1/1 Running 0 1h
- kube-dns-bfbb49cd7-rgqxn 3/3 Running 0 1h
- kube-proxy-x88wg 1/1 Running 0 1h
- kube-scheduler-varuna 1/1 Running 0 1h
-
-### Moon
-The Moon platform is composed on the following components:
-* `consul`: a Consul configuration server
-* `db`: a MySQL database server
-* `keystone`: a Keystone authentication server
-* `gui`: a Moon web interface
-* `manager`: the Moon manager for the database
-* `orchestrator`: the Moon component that manage pods in te K8S platform
-* `wrapper`: the Moon endpoint where OpenStack component connect to.
-
-At this point, you must choose one of the following options:
-* Specific configuration
-* Generic configuration
-
-#### Specific Configuration
-Why using a specific configuration:
-1. The `db` and `keystone` can be installed by yourself but you must configure the
-Moon platform to use them.
-2. You want to change the default passwords in the Moon platform
-
-Use the following commands: `TODO`
-
-#### Generic Configuration
-Why using a specific configuration:
-1. You just want to test the platform
-2. You want to develop on the Moon platform
-
-The `Moon` platform can be initialized with the following shell script:
-```bash
-sh kubernetes/start_moon.sh
-```
-
-Wait until all the Moon containers are in the `running` state:
-```bash
-watch kubectl get po --namespace=moon
-```
-
-You must see something like this:
-
- $ kubectl get po --namespace=moon
- NAME READY STATUS RESTARTS AGE
- consul-57b6d66975-9qnfx 1/1 Running 0 52m
- db-867f9c6666-bq8cf 1/1 Running 0 52m
- gui-bc9878b58-q288x 1/1 Running 0 51m
- keystone-7d9cdbb69f-bl6ln 1/1 Running 0 52m
- manager-5bfbb96988-2nvhd 1/1 Running 0 51m
- manager-5bfbb96988-fg8vj 1/1 Running 0 51m
- manager-5bfbb96988-w9wnk 1/1 Running 0 51m
- orchestrator-65d8fb4574-tnfx2 1/1 Running 0 51m
- wrapper-astonishing-748b7dcc4f-ngsvp 1/1 Running 0 51m
-
-## Configuration
-### Moon
-#### Introduction
-The Moon platform is already configured after the installation.
-If you want to see or modify the configuration, go with a web browser
-to the following page:
-
-> http://localhost:30006
-
-This is a consul server, you can update the configuration in the `KEY/VALUE` tab.
-There are some configuration items, lots of them are only read when a new K8S pod is started
-and not during its life cycle.
-
-**WARNING: some confidential information are put here in clear text.
-This is a known security issue.**
-
-#### Keystone
-If you have your own Keystone server, you can point Moon to your server in the
-`openstack/keystone` element or through the link:
-> http://localhost:30005/ui/#/dc1/kv/openstack/keystone/edit
-
-This configuration element is read every time Moon need it, specially when adding users.
-
-#### Database
-The database can also be modified here:
-> http://varuna:30005/ui/#/dc1/kv/database/edit
-
-**WARNING: the password is in clear text, this is a known security issue.**
-
-If you want to use your own database server, change the configuration:
-
- {"url": "mysql+pymysql://my_user:my_secret_password@my_server/moon", "driver": "sql"}
-
-Then you have to rebuild the database before using it.
-This can be done with the following commands:
-
- cd $MOON
- kubectl delete -f kubernetes/templates/moon_configuration.yaml
- kubectl create -f kubernetes/templates/moon_configuration.yaml
-
-
-### OpenStack
-Before updating the configuration of the OpenStack platform, check that the platform
-is working without Moon, use the following commands:
-```bash
-# set authentication
-openstack endpoint list
-openstack user list
-openstack server list
-```
-
-In order to connect the OpenStack platform with the Moon platform, you must update some
-configuration files in Nova and Glance:
-* `/etc/nova/policy.json`
-* `/etc/glance/policy.json`
-
-In some installed platform, the `/etc/nova/policy.json` can be absent so you have
-to create one. You can find example files in those directory:
-> ${MOON}/moonv4/templates/nova/policy.json
-> ${MOON}/moonv4/templates/glance/policy.json
-
-Each line is mapped to an OpenStack API interface, for example, the following line
-allows the user to get details for every virtual machines in the cloud
-(the corresponding shell command is `openstack server list`):
-
- "os_compute_api:servers:detail": "",
-
-This lines indicates that there is no special authorisation to use this API,
-every users can use it. If you want that the Moon platform handles that authorisation,
-update this line with:
-
- "os_compute_api:servers:detail": "http://my_hostname:31001/authz"
-
-1) by replacing `my_hostname` with the hostname (od the IP address) of the Moon platform.
-2) by updating the TCP port (default: 31001) with the good one.
-
-To find this TCP port, use the following command:
-
- $ kubectl get services -n moon | grep wrapper | cut -d ":" -f 2 | cut -d " " -f 1
- 31002/TCP
-
-### Moon
+## Platform Setup
+- [Docker installation](tools/moon_kubernetes/README.md)
+- [kubeadm installation](tools/moon_kubernetes/README.md)
+- [Moon deployment](tools/moon_kubernetes/README.md)
+- [OpenStack deployment](tools/openstack/README.md)
+
+
+## Micro-service Architecture
+The Moon platform is composed on the following components/containers:
+- *consul*: a Consul configuration server
+- *db*: a MySQL database server
+- *keystone*: a Keystone authentication server
+- [gui](moon_gui/README.md): a Moon web interface
+- [manager](moon_manager/README.md): the Moon manager for the database
+- [orchestrator](moon_orchestrator/README.md): the Moon component that manage pods in te K8S platform
+- [wrapper](moon_wrapper/README.md): the Moon endpoint where OpenStack component connect to.
+
+
+## Manipulation
+### moon_gui
The Moon platform comes with a graphical user interface which can be used with
-a web browser at this URL:
-> http://$MOON_HOST:30002
+a web browser at this URL `http://$MOON_HOST:30002`
You will be asked to put a login and password. Those elements are the login and password
of the Keystone server, if you didn't modify the Keystone server, you will find the
-login and password here:
-> http://$MOON_HOST:30005/ui/#/dc1/kv/openstack/keystone/edit
+login and password here `http://$MOON_HOST:30005/ui/#/dc1/kv/openstack/keystone/edit`
**WARNING: the password is in clear text, this is a known security issue.**
-The Moon platform can also be requested through its API:
-> http://$MOON_HOST:30001
+### moon_manager
+The Moon platform can also be requested through its API `http://$MOON_HOST:30001`
**WARNING: By default, no login/password will be needed because of
the configuration which is in DEV mode.**
If you want more security, you have to update the configuration of the Keystone server here:
-> http://$MOON_HOST:30005/ui/#/dc1/kv/openstack/keystone/edit
-
+`http://$MOON_HOST:30005/ui/#/dc1/kv/openstack/keystone/edit`
by modifying the `check_token` argument to `yes`.
If you write this modification, your requests to Moon API must always include a valid token
taken from the Keystone server. This token must be place in the header of the request
(`X-Auth-Token`).
-## usage
-### tests the platform
-In order to know if the platform is healthy, here are some commands you can use.
-1) Check that all the K8S pods in the Moon namespace are in running state:
-`kubectl get pods -n moon`
-
-2) Check if the Manager API is running:
+### End-to-end Functional Test
+Check if the Manager API is running:
```bash
curl http://$MOON_HOST:30001
curl http://$MOON_HOST:30001/pdp
@@ -275,11 +84,8 @@ curl --header "X-Auth-Token: <token_retrieve_from_keystone>" http://moon_hostnam
curl --header "X-Auth-Token: <token_retrieve_from_keystone>" http://moon_hostname:30001/policies
```
-3) Use a web browser to navigate to the GUI and enter the login and password of the keystone service:
-`firefox http://$MOON_HOST:30002`
-
-4) Use tests Python Scripts
-check firstly the Consul service for *Components/Manager*, e.g.
+Check the Consul service for
+- *Components/Manager*, e.g.
```json
{
"port": 8082,
@@ -292,7 +98,7 @@ check firstly the Consul service for *Components/Manager*, e.g.
}
}
```
-*OpenStack/Keystone*: e.g.
+- *OpenStack/Keystone*: e.g.
```json
{
"url": "http://keystone:5000/v3",
@@ -308,74 +114,8 @@ check firstly the Consul service for *Components/Manager*, e.g.
}
```
+Launch functional [test scenario](tests/functional/scenario) :
```bash
python3 populate_default_values.py --consul-host=$MOON_HOST --consul-port=30005 -v scenario/rbac_large.py
python3 send_authz.py --consul-host=$MOON_HOST --consul-port=30005 --authz-host=$MOON_HOST --authz-port=31002 -v scenario/rbac_large.py
```
-
-### GUI usage
-After authentication, you will see 4 tabs: Project, Models, Policies, PDP:
-
-* *Projects*: configure mapping between Keystone projects and PDP (Policy Decision Point)
-* *Models*: configure templates of policies (for example RBAC or MLS)
-* *Policies*: applied models or instantiated models ;
-on one policy, you map a authorisation model and set subject, objects and action that will
-rely on that model
-* *PDP*: Policy Decision Point, this is the link between Policies and Keystone Project
-
-In the following paragraphs, we will add a new user in OpenStack and allow her to list
-all VM on the OpenStack platform.
-
-First, add a new user and a new project in the OpenStack platform:
-
- openstack user create --password-prompt demo_user
- openstack project create demo
- DEMO_USER=$(openstack user list | grep demo_user | cut -d " " -f 2)
- DEMO_PROJECT=$(openstack project list | grep demo | cut -d " " -f 2)
- openstack role add --user $DEMO_USER --project $DEMO_PROJECT admin
-
-You have to add the same user in the Moon interface:
-
-1. go to the `Projects` tab in the Moon interface
-1. go to the line corresponding to the new project and click to the `Map to a PDP` link
-1. select in the combobox the MLS PDP and click `OK`
-1. in the Moon interface, go to the `Policy` tab
-1. go to the line corresponding to the MLS policy and click on the `actions->edit` button
-1. scroll to the `Perimeters` line and click on the `show` link to show the perimeter configuration
-1. go to the `Add a subject` line and click on `Add a new perimeter`
-1. set the name of that subject to `demo_user` (*the name must be strictly identical*)
-1. in the combobox named `Policy list` select the `MLS` policy and click on the `+` button
-1. click on the yellow `Add Perimeter` button
-1. go to the `Assignment` line and click on the `show` button
-1. under the `Add a Assignments Subject` select the MLS policy,
-the new user (`demo_user`), the category `subject_category_level`
-1. in the `Select a Data` line, choose the `High` scope and click on the `+` link
-1. click on the yellow `Create Assignments` button
-1. if you go to the OpenStack platform, the `demo_user` is now allow to connect
-to the Nova component (test with `openstack server list` connected with the `demo_user`)
-
-
-## Annexes
-
-### connect to the OpenStack platform
-
-Here is a shell script to authenticate to the OpenStack platform as `admin`:
-
- export OS_USERNAME=admin
- export OS_PASSWORD=p4ssw0rd
- export OS_REGION_NAME=Orange
- export OS_TENANT_NAME=admin
- export OS_AUTH_URL=http://moon_hostname:30006/v3
- export OS_DOMAIN_NAME=Default
- export OS_IDENTITY_API_VERSION=3
-
-For the `demo_user`, use:
-
- export OS_USERNAME=demo_user
- export OS_PASSWORD=your_secret_password
- export OS_REGION_NAME=Orange
- export OS_TENANT_NAME=demo
- export OS_AUTH_URL=http://moon_hostname:30006/v3
- export OS_DOMAIN_NAME=Default
- export OS_IDENTITY_API_VERSION=3
-
diff --git a/kubernetes/README.md b/kubernetes/README.md
deleted file mode 100644
index b5320dd6..00000000
--- a/kubernetes/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# Moon Platform Setup
-## K8S Installation
-Choose the right K8S platform
-### Minikube
-```bash
-curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
-chmod +x ./kubectl
-sudo mv ./kubectl /usr/local/bin/kubectl
-curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.21.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
-```
-
-### Kubeadm
-see: https://kubernetes.io/docs/setup/independent/install-kubeadm/
-```bash
-apt-get update && apt-get install -y apt-transport-https
-curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
-cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
-deb http://apt.kubernetes.io/ kubernetes-xenial main
-EOF
-apt-get update
-apt-get install -y kubelet kubeadm kubectl
-```
-
-## Moon Deployment
-### Creation
-Execute the script : init_k8s.sh
-```bash
-sudo bash init_k8s.sh
-watch kubectl get po --namespace=kube-system
-```
-Wait until all pods are in "Running" state (crtl-c to stop the watch command)
-
-### Execution
-Execute the script : start_moon.sh
-```bash
-sudo bash start_moon.sh
-watch kubectl get po --namespace=moon
-```
-
diff --git a/templates/moon_forming/Dockerfile b/moon_forming/Dockerfile
index fe48eee0..fe48eee0 100644
--- a/templates/moon_forming/Dockerfile
+++ b/moon_forming/Dockerfile
diff --git a/moon_forming/README.md b/moon_forming/README.md
new file mode 100644
index 00000000..d71805cb
--- /dev/null
+++ b/moon_forming/README.md
@@ -0,0 +1,44 @@
+# Moon Forming
+moon_forming is a container to automatize the configuration of the Moon platform
+
+## Run
+```bash
+docker run wukongsun/moon_forming:latest
+```
+
+## Consul
+The Moon platform is already configured after the installation.
+If you want to see or modify the configuration, go with a web browser
+to the following page: `http://localhost:30006`.
+
+With the consul server, you can update the configuration in the `KEY/VALUE` tab.
+There are some configuration items, lots of them are only read when a new K8S pod is started
+and not during its life cycle.
+
+**WARNING: some confidential information are put here in clear text.
+This is a known security issue.**
+
+### Keystone
+If you have your own Keystone server, you can point Moon to your Keystone in the
+`openstack/keystone` element: `http://localhost:30005/ui/#/dc1/kv/openstack/keystone/edit`.
+This configuration element is read every time Moon need it, specially when adding users.
+
+### Database
+The database can also be modified through: `http://localhost:30005/ui/#/dc1/kv/database/edit`.
+
+**WARNING: the password is in clear text, this is a known security issue.**
+
+If you want to use your own database server, change the configuration:
+
+ {"url": "mysql+pymysql://my_user:my_secret_password@my_server/moon", "driver": "sql"}
+
+Then you have to rebuild the database before using it.
+This can be done with the following commands:
+```bash
+kubectl delete -f $MOON/tools/moon_kubernetes/templates/moon_configuration.yaml
+kubectl create -f $MOON/tools/moon_kubernetes/templates/moon_configuration.yaml
+```
+
+
+
+
diff --git a/templates/moon_forming/conf/mls.py b/moon_forming/conf/mls.py
index 0e6285c9..0e6285c9 100644
--- a/templates/moon_forming/conf/mls.py
+++ b/moon_forming/conf/mls.py
diff --git a/templates/moon_forming/conf/rbac.py b/moon_forming/conf/rbac.py
index 25c010fd..25c010fd 100644
--- a/templates/moon_forming/conf/rbac.py
+++ b/moon_forming/conf/rbac.py
diff --git a/templates/moon_forming/conf2consul.py b/moon_forming/conf2consul.py
index 46c99d5c..46c99d5c 100644
--- a/templates/moon_forming/conf2consul.py
+++ b/moon_forming/conf2consul.py
diff --git a/templates/moon_forming/moon.conf b/moon_forming/moon.conf
index dc498e34..dc498e34 100644
--- a/templates/moon_forming/moon.conf
+++ b/moon_forming/moon.conf
diff --git a/templates/moon_forming/populate_default_values.py b/moon_forming/populate_default_values.py
index fa099458..fa099458 100644
--- a/templates/moon_forming/populate_default_values.py
+++ b/moon_forming/populate_default_values.py
diff --git a/templates/moon_forming/run.sh b/moon_forming/run.sh
index 71543f9e..71543f9e 100644
--- a/templates/moon_forming/run.sh
+++ b/moon_forming/run.sh
diff --git a/templates/moon_forming/utils/__init__.py b/moon_forming/utils/__init__.py
index e69de29b..e69de29b 100644
--- a/templates/moon_forming/utils/__init__.py
+++ b/moon_forming/utils/__init__.py
diff --git a/templates/moon_forming/utils/config.py b/moon_forming/utils/config.py
index 30c8ea4f..30c8ea4f 100644
--- a/templates/moon_forming/utils/config.py
+++ b/moon_forming/utils/config.py
diff --git a/templates/moon_forming/utils/models.py b/moon_forming/utils/models.py
index 3cf31354..3cf31354 100644
--- a/templates/moon_forming/utils/models.py
+++ b/moon_forming/utils/models.py
diff --git a/templates/moon_forming/utils/pdp.py b/moon_forming/utils/pdp.py
index f3c6df37..f3c6df37 100644
--- a/templates/moon_forming/utils/pdp.py
+++ b/moon_forming/utils/pdp.py
diff --git a/templates/moon_forming/utils/policies.py b/moon_forming/utils/policies.py
index bd08291a..bd08291a 100644
--- a/templates/moon_forming/utils/policies.py
+++ b/moon_forming/utils/policies.py
diff --git a/moon_gui/README.md b/moon_gui/README.md
index ff6e5a97..ea46b079 100644
--- a/moon_gui/README.md
+++ b/moon_gui/README.md
@@ -1,63 +1,71 @@
-
-GUI for the Moon project
-================================
-
+# GUI for the Moon project
This directory contains all the code for the Moon project
It is designed to provide a running GUI of the Moon platform instance.
-
## Usage
-
-### Prerequist
-- `sudo apt-get install nodejs nodejs-legacy`
-- `sudo npm install --global gulp-cli`
-
-
-### Install all packages
-- `cd $MOON_HOME/moon_gui`
-- `sudo npm install`
-
-### Run the GUI
-- `gulp webServerDelivery`
-- Open your web browser
-
+- Prerequist
+ - `sudo apt-get install nodejs nodejs-legacy`
+ - `sudo npm install --global gulp-cli`
+- Install all packages
+ - `cd $MOON_HOME/moon_gui`
+ - `sudo npm install`
+- Run the GUI
+ - `gulp webServerDelivery`
+ - Open your web browser
## Configuration
+- build the delivery package: `gulp delivery`
+- launch the Web Server: `gulp webServerDelivery`
-### Build the delivery package
-- `gulp delivery`
-### Launch the Web Server
-- `gulp webServerDelivery`
-
-### Development
-
-During the development it is possible to use following commands :
-- `gulp build`
-Launch a Web Server
-- `gulp webServer`
+## Development
+- during the development it is possible to use following commands: `gulp build`
+- launch a Web Server: `gulp webServer`
- Gulp webServer will refresh the browser when a file related to the application changed
-
-
-### Constants
-It is possible to change some constants (API endpoints)
-- $MOON_HOME/moon_gui/static/app/moon.constants.js
-
-
-### CORS
+- it is possible to change some constants (API endpoints): `$MOON_HOME/moon_gui/static/app/moon.constants.js`
+## CORS
The GUI need to connect itself to Keystone and Moon.
Opening CORS to the GUI WebServer is required.
-
-In order to modify Keystone :
-
-`cd $pathtoVmSpace/docker/keystone`
-
-Concerned file is run.sh
-
-In order to modify Moon :
-
-`cd $MOON_HOME/moon_interface/interface`
-
-Concerned file is http_server.py
-
+- modify Keystone: `$MOON_HOME/tools/moon_keystone/run.sh`
+- modify Moon: `$MOON_HOME/moon_interface/interface/http_server.py`
+## Usage
+After authentication, you will see 4 tabs: Project, Models, Policies, PDP:
+
+* *Projects*: configure mapping between Keystone projects and PDP (Policy Decision Point)
+* *Models*: configure templates of policies (for example RBAC or MLS)
+* *Policies*: applied models or instantiated models ;
+on one policy, you map a authorisation model and set subject, objects and action that will
+rely on that model
+* *PDP*: Policy Decision Point, this is the link between Policies and Keystone Project
+
+In the following paragraphs, we will add a new user in OpenStack and allow her to list
+all VM on the OpenStack platform.
+
+First, add a new user and a new project in the OpenStack platform:
+
+ openstack user create --password-prompt demo_user
+ openstack project create demo
+ DEMO_USER=$(openstack user list | grep demo_user | cut -d " " -f 2)
+ DEMO_PROJECT=$(openstack project list | grep demo | cut -d " " -f 2)
+ openstack role add --user $DEMO_USER --project $DEMO_PROJECT admin
+
+You have to add the same user in the Moon interface:
+
+1. go to the `Projects` tab in the Moon interface
+1. go to the line corresponding to the new project and click to the `Map to a PDP` link
+1. select in the combobox the MLS PDP and click `OK`
+1. in the Moon interface, go to the `Policy` tab
+1. go to the line corresponding to the MLS policy and click on the `actions->edit` button
+1. scroll to the `Perimeters` line and click on the `show` link to show the perimeter configuration
+1. go to the `Add a subject` line and click on `Add a new perimeter`
+1. set the name of that subject to `demo_user` (*the name must be strictly identical*)
+1. in the combobox named `Policy list` select the `MLS` policy and click on the `+` button
+1. click on the yellow `Add Perimeter` button
+1. go to the `Assignment` line and click on the `show` button
+1. under the `Add a Assignments Subject` select the MLS policy,
+the new user (`demo_user`), the category `subject_category_level`
+1. in the `Select a Data` line, choose the `High` scope and click on the `+` link
+1. click on the yellow `Create Assignments` button
+1. if you go to the OpenStack platform, the `demo_user` is now allow to connect
+to the Nova component (test with `openstack server list` connected with the `demo_user`) \ No newline at end of file
diff --git a/templates/moon_pythonunittest/Dockerfile b/moon_pythonunittest/Dockerfile
index b8fb5151..b8fb5151 100644
--- a/templates/moon_pythonunittest/Dockerfile
+++ b/moon_pythonunittest/Dockerfile
diff --git a/templates/moon_pythonunittest/README.md b/moon_pythonunittest/README.md
index 45d3a988..45d3a988 100644
--- a/templates/moon_pythonunittest/README.md
+++ b/moon_pythonunittest/README.md
diff --git a/templates/moon_pythonunittest/requirements.txt b/moon_pythonunittest/requirements.txt
index b611b008..b611b008 100644
--- a/templates/moon_pythonunittest/requirements.txt
+++ b/moon_pythonunittest/requirements.txt
diff --git a/templates/moon_pythonunittest/run_tests.sh b/moon_pythonunittest/run_tests.sh
index 6c586f87..6c586f87 100644
--- a/templates/moon_pythonunittest/run_tests.sh
+++ b/moon_pythonunittest/run_tests.sh
diff --git a/moonclient/Changelog b/moonclient/Changelog
deleted file mode 100644
index 1326511a..00000000
--- a/moonclient/Changelog
+++ /dev/null
@@ -1,29 +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'.
-
-
-CHANGES
-=======
-
-0.4.0
------
-
-* Add an argument to force the name of the logfile for test command.
-
-0.3.0
------
-
-* Return code matches now the number of error occurred during tests
-
-0.2.0
------
-
-* Update tests command by adding a "--self" attribute
-
-
-0.1.0
------
-
-* Initialization of Moon Client \ No newline at end of file
diff --git a/moonclient/LICENSE b/moonclient/LICENSE
deleted file mode 100644
index 68c771a0..00000000
--- a/moonclient/LICENSE
+++ /dev/null
@@ -1,176 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
diff --git a/moonclient/MANIFEST.in b/moonclient/MANIFEST.in
deleted file mode 100644
index ef125662..00000000
--- a/moonclient/MANIFEST.in
+++ /dev/null
@@ -1,5 +0,0 @@
-include README.rst
-include Changelog
-include LICENSE
-include requirements.txt
-graft moonclient/tests
diff --git a/moonclient/README.rst b/moonclient/README.rst
deleted file mode 100644
index 1263f187..00000000
--- a/moonclient/README.rst
+++ /dev/null
@@ -1,17 +0,0 @@
-Moon Client
-===========
-
-Installation
-------------
-
-* `sudo python setup.py install`
-
-* `cd ~/devstack || source openrc admin`
-
-
-Manipulation
-------------
-
-* `moon tenant list`
-
-
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
diff --git a/moonclient/requirements.txt b/moonclient/requirements.txt
deleted file mode 100644
index 298dfec9..00000000
--- a/moonclient/requirements.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-pbr>=0.6,!=0.7,<1.0
-cliff>=1.7.0 # Apache-2.0
-cliff-tablib>=1.0
diff --git a/moonclient/setup.py b/moonclient/setup.py
deleted file mode 100644
index 0b93c4d3..00000000
--- a/moonclient/setup.py
+++ /dev/null
@@ -1,133 +0,0 @@
-#!/usr/bin/env python
-
-
-# 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'.
-from setuptools import setup, find_packages
-from moonclient import __version__
-
-PROJECT = 'python-moonclient'
-
-# Change docs/sphinx/conf.py too!
-VERSION = __version__
-
-try:
- long_description = open('README.rst', 'rt').read()
-except IOError:
- long_description = ''
-
-setup(
- name=PROJECT,
- version=VERSION,
-
- description='Python Moon client',
- long_description=long_description,
-
- author='Thomas Duval',
- author_email='thomas.duval@orange.com',
-
- url='https://github.com/...',
- download_url='https://github.com/.../tarball/master',
-
- classifiers=['Development Status :: 3 - Alpha',
- 'License :: OSI Approved :: Apache Software License',
- 'Programming Language :: Python',
- 'Programming Language :: Python :: 2',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.2',
- 'Intended Audience :: Developers',
- 'Environment :: Console',
- ],
-
- platforms=['Any'],
-
- scripts=[],
-
- provides=[],
- install_requires=['cliff'],
-
- namespace_packages=[],
- packages=find_packages(),
- include_package_data=True,
-
- entry_points={
- 'console_scripts': [
- 'moon = moonclient.shell:main'
- ],
- 'moon.client': [
- 'template_list = moonclient.configuration:TemplatesList',
- 'aggregation_algorithm_list = moonclient.configuration:AggregationAlgorithmsList',
- 'submetarule_algorithm_list = moonclient.configuration:SubMetaRuleAlgorithmsList',
-
- 'tenant_add = moonclient.tenants:TenantAdd',
- 'tenant_set = moonclient.tenants:TenantSet',
- 'tenant_list = moonclient.tenants:TenantList',
- 'tenant_show = moonclient.tenants:TenantShow',
- 'tenant_delete = moonclient.tenants:TenantDelete',
-
- 'intraextension_select = moonclient.intraextension:IntraExtensionSelect',
- 'intraextension_add = moonclient.intraextension:IntraExtensionCreate',
- 'intraextension_list = moonclient.intraextension:IntraExtensionList',
- 'intraextension_delete = moonclient.intraextension:IntraExtensionDelete',
- 'intraextension_show = moonclient.intraextension:IntraExtensionShow',
- 'intraextension_init = moonclient.intraextension:IntraExtensionInit',
-
- 'subject_list = moonclient.subjects:SubjectsList',
- 'subject_add = moonclient.subjects:SubjectsAdd',
- 'subject_delete = moonclient.subjects:SubjectsDelete',
- 'object_list = moonclient.objects:ObjectsList',
- 'object_add = moonclient.objects:ObjectsAdd',
- 'object_delete = moonclient.objects:ObjectsDelete',
- 'action_list = moonclient.actions:ActionsList',
- 'action_add = moonclient.actions:ActionsAdd',
- 'action_delete = moonclient.actions:ActionsDelete',
- 'subject_category_list = moonclient.subject_categories:SubjectCategoriesList',
- 'subject_category_add = moonclient.subject_categories:SubjectCategoriesAdd',
- 'subject_category_delete = moonclient.subject_categories:SubjectCategoriesDelete',
- 'object_category_list = moonclient.object_categories:ObjectCategoriesList',
- 'object_category_add = moonclient.object_categories:ObjectCategoriesAdd',
- 'object_category_delete = moonclient.object_categories:ObjectCategoriesDelete',
- 'action_category_list = moonclient.action_categories:ActionCategoriesList',
- 'action_category_add = moonclient.action_categories:ActionCategoriesAdd',
- 'action_category_delete = moonclient.action_categories:ActionCategoriesDelete',
- 'subject_scope_list = moonclient.subject_scopes:SubjectScopesList',
- 'subject_scope_add = moonclient.subject_scopes:SubjectScopesAdd',
- 'subject_scope_delete = moonclient.subject_scopes:SubjectScopesDelete',
- 'object_scope_list = moonclient.object_scopes:ObjectScopesList',
- 'object_scope_add = moonclient.object_scopes:ObjectScopesAdd',
- 'object_scope_delete = moonclient.object_scopes:ObjectScopesDelete',
- 'action_scope_list = moonclient.action_scopes:ActionScopesList',
- 'action_scope_add = moonclient.action_scopes:ActionScopesAdd',
- 'action_scope_delete = moonclient.action_scopes:ActionScopesDelete',
- 'subject_assignment_list = moonclient.subject_assignments:SubjectAssignmentsList',
- 'subject_assignment_add = moonclient.subject_assignments:SubjectAssignmentsAdd',
- 'subject_assignment_delete = moonclient.subject_assignments:SubjectAssignmentsDelete',
- 'object_assignment_list = moonclient.object_assignments:ObjectAssignmentsList',
- 'object_assignment_add = moonclient.object_assignments:ObjectAssignmentsAdd',
- 'object_assignment_delete = moonclient.object_assignments:ObjectAssignmentsDelete',
- 'action_assignment_list = moonclient.action_assignments:ActionAssignmentsList',
- 'action_assignment_add = moonclient.action_assignments:ActionAssignmentsAdd',
- 'action_assignment_delete = moonclient.action_assignments:ActionAssignmentsDelete',
-
- 'aggregation_algorithm_show = moonclient.metarules:AggregationAlgorithmsList',
- 'aggregation_algorithm_set = moonclient.metarules:AggregationAlgorithmSet',
-
- 'submetarule_show = moonclient.metarules:SubMetaRuleShow',
- 'submetarule_set = moonclient.metarules:SubMetaRuleSet',
-
-
- 'rule_list = moonclient.rules:RulesList',
- 'rule_add = moonclient.rules:RuleAdd',
- 'rule_delete = moonclient.rules:RuleDelete',
-
- 'log = moonclient.logs:LogsList',
-
- 'test = moonclient.tests:TestsLaunch',
- ],
- },
-
- zip_safe=False,
-) \ No newline at end of file
diff --git a/templates/moon_forming/README.md b/templates/moon_forming/README.md
deleted file mode 100644
index f6327693..00000000
--- a/templates/moon_forming/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
-Introduction
-============
-
-moonforming is a container used to automatize the configuration of the Moon patform
-
-Usage
-=====
-
-```bash
-docker run asteroide/moonforming:v1.1
-```
-
diff --git a/tests/get_keystone_projects.py b/tests/functional/get_keystone_projects.py
index 9b5d87cd..9b5d87cd 100644
--- a/tests/get_keystone_projects.py
+++ b/tests/functional/get_keystone_projects.py
diff --git a/tests/populate_default_values.py b/tests/functional/populate_default_values.py
index d5a5769b..d5a5769b 100644
--- a/tests/populate_default_values.py
+++ b/tests/functional/populate_default_values.py
diff --git a/tests/scenario/delegation.py b/tests/functional/scenario/delegation.py
index 839e74ce..839e74ce 100644
--- a/tests/scenario/delegation.py
+++ b/tests/functional/scenario/delegation.py
diff --git a/tests/scenario/mls.py b/tests/functional/scenario/mls.py
index 3a3ded43..3a3ded43 100644
--- a/tests/scenario/mls.py
+++ b/tests/functional/scenario/mls.py
diff --git a/tests/scenario/rbac.py b/tests/functional/scenario/rbac.py
index 89fd7de8..89fd7de8 100644
--- a/tests/scenario/rbac.py
+++ b/tests/functional/scenario/rbac.py
diff --git a/tests/scenario/rbac_custom_100.py b/tests/functional/scenario/rbac_custom_100.py
index 9ee55dbd..9ee55dbd 100644
--- a/tests/scenario/rbac_custom_100.py
+++ b/tests/functional/scenario/rbac_custom_100.py
diff --git a/tests/scenario/rbac_custom_1000.py b/tests/functional/scenario/rbac_custom_1000.py
index d6850485..d6850485 100644
--- a/tests/scenario/rbac_custom_1000.py
+++ b/tests/functional/scenario/rbac_custom_1000.py
diff --git a/tests/scenario/rbac_custom_50.py b/tests/functional/scenario/rbac_custom_50.py
index e1437cf4..e1437cf4 100644
--- a/tests/scenario/rbac_custom_50.py
+++ b/tests/functional/scenario/rbac_custom_50.py
diff --git a/tests/scenario/rbac_large.py b/tests/functional/scenario/rbac_large.py
index ef5dd9b2..ef5dd9b2 100644
--- a/tests/scenario/rbac_large.py
+++ b/tests/functional/scenario/rbac_large.py
diff --git a/tests/scenario/rbac_mls.py b/tests/functional/scenario/rbac_mls.py
index 8a5362ea..8a5362ea 100644
--- a/tests/scenario/rbac_mls.py
+++ b/tests/functional/scenario/rbac_mls.py
diff --git a/tests/scenario/session.py b/tests/functional/scenario/session.py
index 97d7aec3..97d7aec3 100644
--- a/tests/scenario/session.py
+++ b/tests/functional/scenario/session.py
diff --git a/tests/scenario/session_large.py b/tests/functional/scenario/session_large.py
index 5b4a64b6..5b4a64b6 100644
--- a/tests/scenario/session_large.py
+++ b/tests/functional/scenario/session_large.py
diff --git a/tests/send_authz.py b/tests/functional/send_authz.py
index b4ed1d2f..b4ed1d2f 100644
--- a/tests/send_authz.py
+++ b/tests/functional/send_authz.py
diff --git a/bin/README.md b/tools/bin/README.md
index 3125c468..3125c468 100644
--- a/bin/README.md
+++ b/tools/bin/README.md
diff --git a/bin/bootstrap.py b/tools/bin/bootstrap.py
index 6f2a5e03..6f2a5e03 100644
--- a/bin/bootstrap.py
+++ b/tools/bin/bootstrap.py
diff --git a/bin/build_all.sh b/tools/bin/build_all.sh
index 5bbf6a19..5bbf6a19 100644
--- a/bin/build_all.sh
+++ b/tools/bin/build_all.sh
diff --git a/bin/build_all_pip.sh b/tools/bin/build_all_pip.sh
index 2b415bf0..2b415bf0 100644
--- a/bin/build_all_pip.sh
+++ b/tools/bin/build_all_pip.sh
diff --git a/bin/delete_orchestrator.sh b/tools/bin/delete_orchestrator.sh
index 95fcfddd..95fcfddd 100644
--- a/bin/delete_orchestrator.sh
+++ b/tools/bin/delete_orchestrator.sh
diff --git a/bin/moon_lib_update.sh b/tools/bin/moon_lib_update.sh
index 3925e336..3925e336 100644
--- a/bin/moon_lib_update.sh
+++ b/tools/bin/moon_lib_update.sh
diff --git a/bin/set_auth.src b/tools/bin/set_auth.src
index d955e30b..d955e30b 100644
--- a/bin/set_auth.src
+++ b/tools/bin/set_auth.src
diff --git a/bin/start.sh b/tools/bin/start.sh
index e95ac393..e95ac393 100755
--- a/bin/start.sh
+++ b/tools/bin/start.sh
diff --git a/templates/moon/moon.conf b/tools/moon/moon.conf
index a5a40ad2..a5a40ad2 100644
--- a/templates/moon/moon.conf
+++ b/tools/moon/moon.conf
diff --git a/templates/moon_keystone/Dockerfile b/tools/moon_keystone/Dockerfile
index 2a43bd92..2a43bd92 100644
--- a/templates/moon_keystone/Dockerfile
+++ b/tools/moon_keystone/Dockerfile
diff --git a/templates/moon_keystone/README.md b/tools/moon_keystone/README.md
index 7027324e..7027324e 100644
--- a/templates/moon_keystone/README.md
+++ b/tools/moon_keystone/README.md
diff --git a/templates/moon_keystone/run.sh b/tools/moon_keystone/run.sh
index 2a61901e..2a61901e 100644
--- a/templates/moon_keystone/run.sh
+++ b/tools/moon_keystone/run.sh
diff --git a/tools/moon_kubernetes/README.md b/tools/moon_kubernetes/README.md
new file mode 100644
index 00000000..7f26d276
--- /dev/null
+++ b/tools/moon_kubernetes/README.md
@@ -0,0 +1,82 @@
+# Moon Platform Setup
+## Docker Installation
+```bash
+apt update
+apt install -y docker.io
+```
+
+## K8S Installation
+Choose the right K8S platform
+### Minikube
+```bash
+curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
+chmod +x ./kubectl
+sudo mv ./kubectl /usr/local/bin/kubectl
+curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.21.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
+```
+
+### Kubeadm
+see: https://kubernetes.io/docs/setup/independent/install-kubeadm/
+```bash
+apt-get update && apt-get install -y apt-transport-https
+curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
+cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
+deb http://apt.kubernetes.io/ kubernetes-xenial main
+EOF
+apt-get update
+apt-get install -y kubelet kubeadm kubectl
+```
+
+## Moon Deployment
+### Creation
+Execute the script : `init_k8s.sh`
+```bash
+sudo bash init_k8s.sh
+watch kubectl get po --namespace=kube-system
+```
+
+Wait until all the kubeadm containers are in the `running` state:
+```bash
+watch kubectl get po --namespace=kube-system
+```
+
+You must see something like this:
+
+ $ kubectl get po --namespace=kube-system
+ NAME READY STATUS RESTARTS AGE
+ calico-etcd-7qgjb 1/1 Running 0 1h
+ calico-node-f8zvm 2/2 Running 1 1h
+ calico-policy-controller-59fc4f7888-ns9kv 1/1 Running 0 1h
+ etcd-varuna 1/1 Running 0 1h
+ kube-apiserver-varuna 1/1 Running 0 1h
+ kube-controller-manager-varuna 1/1 Running 0 1h
+ kube-dns-bfbb49cd7-rgqxn 3/3 Running 0 1h
+ kube-proxy-x88wg 1/1 Running 0 1h
+ kube-scheduler-varuna 1/1 Running 0 1h
+
+
+### Execution
+Execute the script : `start_moon.sh`
+```bash
+sudo bash start_moon.sh
+watch kubectl get po --namespace=moon
+```
+
+Wait until all the Moon containers are in the `running` state:
+```bash
+watch kubectl get po --namespace=moon
+```
+
+You must see something like this:
+
+ $ kubectl get po --namespace=moon
+ NAME READY STATUS RESTARTS AGE
+ consul-57b6d66975-9qnfx 1/1 Running 0 52m
+ db-867f9c6666-bq8cf 1/1 Running 0 52m
+ gui-bc9878b58-q288x 1/1 Running 0 51m
+ keystone-7d9cdbb69f-bl6ln 1/1 Running 0 52m
+ manager-5bfbb96988-2nvhd 1/1 Running 0 51m
+ manager-5bfbb96988-fg8vj 1/1 Running 0 51m
+ manager-5bfbb96988-w9wnk 1/1 Running 0 51m
+ orchestrator-65d8fb4574-tnfx2 1/1 Running 0 51m
+ wrapper-astonishing-748b7dcc4f-ngsvp 1/1 Running 0 51m \ No newline at end of file
diff --git a/kubernetes/conf/password_moon.txt b/tools/moon_kubernetes/conf/password_moon.txt
index bb9bcf7d..bb9bcf7d 100644
--- a/kubernetes/conf/password_moon.txt
+++ b/tools/moon_kubernetes/conf/password_moon.txt
diff --git a/kubernetes/conf/password_root.txt b/tools/moon_kubernetes/conf/password_root.txt
index bb9bcf7d..bb9bcf7d 100644
--- a/kubernetes/conf/password_root.txt
+++ b/tools/moon_kubernetes/conf/password_root.txt
diff --git a/kubernetes/conf/ports.conf b/tools/moon_kubernetes/conf/ports.conf
index 487945c0..487945c0 100644
--- a/kubernetes/conf/ports.conf
+++ b/tools/moon_kubernetes/conf/ports.conf
diff --git a/kubernetes/init_k8s.sh b/tools/moon_kubernetes/init_k8s.sh
index 6eb94e78..6eb94e78 100644
--- a/kubernetes/init_k8s.sh
+++ b/tools/moon_kubernetes/init_k8s.sh
diff --git a/kubernetes/start_moon.sh b/tools/moon_kubernetes/start_moon.sh
index 8121e319..8121e319 100644
--- a/kubernetes/start_moon.sh
+++ b/tools/moon_kubernetes/start_moon.sh
diff --git a/kubernetes/templates/consul.yaml b/tools/moon_kubernetes/templates/consul.yaml
index f0fb764e..f0fb764e 100644
--- a/kubernetes/templates/consul.yaml
+++ b/tools/moon_kubernetes/templates/consul.yaml
diff --git a/kubernetes/templates/db.yaml b/tools/moon_kubernetes/templates/db.yaml
index 38418643..38418643 100644
--- a/kubernetes/templates/db.yaml
+++ b/tools/moon_kubernetes/templates/db.yaml
diff --git a/kubernetes/templates/keystone.yaml b/tools/moon_kubernetes/templates/keystone.yaml
index e4218e4c..e4218e4c 100644
--- a/kubernetes/templates/keystone.yaml
+++ b/tools/moon_kubernetes/templates/keystone.yaml
diff --git a/kubernetes/templates/kube-dns.yaml b/tools/moon_kubernetes/templates/kube-dns.yaml
index c8f18fd8..c8f18fd8 100644
--- a/kubernetes/templates/kube-dns.yaml
+++ b/tools/moon_kubernetes/templates/kube-dns.yaml
diff --git a/kubernetes/templates/moon_configuration.yaml b/tools/moon_kubernetes/templates/moon_configuration.yaml
index 3bcaa533..3bcaa533 100644
--- a/kubernetes/templates/moon_configuration.yaml
+++ b/tools/moon_kubernetes/templates/moon_configuration.yaml
diff --git a/kubernetes/templates/moon_gui.yaml b/tools/moon_kubernetes/templates/moon_gui.yaml
index 2d355216..2d355216 100644
--- a/kubernetes/templates/moon_gui.yaml
+++ b/tools/moon_kubernetes/templates/moon_gui.yaml
diff --git a/kubernetes/templates/moon_manager.yaml b/tools/moon_kubernetes/templates/moon_manager.yaml
index 9d4a09a8..9d4a09a8 100644
--- a/kubernetes/templates/moon_manager.yaml
+++ b/tools/moon_kubernetes/templates/moon_manager.yaml
diff --git a/kubernetes/templates/moon_orchestrator.yaml b/tools/moon_kubernetes/templates/moon_orchestrator.yaml
index 419f2d52..419f2d52 100644
--- a/kubernetes/templates/moon_orchestrator.yaml
+++ b/tools/moon_kubernetes/templates/moon_orchestrator.yaml
diff --git a/tools/openstack/README.md b/tools/openstack/README.md
new file mode 100644
index 00000000..8b5d06e5
--- /dev/null
+++ b/tools/openstack/README.md
@@ -0,0 +1,73 @@
+# OpenStack
+## Installation
+For the *Moon* platform, you must have the following OpenStack components installed somewhere:
+- *Nova*, see [Nova install](https://docs.openstack.org/mitaka/install-guide-ubuntu/nova-controller-install.html)
+- *Glance*, see [Glance install](https://docs.openstack.org/glance/pike/install/)
+- *Keystone* is automatically installed and configured in the Moon platform.
+After the Moon platform installation, the Keystone server will be available
+at: `http://localhost:30005 or http://\<servername\>:30005`
+
+You can also use your own Keystone server if you want.
+
+## Configuration
+Before updating the configuration of the OpenStack platform, check that the platform
+is working without Moon, use the following commands:
+```bash
+# set authentication
+openstack endpoint list
+openstack user list
+openstack server list
+```
+
+In order to connect the OpenStack platform with the Moon platform, you must update some
+configuration files in Nova and Glance:
+- `/etc/nova/policy.json`
+- `/etc/glance/policy.json`
+
+In some installed platform, the `/etc/nova/policy.json` can be absent so you have
+to create one. You can find example files in those directory:
+- `${MOON}/tools/openstack/nova/policy.json`
+- `${MOON}/tools/openstack/glance/policy.json`
+
+Each line is mapped to an OpenStack API interface, for example, the following line
+allows the user to get details for every virtual machines in the cloud
+(the corresponding shell command is `openstack server list`):
+
+ "os_compute_api:servers:detail": "",
+
+This lines indicates that there is no special authorisation to use this API,
+every users can use it. If you want that the Moon platform handles that authorisation,
+update this line with:
+
+ "os_compute_api:servers:detail": "http://my_hostname:31001/authz"
+
+1) by replacing `my_hostname` with the hostname (or the IP address) of the Moon platform.
+2) by updating the TCP port (default: 31001) with the good one.
+
+To find this TCP port, use the following command:
+
+ $ kubectl get services -n moon | grep wrapper | cut -d ":" -f 2 | cut -d " " -f 1
+ 31002/TCP
+
+## Tests
+Here is a shell script to authenticate to the OpenStack platform as `admin`:
+```bash
+export OS_USERNAME=admin
+export OS_PASSWORD=p4ssw0rd
+export OS_REGION_NAME=Orange
+export OS_TENANT_NAME=admin
+export OS_AUTH_URL=http://moon_hostname:30006/v3
+export OS_DOMAIN_NAME=Default
+export OS_IDENTITY_API_VERSION=3
+```
+
+For the `demo_user`, use:
+```bash
+export OS_USERNAME=demo_user
+export OS_PASSWORD=your_secret_password
+export OS_REGION_NAME=Orange
+export OS_TENANT_NAME=demo
+export OS_AUTH_URL=http://moon_hostname:30006/v3
+export OS_DOMAIN_NAME=Default
+export OS_IDENTITY_API_VERSION=3
+```
diff --git a/templates/openstack/glance/policy.json b/tools/openstack/glance/policy.json
index 5505f67f..5505f67f 100644
--- a/templates/openstack/glance/policy.json
+++ b/tools/openstack/glance/policy.json
diff --git a/templates/openstack/nova/policy.json b/tools/openstack/nova/policy.json
index 29763ce3..29763ce3 100644
--- a/templates/openstack/nova/policy.json
+++ b/tools/openstack/nova/policy.json