mirror of https://github.com/apache/jclouds.git
Add option to remove a volume, when removing docker container
This commit is contained in:
parent
26d925c2de
commit
867b7f52e4
|
@ -30,6 +30,17 @@ public class RemoveContainerOptions extends BaseHttpRequestOptions {
|
|||
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 {
|
||||
/**
|
||||
* @see RemoveContainerOptions#verbose
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue