| ... | ... |
@@ -206,7 +206,7 @@ func getContainersChanges(srv *Server, version float64, w http.ResponseWriter, r |
| 206 | 206 |
return nil |
| 207 | 207 |
} |
| 208 | 208 |
|
| 209 |
-func getContainersPs(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|
|
| 209 |
+func getContainersJson(srv *Server, version float64, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
|
|
| 210 | 210 |
if err := parseForm(r); err != nil {
|
| 211 | 211 |
return err |
| 212 | 212 |
} |
| ... | ... |
@@ -627,7 +627,8 @@ func ListenAndServe(addr string, srv *Server, logging bool) error {
|
| 627 | 627 |
"/images/search": getImagesSearch, |
| 628 | 628 |
"/images/{name:.*}/history": getImagesHistory,
|
| 629 | 629 |
"/images/{name:.*}/json": getImagesByName,
|
| 630 |
- "/containers/ps": getContainersPs, |
|
| 630 |
+ "/containers/ps": getContainersJson, |
|
| 631 |
+ "/containers/json": getContainersJson, |
|
| 631 | 632 |
"/containers/{name:.*}/export": getContainersExport,
|
| 632 | 633 |
"/containers/{name:.*}/changes": getContainersChanges,
|
| 633 | 634 |
"/containers/{name:.*}/json": getContainersByName,
|
| ... | ... |
@@ -318,7 +318,7 @@ func TestGetImagesByName(t *testing.T) {
|
| 318 | 318 |
} |
| 319 | 319 |
} |
| 320 | 320 |
|
| 321 |
-func TestGetContainersPs(t *testing.T) {
|
|
| 321 |
+func TestGetContainersJson(t *testing.T) {
|
|
| 322 | 322 |
runtime, err := newTestRuntime() |
| 323 | 323 |
if err != nil {
|
| 324 | 324 |
t.Fatal(err) |
| ... | ... |
@@ -336,13 +336,13 @@ func TestGetContainersPs(t *testing.T) {
|
| 336 | 336 |
} |
| 337 | 337 |
defer runtime.Destroy(container) |
| 338 | 338 |
|
| 339 |
- req, err := http.NewRequest("GET", "/containers?quiet=1&all=1", nil)
|
|
| 339 |
+ req, err := http.NewRequest("GET", "/containers/json?all=1", nil)
|
|
| 340 | 340 |
if err != nil {
|
| 341 | 341 |
t.Fatal(err) |
| 342 | 342 |
} |
| 343 | 343 |
|
| 344 | 344 |
r := httptest.NewRecorder() |
| 345 |
- if err := getContainersPs(srv, API_VERSION, r, req, nil); err != nil {
|
|
| 345 |
+ if err := getContainersJson(srv, API_VERSION, r, req, nil); err != nil {
|
|
| 346 | 346 |
t.Fatal(err) |
| 347 | 347 |
} |
| 348 | 348 |
containers := []ApiContainers{}
|
| ... | ... |
@@ -788,7 +788,7 @@ func (cli *DockerCli) CmdPs(args ...string) error {
|
| 788 | 788 |
v.Set("before", *before)
|
| 789 | 789 |
} |
| 790 | 790 |
|
| 791 |
- body, _, err := cli.call("GET", "/containers/ps?"+v.Encode(), nil)
|
|
| 791 |
+ body, _, err := cli.call("GET", "/containers/json?"+v.Encode(), nil)
|
|
| 792 | 792 |
if err != nil {
|
| 793 | 793 |
return err |
| 794 | 794 |
} |
| ... | ... |
@@ -24,7 +24,7 @@ Docker Remote API |
| 24 | 24 |
List containers |
| 25 | 25 |
*************** |
| 26 | 26 |
|
| 27 |
-.. http:get:: /containers/ps |
|
| 27 |
+.. http:get:: /containers/json |
|
| 28 | 28 |
|
| 29 | 29 |
List containers |
| 30 | 30 |
|
| ... | ... |
@@ -32,7 +32,7 @@ List containers |
| 32 | 32 |
|
| 33 | 33 |
.. sourcecode:: http |
| 34 | 34 |
|
| 35 |
- GET /containers/ps?all=1&before=8dfafdbc3a40 HTTP/1.1 |
|
| 35 |
+ GET /containers/json?all=1&before=8dfafdbc3a40 HTTP/1.1 |
|
| 36 | 36 |
|
| 37 | 37 |
**Example response**: |
| 38 | 38 |
|