diff options
author | 2017-07-26 08:55:58 +0200 | |
---|---|---|
committer | 2017-07-26 08:55:58 +0200 | |
commit | 00bfa61e3a3cd0fef6038ba297b92f6bc3f6b6c7 (patch) | |
tree | fe81ee751616e57da745b90900ad3e43d150c2a1 /moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_10.py | |
parent | c6cbfea94f51536b11e46bfe7053e1fb96c0a968 (diff) |
Delete test data from repository.
Change-Id: Ie3da4f813a50df34b64e2d2a7d26e737720c98a6
Diffstat (limited to 'moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_10.py')
-rw-r--r-- | moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_10.py | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_10.py b/moonv4/tests/12_tenant_scalability/scenario/50/rbac_50_tenant_10.py deleted file mode 100644 index 9914e565..00000000 --- a/moonv4/tests/12_tenant_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"}, - ) - }, - ) |