Add 'finish_time' to container action

Change-Id: I30cda2c12fa5c0df2d6835938bbc4fed820ee881
This commit is contained in:
Hongbin Lu 2019-04-14 20:14:57 +00:00
parent 8ce2a4f3a9
commit 8d6ca1ed36
8 changed files with 17 additions and 5 deletions

View File

@ -26,7 +26,7 @@
test-config:
$TEMPEST_CONFIG:
container_service:
min_microversion: 1.32
min_microversion: 1.33
devstack_services:
tempest: true
devstack_plugins:

View File

@ -14,5 +14,6 @@
"project_id": "853719b303ef4858a195535eb520e58d",
"request_id": "req-3293a3f1-b44c-4609-b8d2-d81b105636b8",
"start_time": "2018-03-04T17:02:54.000000",
"finish_time": "2018-03-04T17:02:57.000000",
"user_id": "22e81669093742b7a74b1d715a9a5813"
}

View File

@ -7,6 +7,7 @@
"project_id": "853719b303ef4858a195535eb520e58d",
"request_id": "req-25517360-b757-47d3-be45-0e8d2a01b36a",
"start_time": "2018-03-04T19:48:49.000000",
"finish_time": "2018-03-04T19:48:55.000000",
"user_id": "22e81669093742b7a74b1d715a9a5813"
},
{
@ -16,6 +17,7 @@
"project_id": "853719b303ef4858a195535eb520e58d",
"request_id": "req-3293a3f1-b44c-4609-b8d2-d81b105636b8",
"start_time": "2018-03-04T17:02:54.000000",
"finish_time": "2018-03-04T17:02:58.000000",
"user_id": "22e81669093742b7a74b1d715a9a5813"
}
]

View File

@ -20,6 +20,7 @@ from zun.common import utils
_action_keys = (
'action',
'container_uuid',
'finish_time',
'message',
'project_id',
'request_id',

View File

@ -65,10 +65,11 @@ REST_API_VERSION_HISTORY = """REST API Version History:
* 1.30 - Introduce API resource for representing private registry
* 1.31 - Add 'registry_id' to containers
* 1.32 - Make capsule deletion asynchronized
* 1.33 - Add 'finish_time' to container actions
"""
BASE_VER = '1.1'
CURRENT_MAX_VER = '1.32'
CURRENT_MAX_VER = '1.33'
class Version(object):

View File

@ -248,3 +248,10 @@ user documentation.
Make capsule deletion asynchronized.
API request to delete a capsule will return without waiting for the
capsule to be deleted.
1.33
----
Add 'finish_time' to container action resource.
If the action is finished, 'finish_time' shows the finish time.
Otherwise, this field will be None.

View File

@ -26,7 +26,7 @@ from zun.tests.unit.db import base
PATH_PREFIX = '/v1'
CURRENT_VERSION = "container 1.32"
CURRENT_VERSION = "container 1.33"
class FunctionalTest(base.DbTestCase):

View File

@ -28,7 +28,7 @@ class TestRootController(api_base.FunctionalTest):
'default_version':
{'id': 'v1',
'links': [{'href': 'http://localhost/v1/', 'rel': 'self'}],
'max_version': '1.32',
'max_version': '1.33',
'min_version': '1.1',
'status': 'CURRENT'},
'description': 'Zun is an OpenStack project which '
@ -37,7 +37,7 @@ class TestRootController(api_base.FunctionalTest):
'versions': [{'id': 'v1',
'links': [{'href': 'http://localhost/v1/',
'rel': 'self'}],
'max_version': '1.32',
'max_version': '1.33',
'min_version': '1.1',
'status': 'CURRENT'}]}