From 6d009964d8ec48ca83ed667934d249e4439a5f24 Mon Sep 17 00:00:00 2001 From: Thomas Duval Date: Mon, 12 Mar 2018 14:22:45 +0100 Subject: Fix a bug in policy generation. Change-Id: Id30decb5e8519c091f8eaa95c04c2865fcbd7091 --- tools/policies/generate_opst_policy.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/policies/generate_opst_policy.py b/tools/policies/generate_opst_policy.py index 688c8d46..dd01d1c1 100644 --- a/tools/policies/generate_opst_policy.py +++ b/tools/policies/generate_opst_policy.py @@ -33,11 +33,11 @@ policy = { {"name": "demo", "description": "", "extra": {}, "policies": [{"name": "OpenStack RBAC Policy"}]} ], - "subject_categories": [{ "name":"role", "description": "a role in OpenStack" }], + "subject_categories": [{"name": "role", "description": "a role in OpenStack"}], "subject_data": [ - { "name": "admin", "description": "the admin role", "policy": {"name": "OpenStack RBAC Policy"}, "category": {"name": "role"}}, - { "name": "member", "description": "the member role", "policy": {"name": "OpenStack RBAC Policy"}, "category": {"name": "role"}} + {"name": "admin", "description": "the admin role", "policies": [], "category": {"name": "role"}}, + {"name": "member", "description": "the member role", "policies": [], "category": {"name": "role"}} ], "subject_assignments": [ @@ -45,19 +45,18 @@ policy = { {"subject": {"name": "demo"}, "category": {"name": "role"}, "assignments": [{"name": "member"}]} ], - "objects": [ + "objects": [], + + "object_categories": [{"name": "id", "description": "the UID of each virtual machine"}], + + "object_data": [ { "name": "all_vm", "description": "represents all virtual machines in this project", - "extra": {}, - "policies": [{"name": "OpenStack RBAC Policy"}] - } + "policies": [], + "category": {"name": "id"}}, ], - "object_categories": [{"name": "id", "description": "the UID of each virtual machine"}], - - "object_data": [], - "object_assignments": [], "actions": [], -- cgit 1.2.3-korg