diff --git a/openstack/identity/v3/role.py b/openstack/identity/v3/role.py index cb3518bbe..76bda233e 100644 --- a/openstack/identity/v3/role.py +++ b/openstack/identity/v3/role.py @@ -32,5 +32,9 @@ class Role(resource.Resource): # Properties #: Unique role name, within the owning domain. *Type: string* name = resource.Body('name') + #: User-facing description of the role. *Type: string* + description = resource.Body('description') + #: References the domain ID which owns the role. *Type: string* + domain_id = resource.Body('domain_id') #: 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 4a67d6dc4..d45f646e1 100644 --- a/openstack/tests/unit/identity/v3/test_role.py +++ b/openstack/tests/unit/identity/v3/test_role.py @@ -19,6 +19,8 @@ EXAMPLE = { 'id': IDENTIFIER, 'links': {'self': 'http://example.com/user1'}, 'name': '2', + 'description': 'test description for role', + 'domain_id': 'default' } @@ -50,3 +52,5 @@ class TestRole(base.TestCase): self.assertEqual(EXAMPLE['id'], sot.id) self.assertEqual(EXAMPLE['links'], sot.links) self.assertEqual(EXAMPLE['name'], sot.name) + self.assertEqual(EXAMPLE['description'], sot.description) + self.assertEqual(EXAMPLE['domain_id'], sot.domain_id) diff --git a/releasenotes/notes/update-role-property-b16e902e913c7b25.yaml b/releasenotes/notes/update-role-property-b16e902e913c7b25.yaml new file mode 100644 index 000000000..c35cec03f --- /dev/null +++ b/releasenotes/notes/update-role-property-b16e902e913c7b25.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Added the newly supported ``description`` parameter and the missing + ``domain_id`` parameter to ``Role`` resource.