Skip to content

Commit 9fdc4e4

Browse files
committed
upgrade go-swagger to 0.17.1
correct several test case Signed-off-by: zhuangqh <[email protected]>
1 parent a0376b3 commit 9fdc4e4

File tree

90 files changed

+544
-2733
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+544
-2733
lines changed

Dockerfile

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ RUN apt-get update \
1010
gcc \
1111
vim \
1212
tree \
13-
rubygems \
1413
&& apt-get clean
1514

1615
# set go version this image use
@@ -30,21 +29,6 @@ ENV GOPATH=/go
3029
# go binary path is /usr/local/go/bin
3130
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
3231

33-
# install golint. currently golint has no released version.
34-
RUN go get -u golang.org/x/lint/golint
35-
36-
# install swagger 0.12.0
37-
RUN wget --quiet -O /bin/swagger https://github.com/go-swagger/go-swagger/releases/download/0.12.0/swagger_linux_amd64 \
38-
&& chmod +x /bin/swagger
39-
40-
# install markdownlint tool
41-
RUN gem install rake \
42-
&& gem install bundler \
43-
&& git clone https://github.com/markdownlint/markdownlint.git \
44-
&& cd markdownlint \
45-
&& git checkout v0.4.0 \
46-
&& rake install
47-
4832
COPY . /go/src/github.com/alibaba/pouch
4933

5034
WORKDIR /go/src/github.com/alibaba/pouch

apis/swagger.yml

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ paths:
117117
200:
118118
description: "no error"
119119
schema:
120-
$ref: '#definitions/EventsMessage'
120+
$ref: '#/definitions/EventsMessage'
121121
400:
122122
description: "bad parameter"
123123
schema:
@@ -895,18 +895,10 @@ paths:
895895
operationId: "ContainerCheckpointCreate"
896896
parameters:
897897
- $ref: "#/parameters/id"
898-
- name: "checkpointdir"
899-
in: "query"
900-
description: "checkpoint directory"
901-
type: "string"
902-
- name: "checkpointid"
903-
in: "query"
904-
description: "checkpoint id"
905-
type: "string"
906-
- name: "exit"
907-
in: "query"
908-
description: "exit after checkpoint"
909-
type: "bool"
898+
- name: "body"
899+
in: "body"
900+
schema:
901+
$ref: "#/definitions/CheckpointCreateOptions"
910902
responses:
911903
201:
912904
description: "created"
@@ -917,8 +909,6 @@ paths:
917909
404:
918910
$ref: "#/responses/404ErrorResponse"
919911
tags: ["Container"]
920-
921-
/containers/{id}/checkpoints:
922912
get:
923913
summary: "list checkpoints of a container"
924914
operationId: "ContainerCheckpointList"
@@ -939,19 +929,20 @@ paths:
939929
$ref: "#/responses/404ErrorResponse"
940930
tags: ["Container"]
941931

942-
/containers/{id}/checkpoints/{id}:
932+
/containers/{id}/checkpoints/{checkpointId}:
943933
delete:
944934
summary: "delete a checkpoint of a container"
945935
operationId: "ContainerCheckpointDelete"
946936
parameters:
947937
- $ref: "#/parameters/id"
948-
- name: "checkpointdir"
949-
in: "query"
950-
description: "checkpoint directory"
938+
- name: "checkpointId"
939+
in: "path"
940+
description: "checkpoint id"
951941
type: "string"
952-
- name: "checkpointid"
942+
required: true
943+
- name: "dir"
953944
in: "query"
954-
description: "checkpoint id"
945+
description: "checkpoint directory"
955946
type: "string"
956947
responses:
957948
204:
@@ -2534,24 +2525,21 @@ definitions:
25342525
Resources:
25352526
description: "A container's resources (cgroups config, ulimits, etc)"
25362527
type: "object"
2537-
required: [CpuShares, Memory, CgroupParent, BlkioWeight, CpuPeriod, CpuQuota, CpuRealtimePeriod,
2538-
CpuRealtimeRuntime, CpusetCpus, CpusetMems, DeviceCgroupRules, KernelMemory, MemoryReservation,
2539-
MemorySwap, MemorySwappiness, NanoCpus, OomKillDisable, PidsLimit, CpuCount, CpuPercent,
2540-
IOMaximumIOps, IOMaximumBandwidth, IntelRdtL3Cbm, ScheLatSwitch, MemoryWmarkRatio, MemoryExtra,
2541-
MemoryForceEmptyCtl]
25422528
properties:
25432529
# Applicable to UNIX platforms
25442530
CgroupParent:
25452531
description: "Path to `cgroups` under which the container's `cgroup` is created. If the path is not absolute, the path is considered to be relative to the `cgroups` path of the init process. Cgroups are created if they do not already exist."
25462532
type: "string"
25472533
x-nullable: false
2534+
x-omitempty: false
25482535
BlkioWeight:
25492536
description: "Block IO weight (relative weight), need CFQ IO Scheduler enable."
25502537
type: "integer"
25512538
format: "uint16"
25522539
x-nullable: false
25532540
minimum: 0
25542541
maximum: 1000
2542+
x-omitempty: false
25552543
BlkioWeightDevice:
25562544
description: |
25572545
Block IO weight (relative device weight) in the form `[{"Path": "device_path", "Weight": weight}]`.
@@ -2586,6 +2574,7 @@ definitions:
25862574
description: "An integer value representing this container's relative CPU weight versus other containers."
25872575
type: "integer"
25882576
x-nullable: false
2577+
x-omitempty: false
25892578
CpuPeriod:
25902579
description: |
25912580
CPU CFS (Completely Fair Scheduler) period.
@@ -2595,6 +2584,7 @@ definitions:
25952584
minimum: 1000
25962585
maximum: 1000000
25972586
x-nullable: false
2587+
x-omitempty: false
25982588
CpuQuota:
25992589
description: |
26002590
CPU CFS (Completely Fair Scheduler) quota.
@@ -2603,25 +2593,30 @@ definitions:
26032593
format: "int64"
26042594
minimum: 1000
26052595
x-nullable: false
2596+
x-omitempty: false
26062597
CpuRealtimePeriod:
26072598
description: "The length of a CPU real-time period in microseconds. Set to 0 to allocate no time allocated to real-time tasks."
26082599
type: "integer"
26092600
format: "int64"
26102601
x-nullable: false
2602+
x-omitempty: false
26112603
CpuRealtimeRuntime:
26122604
description: "The length of a CPU real-time runtime in microseconds. Set to 0 to allocate no time allocated to real-time tasks."
26132605
type: "integer"
26142606
format: "int64"
26152607
x-nullable: false
2608+
x-omitempty: false
26162609
CpusetCpus:
26172610
description: "CPUs in which to allow execution (e.g., `0-3`, `0,1`)"
26182611
type: "string"
26192612
example: "0-3"
26202613
x-nullable: false
2614+
x-omitempty: false
26212615
CpusetMems:
26222616
description: "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems."
26232617
type: "string"
26242618
x-nullable: false
2619+
x-omitempty: false
26252620
Devices:
26262621
description: "A list of devices to add to the container."
26272622
type: "array"
@@ -2638,42 +2633,50 @@ definitions:
26382633
type: "integer"
26392634
format: "int64"
26402635
x-nullable: false
2636+
x-omitempty: false
26412637
Memory:
26422638
description: "Memory limit in bytes."
26432639
type: "integer"
26442640
default: 0
26452641
x-nullable: false
2642+
x-omitempty: false
26462643
MemoryReservation:
26472644
description: "Memory soft limit in bytes."
26482645
type: "integer"
26492646
format: "int64"
26502647
x-nullable: false
2648+
x-omitempty: false
26512649
MemorySwap:
26522650
description: "Total memory limit (memory + swap). Set as `-1` to enable unlimited swap."
26532651
type: "integer"
26542652
format: "int64"
26552653
x-nullable: false
2654+
x-omitempty: false
26562655
MemorySwappiness:
26572656
description: "Tune a container's memory swappiness behavior. Accepts an integer between 0 and 100."
26582657
type: "integer"
26592658
format: "int64"
26602659
minimum: 0
26612660
maximum: 100
2661+
x-omitempty: false
26622662
NanoCpus:
26632663
description: "CPU quota in units of 10<sup>-9</sup> CPUs."
26642664
type: "integer"
26652665
format: "int64"
26662666
x-nullable: false
2667+
x-omitempty: false
26672668
OomKillDisable:
26682669
description: "Disable OOM Killer for the container."
26692670
type: "boolean"
26702671
x-nullable: true
2672+
x-omitempty: false
26712673
PidsLimit:
26722674
description: |
26732675
Tune a container's pids limit. Set -1 for unlimited. Only on Linux 4.4 does this parameter support.
26742676
type: "integer"
26752677
format: "int64"
26762678
x-nullable: false
2679+
x-omitempty: false
26772680
Ulimits:
26782681
description: |
26792682
A list of resource limits to set in the container. For example: `{"Name": "nofile", "Soft": 1024, "Hard": 2048}`"
@@ -2688,27 +2691,32 @@ definitions:
26882691
type: "integer"
26892692
format: "int64"
26902693
x-nullable: false
2694+
x-omitempty: false
26912695
CpuPercent:
26922696
description: |
26932697
The usable percentage of the available CPUs (Windows only).
26942698
On Windows Server containers, the processor resource controls are mutually exclusive. The order of precedence is `CPUCount` first, then `CPUShares`, and `CPUPercent` last.
26952699
type: "integer"
26962700
format: "int64"
26972701
x-nullable: false
2702+
x-omitempty: false
26982703
IOMaximumIOps:
26992704
description: "Maximum IOps for the container system drive (Windows only)"
27002705
type: "integer"
27012706
format: "uint64"
27022707
x-nullable: false
2708+
x-omitempty: false
27032709
IOMaximumBandwidth:
27042710
description: "Maximum IO in bytes per second for the container system drive (Windows only)"
27052711
type: "integer"
27062712
format: "uint64"
27072713
x-nullable: false
2714+
x-omitempty: false
27082715
IntelRdtL3Cbm:
27092716
description: "IntelRdtL3Cbm specifies settings for Intel RDT/CAT group that the container is placed into to limit the resources (e.g., L3 cache) the container has available."
27102717
type: "string"
27112718
x-nullable: false
2719+
x-omitempty: false
27122720

27132721
# applicable to AliKenerl 4.9
27142722
ScheLatSwitch:
@@ -2718,6 +2726,7 @@ definitions:
27182726
minimum: 0
27192727
maximum: 1
27202728
x-nullable: false
2729+
x-omitempty: false
27212730
MemoryWmarkRatio:
27222731
description: |
27232732
MemoryWmarkRatio is an integer value representing this container's memory low water mark percentage.
@@ -2727,6 +2736,7 @@ definitions:
27272736
x-nullable: true
27282737
minimum: 0
27292738
maximum: 100
2739+
x-omitempty: false
27302740
MemoryExtra:
27312741
description: |
27322742
MemoryExtra is an integer value representing this container's memory high water mark percentage.
@@ -2736,13 +2746,15 @@ definitions:
27362746
x-nullable: true
27372747
minimum: 0
27382748
maximum: 100
2749+
x-omitempty: false
27392750
MemoryForceEmptyCtl:
27402751
description: "MemoryForceEmptyCtl represents whether to reclaim the page cache when deleting cgroup."
27412752
type: "integer"
27422753
format: "int64"
27432754
x-nullable: false
27442755
minimum: 0
27452756
maximum: 1
2757+
x-omitempty: false
27462758
NvidiaConfig:
27472759
$ref: "#/definitions/NvidiaConfig"
27482760

apis/types/auth_config.go

Lines changed: 0 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apis/types/auth_response.go

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)