diff --git a/ceilometer-client/pom.xml b/ceilometer-client/pom.xml index f8a9a3fe1..f3ef40495 100644 --- a/ceilometer-client/pom.xml +++ b/ceilometer-client/pom.xml @@ -1,23 +1,23 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - ceilometer-client - OpenStack Ceilometer Client - OpenStack Ceilometer Client - - - com.woorea - openstack-client - 3.2.2-SNAPSHOT - - - com.woorea - ceilometer-model - 3.2.2-SNAPSHOT - - - + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + ceilometer-client + OpenStack Ceilometer Client + OpenStack Ceilometer Client + + + com.woorea + openstack-client + 3.0.9x + + + com.woorea + ceilometer-model + 3.0.9x + + + diff --git a/ceilometer-model/pom.xml b/ceilometer-model/pom.xml index 2718bdbe8..73a4154d2 100644 --- a/ceilometer-model/pom.xml +++ b/ceilometer-model/pom.xml @@ -1,11 +1,11 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - ceilometer-model - OpenStack Ceilometer Model - OpenStack Ceilometer Model - + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + ceilometer-model + OpenStack Ceilometer Model + OpenStack Ceilometer Model + diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java index df9182f9c..537e21af5 100644 --- a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java +++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Meter.java @@ -1,23 +1,23 @@ package com.woorea.openstack.ceilometer.v2.model; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Meter { @JsonProperty("user_id") private String user; - - + + private String name; - + @JsonProperty("resource_id") private String resource; - + @JsonProperty("project_id") private String project; - + private String type; - + private String unit; public String getUser() { diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java index 24e14aa3d..ad5a621ce 100644 --- a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java +++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Resource.java @@ -2,22 +2,23 @@ import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Resource { - //{"resource_id": "23b55841eedd41e99d5f3f32149ca086", "timestamp": "2013-03-03T15:19:00", "project_id": "23b55841eedd41e99d5f3f32149ca086", "user_id": null, "metadata": {}} - + // {"resource_id": "23b55841eedd41e99d5f3f32149ca086", "timestamp": "2013-03-03T15:19:00", "project_id": + // "23b55841eedd41e99d5f3f32149ca086", "user_id": null, "metadata": {}} + @JsonProperty("resource_id") private String resource; - + private String timestamp; - + @JsonProperty("project_id") private String project; - + @JsonProperty("user_id") private String user; - + private Map metadata; public String getResource() { @@ -46,5 +47,5 @@ public String toString() { + ", project=" + project + ", user=" + user + ", metadata=" + metadata + "]"; } - + } diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java index 8827de466..1fb6b98ed 100644 --- a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java +++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Sample.java @@ -2,7 +2,7 @@ import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Sample { @@ -11,29 +11,29 @@ public class Sample { @JsonProperty("counter_name") private String counterName; - + @JsonProperty("counter_unit") private String counterUnit; - + @JsonProperty("counter_volume") private String counterVolume; - + private String source; - + @JsonProperty("project_id") private String project; - + @JsonProperty("user_id") private String user; - + @JsonProperty("resource_id") private String resource; - + private String timestamp; - + @JsonProperty("message_id") private String message; - + @JsonProperty("resource_metadata") private Map metadata; @@ -90,5 +90,5 @@ public String toString() { + resource + ", timestamp=" + timestamp + ", message=" + message + ", metadata=" + metadata + "]"; } - + } diff --git a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java index 5a34fe54b..31438c533 100644 --- a/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java +++ b/ceilometer-model/src/main/java/com/woorea/openstack/ceilometer/v2/model/Statistics.java @@ -2,34 +2,34 @@ import java.math.BigDecimal; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Statistics { - + private BigDecimal avg; - + private BigDecimal count; - + private BigDecimal duration; - + @JsonProperty("duration_start") private String durationStart; - + @JsonProperty("duration_end") private String durationEnd; - + private BigDecimal max; - + private BigDecimal min; - + private BigDecimal period; - + @JsonProperty("period_start") private String periodStart; - + @JsonProperty("period_end") private String periodEnd; - + private BigDecimal sum; public BigDecimal getAvg() { @@ -84,5 +84,5 @@ public String toString() { + min + ", period=" + period + ", periodStart=" + periodStart + ", periodEnd=" + periodEnd + ", sum=" + sum + "]"; } - + } diff --git a/glance-client/pom.xml b/glance-client/pom.xml index 6eb537e1c..a40c879f4 100644 --- a/glance-client/pom.xml +++ b/glance-client/pom.xml @@ -1,24 +1,24 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - glance-client - OpenStack Glance Client - OpenStack Glance Client - - - com.woorea - openstack-client - 3.2.2-SNAPSHOT - - - - com.woorea - glance-model - 3.2.2-SNAPSHOT - - + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + glance-client + OpenStack Glance Client + OpenStack Glance Client + + + com.woorea + openstack-client + 3.0.9x + + + + com.woorea + glance-model + 3.0.9x + + \ No newline at end of file diff --git a/glance-client/src/main/java/com/woorea/openstack/glance/ImagesResource.java b/glance-client/src/main/java/com/woorea/openstack/glance/ImagesResource.java index ae46548db..920c3a6ff 100644 --- a/glance-client/src/main/java/com/woorea/openstack/glance/ImagesResource.java +++ b/glance-client/src/main/java/com/woorea/openstack/glance/ImagesResource.java @@ -5,8 +5,7 @@ import java.util.HashMap; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; - +import com.fasterxml.jackson.annotation.JsonProperty; import com.woorea.openstack.base.client.Entity; import com.woorea.openstack.base.client.HttpMethod; import com.woorea.openstack.base.client.OpenStackClient; @@ -14,43 +13,43 @@ import com.woorea.openstack.base.client.OpenStackResponse; import com.woorea.openstack.glance.model.Image; import com.woorea.openstack.glance.model.ImageDownload; -import com.woorea.openstack.glance.model.ImageUpload; import com.woorea.openstack.glance.model.ImageMember; import com.woorea.openstack.glance.model.ImageMembers; +import com.woorea.openstack.glance.model.ImageUpload; import com.woorea.openstack.glance.model.Images; public class ImagesResource { private final OpenStackClient CLIENT; - + public ImagesResource(OpenStackClient client) { CLIENT = client; } - + public List list(boolean detail) { return new List(detail); } - + public Create create(Image image) { return new Create(image); } - + public Show show(String id) { return new Show(id); } - + public Update update(String id, Image image) { return new Update(id, image); } - + public Delete delete(String id) { return new Delete(id); } - + public Upload upload(ImageUpload image) { return new Upload(image); } - + public Upload upload(String id, ImageUpload image) { return new Upload(id, image); } @@ -58,31 +57,31 @@ public Upload upload(String id, ImageUpload image) { public Download download(String id) { return new Download(id); } - + public ListMembers listMembers(String id) { return new ListMembers(id); } - + public ReplaceMembers replaceMembers(String id, Collection members) { return new ReplaceMembers(id, members); } - + public AddMember addMember(String id, String tenantId) { return new AddMember(id, tenantId); } - + public AddMember removeMember(String id, String tenantId) { return new AddMember(id, tenantId); } public class List extends OpenStackRequest { - + public List(boolean detail) { super(CLIENT, HttpMethod.GET, detail ? "/images/detail" : "images", null, Images.class); } } - + public class Create extends OpenStackRequest { public Create(Image image) { @@ -91,27 +90,28 @@ public Create(Image image) { header(entry.getKey(), entry.getValue()); } } - + } - + public class Update extends OpenStackRequest { - + public Update(String id, Image image) { - super(CLIENT, HttpMethod.PUT, new StringBuilder("/images/").append(id).toString(), Entity.json(image), Image.class); + super(CLIENT, HttpMethod.PUT, new StringBuilder("/images/").append(id).toString(), Entity.json(image), + Image.class); } } - + public class Delete extends OpenStackRequest { - + public Delete(String id) { super(CLIENT, HttpMethod.DELETE, new StringBuilder("/images/").append(id).toString(), null, Void.class); } - + } - + public class Show extends OpenStackRequest { - + public Show(String id) { super(CLIENT, HttpMethod.HEAD, new StringBuilder("/images/").append(id).toString(), null, Image.class); } @@ -121,11 +121,11 @@ public Image execute() { // custom parsing here return parse(CLIENT.request(this).headers()); } - + } - + public class Upload extends OpenStackRequest { - + public Upload(String id, ImageUpload imageUpload) { super(CLIENT, HttpMethod.PUT, new StringBuilder("/images/").append(id).toString(), Entity.stream(imageUpload.getInputStream()), Image.class); @@ -138,16 +138,17 @@ public Upload(ImageUpload imageUpload) { header(entry.getKey(), entry.getValue()); } - //file,s3,swift + // file,s3,swift header("x-image-meta-store", imageUpload.getStore()); } } - + public class Download extends OpenStackRequest { - + public Download(String id) { - super(CLIENT, HttpMethod.GET, new StringBuilder("/images/").append(id).toString(), null, ImageDownload.class); + super(CLIENT, HttpMethod.GET, new StringBuilder("/images/").append(id).toString(), null, + ImageDownload.class); header("Accept", "application/octet-stream"); } @@ -162,35 +163,39 @@ public ImageDownload execute() { } } - + public class ListMembers extends OpenStackRequest { - + public ListMembers(String id) { - super(CLIENT, HttpMethod.GET, new StringBuilder("/images/").append(id).append("/members").toString(), null, ImageMembers.class); + super(CLIENT, HttpMethod.GET, new StringBuilder("/images/").append(id).append("/members").toString(), null, + ImageMembers.class); } - + } - + public class ReplaceMembers extends OpenStackRequest { - + public ReplaceMembers(String id, Collection members) { - super(CLIENT, HttpMethod.PUT, new StringBuilder("/images/").append(id).append("/members").toString(), Entity.json(new Memberships(members)), Void.class); + super(CLIENT, HttpMethod.PUT, new StringBuilder("/images/").append(id).append("/members").toString(), + Entity.json(new Memberships(members)), Void.class); } - + } public class AddMember extends OpenStackRequest { - + public AddMember(String id, String tenantId) { - super(CLIENT, HttpMethod.PUT, new StringBuilder("/images/").append(id).append("/members").append(tenantId).toString(), null, ImageMember.class); + super(CLIENT, HttpMethod.PUT, new StringBuilder("/images/").append(id).append("/members").append(tenantId) + .toString(), null, ImageMember.class); } } public class RemoveMember extends OpenStackRequest { - + public RemoveMember(String id, String tenantId) { - super(CLIENT, HttpMethod.DELETE, new StringBuilder("/images/").append(id).append("/members/").append(tenantId).toString(), null, Void.class); + super(CLIENT, HttpMethod.DELETE, new StringBuilder("/images/").append(id).append("/members/") + .append(tenantId).toString(), null, Void.class); } } @@ -207,7 +212,7 @@ public static Map compose(Image image) { headers.put("X-Image-Meta-Is_public", String.valueOf(image.isPublic())); headers.put("X-Image-Meta-Owner", image.getOwner()); - for(String key : image.getProperties().keySet()) { + for (String key : image.getProperties().keySet()) { image.getProperties().put("x-image-meta-property-" + key, image.getProperties().get(key)); } @@ -233,48 +238,48 @@ public static Image parse(Map headers) { image.setMinRam(asInteger(headers.get("X-Image-Meta-Min_ram"))); image.setMinDisk(asInteger(headers.get("X-Image-Meta-Min_disk"))); image.setOwner(headers.get("X-Image-Meta-Owner")); - for(String key : headers.keySet()) { - if(key.startsWith("x-image-meta-property-")) { + for (String key : headers.keySet()) { + if (key.startsWith("x-image-meta-property-")) { image.getProperties().put(key.substring(22), headers.get(key)); } } return image; } - + private static Calendar asCalendar(String calendarString) { return Calendar.getInstance(); } - + private static Integer asInteger(String integerString) { - if(integerString != null) { + if (integerString != null) { return Integer.parseInt(integerString); } return 0; } - + private static Boolean asBoolean(String booleanString) { - if(booleanString != null) { + if (booleanString != null) { return Boolean.parseBoolean(booleanString); } return Boolean.FALSE; } - + private static Long asLong(String longString) { - if(longString != null) { + if (longString != null) { return Long.parseLong(longString); } return 0L; } - + public static class Memberships { - + @JsonProperty("memberships") private Collection memberships; - + public Memberships(Collection memberships) { this.memberships = memberships; } - + } - + } diff --git a/glance-model/pom.xml b/glance-model/pom.xml index 2efc98be8..7f7777829 100644 --- a/glance-model/pom.xml +++ b/glance-model/pom.xml @@ -1,11 +1,11 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - glance-model - OpenStack Glance Model - OpenStack Glance Model + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + glance-model + OpenStack Glance Model + OpenStack Glance Model \ No newline at end of file diff --git a/glance-model/src/main/java/com/woorea/openstack/glance/model/Image.java b/glance-model/src/main/java/com/woorea/openstack/glance/model/Image.java index 491fde640..bdf803ab6 100644 --- a/glance-model/src/main/java/com/woorea/openstack/glance/model/Image.java +++ b/glance-model/src/main/java/com/woorea/openstack/glance/model/Image.java @@ -5,8 +5,8 @@ import java.util.HashMap; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("image") public class Image implements Serializable { @@ -14,47 +14,47 @@ public class Image implements Serializable { private String id; private String uri; - + private String name; - + @JsonProperty("disk_format") private String diskFormat; - + @JsonProperty("container_format") private String containerFormat; - + private Long size; - + private String checksum; - + @JsonProperty("created_at") private Calendar createdAt; - + @JsonProperty("updated_at") private Calendar updatedAt; - + @JsonProperty("deleted_at") private Calendar deletedAt; - + private String status; - + @JsonProperty("is_public") private boolean isPublic; - + @JsonProperty("min_ram") private Integer minRam; - + @JsonProperty("min_disk") private Integer minDisk; - + private String owner; - + @JsonProperty("deleted") private boolean isDeleted; - + @JsonProperty("protected") private boolean isProtected; - + private Map properties; /** @@ -65,7 +65,8 @@ public String getId() { } /** - * @param id the id to set + * @param id + * the id to set */ public void setId(String id) { this.id = id; @@ -79,7 +80,8 @@ public String getUri() { } /** - * @param uri the uri to set + * @param uri + * the uri to set */ public void setUri(String uri) { this.uri = uri; @@ -93,7 +95,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -107,7 +110,8 @@ public String getDiskFormat() { } /** - * @param diskFormat the diskFormat to set + * @param diskFormat + * the diskFormat to set */ public void setDiskFormat(String diskFormat) { this.diskFormat = diskFormat; @@ -121,7 +125,8 @@ public String getContainerFormat() { } /** - * @param containerFormat the containerFormat to set + * @param containerFormat + * the containerFormat to set */ public void setContainerFormat(String containerFormat) { this.containerFormat = containerFormat; @@ -135,7 +140,8 @@ public Long getSize() { } /** - * @param size the size to set + * @param size + * the size to set */ public void setSize(Long size) { this.size = size; @@ -149,7 +155,8 @@ public String getChecksum() { } /** - * @param checksum the checksum to set + * @param checksum + * the checksum to set */ public void setChecksum(String checksum) { this.checksum = checksum; @@ -163,7 +170,8 @@ public Calendar getCreatedAt() { } /** - * @param createdAt the createdAt to set + * @param createdAt + * the createdAt to set */ public void setCreatedAt(Calendar createdAt) { this.createdAt = createdAt; @@ -177,7 +185,8 @@ public Calendar getUpdatedAt() { } /** - * @param updatedAt the updatedAt to set + * @param updatedAt + * the updatedAt to set */ public void setUpdatedAt(Calendar updatedAt) { this.updatedAt = updatedAt; @@ -191,7 +200,8 @@ public Calendar getDeletedAt() { } /** - * @param deletedAt the deletedAt to set + * @param deletedAt + * the deletedAt to set */ public void setDeletedAt(Calendar deletedAt) { this.deletedAt = deletedAt; @@ -205,7 +215,8 @@ public String getStatus() { } /** - * @param status the status to set + * @param status + * the status to set */ public void setStatus(String status) { this.status = status; @@ -219,7 +230,8 @@ public boolean isPublic() { } /** - * @param isPublic the isPublic to set + * @param isPublic + * the isPublic to set */ public void setPublic(boolean isPublic) { this.isPublic = isPublic; @@ -233,7 +245,8 @@ public Integer getMinRam() { } /** - * @param minRam the minRam to set + * @param minRam + * the minRam to set */ public void setMinRam(Integer minRam) { this.minRam = minRam; @@ -247,7 +260,8 @@ public Integer getMinDisk() { } /** - * @param minDisk the minDisk to set + * @param minDisk + * the minDisk to set */ public void setMinDisk(Integer minDisk) { this.minDisk = minDisk; @@ -261,7 +275,8 @@ public String getOwner() { } /** - * @param owner the owner to set + * @param owner + * the owner to set */ public void setOwner(String owner) { this.owner = owner; @@ -275,7 +290,8 @@ public boolean isDeleted() { } /** - * @param isDeleted the isDeleted to set + * @param isDeleted + * the isDeleted to set */ public void setDeleted(boolean isDeleted) { this.isDeleted = isDeleted; @@ -289,7 +305,8 @@ public boolean isProtected() { } /** - * @param isProtected the isProtected to set + * @param isProtected + * the isProtected to set */ public void setProtected(boolean isProtected) { this.isProtected = isProtected; @@ -299,13 +316,15 @@ public void setProtected(boolean isProtected) { * @return the properties */ public Map getProperties() { - if(properties == null) { + if (properties == null) { properties = new HashMap(); } return properties; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -320,5 +339,5 @@ public String toString() { + isDeleted + ", isProtected=" + isProtected + ", properties=" + properties + "]"; } - + } diff --git a/glance-model/src/main/java/com/woorea/openstack/glance/model/ImageMember.java b/glance-model/src/main/java/com/woorea/openstack/glance/model/ImageMember.java index 4b8c3e753..d1d90a1b8 100644 --- a/glance-model/src/main/java/com/woorea/openstack/glance/model/ImageMember.java +++ b/glance-model/src/main/java/com/woorea/openstack/glance/model/ImageMember.java @@ -2,18 +2,18 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class ImageMember implements Serializable { @JsonProperty("can_share") private boolean canShare; - + @JsonProperty("member_id") private String memberId; public ImageMember() { - + } public ImageMember(boolean canShare, String memberId) { @@ -29,7 +29,8 @@ public boolean isCanShare() { } /** - * @param canShare the canShare to set + * @param canShare + * the canShare to set */ public void setCanShare(boolean canShare) { this.canShare = canShare; @@ -43,7 +44,8 @@ public String getMemberId() { } /** - * @param memberId the memberId to set + * @param memberId + * the memberId to set */ public void setMemberId(String memberId) { this.memberId = memberId; diff --git a/glance-model/src/main/java/com/woorea/openstack/glance/model/ImageMembers.java b/glance-model/src/main/java/com/woorea/openstack/glance/model/ImageMembers.java index 68aa17612..9213e6e05 100644 --- a/glance-model/src/main/java/com/woorea/openstack/glance/model/ImageMembers.java +++ b/glance-model/src/main/java/com/woorea/openstack/glance/model/ImageMembers.java @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class ImageMembers implements Iterable, Serializable { @@ -22,5 +22,5 @@ public List getList() { public Iterator iterator() { return list.iterator(); } - + } \ No newline at end of file diff --git a/glance-model/src/main/java/com/woorea/openstack/glance/model/Images.java b/glance-model/src/main/java/com/woorea/openstack/glance/model/Images.java index af612ba1d..621c774d9 100644 --- a/glance-model/src/main/java/com/woorea/openstack/glance/model/Images.java +++ b/glance-model/src/main/java/com/woorea/openstack/glance/model/Images.java @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Images implements Iterable, Serializable { @@ -22,5 +22,5 @@ public List getList() { public Iterator iterator() { return list.iterator(); } - + } diff --git a/glance-model/src/main/java/com/woorea/openstack/glance/model/SharedImages.java b/glance-model/src/main/java/com/woorea/openstack/glance/model/SharedImages.java index 111d0942b..f554970be 100644 --- a/glance-model/src/main/java/com/woorea/openstack/glance/model/SharedImages.java +++ b/glance-model/src/main/java/com/woorea/openstack/glance/model/SharedImages.java @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class SharedImages implements Iterable, Serializable { @@ -22,5 +22,5 @@ public List getList() { public Iterator iterator() { return list.iterator(); } - + } \ No newline at end of file diff --git a/keystone-client/pom.xml b/keystone-client/pom.xml index 69a46ed43..2e12a6392 100644 --- a/keystone-client/pom.xml +++ b/keystone-client/pom.xml @@ -1,23 +1,23 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - keystone-client - OpenStack Keystone Client - OpenStack Keystone Client - - - com.woorea - openstack-client - 3.2.2-SNAPSHOT - - - com.woorea - keystone-model - 3.2.2-SNAPSHOT - - + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + keystone-client + OpenStack Keystone Client + OpenStack Keystone Client + + + com.woorea + openstack-client + 3.0.9x + + + com.woorea + keystone-model + 3.0.9x + + \ No newline at end of file diff --git a/keystone-model/pom.xml b/keystone-model/pom.xml index 0c8794192..b10ca36d2 100644 --- a/keystone-model/pom.xml +++ b/keystone-model/pom.xml @@ -1,11 +1,11 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - keystone-model - OpenStack Keystone Model - OpenStack Keystone Model + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + keystone-model + OpenStack Keystone Model + OpenStack Keystone Model \ No newline at end of file diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Access.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Access.java index a7968ff44..5a822c019 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Access.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Access.java @@ -4,24 +4,24 @@ import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("access") public class Access implements Serializable { public static final class Service { - - @JsonIgnoreProperties(ignoreUnknown=true) + + @JsonIgnoreProperties(ignoreUnknown = true) public static final class Endpoint { - + private String region; - + private String publicURL; - + private String internalURL; - + private String adminURL; /** @@ -52,7 +52,9 @@ public String getAdminURL() { return adminURL; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -61,15 +63,15 @@ public String toString() { + publicURL + ", internalURL=" + internalURL + ", adminURL=" + adminURL + "]"; } - + } - + private String type; - + private String name; - + private List endpoints; - + @JsonProperty("endpoints_links") private List endpointsLinks; @@ -101,7 +103,9 @@ public List getEndpointsLinks() { return endpointsLinks; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -109,17 +113,17 @@ public String toString() { return "Service [type=" + type + ", name=" + name + ", endpoints=" + endpoints + ", endpointsLinks=" + endpointsLinks + "]"; } - + } - - @JsonIgnoreProperties(ignoreUnknown=true) + + @JsonIgnoreProperties(ignoreUnknown = true) public static final class User { - - @JsonIgnoreProperties(ignoreUnknown=true) + + @JsonIgnoreProperties(ignoreUnknown = true) public static final class Role { - + private String id; - + private String name; /** @@ -136,24 +140,26 @@ public String getName() { return name; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override public String toString() { return "Role [id=" + id + ", name=" + name + "]"; } - + } - + private String id; - + private String name; - + private String username; - + private List roles; - + @JsonProperty("roles_links") private List rolesLinks; @@ -192,7 +198,9 @@ public List getRolesLinks() { return rolesLinks; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -201,15 +209,15 @@ public String toString() { + username + ", roles=" + roles + ", rolesLinks=" + rolesLinks + "]"; } - + } - + private Token token; - + private List serviceCatalog; - + private User user; - + private Map metadata; /** @@ -240,7 +248,9 @@ public Map getMetadata() { return metadata; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -248,5 +258,5 @@ public String toString() { return "Access [token=" + token + ", serviceCatalog=" + serviceCatalog + ", user=" + user + ", metadata=" + metadata + "]"; } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Authentication.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Authentication.java index f5c8f5c9d..31688404b 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Authentication.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Authentication.java @@ -2,12 +2,10 @@ import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; - public abstract class Authentication implements Serializable { private String tenantId; - + private String tenantName; /** @@ -18,7 +16,8 @@ public String getTenantId() { } /** - * @param tenantId the tenantId to set + * @param tenantId + * the tenantId to set */ public void setTenantId(String tenantId) { this.tenantId = tenantId; @@ -32,10 +31,11 @@ public String getTenantName() { } /** - * @param tenantName the tenantName to set + * @param tenantName + * the tenantName to set */ public void setTenantName(String tenantName) { this.tenantName = tenantName; } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoint.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoint.java index f179e2542..3a401b9f1 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoint.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoint.java @@ -2,25 +2,25 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("endpoint") public class Endpoint implements Serializable { private String id; - + @JsonProperty("service_id") private String serviceId; - + private String region; - + @JsonProperty("publicurl") private String publicURL; - + @JsonProperty("internalurl") private String internalURL; - + @JsonProperty("adminurl") private String adminURL; @@ -32,7 +32,8 @@ public String getId() { } /** - * @param id the id to set + * @param id + * the id to set */ public void setId(String id) { this.id = id; @@ -46,7 +47,8 @@ public String getServiceId() { } /** - * @param serviceId the serviceId to set + * @param serviceId + * the serviceId to set */ public void setServiceId(String serviceId) { this.serviceId = serviceId; @@ -60,7 +62,8 @@ public String getRegion() { } /** - * @param region the region to set + * @param region + * the region to set */ public void setRegion(String region) { this.region = region; @@ -74,7 +77,8 @@ public String getPublicURL() { } /** - * @param publicURL the publicURL to set + * @param publicURL + * the publicURL to set */ public void setPublicURL(String publicURL) { this.publicURL = publicURL; @@ -88,7 +92,8 @@ public String getInternalURL() { } /** - * @param internalURL the internalURL to set + * @param internalURL + * the internalURL to set */ public void setInternalURL(String internalURL) { this.internalURL = internalURL; @@ -102,13 +107,16 @@ public String getAdminURL() { } /** - * @param adminURL the adminURL to set + * @param adminURL + * the adminURL to set */ public void setAdminURL(String adminURL) { this.adminURL = adminURL; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -117,5 +125,5 @@ public String toString() { + region + ", publicURL=" + publicURL + ", internalURL=" + internalURL + ", adminURL=" + adminURL + "]"; } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoints.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoints.java index d7a58983c..d2440759c 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoints.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Endpoints.java @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Endpoints implements Iterable, Serializable { @@ -17,8 +17,10 @@ public class Endpoints implements Iterable, Serializable { public List getList() { return list; } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -30,5 +32,5 @@ public String toString() { public Iterator iterator() { return list.iterator(); } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Error.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Error.java index 5549f4c83..c5e1ee9bb 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Error.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Error.java @@ -2,15 +2,15 @@ import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("error") public class Error implements Serializable { private Integer code; - + private String title; - + private String message; /** @@ -34,7 +34,9 @@ public String getMessage() { return message; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -42,5 +44,5 @@ public String toString() { return "Error [code=" + code + ", title=" + title + ", message=" + message + "]"; } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Role.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Role.java index 993b0d9e2..76b86416e 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Role.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Role.java @@ -2,17 +2,17 @@ import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("role") public class Role implements Serializable { private String id; - + private String name; - + private String description; - + private String enabled; /** @@ -30,7 +30,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -44,7 +45,8 @@ public String getDescription() { } /** - * @param description the description to set + * @param description + * the description to set */ public void setDescription(String description) { this.description = description; @@ -58,7 +60,8 @@ public String getEnabled() { } /** - * @param enabled the enabled to set + * @param enabled + * the enabled to set */ public void setEnabled(String enabled) { this.enabled = enabled; diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Roles.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Roles.java index 22e18ed95..2d2a3e52b 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Roles.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Roles.java @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Roles implements Iterable, Serializable { @@ -17,8 +17,10 @@ public class Roles implements Iterable, Serializable { public List getList() { return list; } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -30,5 +32,5 @@ public String toString() { public Iterator iterator() { return list.iterator(); } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Service.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Service.java index ed9eb53ec..a49b7f1d7 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Service.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Service.java @@ -2,17 +2,17 @@ import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("OS-KSADM:service") public class Service implements Serializable { private String id; - + private String type; - + private String name; - + private String description; /** @@ -30,7 +30,8 @@ public String getType() { } /** - * @param type the type to set + * @param type + * the type to set */ public void setType(String type) { this.type = type; @@ -44,7 +45,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -58,13 +60,16 @@ public String getDescription() { } /** - * @param description the description to set + * @param description + * the description to set */ public void setDescription(String description) { this.description = description; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -72,5 +77,5 @@ public String toString() { return "Service [id=" + id + ", type=" + type + ", name=" + name + ", description=" + description + "]"; } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Services.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Services.java index 5c7958cf1..0ef846710 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Services.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Services.java @@ -4,9 +4,9 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; -public class Services implements Iterable, Serializable { +public class Services implements Iterable, Serializable { @JsonProperty("OS-KSADM:services") private List list; @@ -17,8 +17,10 @@ public class Services implements Iterable, Serializable { public List getList() { return list; } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -30,5 +32,5 @@ public String toString() { public Iterator iterator() { return list.iterator(); } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenant.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenant.java index a20b71b7e..a90189d9b 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenant.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenant.java @@ -2,35 +2,35 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("tenant") -@JsonIgnoreProperties(ignoreUnknown=true) +@JsonIgnoreProperties(ignoreUnknown = true) public class Tenant implements Serializable { private String id; - + private String name; - + private String description; - + private Boolean enabled; - + public Tenant(String name, String description, Boolean enabled) { this.name = name; this.description = description; this.enabled = enabled; } - + public Tenant(String name, String description) { this(name, description, Boolean.TRUE); } - + public Tenant(String name) { this(name, null); } - + public Tenant() { } @@ -42,7 +42,8 @@ public String getId() { } /** - * @param id the id to set + * @param id + * the id to set */ public void setId(String id) { this.id = id; @@ -56,7 +57,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -70,7 +72,8 @@ public String getDescription() { } /** - * @param description the description to set + * @param description + * the description to set */ public void setDescription(String description) { this.description = description; @@ -84,13 +87,16 @@ public Boolean getEnabled() { } /** - * @param enabled the enabled to set + * @param enabled + * the enabled to set */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -98,5 +104,5 @@ public String toString() { return "Tenant [id=" + id + ", name=" + name + ", description=" + description + ", enabled=" + enabled + "]"; } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenants.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenants.java index 51e370c02..cd8a9b197 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenants.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Tenants.java @@ -4,13 +4,13 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Tenants implements Iterable, Serializable { @JsonProperty("tenants") private List list; - + @JsonProperty("tenants_links") private List links; @@ -28,7 +28,9 @@ public List getLinks() { return links; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -40,5 +42,5 @@ public String toString() { public Iterator iterator() { return list.iterator(); } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/User.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/User.java index 53271f46b..2b2b0e1d3 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/User.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/User.java @@ -2,25 +2,25 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("user") public class User implements Serializable { private String id; - + private String username; - + @JsonProperty("OS_KSADM_password") private String password; - + private String tenantId; - + private String name; - + private String email; - + private Boolean enabled; /** @@ -31,7 +31,8 @@ public String getId() { } /** - * @param id the id to set + * @param id + * the id to set */ public void setId(String id) { this.id = id; @@ -45,7 +46,8 @@ public String getUsername() { } /** - * @param username the username to set + * @param username + * the username to set */ public void setUsername(String username) { this.username = username; @@ -59,7 +61,8 @@ public String getPassword() { } /** - * @param password the password to set + * @param password + * the password to set */ public void setPassword(String password) { this.password = password; @@ -73,7 +76,8 @@ public String getTenantId() { } /** - * @param tenantId the tenantId to set + * @param tenantId + * the tenantId to set */ public void setTenantId(String tenantId) { this.tenantId = tenantId; @@ -87,7 +91,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -101,7 +106,8 @@ public String getEmail() { } /** - * @param email the email to set + * @param email + * the email to set */ public void setEmail(String email) { this.email = email; @@ -115,13 +121,16 @@ public Boolean getEnabled() { } /** - * @param enabled the enabled to set + * @param enabled + * the enabled to set */ public void setEnabled(Boolean enabled) { this.enabled = enabled; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -130,5 +139,5 @@ public String toString() { + password + ", tenantId=" + tenantId + ", name=" + name + ", email=" + email + ", enabled=" + enabled + "]"; } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Users.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Users.java index c88aabcf9..73abdf1bc 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Users.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/Users.java @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Users implements Iterable, Serializable { @@ -17,8 +17,10 @@ public class Users implements Iterable, Serializable { public List getList() { return list; } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -30,5 +32,5 @@ public String toString() { public Iterator iterator() { return list.iterator(); } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/AccessKey.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/AccessKey.java index 4767450a5..13e030426 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/AccessKey.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/AccessKey.java @@ -1,16 +1,15 @@ package com.woorea.openstack.keystone.model.authentication; -import org.codehaus.jackson.map.annotate.JsonRootName; - +import com.fasterxml.jackson.annotation.JsonRootName; import com.woorea.openstack.keystone.model.Authentication; @JsonRootName("auth") public class AccessKey extends Authentication { - + public static final class ApiAccessKeyCredentials { - + private String accessKey; - + private String secretKey; /** @@ -21,7 +20,8 @@ public String getAccessKey() { } /** - * @param accessKey the accessKey to set + * @param accessKey + * the accessKey to set */ public void setAccessKey(String accessKey) { this.accessKey = accessKey; @@ -35,20 +35,21 @@ public String getSecretKey() { } /** - * @param secretKey the secretKey to set + * @param secretKey + * the secretKey to set */ public void setSecretKey(String secretKey) { this.secretKey = secretKey; } - + } - + private ApiAccessKeyCredentials apiAccessKeyCredentials = new ApiAccessKeyCredentials(); - + public AccessKey() { - + } - + public AccessKey(String accessKey, String secretKey) { apiAccessKeyCredentials.setAccessKey(accessKey); apiAccessKeyCredentials.setSecretKey(secretKey); @@ -62,11 +63,12 @@ public ApiAccessKeyCredentials getApiAccessKeyCredentials() { } /** - * @param apiAccessKeyCredentials the apiAccessKeyCredentials to set + * @param apiAccessKeyCredentials + * the apiAccessKeyCredentials to set */ public void setApiAccessKeyCredentials( ApiAccessKeyCredentials apiAccessKeyCredentials) { this.apiAccessKeyCredentials = apiAccessKeyCredentials; } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/TokenAuthentication.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/TokenAuthentication.java index 68cfcd2c5..7416d42ff 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/TokenAuthentication.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/TokenAuthentication.java @@ -1,14 +1,13 @@ package com.woorea.openstack.keystone.model.authentication; -import org.codehaus.jackson.map.annotate.JsonRootName; - +import com.fasterxml.jackson.annotation.JsonRootName; import com.woorea.openstack.keystone.model.Authentication; @JsonRootName("auth") public class TokenAuthentication extends Authentication { - + public static final class Token { - + private String id; /** @@ -19,16 +18,17 @@ public String getId() { } /** - * @param id the id to set + * @param id + * the id to set */ public void setId(String id) { this.id = id; } - + } - + private Token token = new Token(); - + public TokenAuthentication(String token) { this.token.id = token; } @@ -41,10 +41,11 @@ public Token getToken() { } /** - * @param token the token to set + * @param token + * the token to set */ public void setToken(Token token) { this.token = token; } - + } diff --git a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/UsernamePassword.java b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/UsernamePassword.java index ee94692bd..d18229187 100644 --- a/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/UsernamePassword.java +++ b/keystone-model/src/main/java/com/woorea/openstack/keystone/model/authentication/UsernamePassword.java @@ -1,16 +1,15 @@ package com.woorea.openstack.keystone.model.authentication; -import org.codehaus.jackson.map.annotate.JsonRootName; - +import com.fasterxml.jackson.annotation.JsonRootName; import com.woorea.openstack.keystone.model.Authentication; @JsonRootName("auth") public class UsernamePassword extends Authentication { - + public static final class PasswordCredentials { - + private String username; - + private String password; /** @@ -21,7 +20,8 @@ public String getUsername() { } /** - * @param username the username to set + * @param username + * the username to set */ public void setUsername(String username) { this.username = username; @@ -35,20 +35,21 @@ public String getPassword() { } /** - * @param password the password to set + * @param password + * the password to set */ public void setPassword(String password) { this.password = password; } - + } - + private PasswordCredentials passwordCredentials = new PasswordCredentials(); - + public UsernamePassword() { - + } - + public UsernamePassword(String username, String password) { passwordCredentials.setUsername(username); passwordCredentials.setPassword(password); @@ -62,10 +63,11 @@ public PasswordCredentials getPasswordCredentials() { } /** - * @param passwordCredentials the passwordCredentials to set + * @param passwordCredentials + * the passwordCredentials to set */ public void setPasswordCredentials(PasswordCredentials passwordCredentials) { this.passwordCredentials = passwordCredentials; } - + } diff --git a/nova-client/pom.xml b/nova-client/pom.xml index f967af043..f4400fd98 100644 --- a/nova-client/pom.xml +++ b/nova-client/pom.xml @@ -1,23 +1,23 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - nova-client - OpenStack Nova Client - OpenStack Nova Client - - - com.woorea - openstack-client - 3.2.2-SNAPSHOT - - - com.woorea - nova-model - 3.2.2-SNAPSHOT - - + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + nova-client + OpenStack Nova Client + OpenStack Nova Client + + + com.woorea + openstack-client + 3.0.9x + + + com.woorea + nova-model + 3.0.9x + + \ No newline at end of file diff --git a/nova-client/src/main/java/com/woorea/openstack/nova/api/ServersResource.java b/nova-client/src/main/java/com/woorea/openstack/nova/api/ServersResource.java index 9ba01b68a..d628b5da9 100644 --- a/nova-client/src/main/java/com/woorea/openstack/nova/api/ServersResource.java +++ b/nova-client/src/main/java/com/woorea/openstack/nova/api/ServersResource.java @@ -1,6 +1,10 @@ package com.woorea.openstack.nova.api; +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; import com.woorea.openstack.base.client.Entity; import com.woorea.openstack.base.client.HttpMethod; import com.woorea.openstack.base.client.OpenStackClient; @@ -58,13 +62,13 @@ public Show show(String id) { public ShowMetadata showMetadata(String id) { return new ShowMetadata(id); } - - public CreateOrUpdateMetadata createOrUpdateMetadata(String id,Metadata metadata) { - return new CreateOrUpdateMetadata(id,metadata); + + public CreateOrUpdateMetadata createOrUpdateMetadata(String id, Metadata metadata) { + return new CreateOrUpdateMetadata(id, metadata); } - - public ReplaceMetadata replaceMetadata(String id,Metadata metadata) { - return new ReplaceMetadata(id,metadata); + + public ReplaceMetadata replaceMetadata(String id, Metadata metadata) { + return new ReplaceMetadata(id, metadata); } @@ -102,27 +106,31 @@ public Show(String id) { public class ShowMetadata extends OpenStackRequest { public ShowMetadata(String id) { - super(CLIENT, HttpMethod.GET, new StringBuilder("/servers/").append(id).append("/metadata"), null, Metadata.class); + super(CLIENT, HttpMethod.GET, new StringBuilder("/servers/").append(id).append("/metadata"), null, + Metadata.class); } } - + public class CreateOrUpdateMetadata extends OpenStackRequest { - public CreateOrUpdateMetadata(String id,Metadata metadata) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/metadata"), Entity.json(metadata), Metadata.class); + public CreateOrUpdateMetadata(String id, Metadata metadata) { + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/metadata"), Entity + .json(metadata), Metadata.class); } } + public class ReplaceMetadata extends OpenStackRequest { - public ReplaceMetadata(String id,Metadata metadata) { - super(CLIENT, HttpMethod.PUT, new StringBuilder("/servers/").append(id).append("/metadata"), Entity.json(metadata), Metadata.class); + public ReplaceMetadata(String id, Metadata metadata) { + super(CLIENT, HttpMethod.PUT, new StringBuilder("/servers/").append(id).append("/metadata"), Entity + .json(metadata), Metadata.class); } } - - + + public class Delete extends OpenStackRequest { public Delete(String id) { @@ -134,7 +142,8 @@ public Delete(String id) { public class ShowServerAddresses extends OpenStackRequest { public ShowServerAddresses(String id) { - super(CLIENT, HttpMethod.GET, new StringBuilder("/servers/").append(id).append("/ips"), null, Addresses.class); + super(CLIENT, HttpMethod.GET, new StringBuilder("/servers/").append(id).append("/ips"), null, + Addresses.class); } } @@ -153,7 +162,8 @@ public UpdateServer(String id, Server server) { public abstract class Action extends OpenStackRequest { public Action(String id, Entity entity, Class returnType) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), entity, returnType); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), entity, + returnType); } } @@ -231,7 +241,8 @@ public class StartServer extends OpenStackRequest { private String id; public StartServer(String id) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(new Start()), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(new Start()), Void.class); } } @@ -243,7 +254,8 @@ public class StopServer extends OpenStackRequest { private String id; public StopServer(String id) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(new Stop()), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(new Stop()), Void.class); } } @@ -263,7 +275,8 @@ public class GetVncConsoleServer extends OpenStackRequest { private String id; public GetVncConsoleServer(String id, GetVncConsole action) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(action), VncConsole.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(action), VncConsole.class); } } @@ -276,7 +289,8 @@ public GetVncConsoleServer getVncConsole(String id, String type) { public class GetConsoleOutputServer extends OpenStackRequest { public GetConsoleOutputServer(String id, GetConsoleOutput action) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(action), ConsoleOutput.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(action), ConsoleOutput.class); } } @@ -289,7 +303,8 @@ public GetConsoleOutputServer getConsoleOutput(String id, int length) { public class PauseServer extends OpenStackRequest { public PauseServer(String id) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(new Pause()), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(new Pause()), Void.class); } } @@ -297,7 +312,8 @@ public PauseServer(String id) { public class UnpauseServer extends OpenStackRequest { public UnpauseServer(String id) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(new Unpause()), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(new Unpause()), Void.class); } @@ -310,7 +326,8 @@ public class LockServer extends OpenStackRequest { private String id; public LockServer(String id) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(new Lock()), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(new Lock()), Void.class); } } @@ -322,7 +339,8 @@ public class UnlockServer extends OpenStackRequest { private String id; public UnlockServer(String id) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(new Unlock()), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(new Unlock()), Void.class); } } @@ -330,7 +348,8 @@ public UnlockServer(String id) { public class SuspendServer extends OpenStackRequest { public SuspendServer(String id) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(new Suspend()), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(new Suspend()), Void.class); } } @@ -338,7 +357,8 @@ public SuspendServer(String id) { public class ResumeServer extends OpenStackRequest { public ResumeServer(String id) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(new Resume()), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(new Resume()), Void.class); } } @@ -346,7 +366,8 @@ public ResumeServer(String id) { public class CreateBackupServer extends OpenStackRequest { public CreateBackupServer(String id, CreateBackup action) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(action), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(action), Void.class); } } @@ -382,7 +403,8 @@ public CreateBackupServer createBackup(String serverId, CreateBackup action) { public class RescueServer extends OpenStackRequest { public RescueServer(String id, Rescue action) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(action), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(action), Void.class); } } @@ -390,7 +412,8 @@ public RescueServer(String id, Rescue action) { public class UnrescueServer extends OpenStackRequest { public UnrescueServer(String id) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(new Unrescue()), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(new Unrescue()), Void.class); } } @@ -407,33 +430,39 @@ public UnrescueServer unrescue(String serverId) { public class AssociateFloatingIp extends OpenStackRequest { public AssociateFloatingIp(String id, com.woorea.openstack.nova.model.ServerAction.AssociateFloatingIp action) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(action), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(action), Void.class); } } public class DisassociateFloatingIp extends OpenStackRequest { - public DisassociateFloatingIp(String id, com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp action) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity.json(action), Void.class); + public DisassociateFloatingIp(String id, + com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp action) { + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(id).append("/action"), Entity + .json(action), Void.class); } } public AssociateFloatingIp associateFloatingIp(String serverId, String floatingIpAddress) { - com.woorea.openstack.nova.model.ServerAction.AssociateFloatingIp action = new com.woorea.openstack.nova.model.ServerAction.AssociateFloatingIp(floatingIpAddress); + com.woorea.openstack.nova.model.ServerAction.AssociateFloatingIp action = new com.woorea.openstack.nova.model.ServerAction.AssociateFloatingIp( + floatingIpAddress); return new AssociateFloatingIp(serverId, action); } public DisassociateFloatingIp disassociateFloatingIp(String serverId, String floatingIpAddress) { - com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp action = new com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp(floatingIpAddress); + com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp action = new com.woorea.openstack.nova.model.ServerAction.DisassociateFloatingIp( + floatingIpAddress); return new DisassociateFloatingIp(serverId, action); } - public class AttachVolume extends OpenStackRequest { + public class AttachVolume extends OpenStackRequest { public AttachVolume(String serverId, final VolumeAttachment volumeAttachment) { - super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(serverId).append("/os-volume_attachments"), Entity.json(volumeAttachment), Void.class); + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(serverId).append( + "/os-volume_attachments"), Entity.json(volumeAttachment), Void.class); } } @@ -441,23 +470,26 @@ public AttachVolume(String serverId, final VolumeAttachment volumeAttachment) { public class DetachVolume extends OpenStackRequest { public DetachVolume(String serverId, String volumeId) { - super(CLIENT, HttpMethod.DELETE, new StringBuilder("/servers/").append(serverId).append("/os-volume_attachments/").append(volumeId), null, Void.class); + super(CLIENT, HttpMethod.DELETE, new StringBuilder("/servers/").append(serverId) + .append("/os-volume_attachments/").append(volumeId), null, Void.class); } } - public class ListVolumeAttachments extends OpenStackRequest { + public class ListVolumeAttachments extends OpenStackRequest { public ListVolumeAttachments(String serverId) { - super(CLIENT, HttpMethod.GET, new StringBuilder("/servers/").append(serverId).append("/os-volume_attachments"), null, VolumeAttachments.class); + super(CLIENT, HttpMethod.GET, new StringBuilder("/servers/").append(serverId).append( + "/os-volume_attachments"), null, VolumeAttachments.class); } } - public class ShowVolumeAttachment extends OpenStackRequest { + public class ShowVolumeAttachment extends OpenStackRequest { public ShowVolumeAttachment(String serverId, String volumeAttachmentId) { - super(CLIENT, HttpMethod.GET, new StringBuilder("/servers/").append(serverId).append("/os-volume_attachments/").append(volumeAttachmentId), null, VolumeAttachment.class); + super(CLIENT, HttpMethod.GET, new StringBuilder("/servers/").append(serverId) + .append("/os-volume_attachments/").append(volumeAttachmentId), null, VolumeAttachment.class); } } @@ -481,5 +513,33 @@ public ShowVolumeAttachment showVolumeAttachment(String serverId, String volumeA return new ShowVolumeAttachment(serverId, volumeAttachmentId); } -} + public Connect attachInterface(String serverId, String portId) { + InterfaceAttachment ia = new InterfaceAttachment(); + ia.setPortId(portId); + return new Connect(serverId, ia); + } + + @JsonRootName("interfaceAttachment") + public static final class InterfaceAttachment implements Serializable { + + @JsonProperty("port_id") + private String portId; + public String getPortId() { + return portId; + } + + public void setPortId(String portId) { + this.portId = portId; + } + } + + public class Connect extends OpenStackRequest { + + public Connect(String instanceId, InterfaceAttachment interfaceAttachment) { + super(CLIENT, HttpMethod.POST, new StringBuilder("/servers/").append(instanceId).append( + "/os-interface"), Entity.json(interfaceAttachment), Void.class); + } + } + +} diff --git a/nova-model/pom.xml b/nova-model/pom.xml index e7cfec5c3..8428f2cbe 100644 --- a/nova-model/pom.xml +++ b/nova-model/pom.xml @@ -1,11 +1,11 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - nova-model - OpenStack Nova Model - OpenStack Nova Model + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + 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 index b69eb3c60..21ffcb769 100644 --- 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 @@ -1,13 +1,13 @@ package com.woorea.openstack.nova.model; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("certificate") public class Certificate { private String data; - + @JsonProperty("private_key") private String privateKey; @@ -25,12 +25,14 @@ public String getPrivateKey() { return privateKey; } - /* (non-Javadoc) + /* + * (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 index 69d1b5a91..2cc8886c2 100644 --- 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 @@ -3,23 +3,23 @@ import java.io.Serializable; import java.util.Calendar; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.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; /** @@ -30,7 +30,8 @@ public String getProjectId() { } /** - * @param projectId the projectId to set + * @param projectId + * the projectId to set */ public void setProjectId(String projectId) { this.projectId = projectId; @@ -44,7 +45,8 @@ public String getInternalIp() { } /** - * @param internalIp the internalIp to set + * @param internalIp + * the internalIp to set */ public void setInternalIp(String internalIp) { this.internalIp = internalIp; @@ -58,7 +60,8 @@ public String getPublicIp() { } /** - * @param publicIp the publicIp to set + * @param publicIp + * the publicIp to set */ public void setPublicIp(String publicIp) { this.publicIp = publicIp; @@ -72,7 +75,8 @@ public String getPublicPort() { } /** - * @param publicPort the publicPort to set + * @param publicPort + * the publicPort to set */ public void setPublicPort(String publicPort) { this.publicPort = publicPort; @@ -86,7 +90,8 @@ public String getState() { } /** - * @param state the state to set + * @param state + * the state to set */ public void setState(String state) { this.state = state; @@ -100,7 +105,8 @@ public String getInstanceId() { } /** - * @param instanceId the instanceId to set + * @param instanceId + * the instanceId to set */ public void setInstanceId(String instanceId) { this.instanceId = instanceId; @@ -114,13 +120,16 @@ public Calendar getCreatedAt() { } /** - * @param createdAt the createdAt to set + * @param createdAt + * the createdAt to set */ public void setCreatedAt(Calendar createdAt) { this.createdAt = createdAt; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -130,5 +139,5 @@ public String toString() { + 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 index 3a3f13e01..a84718184 100644 --- 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 @@ -3,7 +3,7 @@ import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Cloudpipes implements Serializable { @@ -16,13 +16,15 @@ public class Cloudpipes implements Serializable { public List getList() { return list; } - - /* (non-Javadoc) + + /* + * (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 index 20892b78b..cd1ed0eff 100644 --- 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 @@ -4,21 +4,21 @@ import java.util.Calendar; import java.util.List; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.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; /** @@ -63,7 +63,9 @@ public List getLinks() { return links; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -71,5 +73,5 @@ 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 index 5d049d997..99e525d14 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Extensions implements Iterable, Serializable { @@ -17,13 +17,15 @@ public class Extensions implements Iterable, Serializable { public List getList() { return list; } - + @Override public Iterator iterator() { return list.iterator(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index b04472bf6..6792d3cdb 100644 --- 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 @@ -3,41 +3,41 @@ import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("flavor") public class Flavor 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; - + @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; @@ -49,7 +49,8 @@ public String getId() { } /** - * @param id the id to set + * @param id + * the id to set */ public void setId(String id) { this.id = id; @@ -63,7 +64,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -77,7 +79,8 @@ public String getVcpus() { } /** - * @param vcpus the vcpus to set + * @param vcpus + * the vcpus to set */ public void setVcpus(String vcpus) { this.vcpus = vcpus; @@ -91,7 +94,8 @@ public Integer getRam() { } /** - * @param ram the ram to set + * @param ram + * the ram to set */ public void setRam(Integer ram) { this.ram = ram; @@ -105,7 +109,8 @@ public String getDisk() { } /** - * @param disk the disk to set + * @param disk + * the disk to set */ public void setDisk(String disk) { this.disk = disk; @@ -119,7 +124,8 @@ public Integer getEphemeral() { } /** - * @param ephemeral the ephemeral to set + * @param ephemeral + * the ephemeral to set */ public void setEphemeral(Integer ephemeral) { this.ephemeral = ephemeral; @@ -133,7 +139,8 @@ public String getSwap() { } /** - * @param swap the swap to set + * @param swap + * the swap to set */ public void setSwap(String swap) { this.swap = swap; @@ -147,7 +154,8 @@ public Float getRxtxFactor() { } /** - * @param rxtxFactor the rxtxFactor to set + * @param rxtxFactor + * the rxtxFactor to set */ public void setRxtxFactor(Float rxtxFactor) { this.rxtxFactor = rxtxFactor; @@ -161,7 +169,8 @@ public Integer getRxtxQuota() { } /** - * @param rxtxQuota the rxtxQuota to set + * @param rxtxQuota + * the rxtxQuota to set */ public void setRxtxQuota(Integer rxtxQuota) { this.rxtxQuota = rxtxQuota; @@ -175,7 +184,8 @@ public Integer getRxtxCap() { } /** - * @param rxtxCap the rxtxCap to set + * @param rxtxCap + * the rxtxCap to set */ public void setRxtxCap(Integer rxtxCap) { this.rxtxCap = rxtxCap; @@ -189,12 +199,13 @@ public Boolean getDisabled() { } /** - * @param disabled the disabled to set + * @param disabled + * the disabled to set */ public void setDisabled(Boolean disabled) { this.disabled = disabled; } - + /** * @return the isPublic */ @@ -203,7 +214,8 @@ public Boolean isPublic() { } /** - * @param isPublic the isPublic to set + * @param isPublic + * the isPublic to set */ public void setPublic(Boolean isPublic) { this.isPublic = isPublic; @@ -217,13 +229,16 @@ public List getLinks() { } /** - * @param links the links to set + * @param links + * the links to set */ public void setLinks(List links) { this.links = links; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -235,5 +250,5 @@ public String toString() { + ", 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 index 295096d2a..690200b50 100644 --- 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 @@ -1,29 +1,28 @@ 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; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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; @@ -35,7 +34,8 @@ public String getId() { } /** - * @param id the id to set + * @param id + * the id to set */ public void setId(String id) { this.id = id; @@ -49,7 +49,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -63,7 +64,8 @@ public String getVcpus() { } /** - * @param vcpus the vcpus to set + * @param vcpus + * the vcpus to set */ public void setVcpus(String vcpus) { this.vcpus = vcpus; @@ -77,7 +79,8 @@ public Integer getRam() { } /** - * @param ram the ram to set + * @param ram + * the ram to set */ public void setRam(Integer ram) { this.ram = ram; @@ -91,7 +94,8 @@ public String getDisk() { } /** - * @param disk the disk to set + * @param disk + * the disk to set */ public void setDisk(String disk) { this.disk = disk; @@ -105,7 +109,8 @@ public Integer getEphemeral() { } /** - * @param ephemeral the ephemeral to set + * @param ephemeral + * the ephemeral to set */ public void setEphemeral(Integer ephemeral) { this.ephemeral = ephemeral; @@ -119,7 +124,8 @@ public String getSwap() { } /** - * @param swap the swap to set + * @param swap + * the swap to set */ public void setSwap(String swap) { this.swap = swap; @@ -133,10 +139,11 @@ public Float getRxtxFactor() { } /** - * @param rxtxFactor the rxtxFactor to set + * @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 index 0337a3bb5..560455921 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Flavors implements Iterable, Serializable { @@ -17,13 +17,15 @@ public class Flavors implements Iterable, Serializable { public List getList() { return list; } - + @Override public Iterator iterator() { return list.iterator(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index 3eda923f0..1be3207ec 100644 --- 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 @@ -2,21 +2,21 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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; @@ -55,7 +55,9 @@ public String getInstanceId() { return instanceId; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -63,5 +65,5 @@ 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 index 4a6a280e6..d1c64a21e 100644 --- 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 @@ -2,18 +2,18 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("floating-ip-pool") public class FloatingIpDomain implements Serializable { private String domain; - + private String scope; - + private String project; - + @JsonProperty("availabilityZone") private String availabilityZone; @@ -45,7 +45,9 @@ public String getAvailabilityZone() { return availabilityZone; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -54,5 +56,5 @@ public String toString() { + ", 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 index 292b59fb4..42929815e 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class FloatingIpDomains implements Iterable, Serializable { @@ -23,12 +23,14 @@ public Iterator iterator() { return list.iterator(); } - /* (non-Javadoc) + /* + * (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 index db1c0e3e2..c213ae9db 100644 --- 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 @@ -4,12 +4,11 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; - +import com.fasterxml.jackson.annotation.JsonProperty; import com.woorea.openstack.nova.model.FloatingIpPools.FloatingIpPool; public class FloatingIpPools implements Iterable, Serializable { - + public static class FloatingIpPool implements Serializable { private String name; @@ -21,14 +20,16 @@ public String getName() { return name; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override public String toString() { return "FloatingIpPool [name=" + name + "]"; } - + } @JsonProperty("floating_ip_pools") @@ -40,13 +41,15 @@ public String toString() { public List getList() { return list; } - + @Override public Iterator iterator() { return list.iterator(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index 776c4ca8e..5c9721f09 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class FloatingIps implements Iterable, Serializable { @@ -17,8 +17,10 @@ public class FloatingIps implements Iterable, Serializable { public List getList() { return list; } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -30,5 +32,5 @@ public String toString() { 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 index 40509642f..ebe5687a9 100644 --- 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 @@ -3,23 +3,23 @@ import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.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; @@ -58,7 +58,9 @@ public Integer getDiskGb() { return diskGb; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -67,9 +69,9 @@ public String toString() { + memoryMb + ", host=" + host + ", cpu=" + cpu + ", diskGb=" + diskGb + "]"; } - + } - + private Resource resource; /** @@ -79,14 +81,16 @@ public Resource getResource() { return resource; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override public String toString() { return "ResourceWrapper [resource=" + resource + "]"; } - + } private List host; @@ -98,12 +102,14 @@ public List getHost() { return host; } - /* (non-Javadoc) + /* + * (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 index ad68faab9..04bef852e 100644 --- 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 @@ -4,32 +4,32 @@ import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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; /** @@ -95,7 +95,9 @@ public Map getMetadata() { return metadata; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -106,5 +108,5 @@ public String toString() { + 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 index 6810e832e..ab88afc4f 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class HostAggregates implements Iterable, Serializable { @@ -17,13 +17,15 @@ public class HostAggregates implements Iterable, Serializable { public List getList() { return list; } - + @Override public Iterator iterator() { return list.iterator(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index 1bac38e32..02bc9e9b8 100644 --- 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 @@ -4,17 +4,17 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Hosts implements Iterable, Serializable { - + public static final class Host { - + private String zone; - + @JsonProperty("host_name") private String hostName; - + private String service; /** @@ -30,7 +30,7 @@ public String getHostName() { public String getService() { return service; } - + public String getZone() { return zone; } @@ -39,14 +39,16 @@ public void setZone(String zone) { this.zone = zone; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override public String toString() { return "Host [hostName=" + hostName + ", service=" + service + "]"; } - + } @JsonProperty("hosts") @@ -58,13 +60,15 @@ public String toString() { public List getList() { return list; } - + @Override public Iterator iterator() { return list.iterator(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -72,6 +76,5 @@ 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 index 93949f234..60fbc7650 100644 --- 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 @@ -5,62 +5,62 @@ import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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; /** @@ -71,7 +71,8 @@ public String getId() { } /** - * @param id the id to set + * @param id + * the id to set */ public void setId(String id) { this.id = id; @@ -85,7 +86,8 @@ public String getStatus() { } /** - * @param status the status to set + * @param status + * the status to set */ public void setStatus(String status) { this.status = status; @@ -99,7 +101,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -113,7 +116,8 @@ public Integer getProgress() { } /** - * @param progress the progress to set + * @param progress + * the progress to set */ public void setProgress(Integer progress) { this.progress = progress; @@ -127,7 +131,8 @@ public Integer getMinRam() { } /** - * @param minRam the minRam to set + * @param minRam + * the minRam to set */ public void setMinRam(Integer minRam) { this.minRam = minRam; @@ -141,7 +146,8 @@ public Integer getMinDisk() { } /** - * @param minDisk the minDisk to set + * @param minDisk + * the minDisk to set */ public void setMinDisk(Integer minDisk) { this.minDisk = minDisk; @@ -155,7 +161,8 @@ public Calendar getCreated() { } /** - * @param created the created to set + * @param created + * the created to set */ public void setCreated(Calendar created) { this.created = created; @@ -169,7 +176,8 @@ public Calendar getUpdated() { } /** - * @param updated the updated to set + * @param updated + * the updated to set */ public void setUpdated(Calendar updated) { this.updated = updated; @@ -190,12 +198,13 @@ public Long getSize() { } /** - * @param metadata the metadata to set + * @param metadata + * the metadata to set */ public void setMetadata(Map metadata) { this.metadata = metadata; } - + /** * @return the server */ @@ -211,13 +220,16 @@ public List getLinks() { } /** - * @param links the links to set + * @param links + * the links to set */ public void setLinks(List links) { this.links = links; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -226,7 +238,7 @@ public String toString() { + ", 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 + "]"; + + 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 index 30e38d8c6..3cd993c8e 100644 --- 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 @@ -2,8 +2,8 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("os-volume_upload_image") public class ImageFromVolume implements Serializable { 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 index e678e9782..b45ed9551 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Images implements Iterable, Serializable { @@ -17,14 +17,16 @@ public class Images implements Iterable, Serializable { public List getList() { return list; } - + @Override public Iterator iterator() { return list.iterator(); } - - - /* (non-Javadoc) + + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index b2fdb3464..e23468465 100644 --- 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 @@ -2,33 +2,33 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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; @@ -42,7 +42,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -63,7 +64,8 @@ public String getPublicKey() { } /** - * @param publicKey the publicKey to set + * @param publicKey + * the publicKey to set */ public void setPublicKey(String publicKey) { this.publicKey = publicKey; @@ -83,7 +85,9 @@ public String getFingerprint() { return fingerprint; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -93,6 +97,5 @@ public String toString() { + 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 index 62f158f73..c9d8abf9a 100644 --- 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 @@ -5,15 +5,15 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class KeyPairs implements Iterable, Serializable { - + public static final class KeyPairWrapper implements Serializable { - + @JsonProperty private KeyPair keypair; - + } @JsonProperty("keypairs") @@ -24,18 +24,20 @@ public static final class KeyPairWrapper implements Serializable { */ public List getList() { List list = new ArrayList(); - for(KeyPairWrapper wrapper : this.list) { + for (KeyPairWrapper wrapper : this.list) { list.add(wrapper.keypair); } return list; } - + @Override public Iterator iterator() { return getList().iterator(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index 86e9acf3b..2c243bb8b 100644 --- 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 @@ -4,8 +4,8 @@ import java.util.Calendar; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("limits") public class Limits implements Serializable { @@ -226,7 +226,7 @@ public Integer getTotalVolumesUsed() { public Integer getMaxSecurityGroupRules() { return maxSecurityGroupRules; } - + /** * @return the maxTotalKeypairs */ @@ -268,7 +268,7 @@ public Integer getTotalInstancesUsed() { public Integer getMaxSecurityGroups() { return maxSecurityGroups; } - + /** * @return the totalVolumeGigabytesUsed */ 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 index 6e82c1d64..785b61419 100644 --- 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 @@ -2,80 +2,80 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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; /** @@ -267,7 +267,9 @@ public String getPriority() { return priority; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -286,5 +288,5 @@ public String toString() { + ", 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 index f5785393b..2cf419f08 100644 --- 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 @@ -1,7 +1,6 @@ package com.woorea.openstack.nova.model; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; public class NetworkForCreate { 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 index 6e8a94150..d9774be3f 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Networks implements Iterable, Serializable { @@ -17,8 +17,10 @@ public class Networks implements Iterable, Serializable { public List getList() { return list; } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -30,5 +32,5 @@ public String toString() { public Iterator iterator() { return list.iterator(); } - + } 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 index 0a2f55dd7..43494770c 100644 --- 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 @@ -1,38 +1,38 @@ package com.woorea.openstack.nova.model; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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; 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 index 1b8917b4c..e4e19781e 100644 --- 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 @@ -3,72 +3,72 @@ import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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; + public static final class Group implements Serializable { + + private String name; + + @JsonProperty("tenant_id") + private String tenantId; - @JsonProperty("tenant_id") - private String tenantId; + public String getName() { + return name; + } - public String getName() { - return name; - } - - public String getTenantId() { - return tenantId; - } + public String getTenantId() { + return tenantId; + } - @Override - public String toString() { - return "Group [name=" + name + ", tenantId=" + tenantId + "]"; - } + @Override + public String toString() { + return "Group [name=" + name + ", tenantId=" + tenantId + "]"; + } - } + } - public static final class IpRange implements Serializable { + public static final class IpRange implements Serializable { - private String cidr; + private String cidr; - public String getCidr() { - return cidr; - } + public String getCidr() { + return cidr; + } - @Override - public String toString() { - return "IpRange [cidr=" + cidr + "]"; - } + @Override + public String toString() { + return "IpRange [cidr=" + cidr + "]"; + } - } + } - private String id; + private String id; - private String name; + private String name; - @JsonProperty("parent_group_id") - private String parentGroupId; + @JsonProperty("parent_group_id") + private String parentGroupId; - @JsonProperty("from_port") - private Integer fromPort; + @JsonProperty("from_port") + private Integer fromPort; - @JsonProperty("to_port") - private Integer toPort; + @JsonProperty("to_port") + private Integer toPort; - @JsonProperty("ip_protocol") - private String ipProtocol; + @JsonProperty("ip_protocol") + private String ipProtocol; - @JsonProperty("ip_range") - private IpRange ipRange = new IpRange(); + @JsonProperty("ip_range") + private IpRange ipRange = new IpRange(); - private Group group; + private Group group; /** * @return the id @@ -126,7 +126,9 @@ public Group getGroup() { return group; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -136,20 +138,20 @@ public String toString() { + 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; /** @@ -194,7 +196,9 @@ public List getLinks() { return links; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -203,5 +207,5 @@ public String toString() { + 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 index c3993bbec..14bf52d1d 100644 --- 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 @@ -2,19 +2,19 @@ import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.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; } @@ -32,7 +32,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -46,13 +47,16 @@ public String getDescription() { } /** - * @param description the description to set + * @param description + * the description to set */ public void setDescription(String description) { this.description = description; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -60,5 +64,5 @@ 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 index 2f58da00c..5384d184d 100644 --- 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 @@ -4,15 +4,15 @@ import javax.xml.bind.annotation.XmlElement; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("security_group_rule") public class SecurityGroupRuleForCreate implements Serializable { @JsonProperty("parent_group_id") private String parentGroupId; - + @JsonProperty("ip_protocol") private String ipProtocol; @@ -21,17 +21,17 @@ public class SecurityGroupRuleForCreate implements Serializable { @JsonProperty("to_port") private Integer toPort; - + @XmlElement private String cidr; @JsonProperty("group_id") private String groupId; - + public SecurityGroupRuleForCreate() { - + } - + /** * * @param parentSecurityGroupId @@ -39,16 +39,19 @@ public SecurityGroupRuleForCreate() { * @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 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) { + 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 @@ -56,26 +59,30 @@ public SecurityGroupRuleForCreate(Integer parentSecurityGroupId, String ipProtoc * @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 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) { + 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) { + + 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) { + + public SecurityGroupRuleForCreate(String parentGroupId, String sourceGroupId, String ipProtocol, Integer fromPort, + Integer toPort) { this.parentGroupId = parentGroupId; this.ipProtocol = ipProtocol; this.fromPort = fromPort; @@ -89,18 +96,21 @@ public SecurityGroupRuleForCreate(String parentGroupId, String sourceGroupId, St public String getParentGroupId() { return parentGroupId; } - - + + /** - * @param parentGroupId the parentGroupId to set + * @param parentGroupId + * the parentGroupId to set * @deprecated Use {@link #setParentGroupId(String)} */ + @Deprecated public void setParentGroupId(Integer parentGroupId) { this.parentGroupId = String.valueOf(parentGroupId); } - + /** - * @param parentGroupId the parentGroupId to set + * @param parentGroupId + * the parentGroupId to set */ public void setParentGroupId(String parentGroupId) { this.parentGroupId = parentGroupId; @@ -114,7 +124,8 @@ public Integer getFromPort() { } /** - * @param fromPort the fromPort to set + * @param fromPort + * the fromPort to set */ public void setFromPort(Integer fromPort) { this.fromPort = fromPort; @@ -128,7 +139,8 @@ public Integer getToPort() { } /** - * @param toPort the toPort to set + * @param toPort + * the toPort to set */ public void setToPort(Integer toPort) { this.toPort = toPort; @@ -142,7 +154,8 @@ public String getIpProtocol() { } /** - * @param ipProtocol the ipProtocol to set + * @param ipProtocol + * the ipProtocol to set */ public void setIpProtocol(String ipProtocol) { this.ipProtocol = ipProtocol; @@ -156,7 +169,8 @@ public String getCidr() { } /** - * @param cidr the cidr to set + * @param cidr + * the cidr to set */ public void setCidr(String cidr) { this.cidr = cidr; @@ -170,21 +184,26 @@ public String getGroupId() { } /** - * @param groupId the groupId to set + * @param groupId + * the groupId to set * @deprecated Use {@link #setGroupId(String)} */ + @Deprecated public void setGroupId(Integer groupId) { this.groupId = String.valueOf(groupId); } - + /** - * @param groupId the groupId to set + * @param groupId + * the groupId to set */ public void setGroupId(String groupId) { this.groupId = groupId; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index 1c8cc5533..4ea150e13 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class SecurityGroups implements Iterable, Serializable { @@ -17,8 +17,10 @@ public class SecurityGroups implements Iterable, Serializable { public List getList() { return list; } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -30,5 +32,5 @@ public String toString() { 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 index 589ed540d..7d532700d 100644 --- 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 @@ -6,31 +6,30 @@ 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; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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 - */ + /** + * @return the macAddr + */ public String getMacAddr() { return macAddr; } @@ -48,7 +47,7 @@ public String getVersion() { public String getAddr() { return addr; } - + /** * @return the type @@ -58,31 +57,35 @@ public String getType() { } /** - * @param version the version to set + * @param version + * the version to set */ public void setVersion(String version) { this.version = version; } /** - * @param addr the addr to set + * @param addr + * the addr to set */ public void setAddr(String addr) { this.addr = addr; } /** - * @param type the type to set + * @param type + * the type to set */ public void setType(String type) { this.type = type; } /** - * @param macAddr the mac addr to set + * @param macAddr + * the mac addr to set */ public void setMacAddr(String macAddr) { - this.macAddr= macAddr; + this.macAddr = macAddr; } } @@ -92,6 +95,7 @@ public void setMacAddr(String macAddr) { public void add(String key, List
value) { addresses.put(key, value); } + /** * @return the ip address List Map */ @@ -99,24 +103,26 @@ public Map> getAddresses() { return addresses; } - /* (non-Javadoc) + /* + * (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; /** @@ -147,7 +153,9 @@ public Calendar getCreated() { return created; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -155,91 +163,91 @@ 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:launched_at") + private String launchedAt; + + @JsonProperty("OS-SRV-USG:terminated_at") + private String terminatedAt; - @JsonProperty("OS-SRV-USG:terminated_at") - private String terminatedAt; + @JsonProperty("os-extended-volumes:volumes_attached") + private List osExtendedVolumesAttached; - @JsonProperty("os-extended-volumes:volumes_attached") - private List osExtendedVolumesAttached; - private String uuid; - + private String adminPass; /** @@ -278,7 +286,8 @@ public Image getImage() { } /** - * @param image the image to set + * @param image + * the image to set */ public void setImage(Image image) { this.image = image; @@ -290,9 +299,10 @@ public void setImage(Image image) { public Flavor getFlavor() { return flavor; } - + /** - * @param flavor the flavor to set + * @param flavor + * the flavor to set */ public void setFlavor(Flavor flavor) { this.flavor = flavor; @@ -452,28 +462,28 @@ 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 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() { @@ -487,7 +497,9 @@ public String getAdminPass() { return adminPass; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -506,8 +518,8 @@ public String toString() { + ", hypervisorHostname=" + hypervisorHostname + ", diskConfig=" + diskConfig + ", availabilityZone=" + availabilityZone + ", launchedAt=" + launchedAt + ", terminatedAt=" - + ", " + "osExtendedVolumesAttached=" + osExtendedVolumesAttached - + ", uuid=" + uuid + ", adminPass=" + + ", " + "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 index 26fa5a4a6..719032877 100644 --- 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 @@ -6,14 +6,14 @@ import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; public interface ServerAction extends Serializable { - + @JsonRootName("changePassword") public static final class ChangePassword implements ServerAction { - + private String adminPass; public ChangePassword() { @@ -33,17 +33,18 @@ public String getAdminPass() { } /** - * @param adminPass the adminPass to set + * @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; /** @@ -54,31 +55,32 @@ public String getType() { } /** - * @param type the type to set + * @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; @@ -90,7 +92,8 @@ public String getImageRef() { } /** - * @param imageRef the imageRef to set + * @param imageRef + * the imageRef to set */ public void setImageRef(String imageRef) { this.imageRef = imageRef; @@ -104,7 +107,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -118,7 +122,8 @@ public String getAdminPass() { } /** - * @param adminPass the adminPass to set + * @param adminPass + * the adminPass to set */ public void setAdminPass(String adminPass) { this.adminPass = adminPass; @@ -132,7 +137,8 @@ public String getAccessIPv4() { } /** - * @param accessIPv4 the accessIPv4 to set + * @param accessIPv4 + * the accessIPv4 to set */ public void setAccessIPv4(String accessIPv4) { this.accessIPv4 = accessIPv4; @@ -146,7 +152,8 @@ public String getAccessIPv6() { } /** - * @param accessIPv6 the accessIPv6 to set + * @param accessIPv6 + * the accessIPv6 to set */ public void setAccessIPv6(String accessIPv6) { this.accessIPv6 = accessIPv6; @@ -160,7 +167,8 @@ public Map getMetadata() { } /** - * @param metadata the metadata to set + * @param metadata + * the metadata to set */ public void setMetadata(Map metadata) { this.metadata = metadata; @@ -174,7 +182,8 @@ public List getPersonality() { } /** - * @param personality the personality to set + * @param personality + * the personality to set */ public void setPersonality(List personality) { this.personality = personality; @@ -188,19 +197,20 @@ public String getDiskConfig() { } /** - * @param diskConfig the diskConfig to set + * @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; @@ -212,7 +222,8 @@ public String getFlavorRef() { } /** - * @param flavorRef the flavorRef to set + * @param flavorRef + * the flavorRef to set */ public void setFlavorRef(String flavorRef) { this.flavorRef = flavorRef; @@ -226,29 +237,30 @@ public String getDiskConfig() { } /** - * @param diskConfig the diskConfig to set + * @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; /** @@ -259,7 +271,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -273,23 +286,24 @@ public Map getMetadata() { } /** - * @param metadata the metadata to set + * @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; } @@ -302,16 +316,17 @@ public String getAdminPass() { } /** - * @param adminPass the adminPass to set + * @param adminPass + * the adminPass to set */ public void setAdminPass(String adminPass) { this.adminPass = adminPass; } - + } - + public static final class RescueResponse implements ServerAction { - + private String adminPass; /** @@ -320,51 +335,51 @@ public static final class RescueResponse implements ServerAction { 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) { @@ -379,16 +394,17 @@ public Integer getLength() { } /** - * @param length the length to set + * @param length + * the length to set */ public void setLength(Integer length) { this.length = length; } - + } - + public static final class ConsoleOutput implements ServerAction { - + private String output; /** @@ -397,19 +413,19 @@ public static final class ConsoleOutput implements ServerAction { 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(); @@ -424,19 +440,20 @@ public String getType() { } /** - * @param type the type to set + * @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; /** @@ -452,32 +469,32 @@ public String getType() { 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() { @@ -498,19 +515,20 @@ public String getAddress() { } /** - * @param address the address to set + * @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 @@ -529,17 +547,18 @@ public String getAddress() { } /** - * @param address the address to set + * @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") @@ -557,7 +576,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -571,7 +591,8 @@ public String getType() { } /** - * @param type the type to set + * @param type + * the type to set */ public void setType(String type) { this.type = type; @@ -585,7 +606,8 @@ public String getRotation() { } /** - * @param rotation the rotation to set + * @param rotation + * the rotation to set */ public void setRotation(String rotation) { this.rotation = rotation; @@ -599,12 +621,13 @@ public Map getMetadata() { } /** - * @param metadata the metadata to set + * @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 index 9f28a8113..9ca812d47 100644 --- 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 @@ -6,8 +6,8 @@ import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("server") public class ServerForCreate implements Serializable { @@ -32,7 +32,7 @@ public String getName() { /** * @param name - * the name to set + * the name to set */ public void setName(String name) { this.name = name; @@ -89,7 +89,7 @@ public String getName() { /** * @param name - * the name to set + * the name to set */ public void setName(String name) { this.name = name; @@ -104,7 +104,7 @@ public String getAdminPass() { /** * @param adminPass - * the adminPass to set + * the adminPass to set */ public void setAdminPass(String adminPass) { this.adminPass = adminPass; @@ -119,7 +119,7 @@ public String getImageRef() { /** * @param imageRef - * the imageRef to set + * the imageRef to set */ public void setImageRef(String imageRef) { this.imageRef = imageRef; @@ -134,7 +134,7 @@ public String getFlavorRef() { /** * @param flavorRef - * the flavorRef to set + * the flavorRef to set */ public void setFlavorRef(String flavorRef) { this.flavorRef = flavorRef; @@ -149,7 +149,7 @@ public String getAccessIPv4() { /** * @param accessIPv4 - * the accessIPv4 to set + * the accessIPv4 to set */ public void setAccessIPv4(String accessIPv4) { this.accessIPv4 = accessIPv4; @@ -164,7 +164,7 @@ public String getAccessIPv6() { /** * @param accessIPv6 - * the accessIPv6 to set + * the accessIPv6 to set */ public void setAccessIPv6(String accessIPv6) { this.accessIPv6 = accessIPv6; @@ -179,7 +179,7 @@ public Integer getMin() { /** * @param min - * the min to set + * the min to set */ public void setMin(Integer min) { this.min = min; @@ -194,7 +194,7 @@ public Integer getMax() { /** * @param max - * the max to set + * the max to set */ public void setMax(Integer max) { this.max = max; @@ -209,7 +209,7 @@ public String getDiskConfig() { /** * @param diskConfig - * the diskConfig to set + * the diskConfig to set */ public void setDiskConfig(String diskConfig) { this.diskConfig = diskConfig; @@ -224,7 +224,7 @@ public String getKeyName() { /** * @param keyName - * the keyName to set + * the keyName to set */ public void setKeyName(String keyName) { this.keyName = keyName; @@ -239,7 +239,7 @@ public List getPersonality() { /** * @param personality - * the personality to set + * the personality to set */ public void setPersonality(List personality) { this.personality = personality; @@ -254,7 +254,7 @@ public Map getMetadata() { /** * @param metadata - * the metadata to set + * the metadata to set */ public void setMetadata(Map metadata) { this.metadata = metadata; @@ -279,7 +279,7 @@ public String getUserData() { /** * @param userData - * the userData to set + * the userData to set */ public void setUserData(String userData) { this.userData = userData; @@ -294,7 +294,7 @@ public String getAvailabilityZone() { /** * @param availabilityZone - * the availabilityZone to set + * the availabilityZone to set */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; 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 index a144250dc..a8337934a 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Servers implements Iterable, Serializable { @@ -17,13 +17,15 @@ public class Servers implements Iterable, Serializable { public List getList() { return list; } - + @Override public Iterator iterator() { return list.iterator(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index f75414d99..460e275d8 100644 --- 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 @@ -4,28 +4,28 @@ import java.math.BigDecimal; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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; @@ -40,7 +40,8 @@ public BigDecimal getTotalMemoryMbUsage() { } /** - * @param totalMemoryMbUsage the totalMemoryMbUsage to set + * @param totalMemoryMbUsage + * the totalMemoryMbUsage to set */ public void setTotalMemoryMbUsage(BigDecimal totalMemoryMbUsage) { this.totalMemoryMbUsage = totalMemoryMbUsage; @@ -54,7 +55,8 @@ public BigDecimal getTotalVcpusUsage() { } /** - * @param totalVcpusUsage the totalVcpusUsage to set + * @param totalVcpusUsage + * the totalVcpusUsage to set */ public void setTotalVcpusUsage(BigDecimal totalVcpusUsage) { this.totalVcpusUsage = totalVcpusUsage; @@ -68,7 +70,8 @@ public BigDecimal getTotalLocalGbUsage() { } /** - * @param totalLocalGbUsage the totalLocalGbUsage to set + * @param totalLocalGbUsage + * the totalLocalGbUsage to set */ public void setTotalLocalGbUsage(BigDecimal totalLocalGbUsage) { this.totalLocalGbUsage = totalLocalGbUsage; @@ -82,7 +85,8 @@ public String getStart() { } /** - * @param start the start to set + * @param start + * the start to set */ public void setStart(String start) { this.start = start; @@ -96,7 +100,8 @@ public String getStop() { } /** - * @param stop the stop to set + * @param stop + * the stop to set */ public void setStop(String stop) { this.stop = stop; @@ -110,7 +115,8 @@ public String getTenantId() { } /** - * @param tenantId the tenantId to set + * @param tenantId + * the tenantId to set */ public void setTenantId(String tenantId) { this.tenantId = tenantId; @@ -124,7 +130,8 @@ public String getTotalHours() { } /** - * @param totalHours the totalHours to set + * @param totalHours + * the totalHours to set */ public void setTotalHours(String totalHours) { this.totalHours = totalHours; @@ -138,7 +145,9 @@ public void setServerUsages(List serverUsages) { this.serverUsages = serverUsages; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -158,7 +167,7 @@ public static final class ServerUsage implements Serializable { @JsonProperty("started_at") private String startedAt; - + @JsonProperty("ended_at") private String endedAt; 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 index 33c46254d..24b3ff533 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class SimpleTenantUsages implements Iterable, Serializable { @@ -18,7 +18,9 @@ public List getList() { return list; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -30,5 +32,5 @@ public String toString() { 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 index 06b9c4d76..7cfcf3d6a 100644 --- 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 @@ -2,26 +2,26 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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; /** @@ -73,7 +73,9 @@ public String getCreatedAt() { return createdAt; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -83,5 +85,5 @@ public String toString() { + ", 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 index 5db392e49..fdbb5ac8f 100644 --- 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 @@ -2,17 +2,17 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("snapshot") public class SnapshotForCreate implements Serializable { - + @JsonProperty("volume_id") private String volumeId; - + private Boolean force; - + @JsonProperty("display_name") private String name; @@ -27,7 +27,8 @@ public String getVolumeId() { } /** - * @param volumeId the volumeId to set + * @param volumeId + * the volumeId to set */ public void setVolumeId(String volumeId) { this.volumeId = volumeId; @@ -41,7 +42,8 @@ public Boolean getForce() { } /** - * @param force the force to set + * @param force + * the force to set */ public void setForce(Boolean force) { this.force = force; @@ -55,7 +57,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -69,13 +72,16 @@ public String getDescription() { } /** - * @param description the description to set + * @param description + * the description to set */ public void setDescription(String description) { this.description = description; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index 006d30cb4..d677ec202 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Snapshots implements Iterable, Serializable { @@ -17,8 +17,10 @@ public class Snapshots implements Iterable, Serializable { public List getList() { return list; } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -30,5 +32,5 @@ public String toString() { 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 index d4b7e6e68..e03413475 100644 --- 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 @@ -4,34 +4,34 @@ import java.util.List; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.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; /** @@ -111,6 +111,5 @@ 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 index 54abc9e82..193c6fd5e 100644 --- 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 @@ -2,7 +2,7 @@ import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("volumeAttachment") public class VolumeAttachment implements Serializable { @@ -47,7 +47,9 @@ public void setDevice(String device) { this.device = device; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index be5ea8e33..082ce2a32 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class VolumeAttachments implements Iterable, Serializable { @@ -22,8 +22,10 @@ public List getList() { public Iterator iterator() { return list.iterator(); } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index c4a09a334..0de9d8062 100644 --- 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 @@ -3,8 +3,8 @@ import java.io.Serializable; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("volume") public class VolumeForCreate implements Serializable { @@ -33,7 +33,8 @@ public Integer getSize() { } /** - * @param size the size to set + * @param size + * the size to set */ public void setSize(Integer size) { this.size = size; @@ -47,7 +48,8 @@ public String getAvailabilityZone() { } /** - * @param availabilityZone the availabilityZone to set + * @param availabilityZone + * the availabilityZone to set */ public void setAvailabilityZone(String availabilityZone) { this.availabilityZone = availabilityZone; @@ -61,7 +63,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -75,7 +78,8 @@ public String getDescription() { } /** - * @param description the description to set + * @param description + * the description to set */ public void setDescription(String description) { this.description = description; @@ -89,7 +93,8 @@ public Integer getSnapshotId() { } /** - * @param snapshotId the snapshotId to set + * @param snapshotId + * the snapshotId to set */ public void setSnapshotId(Integer snapshotId) { this.snapshotId = snapshotId; @@ -103,13 +108,16 @@ public Map getMetadata() { } /** - * @param metadata the metadata to set + * @param metadata + * the metadata to set */ public void setMetadata(Map metadata) { this.metadata = metadata; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override 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 index 994d49a4d..d4ee00646 100644 --- 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 @@ -2,8 +2,8 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("os-volume_upload_image") public class VolumeForImageCreate implements Serializable { 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 index 4c25e4b81..bd1b30efd 100644 --- 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 @@ -2,7 +2,7 @@ import java.io.Serializable; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.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 index 42d8162d2..25162498e 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class VolumeTypes implements Iterable, Serializable { @@ -22,13 +22,15 @@ public List getList() { public Iterator iterator() { return list.iterator(); } - - /* (non-Javadoc) + + /* + * (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 index 349ef874a..479d9ae6a 100644 --- 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 @@ -4,7 +4,7 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Volumes implements Iterable, Serializable { @@ -17,8 +17,10 @@ public class Volumes implements Iterable, Serializable { public List getList() { return list; } - - /* (non-Javadoc) + + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -30,5 +32,5 @@ public String toString() { public Iterator iterator() { return list.iterator(); } - + } diff --git a/openstack-client-connectors/jersey-connector/pom.xml b/openstack-client-connectors/jersey-connector/pom.xml index b9b95c496..72b0b6a82 100644 --- a/openstack-client-connectors/jersey-connector/pom.xml +++ b/openstack-client-connectors/jersey-connector/pom.xml @@ -1,23 +1,38 @@ - - 4.0.0 - - com.woorea - openstack-client-connectors - 3.2.2-SNAPSHOT - - jersey-connector - OpenStack Jersey Connector - OpenStack Jersey Connector - - - com.sun.jersey - jersey-client - 1.17.1 - - - org.codehaus.jackson - jackson-jaxrs - 1.9.12 - - - + + 4.0.0 + + com.woorea + openstack-client-connectors + 3.0.9x + + jersey-connector + OpenStack Jersey Connector + OpenStack Jersey Connector + + + com.sun.jersey + jersey-client + 1.17.1 + + + com.fasterxml.jackson.core + jackson-annotations + 2.2.3 + + + com.fasterxml.jackson.core + jackson-core + 2.2.3 + + + com.fasterxml.jackson.core + jackson-databind + 2.2.3 + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + 2.2.3 + + + diff --git a/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyConnector.java b/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyConnector.java index 416f5dda3..3d0a076f6 100644 --- a/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyConnector.java +++ b/openstack-client-connectors/jersey-connector/src/main/java/com/woorea/openstack/connector/JerseyConnector.java @@ -8,13 +8,12 @@ import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.Provider; -import org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; -import org.codehaus.jackson.map.annotate.JsonRootName; -import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; - +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider; import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.UniformInterfaceException; @@ -29,10 +28,10 @@ import com.woorea.openstack.base.client.OpenStackResponseException; public class JerseyConnector implements OpenStackClientConnector { - + protected Client client = null; - protected boolean logPassword; - private JerseyLoggingFilter logger = new JerseyLoggingFilter(Logger.getLogger("os")); + protected boolean logPassword; + private JerseyLoggingFilter logger = new JerseyLoggingFilter(Logger.getLogger("os")); public JerseyConnector() { ClientConfig clientConfig = new DefaultClientConfig(); @@ -44,19 +43,19 @@ public JerseyConnector() { @Override public OpenStackResponse request(OpenStackRequest request) { WebResource target = client.resource(request.endpoint()).path(request.path()); - for(Map.Entry > entry : request.queryParams().entrySet()) { + for (Map.Entry> entry : request.queryParams().entrySet()) { for (Object o : entry.getValue()) { target = target.queryParam(entry.getKey(), String.valueOf(o)); } } target.addFilter(logger); MultivaluedMap headers = new OutBoundHeaders(); - for(Map.Entry> h : request.headers().entrySet()) { - for(Object v : h.getValue()) { + for (Map.Entry> h : request.headers().entrySet()) { + for (Object v : h.getValue()) { headers.add(h.getKey(), v); } } - if(request.entity() != null && request.entity().getContentType() != null) { + if (request.entity() != null && request.entity().getContentType() != null) { headers.add("Content-Type", request.entity().getContentType()); } else { headers.add("Content-Type", "application/json"); @@ -64,13 +63,17 @@ public OpenStackResponse request(OpenStackRequest request) { try { ClientResponse response = null; if (request.entity() != null && request.entity().getEntity() != null) { - response = target.getHeadHandler().handle(new ClientRequestImpl(target.getURI(), request.method().name(), request.entity().getEntity(), headers)); + response = target.getHeadHandler().handle( + new ClientRequestImpl(target.getURI(), request.method().name(), request.entity().getEntity(), + headers)); } else { - response = target.getHeadHandler().handle(new ClientRequestImpl(target.getURI(), request.method().name(), null, headers)); + response = target.getHeadHandler().handle( + new ClientRequestImpl(target.getURI(), request.method().name(), null, headers)); } return new JerseyResponse(response); } catch (UniformInterfaceException e) { - throw new OpenStackResponseException(e.getResponse().getClientResponseStatus().getReasonPhrase(), e.getResponse().getStatus()); + throw new OpenStackResponseException(e.getResponse().getClientResponseStatus().getReasonPhrase(), e + .getResponse().getStatus()); } } @@ -80,19 +83,19 @@ public static class OpenStackObjectMapper implements ContextResolver type) { return type.getAnnotation(JsonRootName.class) == null ? DEFAULT_MAPPER : WRAPPED_MAPPER; diff --git a/openstack-client-connectors/jersey2-connector/pom.xml b/openstack-client-connectors/jersey2-connector/pom.xml index 518ceb510..9df2088f6 100644 --- a/openstack-client-connectors/jersey2-connector/pom.xml +++ b/openstack-client-connectors/jersey2-connector/pom.xml @@ -1,33 +1,33 @@ - - - 4.0.0 - - com.woorea - openstack-client-connectors - 3.2.2-SNAPSHOT - - jersey2-connector - OpenStack Jersey2 Connector - OpenStack Jersey2 Connector - http://maven.apache.org - - UTF-8 - - - - org.glassfish.jersey.core - jersey-client - 2.0 - - - org.glassfish.jersey.media - jersey-media-json-jackson - 2.0 - - - com.woorea - openstack-client - 3.2.2-SNAPSHOT - - - + + + 4.0.0 + + com.woorea + openstack-client-connectors + 3.0.9x + + jersey2-connector + OpenStack Jersey2 Connector + OpenStack Jersey2 Connector + http://maven.apache.org + + UTF-8 + + + + org.glassfish.jersey.core + jersey-client + 2.0 + + + org.glassfish.jersey.media + jersey-media-json-jackson + 2.0 + + + com.woorea + openstack-client + 3.0.9x + + + diff --git a/openstack-client-connectors/pom.xml b/openstack-client-connectors/pom.xml index b5f29f241..840bccd77 100644 --- a/openstack-client-connectors/pom.xml +++ b/openstack-client-connectors/pom.xml @@ -1,48 +1,48 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - openstack-client-connectors - OpenStack Client Connectors - OpenStack Client Connectors - pom - - - jersey - - true - - - jersey-connector - - - - jersey2 - - true - - - jersey2-connector - - - - resteasy - - true - - - resteasy-connector - - - - - - com.woorea - openstack-client - 3.2.2-SNAPSHOT - - + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + openstack-client-connectors + OpenStack Client Connectors + OpenStack Client Connectors + pom + + + jersey + + true + + + jersey-connector + + + + jersey2 + + true + + + jersey2-connector + + + + resteasy + + true + + + resteasy-connector + + + + + + com.woorea + openstack-client + 3.0.9x + + \ No newline at end of file diff --git a/openstack-client-connectors/resteasy-connector/pom.xml b/openstack-client-connectors/resteasy-connector/pom.xml index 6cbea9dc8..fea535493 100644 --- a/openstack-client-connectors/resteasy-connector/pom.xml +++ b/openstack-client-connectors/resteasy-connector/pom.xml @@ -1,28 +1,43 @@ - - 4.0.0 - - com.woorea - openstack-client-connectors - 3.2.2-SNAPSHOT - - resteasy-connector - OpenStack RESTEasy Connector - OpenStack RESTEasy Connector - - - org.jboss.resteasy - resteasy-jaxrs - 2.3.2.Final - - - org.codehaus.jackson - jackson-jaxrs - 1.9.4 - - - commons-httpclient - commons-httpclient - 3.1 - - + + 4.0.0 + + com.woorea + openstack-client-connectors + 3.0.9x + + resteasy-connector + OpenStack RESTEasy Connector + OpenStack RESTEasy Connector + + + org.jboss.resteasy + resteasy-jaxrs + 3.0.5.Final + + + com.fasterxml.jackson.core + jackson-annotations + 2.2.3 + + + com.fasterxml.jackson.core + jackson-core + 2.2.3 + + + com.fasterxml.jackson.core + jackson-databind + 2.2.3 + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + 2.2.3 + + + commons-httpclient + commons-httpclient + 3.1 + + \ No newline at end of file diff --git a/openstack-client-connectors/resteasy-connector/src/main/java/com/woorea/openstack/connector/RESTEasyConnector.java b/openstack-client-connectors/resteasy-connector/src/main/java/com/woorea/openstack/connector/RESTEasyConnector.java index cc6ba824b..ad8dc7ade 100644 --- a/openstack-client-connectors/resteasy-connector/src/main/java/com/woorea/openstack/connector/RESTEasyConnector.java +++ b/openstack-client-connectors/resteasy-connector/src/main/java/com/woorea/openstack/connector/RESTEasyConnector.java @@ -8,17 +8,17 @@ import javax.ws.rs.ext.ContextResolver; import org.apache.commons.httpclient.HttpStatus; -import org.codehaus.jackson.jaxrs.JacksonJsonProvider; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; -import org.codehaus.jackson.map.annotate.JsonRootName; -import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; import org.jboss.resteasy.client.ClientRequest; import org.jboss.resteasy.client.ClientResponse; import org.jboss.resteasy.plugins.providers.InputStreamProvider; import org.jboss.resteasy.spi.ResteasyProviderFactory; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; import com.woorea.openstack.base.client.OpenStackClientConnector; import com.woorea.openstack.base.client.OpenStackRequest; import com.woorea.openstack.base.client.OpenStackResponse; @@ -39,6 +39,7 @@ public OpenStackProviderFactory() { super(); addContextResolver(new ContextResolver() { + @Override public ObjectMapper getContext(Class type) { return type.getAnnotation(JsonRootName.class) == null ? DEFAULT_MAPPER : WRAPPED_MAPPER; } @@ -60,26 +61,27 @@ public ObjectMapper getContext(Class type) { static { DEFAULT_MAPPER = new ObjectMapper(); - DEFAULT_MAPPER.setSerializationInclusion(Inclusion.NON_NULL); - DEFAULT_MAPPER.enable(SerializationConfig.Feature.INDENT_OUTPUT); - DEFAULT_MAPPER.enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + DEFAULT_MAPPER.setSerializationInclusion(Include.NON_NULL); + DEFAULT_MAPPER.enable(SerializationFeature.INDENT_OUTPUT); + DEFAULT_MAPPER.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); WRAPPED_MAPPER = new ObjectMapper(); - WRAPPED_MAPPER.setSerializationInclusion(Inclusion.NON_NULL); - WRAPPED_MAPPER.enable(SerializationConfig.Feature.INDENT_OUTPUT); - WRAPPED_MAPPER.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE); - WRAPPED_MAPPER.enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE); - WRAPPED_MAPPER.enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + WRAPPED_MAPPER.setSerializationInclusion(Include.NON_NULL); + WRAPPED_MAPPER.enable(SerializationFeature.INDENT_OUTPUT); + WRAPPED_MAPPER.enable(SerializationFeature.WRAP_ROOT_VALUE); + WRAPPED_MAPPER.enable(DeserializationFeature.UNWRAP_ROOT_VALUE); + WRAPPED_MAPPER.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); providerFactory = new OpenStackProviderFactory(); } + @Override public OpenStackResponse request(OpenStackRequest request) { ClientRequest client = new ClientRequest(UriBuilder.fromUri(request.endpoint() + "/" + request.path()), ClientRequest.getDefaultExecutor(), providerFactory); - for(Map.Entry > entry : request.queryParams().entrySet()) { + for (Map.Entry> entry : request.queryParams().entrySet()) { for (Object o : entry.getValue()) { client = client.queryParameter(entry.getKey(), String.valueOf(o)); } @@ -107,7 +109,8 @@ public OpenStackResponse request(OpenStackRequest request) { if (response.getStatus() == HttpStatus.SC_OK || response.getStatus() == HttpStatus.SC_CREATED - || response.getStatus() == HttpStatus.SC_NO_CONTENT) { + || response.getStatus() == HttpStatus.SC_NO_CONTENT + || response.getStatus() == HttpStatus.SC_ACCEPTED) { return new RESTEasyResponse(client, response); } diff --git a/openstack-client/pom.xml b/openstack-client/pom.xml index c3fcf3510..d64ebaca1 100644 --- a/openstack-client/pom.xml +++ b/openstack-client/pom.xml @@ -1,11 +1,11 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - openstack-client - OpenStack Client - OpenStack Client + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + openstack-client + OpenStack Client + OpenStack Client \ No newline at end of file diff --git a/openstack-console/pom.xml b/openstack-console/pom.xml index 2f462ec81..8b69f7ecd 100644 --- a/openstack-console/pom.xml +++ b/openstack-console/pom.xml @@ -1,77 +1,77 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - openstack-console - OpenStack Console - OpenStack Console - - - commons-cli - commons-cli - 1.2 - - - jline - jline - 2.10 - - - com.woorea - keystone-client - 3.2.2-SNAPSHOT - - - com.woorea - nova-client - 3.2.2-SNAPSHOT - - - - - jersey - - - com.woorea - jersey-connector - 3.0.0-SNAPSHOT - - - - - jersey2 - - - com.woorea - jersey2-connector - 3.0.0-SNAPSHOT - - - - - resteasy - - - com.woorea - resteasy-connector - 3.0.0-SNAPSHOT - - - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - com.woorea.openstack.console.Main - - - - + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + openstack-console + OpenStack Console + OpenStack Console + + + commons-cli + commons-cli + 1.2 + + + jline + jline + 2.10 + + + com.woorea + keystone-client + 3.0.9x + + + com.woorea + nova-client + 3.0.9x + + + + + jersey + + + com.woorea + jersey-connector + 3.0.0-SNAPSHOT + + + + + jersey2 + + + com.woorea + jersey2-connector + 3.0.0-SNAPSHOT + + + + + resteasy + + + com.woorea + resteasy-connector + 3.0.0-SNAPSHOT + + + + + + + + org.codehaus.mojo + exec-maven-plugin + 1.2.1 + + com.woorea.openstack.console.Main + + + + \ No newline at end of file diff --git a/openstack-examples/pom.xml b/openstack-examples/pom.xml index 812c59a89..5676b2fc3 100644 --- a/openstack-examples/pom.xml +++ b/openstack-examples/pom.xml @@ -1,78 +1,78 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - openstack-examples - OpenStack Examples - OpenStack Examples - - - com.woorea - keystone-client - 3.2.2-SNAPSHOT - - - com.woorea - nova-client - 3.2.2-SNAPSHOT - - - com.woorea - swift-client - 3.2.2-SNAPSHOT - - - com.woorea - quantum-client - 3.2.2-SNAPSHOT - - - com.woorea - ceilometer-client - 3.2.2-SNAPSHOT - - - com.woorea - glance-client - 3.2.2-SNAPSHOT - - - - - jersey - - - com.woorea - jersey-connector - 3.0.0-SNAPSHOT - - - - - jersey2 - - true - - - - com.woorea - jersey2-connector - 3.1.0-SNAPSHOT - - - - - resteasy - - - com.woorea - resteasy-connector - 3.1.0-SNAPSHOT - - - - + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + openstack-examples + OpenStack Examples + OpenStack Examples + + + com.woorea + keystone-client + 3.0.9x + + + com.woorea + nova-client + 3.0.9x + + + com.woorea + swift-client + 3.0.9x + + + com.woorea + quantum-client + 3.0.9x + + + com.woorea + ceilometer-client + 3.0.9x + + + com.woorea + glance-client + 3.0.9x + + + + + jersey + + + com.woorea + jersey-connector + 3.0.0-SNAPSHOT + + + + + jersey2 + + true + + + + com.woorea + jersey2-connector + 3.1.0-SNAPSHOT + + + + + resteasy + + + com.woorea + resteasy-connector + 3.1.0-SNAPSHOT + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 01e9d50e6..93537968b 100644 --- a/pom.xml +++ b/pom.xml @@ -1,146 +1,161 @@ - - 4.0.0 - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - pom - OpenStack Java SDK - OpenStack Java SDK - - - false - - - - org.sonatype.oss - oss-parent - 7 - - - - - nova-client - glance-client - keystone-client - swift-client - quantum-client - openstack-client - nova-model - glance-model - keystone-model - swift-model - quantum-model - ceilometer-model - ceilometer-client - openstack-client-connectors - - - - - console - - true - - - openstack-console - - - - examples - - true - - - openstack-examples - - - - - - - Apache2 - http://www.apache.org/licenses/LICENSE-2.0.txt - - - - 2012 - - - - woorea - Luis Gervaso - luis@woorea.es - +1 - - - - - scm:git:https://github.com/woorea/openstack-java-sdk.git - scm:git:https://github.com/woorea/openstack-java-sdk.git - http://github.com/woorea/openstack-java-sdk.git - - - - - org.codehaus.jackson - jackson-mapper-asl - 1.9.13 - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.0 - - 1.6 - 1.6 - UTF-8 - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.4 - - ${skip.sign} - - - - sign-artifacts - verify - - sign - - - - - - org.apache.maven.plugins - maven-eclipse-plugin - 2.9 - - - org.apache.maven.plugins - maven-resources-plugin - 2.6 - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - verify - - jar-no-fork - - - - - - + + 4.0.0 + com.woorea + openstack-java-sdk + 3.0.9x + pom + OpenStack Java SDK + OpenStack Java SDK + + + false + + + + org.sonatype.oss + oss-parent + 7 + + + + + nova-client + glance-client + keystone-client + swift-client + quantum-client + openstack-client + nova-model + glance-model + keystone-model + swift-model + quantum-model + ceilometer-model + ceilometer-client + openstack-client-connectors + + + + + console + + true + + + openstack-console + + + + examples + + true + + + openstack-examples + + + + + + + Apache2 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + 2012 + + + + woorea + Luis Gervaso + luis@woorea.es + +1 + + + + + scm:git:https://github.com/woorea/openstack-java-sdk.git + scm:git:https://github.com/woorea/openstack-java-sdk.git + http://github.com/woorea/openstack-java-sdk.git + + + + + com.fasterxml.jackson.core + jackson-annotations + 2.2.3 + + + com.fasterxml.jackson.core + jackson-core + 2.2.3 + + + com.fasterxml.jackson.core + jackson-databind + 2.2.3 + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + 2.2.3 + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.0 + + 1.6 + 1.6 + UTF-8 + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.4 + + true + + + + sign-artifacts + verify + + sign + + + + + + org.apache.maven.plugins + maven-eclipse-plugin + 2.9 + + + org.apache.maven.plugins + maven-resources-plugin + 2.6 + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + verify + + jar-no-fork + + + + + + \ No newline at end of file diff --git a/quantum-client/pom.xml b/quantum-client/pom.xml index 0f3426f02..7fc8a3da1 100644 --- a/quantum-client/pom.xml +++ b/quantum-client/pom.xml @@ -1,23 +1,23 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - quantum-client - OpenStack Quantum Client - OpenStack Quantum Client - - - com.woorea - openstack-client - 3.2.2-SNAPSHOT - - - com.woorea - quantum-model - 3.2.2-SNAPSHOT - - - + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + quantum-client + OpenStack Quantum Client + OpenStack Quantum Client + + + com.woorea + openstack-client + 3.0.9x + + + com.woorea + quantum-model + 3.0.9x + + + diff --git a/quantum-client/src/main/java/com/woorea/openstack/quantum/Quantum.java b/quantum-client/src/main/java/com/woorea/openstack/quantum/Quantum.java index ec9c40f97..c7a59a421 100644 --- a/quantum-client/src/main/java/com/woorea/openstack/quantum/Quantum.java +++ b/quantum-client/src/main/java/com/woorea/openstack/quantum/Quantum.java @@ -1,8 +1,9 @@ package com.woorea.openstack.quantum; - import com.woorea.openstack.base.client.OpenStackClient; import com.woorea.openstack.base.client.OpenStackClientConnector; +import com.woorea.openstack.quantum.api.ExtensionsResource; +import com.woorea.openstack.quantum.api.FloatingIPResource; import com.woorea.openstack.quantum.api.NetworksResource; import com.woorea.openstack.quantum.api.PortsResource; import com.woorea.openstack.quantum.api.RoutersResource; @@ -10,42 +11,56 @@ public class Quantum extends OpenStackClient { - + + private final ExtensionsResource EXTENSIONS; + private final NetworksResource NETWORKS; - + private final PortsResource PORTS; - + private final SubnetsResource SUBNETS; + private final RoutersResource ROUTERS; - + + private final FloatingIPResource FLOATING_IPS; + public Quantum(String endpoint, OpenStackClientConnector connector) { super(endpoint, connector); + EXTENSIONS = new ExtensionsResource(this); NETWORKS = new NetworksResource(this); PORTS = new PortsResource(this); SUBNETS = new SubnetsResource(this); - ROUTERS=new RoutersResource(this); - + ROUTERS = new RoutersResource(this); + FLOATING_IPS = new FloatingIPResource(this); } - + public Quantum(String endpoint) { this(endpoint, null); } - + + public ExtensionsResource extensions() { + return EXTENSIONS; + } + public NetworksResource networks() { return NETWORKS; } - + public PortsResource ports() { return PORTS; } - + public SubnetsResource subnets() { return SUBNETS; } + public RoutersResource routers() { return ROUTERS; } - + + public FloatingIPResource floatingIPs() { + return FLOATING_IPS; + } } diff --git a/quantum-client/src/main/java/com/woorea/openstack/quantum/api/ExtensionsResource.java b/quantum-client/src/main/java/com/woorea/openstack/quantum/api/ExtensionsResource.java new file mode 100644 index 000000000..40848d5de --- /dev/null +++ b/quantum-client/src/main/java/com/woorea/openstack/quantum/api/ExtensionsResource.java @@ -0,0 +1,29 @@ +package com.woorea.openstack.quantum.api; + + +import com.woorea.openstack.base.client.HttpMethod; +import com.woorea.openstack.base.client.OpenStackClient; +import com.woorea.openstack.base.client.OpenStackRequest; +import com.woorea.openstack.quantum.model.Extensions; + +public class ExtensionsResource { + + private final OpenStackClient CLIENT; + + public ExtensionsResource(OpenStackClient client) { + CLIENT = client; + } + + public List list() { + return new List(); + } + + public class List extends OpenStackRequest { + + public List() { + super(CLIENT, HttpMethod.GET, "extensions", null, Extensions.class); + } + + } + +} diff --git a/quantum-client/src/main/java/com/woorea/openstack/quantum/api/FloatingIPResource.java b/quantum-client/src/main/java/com/woorea/openstack/quantum/api/FloatingIPResource.java new file mode 100644 index 000000000..ccc8a119d --- /dev/null +++ b/quantum-client/src/main/java/com/woorea/openstack/quantum/api/FloatingIPResource.java @@ -0,0 +1,73 @@ +package com.woorea.openstack.quantum.api; + +import com.woorea.openstack.base.client.Entity; +import com.woorea.openstack.base.client.HttpMethod; +import com.woorea.openstack.base.client.OpenStackClient; +import com.woorea.openstack.base.client.OpenStackRequest; +import com.woorea.openstack.quantum.model.FloatingIP; +import com.woorea.openstack.quantum.model.FloatingIPs; + +public class FloatingIPResource { + + private final OpenStackClient CLIENT; + + public FloatingIPResource(OpenStackClient client) { + CLIENT = client; + } + + public List list() { + return new List(); + } + + public class List extends OpenStackRequest { + + public List() { + super(CLIENT, HttpMethod.GET, "floatingips", null, FloatingIPs.class); + } + } + + public Show show(String floatingIPId) { + return new Show(floatingIPId); + } + + public class Show extends OpenStackRequest { + + public Show(String id) { + super(CLIENT, HttpMethod.GET, buildPath("floatingips/", id), null, FloatingIP.class); + } + } + + public Create create(FloatingIP floatingIP) { + return new Create(floatingIP); + } + + public class Create extends OpenStackRequest { + + public Create(FloatingIP floatingIP) { + super(CLIENT, HttpMethod.POST, "floatingips", Entity.json(floatingIP), FloatingIP.class); + } + } + + public Update update(FloatingIP floatingIP) { + return new Update(floatingIP); + } + + public class Update extends OpenStackRequest { + + public Update(FloatingIP floatingIP) { + super(CLIENT, HttpMethod.POST, buildPath("floatingips/", floatingIP.getId()), Entity.json(floatingIP), + FloatingIP.class); + } + } + + public Delete delete(String floatingIPId) { + return new Delete(floatingIPId); + } + + public class Delete extends OpenStackRequest { + + public Delete(String id) { + super(CLIENT, HttpMethod.DELETE, buildPath("floatingips/", id), null, Void.class); + } + } +} diff --git a/quantum-client/src/main/java/com/woorea/openstack/quantum/api/RoutersResource.java b/quantum-client/src/main/java/com/woorea/openstack/quantum/api/RoutersResource.java index bcd646d09..6f5dc5a02 100644 --- a/quantum-client/src/main/java/com/woorea/openstack/quantum/api/RoutersResource.java +++ b/quantum-client/src/main/java/com/woorea/openstack/quantum/api/RoutersResource.java @@ -4,6 +4,7 @@ import com.woorea.openstack.base.client.HttpMethod; import com.woorea.openstack.base.client.OpenStackClient; import com.woorea.openstack.base.client.OpenStackRequest; +import com.woorea.openstack.quantum.model.HostRoute; import com.woorea.openstack.quantum.model.Router; import com.woorea.openstack.quantum.model.RouterForAddInterface; import com.woorea.openstack.quantum.model.RouterForCreate; @@ -12,81 +13,96 @@ public class RoutersResource { - private final OpenStackClient CLIENT; + private final OpenStackClient CLIENT; - public RoutersResource(OpenStackClient client) { - CLIENT = client; - } + public RoutersResource(OpenStackClient client) { + CLIENT = client; + } - public List list() { - return new List(); - } + public List list() { + return new List(); + } - public Create create(RouterForCreate router){ - return new Create(router); - } + public Create create(RouterForCreate router) { + return new Create(router); + } - public Delete delete(String netId){ - return new Delete(netId); - } + public UpdateRoute updateRoutes(String routerId, java.util.List rs) { + RouterForCreate router = new RouterForCreate(); + router.setRoutes(rs); + return new UpdateRoute(routerId, router); + } - public Show show(String netId){ - return new Show(netId); - } + public Delete delete(String netId) { + return new Delete(netId); + } + + public Show show(String netId) { + return new Show(netId); + } - public class List extends OpenStackRequest { + public class List extends OpenStackRequest { - public List() { - super(CLIENT, HttpMethod.GET, "routers", null, Routers.class); - } + public List() { + super(CLIENT, HttpMethod.GET, "routers", null, Routers.class); } + } - public class Query extends OpenStackRequest { + public class Query extends OpenStackRequest { - public Query(Router router) { - //super(network); + public Query(Router router) { + // super(network); // target = target.path("v2.0").path("networks"); // target = queryParam(target); // return target.request(MediaType.APPLICATION_JSON).get(Networks.class); - } } - public class Create extends OpenStackRequest { + } + + public class Create extends OpenStackRequest { - public Create(RouterForCreate router){ - super(CLIENT, HttpMethod.POST, "routers", Entity.json(router), Router.class); - } + public Create(RouterForCreate router) { + super(CLIENT, HttpMethod.POST, "routers", Entity.json(router), Router.class); } + } - + public class UpdateRoute extends OpenStackRequest { + public UpdateRoute(String routerId, RouterForCreate router) { + super(CLIENT, HttpMethod.PUT, buildPath("routers/", routerId), Entity.json(router), Router.class); + } + } - public class Show extends OpenStackRequest { + public class Show extends OpenStackRequest { - public Show(String id) { - super(CLIENT, HttpMethod.GET, buildPath("routers/", id), null, Router.class); - } + public Show(String id) { + super(CLIENT, HttpMethod.GET, buildPath("routers/", id), null, Router.class); } + } - public class Delete extends OpenStackRequest { + public class Delete extends OpenStackRequest { - public Delete(String id){ - super(CLIENT, HttpMethod.DELETE, buildPath("routers/", id), null, Void.class); - } + public Delete(String id) { + super(CLIENT, HttpMethod.DELETE, buildPath("routers/", id), null, Void.class); } - public Attach addInterface(RouterForAddInterface interfaceToAdd){ - return new Attach(interfaceToAdd); - } - public class Attach extends OpenStackRequest { + } - public Attach(RouterForAddInterface interfaceToAdd){ - super(CLIENT, HttpMethod.PUT, buildPath("routers/",interfaceToAdd.getRouterId(),"/add_router_interface"), Entity.json(interfaceToAdd),RouterInterface.class); - } - - } - public Detach deleteInterface(RouterForAddInterface interfaceRouter) { - return new Detach(interfaceRouter); + public Attach addInterface(RouterForAddInterface interfaceToAdd) { + return new Attach(interfaceToAdd); + } + + public class Attach extends OpenStackRequest { + + public Attach(RouterForAddInterface interfaceToAdd) { + super(CLIENT, HttpMethod.PUT, buildPath("routers/", interfaceToAdd.getRouterId(), "/add_router_interface"), + Entity.json(interfaceToAdd), RouterInterface.class); } - public class Detach extends OpenStackRequest { + } + + public Detach deleteInterface(RouterForAddInterface interfaceRouter) { + return new Detach(interfaceRouter); + } + + public class Detach extends OpenStackRequest { public Detach(RouterForAddInterface interfaceToAdd) { super(CLIENT, HttpMethod.PUT, buildPath("routers/", @@ -96,7 +112,5 @@ public Detach(RouterForAddInterface interfaceToAdd) { } - - } diff --git a/quantum-client/src/main/java/com/woorea/openstack/quantum/api/query/AbsOpenStackCmd.java b/quantum-client/src/main/java/com/woorea/openstack/quantum/api/query/AbsOpenStackCmd.java index 8de5abf48..353686968 100644 --- a/quantum-client/src/main/java/com/woorea/openstack/quantum/api/query/AbsOpenStackCmd.java +++ b/quantum-client/src/main/java/com/woorea/openstack/quantum/api/query/AbsOpenStackCmd.java @@ -4,8 +4,7 @@ import java.util.HashMap; import java.util.Map; -import org.codehaus.jackson.annotate.JsonProperty; - +import com.fasterxml.jackson.annotation.JsonProperty; import com.woorea.openstack.base.client.OpenStackRequest; public class AbsOpenStackCmd extends OpenStackRequest { @@ -18,7 +17,8 @@ protected AbsOpenStackCmd(T query) } /** - * @param query the query to set + * @param query + * the query to set */ public void setQuery(T query) { this.query = query; @@ -68,13 +68,13 @@ private Map getObjectParamMap(T target) } /* - public WebTarget queryParam(WebTarget target) { - Map map = getObjectParamMap(this.query); - for (String fieldName : map.keySet()) { - target = target.queryParam(fieldName, map.get(fieldName)); - } - return target; - } - */ + * public WebTarget queryParam(WebTarget target) { + * Map map = getObjectParamMap(this.query); + * for (String fieldName : map.keySet()) { + * target = target.queryParam(fieldName, map.get(fieldName)); + * } + * return target; + * } + */ } diff --git a/quantum-model/pom.xml b/quantum-model/pom.xml index bdffd793b..d6c771d35 100644 --- a/quantum-model/pom.xml +++ b/quantum-model/pom.xml @@ -1,11 +1,11 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - quantum-model - OpenStack Quantum Model - OpenStack Quantum Model - + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + quantum-model + OpenStack Quantum Model + OpenStack Quantum Model + diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Extension.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Extension.java new file mode 100644 index 000000000..e5c25e2e6 --- /dev/null +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Extension.java @@ -0,0 +1,77 @@ +package com.woorea.openstack.quantum.model; + +import java.io.Serializable; +import java.util.Calendar; +import java.util.List; + +import com.fasterxml.jackson.annotation.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/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Extensions.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Extensions.java new file mode 100644 index 000000000..105413e2f --- /dev/null +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Extensions.java @@ -0,0 +1,36 @@ +package com.woorea.openstack.quantum.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import com.fasterxml.jackson.annotation.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/quantum-model/src/main/java/com/woorea/openstack/quantum/model/FloatingIP.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/FloatingIP.java new file mode 100644 index 000000000..a47872743 --- /dev/null +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/FloatingIP.java @@ -0,0 +1,92 @@ +package com.woorea.openstack.quantum.model; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; + +@JsonRootName("floatingip") +public class FloatingIP implements Serializable { + + @JsonProperty("router_id") + String routerId; + @JsonProperty("status") + String status; + @JsonProperty("tenant_id") + String tenantId; + @JsonProperty("floating_network_id") + String floatingNetworkId; + @JsonProperty("fixed_ip_address") + String fixedIP; + @JsonProperty("floating_ip_address") + String floatingIP; + @JsonProperty("port_id") + String portId; + @JsonProperty("id") + String id; + + public String getRouterId() { + return routerId; + } + + public void setRouterId(String routerId) { + this.routerId = routerId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getTenantId() { + return tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + public String getFloatingNetworkId() { + return floatingNetworkId; + } + + public void setFloatingNetworkId(String floatingNetworkId) { + this.floatingNetworkId = floatingNetworkId; + } + + public String getFixedIP() { + return fixedIP; + } + + public void setFixedIP(String fixedIP) { + this.fixedIP = fixedIP; + } + + public String getFloatingIP() { + return floatingIP; + } + + public void setFloatingIP(String floatingIP) { + this.floatingIP = floatingIP; + } + + public String getPortId() { + return portId; + } + + public void setPortId(String portId) { + this.portId = portId; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + +} diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/FloatingIPs.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/FloatingIPs.java new file mode 100644 index 000000000..91c839041 --- /dev/null +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/FloatingIPs.java @@ -0,0 +1,42 @@ +package com.woorea.openstack.quantum.model; + +import java.io.Serializable; +import java.util.Iterator; +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class FloatingIPs implements Iterable, Serializable { + + @JsonProperty("floatingips") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + + /** + * @param list + * the list to set + */ + public void setList(List list) { + this.list = list; + } + + + @Override + public String toString() { + return "Floating IPs [list=" + list + "]"; + } + + + @Override + public Iterator iterator() { + return list.iterator(); + } + +} diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/GatewayInfo.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/GatewayInfo.java index 2a7766f75..362b327cc 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/GatewayInfo.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/GatewayInfo.java @@ -1,15 +1,25 @@ package com.woorea.openstack.quantum.model; -import java.util.List; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class GatewayInfo implements Serializable { @JsonProperty("network_id") private String networkId; + @JsonProperty("enable_snat") + private String enableSnat; + + public String getEnableSnat() { + return enableSnat; + } + + public void setEnableSnat(String enableSnat) { + this.enableSnat = enableSnat; + } + public String getNetworkId() { return networkId; } @@ -18,7 +28,8 @@ public void setNetworkId(String id) { this.networkId = id; } - @Override public String toString() { + @Override + public String toString() { return "[networkId=" + networkId + "]"; } } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Link.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Link.java new file mode 100644 index 000000000..ebe9200bf --- /dev/null +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Link.java @@ -0,0 +1,42 @@ +package com.woorea.openstack.quantum.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/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java index b89ecc33c..8dcd91f11 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Network.java @@ -3,14 +3,14 @@ import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("network") @JsonIgnoreProperties(ignoreUnknown = true) -public class Network implements Serializable{ - +public class Network implements Serializable { + private String status; private List subnets; private String name; @@ -28,9 +28,8 @@ public class Network implements Serializable{ private String shared; @JsonProperty("provider:segmentation_id") private String providerSegID; - - + /** * @return the status */ @@ -39,16 +38,15 @@ public String getStatus() { } - /** - * @param status the status to set + * @param status + * the status to set */ public void setStatus(String status) { this.status = status; } - /** * @return the subnets */ @@ -57,16 +55,15 @@ public List getSubnets() { } - /** - * @param subnets the subnets to set + * @param subnets + * the subnets to set */ public void setSubnets(List subnets) { this.subnets = subnets; } - /** * @return the name */ @@ -75,16 +72,15 @@ public String getName() { } - /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; } - /** * @return the providerPhyNet */ @@ -93,16 +89,15 @@ public String getProviderPhyNet() { } - /** - * @param providerPhyNet the providerPhyNet to set + * @param providerPhyNet + * the providerPhyNet to set */ public void setProviderPhyNet(String providerPhyNet) { this.providerPhyNet = providerPhyNet; } - /** * @return the adminStateUp */ @@ -111,16 +106,15 @@ public boolean isAdminStateUp() { } - /** - * @param adminStateUp the adminStateUp to set + * @param adminStateUp + * the adminStateUp to set */ public void setAdminStateUp(boolean adminStateUp) { this.adminStateUp = adminStateUp; } - /** * @return the tenantId */ @@ -129,16 +123,15 @@ public String getTenantId() { } - /** - * @param tenantId the tenantId to set + * @param tenantId + * the tenantId to set */ public void setTenantId(String tenantId) { this.tenantId = tenantId; } - /** * @return the netType */ @@ -147,16 +140,15 @@ public String getNetType() { } - /** - * @param netType the netType to set + * @param netType + * the netType to set */ public void setNetType(String netType) { this.netType = netType; } - /** * @return the routerExternal */ @@ -165,16 +157,15 @@ public String getRouterExternal() { } - /** - * @param routerExternal the routerExternal to set + * @param routerExternal + * the routerExternal to set */ public void setRouterExternal(String routerExternal) { this.routerExternal = routerExternal; } - /** * @return the id */ @@ -183,16 +174,15 @@ public String getId() { } - /** - * @param id the id to set + * @param id + * the id to set */ public void setId(String id) { this.id = id; } - /** * @return the shared */ @@ -201,16 +191,15 @@ public String getShared() { } - /** - * @param shared the shared to set + * @param shared + * the shared to set */ public void setShared(String shared) { this.shared = shared; } - /** * @return the providerSegID */ @@ -219,25 +208,26 @@ public String getProviderSegID() { } - /** - * @param providerSegID the providerSegID to set + * @param providerSegID + * the providerSegID to set */ public void setProviderSegID(String providerSegID) { this.providerSegID = providerSegID; } - - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override public String toString() { return "Network [id=" + id + ", name=" + name + ", subnets=" - + subnets + ", status=" + status + ", admin_state_up=" + adminStateUp + ", tenant_id=" + + + subnets + ", status=" + status + ", admin_state_up=" + adminStateUp + ", tenant_id=" + tenantId + ", shared=" + shared + ", provider:physical_network=" + providerPhyNet + - ", provider:network_type=" + netType + ", router:external=" + routerExternal + + ", provider:network_type=" + netType + ", router:external=" + routerExternal + ", provider:segmentation_id=" + providerSegID + "]"; } } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java index a06d9d7f2..126dda20c 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/NetworkForCreate.java @@ -2,82 +2,87 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("network") -public class NetworkForCreate implements Serializable{ - +public class NetworkForCreate implements Serializable { + private String name; @JsonProperty("admin_state_up") private boolean adminStateUp; - @JsonProperty("provider:network_type") - private String providerNetworkType; + @JsonProperty("provider:network_type") + private String providerNetworkType; + + @JsonProperty("provider:physical_network") + private String providerPhysicalNetwork; - @JsonProperty("provider:physical_network") - private String providerPhysicalNetwork; + @JsonProperty("provider:segmentation_id") + private Integer providerSegmentationId; - @JsonProperty("provider:segmentation_id") - private Integer providerSegmentationId; + @JsonProperty("tenant_id") + private String tenantId; - @JsonProperty("tenant_id") - private String tenantId; - /** * @return the name */ public String getName() { return name; } + /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; } + /** * @return the adminStateUp */ public boolean isAdminStateUp() { return adminStateUp; } + /** - * @param adminStateUp the adminStateUp to set + * @param adminStateUp + * the adminStateUp to set */ public void setAdminStateUp(boolean adminStateUp) { this.adminStateUp = adminStateUp; } - public String getProviderNetworkType() { - return providerNetworkType; - } + public String getProviderNetworkType() { + return providerNetworkType; + } - public void setProviderNetworkType(String providerNetworkType) { - this.providerNetworkType = providerNetworkType; - } + public void setProviderNetworkType(String providerNetworkType) { + this.providerNetworkType = providerNetworkType; + } - public String getProviderPhysicalNetwork() { - return providerPhysicalNetwork; - } + public String getProviderPhysicalNetwork() { + return providerPhysicalNetwork; + } - public void setProviderPhysicalNetwork(String providerPhysicalNetwork) { - this.providerPhysicalNetwork = providerPhysicalNetwork; - } + public void setProviderPhysicalNetwork(String providerPhysicalNetwork) { + this.providerPhysicalNetwork = providerPhysicalNetwork; + } - public Integer getProviderSegmentationId() { - return providerSegmentationId; - } + public Integer getProviderSegmentationId() { + return providerSegmentationId; + } - public void setProviderSegmentationId(Integer providerSegmentationId) { - this.providerSegmentationId = providerSegmentationId; - } + public void setProviderSegmentationId(Integer providerSegmentationId) { + this.providerSegmentationId = providerSegmentationId; + } - public String getTenantId() { - return tenantId; - } + public String getTenantId() { + return tenantId; + } - public void setTenantId(String tenantId) { - this.tenantId = tenantId; - } + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java index a4fd330de..e24f128ee 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Networks.java @@ -3,10 +3,11 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -public class Networks implements Iterable, Serializable{ - +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Networks implements Iterable, Serializable { + @JsonProperty("networks") private List list; @@ -19,20 +20,23 @@ public List getList() { /** - * @param list the list to set + * @param list + * the list to set */ public void setList(List list) { this.list = list; } + @Override public String toString() { return "Networks [list=" + list + "]"; } + @Override public Iterator iterator() { return list.iterator(); } - + } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Port.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Port.java index e878b300f..28dd1e282 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Port.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Port.java @@ -3,267 +3,267 @@ import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonIgnore; -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @SuppressWarnings("serial") @JsonRootName("port") @JsonIgnoreProperties(ignoreUnknown = true) public class Port implements Serializable { - public static final class Ip implements Serializable { - - @JsonProperty("ip_address") - private String address; - - @JsonProperty("subnet_id") - private String subnetId; - - /** - * @return the address - */ - public String getAddress() { - return address; - } - - /** - * @param address - * the address to set - */ - public void setAddress(String address) { - this.address = address; - } - - /** - * @return the subnetId - */ - public String getSubnetId() { - return subnetId; - } - - /** - * @param subnetId - * the subnetId to set - */ - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } - - @Override - public String toString() { - return "ip_addresses [ip_address=" + address + ", subnet_id=" + subnetId + "]"; - } - - } - - @JsonProperty("admin_state_up") - private Boolean adminStateUp; - - @JsonProperty("device_id") - private String deviceId; - - @JsonProperty("device_owner") - private String deviceOwner; - - @JsonProperty("fixed_ips") - private List list; - - private String id; - - @JsonProperty("mac_address") - private String macAddress; - - private String name; - - @JsonProperty("network_id") - private String networkId; - - private String status; - - @JsonProperty("tenant_id") - private String tenantId; - - @JsonProperty("security_groups") - private List securityGroups; - - /** - * @return the adminStateUp - */ - public Boolean getAdminStateUp() { - return adminStateUp; - } - - /** - * @param adminStateUp - * the adminStateUp to set - */ - public void setAdminStateUp(Boolean adminStateUp) { - this.adminStateUp = adminStateUp; - } - - /** - * @return the deviceId - */ - public String getDeviceId() { - return deviceId; - } - - /** - * @param deviceId - * the deviceId to set - */ - public void setDeviceId(String deviceId) { - this.deviceId = deviceId; - } - - /** - * @return the deviceOwner - */ - public String getDeviceOwner() { - return deviceOwner; - } - - /** - * @param deviceOwner - * the deviceOwner to set - */ - public void setDeviceOwner(String deviceOwner) { - this.deviceOwner = deviceOwner; - } - - /** - * @return the list - */ - public List getList() { - return list; - } - - /** - * @param list - * the list to set - */ - public void setList(List list) { - this.list = list; - } - - /** - * @return the id - */ - @JsonIgnore - public String getId() { - return id; - } - - /** - * @param id - * the id to set - */ - @JsonProperty - public void setId(String id) { - this.id = id; - } - - /** - * @return the macAddress - */ - public String getMacAddress() { - return macAddress; - } - - /** - * @param macAddress - * the macAddress to set - */ - public void setMacAddress(String macAddress) { - this.macAddress = macAddress; - } - - /** - * @return the name - */ - public String getName() { - return name; - } - - /** - * @param name - * the name to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * @return the networkId - */ - public String getNetworkId() { - return networkId; - } - - /** - * @param networkId - * the networkId to set - */ - public void setNetworkId(String networkId) { - this.networkId = networkId; - } - - /** - * @return the status - */ - @JsonIgnore - public String getStatus() { - return status; - } - - /** - * @param status - * the status to set - */ - @JsonProperty - public void setStatus(String status) { - this.status = status; - } - - /** - * @return the tenantId - */ - public String getTenantId() { - return tenantId; - } - - /** - * @param tenantId - * the tenantId to set - */ - public void setTenantId(String tenantId) { - this.tenantId = tenantId; - } - - /** - * @return the associated security group IDs - */ - public List getSecurityGroups() { - return securityGroups; - } - - /** - * @param securityGroups - * IDs of security groups to associate to the port - */ - public void setSecurityGroups(List securityGroups) { - this.securityGroups = securityGroups; - } - - @Override - public String toString() { - return "Port [id=" + id + ", name=" + name + ", mac_address=" - + macAddress + ", admin_state_up=" + adminStateUp + ", device_id=" + deviceId - + ", device_owner=" + deviceOwner + ", fixed_ips=" + list - + ", network_id=" + networkId + ", status=" + status - + ", tenant_id=" + tenantId - + ", securityGroups=" + securityGroups + "]"; - } + public static final class Ip implements Serializable { + + @JsonProperty("ip_address") + private String address; + + @JsonProperty("subnet_id") + private String subnetId; + + /** + * @return the address + */ + public String getAddress() { + return address; + } + + /** + * @param address + * the address to set + */ + public void setAddress(String address) { + this.address = address; + } + + /** + * @return the subnetId + */ + public String getSubnetId() { + return subnetId; + } + + /** + * @param subnetId + * the subnetId to set + */ + public void setSubnetId(String subnetId) { + this.subnetId = subnetId; + } + + @Override + public String toString() { + return "ip_addresses [ip_address=" + address + ", subnet_id=" + subnetId + "]"; + } + + } + + @JsonProperty("admin_state_up") + private Boolean adminStateUp; + + @JsonProperty("device_id") + private String deviceId; + + @JsonProperty("device_owner") + private String deviceOwner; + + @JsonProperty("fixed_ips") + private List list; + + private String id; + + @JsonProperty("mac_address") + private String macAddress; + + private String name; + + @JsonProperty("network_id") + private String networkId; + + private String status; + + @JsonProperty("tenant_id") + private String tenantId; + + @JsonProperty("security_groups") + private List securityGroups; + + /** + * @return the adminStateUp + */ + public Boolean getAdminStateUp() { + return adminStateUp; + } + + /** + * @param adminStateUp + * the adminStateUp to set + */ + public void setAdminStateUp(Boolean adminStateUp) { + this.adminStateUp = adminStateUp; + } + + /** + * @return the deviceId + */ + public String getDeviceId() { + return deviceId; + } + + /** + * @param deviceId + * the deviceId to set + */ + public void setDeviceId(String deviceId) { + this.deviceId = deviceId; + } + + /** + * @return the deviceOwner + */ + public String getDeviceOwner() { + return deviceOwner; + } + + /** + * @param deviceOwner + * the deviceOwner to set + */ + public void setDeviceOwner(String deviceOwner) { + this.deviceOwner = deviceOwner; + } + + /** + * @return the list + */ + public List getList() { + return list; + } + + /** + * @param list + * the list to set + */ + public void setList(List list) { + this.list = list; + } + + /** + * @return the id + */ + @JsonIgnore + public String getId() { + return id; + } + + /** + * @param id + * the id to set + */ + @JsonProperty + public void setId(String id) { + this.id = id; + } + + /** + * @return the macAddress + */ + public String getMacAddress() { + return macAddress; + } + + /** + * @param macAddress + * the macAddress to set + */ + public void setMacAddress(String macAddress) { + this.macAddress = macAddress; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name + * the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the networkId + */ + public String getNetworkId() { + return networkId; + } + + /** + * @param networkId + * the networkId to set + */ + public void setNetworkId(String networkId) { + this.networkId = networkId; + } + + /** + * @return the status + */ + @JsonIgnore + public String getStatus() { + return status; + } + + /** + * @param status + * the status to set + */ + @JsonProperty + public void setStatus(String status) { + this.status = status; + } + + /** + * @return the tenantId + */ + public String getTenantId() { + return tenantId; + } + + /** + * @param tenantId + * the tenantId to set + */ + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + /** + * @return the associated security group IDs + */ + public List getSecurityGroups() { + return securityGroups; + } + + /** + * @param securityGroups + * IDs of security groups to associate to the port + */ + public void setSecurityGroups(List securityGroups) { + this.securityGroups = securityGroups; + } + + @Override + public String toString() { + return "Port [id=" + id + ", name=" + name + ", mac_address=" + + macAddress + ", admin_state_up=" + adminStateUp + ", device_id=" + deviceId + + ", device_owner=" + deviceOwner + ", fixed_ips=" + list + + ", network_id=" + networkId + ", status=" + status + + ", tenant_id=" + tenantId + + ", securityGroups=" + securityGroups + "]"; + } } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/PortForCreate.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/PortForCreate.java index 3c1af5060..f7df76f53 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/PortForCreate.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/PortForCreate.java @@ -1,6 +1,6 @@ package com.woorea.openstack.quantum.model; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonRootName; /** * @deprecated Please use {@link Port} directly. diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Ports.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Ports.java index 5f10d35dd..18fa1f99c 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Ports.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Ports.java @@ -4,37 +4,37 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; @SuppressWarnings("serial") public class Ports implements Iterable, Serializable { - @JsonProperty("ports") - private List list; - - /** - * @return the list - */ - public List getList() { - return list; - } - - /** - * @param list - * the list to set - */ - public void setList(List list) { - this.list = list; - } - - @Override - public Iterator iterator() { - return list.iterator(); - } - - @Override - public String toString() { - return "Ports [list=" + list + "]"; - } + @JsonProperty("ports") + private List list; + + /** + * @return the list + */ + public List getList() { + return list; + } + + /** + * @param list + * the list to set + */ + public void setList(List list) { + this.list = list; + } + + @Override + public Iterator iterator() { + return list.iterator(); + } + + @Override + public String toString() { + return "Ports [list=" + list + "]"; + } } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Router.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Router.java index a94afd5e4..9d0c3fbcb 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Router.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Router.java @@ -1,10 +1,10 @@ package com.woorea.openstack.quantum.model; -import java.util.List; import java.io.Serializable; +import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("router") public class Router implements Serializable { @@ -33,45 +33,58 @@ public class Router implements Serializable { public String getName() { return name; } + public void setName(String name) { this.name = name; } + public List getRoutes() { return routes; } + public void setRoutes(List routes) { this.routes = routes; } + public String getAdmin_state_up() { return admin_state_up; } + public void setAdmin_state_up(String admin_state_up) { this.admin_state_up = admin_state_up; } + public String getStatus() { return status; } + public void setStatus(String status) { this.status = status; } + public GatewayInfo getExternalGatewayInfo() { return externalGatewayInfo; } + public void setExternalGatewayInfo(GatewayInfo externalGatewayInfo) { this.externalGatewayInfo = externalGatewayInfo; } + public String getTenantId() { return tenantId; } + public void setTenantId(String tenantId) { this.tenantId = tenantId; } + public String getId() { return id; } + public void setId(String id) { this.id = id; } - + } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForAddInterface.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForAddInterface.java index 62ec3025a..4caa6d5cd 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForAddInterface.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForAddInterface.java @@ -2,27 +2,27 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class RouterForAddInterface implements Serializable { - @JsonProperty("subnet_id") - String subnetId; - String routerId; + @JsonProperty("subnet_id") + String subnetId; + String routerId; - public String getSubnetId() { - return subnetId; - } + public String getSubnetId() { + return subnetId; + } - public void setSubnetId(String subnetId) { - this.subnetId = subnetId; - } + public void setSubnetId(String subnetId) { + this.subnetId = subnetId; + } - public String getRouterId() { - return routerId; - } + public String getRouterId() { + return routerId; + } - public void setRouterId(String routerId) { - this.routerId = routerId; - } + public void setRouterId(String routerId) { + this.routerId = routerId; } +} diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForCreate.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForCreate.java index b8c92912d..979154fa9 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForCreate.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterForCreate.java @@ -1,10 +1,10 @@ package com.woorea.openstack.quantum.model; -import java.util.List; import java.io.Serializable; +import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("router") public class RouterForCreate implements Serializable { @@ -32,44 +32,57 @@ public class RouterForCreate implements Serializable { public String getName() { return name; } + public void setName(String name) { this.name = name; } + public List getRoutes() { return routes; } + public void setRoutes(List routes) { this.routes = routes; } + public String getAdmin_state_up() { return admin_state_up; } + public void setAdmin_state_up(String admin_state_up) { this.admin_state_up = admin_state_up; } + public String getStatus() { return status; } + public void setStatus(String status) { this.status = status; } + public GatewayInfo getExternalGatewayInfo() { return externalGatewayInfo; } + public void setExternalGatewayInfo(GatewayInfo externalGatewayInfo) { this.externalGatewayInfo = externalGatewayInfo; } + public String getTenantId() { return tenantId; } + public void setTenantId(String tenantId) { this.tenantId = tenantId; } + public String getId() { return id; } + public void setId(String id) { this.id = id; } - + } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterInterface.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterInterface.java index 2d7551fbb..4386d5c51 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterInterface.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/RouterInterface.java @@ -2,8 +2,7 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; public class RouterInterface implements Serializable { @@ -16,4 +15,35 @@ public class RouterInterface implements Serializable { @JsonProperty("id") String id; + public String getSubnetId() { + return subnetId; + } + + public void setSubnetId(String subnetId) { + this.subnetId = subnetId; + } + + public String getPortId() { + return portId; + } + + public void setPortId(String portId) { + this.portId = portId; + } + + public String getTenantId() { + return tenantId; + } + + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java index e2a56b2bc..ed62c1b79 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Routers.java @@ -3,10 +3,11 @@ import java.io.Serializable; import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -public class Routers implements Iterable, Serializable{ - +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Routers implements Iterable, Serializable { + @JsonProperty("routers") private List list; @@ -19,20 +20,23 @@ public List getList() { /** - * @param list the list to set + * @param list + * the list to set */ public void setList(List list) { this.list = list; } + @Override public String toString() { return "Routers [list=" + list + "]"; } + @Override public Iterator iterator() { return list.iterator(); } - + } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnet.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnet.java index a4df31694..c68177627 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnet.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnet.java @@ -3,16 +3,16 @@ import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonCreator; -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.annotate.JsonValue; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.annotation.JsonValue; @JsonRootName("subnet") @JsonIgnoreProperties(ignoreUnknown = true) -public class Subnet implements Serializable{ - +public class Subnet implements Serializable { + private String name; @JsonProperty("enable_dhcp") private boolean enableDHCP; @@ -32,7 +32,7 @@ public class Subnet implements Serializable{ private String gw; private String cidr; private String id; - + public static enum IpVersion implements Serializable { IPV4(4), IPV6(6); private int code; @@ -61,7 +61,7 @@ public String toString() { return String.valueOf(code); } } - + /** * @return the name @@ -72,7 +72,8 @@ public String getName() { /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -88,7 +89,8 @@ public boolean isEnableDHCP() { /** - * @param enableDHCP the enableDHCP to set + * @param enableDHCP + * the enableDHCP to set */ public void setEnableDHCP(boolean enableDHCP) { this.enableDHCP = enableDHCP; @@ -104,7 +106,8 @@ public String getNetworkId() { /** - * @param networkId the networkId to set + * @param networkId + * the networkId to set */ public void setNetworkId(String networkId) { this.networkId = networkId; @@ -120,7 +123,8 @@ public String getTenantId() { /** - * @param tenantId the tenantId to set + * @param tenantId + * the tenantId to set */ public void setTenantId(String tenantId) { this.tenantId = tenantId; @@ -136,7 +140,8 @@ public List getDnsNames() { /** - * @param dnsNames the dnsNames to set + * @param dnsNames + * the dnsNames to set */ public void setDnsNames(List dnsNames) { this.dnsNames = dnsNames; @@ -152,7 +157,8 @@ public List getList() { /** - * @param list the list to set + * @param list + * the list to set */ public void setList(List list) { this.list = list; @@ -168,7 +174,8 @@ public List getHostRoutes() { /** - * @param hostRoutes the hostRoutes to set + * @param hostRoutes + * the hostRoutes to set */ public void setHostRoutes(List hostRoutes) { this.hostRoutes = hostRoutes; @@ -184,7 +191,8 @@ public IpVersion getIpversion() { /** - * @param ipversion the ipversion to set + * @param ipversion + * the ipversion to set */ public void setIpversion(IpVersion ipversion) { this.ipversion = ipversion; @@ -200,7 +208,8 @@ public String getGw() { /** - * @param gw the gw to set + * @param gw + * the gw to set */ public void setGw(String gw) { this.gw = gw; @@ -216,7 +225,8 @@ public String getCidr() { /** - * @param cidr the cidr to set + * @param cidr + * the cidr to set */ public void setCidr(String cidr) { this.cidr = cidr; @@ -232,14 +242,17 @@ public String getId() { /** - * @param id the id to set + * @param id + * the id to set */ public void setId(String id) { this.id = id; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/SubnetForCreate.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/SubnetForCreate.java index 649c495b3..662fc2f62 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/SubnetForCreate.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/SubnetForCreate.java @@ -3,13 +3,12 @@ import java.io.Serializable; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; -import org.codehaus.jackson.map.annotate.JsonRootName; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonRootName; @JsonRootName("subnet") +public class SubnetForCreate implements Serializable { -public class SubnetForCreate implements Serializable{ - private String name; @JsonProperty("network_id") private String networkId; @@ -18,11 +17,12 @@ public class SubnetForCreate implements Serializable{ private String cidr; @JsonProperty("allocation_pools") private List list; - @JsonProperty("tenant_id") - private String tenantId; - + @JsonProperty("tenant_id") + private String tenantId; + /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -34,21 +34,23 @@ public void setName(String name) { public String getName() { return name; } + /** * @return the id */ public String getNetworkId() { return networkId; } - + /** - * @param id the id to set + * @param id + * the id to set */ public void setNetworkId(String id) { this.networkId = id; } - - + + /** * @return the ipVersion */ @@ -57,7 +59,8 @@ public int getIpVersion() { } /** - * @param ipVersion the ipVersion to set + * @param ipVersion + * the ipVersion to set */ public void setIpVersion(int ipVersion) { this.ipVersion = ipVersion; @@ -69,39 +72,42 @@ public void setIpVersion(int ipVersion) { public String getCidr() { return cidr; } - + /** - * @param cidr the cidr to set + * @param cidr + * the cidr to set */ public void setCidr(String cidr) { this.cidr = cidr; } - + /** * @return the list */ public List getList() { return list; } - + /** - * @param list the list to set + * @param list + * the list to set */ public void setList(List list) { this.list = list; } - /** - * @return the tenantId - */ - public String getTenantId() { - return tenantId; - } - - /** - * @param tenantId the tenantId to set - */ - public void setTenantId(String tenantId) { - this.tenantId = tenantId; - } + /** + * @return the tenantId + */ + public String getTenantId() { + return tenantId; + } + + /** + * @param tenantId + * the tenantId to set + */ + public void setTenantId(String tenantId) { + this.tenantId = tenantId; + } } diff --git a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnets.java b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnets.java index e9b21f47e..457b3ceaa 100644 --- a/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnets.java +++ b/quantum-model/src/main/java/com/woorea/openstack/quantum/model/Subnets.java @@ -4,13 +4,13 @@ import java.util.Iterator; import java.util.List; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Subnets implements Serializable, Iterable { - + @JsonProperty("subnets") private List list; - + /** * @return the list */ @@ -19,16 +19,19 @@ public List getList() { } /** - * @param list the list to set + * @param list + * the list to set */ public void setList(List list) { this.list = list; } + @Override public String toString() { return "Subnets [list=" + list + "]"; } - + + @Override public Iterator iterator() { return list.iterator(); } diff --git a/swift-client/pom.xml b/swift-client/pom.xml index c0aafe7c1..10441868f 100644 --- a/swift-client/pom.xml +++ b/swift-client/pom.xml @@ -1,23 +1,23 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - swift-client - OpenStack Swift Client - OpenStack Swift Client - - - com.woorea - openstack-client - 3.2.2-SNAPSHOT - - - com.woorea - swift-model - 3.2.2-SNAPSHOT - - + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + swift-client + OpenStack Swift Client + OpenStack Swift Client + + + com.woorea + openstack-client + 3.0.9x + + + com.woorea + swift-model + 3.0.9x + + \ No newline at end of file diff --git a/swift-model/pom.xml b/swift-model/pom.xml index ebf618b56..752f43f83 100644 --- a/swift-model/pom.xml +++ b/swift-model/pom.xml @@ -1,11 +1,11 @@ - - 4.0.0 - - com.woorea - openstack-java-sdk - 3.2.2-SNAPSHOT - - swift-model - OpenStack Swift Model - OpenStack Swift Model + + 4.0.0 + + com.woorea + openstack-java-sdk + 3.0.9x + + swift-model + OpenStack Swift Model + OpenStack Swift Model \ No newline at end of file diff --git a/swift-model/src/main/java/com/woorea/openstack/swift/model/Container.java b/swift-model/src/main/java/com/woorea/openstack/swift/model/Container.java index 62a002ade..a82411975 100644 --- a/swift-model/src/main/java/com/woorea/openstack/swift/model/Container.java +++ b/swift-model/src/main/java/com/woorea/openstack/swift/model/Container.java @@ -2,15 +2,15 @@ import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Container implements Serializable { - + private String name; - + @JsonProperty("count") private Integer objectCount; - + @JsonProperty("bytes") private Long bytesUsed; @@ -22,7 +22,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -36,7 +37,8 @@ public Integer getObjectCount() { } /** - * @param objectCount the objectCount to set + * @param objectCount + * the objectCount to set */ public void setObjectCount(Integer objectCount) { this.objectCount = objectCount; @@ -50,13 +52,16 @@ public Long getBytesUsed() { } /** - * @param bytesUsed the bytesUsed to set + * @param bytesUsed + * the bytesUsed to set */ public void setBytesUsed(Long bytesUsed) { this.bytesUsed = bytesUsed; } - /* (non-Javadoc) + /* + * (non-Javadoc) + * * @see java.lang.Object#toString() */ @Override @@ -65,6 +70,5 @@ public String toString() { + ", bytesUsed=" + bytesUsed + "]"; } - - + } diff --git a/swift-model/src/main/java/com/woorea/openstack/swift/model/Object.java b/swift-model/src/main/java/com/woorea/openstack/swift/model/Object.java index d53ee65d6..e6d742c44 100644 --- a/swift-model/src/main/java/com/woorea/openstack/swift/model/Object.java +++ b/swift-model/src/main/java/com/woorea/openstack/swift/model/Object.java @@ -3,22 +3,21 @@ import java.io.Serializable; import java.util.Calendar; -import org.codehaus.jackson.annotate.JsonProperty; - +import com.fasterxml.jackson.annotation.JsonProperty; public class Object implements Serializable { - + private String subdir; - + private String name; - + private String hash; - + private int bytes; - + @JsonProperty("content_type") private String contentType; - + @JsonProperty("last_modified") private Calendar lastModified; @@ -30,7 +29,8 @@ public String getSubdir() { } /** - * @param subdir the subdir to set + * @param subdir + * the subdir to set */ public void setSubdir(String subdir) { this.subdir = subdir; @@ -44,7 +44,8 @@ public String getName() { } /** - * @param name the name to set + * @param name + * the name to set */ public void setName(String name) { this.name = name; @@ -58,7 +59,8 @@ public String getHash() { } /** - * @param hash the hash to set + * @param hash + * the hash to set */ public void setHash(String hash) { this.hash = hash; @@ -72,7 +74,8 @@ public int getBytes() { } /** - * @param bytes the bytes to set + * @param bytes + * the bytes to set */ public void setBytes(int bytes) { this.bytes = bytes; @@ -86,7 +89,8 @@ public String getContentType() { } /** - * @param contentType the contentType to set + * @param contentType + * the contentType to set */ public void setContentType(String contentType) { this.contentType = contentType; @@ -100,10 +104,11 @@ public Calendar getLastModified() { } /** - * @param lastModified the lastModified to set + * @param lastModified + * the lastModified to set */ public void setLastModified(Calendar lastModified) { this.lastModified = lastModified; } - + }