Unify style of 'domain' field

The output of CLI need unify style of 'domain' filed.

Change-Id: I556db6060af4ec480f50ae253eb652b5c42eec27
Partial-Bug: #1703545
This commit is contained in:
liyi 2017-07-11 17:11:09 +08:00
parent 1213ccb00f
commit 4a81b26b09
8 changed files with 16 additions and 0 deletions

View File

@ -44,6 +44,8 @@ class Action(resource.Resource):
user_id = resource.Body('user')
#: The ID of the project this profile belongs to.
project_id = resource.Body('project')
#: The domain ID of the action.
domain_id = resource.Body('domain')
#: Interval in seconds between two consecutive executions.
interval = resource.Body('interval')
#: The time the action was started.

View File

@ -44,6 +44,8 @@ class Node(resource.Resource):
cluster_id = resource.Body('cluster_id')
#: The ID of the profile used by this node.
profile_id = resource.Body('profile_id')
#: The domain ID of the node.
domain_id = resource.Body('domain')
#: The ID of the user who created this node.
user_id = resource.Body('user')
#: The ID of the project this node belongs to.

View File

@ -39,6 +39,8 @@ class Policy(resource.Resource):
type = resource.Body('type')
#: The ID of the project this policy belongs to.
project_id = resource.Body('project')
# The domain ID of the policy.
domain_id = resource.Body('domain')
#: The ID of the user who created this policy.
user_id = resource.Body('user')
#: The timestamp when the policy is created.

View File

@ -39,6 +39,8 @@ class Profile(resource.Resource):
type = resource.Body('type')
#: The ID of the project this profile belongs to.
project_id = resource.Body('project')
#: The domain ID of the profile.
domain_id = resource.Body('domain')
#: The ID of the user who created this profile.
user_id = resource.Body('user')
#: The spec of the profile.

View File

@ -27,6 +27,7 @@ FAKE = {
'owner': None,
'user': '3747afc360b64702a53bdd64dc1b8976',
'project': '42d9e9663331431f97b75e25136307ff',
'domain': '204ccccd267b40aea871750116b5b184',
'interval': -1,
'start_time': 1453414055.48672,
'end_time': 1453414055.48672,
@ -66,6 +67,7 @@ class TestAction(testtools.TestCase):
self.assertEqual(FAKE['owner'], sot.owner_id)
self.assertEqual(FAKE['user'], sot.user_id)
self.assertEqual(FAKE['project'], sot.project_id)
self.assertEqual(FAKE['domain'], sot.domain_id)
self.assertEqual(FAKE['interval'], sot.interval)
self.assertEqual(FAKE['start_time'], sot.start_at)
self.assertEqual(FAKE['end_time'], sot.end_at)

View File

@ -25,6 +25,7 @@ FAKE = {
'metadata': {'key1': 'value1'},
'name': FAKE_NAME,
'profile_id': 'myserver',
'domain': '204ccccd267b40aea871750116b5b184',
'user': '3747afc360b64702a53bdd64dc1b8976',
'project': '42d9e9663331431f97b75e25136307ff',
'index': 1,
@ -57,6 +58,7 @@ class TestNode(testtools.TestCase):
self.assertEqual(FAKE['cluster_id'], sot.cluster_id)
self.assertEqual(FAKE['user'], sot.user_id)
self.assertEqual(FAKE['project'], sot.project_id)
self.assertEqual(FAKE['domain'], sot.domain_id)
self.assertEqual(FAKE['name'], sot.name)
self.assertEqual(FAKE['index'], sot.index)
self.assertEqual(FAKE['role'], sot.role)

View File

@ -32,6 +32,7 @@ FAKE = {
}
},
'project': '42d9e9663331431f97b75e25136307ff',
'domain': '204ccccd267b40aea871750116b5b184',
'user': '3747afc360b64702a53bdd64dc1b8976',
'type': 'senlin.policy.deletion-1.0',
'created_at': '2015-10-10T12:46:36.000000',
@ -63,6 +64,7 @@ class TestPolicy(testtools.TestCase):
self.assertEqual(FAKE['name'], sot.name)
self.assertEqual(FAKE['spec'], sot.spec)
self.assertEqual(FAKE['project'], sot.project_id)
self.assertEqual(FAKE['domain'], sot.domain_id)
self.assertEqual(FAKE['user'], sot.user_id)
self.assertEqual(FAKE['data'], sot.data)
self.assertEqual(FAKE['created_at'], sot.created_at)

View File

@ -33,6 +33,7 @@ FAKE = {
}
},
'project': '42d9e9663331431f97b75e25136307ff',
'domain': '204ccccd267b40aea871750116b5b184',
'user': '3747afc360b64702a53bdd64dc1b8976',
'type': 'os.nova.server',
'created_at': '2015-10-10T12:46:36.000000',
@ -65,6 +66,7 @@ class TestProfile(testtools.TestCase):
self.assertEqual(FAKE['metadata'], sot.metadata)
self.assertEqual(FAKE['spec'], sot.spec)
self.assertEqual(FAKE['project'], sot.project_id)
self.assertEqual(FAKE['domain'], sot.domain_id)
self.assertEqual(FAKE['user'], sot.user_id)
self.assertEqual(FAKE['type'], sot.type)
self.assertEqual(FAKE['created_at'], sot.created_at)