You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2016/08/30 09:35:26 UTC
[02/50] jclouds git commit: Add option to remove a volume,
when removing docker container
Add option to remove a volume, when removing docker container
Project: http://git-wip-us.apache.org/repos/asf/jclouds/repo
Commit: http://git-wip-us.apache.org/repos/asf/jclouds/commit/867b7f52
Tree: http://git-wip-us.apache.org/repos/asf/jclouds/tree/867b7f52
Diff: http://git-wip-us.apache.org/repos/asf/jclouds/diff/867b7f52
Branch: refs/heads/master
Commit: 867b7f52e4dc7a0c6b45203c3f679fe5c7be0b58
Parents: 26d925c
Author: Jakub Bartecek <jb...@redhat.com>
Authored: Mon May 4 16:45:25 2015 +0200
Committer: Ignasi Barrera <na...@apache.org>
Committed: Tue May 5 10:55:38 2015 +0200
----------------------------------------------------------------------
.../docker/options/RemoveContainerOptions.java | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jclouds/blob/867b7f52/apis/docker/src/main/java/org/jclouds/docker/options/RemoveContainerOptions.java
----------------------------------------------------------------------
diff --git a/apis/docker/src/main/java/org/jclouds/docker/options/RemoveContainerOptions.java b/apis/docker/src/main/java/org/jclouds/docker/options/RemoveContainerOptions.java
index 9334e69..7534695 100644
--- a/apis/docker/src/main/java/org/jclouds/docker/options/RemoveContainerOptions.java
+++ b/apis/docker/src/main/java/org/jclouds/docker/options/RemoveContainerOptions.java
@@ -29,6 +29,17 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
this.queryParameters.put("force", force.toString());
return this;
}
+
+ /**
+ * Remove the volumes associated to the container
+ *
+ * @param volume If set to true the volume associated to the container will be removed.
+ * Otherwise it will not be removed.
+ */
+ public RemoveContainerOptions volume(Boolean volume) {
+ this.queryParameters.put("v", volume.toString());
+ return this;
+ }
public static class Builder {
/**
@@ -46,5 +57,13 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
RemoveContainerOptions options = new RemoveContainerOptions();
return options.force(force);
}
+
+ /**
+ * @see RemoveContainerOptions#volume
+ */
+ public static RemoveContainerOptions volume(Boolean volume) {
+ RemoveContainerOptions options = new RemoveContainerOptions();
+ return options.volume(volume);
+ }
}
}