diff options
author | Steve Smokowski <ss835w@att.com> | 2020-08-05 18:32:43 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-08-05 18:32:43 +0000 |
commit | f7b681dfe48e1747eac2ebadba0939bea031d5fa (patch) | |
tree | fa7f0d278e37209baad4eef16604d5aa915228d7 | |
parent | 906a193a033d4beab261a23a2d1616f9641bdd6b (diff) | |
parent | 4b0c368ea229595e1c55e414fdfeac3fd6f36147 (diff) |
Merge "Added distro and version to the image bean for retrieveal"
-rw-r--r-- | glance-model/src/main/java/com/woorea/openstack/glance/model/Image.java | 22 | ||||
-rw-r--r-- | glance-model/src/test/java/com/woorea/openstack/glance/model/ImageTest.java | 10 |
2 files changed, 31 insertions, 1 deletions
diff --git a/glance-model/src/main/java/com/woorea/openstack/glance/model/Image.java b/glance-model/src/main/java/com/woorea/openstack/glance/model/Image.java index 7078edc..8e3c1e3 100644 --- a/glance-model/src/main/java/com/woorea/openstack/glance/model/Image.java +++ b/glance-model/src/main/java/com/woorea/openstack/glance/model/Image.java @@ -129,6 +129,12 @@ public class Image implements Serializable { @JsonProperty("meta") private String meta; + @JsonProperty("os_version") + private String osVersion; + + @JsonProperty("os_distro") + private String osDistro; + @JsonProperty("tags") private List<String> tags; @@ -508,6 +514,22 @@ public class Image implements Serializable { return properties; } + public String getOsVersion() { + return osVersion; + } + + public void setOsVersion(String osVersion) { + this.osVersion = osVersion; + } + + public String getOsDistro() { + return osDistro; + } + + public void setOsDistro(String osDistro) { + this.osDistro = osDistro; + } + /* * (non-Javadoc) * diff --git a/glance-model/src/test/java/com/woorea/openstack/glance/model/ImageTest.java b/glance-model/src/test/java/com/woorea/openstack/glance/model/ImageTest.java index 45d33f7..dd8e314 100644 --- a/glance-model/src/test/java/com/woorea/openstack/glance/model/ImageTest.java +++ b/glance-model/src/test/java/com/woorea/openstack/glance/model/ImageTest.java @@ -36,7 +36,8 @@ public class ImageTest { private static final String EOL = System.lineSeparator(); private static final String JSON_FULL = "{" + EOL + " \"id\" : \"id\"," + EOL + " \"uri\" : \"uri\"," + EOL - + " \"name\" : \"name\"," + EOL + " \"size\" : 43," + EOL + " \"checksum\" : \"checksum\"," + EOL + + " \"name\" : \"name\"," + EOL + " \"os_distro\" : \"gw\"," + EOL + " \"os_version\" : \"1\"," + + EOL + " \"size\" : 43," + EOL + " \"checksum\" : \"checksum\"," + EOL + " \"status\" : \"status\"," + EOL + " \"owner\" : \"owner\"," + EOL + " \"properties\" : {" + EOL + " \"properties-k1\" : \"properties-v1\"," + EOL + " \"properties-k2\" : \"properties-v2\"" + EOL + " }," + EOL + " \"public\" : false," + EOL + " \"deleted\" : false," + EOL @@ -128,5 +129,12 @@ public class ImageTest { Calendar updatedAt = image.getUpdatedAt(); Assert.assertNotNull(updatedAt); image.setUpdatedAt(updatedAt); + + String distro = image.getOsDistro(); + Assert.assertNotNull(distro); + + String version = image.getOsVersion(); + Assert.assertNotNull(version); + } } |