From 2e984294ac28c6f2ede290c38164c5d536ccaf4a Mon Sep 17 00:00:00 2001 From: ChrisC Date: Tue, 31 Jan 2017 13:57:24 +0100 Subject: Initial OpenECOMP MSO OpenStack SDK lib commit Change-Id: Ieaacb2b2c0dcc469669880e73f0cda9fa59a6c5a Signed-off-by: ChrisC --- nova-model/pom.xml | 12 + .../woorea/openstack/nova/model/Certificate.java | 36 ++ .../com/woorea/openstack/nova/model/Cloudpipe.java | 134 +++++ .../woorea/openstack/nova/model/Cloudpipes.java | 28 + .../com/woorea/openstack/nova/model/Extension.java | 75 +++ .../woorea/openstack/nova/model/Extensions.java | 34 ++ .../com/woorea/openstack/nova/model/Flavor.java | 239 ++++++++ .../openstack/nova/model/FlavorForCreate.java | 142 +++++ .../com/woorea/openstack/nova/model/Flavors.java | 34 ++ .../woorea/openstack/nova/model/FloatingIp.java | 67 +++ .../openstack/nova/model/FloatingIpDomain.java | 58 ++ .../openstack/nova/model/FloatingIpDomains.java | 34 ++ .../openstack/nova/model/FloatingIpPools.java | 57 ++ .../woorea/openstack/nova/model/FloatingIps.java | 34 ++ .../java/com/woorea/openstack/nova/model/Host.java | 109 ++++ .../woorea/openstack/nova/model/HostAggregate.java | 110 ++++ .../openstack/nova/model/HostAggregates.java | 34 ++ .../com/woorea/openstack/nova/model/Hosts.java | 77 +++ .../com/woorea/openstack/nova/model/Image.java | 232 ++++++++ .../openstack/nova/model/ImageFromVolume.java | 112 ++++ .../com/woorea/openstack/nova/model/Images.java | 35 ++ .../com/woorea/openstack/nova/model/KeyPair.java | 98 ++++ .../com/woorea/openstack/nova/model/KeyPairs.java | 46 ++ .../com/woorea/openstack/nova/model/Limits.java | 394 +++++++++++++ .../java/com/woorea/openstack/nova/model/Link.java | 42 ++ .../com/woorea/openstack/nova/model/Metadata.java | 26 + .../com/woorea/openstack/nova/model/Network.java | 290 ++++++++++ .../openstack/nova/model/NetworkForCreate.java | 29 + .../com/woorea/openstack/nova/model/Networks.java | 34 ++ .../openstack/nova/model/PersonalityFile.java | 39 ++ .../com/woorea/openstack/nova/model/QuotaSet.java | 156 ++++++ .../woorea/openstack/nova/model/SecurityGroup.java | 207 +++++++ .../nova/model/SecurityGroupForCreate.java | 64 +++ .../nova/model/SecurityGroupRuleForCreate.java | 198 +++++++ .../openstack/nova/model/SecurityGroups.java | 34 ++ .../com/woorea/openstack/nova/model/Server.java | 514 +++++++++++++++++ .../woorea/openstack/nova/model/ServerAction.java | 610 +++++++++++++++++++++ .../openstack/nova/model/ServerForCreate.java | 326 +++++++++++ .../com/woorea/openstack/nova/model/Servers.java | 34 ++ .../openstack/nova/model/SimpleTenantUsage.java | 232 ++++++++ .../openstack/nova/model/SimpleTenantUsages.java | 34 ++ .../com/woorea/openstack/nova/model/Snapshot.java | 87 +++ .../openstack/nova/model/SnapshotForCreate.java | 87 +++ .../com/woorea/openstack/nova/model/Snapshots.java | 34 ++ .../com/woorea/openstack/nova/model/Volume.java | 116 ++++ .../openstack/nova/model/VolumeAttachment.java | 59 ++ .../openstack/nova/model/VolumeAttachments.java | 34 ++ .../openstack/nova/model/VolumeForCreate.java | 123 +++++ .../openstack/nova/model/VolumeForImageCreate.java | 71 +++ .../woorea/openstack/nova/model/VolumeType.java | 10 + .../woorea/openstack/nova/model/VolumeTypes.java | 34 ++ .../com/woorea/openstack/nova/model/Volumes.java | 34 ++ 52 files changed, 5789 insertions(+) create mode 100644 nova-model/pom.xml create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Certificate.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipe.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipes.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Extension.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Extensions.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Flavor.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/FlavorForCreate.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Flavors.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIp.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomain.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomains.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpPools.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIps.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Host.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregate.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregates.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Hosts.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Image.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/ImageFromVolume.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Images.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPair.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Limits.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Link.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Metadata.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Network.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/NetworkForCreate.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Networks.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/PersonalityFile.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/QuotaSet.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroup.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupForCreate.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroups.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/ServerForCreate.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Servers.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsage.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsages.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshot.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/SnapshotForCreate.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshots.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Volume.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachment.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachments.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForCreate.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForImageCreate.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeType.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeTypes.java create mode 100644 nova-model/src/main/java/com/woorea/openstack/nova/model/Volumes.java (limited to 'nova-model') diff --git a/nova-model/pom.xml b/nova-model/pom.xml new file mode 100644 index 0000000..8e4c550 --- /dev/null +++ b/nova-model/pom.xml @@ -0,0 +1,12 @@ + + 4.0.0 + + org.openecomp.mso.libs + openstack-java-sdk + 1.0.0-SNAPSHOT + + org.openecomp.mso.libs.openstack-java-sdk + nova-model + OpenStack Nova Model + OpenStack Nova Model + \ No newline at end of file diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Certificate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Certificate.java new file mode 100644 index 0000000..b69eb3c --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Certificate.java @@ -0,0 +1,36 @@ +package com.woorea.openstack.nova.model; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("certificate") +public class Certificate { + + private String data; + + @JsonProperty("private_key") + private String privateKey; + + /** + * @return the data + */ + public String getData() { + return data; + } + + /** + * @return the privateKey + */ + public String getPrivateKey() { + return privateKey; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Certificate [data=" + data + ", privateKey=" + privateKey + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipe.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipe.java new file mode 100644 index 0000000..69d1b5a --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipe.java @@ -0,0 +1,134 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Calendar; + +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("cloudpipe") +public class Cloudpipe implements Serializable { + + private String projectId; + + private String internalIp; + + private String publicIp; + + private String publicPort; + + private String state; + + private String instanceId; + + private Calendar createdAt; + + /** + * @return the projectId + */ + public String getProjectId() { + return projectId; + } + + /** + * @param projectId the projectId to set + */ + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + /** + * @return the internalIp + */ + public String getInternalIp() { + return internalIp; + } + + /** + * @param internalIp the internalIp to set + */ + public void setInternalIp(String internalIp) { + this.internalIp = internalIp; + } + + /** + * @return the publicIp + */ + public String getPublicIp() { + return publicIp; + } + + /** + * @param publicIp the publicIp to set + */ + public void setPublicIp(String publicIp) { + this.publicIp = publicIp; + } + + /** + * @return the publicPort + */ + public String getPublicPort() { + return publicPort; + } + + /** + * @param publicPort the publicPort to set + */ + public void setPublicPort(String publicPort) { + this.publicPort = publicPort; + } + + /** + * @return the state + */ + public String getState() { + return state; + } + + /** + * @param state the state to set + */ + public void setState(String state) { + this.state = state; + } + + /** + * @return the instanceId + */ + public String getInstanceId() { + return instanceId; + } + + /** + * @param instanceId the instanceId to set + */ + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + + /** + * @return the createdAt + */ + public Calendar getCreatedAt() { + return createdAt; + } + + /** + * @param createdAt the createdAt to set + */ + public void setCreatedAt(Calendar createdAt) { + this.createdAt = createdAt; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "CloudPipe [projectId=" + projectId + ", internalIp=" + + internalIp + ", publicIp=" + publicIp + ", publicPort=" + + publicPort + ", state=" + state + ", instanceId=" + + instanceId + ", createdAt=" + createdAt + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipes.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipes.java new file mode 100644 index 0000000..3a3f13e --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Cloudpipes.java @@ -0,0 +1,28 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Cloudpipes implements Serializable { + + @JsonProperty("cloudpipes") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Flavors [list=" + list + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Extension.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Extension.java new file mode 100644 index 0000000..20892b7 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Extension.java @@ -0,0 +1,75 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Calendar; +import java.util.List; + +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("extension") +public class Extension implements Serializable { + + private String alias; + + private String description; + + private String name; + + private String namespace; + + private Calendar updated; + + private List links; + + /** + * @return the alias + */ + public String getAlias() { + return alias; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @return the namespace + */ + public String getNamespace() { + return namespace; + } + + /** + * @return the updated + */ + public Calendar getUpdated() { + return updated; + } + + /** + * @return the links + */ + public List getLinks() { + return links; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Extension [alias=" + alias + ", description=" + description + + ", name=" + name + ", namespace=" + namespace + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Extensions.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Extensions.java new file mode 100644 index 0000000..5d049d9 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Extensions.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Extensions implements Iterable, Serializable { + + @JsonProperty("extensions") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Extensions [list=" + list + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavor.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavor.java new file mode 100644 index 0000000..1076062 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavor.java @@ -0,0 +1,239 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("flavor") +public class Flavor implements Serializable { + + private String id; + + private String name; + + private Integer vcpus; + + private Integer ram; + + private Integer disk; + + @JsonProperty("OS-FLV-EXT-DATA:ephemeral") + private Integer ephemeral; + + private String swap; + + @JsonProperty("rxtx_factor") + private Float rxtxFactor; + + @JsonProperty("OS-FLV-DISABLED:disabled") + private Boolean disabled; + + @JsonProperty("rxtx_quota") + private Integer rxtxQuota; + + @JsonProperty("rxtx_cap") + private Integer rxtxCap; + + private List links; + + @JsonProperty("os-flavor-access:is_public") + private Boolean isPublic; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(String id) { + this.id = id; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the vcpus + */ + public Integer getVcpus() { + return vcpus; + } + + /** + * @param vcpus the vcpus to set + */ + public void setVcpus(Integer vcpus) { + this.vcpus = vcpus; + } + + /** + * @return the ram + */ + public Integer getRam() { + return ram; + } + + /** + * @param ram the ram to set + */ + public void setRam(Integer ram) { + this.ram = ram; + } + + /** + * @return the disk + */ + public Integer getDisk() { + return disk; + } + + /** + * @param disk the disk to set + */ + public void setDisk(Integer disk) { + this.disk = disk; + } + + /** + * @return the ephemeral + */ + public Integer getEphemeral() { + return ephemeral; + } + + /** + * @param ephemeral the ephemeral to set + */ + public void setEphemeral(Integer ephemeral) { + this.ephemeral = ephemeral; + } + + /** + * @return the swap + */ + public String getSwap() { + return swap; + } + + /** + * @param swap the swap to set + */ + public void setSwap(String swap) { + this.swap = swap; + } + + /** + * @return the rxtxFactor + */ + public Float getRxtxFactor() { + return rxtxFactor; + } + + /** + * @param rxtxFactor the rxtxFactor to set + */ + public void setRxtxFactor(Float rxtxFactor) { + this.rxtxFactor = rxtxFactor; + } + + /** + * @return the rxtxQuota + */ + public Integer getRxtxQuota() { + return rxtxQuota; + } + + /** + * @param rxtxQuota the rxtxQuota to set + */ + public void setRxtxQuota(Integer rxtxQuota) { + this.rxtxQuota = rxtxQuota; + } + + /** + * @return the rxtxCap + */ + public Integer getRxtxCap() { + return rxtxCap; + } + + /** + * @param rxtxCap the rxtxCap to set + */ + public void setRxtxCap(Integer rxtxCap) { + this.rxtxCap = rxtxCap; + } + + /** + * @return the disabled + */ + public Boolean getDisabled() { + return disabled; + } + + /** + * @param disabled the disabled to set + */ + public void setDisabled(Boolean disabled) { + this.disabled = disabled; + } + + /** + * @return the isPublic + */ + public Boolean isPublic() { + return isPublic; + } + + /** + * @param isPublic the isPublic to set + */ + public void setPublic(Boolean isPublic) { + this.isPublic = isPublic; + } + + /** + * @return the links + */ + public List getLinks() { + return links; + } + + /** + * @param links the links to set + */ + public void setLinks(List links) { + this.links = links; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Flavor [id=" + id + ", name=" + name + ", vcpus=" + vcpus + + ", ram=" + ram + ", disk=" + disk + ", ephemeral=" + + ephemeral + ", swap=" + swap + ", rxtxFactor=" + rxtxFactor + + ", disabled=" + disabled + ", rxtxQuota=" + rxtxQuota + + ", rxtxCap=" + rxtxCap + ", links=" + links + ", isPublic=" + + isPublic + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FlavorForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FlavorForCreate.java new file mode 100644 index 0000000..295096d --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FlavorForCreate.java @@ -0,0 +1,142 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("flavor") +public class FlavorForCreate implements Serializable { + + private String id; + + private String name; + + private String vcpus; + + private Integer ram; + + private String disk; + + @JsonProperty("OS-FLV-EXT-DATA:ephemeral") + private Integer ephemeral; + + private String swap; + + @JsonProperty("rxtx_factor") + private Float rxtxFactor; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(String id) { + this.id = id; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the vcpus + */ + public String getVcpus() { + return vcpus; + } + + /** + * @param vcpus the vcpus to set + */ + public void setVcpus(String vcpus) { + this.vcpus = vcpus; + } + + /** + * @return the ram + */ + public Integer getRam() { + return ram; + } + + /** + * @param ram the ram to set + */ + public void setRam(Integer ram) { + this.ram = ram; + } + + /** + * @return the disk + */ + public String getDisk() { + return disk; + } + + /** + * @param disk the disk to set + */ + public void setDisk(String disk) { + this.disk = disk; + } + + /** + * @return the ephemeral + */ + public Integer getEphemeral() { + return ephemeral; + } + + /** + * @param ephemeral the ephemeral to set + */ + public void setEphemeral(Integer ephemeral) { + this.ephemeral = ephemeral; + } + + /** + * @return the swap + */ + public String getSwap() { + return swap; + } + + /** + * @param swap the swap to set + */ + public void setSwap(String swap) { + this.swap = swap; + } + + /** + * @return the rxtxFactor + */ + public Float getRxtxFactor() { + return rxtxFactor; + } + + /** + * @param rxtxFactor the rxtxFactor to set + */ + public void setRxtxFactor(Float rxtxFactor) { + this.rxtxFactor = rxtxFactor; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavors.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavors.java new file mode 100644 index 0000000..0337a3b --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Flavors.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Flavors implements Iterable, Serializable { + + @JsonProperty("flavors") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Flavors [list=" + list + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIp.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIp.java new file mode 100644 index 0000000..3eda923 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIp.java @@ -0,0 +1,67 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("floating_ip") +public class FloatingIp implements Serializable { + + private String id; + + private String pool; + + private String ip; + + @JsonProperty("fixed_ip") + private String fixedIp; + + @JsonProperty("instance_id") + private String instanceId; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @return the pool + */ + public String getPool() { + return pool; + } + + /** + * @return the ip + */ + public String getIp() { + return ip; + } + + /** + * @return the fixedIp + */ + public String getFixedIp() { + return fixedIp; + } + + /** + * @return the instanceId + */ + public String getInstanceId() { + return instanceId; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "FloatingIp [id=" + id + ", pool=" + pool + ", ip=" + ip + + ", fixedIp=" + fixedIp + ", instanceId=" + instanceId + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomain.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomain.java new file mode 100644 index 0000000..4a6a280 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomain.java @@ -0,0 +1,58 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("floating-ip-pool") +public class FloatingIpDomain implements Serializable { + + private String domain; + + private String scope; + + private String project; + + @JsonProperty("availabilityZone") + private String availabilityZone; + + /** + * @return the domain + */ + public String getDomain() { + return domain; + } + + /** + * @return the scope + */ + public String getScope() { + return scope; + } + + /** + * @return the project + */ + public String getProject() { + return project; + } + + /** + * @return the availabilityZone + */ + public String getAvailabilityZone() { + return availabilityZone; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "FloatingIpDomain [domain=" + domain + ", scope=" + scope + + ", project=" + project + ", availabilityZone=" + + availabilityZone + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomains.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomains.java new file mode 100644 index 0000000..292b59f --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpDomains.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class FloatingIpDomains implements Iterable, Serializable { + + @JsonProperty("domain_entries") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "FloatingIpDomains [list=" + list + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpPools.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpPools.java new file mode 100644 index 0000000..db1c0e3 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIpPools.java @@ -0,0 +1,57 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +import com.woorea.openstack.nova.model.FloatingIpPools.FloatingIpPool; + +public class FloatingIpPools implements Iterable, Serializable { + + public static class FloatingIpPool implements Serializable { + + private String name; + + /** + * @return the name + */ + public String getName() { + return name; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "FloatingIpPool [name=" + name + "]"; + } + + } + + @JsonProperty("floating_ip_pools") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "FloatingIpPools [list=" + list + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIps.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIps.java new file mode 100644 index 0000000..776c4ca --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/FloatingIps.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class FloatingIps implements Iterable, Serializable { + + @JsonProperty("floating_ips") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "FloatingIps [list=" + list + "]"; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Host.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Host.java new file mode 100644 index 0000000..4050964 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Host.java @@ -0,0 +1,109 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Host implements Serializable { + + public static final class ResourceWrapper implements Serializable { + + public static final class Resource implements Serializable { + + private String project; + + @JsonProperty("memory_mb") + private Integer memoryMb; + + private String host; + + private Integer cpu; + + @JsonProperty("disk_gb") + private Integer diskGb; + + /** + * @return the project + */ + public String getProject() { + return project; + } + + /** + * @return the memoryMb + */ + public Integer getMemoryMb() { + return memoryMb; + } + + /** + * @return the host + */ + public String getHost() { + return host; + } + + /** + * @return the cpu + */ + public Integer getCpu() { + return cpu; + } + + /** + * @return the diskGb + */ + public Integer getDiskGb() { + return diskGb; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Resource [project=" + project + ", memoryMb=" + + memoryMb + ", host=" + host + ", cpu=" + cpu + + ", diskGb=" + diskGb + "]"; + } + + } + + private Resource resource; + + /** + * @return the resource + */ + public Resource getResource() { + return resource; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "ResourceWrapper [resource=" + resource + "]"; + } + + } + + private List host; + + /** + * @return the host + */ + public List getHost() { + return host; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Host [host=" + host + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregate.java new file mode 100644 index 0000000..ad68faa --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregate.java @@ -0,0 +1,110 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("aggregate") +public class HostAggregate implements Serializable { + + private String id; + + private String name; + + @JsonProperty("availability_zone") + private String availabilityZone; + + @JsonProperty("created_at") + private String createdAt; + + @JsonProperty("updated_at") + private String updatedAt; + + @JsonProperty("deleted_at") + private String deletedAt; + + private Boolean deleted; + + private List hosts; + + private Map metadata; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @return the availabilityZone + */ + public String getAvailabilityZone() { + return availabilityZone; + } + + /** + * @return the createdAt + */ + public String getCreatedAt() { + return createdAt; + } + + /** + * @return the updatedAt + */ + public String getUpdatedAt() { + return updatedAt; + } + + /** + * @return the deletedAt + */ + public String getDeletedAt() { + return deletedAt; + } + + /** + * @return the deleted + */ + public Boolean getDeleted() { + return deleted; + } + + /** + * @return the hosts + */ + public List getHosts() { + return hosts; + } + + /** + * @return the metadata + */ + public Map getMetadata() { + return metadata; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "HostAggregate [id=" + id + ", name=" + name + + ", availabilityZone=" + availabilityZone + ", createdAt=" + + createdAt + ", updatedAt=" + updatedAt + ", deletedAt=" + + deletedAt + ", deleted=" + deleted + ", hosts=" + hosts + + ", metadata=" + metadata + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregates.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregates.java new file mode 100644 index 0000000..6810e83 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/HostAggregates.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class HostAggregates implements Iterable, Serializable { + + @JsonProperty("aggregates") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "HostAggregates [list=" + list + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Hosts.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Hosts.java new file mode 100644 index 0000000..1bac38e --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Hosts.java @@ -0,0 +1,77 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Hosts implements Iterable, Serializable { + + public static final class Host { + + private String zone; + + @JsonProperty("host_name") + private String hostName; + + private String service; + + /** + * @return the hostName + */ + public String getHostName() { + return hostName; + } + + /** + * @return the service + */ + public String getService() { + return service; + } + + public String getZone() { + return zone; + } + + public void setZone(String zone) { + this.zone = zone; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Host [hostName=" + hostName + ", service=" + service + "]"; + } + + } + + @JsonProperty("hosts") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Hosts [list=" + list + "]"; + } + + + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Image.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Image.java new file mode 100644 index 0000000..93949f2 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Image.java @@ -0,0 +1,232 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Calendar; +import java.util.List; +import java.util.Map; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("image") +public class Image implements Serializable { + + public static final class Server implements Serializable { + + private String id; + + private List links; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @return the links + */ + public List getLinks() { + return links; + } + + @Override + public String toString() { + return "Server [id=" + id + ", links=" + links + "]"; + } + + } + + private String id; + + private String status; + + private String name; + + private Integer progress; + + private Integer minRam; + + private Integer minDisk; + + private Calendar created; + + private Calendar updated; + + @JsonProperty("OS-EXT-IMG-SIZE:size") + private Long size; + + private Map metadata; + + private Server server; + + private List links; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(String id) { + this.id = id; + } + + /** + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * @param status the status to set + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the progress + */ + public Integer getProgress() { + return progress; + } + + /** + * @param progress the progress to set + */ + public void setProgress(Integer progress) { + this.progress = progress; + } + + /** + * @return the minRam + */ + public Integer getMinRam() { + return minRam; + } + + /** + * @param minRam the minRam to set + */ + public void setMinRam(Integer minRam) { + this.minRam = minRam; + } + + /** + * @return the minDisk + */ + public Integer getMinDisk() { + return minDisk; + } + + /** + * @param minDisk the minDisk to set + */ + public void setMinDisk(Integer minDisk) { + this.minDisk = minDisk; + } + + /** + * @return the created + */ + public Calendar getCreated() { + return created; + } + + /** + * @param created the created to set + */ + public void setCreated(Calendar created) { + this.created = created; + } + + /** + * @return the updated + */ + public Calendar getUpdated() { + return updated; + } + + /** + * @param updated the updated to set + */ + public void setUpdated(Calendar updated) { + this.updated = updated; + } + + /** + * @return the metadata + */ + public Map getMetadata() { + return metadata; + } + + /** + * @return the size + */ + public Long getSize() { + return size; + } + + /** + * @param metadata the metadata to set + */ + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + /** + * @return the server + */ + public Server getServer() { + return server; + } + + /** + * @return the links + */ + public List getLinks() { + return links; + } + + /** + * @param links the links to set + */ + public void setLinks(List links) { + this.links = links; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Image [id=" + id + ", status=" + status + ", name=" + name + + ", progress=" + progress + ", minRam=" + minRam + + ", minDisk=" + minDisk + ", created=" + (created != null ? created.getTime() : null) + + ", updated=" + (updated != null ? updated.getTime() : null) + ", size=" + size + ", metadata=" + + metadata + ", server="+server+", links=" + links + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/ImageFromVolume.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/ImageFromVolume.java new file mode 100644 index 0000000..30e38d8 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/ImageFromVolume.java @@ -0,0 +1,112 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("os-volume_upload_image") +public class ImageFromVolume implements Serializable { + + @JsonProperty("id") + String id; + @JsonProperty("updates_at") + String updates_at; + @JsonProperty("status") + String status; + @JsonProperty("display_description") + String display_description; + @JsonProperty("size") + String size; + @JsonProperty("volume_type") + String volume_type; + @JsonProperty("image_id") + String image_id; + @JsonProperty("container_format") + String container_format; + @JsonProperty("disk_format") + String disk_format; + @JsonProperty("image_name") + String image_name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getUpdates_at() { + return updates_at; + } + + public void setUpdates_at(String updates_at) { + this.updates_at = updates_at; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getDisplay_description() { + return display_description; + } + + public void setDisplay_description(String display_description) { + this.display_description = display_description; + } + + public String getSize() { + return size; + } + + public void setSize(String size) { + this.size = size; + } + + public String getVolume_type() { + return volume_type; + } + + public void setVolume_type(String volume_type) { + this.volume_type = volume_type; + } + + public String getImage_id() { + return image_id; + } + + public void setImage_id(String image_id) { + this.image_id = image_id; + } + + public String getContainer_format() { + return container_format; + } + + public void setContainer_format(String container_format) { + this.container_format = container_format; + } + + public String getDisk_format() { + return disk_format; + } + + public void setDisk_format(String disk_format) { + this.disk_format = disk_format; + } + + public String getImage_name() { + return image_name; + } + + public void setImage_name(String image_name) { + this.image_name = image_name; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Images.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Images.java new file mode 100644 index 0000000..e678e97 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Images.java @@ -0,0 +1,35 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Images implements Iterable, Serializable { + + @JsonProperty("images") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Images [list=" + list + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPair.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPair.java new file mode 100644 index 0000000..b2fdb34 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPair.java @@ -0,0 +1,98 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("keypair") +public class KeyPair implements Serializable { + + private String name; + + @JsonProperty("user_id") + private String userId; + + @JsonProperty("public_key") + private String publicKey; + + @JsonProperty("private_key") + private String privateKey; + + private String fingerprint; + + public KeyPair() { + super(); + } + + public KeyPair(String name) { + this.name = name; + } + + public KeyPair(String name, String publicKey) { + this(name); + this.publicKey = publicKey; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the userId + */ + public String getUserId() { + return userId; + } + + /** + * @return the publicKey + */ + public String getPublicKey() { + return publicKey; + } + + /** + * @param publicKey the publicKey to set + */ + public void setPublicKey(String publicKey) { + this.publicKey = publicKey; + } + + /** + * @return the privateKey + */ + public String getPrivateKey() { + return privateKey; + } + + /** + * @return the fingerprint + */ + public String getFingerprint() { + return fingerprint; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "KeyPair [name=" + name + ", userId=" + userId + ", publicKey=" + + publicKey + ", privateKey=" + privateKey + ", fingerprint=" + + fingerprint + "]"; + } + + + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java new file mode 100644 index 0000000..62f158f --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java @@ -0,0 +1,46 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class KeyPairs implements Iterable, Serializable { + + public static final class KeyPairWrapper implements Serializable { + + @JsonProperty + private KeyPair keypair; + + } + + @JsonProperty("keypairs") + private List list; + + /** + * @return the list + */ + public List getList() { + List list = new ArrayList(); + for(KeyPairWrapper wrapper : this.list) { + list.add(wrapper.keypair); + } + return list; + } + + @Override + public Iterator iterator() { + return getList().iterator(); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "KeyPairs [list=" + getList() + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Limits.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Limits.java new file mode 100644 index 0000000..86e9acf --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Limits.java @@ -0,0 +1,394 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Calendar; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("limits") +public class Limits implements Serializable { + + public static final class RateLimit implements Serializable { + + public static final class LimitEntry implements Serializable { + + @JsonProperty("next-available") + private Calendar nextAvailable; + + private String unit; + + private String verb; + + private Integer remaining; + + private Integer available; + + private Integer value; + + /** + * @return the nextAvailable + */ + public Calendar getNextAvailable() { + return nextAvailable; + } + + /** + * @return the unit + */ + public String getUnit() { + return unit; + } + + /** + * @return the verb + */ + public String getVerb() { + return verb; + } + + /** + * @return the remaining + */ + public Integer getRemaining() { + return remaining; + } + + /** + * @return the available + */ + public Integer getAvailable() { + return available; + } + + /** + * @return the value + */ + public Integer getValue() { + return value; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "LimitEntry [nextAvailable=" + nextAvailable + ", unit=" + + unit + ", verb=" + verb + ", remaining=" + remaining + + ", available=" + available + ", value=" + value + "]"; + } + + } + + private String regex; + + private String uri; + + private List limit; + + /** + * @return the regex + */ + public String getRegex() { + return regex; + } + + /** + * @return the uri + */ + public String getUri() { + return uri; + } + + /** + * @return the limit + */ + public List getLimit() { + return limit; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "RateLimit [regex=" + regex + ", uri=" + uri + ", limit=" + + limit + "]"; + } + + } + + public static final class AbsoluteLimit { + + private Integer maxServerMeta; + private Integer serverMetaUsed; + + private Integer maxPersonality; + private Integer personalityUsed; + + private Integer maxImageMeta; + private Integer imageMetaUsed; + + private Integer maxPersonalitySize; + private Integer personalitySizeUsed; + + private Integer maxTotalCores; + private Integer totalCoresUsed; + + private Integer maxTotalInstances; + private Integer totalInstancesUsed; + + private Integer maxTotalRAMSize; + private Integer totalRAMUsed; + + private Integer maxSecurityGroupRules; + private Integer securityGroupRulesUsed; + + private Integer maxTotalKeypairs; + private Integer totalKeyPairsUsed; + + private Integer maxTotalVolumes; + private Integer totalVolumesUsed; + + private Integer maxSecurityGroups; + private Integer totalSecurityGroupsUsed; + + private Integer maxTotalFloatingIps; + private Integer totalFloatingIpsUsed; + + private Integer maxTotalVolumeGigabytes; + private Integer totalVolumeGigabytesUsed; + + /** + * @return the maxServerMeta + */ + public Integer getMaxServerMeta() { + return maxServerMeta; + } + + /** + * @return the maxPersonality + */ + public Integer getMaxPersonality() { + return maxPersonality; + } + + /** + * @return the maxImageMeta + */ + public Integer getMaxImageMeta() { + return maxImageMeta; + } + + /** + * @return the maxPersonalitySize + */ + public Integer getMaxPersonalitySize() { + return maxPersonalitySize; + } + + /** + * @return the maxTotalCores + */ + public Integer getMaxTotalCores() { + return maxTotalCores; + } + + /** + * @return the maxTotalInstances + */ + public Integer getMaxTotalInstances() { + return maxTotalInstances; + } + + /** + * @return the maxTotalRAMSize + */ + public Integer getMaxTotalRAMSize() { + return maxTotalRAMSize; + } + + /** + * @return the totalVolumesUsed + */ + public Integer getTotalVolumesUsed() { + return totalVolumesUsed; + } + + /** + * @return the maxSecurityGroupRules + */ + public Integer getMaxSecurityGroupRules() { + return maxSecurityGroupRules; + } + + /** + * @return the maxTotalKeypairs + */ + public Integer getMaxTotalKeypairs() { + return maxTotalKeypairs; + } + + /** + * @return the totalCoresUsed + */ + public Integer getTotalCoresUsed() { + return totalCoresUsed; + } + + /** + * @return the maxTotalVolumes + */ + public Integer getMaxTotalVolumes() { + return maxTotalVolumes; + } + + /** + * @return the totalRAMUsed + */ + public Integer getTotalRAMUsed() { + return totalRAMUsed; + } + + /** + * @return the totalInstancesUsed + */ + public Integer getTotalInstancesUsed() { + return totalInstancesUsed; + } + + /** + * @return the maxSecurityGroups + */ + public Integer getMaxSecurityGroups() { + return maxSecurityGroups; + } + + /** + * @return the totalVolumeGigabytesUsed + */ + public Integer getTotalVolumeGigabytesUsed() { + return totalVolumeGigabytesUsed; + } + + /** + * @return the totalSecurityGroupsUsed + */ + public Integer getTotalSecurityGroupsUsed() { + return totalSecurityGroupsUsed; + } + + /** + * @return the maxTotalFloatingIps + */ + public Integer getMaxTotalFloatingIps() { + return maxTotalFloatingIps; + } + + /** + * @return the totalKeyPairsUsed + */ + public Integer getTotalKeyPairsUsed() { + return totalKeyPairsUsed; + } + + /** + * @return the maxTotalVolumeGigabytes + */ + public Integer getMaxTotalVolumeGigabytes() { + return maxTotalVolumeGigabytes; + } + + /** + * @return the serverMetaUsed + */ + public Integer getServerMetaUsed() { + return serverMetaUsed; + } + + /** + * @return the personalityUsed + */ + public Integer getPersonalityUsed() { + return personalityUsed; + } + + /** + * @return the imageMetaUsed + */ + public Integer getImageMetaUsed() { + return imageMetaUsed; + } + + /** + * @return the personalitySizeUsed + */ + public Integer getPersonalitySizeUsed() { + return personalitySizeUsed; + } + + /** + * @return the securityGroupRulesUsed + */ + public Integer getSecurityGroupRulesUsed() { + return securityGroupRulesUsed; + } + + /** + * @return the totalFloatingIpsUsed + */ + public Integer getTotalFloatingIpsUsed() { + return totalFloatingIpsUsed; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "AbsoluteLimit [maxServerMeta=" + maxServerMeta + + ", maxPersonality=" + maxPersonality + ", maxImageMeta=" + + maxImageMeta + ", maxPersonalitySize=" + + maxPersonalitySize + ", maxTotalCores=" + maxTotalCores + + ", maxTotalInstances=" + maxTotalInstances + + ", maxTotalRAMSize=" + maxTotalRAMSize + "]"; + } + + } + + private List rate; + + private AbsoluteLimit absolute; + + /** + * @return the rate + */ + public List getRate() { + return rate; + } + + /** + * @return the absolute + */ + public AbsoluteLimit getAbsolute() { + return absolute; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Limits [rate=" + rate + ", absolute=" + absolute + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Link.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Link.java new file mode 100644 index 0000000..f973bec --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Link.java @@ -0,0 +1,42 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +public class Link implements Serializable { + + private String rel; + + private String href; + + private String type; + + /** + * @return the rel + */ + public String getRel() { + return rel; + } + + /** + * @return the href + */ + public String getHref() { + return href; + } + + /** + * @return the type + */ + public String getType() { + return type; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Link [rel=" + rel + ", href=" + href + ", type=" + type + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Metadata.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Metadata.java new file mode 100644 index 0000000..a3dbffb --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Metadata.java @@ -0,0 +1,26 @@ +package com.woorea.openstack.nova.model; + +import java.util.Map; + +public class Metadata { + + private Map metadata; + + /** + * @return the metadata + */ + public Map getMetadata() { + return metadata; + } + + /** + * Set the metadata + * @param metadata + */ + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Network.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Network.java new file mode 100644 index 0000000..6e82c1d --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Network.java @@ -0,0 +1,290 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("network") +public class Network implements Serializable { + + private String id; + + @JsonProperty("vpn_public_address") + private String vpnPublicAddress; + + @JsonProperty("vpn_private_address") + private String vpnPrivateAddress; + + @JsonProperty("vpn_public_port") + private String vpnPublicPort; + + @JsonProperty("dhcp_start") + private String dhcpStart; + + private String bridge; + + @JsonProperty("bridge_interface") + private String bridgeInterface; + + @JsonProperty("updated_at") + private String updatedAt; + + private Boolean deleted; + + private String vlan; + + private String broadcast; + + private String netmask; + + private Boolean injected; + + private String host; + + @JsonProperty("multi_host") + private Boolean multiHost; + + @JsonProperty("created_at") + private String createdAt; + + @JsonProperty("deleted_at") + private String deletedAt; + + private String cidr; + + @JsonProperty("cidr_v6") + private String cidrV6; + + private String gateway; + + @JsonProperty("gateway_v6") + private String gatewayV6; + + @JsonProperty("netmask_v6") + private String netmaskV6; + + @JsonProperty("project_id") + private String projectId; + + @JsonProperty("rxtx_base") + private String rxtxBase; + + private String dns1; + + private String dns2; + + private String label; + + private String priority; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @return the vpnPublicAddress + */ + public String getVpnPublicAddress() { + return vpnPublicAddress; + } + + /** + * @return the vpnPublicPort + */ + public String getVpnPublicPort() { + return vpnPublicPort; + } + + /** + * @return the dhcpStart + */ + public String getDhcpStart() { + return dhcpStart; + } + + /** + * @return the bridge + */ + public String getBridge() { + return bridge; + } + + /** + * @return the bridgeInterface + */ + public String getBridgeInterface() { + return bridgeInterface; + } + + /** + * @return the updatedAt + */ + public String getUpdatedAt() { + return updatedAt; + } + + /** + * @return the deleted + */ + public Boolean getDeleted() { + return deleted; + } + + /** + * @return the vlan + */ + public String getVlan() { + return vlan; + } + + /** + * @return the broadcast + */ + public String getBroadcast() { + return broadcast; + } + + /** + * @return the netmask + */ + public String getNetmask() { + return netmask; + } + + /** + * @return the injected + */ + public Boolean getInjected() { + return injected; + } + + /** + * @return the host + */ + public String getHost() { + return host; + } + + /** + * @return the multiHost + */ + public Boolean getMultiHost() { + return multiHost; + } + + /** + * @return the createdAt + */ + public String getCreatedAt() { + return createdAt; + } + + /** + * @return the deletedAt + */ + public String getDeletedAt() { + return deletedAt; + } + + /** + * @return the cidr + */ + public String getCidr() { + return cidr; + } + + /** + * @return the cidrV6 + */ + public String getCidrV6() { + return cidrV6; + } + + /** + * @return the gateway + */ + public String getGateway() { + return gateway; + } + + /** + * @return the gatewayV6 + */ + public String getGatewayV6() { + return gatewayV6; + } + + /** + * @return the netmaskV6 + */ + public String getNetmaskV6() { + return netmaskV6; + } + + /** + * @return the projectId + */ + public String getProjectId() { + return projectId; + } + + /** + * @return the rxtxBase + */ + public String getRxtxBase() { + return rxtxBase; + } + + /** + * @return the dns1 + */ + public String getDns1() { + return dns1; + } + + /** + * @return the dns2 + */ + public String getDns2() { + return dns2; + } + + /** + * @return the label + */ + public String getLabel() { + return label; + } + + /** + * @return the priority + */ + public String getPriority() { + return priority; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Network [id=" + id + ", vpnPublicAddress=" + vpnPublicAddress + + ", vpnPublicPort=" + vpnPublicPort + ", dhcpStart=" + + dhcpStart + ", bridge=" + bridge + ", bridgeInterface=" + + bridgeInterface + ", updatedAt=" + updatedAt + ", deleted=" + + deleted + ", vlan=" + vlan + ", broadcast=" + broadcast + + ", netmask=" + netmask + ", injected=" + injected + ", host=" + + host + ", multiHost=" + multiHost + ", createdAt=" + + createdAt + ", deletedAt=" + deletedAt + ", cidr=" + cidr + + ", cidrV6=" + cidrV6 + ", gateway=" + gateway + + ", gatewayV6=" + gatewayV6 + ", netmaskV6=" + netmaskV6 + + ", projectId=" + projectId + ", rxtxBase=" + rxtxBase + + ", dns1=" + dns1 + ", dns2=" + dns2 + ", label=" + label + + ", priority=" + priority + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/NetworkForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/NetworkForCreate.java new file mode 100644 index 0000000..f578539 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/NetworkForCreate.java @@ -0,0 +1,29 @@ +package com.woorea.openstack.nova.model; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +public class NetworkForCreate { + + @JsonProperty("uuid") + private String id; + @JsonProperty("fixed_ip") + private String fixedIp; + + public String getId() { + return id; + } + + public String getFixedIp() { + return fixedIp; + } + + public void setId(String id) { + this.id = id; + } + + public void setFixedIp(String fixedIp) { + this.fixedIp = fixedIp; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Networks.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Networks.java new file mode 100644 index 0000000..6e8a941 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Networks.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Networks implements Iterable, Serializable { + + @JsonProperty("networks") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Servers [list=" + list + "]"; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/PersonalityFile.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/PersonalityFile.java new file mode 100644 index 0000000..c4ff307 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/PersonalityFile.java @@ -0,0 +1,39 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +public final class PersonalityFile implements Serializable { + + private String path; + + private String contents; + + /** + * @return the path + */ + public String getPath() { + return path; + } + + /** + * @param path the path to set + */ + public void setPath(String path) { + this.path = path; + } + + /** + * @return the contents + */ + public String getContents() { + return contents; + } + + /** + * @param contents the contents to set + */ + public void setContents(String contents) { + this.contents = contents; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/QuotaSet.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/QuotaSet.java new file mode 100644 index 0000000..0a2f55d --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/QuotaSet.java @@ -0,0 +1,156 @@ +package com.woorea.openstack.nova.model; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("quota_set") +public class QuotaSet { + + private String id; + + @JsonProperty("metadata_items") + private Integer metadataItems; + + @JsonProperty("injected_file_content_bytes") + private Integer injectedFileContentBytes; + + @JsonProperty("injected_files") + private Integer injectedFiles; + + private Integer gigabytes; + + private Integer ram; + + @JsonProperty("floating_ips") + private Integer floatingIps; + + private Integer instances; + + private Integer volumes; + + private Integer cores; + + @JsonProperty("security_groups") + private Integer securityGroups; + + @JsonProperty("security_group_rules") + private Integer securityGroupRules; + + @JsonProperty("injected_file_path_bytes") + private Integer injectedFilePathBytes; + + @JsonProperty("key_pairs") + private Integer keyPairs; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Integer getMetadataItems() { + return metadataItems; + } + + public void setMetadataItems(Integer metadataItems) { + this.metadataItems = metadataItems; + } + + public Integer getInjectedFileContentBytes() { + return injectedFileContentBytes; + } + + public void setInjectedFileContentBytes(Integer injectedFileContentBytes) { + this.injectedFileContentBytes = injectedFileContentBytes; + } + + public Integer getInjectedFiles() { + return injectedFiles; + } + + public void setInjectedFiles(Integer injectedFiles) { + this.injectedFiles = injectedFiles; + } + + public Integer getGigabytes() { + return gigabytes; + } + + public void setGigabytes(Integer gigabytes) { + this.gigabytes = gigabytes; + } + + public Integer getRam() { + return ram; + } + + public void setRam(Integer ram) { + this.ram = ram; + } + + public Integer getFloatingIps() { + return floatingIps; + } + + public void setFloatingIps(Integer floatingIps) { + this.floatingIps = floatingIps; + } + + public Integer getInstances() { + return instances; + } + + public void setInstances(Integer instances) { + this.instances = instances; + } + + public Integer getVolumes() { + return volumes; + } + + public void setVolumes(Integer volumes) { + this.volumes = volumes; + } + + public Integer getCores() { + return cores; + } + + public void setCores(Integer cores) { + this.cores = cores; + } + + public Integer getSecurityGroups() { + return securityGroups; + } + + public void setSecurityGroups(Integer securityGroups) { + this.securityGroups = securityGroups; + } + + public Integer getSecurityGroupRules() { + return securityGroupRules; + } + + public void setSecurityGroupRules(Integer securityGroupRules) { + this.securityGroupRules = securityGroupRules; + } + + public Integer getKeyPairs() { + return keyPairs; + } + + public void setKeyPairs(Integer keyPairs) { + this.keyPairs = keyPairs; + } + + public Integer getInjectedFilePathBytes() { + return injectedFilePathBytes; + } + + public void setInjectedFilePathBytes(Integer injectedFilePathBytes) { + this.injectedFilePathBytes = injectedFilePathBytes; + } +} \ No newline at end of file diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroup.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroup.java new file mode 100644 index 0000000..1b8917b --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroup.java @@ -0,0 +1,207 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("security_group") +public class SecurityGroup implements Serializable { + + @JsonRootName("security_group_rule") + public static final class Rule implements Serializable { + + public static final class Group implements Serializable { + + private String name; + + @JsonProperty("tenant_id") + private String tenantId; + + public String getName() { + return name; + } + + public String getTenantId() { + return tenantId; + } + + @Override + public String toString() { + return "Group [name=" + name + ", tenantId=" + tenantId + "]"; + } + + } + + public static final class IpRange implements Serializable { + + private String cidr; + + public String getCidr() { + return cidr; + } + + @Override + public String toString() { + return "IpRange [cidr=" + cidr + "]"; + } + + } + + private String id; + + private String name; + + @JsonProperty("parent_group_id") + private String parentGroupId; + + @JsonProperty("from_port") + private Integer fromPort; + + @JsonProperty("to_port") + private Integer toPort; + + @JsonProperty("ip_protocol") + private String ipProtocol; + + @JsonProperty("ip_range") + private IpRange ipRange = new IpRange(); + + private Group group; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @return the parentGroupId + */ + public String getParentGroupId() { + return parentGroupId; + } + + /** + * @return the fromPort + */ + public Integer getFromPort() { + return fromPort; + } + + /** + * @return the toPort + */ + public Integer getToPort() { + return toPort; + } + + /** + * @return the ipProtocol + */ + public String getIpProtocol() { + return ipProtocol; + } + + /** + * @return the ipRange + */ + public IpRange getIpRange() { + return ipRange; + } + + /** + * @return the group + */ + public Group getGroup() { + return group; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Rule [id=" + id + ", name=" + name + ", parentGroupId=" + + parentGroupId + ", fromPort=" + fromPort + ", toPort=" + + toPort + ", ipProtocol=" + ipProtocol + ", ipRange=" + + ipRange + ", group=" + group + "]"; + } + + } + + private String id; + + private String name; + + private String description; + + @JsonProperty("tenant_id") + private String tenantId; + + private List rules; + + private List links; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @return the tenantId + */ + public String getTenantId() { + return tenantId; + } + + /** + * @return the rules + */ + public List getRules() { + return rules; + } + + /** + * @return the links + */ + public List getLinks() { + return links; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "SecurityGroup [id=" + id + ", name=" + name + ", description=" + + description + ", tenantId=" + tenantId + ", rules=" + rules + + ", links=" + links + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupForCreate.java new file mode 100644 index 0000000..c3993bb --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupForCreate.java @@ -0,0 +1,64 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("security_group") +public class SecurityGroupForCreate implements Serializable { + + private String name; + + private String description; + + public SecurityGroupForCreate() { + super(); + } + + public SecurityGroupForCreate(String name) { + this.name = name; + } + + public SecurityGroupForCreate(String name, String description) { + this(name); + this.description = description; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "SecurityGroupForCreate [name=" + name + ", description=" + + description + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java new file mode 100644 index 0000000..2f58da0 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java @@ -0,0 +1,198 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import javax.xml.bind.annotation.XmlElement; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("security_group_rule") +public class SecurityGroupRuleForCreate implements Serializable { + + @JsonProperty("parent_group_id") + private String parentGroupId; + + @JsonProperty("ip_protocol") + private String ipProtocol; + + @JsonProperty("from_port") + private Integer fromPort; + + @JsonProperty("to_port") + private Integer toPort; + + @XmlElement + private String cidr; + + @JsonProperty("group_id") + private String groupId; + + public SecurityGroupRuleForCreate() { + + } + + /** + * + * @param parentSecurityGroupId + * @param ipProtocol + * @param fromPort + * @param toPort + * @param cidr + * @deprecated Ids in some installs have shown to use strings .Use {@link #SecurityGroupRuleForCreate(String, String, Integer, Integer, String)} + */ + @Deprecated + public SecurityGroupRuleForCreate(Integer parentSecurityGroupId, String ipProtocol, Integer fromPort,Integer toPort, String cidr) { + this.parentGroupId = String.valueOf(parentSecurityGroupId); + this.ipProtocol = ipProtocol; + this.fromPort = fromPort; + this.toPort = toPort; + this.cidr = cidr; + } + /** + * + * @param parentSecurityGroupId + * @param ipProtocol + * @param fromPort + * @param toPort + * @param cidr + * @deprecated Ids in some installs have shown to use strings .Use {@link #SecurityGroupRuleForCreate(String, String, String, Integer, Integer)} + */ + @Deprecated + public SecurityGroupRuleForCreate(Integer parentGroupId, String ipProtocol, Integer fromPort,Integer toPort, Integer sourceGroupId) { + this.parentGroupId = String.valueOf(parentGroupId); + this.ipProtocol = ipProtocol; + this.fromPort = fromPort; + this.toPort = toPort; + this.groupId = String.valueOf(sourceGroupId); + } + + public SecurityGroupRuleForCreate(String parentSecurityGroupId, String ipProtocol, Integer fromPort,Integer toPort, String cidr) { + this.parentGroupId = parentSecurityGroupId; + this.ipProtocol = ipProtocol; + this.fromPort = fromPort; + this.toPort = toPort; + this.cidr = cidr; + } + + public SecurityGroupRuleForCreate(String parentGroupId, String sourceGroupId, String ipProtocol, Integer fromPort,Integer toPort) { + this.parentGroupId = parentGroupId; + this.ipProtocol = ipProtocol; + this.fromPort = fromPort; + this.toPort = toPort; + this.groupId = sourceGroupId; + } + + /** + * @return the parentGroupId + */ + public String getParentGroupId() { + return parentGroupId; + } + + + /** + * @param parentGroupId the parentGroupId to set + * @deprecated Use {@link #setParentGroupId(String)} + */ + public void setParentGroupId(Integer parentGroupId) { + this.parentGroupId = String.valueOf(parentGroupId); + } + + /** + * @param parentGroupId the parentGroupId to set + */ + public void setParentGroupId(String parentGroupId) { + this.parentGroupId = parentGroupId; + } + + /** + * @return the fromPort + */ + public Integer getFromPort() { + return fromPort; + } + + /** + * @param fromPort the fromPort to set + */ + public void setFromPort(Integer fromPort) { + this.fromPort = fromPort; + } + + /** + * @return the toPort + */ + public Integer getToPort() { + return toPort; + } + + /** + * @param toPort the toPort to set + */ + public void setToPort(Integer toPort) { + this.toPort = toPort; + } + + /** + * @return the ipProtocol + */ + public String getIpProtocol() { + return ipProtocol; + } + + /** + * @param ipProtocol the ipProtocol to set + */ + public void setIpProtocol(String ipProtocol) { + this.ipProtocol = ipProtocol; + } + + /** + * @return the cidr + */ + public String getCidr() { + return cidr; + } + + /** + * @param cidr the cidr to set + */ + public void setCidr(String cidr) { + this.cidr = cidr; + } + + /** + * @return the groupId + */ + public String getGroupId() { + return groupId; + } + + /** + * @param groupId the groupId to set + * @deprecated Use {@link #setGroupId(String)} + */ + public void setGroupId(Integer groupId) { + this.groupId = String.valueOf(groupId); + } + + /** + * @param groupId the groupId to set + */ + public void setGroupId(String groupId) { + this.groupId = groupId; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "SecurityGroupRuleForCreate [parentGroupId=" + parentGroupId + + ", fromPort=" + fromPort + ", toPort=" + toPort + + ", ipProtocol=" + ipProtocol + ", cidr=" + cidr + + ", groupId=" + groupId + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroups.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroups.java new file mode 100644 index 0000000..1c8cc55 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroups.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class SecurityGroups implements Iterable, Serializable { + + @JsonProperty("security_groups") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "SecurityGroups [list=" + list + "]"; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java new file mode 100644 index 0000000..589ed54 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java @@ -0,0 +1,514 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Calendar; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.codehaus.jackson.annotate.JsonAnySetter; +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("server") +public class Server implements Serializable { + + public static final class Addresses implements Serializable { + + public static final class Address implements Serializable { + + @JsonProperty("OS-EXT-IPS-MAC:mac_addr") + private String macAddr; + + private String version; + + private String addr; + + @JsonProperty("OS-EXT-IPS:type") + private String type; + + /** + * @return the macAddr + */ + public String getMacAddr() { + return macAddr; + } + + /** + * @return the version + */ + public String getVersion() { + return version; + } + + /** + * @return the addr + */ + public String getAddr() { + return addr; + } + + + /** + * @return the type + */ + public String getType() { + return type; + } + + /** + * @param version the version to set + */ + public void setVersion(String version) { + this.version = version; + } + + /** + * @param addr the addr to set + */ + public void setAddr(String addr) { + this.addr = addr; + } + + /** + * @param type the type to set + */ + public void setType(String type) { + this.type = type; + } + + /** + * @param macAddr the mac addr to set + */ + public void setMacAddr(String macAddr) { + this.macAddr= macAddr; + } + } + + private Map> addresses = new HashMap>(); + + @JsonAnySetter + public void add(String key, List
value) { + addresses.put(key, value); + } + /** + * @return the ip address List Map + */ + public Map> getAddresses() { + return addresses; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Addresses List Map [" + addresses + "]"; + } + + } + + public static final class Fault { + + private Integer code; + + private String message; + + private String details; + + private Calendar created; + + /** + * @return the code + */ + public Integer getCode() { + return code; + } + + /** + * @return the message + */ + public String getMessage() { + return message; + } + + /** + * @return the details + */ + public String getDetails() { + return details; + } + + /** + * @return the created + */ + public Calendar getCreated() { + return created; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Fault [code=" + code + ", message=" + message + + ", details=" + details + ", created=" + created + "]"; + } + + + } + + + private String id; + + private String name; + + private Addresses addresses; + + private List links; + + private Image image; + + private Flavor flavor; + + private String accessIPv4; + + private String accessIPv6; + + @JsonProperty("config_drive") + private String configDrive; + + private String status; + + private Integer progress; + + private Fault fault; + + @JsonProperty("tenant_id") + private String tenantId; + + @JsonProperty("user_id") + private String userId; + + @JsonProperty("key_name") + private String keyName; + + private String hostId; + + private String updated; + + private String created; + + private Map metadata; + + @JsonProperty("security_groups") + private List securityGroups; + + @JsonProperty("OS-EXT-STS:task_state") + private String taskState; + + @JsonProperty("OS-EXT-STS:power_state") + private String powerState; + + @JsonProperty("OS-EXT-STS:vm_state") + private String vmState; + + @JsonProperty("OS-EXT-SRV-ATTR:host") + private String host; + + @JsonProperty("OS-EXT-SRV-ATTR:instance_name") + private String instanceName; + + @JsonProperty("OS-EXT-SRV-ATTR:hypervisor_hostname") + private String hypervisorHostname; + + @JsonProperty("OS-DCF:diskConfig") + private String diskConfig; + + @JsonProperty("OS-EXT-AZ:availability_zone") + private String availabilityZone; + + @JsonProperty("OS-SRV-USG:launched_at") + private String launchedAt; + + @JsonProperty("OS-SRV-USG:terminated_at") + private String terminatedAt; + + @JsonProperty("os-extended-volumes:volumes_attached") + private List osExtendedVolumesAttached; + + private String uuid; + + private String adminPass; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @return the addresses + */ + public Addresses getAddresses() { + return addresses; + } + + /** + * @return the links + */ + public List getLinks() { + return links; + } + + /** + * @return the image + */ + public Image getImage() { + return image; + } + + /** + * @param image the image to set + */ + public void setImage(Image image) { + this.image = image; + } + + /** + * @return the flavor + */ + public Flavor getFlavor() { + return flavor; + } + + /** + * @param flavor the flavor to set + */ + public void setFlavor(Flavor flavor) { + this.flavor = flavor; + } + + /** + * @return the accessIPv4 + */ + public String getAccessIPv4() { + return accessIPv4; + } + + /** + * @return the accessIPv6 + */ + public String getAccessIPv6() { + return accessIPv6; + } + + /** + * @return the configDrive + */ + public String getConfigDrive() { + return configDrive; + } + + /** + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * @return the progress + */ + public Integer getProgress() { + return progress; + } + + /** + * @return the fault + */ + public Fault getFault() { + return fault; + } + + /** + * @return the tenantId + */ + public String getTenantId() { + return tenantId; + } + + /** + * @return the userId + */ + public String getUserId() { + return userId; + } + + /** + * @return the keyName + */ + public String getKeyName() { + return keyName; + } + + /** + * @return the hostId + */ + public String getHostId() { + return hostId; + } + + /** + * @return the updated + */ + public String getUpdated() { + return updated; + } + + /** + * @return the created + */ + public String getCreated() { + return created; + } + + /** + * @return the metadata + */ + public Map getMetadata() { + return metadata; + } + + /** + * @return the securityGroups + */ + public List getSecurityGroups() { + return securityGroups; + } + + /** + * @return the taskState + */ + public String getTaskState() { + return taskState; + } + + /** + * @return the powerState + */ + public String getPowerState() { + return powerState; + } + + /** + * @return the vmState + */ + public String getVmState() { + return vmState; + } + + /** + * @return the host + */ + public String getHost() { + return host; + } + + /** + * @return the instanceName + */ + public String getInstanceName() { + return instanceName; + } + + /** + * @return the hypervisorHostname + */ + public String getHypervisorHostname() { + return hypervisorHostname; + } + + /** + * @return the diskConfig + */ + public String getDiskConfig() { + return diskConfig; + } + + /** + * @return the availabilityZone + */ + public String getAvailabilityZone() { + return availabilityZone; + } + + /** + * @return the launchedAt + */ + public String getLaunchedAt() { + return launchedAt; + } + + /** + * @return the terminatedAt + */ + public String getTerminatedAt() { + return terminatedAt; + } + + /** + * @return the osExtendedVolumesAttached + */ + public List getOsExtendedVolumesAttached() { + return osExtendedVolumesAttached; + } + + /** + * @return the uuid + */ + public String getUuid() { + return uuid; + } + + /** + * @return the adminPass + */ + public String getAdminPass() { + return adminPass; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Server [id=" + id + ", name=" + name + ", addresses=" + + addresses + ", links=" + links + ", image=" + image + + ", flavor=" + flavor + ", accessIPv4=" + accessIPv4 + + ", accessIPv6=" + accessIPv6 + ", configDrive=" + configDrive + + ", status=" + status + ", progress=" + progress + ", fault=" + + fault + ", tenantId=" + tenantId + ", userId=" + userId + + ", keyName=" + keyName + ", hostId=" + hostId + ", updated=" + + updated + ", created=" + created + ", metadata=" + metadata + + ", securityGroups=" + securityGroups + ", taskState=" + + taskState + ", powerState=" + powerState + ", vmState=" + + vmState + ", host=" + host + ", instanceName=" + instanceName + + ", hypervisorHostname=" + hypervisorHostname + + ", diskConfig=" + diskConfig + ", availabilityZone=" + + availabilityZone + ", launchedAt=" + launchedAt + ", terminatedAt=" + + ", " + "osExtendedVolumesAttached=" + osExtendedVolumesAttached + + ", uuid=" + uuid + ", adminPass=" + + adminPass + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java new file mode 100644 index 0000000..26fa5a4 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java @@ -0,0 +1,610 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +public interface ServerAction extends Serializable { + + @JsonRootName("changePassword") + public static final class ChangePassword implements ServerAction { + + private String adminPass; + + public ChangePassword() { + super(); + // TODO Auto-generated constructor stub + } + + public ChangePassword(String adminPass) { + this.adminPass = adminPass; + } + + /** + * @return the adminPass + */ + public String getAdminPass() { + return adminPass; + } + + /** + * @param adminPass the adminPass to set + */ + public void setAdminPass(String adminPass) { + this.adminPass = adminPass; + } + + } + + @JsonRootName("reboot") + public static final class Reboot implements ServerAction { + + private String type; + + /** + * @return the type + */ + public String getType() { + return type; + } + + /** + * @param type the type to set + */ + public void setType(String type) { + this.type = type; + } + + } + + @JsonRootName("rebuild") + public static final class Rebuild implements ServerAction { + + private String imageRef; + + private String name; + + private String adminPass; + + private String accessIPv4; + + private String accessIPv6; + + private Map metadata = new HashMap(); + + private List personality = new ArrayList(); + + @JsonProperty("OS-DCF:diskConfig") + private String diskConfig; + + /** + * @return the imageRef + */ + public String getImageRef() { + return imageRef; + } + + /** + * @param imageRef the imageRef to set + */ + public void setImageRef(String imageRef) { + this.imageRef = imageRef; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the adminPass + */ + public String getAdminPass() { + return adminPass; + } + + /** + * @param adminPass the adminPass to set + */ + public void setAdminPass(String adminPass) { + this.adminPass = adminPass; + } + + /** + * @return the accessIPv4 + */ + public String getAccessIPv4() { + return accessIPv4; + } + + /** + * @param accessIPv4 the accessIPv4 to set + */ + public void setAccessIPv4(String accessIPv4) { + this.accessIPv4 = accessIPv4; + } + + /** + * @return the accessIPv6 + */ + public String getAccessIPv6() { + return accessIPv6; + } + + /** + * @param accessIPv6 the accessIPv6 to set + */ + public void setAccessIPv6(String accessIPv6) { + this.accessIPv6 = accessIPv6; + } + + /** + * @return the metadata + */ + public Map getMetadata() { + return metadata; + } + + /** + * @param metadata the metadata to set + */ + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + /** + * @return the personality + */ + public List getPersonality() { + return personality; + } + + /** + * @param personality the personality to set + */ + public void setPersonality(List personality) { + this.personality = personality; + } + + /** + * @return the diskConfig + */ + public String getDiskConfig() { + return diskConfig; + } + + /** + * @param diskConfig the diskConfig to set + */ + public void setDiskConfig(String diskConfig) { + this.diskConfig = diskConfig; + } + + } + + @JsonRootName("resize") + public static final class Resize implements ServerAction { + + private String flavorRef; + + @JsonProperty("OS-DCF:diskConfig") + private String diskConfig; + + /** + * @return the flavorRef + */ + public String getFlavorRef() { + return flavorRef; + } + + /** + * @param flavorRef the flavorRef to set + */ + public void setFlavorRef(String flavorRef) { + this.flavorRef = flavorRef; + } + + /** + * @return the diskConfig + */ + public String getDiskConfig() { + return diskConfig; + } + + /** + * @param diskConfig the diskConfig to set + */ + public void setDiskConfig(String diskConfig) { + this.diskConfig = diskConfig; + } + + } + + @JsonRootName("confirmResize") + public static final class ConfirmResize implements ServerAction { + + } + + @JsonRootName("revertResize") + public static final class RevertResize implements ServerAction { + + } + + @JsonRootName("createImage") + public static final class CreateImage implements ServerAction { + + private String name; + + private Map metadata; + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the metadata + */ + public Map getMetadata() { + return metadata; + } + + /** + * @param metadata the metadata to set + */ + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + } + + @JsonRootName("rescue") + public static final class Rescue implements ServerAction { + + private String adminPass; + + public Rescue() { + + } + + public Rescue(String adminPass) { + this.adminPass = adminPass; + } + + /** + * @return the adminPass + */ + public String getAdminPass() { + return adminPass; + } + + /** + * @param adminPass the adminPass to set + */ + public void setAdminPass(String adminPass) { + this.adminPass = adminPass; + } + + } + + public static final class RescueResponse implements ServerAction { + + private String adminPass; + + /** + * @return the adminPass + */ + public String getAdminPass() { + return adminPass; + } + + } + + @JsonRootName("unrescue") + public static final class Unrescue implements ServerAction { + + } + + @JsonRootName("unpause") + public static final class Unpause implements ServerAction { + + } + + @JsonRootName("pause") + public static final class Pause implements ServerAction { + + } + + @JsonRootName("suspend") + public static final class Suspend implements ServerAction { + + } + + @JsonRootName("resume") + public static final class Resume implements ServerAction { + + } + + @JsonRootName("lock") + public static final class Lock implements ServerAction { + + } + + @JsonRootName("unlock") + public static final class Unlock implements ServerAction { + + } + + @JsonRootName("os-getConsoleOutput") + public static final class GetConsoleOutput implements ServerAction { + + private Integer length; + + public GetConsoleOutput() { + + } + + public GetConsoleOutput(Integer length) { + this.length = length; + } + + /** + * @return the length + */ + public Integer getLength() { + return length; + } + + /** + * @param length the length to set + */ + public void setLength(Integer length) { + this.length = length; + } + + } + + public static final class ConsoleOutput implements ServerAction { + + private String output; + + /** + * @return the output + */ + public String getOutput() { + return output; + } + + } + + @JsonRootName("os-getVNCConsole") + public static final class GetVncConsole implements ServerAction { + + private String type; + + public GetVncConsole() { + super(); + // TODO Auto-generated constructor stub + } + + + public GetVncConsole(String type) { + super(); + this.type = type; + } + + /** + * @return the type + */ + public String getType() { + return type; + } + + /** + * @param type the type to set + */ + public void setType(String type) { + this.type = type; + } + + } + + @JsonRootName("console") + public static final class VncConsole implements ServerAction { + + private String type; + + private String url; + + /** + * @return the type + */ + public String getType() { + return type; + } + + /** + * @return the url + */ + public String getUrl() { + return url; + } + + } + + @JsonRootName("os-start") + public static final class Start implements ServerAction { + + } + + @JsonRootName("os-stop") + public static final class Stop implements ServerAction { + + } + + @JsonRootName("forceDelete") + public static final class ForceDelete implements ServerAction { + + } + + @JsonRootName("restore") + public static final class Restore implements ServerAction { + + } + + @JsonRootName("addFloatingIp") + public static final class AssociateFloatingIp implements ServerAction { + + private String address; + + public AssociateFloatingIp() { + super(); + // TODO Auto-generated constructor stub + } + + public AssociateFloatingIp(String address) { + super(); + this.address = address; + } + + /** + * @return the address + */ + public String getAddress() { + return address; + } + + /** + * @param address the address to set + */ + public void setAddress(String address) { + this.address = address; + } + + } + + @JsonRootName("removeFloatingIp") + public static final class DisassociateFloatingIp implements ServerAction { + + private String address; + + public DisassociateFloatingIp() { + super(); + // TODO Auto-generated constructor stub + } + + public DisassociateFloatingIp(String address) { + super(); + this.address = address; + } + + /** + * @return the address + */ + public String getAddress() { + return address; + } + + /** + * @param address the address to set + */ + public void setAddress(String address) { + this.address = address; + } + + } + + @JsonRootName("createBackup") + public static final class CreateBackup implements ServerAction { + + private String name; + + @JsonProperty("backup_type") + private String type; + + private String rotation; + + private Map metadata; + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the type + */ + public String getType() { + return type; + } + + /** + * @param type the type to set + */ + public void setType(String type) { + this.type = type; + } + + /** + * @return the rotation + */ + public String getRotation() { + return rotation; + } + + /** + * @param rotation the rotation to set + */ + public void setRotation(String rotation) { + this.rotation = rotation; + } + + /** + * @return the metadata + */ + public Map getMetadata() { + return metadata; + } + + /** + * @param metadata the metadata to set + */ + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerForCreate.java new file mode 100644 index 0000000..9f28a81 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerForCreate.java @@ -0,0 +1,326 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("server") +public class ServerForCreate implements Serializable { + + public static final class SecurityGroup implements Serializable { + + private String name; + + public SecurityGroup() { + } + + public SecurityGroup(String name) { + this.name = name; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name + * the name to set + */ + public void setName(String name) { + this.name = name; + } + + } + + private String name; + + private String adminPass; + + private String imageRef; + + private String flavorRef; + + private String accessIPv4; + + private String accessIPv6; + + private Integer min; + + private Integer max; + + private String diskConfig; + + @JsonProperty("key_name") + private String keyName; + + private List personality = new ArrayList(); + + private Map metadata = new HashMap(); + + @JsonProperty("security_groups") + private List securityGroups; + + @JsonProperty("user_data") + private String userData; + + @JsonProperty("availability_zone") + private String availabilityZone; + + @JsonProperty("config_drive") + private boolean configDrive; + + @JsonProperty("networks") + private List networks = new ArrayList(); + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name + * the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the adminPass + */ + public String getAdminPass() { + return adminPass; + } + + /** + * @param adminPass + * the adminPass to set + */ + public void setAdminPass(String adminPass) { + this.adminPass = adminPass; + } + + /** + * @return the imageRef + */ + public String getImageRef() { + return imageRef; + } + + /** + * @param imageRef + * the imageRef to set + */ + public void setImageRef(String imageRef) { + this.imageRef = imageRef; + } + + /** + * @return the flavorRef + */ + public String getFlavorRef() { + return flavorRef; + } + + /** + * @param flavorRef + * the flavorRef to set + */ + public void setFlavorRef(String flavorRef) { + this.flavorRef = flavorRef; + } + + /** + * @return the accessIPv4 + */ + public String getAccessIPv4() { + return accessIPv4; + } + + /** + * @param accessIPv4 + * the accessIPv4 to set + */ + public void setAccessIPv4(String accessIPv4) { + this.accessIPv4 = accessIPv4; + } + + /** + * @return the accessIPv6 + */ + public String getAccessIPv6() { + return accessIPv6; + } + + /** + * @param accessIPv6 + * the accessIPv6 to set + */ + public void setAccessIPv6(String accessIPv6) { + this.accessIPv6 = accessIPv6; + } + + /** + * @return the min + */ + public Integer getMin() { + return min; + } + + /** + * @param min + * the min to set + */ + public void setMin(Integer min) { + this.min = min; + } + + /** + * @return the max + */ + public Integer getMax() { + return max; + } + + /** + * @param max + * the max to set + */ + public void setMax(Integer max) { + this.max = max; + } + + /** + * @return the diskConfig + */ + public String getDiskConfig() { + return diskConfig; + } + + /** + * @param diskConfig + * the diskConfig to set + */ + public void setDiskConfig(String diskConfig) { + this.diskConfig = diskConfig; + } + + /** + * @return the keyName + */ + public String getKeyName() { + return keyName; + } + + /** + * @param keyName + * the keyName to set + */ + public void setKeyName(String keyName) { + this.keyName = keyName; + } + + /** + * @return the personality + */ + public List getPersonality() { + return personality; + } + + /** + * @param personality + * the personality to set + */ + public void setPersonality(List personality) { + this.personality = personality; + } + + /** + * @return the metadata + */ + public Map getMetadata() { + return metadata; + } + + /** + * @param metadata + * the metadata to set + */ + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + /** + * @return the securityGroups + */ + public List getSecurityGroups() { + if (securityGroups == null) { + securityGroups = new ArrayList(); + } + return securityGroups; + } + + /** + * @return the userData + */ + public String getUserData() { + return userData; + } + + /** + * @param userData + * the userData to set + */ + public void setUserData(String userData) { + this.userData = userData; + } + + /** + * @return the availabilityZone + */ + public String getAvailabilityZone() { + return availabilityZone; + } + + /** + * @param availabilityZone + * the availabilityZone to set + */ + public void setAvailabilityZone(String availabilityZone) { + this.availabilityZone = availabilityZone; + } + + public boolean isConfigDrive() { + return configDrive; + } + + public void setConfigDrive(boolean configDrive) { + this.configDrive = configDrive; + } + + public List getNetworks() { + return networks; + } + + public void setNetworks(List networks) { + this.networks = networks; + } + + public void addNetworks(String id, String fixedIp) { + NetworkForCreate net = new NetworkForCreate(); + net.setId(id); + net.setFixedIp(fixedIp); + this.networks.add(net); + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Servers.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Servers.java new file mode 100644 index 0000000..a144250 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Servers.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Servers implements Iterable, Serializable { + + @JsonProperty("servers") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Servers [list=" + list + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsage.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsage.java new file mode 100644 index 0000000..f75414d --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsage.java @@ -0,0 +1,232 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("tenant_usage") +public class SimpleTenantUsage implements Serializable { + + @JsonProperty("total_memory_mb_usage") + private BigDecimal totalMemoryMbUsage; + + @JsonProperty("total_vcpus_usage") + private BigDecimal totalVcpusUsage; + + @JsonProperty("total_local_gb_usage") + private BigDecimal totalLocalGbUsage; + + private String start; + + private String stop; + + @JsonProperty("tenant_id") + private String tenantId; + + @JsonProperty("total_hours") + private String totalHours; + + @JsonProperty("server_usages") + private List serverUsages; + + /** + * @return the totalMemoryMbUsage + */ + public BigDecimal getTotalMemoryMbUsage() { + return totalMemoryMbUsage; + } + + /** + * @param totalMemoryMbUsage the totalMemoryMbUsage to set + */ + public void setTotalMemoryMbUsage(BigDecimal totalMemoryMbUsage) { + this.totalMemoryMbUsage = totalMemoryMbUsage; + } + + /** + * @return the totalVcpusUsage + */ + public BigDecimal getTotalVcpusUsage() { + return totalVcpusUsage; + } + + /** + * @param totalVcpusUsage the totalVcpusUsage to set + */ + public void setTotalVcpusUsage(BigDecimal totalVcpusUsage) { + this.totalVcpusUsage = totalVcpusUsage; + } + + /** + * @return the totalLocalGbUsage + */ + public BigDecimal getTotalLocalGbUsage() { + return totalLocalGbUsage; + } + + /** + * @param totalLocalGbUsage the totalLocalGbUsage to set + */ + public void setTotalLocalGbUsage(BigDecimal totalLocalGbUsage) { + this.totalLocalGbUsage = totalLocalGbUsage; + } + + /** + * @return the start + */ + public String getStart() { + return start; + } + + /** + * @param start the start to set + */ + public void setStart(String start) { + this.start = start; + } + + /** + * @return the stop + */ + public String getStop() { + return stop; + } + + /** + * @param stop the stop to set + */ + public void setStop(String stop) { + this.stop = stop; + } + + /** + * @return the tenantId + */ + public String getTenantId() { + return tenantId; + } + + /** + * @param tenantId the tenantId to set + */ + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * @return the totalHours + */ + public String getTotalHours() { + return totalHours; + } + + /** + * @param totalHours the totalHours to set + */ + public void setTotalHours(String totalHours) { + this.totalHours = totalHours; + } + + public List getServerUsages() { + return serverUsages; + } + + public void setServerUsages(List serverUsages) { + this.serverUsages = serverUsages; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "SimpleTenantUsage [totalMemoryMbUsage=" + totalMemoryMbUsage + + ", totalVcpusUsage=" + totalVcpusUsage + + ", totalLocalGbUsage=" + totalLocalGbUsage + ", start=" + + start + ", stop=" + stop + ", tenantId=" + tenantId + + ", totalHours=" + totalHours + "]"; + } + + public static final class ServerUsage implements Serializable { + @JsonProperty("instance_id") + private String instanceId; + + private Integer uptime; + + @JsonProperty("started_at") + private String startedAt; + + @JsonProperty("ended_at") + private String endedAt; + + @JsonProperty("memory_mb") + private Integer memoryMb; + + @JsonProperty("tenant_id") + private String tenantId; + + private String state; + + private Double hours; + + private Integer vcpus; + + private String flavor; + + @JsonProperty("local_gb") + private Integer localDiskSize; + + private String name; + + public String getInstanceId() { + return instanceId; + } + + public Integer getUptime() { + return uptime; + } + + public String getStartedAt() { + return startedAt; + } + + public String getEndedAt() { + return endedAt; + } + + public Integer getMemoryMb() { + return memoryMb; + } + + public String getTenantId() { + return tenantId; + } + + public String getState() { + return state; + } + + public Double getHours() { + return hours; + } + + public Integer getVcpus() { + return vcpus; + } + + public String getFlavor() { + return flavor; + } + + public Integer getLocalDiskSize() { + return localDiskSize; + } + + public String getName() { + return name; + } + } +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsages.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsages.java new file mode 100644 index 0000000..33c4625 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SimpleTenantUsages.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class SimpleTenantUsages implements Iterable, Serializable { + + @JsonProperty("tenant_usages") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "SimpleTenantUsage [list=" + list + "]"; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshot.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshot.java new file mode 100644 index 0000000..06b9c4d --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshot.java @@ -0,0 +1,87 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("snapshot") +public class Snapshot implements Serializable { + + private String id; + + private String status; + + @JsonProperty("displayName") + private String name; + + @JsonProperty("displayDescription") + private String description; + + private String volumeId; + + private Integer size; + + private String createdAt; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @return the volumeId + */ + public String getVolumeId() { + return volumeId; + } + + /** + * @return the size + */ + public Integer getSize() { + return size; + } + + /** + * @return the createdAt + */ + public String getCreatedAt() { + return createdAt; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Snapshot [id=" + id + ", status=" + status + ", displayName=" + + name + ", displayDescription=" + description + + ", volumeId=" + volumeId + ", size=" + size + ", createdAt=" + + createdAt + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SnapshotForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SnapshotForCreate.java new file mode 100644 index 0000000..5db392e --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SnapshotForCreate.java @@ -0,0 +1,87 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("snapshot") +public class SnapshotForCreate implements Serializable { + + @JsonProperty("volume_id") + private String volumeId; + + private Boolean force; + + @JsonProperty("display_name") + private String name; + + @JsonProperty("display_description") + private String description; + + /** + * @return the volumeId + */ + public String getVolumeId() { + return volumeId; + } + + /** + * @param volumeId the volumeId to set + */ + public void setVolumeId(String volumeId) { + this.volumeId = volumeId; + } + + /** + * @return the force + */ + public Boolean getForce() { + return force; + } + + /** + * @param force the force to set + */ + public void setForce(Boolean force) { + this.force = force; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "SnapshotForCreate [volumeId=" + volumeId + ", force=" + force + + ", name=" + name + ", description=" + description + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshots.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshots.java new file mode 100644 index 0000000..006d30c --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Snapshots.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Snapshots implements Iterable, Serializable { + + @JsonProperty("snapshots") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Snapshots [list=" + list + "]"; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Volume.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Volume.java new file mode 100644 index 0000000..d4b7e6e --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Volume.java @@ -0,0 +1,116 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("volume") +public class Volume implements Serializable { + + private String id; + + private String status; + + @JsonProperty("displayName") + private String name; + + @JsonProperty("displayDescription") + private String description; + + private String availabilityZone; + + private String volumeType; + + private String snapshotId; + + private List> attachments; + + private Map metadata; + + private String createdAt; + + private Integer size; + + /** + * @return the id + */ + public String getId() { + return id; + } + + /** + * @return the status + */ + public String getStatus() { + return status; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @return the availabilityZone + */ + public String getAvailabilityZone() { + return availabilityZone; + } + + /** + * @return the volumeType + */ + public String getVolumeType() { + return volumeType; + } + + /** + * @return the snapshotId + */ + public String getSnapshotId() { + return snapshotId; + } + + /** + * @return the attachments + */ + public List> getAttachments() { + return attachments; + } + + /** + * @return the metadata + */ + public Map getMetadata() { + return metadata; + } + + /** + * @return the createdAt + */ + public String getCreatedAt() { + return createdAt; + } + + /** + * @return the size + */ + public Integer getSize() { + return size; + } + + + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachment.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachment.java new file mode 100644 index 0000000..54abc9e --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachment.java @@ -0,0 +1,59 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("volumeAttachment") +public class VolumeAttachment implements Serializable { + + private String id; + + private String volumeId; + + private String serverId; + + private String device; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getVolumeId() { + return volumeId; + } + + public void setVolumeId(String volumeId) { + this.volumeId = volumeId; + } + + public String getServerId() { + return serverId; + } + + public void setServerId(String serverId) { + this.serverId = serverId; + } + + public String getDevice() { + return device; + } + + public void setDevice(String device) { + this.device = device; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "VolumeAttachment [id=" + id + ", volumeId=" + volumeId + + ", serverId=" + serverId + ", device=" + device + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachments.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachments.java new file mode 100644 index 0000000..be5ea8e --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeAttachments.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class VolumeAttachments implements Iterable, Serializable { + + @JsonProperty("volumeAttachments") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "VolumeAttachments [list=" + list + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForCreate.java new file mode 100644 index 0000000..c4a09a3 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForCreate.java @@ -0,0 +1,123 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Map; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("volume") +public class VolumeForCreate implements Serializable { + + private Integer size; + + @JsonProperty("availability_zone") + private String availabilityZone; + + @JsonProperty("display_name") + private String name; + + @JsonProperty("display_description") + private String description; + + @JsonProperty("snapshot_id") + private Integer snapshotId; + + private Map metadata; + + /** + * @return the size + */ + public Integer getSize() { + return size; + } + + /** + * @param size the size to set + */ + public void setSize(Integer size) { + this.size = size; + } + + /** + * @return the availabilityZone + */ + public String getAvailabilityZone() { + return availabilityZone; + } + + /** + * @param availabilityZone the availabilityZone to set + */ + public void setAvailabilityZone(String availabilityZone) { + this.availabilityZone = availabilityZone; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the description + */ + public String getDescription() { + return description; + } + + /** + * @param description the description to set + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * @return the snapshotId + */ + public Integer getSnapshotId() { + return snapshotId; + } + + /** + * @param snapshotId the snapshotId to set + */ + public void setSnapshotId(Integer snapshotId) { + this.snapshotId = snapshotId; + } + + /** + * @return the metadata + */ + public Map getMetadata() { + return metadata; + } + + /** + * @param metadata the metadata to set + */ + public void setMetadata(Map metadata) { + this.metadata = metadata; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "VolumeForCreate [size=" + size + ", availabilityZone=" + + availabilityZone + ", name=" + name + ", description=" + + description + ", snapshotId=" + snapshotId + ", metadata=" + + metadata + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForImageCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForImageCreate.java new file mode 100644 index 0000000..994d49a --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeForImageCreate.java @@ -0,0 +1,71 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import org.codehaus.jackson.annotate.JsonProperty; +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("os-volume_upload_image") +public class VolumeForImageCreate implements Serializable { + String volumeId; + String tenantId; + + public String getTenantId() { + return tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + @JsonProperty("force") + private Boolean force; + + public Boolean getForce() { + return force; + } + + public void setForce(Boolean force) { + this.force = force; + } + + @JsonProperty("container_format") + String container_format; + @JsonProperty("disk_format") + String disk_format; + @JsonProperty("image_name") + String image_name; + + public String getVolumeId() { + return volumeId; + } + + public void setVolumeId(String volumeId) { + this.volumeId = volumeId; + } + + public String getContainer_format() { + return container_format; + } + + public void setContainer_format(String container_format) { + this.container_format = container_format; + } + + public String getDisk_format() { + return disk_format; + } + + public void setDisk_format(String disk_format) { + this.disk_format = disk_format; + } + + public String getImage_name() { + return image_name; + } + + public void setImage_name(String image_name) { + this.image_name = image_name; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeType.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeType.java new file mode 100644 index 0000000..4c25e4b --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeType.java @@ -0,0 +1,10 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; + +import org.codehaus.jackson.map.annotate.JsonRootName; + +@JsonRootName("volume-type") +public class VolumeType implements Serializable { + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeTypes.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeTypes.java new file mode 100644 index 0000000..42d8162 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/VolumeTypes.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class VolumeTypes implements Iterable, Serializable { + + @JsonProperty("volume-types") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "VolumeTypes [list=" + list + "]"; + } + +} diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Volumes.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Volumes.java new file mode 100644 index 0000000..349ef87 --- /dev/null +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Volumes.java @@ -0,0 +1,34 @@ +package com.woorea.openstack.nova.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonProperty; + +public class Volumes implements Iterable, Serializable { + + @JsonProperty("volumes") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return "Volumes [list=" + list + "]"; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + +} -- cgit 1.2.3-korg