Merge "Add user_id in profile resource."
This commit is contained in:
@@ -39,6 +39,8 @@ class Profile(resource.Resource):
|
|||||||
type = resource.Body('type')
|
type = resource.Body('type')
|
||||||
#: The ID of the project this profile belongs to.
|
#: The ID of the project this profile belongs to.
|
||||||
project_id = resource.Body('project')
|
project_id = resource.Body('project')
|
||||||
|
#: The ID of the user who created this profile.
|
||||||
|
user_id = resource.Body('user')
|
||||||
#: The spec of the profile.
|
#: The spec of the profile.
|
||||||
spec = resource.Body('spec', type=dict)
|
spec = resource.Body('spec', type=dict)
|
||||||
#: A collection of key-value pairs that are attached to the profile.
|
#: A collection of key-value pairs that are attached to the profile.
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ FAKE = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
'project': '42d9e9663331431f97b75e25136307ff',
|
'project': '42d9e9663331431f97b75e25136307ff',
|
||||||
|
'user': '3747afc360b64702a53bdd64dc1b8976',
|
||||||
'type': 'os.nova.server',
|
'type': 'os.nova.server',
|
||||||
'created_at': '2015-10-10T12:46:36.000000',
|
'created_at': '2015-10-10T12:46:36.000000',
|
||||||
'updated_at': '2016-10-10T12:46:36.000000',
|
'updated_at': '2016-10-10T12:46:36.000000',
|
||||||
@@ -64,6 +65,7 @@ class TestProfile(testtools.TestCase):
|
|||||||
self.assertEqual(FAKE['metadata'], sot.metadata)
|
self.assertEqual(FAKE['metadata'], sot.metadata)
|
||||||
self.assertEqual(FAKE['spec'], sot.spec)
|
self.assertEqual(FAKE['spec'], sot.spec)
|
||||||
self.assertEqual(FAKE['project'], sot.project_id)
|
self.assertEqual(FAKE['project'], sot.project_id)
|
||||||
|
self.assertEqual(FAKE['user'], sot.user_id)
|
||||||
self.assertEqual(FAKE['type'], sot.type)
|
self.assertEqual(FAKE['type'], sot.type)
|
||||||
self.assertEqual(FAKE['created_at'], sot.created_at)
|
self.assertEqual(FAKE['created_at'], sot.created_at)
|
||||||
self.assertEqual(FAKE['updated_at'], sot.updated_at)
|
self.assertEqual(FAKE['updated_at'], sot.updated_at)
|
||||||
|
|||||||
Reference in New Issue
Block a user