diff --git a/openstack/identity/v3/role.py b/openstack/identity/v3/role.py index ddca5cd05..283847edc 100644 --- a/openstack/identity/v3/role.py +++ b/openstack/identity/v3/role.py @@ -35,5 +35,8 @@ class Role(resource.Resource): description = resource.Body('description') #: References the domain ID which owns the role. *Type: string* domain_id = resource.Body('domain_id') + #: The resource options for the role. Available resource options are + #: immutable. + options = resource.Body('options', type=dict) #: The links for the service resource. links = resource.Body('links') diff --git a/openstack/tests/unit/identity/v3/test_role.py b/openstack/tests/unit/identity/v3/test_role.py index c9cc49c92..d8d6b8601 100644 --- a/openstack/tests/unit/identity/v3/test_role.py +++ b/openstack/tests/unit/identity/v3/test_role.py @@ -21,6 +21,7 @@ EXAMPLE = { 'name': '2', 'description': 'test description for role', 'domain_id': 'default', + 'options': {'immutable': True}, } @@ -54,3 +55,4 @@ class TestRole(base.TestCase): self.assertEqual(EXAMPLE['name'], sot.name) self.assertEqual(EXAMPLE['description'], sot.description) self.assertEqual(EXAMPLE['domain_id'], sot.domain_id) + self.assertEqual(EXAMPLE['options'], sot.options) diff --git a/releasenotes/notes/add-identity-role-options-property-5d99d3fd909f01eb.yaml b/releasenotes/notes/add-identity-role-options-property-5d99d3fd909f01eb.yaml new file mode 100644 index 000000000..8b7e7eaf9 --- /dev/null +++ b/releasenotes/notes/add-identity-role-options-property-5d99d3fd909f01eb.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Add support for `options` property for roles in identity.