diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-23 15:05:10 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-23 15:05:10 +0100 |
commit | b8aea45af19d61a51ab0f568aee8e2e731dccaa7 (patch) | |
tree | fd8eb583f99200eb7703adfec7fd793e59b38e37 /module/ri-engine/src/main/java/io/trygvis/rules/dba/Container.java | |
parent | 2616847e01f34926f80da6b9661bf1c08e67722f (diff) | |
parent | e2f4aefa956bb06b1ee52d95ad8275757605678d (diff) | |
download | rules-sandbox-b8aea45af19d61a51ab0f568aee8e2e731dccaa7.tar.gz rules-sandbox-b8aea45af19d61a51ab0f568aee8e2e731dccaa7.tar.bz2 rules-sandbox-b8aea45af19d61a51ab0f568aee8e2e731dccaa7.tar.xz rules-sandbox-b8aea45af19d61a51ab0f568aee8e2e731dccaa7.zip |
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'module/ri-engine/src/main/java/io/trygvis/rules/dba/Container.java')
-rw-r--r-- | module/ri-engine/src/main/java/io/trygvis/rules/dba/Container.java | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/module/ri-engine/src/main/java/io/trygvis/rules/dba/Container.java b/module/ri-engine/src/main/java/io/trygvis/rules/dba/Container.java index 6df939d..f6d2ba4 100644 --- a/module/ri-engine/src/main/java/io/trygvis/rules/dba/Container.java +++ b/module/ri-engine/src/main/java/io/trygvis/rules/dba/Container.java @@ -1,17 +1,55 @@ package io.trygvis.rules.dba; +import com.fasterxml.jackson.annotation.JsonIdentityReference; +import io.trygvis.rules.machine.Machine; + +//@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id") public class Container { - public Cluster cluster; - public String name; - public String machineRole; - public String image; - public String tag; + 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 Container(Cluster cluster, String name, String machineRole, String image, String tag) { + this.id = cluster.name + "-" + name; this.cluster = cluster; this.name = name; this.machineRole = machineRole; this.image = image; this.tag = tag; } + + 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; + } } |