blob: ba5577a8549a9a56d31d9f079fcd09a0e96fad00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
package server
import (
"net/http"
"github.com/containers/podman/v3/pkg/api/handlers/libpod"
"github.com/gorilla/mux"
)
func (s *APIServer) registerManifestHandlers(r *mux.Router) error {
// swagger:operation POST /libpod/manifests/create manifests ManifestCreateLibpod
// ---
// summary: Create
// description: Create a manifest list
// produces:
// - application/json
// parameters:
// - in: query
// name: name
// type: string
// description: manifest list name
// required: true
// - in: query
// name: image
// type: string
// description: name of the image
// - in: query
// name: all
// type: boolean
// description: add all contents if given list
// responses:
// 200:
// schema:
// $ref: "#/definitions/IDResponse"
// 400:
// $ref: "#/responses/BadParamError"
// 404:
// $ref: "#/responses/NoSuchImage"
// 500:
// $ref: "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/manifests/create"), s.APIHandler(libpod.ManifestCreate)).Methods(http.MethodPost)
// swagger:operation GET /libpod/manifests/{name}/exists manifests ManifestExistsLibpod
// ---
// summary: Exists
// description: Check if manifest list exists
// parameters:
// - in: path
// name: name
// type: string
// required: true
// description: the name of the manifest list
// produces:
// - application/json
// responses:
// 204:
// description: manifest list exists
// 404:
// $ref: '#/responses/NoSuchManifest'
// 500:
// $ref: '#/responses/InternalError'
r.Handle(VersionedPath("/libpod/manifests/{name}/exists"), s.APIHandler(libpod.ExistsManifest)).Methods(http.MethodGet)
// swagger:operation GET /libpod/manifests/{name:.*}/json manifests ManifestInspectLibpod
// ---
// summary: Inspect
// description: Display a manifest list
// produces:
// - application/json
// parameters:
// - in: path
// name: name:.*
// type: string
// required: true
// description: the name or ID of the manifest
// responses:
// 200:
// $ref: "#/responses/InspectManifest"
// 404:
// $ref: "#/responses/NoSuchManifest"
// 500:
// $ref: "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/manifests/{name:.*}/json"), s.APIHandler(libpod.ManifestInspect)).Methods(http.MethodGet)
// swagger:operation POST /libpod/manifests/{name:.*}/add manifests ManifestAddLibpod
// ---
// summary: Add image
// description: Add an image to a manifest list
// produces:
// - application/json
// parameters:
// - in: path
// name: name:.*
// type: string
// required: true
// description: the name or ID of the manifest
// - in: body
// name: options
// description: options for creating a manifest
// schema:
// $ref: "#/definitions/ManifestAddOpts"
// responses:
// 200:
// schema:
// $ref: "#/definitions/IDResponse"
// 404:
// $ref: "#/responses/NoSuchManifest"
// 409:
// $ref: "#/responses/BadParamError"
// 500:
// $ref: "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/manifests/{name:.*}/add"), s.APIHandler(libpod.ManifestAdd)).Methods(http.MethodPost)
// swagger:operation DELETE /libpod/manifests/{name:.*} manifests ManifestDeleteLibpod
// ---
// summary: Remove
// description: Remove an image from a manifest list
// produces:
// - application/json
// parameters:
// - in: path
// name: name:.*
// type: string
// required: true
// description: the image associated with the manifest
// - in: query
// name: digest
// type: string
// description: image digest to be removed
// responses:
// 200:
// schema:
// $ref: "#/definitions/IDResponse"
// 400:
// $ref: "#/responses/BadParamError"
// 404:
// $ref: "#/responses/NoSuchManifest"
// 500:
// $ref: "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/manifests/{name:.*}"), s.APIHandler(libpod.ManifestRemove)).Methods(http.MethodDelete)
// swagger:operation POST /libpod/manifests/{name}/push manifests ManifestPushLibpod
// ---
// summary: Push
// description: Push a manifest list or image index to a registry
// produces:
// - application/json
// parameters:
// - in: path
// name: name
// type: string
// required: true
// description: the name or ID of the manifest
// - in: query
// name: destination
// type: string
// required: true
// description: the destination for the manifest
// - in: query
// name: all
// description: push all images
// type: boolean
// responses:
// 200:
// schema:
// $ref: "#/definitions/IDResponse"
// 400:
// $ref: "#/responses/BadParamError"
// 404:
// $ref: "#/responses/NoSuchManifest"
// 500:
// $ref: "#/responses/InternalError"
r.Handle(VersionedPath("/libpod/manifests/{name}/push"), s.APIHandler(libpod.ManifestPush)).Methods(http.MethodPost)
return nil
}
|