diff options
Diffstat (limited to 'module/ri-base/src/main/java/io/trygvis/rules/dba/Container.java')
-rw-r--r-- | module/ri-base/src/main/java/io/trygvis/rules/dba/Container.java | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/module/ri-base/src/main/java/io/trygvis/rules/dba/Container.java b/module/ri-base/src/main/java/io/trygvis/rules/dba/Container.java new file mode 100644 index 0000000..3888661 --- /dev/null +++ b/module/ri-base/src/main/java/io/trygvis/rules/dba/Container.java @@ -0,0 +1,59 @@ +package io.trygvis.rules.dba; + +import com.fasterxml.jackson.annotation.JsonIdentityReference; +import io.trygvis.rules.machine.Machine; +import io.trygvis.rules.machine.MachineSpecification; + +//@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id") +public class Container { + public final String id; + +// @JsonIdentityReference(alwaysAsId = true) + public final Cluster cluster; + public final String name; + public final String machineRole; + public final String image; + public final String tag; + + private Machine machine; + public final MachineSpecification machineSpecification; + + public Container(Cluster cluster, String name, String machineRole, String image, String tag, + MachineSpecification machineSpecification) { + this.id = cluster.name + "-" + name; + this.cluster = cluster; + this.name = name; + this.machineRole = machineRole; + this.image = image; + this.tag = tag; + this.machineSpecification = machineSpecification; + } + + public Cluster getCluster() { + return cluster; + } + + public String getName() { + return name; + } + + public String getMachineRole() { + return machineRole; + } + + public String getImage() { + return image; + } + + public String getTag() { + return tag; + } + + public Machine getMachine() { + return machine; + } + + public void setMachine(Machine machine) { + this.machine = machine; + } +} |