summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorralph isenmann2021-11-10 16:07:06 +0100
committerralph isenmann2021-11-10 16:07:06 +0100
commit3d421999e1cd9df1ff352b3d6a888db8ff4c86b9 (patch)
treedb02332e5ccda5bf5175b653c5288a19f486753a
parentMerge branch 'master' of git.openslx.org:bwlp/master-sync-shared (diff)
parentMerge branch 'master' into feature/docker-data-container (diff)
downloadmaster-sync-shared-3d421999e1cd9df1ff352b3d6a888db8ff4c86b9.tar.gz
master-sync-shared-3d421999e1cd9df1ff352b3d6a888db8ff4c86b9.tar.xz
master-sync-shared-3d421999e1cd9df1ff352b3d6a888db8ff4c86b9.zip
Merge branch 'feature/docker-data-container'
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java30
1 files changed, 21 insertions, 9 deletions
diff --git a/src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java b/src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java
index ca8f35f..0c1788e 100644
--- a/src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java
+++ b/src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java
@@ -9,14 +9,25 @@ import java.util.Objects;
*/
public class ContainerBindMount {
- private String source;
- private String target;
- private String options;
+ public enum ContainerMountType {
+ DEFAULT,
+ CONTAINER_IMAGE
+ }
+
+ private ContainerMountType mount_type = ContainerMountType.DEFAULT;
+ private String source = "";
+ private String target = "";
+ private String options = "";
public ContainerBindMount() {
}
public ContainerBindMount(String source, String target, String options) {
+ this(ContainerMountType.DEFAULT,source,target,options);
+ }
+
+ public ContainerBindMount(ContainerMountType mount_type, String source, String target, String options) {
+ this.mount_type = mount_type;
this.source = source;
this.target = target;
this.options = options;
@@ -26,10 +37,6 @@ public class ContainerBindMount {
return source;
}
- public void setSource(String source) {
- this.source = source;
- }
-
public String getTarget() {
return target;
}
@@ -46,14 +53,19 @@ public class ContainerBindMount {
this.options = options;
}
+ public ContainerMountType getMountType() {
+ return this.mount_type;
+ }
+
+
@Override public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
ContainerBindMount that = (ContainerBindMount) o;
- return Objects.equals(source, that.source) && Objects.equals(target, that.target) && Objects.equals(
- options, that.options);
+ return Objects.equals(source, that.source) && Objects.equals(mount_type, that.mount_type)
+ && Objects.equals(target, that.target) && Objects.equals(options, that.options);
}
@Override public int hashCode() {