Skip to content

Commit 1d6c344

Browse files
authored
Add some missed options to UpdateContainerCmd (#2389)
* Add some missed options to UpdateContainerCmd * Delete old cpuPeriod and cpuQuota functions * Add update container response tests
1 parent cb72675 commit 1d6c344

File tree

8 files changed

+420
-22
lines changed

8 files changed

+420
-22
lines changed

docker-java-api/pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@
8787
<configuration>
8888
<parameter>
8989
<excludes>
90-
<!-- Breaking change -->
90+
<exclude>com.github.dockerjava.api.command.UpdateContainerCmd#getCpuPeriod()</exclude>
91+
<exclude>com.github.dockerjava.api.command.UpdateContainerCmd#withCpuPeriod(java.lang.Integer)</exclude>
92+
<exclude>com.github.dockerjava.api.command.UpdateContainerCmd#getCpuQuota()</exclude>
93+
<exclude>com.github.dockerjava.api.command.UpdateContainerCmd#withCpuQuota(java.lang.Integer)</exclude>
9194
<exclude>com.github.dockerjava.api.command.InspectContainerResponse#getSizeRootFs()</exclude>
9295
<exclude>com.github.dockerjava.api.command.InspectContainerResponse#getSizeRw()</exclude>
9396
</excludes>

docker-java-api/src/main/java/com/github/dockerjava/api/command/UpdateContainerCmd.java

Lines changed: 92 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
package com.github.dockerjava.api.command;
22

3+
import com.github.dockerjava.api.model.BlkioRateDevice;
4+
import com.github.dockerjava.api.model.BlkioWeightDevice;
5+
import com.github.dockerjava.api.model.Device;
6+
import com.github.dockerjava.api.model.DeviceRequest;
7+
import com.github.dockerjava.api.model.RestartPolicy;
8+
import com.github.dockerjava.api.model.Ulimit;
39
import com.github.dockerjava.api.model.UpdateContainerResponse;
410

511
import javax.annotation.CheckForNull;
612
import javax.annotation.Nonnull;
13+
import java.util.List;
714

815
/**
916
* @author Kanstantsin Shautsou
@@ -13,22 +20,47 @@ public interface UpdateContainerCmd extends SyncDockerCmd<UpdateContainerRespons
1320
@CheckForNull
1421
String getContainerId();
1522

23+
UpdateContainerCmd withContainerId(@Nonnull String containerId);
24+
1625
@CheckForNull
1726
Integer getBlkioWeight();
1827

1928
UpdateContainerCmd withBlkioWeight(Integer blkioWeight);
2029

21-
UpdateContainerCmd withContainerId(@Nonnull String containerId);
30+
@CheckForNull
31+
List<BlkioWeightDevice> getBlkioWeightDevice();
32+
33+
UpdateContainerCmd withBlkioWeightDevice(List<BlkioWeightDevice> blkioWeightDevice);
2234

2335
@CheckForNull
24-
Integer getCpuPeriod();
36+
List<BlkioRateDevice> getBlkioDeviceReadBps();
2537

26-
UpdateContainerCmd withCpuPeriod(Integer cpuPeriod);
38+
UpdateContainerCmd withBlkioDeviceReadBps(List<BlkioRateDevice> blkioDeviceReadBps);
2739

2840
@CheckForNull
29-
Integer getCpuQuota();
41+
List<BlkioRateDevice> getBlkioDeviceWriteBps();
3042

31-
UpdateContainerCmd withCpuQuota(Integer cpuQuota);
43+
UpdateContainerCmd withBlkioDeviceWriteBps(List<BlkioRateDevice> blkioDeviceWriteBps);
44+
45+
@CheckForNull
46+
List<BlkioRateDevice> getBlkioDeviceReadIOps();
47+
48+
UpdateContainerCmd withBlkioDeviceReadIOps(List<BlkioRateDevice> blkioDeviceReadIOps);
49+
50+
@CheckForNull
51+
List<BlkioRateDevice> getBlkioDeviceWriteIOps();
52+
53+
UpdateContainerCmd withBlkioDeviceWriteIOps(List<BlkioRateDevice> blkioDeviceWriteIOps);
54+
55+
@CheckForNull
56+
Long getCpuPeriod();
57+
58+
UpdateContainerCmd withCpuPeriod(Long cpuPeriod);
59+
60+
@CheckForNull
61+
Long getCpuQuota();
62+
63+
UpdateContainerCmd withCpuQuota(Long cpuQuota);
3264

3365
@CheckForNull
3466
String getCpusetCpus();
@@ -45,6 +77,31 @@ public interface UpdateContainerCmd extends SyncDockerCmd<UpdateContainerRespons
4577

4678
UpdateContainerCmd withCpuShares(Integer cpuShares);
4779

80+
@CheckForNull
81+
Long getCpuRealtimePeriod();
82+
83+
UpdateContainerCmd withCpuRealtimePeriod(Long cpuRealtimePeriod);
84+
85+
@CheckForNull
86+
Long getCpuRealtimeRuntime();
87+
88+
UpdateContainerCmd withCpuRealtimeRuntime(Long cpuRealtimeRuntime);
89+
90+
@CheckForNull
91+
List<Device> getDevices();
92+
93+
UpdateContainerCmd withDevices(List<Device> devices);
94+
95+
@CheckForNull
96+
List<String> getDeviceCgroupRules();
97+
98+
UpdateContainerCmd withDeviceCgroupRules(List<String> deviceCgroupRules);
99+
100+
@CheckForNull
101+
List<DeviceRequest> getDeviceRequests();
102+
103+
UpdateContainerCmd withDeviceRequests(List<DeviceRequest> deviceRequests);
104+
48105
@CheckForNull
49106
Long getKernelMemory();
50107

@@ -65,6 +122,36 @@ public interface UpdateContainerCmd extends SyncDockerCmd<UpdateContainerRespons
65122

66123
UpdateContainerCmd withMemorySwap(Long memorySwap);
67124

125+
@CheckForNull
126+
Long getNanoCPUs();
127+
128+
UpdateContainerCmd withNanoCPUs(Long nanoCPUs);
129+
130+
@CheckForNull
131+
Boolean getOomKillDisable();
132+
133+
UpdateContainerCmd withOomKillDisable(Boolean oomKillDisable);
134+
135+
@CheckForNull
136+
Boolean getInit();
137+
138+
UpdateContainerCmd withInit(Boolean init);
139+
140+
@CheckForNull
141+
Long getPidsLimit();
142+
143+
UpdateContainerCmd withPidsLimit(Long pidsLimit);
144+
145+
@CheckForNull
146+
List<Ulimit> getUlimits();
147+
148+
UpdateContainerCmd withUlimits(List<Ulimit> ulimits);
149+
150+
@CheckForNull
151+
RestartPolicy getRestartPolicy();
152+
153+
UpdateContainerCmd withRestartPolicy(RestartPolicy restartPolicy);
154+
68155
interface Exec extends DockerCmdSyncExec<UpdateContainerCmd, UpdateContainerResponse> {
69156
}
70157
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy