aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4/tests/21_slave_scalability
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2017-07-26 08:55:58 +0200
committerasteroide <thomas.duval@orange.com>2017-07-26 08:55:58 +0200
commit00bfa61e3a3cd0fef6038ba297b92f6bc3f6b6c7 (patch)
treefe81ee751616e57da745b90900ad3e43d150c2a1 /moonv4/tests/21_slave_scalability
parentc6cbfea94f51536b11e46bfe7053e1fb96c0a968 (diff)
Delete test data from repository.
Change-Id: Ie3da4f813a50df34b64e2d2a7d26e737720c98a6
Diffstat (limited to 'moonv4/tests/21_slave_scalability')
-rw-r--r--moonv4/tests/21_slave_scalability/Vagrantfile32
-rw-r--r--moonv4/tests/21_slave_scalability/exec.sh25
-rw-r--r--moonv4/tests/21_slave_scalability/exec_varuna.sh47
-rw-r--r--moonv4/tests/21_slave_scalability/master.sh57
-rw-r--r--moonv4/tests/21_slave_scalability/run.sh21
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_01.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_02.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_03.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_04.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_05.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_06.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_07.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_08.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_09.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_10.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_01.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_02.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_03.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_04.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_05.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_06.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_07.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_08.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_09.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_10.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_01.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_02.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_03.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_04.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_05.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_06.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_07.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_08.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_09.py89
-rw-r--r--moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_10.py89
-rw-r--r--moonv4/tests/21_slave_scalability/slave.sh54
36 files changed, 0 insertions, 2906 deletions
diff --git a/moonv4/tests/21_slave_scalability/Vagrantfile b/moonv4/tests/21_slave_scalability/Vagrantfile
deleted file mode 100644
index dee19395..00000000
--- a/moonv4/tests/21_slave_scalability/Vagrantfile
+++ /dev/null
@@ -1,32 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-Vagrant.configure("2") do |config|
- config.vm.box = "ubuntu/xenial64"
-
- # Create a private network, which allows host-only access to the machine
- # using a specific IP.
- # config.vm.network "private_network", ip: "192.168.33.10"
-
- config.vm.provider "virtualbox" do |vb|
- # # Display the VirtualBox GUI when booting the machine
- # vb.gui = true
- #
- # # Customize the amount of memory on the VM:
- vb.memory = "4096"
- vb.cpus = "1"
- end
-
- config.vm.define "master" do |master|
- master.vm.box = "ubuntu/xenial64"
- master.vm.provision "shell", path: "master.sh"
- master.vm.network "private_network", ip: "192.168.33.10", virtualbox__intnet: "internal"
- end
-
- config.vm.define "slave1" do |slave1|
- slave1.vm.box = "ubuntu/xenial64"
- slave1.vm.provision "shell", path: "slave.sh slave1"
- slave1.vm.network "private_network", ip: "192.168.33.11", virtualbox__intnet: "internal"
- end
-
-end
diff --git a/moonv4/tests/21_slave_scalability/exec.sh b/moonv4/tests/21_slave_scalability/exec.sh
deleted file mode 100644
index e41e178b..00000000
--- a/moonv4/tests/21_slave_scalability/exec.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env bash
-
-HOST=varuna
-
-TEST_SCRIPT="${MOON_HOME}/moon_interface/tests/apitests/set_authz.py"
-POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
-
-RESULT_DIR=${MOON_HOME}/tests/21_slave_scalability/${HOST}
-ARGS="--host=127.0.0.1 --port=38100 --limit=100 -t";
-
-mkdir -p ${RESULT_DIR} 2>/dev/null
-
-CPT="01 02 03 04 05 06 07 08 09 10"
-
-SC=scenario/10/rbac_10_tenant_01.py
-python3 ${POPULATE_SCRIPT} ${SC}
-
-for REQ in 01 02 03 04 05 06 07 08 09 10;
-do
- python3 ${TEST_SCRIPT} ${ARGS} --pdp pdp01 --request-per-second ${REQ} --write="${RESULT_DIR}/data_master_${REQ}.json" ${SC}
-
- ARGS="--host=127.0.0.1 --port=38101 --limit=100 -t";
- python3 ${TEST_SCRIPT} ${ARGS} --pdp pdp01 --request-per-second ${REQ} --write="${RESULT_DIR}/data_slave_${REQ}.json" ${SC}
-done
-
diff --git a/moonv4/tests/21_slave_scalability/exec_varuna.sh b/moonv4/tests/21_slave_scalability/exec_varuna.sh
deleted file mode 100644
index c2f0ac33..00000000
--- a/moonv4/tests/21_slave_scalability/exec_varuna.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env bash
-
-HOST_MASTER=varuna
-PORT_MASTER=38001
-HOST_SLAVE=172.18.0.11
-PORT_SLAVE=38001
-
-TEST_SCRIPT="${MOON_HOME}/moon_interface/tests/apitests/set_authz.py"
-POPULATE_SCRIPT=${MOON_HOME}/moon_interface/tests/apitests/populate_default_values.py
-
-RESULT_DIR=${MOON_HOME}/tests/21_slave_scalability/${HOST_MASTER}_${HOST_SLAVE}
-ARGS="--limit=100";
-
-mkdir -p ${RESULT_DIR} 2>/dev/null
-
-CPT="01 02 03 04 05 06 07 08 09 10"
-
-SC=scenario/10/rbac_10_tenant_01.py
-python3 ${POPULATE_SCRIPT} ${SC}
-
-#cd ${MOON_HOME}
-
-for REQ in 01 02 03 04 05 06 07 08 09 10;
-do
-
-# ${MOON_HOME}/bin/start.sh &
-#
-# echo "waiting for Orchestrator..."
-# echo -e "\033[35m"
-# sed '/Starting MQ server with topic: orchestrator/q' <(tail -f /tmp/orchestrator.log)
-# echo -e "\033[m"
-
- python3 ${TEST_SCRIPT} --host=${HOST_SLAVE} --port=${PORT_SLAVE} ${ARGS} --pdp pdp01 --request-per-second 5 --write="${RESULT_DIR}/data_slave_05_${REQ}.json" ${SC}
-# python3 ../../moon_interface/tests/apitests/plot_json.py latency "${RESULT_DIR}/data_slave_05_${REQ}.json" -w
-
-# kill $(cat moon_orchestrator.pid)
-#
-# echo "waiting for Orchestrator..."
-# echo -e "\033[35m"
-# sed '/Moon orchestrator: offline/q' <(tail -f /tmp/orchestrator.log)
-# echo -e "\033[m"
-
- echo ================================= Restart Moon =================================
- read A
-
-done
-
diff --git a/moonv4/tests/21_slave_scalability/master.sh b/moonv4/tests/21_slave_scalability/master.sh
deleted file mode 100644
index 3799d631..00000000
--- a/moonv4/tests/21_slave_scalability/master.sh
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env bash
-
-apt-get update
-apt-get install -y python3-dev python3-pip git
-pip3 install pip --upgrade
-echo 127.0.0.1 messenger db keystone | tee -a /etc/hosts
-apt-get install -y apt-transport-https ca-certificates curl software-properties-common
-apt-get update
-
-curl -sSL https://get.docker.com | sh
-docker run hello-world
-groupadd docker
-gpasswd -a ${USER} docker
-service docker restart
-
-cd
-git clone https://git.opnfv.org/moon
-cd moon/moonv4
-export MOON_HOME=$(pwd)
-mkdir /etc/moon
-cp -r $(pwd)/moon_orchestrator/conf/* /etc/moon/
-cp /vagrant/conf/moon_master.conf /et/moon/moon.conf
-
-docker network create -d bridge --subnet=172.18.0.0/16 --gateway=172.18.0.1 moon
-#docker load -i /vagrant/keystone.tar
-
-#docker run -dti --net=moon --hostname messenger --name messenger --link messenger:messenger -e RABBITMQ_DEFAULT_USER=moon -e RABBITMQ_DEFAULT_PASS=p4sswOrd1 -e RABBITMQ_NODENAME=rabbit@messenger -e RABBITMQ_DEFAULT_VHOST=moon -p 5671:5671 -p 5672:5672 rabbitmq:3-management
-#docker run -dti --net=moon --hostname db --name db -e MYSQL_ROOT_PASSWORD=p4sswOrd1 -e MYSQL_DATABASE=moon -e MYSQL_USER=moon -e MYSQL_PASSWORD=p4sswOrd1 -p 3306:3306 mysql:latest
-docker pull rabbitmq:3-management
-docker pull mysql:latest
-docker pull asteroide/keystone_mitaka:latest
-
-bash ${MOON_HOME}/bin/build_all.sh
-
-pip3 install pip --upgrade
-source ${MOON_HOME}/bin/build_all.sh
-pip3 install ${MOON_HOME}/moon_orchestrator/dist/moon_db-0.1.0.tar.gz --upgrade
-pip3 install ${MOON_HOME}/moon_orchestrator/dist/moon_utilities-0.1.0.tar.gz --upgrade
-
-cd ${MOON_HOME}/moon_orchestrator
-pip3 install -r requirements.txt --upgrade
-pip3 install . --upgrade
-
-#echo "waiting for Database (it may take time)..."
-#echo -e "\033[35m"
-#sed '/ready for connections/q' <(docker logs db -f)
-#echo -e "\033[m"
-#
-#echo "waiting for Messenger (it may take time)..."
-#echo -e "\033[35m"
-#sed '/Server startup complete;/q' <(docker logs messenger -f)
-#echo -e "\033[m"
-#
-#
-#docker run -dti --net moon --name keystone --hostname=keystone -e DB_HOST=db -e DB_PASSWORD_ROOT=p4sswOrd1 -p 35357:35357 -p 5000:5000 keystone_mitaka:latest
-#
-#echo moon_orchestrator
diff --git a/moonv4/tests/21_slave_scalability/run.sh b/moonv4/tests/21_slave_scalability/run.sh
deleted file mode 100644
index a46efdc5..00000000
--- a/moonv4/tests/21_slave_scalability/run.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-
-docker run -dti --net=moon --hostname messenger --name messenger --link messenger:messenger -e RABBITMQ_DEFAULT_USER=moon -e RABBITMQ_DEFAULT_PASS=p4sswOrd1 -e RABBITMQ_NODENAME=rabbit@messenger -e RABBITMQ_DEFAULT_VHOST=moon -p 5671:5671 -p 5672:5672 rabbitmq:3-management
-docker run -dti --net=moon --hostname db --name db -e MYSQL_ROOT_PASSWORD=p4sswOrd1 -e MYSQL_DATABASE=moon -e MYSQL_USER=moon -e MYSQL_PASSWORD=p4sswOrd1 -p 3306:3306 mysql:latest
-
-echo "waiting for Database (it may take time)..."
-echo -e "\033[35m"
-sed '/ready for connections/q' <(docker logs db -f)
-echo -e "\033[m"
-
-echo "waiting for Messenger (it may take time)..."
-echo -e "\033[35m"
-sed '/Server startup complete;/q' <(docker logs messenger -f)
-echo -e "\033[m"
-
-
-docker run -dti --net moon --name keystone --hostname=keystone -e DB_HOST=db -e DB_PASSWORD_ROOT=p4sswOrd1 -p 35357:35357 -p 5000:5000 asteroide/keystone_mitaka:latest
-
-moon_db_manager up
-
-moon_orchestrator
diff --git a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_01.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_01.py
deleted file mode 100644
index b591b532..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_01.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp01"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 5
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_02.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_02.py
deleted file mode 100644
index 4ca48d25..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_02.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp02"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 5
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_03.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_03.py
deleted file mode 100644
index eb424e79..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_03.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp03"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 5
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_04.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_04.py
deleted file mode 100644
index 5fb860f5..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_04.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp04"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 5
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_05.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_05.py
deleted file mode 100644
index 09947491..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_05.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp05"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 5
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_06.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_06.py
deleted file mode 100644
index a3f66c4f..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_06.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp06"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 5
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_07.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_07.py
deleted file mode 100644
index 14d75d57..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_07.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp07"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 5
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_08.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_08.py
deleted file mode 100644
index a658bb0c..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_08.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp08"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 5
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_09.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_09.py
deleted file mode 100644
index 96c3f61a..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_09.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp09"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 5
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_10.py b/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_10.py
deleted file mode 100644
index bebdee23..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/10/rbac_10_tenant_10.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp10"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 10
-OBJECT_NUMBER = 10
-ROLE_NUMBER = 5
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_01.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_01.py
deleted file mode 100644
index 4282d4d0..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_01.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp01"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 20
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_02.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_02.py
deleted file mode 100644
index e110dd5c..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_02.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp02"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 20
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_03.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_03.py
deleted file mode 100644
index dc2195e1..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_03.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp03"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 20
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_04.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_04.py
deleted file mode 100644
index 6e3e86ce..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_04.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp04"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 20
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_05.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_05.py
deleted file mode 100644
index 266e3bc0..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_05.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp05"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 20
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_06.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_06.py
deleted file mode 100644
index b1227932..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_06.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp06"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 20
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_07.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_07.py
deleted file mode 100644
index 794331b6..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_07.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp07"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 20
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_08.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_08.py
deleted file mode 100644
index 5eab408c..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_08.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp08"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 20
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_09.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_09.py
deleted file mode 100644
index 2721c092..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_09.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp09"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 20
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_10.py b/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_10.py
deleted file mode 100644
index bcad20f7..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/100/rbac_100_tenant_10.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp10"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 100
-OBJECT_NUMBER = 100
-ROLE_NUMBER = 20
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_01.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_01.py
deleted file mode 100644
index 9917a970..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_01.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp01"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_02.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_02.py
deleted file mode 100644
index 9b040abd..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_02.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp02"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_03.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_03.py
deleted file mode 100644
index 4d15a6ee..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_03.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp03"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_04.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_04.py
deleted file mode 100644
index b5fba2f0..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_04.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp04"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_05.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_05.py
deleted file mode 100644
index f0f21cfe..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_05.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp05"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_06.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_06.py
deleted file mode 100644
index 7ab5ecc0..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_06.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp06"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_07.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_07.py
deleted file mode 100644
index 53dcb5fc..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_07.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp07"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_08.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_08.py
deleted file mode 100644
index 4d70e179..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_08.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp08"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_09.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_09.py
deleted file mode 100644
index 5ece9e9d..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_09.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp09"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_10.py b/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_10.py
deleted file mode 100644
index 9914e565..00000000
--- a/moonv4/tests/21_slave_scalability/scenario/50/rbac_50_tenant_10.py
+++ /dev/null
@@ -1,89 +0,0 @@
-import random
-
-pdp_name = "pdp10"
-policy_name = "RBAC policy example"
-model_name = "RBAC"
-policy_genre = "authz"
-
-SUBJECT_NUMBER = 50
-OBJECT_NUMBER = 50
-ROLE_NUMBER = 10
-
-subjects = {}
-for _id in range(SUBJECT_NUMBER):
- subjects["user{}".format(_id)] = ""
-objects = {}
-for _id in range(OBJECT_NUMBER):
- objects["vm{}".format(_id)] = ""
-actions = {
- "start": "",
- "stop": "",
- "pause": "",
- "unpause": "",
- "destroy": "",
-}
-
-subject_categories = {"role": "", }
-object_categories = {"id": "", }
-action_categories = {"action-type": "", }
-
-subject_data = {"role": {"admin": "", "*": ""}}
-for _id in range(ROLE_NUMBER):
- subject_data["role"]["role{}".format(_id)] = ""
-object_data = {"id": {"*": ""}}
-for _id in range(OBJECT_NUMBER):
- object_data["id"]["vm{}".format(_id)] = ""
-action_data = {"action-type": {
- "vm-read": "",
- "vm-write": "",
- "*": ""
-}}
-
-subject_assignments = {}
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- subject_assignments["user{}".format(_id)] = [{"role": _role}, {"role": "*"}]
-object_assignments = {"vm0": ({"id": "vm0"}, {"id": "*"}), "vm1": ({"id": "vm1"}, {"id": "*"})}
-for _id in range(OBJECT_NUMBER):
- object_assignments["vm{}".format(_id)] = [{"id": "vm{}".format(_id)}, {"id": "*"}]
-action_assignments = {
- "start": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "stop": ({"action-type": "vm-write"}, {"action-type": "*"}),
- "pause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "unpause": ({"action-type": "vm-read"}, {"action-type": "*"}),
- "destroy": ({"action-type": "vm-write"}, {"action-type": "*"}),
-}
-
-meta_rule = {
- "rbac": {"id": "", "value": ("role", "id", "action-type")},
-}
-
-rules = {
- "rbac": [
- {
- "rule": ("admin", "vm0", "vm-read"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- {
- "rule": ("admin", "vm0", "vm-write"),
- "instructions": (
- {"decision": "grant"},
- )
- },
- ]
-}
-
-for _id in range(SUBJECT_NUMBER):
- _role = "role{}".format(random.randrange(ROLE_NUMBER))
- _vm = "vm{}".format(random.randrange(OBJECT_NUMBER))
- _action = random.choice(list(action_data['action-type'].keys()))
- rules["rbac"].append(
- {
- "rule": (_role, _vm, _action),
- "instructions": (
- {"decision": "grant"},
- )
- },
- )
diff --git a/moonv4/tests/21_slave_scalability/slave.sh b/moonv4/tests/21_slave_scalability/slave.sh
deleted file mode 100644
index 26a97fd0..00000000
--- a/moonv4/tests/21_slave_scalability/slave.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/env bash
-
-SLAVE_NAME=$1
-
-apt-get update
-apt-get install -y python3-dev python3-pip git
-pip3 install pip --upgrade
-echo 127.0.0.1 messenger db keystone | tee -a /etc/hosts
-apt-get install -y apt-transport-https ca-certificates curl software-properties-common
-apt-get update
-
-curl -sSL https://get.docker.com | sh
-docker run hello-world
-groupadd docker
-gpasswd -a ${USER} docker
-service docker restart
-
-cd
-git clone https://git.opnfv.org/moon
-cd moon/moonv4
-export MOON_HOME=$(pwd)
-sudo ln -s $(pwd)/moon_orchestrator/conf /etc/moon
-sudo cp /vagrant/conf/moon_${SLAVE_NAME}.conf /et/moon/moon.conf
-
-docker network create -d bridge --subnet=172.18.0.0/16 --gateway=172.18.0.1 moon
-docker load -i /vagrant/keystone.tar
-
-docker run -dti --net=moon --hostname messenger --name messenger --link messenger:messenger -e RABBITMQ_DEFAULT_USER=moon -e RABBITMQ_DEFAULT_PASS=p4sswOrd1 -e RABBITMQ_NODENAME=rabbit@messenger -e RABBITMQ_DEFAULT_VHOST=moon -p 5671:5671 -p 5672:5672 rabbitmq:3-management
-docker run -dti --net=moon --hostname db --name db -e MYSQL_ROOT_PASSWORD=p4sswOrd1 -e MYSQL_DATABASE=moon -e MYSQL_USER=moon -e MYSQL_PASSWORD=p4sswOrd1 -p 3306:3306 mysql:latest
-
-bash ${MOON_HOME}/bin/build_all.sh
-
-cd ${MOON_HOME}/moon_orchestrator
-pip3 install pip --upgrade
-source ${MOON_HOME}/bin/build_all.sh
-pip3 install -r requirements.txt --upgrade
-pip3 install ${MOON_HOME}/moon_orchestrator/dist/moon_db-0.1.0.tar.gz --upgrade
-pip3 install ${MOON_HOME}/moon_orchestrator/dist/moon_utilities-0.1.0.tar.gz --upgrade
-pip3 install . --upgrade
-
-echo "waiting for Database (it may take time)..."
-echo -e "\033[35m"
-sed '/ready for connections/q' <(docker logs db -f)
-echo -e "\033[m"
-
-echo "waiting for Messenger (it may take time)..."
-echo -e "\033[35m"
-sed '/Server startup complete;/q' <(docker logs messenger -f)
-echo -e "\033[m"
-
-
-docker run -dti --net moon --name keystone --hostname=keystone -e DB_HOST=db -e DB_PASSWORD_ROOT=p4sswOrd1 -p 35357:35357 -p 5000:5000 keystone_mitaka:latest
-
-echo moon_orchestrator