зеркало из https://github.com/microsoft/docker.git
Generate GraphDriver from spec, and fix up image spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
Родитель
5988b84e4f
Коммит
8d5f558de0
|
@ -829,22 +829,40 @@ definitions:
|
|||
items:
|
||||
$ref: "#/definitions/Port"
|
||||
|
||||
GraphDriver:
|
||||
description: "Information about this container's graph driver."
|
||||
GraphDriverData:
|
||||
description: "Information about a container's graph driver."
|
||||
type: "object"
|
||||
required: [Name, Data]
|
||||
properties:
|
||||
Name:
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
Data:
|
||||
type: "object"
|
||||
x-nullable: false
|
||||
additionalProperties:
|
||||
type: "string"
|
||||
|
||||
Image:
|
||||
type: "object"
|
||||
required:
|
||||
- Id
|
||||
- Parent
|
||||
- Comment
|
||||
- Created
|
||||
- Container
|
||||
- DockerVersion
|
||||
- Author
|
||||
- Architecture
|
||||
- Os
|
||||
- Size
|
||||
- VirtualSize
|
||||
- GraphDrvier
|
||||
- RootFS
|
||||
properties:
|
||||
Id:
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
RepoTags:
|
||||
type: "array"
|
||||
items:
|
||||
|
@ -855,37 +873,51 @@ definitions:
|
|||
type: "string"
|
||||
Parent:
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
Comment:
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
Created:
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
Container:
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
ContainerConfig:
|
||||
$ref: "#/definitions/Config"
|
||||
DockerVersion:
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
Author:
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
Config:
|
||||
$ref: "#/definitions/Config"
|
||||
Architecture:
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
Os:
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
OsVersion:
|
||||
type: "string"
|
||||
Size:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
x-nullable: false
|
||||
VirtualSize:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
x-nullable: false
|
||||
GraphDriver:
|
||||
$ref: "#/definitions/GraphDriver"
|
||||
$ref: "#/definitions/GraphDriverData"
|
||||
RootFS:
|
||||
type: "object"
|
||||
required: [Type]
|
||||
properties:
|
||||
Type:
|
||||
type: "string"
|
||||
x-nullable: false
|
||||
Layers:
|
||||
type: "array"
|
||||
items:
|
||||
|
@ -2934,7 +2966,7 @@ paths:
|
|||
HostConfig:
|
||||
$ref: "#/definitions/HostConfig"
|
||||
GraphDriver:
|
||||
$ref: "#/definitions/GraphDriver"
|
||||
$ref: "#/definitions/GraphDriverData"
|
||||
SizeRw:
|
||||
description: "The size of files that have been created or changed by this container."
|
||||
type: "integer"
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
package types
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
// GraphDriverData Information about a container's graph driver.
|
||||
// swagger:model GraphDriverData
|
||||
type GraphDriverData struct {
|
||||
|
||||
// data
|
||||
// Required: true
|
||||
Data map[string]string `json:"Data"`
|
||||
|
||||
// name
|
||||
// Required: true
|
||||
Name string `json:"Name"`
|
||||
}
|
|
@ -17,13 +17,6 @@ import (
|
|||
"github.com/docker/go-connections/nat"
|
||||
)
|
||||
|
||||
// GraphDriverData returns Image's graph driver config info
|
||||
// when calling inspect command
|
||||
type GraphDriverData struct {
|
||||
Name string
|
||||
Data map[string]string
|
||||
}
|
||||
|
||||
// RootFS returns Image's RootFS description including the layer IDs.
|
||||
type RootFS struct {
|
||||
Type string
|
||||
|
|
|
@ -4,6 +4,7 @@ set -eu
|
|||
swagger generate model -f api/swagger.yaml \
|
||||
-t api -m types --skip-validator -C api/swagger-gen.yaml \
|
||||
-n ErrorResponse \
|
||||
-n GraphDriverData \
|
||||
-n IdResponse \
|
||||
-n ImageDeleteResponseItem \
|
||||
-n ImageSummary \
|
||||
|
|
Загрузка…
Ссылка в новой задаче