api-ref: update container sample request/response

Change-Id: Id5a791f4c9460b18e78c6b72b43fb07bc73b0728
This commit is contained in:
Hongbin Lu 2019-05-19 20:52:52 +00:00
parent d1684a6795
commit 5f2e4a5adb
6 changed files with 132 additions and 77 deletions

View File

@ -6,12 +6,15 @@
"app": "hello"
},
"image": "ubuntu",
"command": "/bin/sh -c 'echo hello'",
"command": [
"/bin/sh",
"-c",
"'echo hello'"
],
"name": "test",
"cpu": 2,
"memory": 500,
"workdir": "/home/ubuntu",
"image_pull_policy": "always",
"restart_policy":{
"Name": "no",
"MaximumRetryCount": 0

View File

@ -1,10 +1,14 @@
{
"addresses": null,
"links": [{
"href": "http://openstack.example.com/v1/containers/b0694d40-70af-4488-b104-10f66b593347",
"rel": "self"
"links": [
{
"href": "http://openstack.example.com/v1/containers/b0694d40-70af-4488-b104-10f66b593347",
"rel": "self"
},
{"href": "http://openstack.example.com/containers/b0694d40-70af-4488-b104-10f66b593347", "rel": "bookmark"}
{
"href": "http://openstack.example.com/containers/b0694d40-70af-4488-b104-10f66b593347",
"rel": "bookmark"
}
],
"image": "ubuntu",
"labels": {
@ -13,12 +17,11 @@
"security_groups": [
"7e4eae5d-8b7b-4673-91b3-70dfb577e620"
],
"image_pull_policy": "always",
"uuid": "b0694d40-70af-4488-b104-10f66b593347",
"environment": {
"foo": "bar"
},
"memory": "500M",
"memory": "500",
"status": "Creating",
"workdir": "/home/ubuntu",
"status_detail": null,
@ -32,7 +35,11 @@
"Name": "no"
},
"ports": null,
"command": "/bin/sh -c 'echo hello'",
"command": [
"/bin/sh",
"-c",
"'echo hello'"
],
"cpu": 2.0,
"interactive": false,
"runtime": "runc",
@ -43,6 +50,8 @@
"disk": 0,
"user_id": "0a9cdb65757b4216935e27f333d1c48b",
"project_id": "77a89a275765486d86144caad70825e4",
"cpu_policy": "shared",
"registry_id": null,
"healthcheck": {
"test": "stat /etc/passwd || exit 1",
"interval": 3,

View File

@ -28,14 +28,13 @@
},
"disk": 0,
"security_groups": [],
"image_pull_policy": "always",
"user_id": "06c7fda2e74d4f5084bb8298bf8e313b",
"uuid": "b0694d40-70af-4488-b104-10f66b593347",
"hostname": "zun-sandbox-5812822d-6794-4839-85c0-1c01665c0d48",
"environment": {
"foo": "bar"
},
"memory": "500M",
"memory": "500",
"project_id": "2cc8ed7104ca427c873cad82411bcebb",
"status": "Stopped",
"workdir": "/home/ubuntu",
@ -54,9 +53,15 @@
},
"runtime": "runc",
"ports": [],
"command": "/bin/sh -c 'echo hello'",
"command": [
"/bin/sh",
"-c",
"'echo hello'"
],
"cpu": 2.0,
"interactive": false,
"cpu_policy": "shared",
"registry_id": null,
"healthcheck": {
"test": "stat /etc/passwd || exit 1",
"interval": 3,

View File

@ -1,47 +1,64 @@
{
"addresses": {
"f82824cf-bd0e-4c39-9450-3cf802ed262f": [{
"version": 4,
"addr": "172.24.4.3",
"port": "4b077255-9b4d-4068-b24f-b89594f870c2"
}, {
"version": 6,
"addr": "2001:db8::9",
"port": "4b077255-9b4d-4068-b24f-b89594f870c2"
}]
"f82824cf-bd0e-4c39-9450-3cf802ed262f": [
{
"version": 4,
"addr": "172.24.4.3",
"port": "4b077255-9b4d-4068-b24f-b89594f870c2"
},
{
"version": 6,
"addr": "2001:db8::9",
"port": "4b077255-9b4d-4068-b24f-b89594f870c2"
}
]
},
"links": [{
"href": "http://openstack.example.com/v1/containers/b0694d40-70af-4488-b104-10f66b593347",
"rel": "self"
"links": [
{
"href": "http://openstack.example.com/v1/containers/b0694d40-70af-4488-b104-10f66b593347",
"rel": "self"
},
{"href": "http://openstack.example.com/containers/b0694d40-70af-4488-b104-10f66b593347", "rel": "bookmark"}
],
"image": "ubuntu",
"labels": {
"app": "hello"
},
"security_groups": [],
"image_pull_policy": "always",
"uuid": "b0694d40-70af-4488-b104-10f66b593347",
"hostname": "zun-sandbox-5812822d-6794-4839-85c0-1c01665c0d48",
"environment": {
"foo": "bar"
},
"memory": "500M",
"status": "Stopped",
"workdir": "/home/ubuntu",
"status_detail": "Exited(0) 8 mins ago ",
"host": "ubuntu",
"image_driver": "docker",
"task_state": null,
"status_reason": null,
"name": "test-new",
"restart_policy": {
"MaximumRetryCount": "0",
"Name": "no"
},
"ports": [],
"command": "/bin/sh -c 'echo hello'",
"cpu": 2.0,
"interactive": false
{
"href": "http://openstack.example.com/containers/b0694d40-70af-4488-b104-10f66b593347",
"rel": "bookmark"
}
],
"image": "ubuntu",
"labels": {
"app": "hello"
},
"security_groups": [],
"uuid": "b0694d40-70af-4488-b104-10f66b593347",
"hostname": "zun-sandbox-5812822d-6794-4839-85c0-1c01665c0d48",
"environment": {
"foo": "bar"
},
"memory": "500",
"status": "Stopped",
"workdir": "/home/ubuntu",
"status_detail": "Exited(0) 8 mins ago ",
"host": "ubuntu",
"image_driver": "docker",
"task_state": null,
"status_reason": null,
"name": "test-new",
"restart_policy": {
"MaximumRetryCount": "0",
"Name": "no"
},
"ports": [],
"command": [
"/bin/sh",
"-c",
"'echo hello'"
],
"cpu": 2.0,
"disk": 0,
"project_id": "493378c3aa3e4315a39fe8b125f9eaaa",
"user_id": "06c7fda2e74d4f5084bb8298bf8e313b",
"auto_remove": false,
"auto_heal": false,
"cpu_policy": "shared",
"registry_id": null,
"interactive": false
}

View File

@ -26,14 +26,13 @@
},
"disk": 0,
"security_groups": [],
"image_pull_policy": "always",
"user_id": "06c7fda2e74d4f5084bb8298bf8e313b",
"uuid": "b0694d40-70af-4488-b104-10f66b593347",
"hostname": "zun-sandbox-5812822d-6794-4839-85c0-1c01665c0d48",
"environment": {
"foo": "bar"
},
"memory": "500M",
"memory": "500",
"project_id": "2cc8ed7104ca427c873cad82411bcebb",
"status": "Stopped",
"workdir": "/home/ubuntu",
@ -51,9 +50,15 @@
"Name": "no"
},
"ports": [],
"command": "/bin/sh -c 'echo hello'",
"command": [
"/bin/sh",
"-c",
"'echo hello'"
],
"cpu": 2.0,
"interactive": false,
"cpu_policy": "shared",
"registry_id": null,
"healthcheck": {
"test": "stat /etc/passwd || exit 1",
"interval": 3,

View File

@ -1,38 +1,44 @@
{
"addresses": {
"eb7a3ee0-ad55-417b-ba11-6c57b1dbd4c6": [{
"subnet_id": "a3162b3e-2f02-432e-a18c-78fe2774d026",
"version": 4,
"preserve_on_delete": false,
"addr": "172.24.4.3",
"port": "4b077255-9b4d-4068-b24f-b89594f870c2"
}, {
"subnet_id": "7ca0d3d5-eeef-489f-8a40-ccb00456628c",
"version": 6,
"preserve_on_delete": false,
"addr": "2001:db8::9",
"port": "4b077255-9b4d-4068-b24f-b89594f870c2"
}]
"eb7a3ee0-ad55-417b-ba11-6c57b1dbd4c6": [
{
"subnet_id": "a3162b3e-2f02-432e-a18c-78fe2774d026",
"version": 4,
"preserve_on_delete": false,
"addr": "172.24.4.3",
"port": "4b077255-9b4d-4068-b24f-b89594f870c2"
},
{
"subnet_id": "7ca0d3d5-eeef-489f-8a40-ccb00456628c",
"version": 6,
"preserve_on_delete": false,
"addr": "2001:db8::9",
"port": "4b077255-9b4d-4068-b24f-b89594f870c2"
}
]
},
"links": [{
"href": "http://openstack.example.com/v1/containers/b0694d40-70af-4488-b104-10f66b593347",
"rel": "self"
"links": [
{
"href": "http://openstack.example.com/v1/containers/b0694d40-70af-4488-b104-10f66b593347",
"rel": "self"
},
{"href": "http://openstack.example.com/containers/b0694d40-70af-4488-b104-10f66b593347", "rel": "bookmark"}
{
"href": "http://openstack.example.com/containers/b0694d40-70af-4488-b104-10f66b593347",
"rel": "bookmark"
}
],
"image": "ubuntu",
"labels": {
"app": "hello"
},
"security_groups": [],
"image_pull_policy": "always",
"user_id": "06c7fda2e74d4f5084bb8298bf8e313b",
"uuid": "b0694d40-70af-4488-b104-10f66b593347",
"hostname": "zun-sandbox-5812822d-6794-4839-85c0-1c01665c0d48",
"environment": {
"foo": "bar"
},
"memory": "200M",
"memory": "200",
"status": "Stopped",
"workdir": "/home/ubuntu",
"status_detail": "Exited(0) 18 mins ago ",
@ -46,11 +52,21 @@
"Name": "no"
},
"ports": [],
"command": "/bin/sh -c 'echo hello'",
"command": [
"/bin/sh",
"-c",
"'echo hello'"
],
"runtime": "runc",
"cpu": 3.0,
"interactive": false,
"privileged": false,
"project_id": "493378c3aa3e4315a39fe8b125f9eaaa",
"disk": 0,
"auto_remove": false,
"auto_heal": false,
"cpu_policy": "shared",
"registry_id": null,
"healthcheck": {
"test": "stat /etc/passwd || exit 1",
"interval": 3,