Add api for privileged

Change-Id: I998cca8290a01744fa809d21091e1cb94dfe1ea0
Implements: blueprint support-zun-create-privileged
This commit is contained in:
Feng Shengqin 2018-07-27 17:14:17 +08:00
parent 5b4777df19
commit 61200349bf
7 changed files with 24 additions and 2 deletions

View File

@ -58,6 +58,7 @@ Request
- availability_zone: container_availability_zone - availability_zone: container_availability_zone
- hints: hints - hints: hints
- mounts: mounts - mounts: mounts
- privileged: privileged-request
Request Example Request Example
---------------- ----------------
@ -95,6 +96,7 @@ Response
- ports: ports - ports: ports
- auto_remove: auto_remove - auto_remove: auto_remove
- auto_heal: auto_heal - auto_heal: auto_heal
- privileged: privileged
Response Example Response Example
@ -166,6 +168,7 @@ Response
- task_state: task_state - task_state: task_state
- status_reason: status_reason - status_reason: status_reason
- ports: ports - ports: ports
- privileged: privileged
Response Example Response Example
---------------- ----------------
@ -228,6 +231,7 @@ Response
- task_state: task_state - task_state: task_state
- status_reason: status_reason - status_reason: status_reason
- ports: ports - ports: ports
- privileged: privileged
Response Example Response Example
---------------- ----------------
@ -428,6 +432,7 @@ Return new container with updated attributes.
- task_state: task_state - task_state: task_state
- status_reason: status_reason - status_reason: status_reason
- ports: ports - ports: ports
- privileged: privileged
Response Example Response Example
---------------- ----------------

View File

@ -769,6 +769,18 @@ ports:
in: body in: body
required: true required: true
type: string type: string
privileged:
description: |
Give extended privileges to the container.
in: body
required: true
type: boolean
privileged-request:
description: |
Give extended privileges to the container.
in: body
required: false
type: boolean
project_id_container_action: project_id_container_action:
description: | description: |
The UUID of the project that this container belongs to. The UUID of the project that this container belongs to.

View File

@ -42,5 +42,6 @@
"source": "myvol", "source": "myvol",
"destination": "/data" "destination": "/data"
} }
] ],
"privileged": false
} }

View File

@ -39,6 +39,7 @@
"hostname": "testhost", "hostname": "testhost",
"auto_remove": false, "auto_remove": false,
"auto_heal": false, "auto_heal": false,
"privileged": false,
"disk": 0, "disk": 0,
"user_id": "0a9cdb65757b4216935e27f333d1c48b", "user_id": "0a9cdb65757b4216935e27f333d1c48b",
"project_id": "77a89a275765486d86144caad70825e4" "project_id": "77a89a275765486d86144caad70825e4"

View File

@ -42,6 +42,7 @@
"status_detail": "Exited(0) 10 mins ago ", "status_detail": "Exited(0) 10 mins ago ",
"auto_remove": false, "auto_remove": false,
"auto_heal": false, "auto_heal": false,
"privileged": false,
"host": "ubuntu", "host": "ubuntu",
"image_driver": "docker", "image_driver": "docker",
"task_state": null, "task_state": null,

View File

@ -39,6 +39,7 @@
"workdir": "/home/ubuntu", "workdir": "/home/ubuntu",
"auto_remove": false, "auto_remove": false,
"auto_heal": false, "auto_heal": false,
"privileged": false,
"status_detail": "Exited(0) 8 mins ago ", "status_detail": "Exited(0) 8 mins ago ",
"host": "ubuntu", "host": "ubuntu",
"image_driver": "docker", "image_driver": "docker",

View File

@ -49,5 +49,6 @@
"command": "/bin/sh -c 'echo hello'", "command": "/bin/sh -c 'echo hello'",
"runtime": "runc", "runtime": "runc",
"cpu": 3.0, "cpu": 3.0,
"interactive": false "interactive": false,
"privileged": false,
} }