diff options
author | ralph isenmann | 2021-06-23 14:45:25 +0200 |
---|---|---|
committer | ralph isenmann | 2021-06-23 14:45:25 +0200 |
commit | b15889038b640f240555b1bab26997aa068c263b (patch) | |
tree | fb41e9bb650352f34685bf3be247c3b08e27e624 /src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java | |
parent | Add Libvirt PCI, shared memory and hypervisor features for GPU passthrough (diff) | |
download | master-sync-shared-b15889038b640f240555b1bab26997aa068c263b.tar.gz master-sync-shared-b15889038b640f240555b1bab26997aa068c263b.tar.xz master-sync-shared-b15889038b640f240555b1bab26997aa068c263b.zip |
Add container models, which keeps the necessary informations about container imags, its meta information and for lecture specific information
Diffstat (limited to 'src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java')
-rw-r--r-- | src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java | 62 |
1 files changed, 62 insertions, 0 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 new file mode 100644 index 0000000..ca8f35f --- /dev/null +++ b/src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java @@ -0,0 +1,62 @@ +package org.openslx.virtualization.configuration.container; + +import java.util.Objects; + +/** + * This class implements a model for a bind mount entry in the docker context + * (eg. docker run ... --mount type=bind,source=source,target=target,options ... ). A list of objects of this class is stored in + * {@link ContainerMeta}. + */ +public class ContainerBindMount { + + private String source; + private String target; + private String options; + + public ContainerBindMount() { + } + + public ContainerBindMount(String source, String target, String options) { + this.source = source; + this.target = target; + this.options = options; + } + + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public String getTarget() { + return target; + } + + public void setTarget(String target) { + this.target = target; + } + + public String getOptions() { + return options; + } + + public void setOptions(String options) { + this.options = options; + } + + @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); + } + + @Override public int hashCode() { + return Objects.hash(source, target, options); + } +} |