aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4/tests/01_smpolicy_average_latency/scenario
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/01_smpolicy_average_latency/scenario
parentc6cbfea94f51536b11e46bfe7053e1fb96c0a968 (diff)
Delete test data from repository.
Change-Id: Ie3da4f813a50df34b64e2d2a7d26e737720c98a6
Diffstat (limited to 'moonv4/tests/01_smpolicy_average_latency/scenario')
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_01.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_02.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_03.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_04.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_05.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_06.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_07.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_08.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_09.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_10.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_01.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_02.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_03.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_04.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_05.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_06.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_07.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_08.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_09.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_10.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_01.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_02.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_03.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_04.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_05.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_06.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_07.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_08.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_09.py89
-rw-r--r--moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_10.py89
30 files changed, 0 insertions, 2670 deletions
diff --git a/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_01.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_01.py
deleted file mode 100644
index b591b532..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_02.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_02.py
deleted file mode 100644
index 4ca48d25..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_03.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_03.py
deleted file mode 100644
index eb424e79..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_04.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_04.py
deleted file mode 100644
index 5fb860f5..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_05.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_05.py
deleted file mode 100644
index 09947491..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_06.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_06.py
deleted file mode 100644
index a3f66c4f..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_07.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_07.py
deleted file mode 100644
index 14d75d57..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_08.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_08.py
deleted file mode 100644
index a658bb0c..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_09.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_09.py
deleted file mode 100644
index 96c3f61a..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_10.py b/moonv4/tests/01_smpolicy_average_latency/scenario/10/rbac_10_tenant_10.py
deleted file mode 100644
index bebdee23..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_01.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_01.py
deleted file mode 100644
index 4282d4d0..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_02.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_02.py
deleted file mode 100644
index e110dd5c..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_03.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_03.py
deleted file mode 100644
index dc2195e1..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_04.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_04.py
deleted file mode 100644
index 6e3e86ce..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_05.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_05.py
deleted file mode 100644
index 266e3bc0..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_06.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_06.py
deleted file mode 100644
index b1227932..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_07.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_07.py
deleted file mode 100644
index 794331b6..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_08.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_08.py
deleted file mode 100644
index 5eab408c..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_09.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_09.py
deleted file mode 100644
index 2721c092..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_10.py b/moonv4/tests/01_smpolicy_average_latency/scenario/100/rbac_100_tenant_10.py
deleted file mode 100644
index bcad20f7..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_01.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_01.py
deleted file mode 100644
index 9917a970..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_02.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_02.py
deleted file mode 100644
index 9b040abd..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_03.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_03.py
deleted file mode 100644
index 4d15a6ee..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_04.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_04.py
deleted file mode 100644
index b5fba2f0..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_05.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_05.py
deleted file mode 100644
index f0f21cfe..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_06.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_06.py
deleted file mode 100644
index 7ab5ecc0..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_07.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_07.py
deleted file mode 100644
index 53dcb5fc..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_08.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_08.py
deleted file mode 100644
index 4d70e179..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_09.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_09.py
deleted file mode 100644
index 5ece9e9d..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_10.py b/moonv4/tests/01_smpolicy_average_latency/scenario/50/rbac_50_tenant_10.py
deleted file mode 100644
index 9914e565..00000000
--- a/moonv4/tests/01_smpolicy_average_latency/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"},
- )
- },
- )