Merge "Add a fields meta_data to result of Senlin API"

This commit is contained in:
Zuul 2019-09-03 02:34:56 +00:00 committed by Gerrit Code Review
commit ca780d3bb8
2 changed files with 10 additions and 1 deletions

View File

@ -52,3 +52,5 @@ class Event(resource.Resource):
#: A string description of the reason that brought the object into its
#: current status.
status_reason = resource.Body('status_reason')
#: The metadata of an event object.
meta_data = resource.Body('meta_data')

View File

@ -27,7 +27,13 @@ FAKE = {
'status': 'START',
'status_reason': 'The action was abandoned.',
'timestamp': '2016-10-10T12:46:36.000000',
'user': '5e5bf8027826429c96af157f68dc9072'
'user': '5e5bf8027826429c96af157f68dc9072',
'meta_data': {
"action": {
"created_at": "2019-07-13T13:18:18Z",
"outputs": {}
}
}
}
@ -58,3 +64,4 @@ class TestEvent(base.TestCase):
self.assertEqual(FAKE['status_reason'], sot.status_reason)
self.assertEqual(FAKE['timestamp'], sot.generated_at)
self.assertEqual(FAKE['user'], sot.user_id)
self.assertEqual(FAKE['meta_data'], sot.meta_data)