Skip to content

Commit 44796b2

Browse files
committed
Add user_id in resource class Policy
This patch supports user_id in resource classs Policy. Change-Id: If088bf2e606b6bd74e520ff11b9ad2e1d97f5773 Partial-Bug: #1650120
1 parent 28922b3 commit 44796b2

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

openstack/cluster/v1/policy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class Policy(resource.Resource):
3939
type = resource.Body('type')
4040
#: The ID of the project this policy belongs to.
4141
project_id = resource.Body('project')
42+
#: The ID of the user who created this policy.
43+
user_id = resource.Body('user')
4244
#: The timestamp when the policy is created.
4345
created_at = resource.Body('created_at')
4446
#: The timestamp when the policy was last updated.

openstack/tests/unit/cluster/v1/test_policy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
}
3333
},
3434
'project': '42d9e9663331431f97b75e25136307ff',
35+
'user': '3747afc360b64702a53bdd64dc1b8976',
3536
'type': 'senlin.policy.deletion-1.0',
3637
'created_at': '2015-10-10T12:46:36.000000',
3738
'updated_at': '2016-10-10T12:46:36.000000',
@@ -62,6 +63,7 @@ def test_instantiate(self):
6263
self.assertEqual(FAKE['name'], sot.name)
6364
self.assertEqual(FAKE['spec'], sot.spec)
6465
self.assertEqual(FAKE['project'], sot.project_id)
66+
self.assertEqual(FAKE['user'], sot.user_id)
6567
self.assertEqual(FAKE['data'], sot.data)
6668
self.assertEqual(FAKE['created_at'], sot.created_at)
6769
self.assertEqual(FAKE['updated_at'], sot.updated_at)

0 commit comments

Comments
 (0)