From 9cf728b7c979204310dd783ac3951ad70a4511fb Mon Sep 17 00:00:00 2001 From: stewie925 Date: Fri, 5 Apr 2019 13:18:06 -0700 Subject: [PATCH] Update customer yaml builder Add user-domain property under OS::Keystone::UserRoleAssignment resource. Change-Id: I6f306543a49d39021bdcccf054ad5b90d374daba --- .../rds/services/yaml_customer_builder.py | 1 + orm/tests/unit/rds/services/test_customer_yaml.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/orm/services/resource_distributor/rds/services/yaml_customer_builder.py b/orm/services/resource_distributor/rds/services/yaml_customer_builder.py index e99dd077..3bf01760 100755 --- a/orm/services/resource_distributor/rds/services/yaml_customer_builder.py +++ b/orm/services/resource_distributor/rds/services/yaml_customer_builder.py @@ -129,6 +129,7 @@ def yamlbuilder(alldata, region): resources['resources'][user['id']] = \ {'type': 'OS::Keystone::UserRoleAssignment\n', 'properties': {'user': user['id'], + 'user_domain': domain, 'roles': user_roles}} # create the output for users diff --git a/orm/tests/unit/rds/services/test_customer_yaml.py b/orm/tests/unit/rds/services/test_customer_yaml.py index b035f7f9..b1548e99 100755 --- a/orm/tests/unit/rds/services/test_customer_yaml.py +++ b/orm/tests/unit/rds/services/test_customer_yaml.py @@ -218,11 +218,11 @@ full_yaml_ldap = 'heat_template_version: 2015-1-2\n\ndescription: yaml file' \ '- project: {get_resource: 1e24981a-fa51-11e5-86aa-5e5517507c66}\n ' \ 'role: admin\n - project: ' \ '{get_resource: 1e24981a-fa51-11e5-86aa-5e5517507c66}\n ' \ - 'role: other\n user: userId1\n ' \ + 'role: other\n user_domain: default\n user: userId1\n ' \ 'type: OS::Keystone::UserRoleAssignment\n\n \n ' \ 'userId2:\n properties:\n roles:\n ' \ '- project: {get_resource: 1e24981a-fa51-11e5-86aa-5e5517507c66}\n ' \ - 'role: storage\n user: userId2\n ' \ + 'role: storage\n user_domain: default\n user: userId2\n ' \ 'type: OS::Keystone::UserRoleAssignment\n\n \n ' \ '1e24981a-fa51-11e5-86aa-5e5517507c66:\n properties:\n ' \ 'description: this is a description\n ' \