Merge "Add 'tty' and 'stdin' to capsule"
This commit is contained in:
commit
418f383d39
|
@ -26,7 +26,7 @@
|
||||||
test-config:
|
test-config:
|
||||||
$TEMPEST_CONFIG:
|
$TEMPEST_CONFIG:
|
||||||
container_service:
|
container_service:
|
||||||
min_microversion: 1.36
|
min_microversion: 1.37
|
||||||
devstack_services:
|
devstack_services:
|
||||||
tempest: true
|
tempest: true
|
||||||
devstack_plugins:
|
devstack_plugins:
|
||||||
|
|
|
@ -310,7 +310,6 @@ class CapsuleController(base.Controller):
|
||||||
container_dict['image_pull_policy'] = (
|
container_dict['image_pull_policy'] = (
|
||||||
container_dict.get('image_pull_policy', 'always').lower())
|
container_dict.get('image_pull_policy', 'always').lower())
|
||||||
container_dict['status'] = consts.CREATING
|
container_dict['status'] = consts.CREATING
|
||||||
container_dict['interactive'] = True
|
|
||||||
container_dict['capsule_id'] = new_capsule.id
|
container_dict['capsule_id'] = new_capsule.id
|
||||||
container_dict['restart_policy'] = container_restart_policy
|
container_dict['restart_policy'] = container_restart_policy
|
||||||
if container_spec in init_containers_spec:
|
if container_spec in init_containers_spec:
|
||||||
|
|
|
@ -465,6 +465,8 @@ capsule_containers_list = {
|
||||||
'env': environment,
|
'env': environment,
|
||||||
'workDir': workdir,
|
'workDir': workdir,
|
||||||
'imagePullPolicy': image_pull_policy,
|
'imagePullPolicy': image_pull_policy,
|
||||||
|
'stdin': boolean,
|
||||||
|
'tty': boolean,
|
||||||
},
|
},
|
||||||
'additionalProperties': False,
|
'additionalProperties': False,
|
||||||
'required': ['image']
|
'required': ['image']
|
||||||
|
|
|
@ -69,10 +69,11 @@ REST_API_VERSION_HISTORY = """REST API Version History:
|
||||||
* 1.34 - Add 'init_containers' to capsule
|
* 1.34 - Add 'init_containers' to capsule
|
||||||
* 1.35 - Support exposing container ports in capsule
|
* 1.35 - Support exposing container ports in capsule
|
||||||
* 1.36 - Add 'tty' to container
|
* 1.36 - Add 'tty' to container
|
||||||
|
* 1.37 - Add 'tty' and 'stdin' to capsule
|
||||||
"""
|
"""
|
||||||
|
|
||||||
BASE_VER = '1.1'
|
BASE_VER = '1.1'
|
||||||
CURRENT_MAX_VER = '1.36'
|
CURRENT_MAX_VER = '1.37'
|
||||||
|
|
||||||
|
|
||||||
class Version(object):
|
class Version(object):
|
||||||
|
|
|
@ -281,3 +281,9 @@ user documentation.
|
||||||
|
|
||||||
Add 'tty' to container.
|
Add 'tty' to container.
|
||||||
This field indicate if the container should allocate a TTY for itself.
|
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.
|
||||||
|
|
|
@ -98,6 +98,8 @@ VALID_CONTAINER_FILED = {
|
||||||
'env': 'environment',
|
'env': 'environment',
|
||||||
'workDir': 'workdir',
|
'workDir': 'workdir',
|
||||||
'imagePullPolicy': 'image_pull_policy',
|
'imagePullPolicy': 'image_pull_policy',
|
||||||
|
'tty': 'tty',
|
||||||
|
'stdin': 'interactive',
|
||||||
}
|
}
|
||||||
|
|
||||||
VALID_CAPSULE_FIELD = {
|
VALID_CAPSULE_FIELD = {
|
||||||
|
|
|
@ -1250,7 +1250,7 @@ class DockerDriver(driver.ContainerDriver):
|
||||||
'environment': container.environment,
|
'environment': container.environment,
|
||||||
'working_dir': container.workdir,
|
'working_dir': container.workdir,
|
||||||
'labels': container.labels,
|
'labels': container.labels,
|
||||||
'tty': container.interactive,
|
'tty': container.tty,
|
||||||
'stdin_open': container.interactive,
|
'stdin_open': container.interactive,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class TestRootController(api_base.FunctionalTest):
|
||||||
'default_version':
|
'default_version':
|
||||||
{'id': 'v1',
|
{'id': 'v1',
|
||||||
'links': [{'href': 'http://localhost/v1/', 'rel': 'self'}],
|
'links': [{'href': 'http://localhost/v1/', 'rel': 'self'}],
|
||||||
'max_version': '1.36',
|
'max_version': '1.37',
|
||||||
'min_version': '1.1',
|
'min_version': '1.1',
|
||||||
'status': 'CURRENT'},
|
'status': 'CURRENT'},
|
||||||
'description': 'Zun is an OpenStack project which '
|
'description': 'Zun is an OpenStack project which '
|
||||||
|
@ -37,7 +37,7 @@ class TestRootController(api_base.FunctionalTest):
|
||||||
'versions': [{'id': 'v1',
|
'versions': [{'id': 'v1',
|
||||||
'links': [{'href': 'http://localhost/v1/',
|
'links': [{'href': 'http://localhost/v1/',
|
||||||
'rel': 'self'}],
|
'rel': 'self'}],
|
||||||
'max_version': '1.36',
|
'max_version': '1.37',
|
||||||
'min_version': '1.1',
|
'min_version': '1.1',
|
||||||
'status': 'CURRENT'}]}
|
'status': 'CURRENT'}]}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue