Merge "Add 'tty' and 'stdin' to capsule"

This commit is contained in:
Zuul 2019-07-24 12:53:16 +00:00 committed by Gerrit Code Review
commit 418f383d39
8 changed files with 16 additions and 6 deletions

View File

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

View File

@ -310,7 +310,6 @@ class CapsuleController(base.Controller):
container_dict['image_pull_policy'] = (
container_dict.get('image_pull_policy', 'always').lower())
container_dict['status'] = consts.CREATING
container_dict['interactive'] = True
container_dict['capsule_id'] = new_capsule.id
container_dict['restart_policy'] = container_restart_policy
if container_spec in init_containers_spec:

View File

@ -465,6 +465,8 @@ capsule_containers_list = {
'env': environment,
'workDir': workdir,
'imagePullPolicy': image_pull_policy,
'stdin': boolean,
'tty': boolean,
},
'additionalProperties': False,
'required': ['image']

View File

@ -69,10 +69,11 @@ REST_API_VERSION_HISTORY = """REST API Version History:
* 1.34 - Add 'init_containers' to capsule
* 1.35 - Support exposing container ports in capsule
* 1.36 - Add 'tty' to container
* 1.37 - Add 'tty' and 'stdin' to capsule
"""
BASE_VER = '1.1'
CURRENT_MAX_VER = '1.36'
CURRENT_MAX_VER = '1.37'
class Version(object):

View File

@ -281,3 +281,9 @@ user documentation.
Add 'tty' to container.
This field indicate if the container should allocate a TTY for itself.
1.37
----
Add 'tty' and 'stdin' to capsule.
Containers in capsule can specify these two fields.

View File

@ -98,6 +98,8 @@ VALID_CONTAINER_FILED = {
'env': 'environment',
'workDir': 'workdir',
'imagePullPolicy': 'image_pull_policy',
'tty': 'tty',
'stdin': 'interactive',
}
VALID_CAPSULE_FIELD = {

View File

@ -1250,7 +1250,7 @@ class DockerDriver(driver.ContainerDriver):
'environment': container.environment,
'working_dir': container.workdir,
'labels': container.labels,
'tty': container.interactive,
'tty': container.tty,
'stdin_open': container.interactive,
}

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.36',
'max_version': '1.37',
'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.36',
'max_version': '1.37',
'min_version': '1.1',
'status': 'CURRENT'}]}