Add launched_at to instance API object and update doc
Change-Id: I07218127daae56e8aedd5a053f6784e813cc6555
This commit is contained in:
parent
a55158ef3b
commit
3b38be40e0
api-ref/source
doc/api_samples/instances
nimble/api/controllers/v1
@ -144,6 +144,7 @@ Response
|
||||
- user_id: user_id_body
|
||||
- updated_at: updated_at
|
||||
- created_at: created_at
|
||||
- launched_at: launched_at
|
||||
|
||||
**Example Detailed list of Instances: JSON response**
|
||||
|
||||
@ -192,6 +193,7 @@ Response
|
||||
- user_id: user_id_body
|
||||
- updated_at: updated_at
|
||||
- created_at: created_at
|
||||
- launched_at: launched_at
|
||||
|
||||
**Example Instance Details: JSON response**
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
"power_state": "power on",
|
||||
"project_id": "c18e8a1a870d4c08a0b51ced6e0b6459",
|
||||
"status": "building",
|
||||
"launched_at" : null,
|
||||
"updated_at": "2016-10-17T04:12:44+00:00",
|
||||
"user_id": "cdbf77d47f1d4d04ad9b7ff62b672467",
|
||||
"uuid": "f978ef48-d4af-4dad-beec-e6174309bc71"
|
||||
|
@ -37,8 +37,9 @@
|
||||
"project_id": "c18e8a1a870d4c08a0b51ced6e0b6459",
|
||||
"status": "building",
|
||||
"updated_at": "2016-10-17T04:12:44+00:00",
|
||||
"launched_at": null,
|
||||
"user_id": "cdbf77d47f1d4d04ad9b7ff62b672467",
|
||||
"uuid": "f978ef48-d4af-4dad-beec-e6174309bc71"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import datetime
|
||||
|
||||
import jsonschema
|
||||
from oslo_log import log
|
||||
import pecan
|
||||
@ -193,6 +195,9 @@ class Instance(base.APIBase):
|
||||
links = wsme.wsattr([link.Link], readonly=True)
|
||||
"""A list containing a self link"""
|
||||
|
||||
launched_at = datetime.datetime
|
||||
"""The UTC date and time of the instance launched"""
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super(Instance, self).__init__(**kwargs)
|
||||
self.fields = []
|
||||
|
Loading…
Reference in New Issue
Block a user