From 5dcf7e6df992c4ebd46282223b6b3f651796c35e Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 13 Feb 2011 07:23:33 +0100 Subject: [PATCH] cloudstack ids are always numeric --- .../cloudstack/domain/DiskOffering.java | 24 ++-- .../org/jclouds/cloudstack/domain/NIC.java | 26 ++-- .../jclouds/cloudstack/domain/Network.java | 90 +++++------- .../cloudstack/domain/NetworkOffering.java | 18 +-- .../cloudstack/domain/ServiceOffering.java | 29 ++-- .../jclouds/cloudstack/domain/Template.java | 75 ++++------ .../cloudstack/domain/VirtualMachine.java | 128 +++++++----------- .../org/jclouds/cloudstack/domain/Zone.java | 29 ++-- .../features/NetworkAsyncClient.java | 2 +- .../cloudstack/features/NetworkClient.java | 2 +- .../features/OfferingAsyncClient.java | 6 +- .../cloudstack/features/OfferingClient.java | 6 +- .../features/TemplateAsyncClient.java | 2 +- .../cloudstack/features/TemplateClient.java | 2 +- .../features/VirtualMachineAsyncClient.java | 2 +- .../features/VirtualMachineClient.java | 2 +- .../cloudstack/features/ZoneAsyncClient.java | 2 +- .../cloudstack/features/ZoneClient.java | 2 +- .../options/ListDiskOfferingsOptions.java | 12 +- .../options/ListNetworkOfferingsOptions.java | 6 +- .../options/ListNetworksOptions.java | 18 +-- .../options/ListServiceOfferingsOptions.java | 18 +-- .../options/ListTemplatesOptions.java | 24 ++-- .../options/ListVirtualMachinesOptions.java | 48 +++---- .../cloudstack/options/ListZonesOptions.java | 12 +- .../features/NetworkAsyncClientTest.java | 12 +- .../features/NetworkClientLiveTest.java | 8 +- .../features/OfferingAsyncClientTest.java | 45 +++--- .../features/OfferingClientLiveTest.java | 6 +- .../features/TemplateAsyncClientTest.java | 16 +-- .../features/TemplateClientLiveTest.java | 8 +- .../VirtualMachineAsyncClientTest.java | 10 +- .../VirtualMachineClientLiveTest.java | 18 +-- .../features/ZoneAsyncClientTest.java | 18 +-- .../features/ZoneClientLiveTest.java | 4 +- .../options/ListDiskOfferingsOptionsTest.java | 24 ++-- .../ListNetworkOfferingsOptionsTest.java | 25 ++-- .../options/ListNetworksOptionsTest.java | 32 ++--- .../ListServiceOfferingsOptionsTest.java | 32 ++--- .../options/ListTemplatesOptionsTest.java | 56 ++++---- .../options/ListVirtualMachesOptionsTest.java | 76 +++++------ .../options/ListZonesOptionsTest.java | 16 +-- 42 files changed, 442 insertions(+), 549 deletions(-) diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/DiskOffering.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/DiskOffering.java index 02ae5b99a3..b42611e49a 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/DiskOffering.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/DiskOffering.java @@ -32,21 +32,21 @@ import com.google.gson.annotations.SerializedName; * @author Adrian Cole */ public class DiskOffering { - private String id; + private long id; private String name; @SerializedName("displaytext") private String displayText; private Date created; private String domain; @SerializedName("domainid") - private String domainId; + private long domainId; @SerializedName("disksize") private int diskSize; @SerializedName("iscustomized") private boolean customized; private String tags; - public DiskOffering(String id, String name, String displayText, Date created, String domain, String domainId, + public DiskOffering(long id, String name, String displayText, Date created, String domain, long domainId, int diskSize, boolean customized, Set tags) { this.id = id; this.name = name; @@ -71,7 +71,7 @@ public class DiskOffering { * * @return the id of the disk offering */ - public String getId() { + public long getId() { return id; } @@ -112,7 +112,7 @@ public class DiskOffering { * * @return the domain id of the disk offering */ - public String getDomainId() { + public long getDomainId() { return domainId; } @@ -149,8 +149,8 @@ public class DiskOffering { result = prime * result + diskSize; result = prime * result + ((displayText == null) ? 0 : displayText.hashCode()); result = prime * result + ((domain == null) ? 0 : domain.hashCode()); - result = prime * result + ((domainId == null) ? 0 : domainId.hashCode()); - result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + (int) (domainId ^ (domainId >>> 32)); + result = prime * result + (int) (id ^ (id >>> 32)); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((tags == null) ? 0 : tags.hashCode()); return result; @@ -184,15 +184,9 @@ public class DiskOffering { return false; } else if (!domain.equals(other.domain)) return false; - if (domainId == null) { - if (other.domainId != null) - return false; - } else if (!domainId.equals(other.domainId)) + if (domainId != other.domainId) return false; - if (id == null) { - if (other.id != null) - return false; - } else if (!id.equals(other.id)) + if (id != other.id) return false; if (name == null) { if (other.name != null) diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/NIC.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/NIC.java index ce6415275c..586389f788 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/NIC.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/NIC.java @@ -28,7 +28,7 @@ import com.google.gson.annotations.SerializedName; * @author Adrian Cole */ public class NIC { - private String id; + private long id; @SerializedName("broadcasturi") private URI broadcastURI; private String gateway; @@ -40,7 +40,7 @@ public class NIC { private URI isolationURI; private String netmask; @SerializedName("networkid") - private String networkId; + private long networkId; @SerializedName("traffictype") private TrafficType trafficType; @SerializedName("type") @@ -54,8 +54,8 @@ public class NIC { } - public NIC(String id, URI broadcastURI, String gateway, String iPAddress, boolean isDefault, URI isolationURI, - String netmask, String networkId, TrafficType trafficType, GuestIPType guestIPType) { + public NIC(long id, URI broadcastURI, String gateway, String iPAddress, boolean isDefault, URI isolationURI, + String netmask, long networkId, TrafficType trafficType, GuestIPType guestIPType) { this.id = id; this.broadcastURI = broadcastURI; this.gateway = gateway; @@ -71,7 +71,7 @@ public class NIC { /** * the ID of the nic */ - public String getId() { + public long getId() { return id; } @@ -120,7 +120,7 @@ public class NIC { /** * the ID of the corresponding network */ - public String getNetworkId() { + public long getNetworkId() { return networkId; } @@ -146,11 +146,11 @@ public class NIC { result = prime * result + ((broadcastURI == null) ? 0 : broadcastURI.hashCode()); result = prime * result + ((gateway == null) ? 0 : gateway.hashCode()); result = prime * result + ((guestIPType == null) ? 0 : guestIPType.hashCode()); - result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + (int) (id ^ (id >>> 32)); result = prime * result + (isDefault ? 1231 : 1237); result = prime * result + ((isolationURI == null) ? 0 : isolationURI.hashCode()); result = prime * result + ((netmask == null) ? 0 : netmask.hashCode()); - result = prime * result + ((networkId == null) ? 0 : networkId.hashCode()); + result = prime * result + (int) (networkId ^ (networkId >>> 32)); result = prime * result + ((trafficType == null) ? 0 : trafficType.hashCode()); return result; } @@ -181,10 +181,7 @@ public class NIC { return false; if (guestIPType != other.guestIPType) return false; - if (id == null) { - if (other.id != null) - return false; - } else if (!id.equals(other.id)) + if (id != other.id) return false; if (isDefault != other.isDefault) return false; @@ -198,10 +195,7 @@ public class NIC { return false; } else if (!netmask.equals(other.netmask)) return false; - if (networkId == null) { - if (other.networkId != null) - return false; - } else if (!networkId.equals(other.networkId)) + if (networkId != other.networkId) return false; if (trafficType != other.trafficType) return false; diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Network.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Network.java index cdda7e7701..2c2cd443e8 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Network.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Network.java @@ -37,7 +37,7 @@ import com.google.gson.annotations.SerializedName; * @author Adrian Cole */ public class Network { - private String id; + private long id; private String account; @SerializedName("broadcastdomaintype") private String broadcastDomainType; @@ -52,7 +52,7 @@ public class Network { private String domain; @Nullable @SerializedName("domainid") - private String domainId; + private long domainId; @SerializedName("endip") private String endIP; private String gateway; @@ -67,10 +67,10 @@ public class Network { private String networkDomain; @SerializedName("networkofferingavailability") private String networkOfferingAvailability; - @SerializedName("networkofferingid") + @SerializedName("networkofferingdisplaytext") private String networkOfferingDisplayText; @SerializedName("networkofferingid") - private String networkOfferingId; + private long networkOfferingId; @SerializedName("networkofferingname") private String networkOfferingName; private String related; @@ -85,7 +85,7 @@ public class Network { @SerializedName("traffictype") private TrafficType trafficType; @SerializedName("zoneid") - private String zoneId; + private long zoneId; @SerializedName("service") private Set services = ImmutableSet. of(); @@ -97,12 +97,12 @@ public class Network { } - public Network(String id, String account, String broadcastDomainType, URI broadcastURI, String displayText, - List DNS, String domain, String domainId, String endIP, String gateway, boolean isDefault, - boolean isShared, boolean isSystem, String netmask, String networkDomain, - String networkOfferingAvailability, String networkOfferingDisplayText, String networkOfferingId, - String networkOfferingName, String related, String startIP, String name, String state, GuestIPType type, - String vLAN, TrafficType trafficType, String zoneId, Set services) { + public Network(long id, String account, String broadcastDomainType, URI broadcastURI, String displayText, + List DNS, String domain, long domainId, String endIP, String gateway, boolean isDefault, + boolean isShared, boolean isSystem, String netmask, String networkDomain, String networkOfferingAvailability, + String networkOfferingDisplayText, long networkOfferingId, String networkOfferingName, String related, + String startIP, String name, String state, GuestIPType type, String vLAN, TrafficType trafficType, + long zoneId, Set services) { this.id = id; this.account = account; this.broadcastDomainType = broadcastDomainType; @@ -138,7 +138,7 @@ public class Network { * * @return network id */ - public String getId() { + public long getId() { return id; } @@ -200,7 +200,7 @@ public class Network { * @return the ID of the containing domain, null for public zones */ @Nullable - public String getDomainId() { + public long getDomainId() { return domainId; } @@ -320,7 +320,7 @@ public class Network { * * @return network offering id the network is created from */ - public String getNetworkOfferingId() { + public long getNetworkOfferingId() { return networkOfferingId; } @@ -352,7 +352,7 @@ public class Network { * * @return zone id of the network */ - public String getZoneId() { + public long getZoneId() { return zoneId; } @@ -376,10 +376,11 @@ public class Network { result = prime * result + ((broadcastURI == null) ? 0 : broadcastURI.hashCode()); result = prime * result + ((displayText == null) ? 0 : displayText.hashCode()); result = prime * result + ((domain == null) ? 0 : domain.hashCode()); - result = prime * result + ((domainId == null) ? 0 : domainId.hashCode()); + result = prime * result + (int) (domainId ^ (domainId >>> 32)); result = prime * result + ((endIP == null) ? 0 : endIP.hashCode()); result = prime * result + ((gateway == null) ? 0 : gateway.hashCode()); - result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + ((guestIPType == null) ? 0 : guestIPType.hashCode()); + result = prime * result + (int) (id ^ (id >>> 32)); result = prime * result + (isDefault ? 1231 : 1237); result = prime * result + (isShared ? 1231 : 1237); result = prime * result + (isSystem ? 1231 : 1237); @@ -388,15 +389,14 @@ public class Network { result = prime * result + ((networkDomain == null) ? 0 : networkDomain.hashCode()); result = prime * result + ((networkOfferingAvailability == null) ? 0 : networkOfferingAvailability.hashCode()); result = prime * result + ((networkOfferingDisplayText == null) ? 0 : networkOfferingDisplayText.hashCode()); - result = prime * result + ((networkOfferingId == null) ? 0 : networkOfferingId.hashCode()); + result = prime * result + (int) (networkOfferingId ^ (networkOfferingId >>> 32)); result = prime * result + ((networkOfferingName == null) ? 0 : networkOfferingName.hashCode()); result = prime * result + ((related == null) ? 0 : related.hashCode()); result = prime * result + ((services == null) ? 0 : services.hashCode()); result = prime * result + ((startIP == null) ? 0 : startIP.hashCode()); result = prime * result + ((state == null) ? 0 : state.hashCode()); result = prime * result + ((trafficType == null) ? 0 : trafficType.hashCode()); - result = prime * result + ((guestIPType == null) ? 0 : guestIPType.hashCode()); - result = prime * result + ((zoneId == null) ? 0 : zoneId.hashCode()); + result = prime * result + (int) (zoneId ^ (zoneId >>> 32)); return result; } @@ -449,10 +449,7 @@ public class Network { return false; } else if (!domain.equals(other.domain)) return false; - if (domainId == null) { - if (other.domainId != null) - return false; - } else if (!domainId.equals(other.domainId)) + if (domainId != other.domainId) return false; if (endIP == null) { if (other.endIP != null) @@ -464,10 +461,9 @@ public class Network { return false; } else if (!gateway.equals(other.gateway)) return false; - if (id == null) { - if (other.id != null) - return false; - } else if (!id.equals(other.id)) + if (guestIPType != other.guestIPType) + return false; + if (id != other.id) return false; if (isDefault != other.isDefault) return false; @@ -500,10 +496,7 @@ public class Network { return false; } else if (!networkOfferingDisplayText.equals(other.networkOfferingDisplayText)) return false; - if (networkOfferingId == null) { - if (other.networkOfferingId != null) - return false; - } else if (!networkOfferingId.equals(other.networkOfferingId)) + if (networkOfferingId != other.networkOfferingId) return false; if (networkOfferingName == null) { if (other.networkOfferingName != null) @@ -530,35 +523,24 @@ public class Network { return false; } else if (!state.equals(other.state)) return false; - if (trafficType == null) { - if (other.trafficType != null) - return false; - } else if (!trafficType.equals(other.trafficType)) + if (trafficType != other.trafficType) return false; - if (guestIPType == null) { - if (other.guestIPType != null) - return false; - } else if (!guestIPType.equals(other.guestIPType)) - return false; - if (zoneId == null) { - if (other.zoneId != null) - return false; - } else if (!zoneId.equals(other.zoneId)) + if (zoneId != other.zoneId) return false; return true; } @Override public String toString() { - return "Network [id=" + id + ", state=" + state + ", name=" + name + ", displayText=" + displayText + ", guestIPType=" - + guestIPType + ", trafficType=" + trafficType + ", DNS=" + getDNS() + ", VLAN=" + VLAN + ", account=" - + account + ", startIP=" + startIP + ", endIP=" + endIP + ", netmask=" + netmask + ", gateway=" - + gateway + ", broadcastDomainType=" + broadcastDomainType + ", broadcastURI=" + broadcastURI - + ", services=" + services + ", domain=" + domain + ", domainId=" + domainId + ", isDefault=" - + isDefault + ", isShared=" + isShared + ", isSystem=" + isSystem + ", related=" + related + ", zoneId=" - + zoneId + ", networkDomain=" + networkDomain + ", networkOfferingAvailability=" - + networkOfferingAvailability + ", networkOfferingDisplayText=" + networkOfferingDisplayText - + ", networkOfferingId=" + networkOfferingId + ", networkOfferingName=" + networkOfferingName + "]"; + return "[id=" + id + ", state=" + state + ", name=" + name + ", displayText=" + displayText + ", guestIPType=" + + guestIPType + ", trafficType=" + trafficType + ", DNS=" + getDNS() + ", VLAN=" + VLAN + ", account=" + + account + ", startIP=" + startIP + ", endIP=" + endIP + ", netmask=" + netmask + ", gateway=" + gateway + + ", broadcastDomainType=" + broadcastDomainType + ", broadcastURI=" + broadcastURI + ", services=" + + services + ", domain=" + domain + ", domainId=" + domainId + ", isDefault=" + isDefault + ", isShared=" + + isShared + ", isSystem=" + isSystem + ", related=" + related + ", zoneId=" + zoneId + ", networkDomain=" + + networkDomain + ", networkOfferingAvailability=" + networkOfferingAvailability + + ", networkOfferingDisplayText=" + networkOfferingDisplayText + ", networkOfferingId=" + networkOfferingId + + ", networkOfferingName=" + networkOfferingName + "]"; } } diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/NetworkOffering.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/NetworkOffering.java index 82f38d7ed0..78e49d3f16 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/NetworkOffering.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/NetworkOffering.java @@ -34,7 +34,7 @@ import com.google.gson.annotations.SerializedName; * @author Adrian Cole */ public class NetworkOffering { - private String id; + private long id; private String name; @SerializedName("displaytext") private String displayText; @@ -50,7 +50,7 @@ public class NetworkOffering { private TrafficType trafficType; private String tags; - public NetworkOffering(String id, String name, String displayText, @Nullable Date created, String availability, + public NetworkOffering(long id, String name, String displayText, @Nullable Date created, String availability, boolean supportsVLAN, @Nullable Integer maxConnections, boolean isDefault, TrafficType trafficType, Set tags) { this.id = id; @@ -77,7 +77,7 @@ public class NetworkOffering { * * @return the id of the network offering */ - public String getId() { + public long getId() { return id; } @@ -163,7 +163,7 @@ public class NetworkOffering { result = prime * result + ((availability == null) ? 0 : availability.hashCode()); result = prime * result + ((created == null) ? 0 : created.hashCode()); result = prime * result + ((displayText == null) ? 0 : displayText.hashCode()); - result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + (int) (id ^ (id >>> 32)); result = prime * result + (isDefault ? 1231 : 1237); result = prime * result + ((maxConnections == null) ? 0 : maxConnections.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); @@ -197,10 +197,7 @@ public class NetworkOffering { return false; } else if (!displayText.equals(other.displayText)) return false; - if (id == null) { - if (other.id != null) - return false; - } else if (!id.equals(other.id)) + if (id != other.id) return false; if (isDefault != other.isDefault) return false; @@ -221,10 +218,7 @@ public class NetworkOffering { return false; } else if (!tags.equals(other.tags)) return false; - if (trafficType == null) { - if (other.trafficType != null) - return false; - } else if (!trafficType.equals(other.trafficType)) + if (trafficType != other.trafficType) return false; return true; } diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/ServiceOffering.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/ServiceOffering.java index d059c47ed3..48a98bfe4c 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/ServiceOffering.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/ServiceOffering.java @@ -32,14 +32,14 @@ import com.google.gson.annotations.SerializedName; * @author Adrian Cole */ public class ServiceOffering { - private String id; + private long id; private String name; @SerializedName("displaytext") private String displayText; private Date created; private String domain; @SerializedName("domainid") - private String domainId; + private long domainId; @SerializedName("cpunumber") private int cpuNumber; @SerializedName("cpuspeed") @@ -51,7 +51,7 @@ public class ServiceOffering { private StorageType storageType; private String tags; - public ServiceOffering(String id, String name, String displayText, Date created, String domain, String domainId, + public ServiceOffering(long id, String name, String displayText, Date created, String domain, long domainId, int cpuNumber, int cpuSpeed, int memory, boolean haSupport, StorageType storageType, Set tags) { this.id = id; this.name = name; @@ -79,7 +79,7 @@ public class ServiceOffering { * * @return the id of the service offering */ - public String getId() { + public long getId() { return id; } @@ -120,7 +120,7 @@ public class ServiceOffering { * * @return the domain id of the service offering */ - public String getDomainId() { + public long getDomainId() { return domainId; } @@ -181,9 +181,9 @@ public class ServiceOffering { result = prime * result + ((created == null) ? 0 : created.hashCode()); result = prime * result + ((displayText == null) ? 0 : displayText.hashCode()); result = prime * result + ((domain == null) ? 0 : domain.hashCode()); - result = prime * result + ((domainId == null) ? 0 : domainId.hashCode()); + result = prime * result + (int) (domainId ^ (domainId >>> 32)); result = prime * result + (haSupport ? 1231 : 1237); - result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + (int) (id ^ (id >>> 32)); result = prime * result + memory; result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + ((storageType == null) ? 0 : storageType.hashCode()); @@ -219,17 +219,11 @@ public class ServiceOffering { return false; } else if (!domain.equals(other.domain)) return false; - if (domainId == null) { - if (other.domainId != null) - return false; - } else if (!domainId.equals(other.domainId)) + if (domainId != other.domainId) return false; if (haSupport != other.haSupport) return false; - if (id == null) { - if (other.id != null) - return false; - } else if (!id.equals(other.id)) + if (id != other.id) return false; if (memory != other.memory) return false; @@ -238,10 +232,7 @@ public class ServiceOffering { return false; } else if (!name.equals(other.name)) return false; - if (storageType == null) { - if (other.storageType != null) - return false; - } else if (!storageType.equals(other.storageType)) + if (storageType != other.storageType) return false; if (tags == null) { if (other.tags != null) diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Template.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Template.java index d84b80aa0d..ed7f6ad0cb 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Template.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Template.java @@ -58,23 +58,23 @@ public class Template { } } - private String id; + private long id; @SerializedName("displaytext") private String displayText; private String domain; @SerializedName("domainid") - private String domainId; + private long domainId; private String account; @SerializedName("accountid") - private String accountId; + private long accountId; @SerializedName("zonename") private String zone; @SerializedName("zoneid") - private String zoneId; + private long zoneId; @SerializedName("ostypename") private String OSType; @SerializedName("ostypeid") - private String OSTypeId; + private long OSTypeId; private String name; @SerializedName("templatetype") private Type type; @@ -100,15 +100,15 @@ public class Template { private boolean passwordEnabled; @Nullable @SerializedName("jobid") - private String jobId; + private Long jobId; @SerializedName("jobstatus") private String jobStatus; - public Template(String id, String displayText, String domain, String domainId, String account, String accountId, - String zone, String zoneId, String oSType, String oSTypeId, String name, Type type, String status, + public Template(long id, String displayText, String domain, long domainId, String account, long accountId, + String zone, long zoneId, String oSType, long oSTypeId, String name, Type type, String status, Format format, String hypervisor, Long size, Date created, Date removed, boolean crossZones, boolean bootable, boolean extractable, boolean featured, boolean ispublic, boolean ready, - boolean passwordEnabled, String jobId, String jobStatus) { + boolean passwordEnabled, Long jobId, String jobStatus) { this.id = id; this.displayText = displayText; this.domain = domain; @@ -150,7 +150,7 @@ public class Template { * * @return Template id */ - public String getId() { + public long getId() { return id; } @@ -174,7 +174,7 @@ public class Template { * * @return the ID of the domain to which the template beLongs */ - public String getDomainId() { + public long getDomainId() { return domainId; } @@ -190,7 +190,7 @@ public class Template { * * @return the ID of the account to which the template beLongs */ - public String getAccountId() { + public long getAccountId() { return accountId; } @@ -206,7 +206,7 @@ public class Template { * * @return the ID of the zone to which the template beLongs */ - public String getZoneId() { + public long getZoneId() { return zoneId; } @@ -222,7 +222,7 @@ public class Template { * * @return the ID of the OS type to which the template beLongs */ - public String getOSTypeId() { + public long getOSTypeId() { return OSTypeId; } @@ -352,7 +352,7 @@ public class Template { * acting on the template */ @Nullable - public String getJobId() { + public Long getJobId() { return jobId; } @@ -369,20 +369,20 @@ public class Template { final int prime = 31; int result = 1; result = prime * result + ((OSType == null) ? 0 : OSType.hashCode()); - result = prime * result + ((OSTypeId == null) ? 0 : OSTypeId.hashCode()); + result = prime * result + (int) (OSTypeId ^ (OSTypeId >>> 32)); result = prime * result + ((account == null) ? 0 : account.hashCode()); - result = prime * result + ((accountId == null) ? 0 : accountId.hashCode()); + result = prime * result + (int) (accountId ^ (accountId >>> 32)); result = prime * result + (bootable ? 1231 : 1237); result = prime * result + ((created == null) ? 0 : created.hashCode()); result = prime * result + (crossZones ? 1231 : 1237); result = prime * result + ((displayText == null) ? 0 : displayText.hashCode()); result = prime * result + ((domain == null) ? 0 : domain.hashCode()); - result = prime * result + ((domainId == null) ? 0 : domainId.hashCode()); + result = prime * result + (int) (domainId ^ (domainId >>> 32)); result = prime * result + (extractable ? 1231 : 1237); result = prime * result + (featured ? 1231 : 1237); result = prime * result + ((format == null) ? 0 : format.hashCode()); result = prime * result + ((hypervisor == null) ? 0 : hypervisor.hashCode()); - result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + (int) (id ^ (id >>> 32)); result = prime * result + (ispublic ? 1231 : 1237); result = prime * result + ((jobId == null) ? 0 : jobId.hashCode()); result = prime * result + ((jobStatus == null) ? 0 : jobStatus.hashCode()); @@ -394,7 +394,7 @@ public class Template { result = prime * result + ((status == null) ? 0 : status.hashCode()); result = prime * result + ((type == null) ? 0 : type.hashCode()); result = prime * result + ((zone == null) ? 0 : zone.hashCode()); - result = prime * result + ((zoneId == null) ? 0 : zoneId.hashCode()); + result = prime * result + (int) (zoneId ^ (zoneId >>> 32)); return result; } @@ -412,20 +412,14 @@ public class Template { return false; } else if (!OSType.equals(other.OSType)) return false; - if (OSTypeId == null) { - if (other.OSTypeId != null) - return false; - } else if (!OSTypeId.equals(other.OSTypeId)) + if (OSTypeId != other.OSTypeId) return false; if (account == null) { if (other.account != null) return false; } else if (!account.equals(other.account)) return false; - if (accountId == null) { - if (other.accountId != null) - return false; - } else if (!accountId.equals(other.accountId)) + if (accountId != other.accountId) return false; if (bootable != other.bootable) return false; @@ -446,29 +440,20 @@ public class Template { return false; } else if (!domain.equals(other.domain)) return false; - if (domainId == null) { - if (other.domainId != null) - return false; - } else if (!domainId.equals(other.domainId)) + if (domainId != other.domainId) return false; if (extractable != other.extractable) return false; if (featured != other.featured) return false; - if (format == null) { - if (other.format != null) - return false; - } else if (!format.equals(other.format)) + if (format != other.format) return false; if (hypervisor == null) { if (other.hypervisor != null) return false; } else if (!hypervisor.equals(other.hypervisor)) return false; - if (id == null) { - if (other.id != null) - return false; - } else if (!id.equals(other.id)) + if (id != other.id) return false; if (ispublic != other.ispublic) return false; @@ -506,20 +491,14 @@ public class Template { return false; } else if (!status.equals(other.status)) return false; - if (type == null) { - if (other.type != null) - return false; - } else if (!type.equals(other.type)) + if (type != other.type) return false; if (zone == null) { if (other.zone != null) return false; } else if (!zone.equals(other.zone)) return false; - if (zoneId == null) { - if (other.zoneId != null) - return false; - } else if (!zoneId.equals(other.zoneId)) + if (zoneId != other.zoneId) return false; return true; } diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/VirtualMachine.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/VirtualMachine.java index 86acf8feb5..816f0725f6 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/VirtualMachine.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/VirtualMachine.java @@ -54,7 +54,7 @@ public class VirtualMachine { } - private String id; + private long id; private String account; @SerializedName("cpunumber") private long cpuCount; @@ -67,30 +67,30 @@ public class VirtualMachine { private Date created; private String domain; @SerializedName("domainid") - private String domainId; + private long domainId; @SerializedName("forvirtualnetwork") private boolean usesVirtualNetwork; private String group; @SerializedName("groupid") - private String groupId; + private long groupId; @SerializedName("guestosid") - private String guestOSId; + private long guestOSId; @SerializedName("haenable") private boolean HAEnabled; @SerializedName("hostid") - private String hostId; + private long hostId; private String hostname; @SerializedName("ipaddress") private String IPAddress; @SerializedName("isodisplaytext") private String ISODisplayText; @SerializedName("isoid") - private String ISOId; + private long ISOId; @SerializedName("isoname") private String ISOName; @SerializedName("jobid") @Nullable - private String jobId; + private Long jobId; @SerializedName("jobstatus") @Nullable private String jobStatus; @@ -105,37 +105,37 @@ public class VirtualMachine { @SerializedName("passwordenabled") private boolean passwordEnabled; @SerializedName("rootdeviceid") - private String rootDeviceId; + private long rootDeviceId; @SerializedName("rootdevicetype") private String rootDeviceType; @SerializedName("securitygrouplist") private String securityGroupList; @SerializedName("serviceofferingid") - private String serviceOfferingId; + private long serviceOfferingId; @SerializedName("serviceofferingname") private String serviceOfferingName; private State state; @SerializedName("templatedisplaytext") private String templateDisplayText; @SerializedName("templateid") - private String templateId; + private long templateId; @SerializedName("templatename") private String templateName; @SerializedName("zoneid") - private String zoneId; + private long zoneId; @SerializedName("zonename") private String zoneName; @SerializedName("nic") private Set nics = ImmutableSet. of(); private String hypervisor; - public VirtualMachine(String id, String account, long cpuCount, long cpuSpeed, long cpuUsed, String displayName, - Date created, String domain, String domainId, boolean usesVirtualNetwork, String group, String groupId, - String guestOSId, boolean hAEnabled, String hostId, String hostname, String iPAddress, String iSODisplayText, - String iSOId, String iSOName, String jobId, String jobStatus, long memory, String name, Long networkKbsRead, - Long networkKbsWrite, String password, boolean passwordEnabled, String rootDeviceId, String rootDeviceType, - Set securityGroupList, String serviceOfferingId, String serviceOfferingName, State state, - String templateDisplayText, String templateId, String templateName, String zoneId, String zoneName, + public VirtualMachine(long id, String account, long cpuCount, long cpuSpeed, long cpuUsed, String displayName, + Date created, String domain, long domainId, boolean usesVirtualNetwork, String group, long groupId, + long guestOSId, boolean hAEnabled, long hostId, String hostname, String iPAddress, String iSODisplayText, + long iSOId, String iSOName, Long jobId, String jobStatus, long memory, String name, Long networkKbsRead, + Long networkKbsWrite, String password, boolean passwordEnabled, long rootDeviceId, String rootDeviceType, + Set securityGroupList, long serviceOfferingId, String serviceOfferingName, State state, + String templateDisplayText, long templateId, String templateName, long zoneId, String zoneName, Set nics, String hypervisor) { this.id = id; this.account = account; @@ -190,7 +190,7 @@ public class VirtualMachine { /** * @return the ID of the virtual machine */ - public String getId() { + public long getId() { return id; } @@ -247,7 +247,7 @@ public class VirtualMachine { /** * @return the ID of the domain in which the virtual machine exists */ - public String getDomainId() { + public long getDomainId() { return domainId; } @@ -268,14 +268,14 @@ public class VirtualMachine { /** * @return the group ID of the virtual machine */ - public String getGroupId() { + public long getGroupId() { return groupId; } /** * @return Os type ID of the virtual machine */ - public String getGuestOSId() { + public long getGuestOSId() { return guestOSId; } @@ -289,7 +289,7 @@ public class VirtualMachine { /** * @return the ID of the host for the virtual machine */ - public String getHostId() { + public long getHostId() { return hostId; } @@ -317,7 +317,7 @@ public class VirtualMachine { /** * @return the ID of the ISO attached to the virtual machine */ - public String getISOId() { + public long getISOId() { return ISOId; } @@ -333,7 +333,7 @@ public class VirtualMachine { * pending jobs are acting on the virtual machine */ @Nullable - public String getJobId() { + public Long getJobId() { return jobId; } @@ -391,7 +391,7 @@ public class VirtualMachine { /** * @return device ID of the root volume */ - public String getRootDeviceId() { + public long getRootDeviceId() { return rootDeviceId; } @@ -413,7 +413,7 @@ public class VirtualMachine { /** * @return the ID of the service offering of the virtual machine */ - public String getServiceOfferingId() { + public long getServiceOfferingId() { return serviceOfferingId; } @@ -442,7 +442,7 @@ public class VirtualMachine { * @return the ID of the template for the virtual machine. A -1 is returned if the virtual * machine was created from an ISO file. */ - public String getTemplateId() { + public long getTemplateId() { return templateId; } @@ -456,7 +456,7 @@ public class VirtualMachine { /** * @return the ID of the availablility zone for the virtual machine */ - public String getZoneId() { + public long getZoneId() { return zoneId; } @@ -488,7 +488,7 @@ public class VirtualMachine { result = prime * result + (HAEnabled ? 1231 : 1237); result = prime * result + ((IPAddress == null) ? 0 : IPAddress.hashCode()); result = prime * result + ((ISODisplayText == null) ? 0 : ISODisplayText.hashCode()); - result = prime * result + ((ISOId == null) ? 0 : ISOId.hashCode()); + result = prime * result + (int) (ISOId ^ (ISOId >>> 32)); result = prime * result + ((ISOName == null) ? 0 : ISOName.hashCode()); result = prime * result + ((account == null) ? 0 : account.hashCode()); result = prime * result + (int) (cpuCount ^ (cpuCount >>> 32)); @@ -497,14 +497,14 @@ public class VirtualMachine { result = prime * result + ((created == null) ? 0 : created.hashCode()); result = prime * result + ((displayName == null) ? 0 : displayName.hashCode()); result = prime * result + ((domain == null) ? 0 : domain.hashCode()); - result = prime * result + ((domainId == null) ? 0 : domainId.hashCode()); + result = prime * result + (int) (domainId ^ (domainId >>> 32)); result = prime * result + ((group == null) ? 0 : group.hashCode()); - result = prime * result + ((groupId == null) ? 0 : groupId.hashCode()); - result = prime * result + ((guestOSId == null) ? 0 : guestOSId.hashCode()); - result = prime * result + ((hostId == null) ? 0 : hostId.hashCode()); + result = prime * result + (int) (groupId ^ (groupId >>> 32)); + result = prime * result + (int) (guestOSId ^ (guestOSId >>> 32)); + result = prime * result + (int) (hostId ^ (hostId >>> 32)); result = prime * result + ((hostname == null) ? 0 : hostname.hashCode()); result = prime * result + ((hypervisor == null) ? 0 : hypervisor.hashCode()); - result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + (int) (id ^ (id >>> 32)); result = prime * result + ((jobId == null) ? 0 : jobId.hashCode()); result = prime * result + ((jobStatus == null) ? 0 : jobStatus.hashCode()); result = prime * result + (int) (memory ^ (memory >>> 32)); @@ -514,17 +514,17 @@ public class VirtualMachine { result = prime * result + ((nics == null) ? 0 : nics.hashCode()); result = prime * result + ((password == null) ? 0 : password.hashCode()); result = prime * result + (passwordEnabled ? 1231 : 1237); - result = prime * result + ((rootDeviceId == null) ? 0 : rootDeviceId.hashCode()); + result = prime * result + (int) (rootDeviceId ^ (rootDeviceId >>> 32)); result = prime * result + ((rootDeviceType == null) ? 0 : rootDeviceType.hashCode()); result = prime * result + ((securityGroupList == null) ? 0 : securityGroupList.hashCode()); - result = prime * result + ((serviceOfferingId == null) ? 0 : serviceOfferingId.hashCode()); + result = prime * result + (int) (serviceOfferingId ^ (serviceOfferingId >>> 32)); result = prime * result + ((serviceOfferingName == null) ? 0 : serviceOfferingName.hashCode()); result = prime * result + ((state == null) ? 0 : state.hashCode()); result = prime * result + ((templateDisplayText == null) ? 0 : templateDisplayText.hashCode()); - result = prime * result + ((templateId == null) ? 0 : templateId.hashCode()); + result = prime * result + (int) (templateId ^ (templateId >>> 32)); result = prime * result + ((templateName == null) ? 0 : templateName.hashCode()); result = prime * result + (usesVirtualNetwork ? 1231 : 1237); - result = prime * result + ((zoneId == null) ? 0 : zoneId.hashCode()); + result = prime * result + (int) (zoneId ^ (zoneId >>> 32)); result = prime * result + ((zoneName == null) ? 0 : zoneName.hashCode()); return result; } @@ -550,10 +550,7 @@ public class VirtualMachine { return false; } else if (!ISODisplayText.equals(other.ISODisplayText)) return false; - if (ISOId == null) { - if (other.ISOId != null) - return false; - } else if (!ISOId.equals(other.ISOId)) + if (ISOId != other.ISOId) return false; if (ISOName == null) { if (other.ISOName != null) @@ -589,30 +586,18 @@ public class VirtualMachine { return false; } else if (!domain.equals(other.domain)) return false; - if (domainId == null) { - if (other.domainId != null) - return false; - } else if (!domainId.equals(other.domainId)) + if (domainId != other.domainId) return false; if (group == null) { if (other.group != null) return false; } else if (!group.equals(other.group)) return false; - if (groupId == null) { - if (other.groupId != null) - return false; - } else if (!groupId.equals(other.groupId)) + if (groupId != other.groupId) return false; - if (guestOSId == null) { - if (other.guestOSId != null) - return false; - } else if (!guestOSId.equals(other.guestOSId)) + if (guestOSId != other.guestOSId) return false; - if (hostId == null) { - if (other.hostId != null) - return false; - } else if (!hostId.equals(other.hostId)) + if (hostId != other.hostId) return false; if (hostname == null) { if (other.hostname != null) @@ -624,10 +609,7 @@ public class VirtualMachine { return false; } else if (!hypervisor.equals(other.hypervisor)) return false; - if (id == null) { - if (other.id != null) - return false; - } else if (!id.equals(other.id)) + if (id != other.id) return false; if (jobId == null) { if (other.jobId != null) @@ -668,10 +650,7 @@ public class VirtualMachine { return false; if (passwordEnabled != other.passwordEnabled) return false; - if (rootDeviceId == null) { - if (other.rootDeviceId != null) - return false; - } else if (!rootDeviceId.equals(other.rootDeviceId)) + if (rootDeviceId != other.rootDeviceId) return false; if (rootDeviceType == null) { if (other.rootDeviceType != null) @@ -683,10 +662,7 @@ public class VirtualMachine { return false; } else if (!securityGroupList.equals(other.securityGroupList)) return false; - if (serviceOfferingId == null) { - if (other.serviceOfferingId != null) - return false; - } else if (!serviceOfferingId.equals(other.serviceOfferingId)) + if (serviceOfferingId != other.serviceOfferingId) return false; if (serviceOfferingName == null) { if (other.serviceOfferingName != null) @@ -700,10 +676,7 @@ public class VirtualMachine { return false; } else if (!templateDisplayText.equals(other.templateDisplayText)) return false; - if (templateId == null) { - if (other.templateId != null) - return false; - } else if (!templateId.equals(other.templateId)) + if (templateId != other.templateId) return false; if (templateName == null) { if (other.templateName != null) @@ -712,10 +685,7 @@ public class VirtualMachine { return false; if (usesVirtualNetwork != other.usesVirtualNetwork) return false; - if (zoneId == null) { - if (other.zoneId != null) - return false; - } else if (!zoneId.equals(other.zoneId)) + if (zoneId != other.zoneId) return false; if (zoneName == null) { if (other.zoneName != null) diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Zone.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Zone.java index 752a0f63a3..bd0b02314d 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Zone.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/Zone.java @@ -34,7 +34,7 @@ import com.google.gson.annotations.SerializedName; * @author Adrian Cole */ public class Zone { - private String id; + private long id; private String description; @SerializedName("displaytext") private String displayText; @@ -45,7 +45,7 @@ public class Zone { private String domain; @Nullable @SerializedName("domainid") - private String domainId; + private long domainId; @SerializedName("guestcidraddress") private String guestCIDRAddress; @SerializedName("internaldns1") @@ -67,7 +67,7 @@ public class Zone { } - public Zone(String id, String description, String displayText, List DNS, String domain, String domainId, + public Zone(long id, String description, String displayText, List DNS, String domain, long domainId, String guestCIDRAddress, List internalDNS, String name, NetworkType networkType, String status, String vLAN) { this.id = id; @@ -90,7 +90,7 @@ public class Zone { * * @return Zone id */ - public String getId() { + public long getId() { return id; } @@ -136,7 +136,7 @@ public class Zone { * @return the ID of the containing domain, null for public zones */ @Nullable - public String getDomainId() { + public long getDomainId() { return domainId; } @@ -203,9 +203,9 @@ public class Zone { result = prime * result + ((description == null) ? 0 : description.hashCode()); result = prime * result + ((displayText == null) ? 0 : displayText.hashCode()); result = prime * result + ((domain == null) ? 0 : domain.hashCode()); - result = prime * result + ((domainId == null) ? 0 : domainId.hashCode()); + result = prime * result + (int) (domainId ^ (domainId >>> 32)); result = prime * result + ((guestCIDRAddress == null) ? 0 : guestCIDRAddress.hashCode()); - result = prime * result + ((id == null) ? 0 : id.hashCode()); + result = prime * result + (int) (id ^ (id >>> 32)); result = prime * result + ((internalDNS1 == null) ? 0 : internalDNS1.hashCode()); result = prime * result + ((internalDNS2 == null) ? 0 : internalDNS2.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); @@ -253,20 +253,14 @@ public class Zone { return false; } else if (!domain.equals(other.domain)) return false; - if (domainId == null) { - if (other.domainId != null) - return false; - } else if (!domainId.equals(other.domainId)) + if (domainId != other.domainId) return false; if (guestCIDRAddress == null) { if (other.guestCIDRAddress != null) return false; } else if (!guestCIDRAddress.equals(other.guestCIDRAddress)) return false; - if (id == null) { - if (other.id != null) - return false; - } else if (!id.equals(other.id)) + if (id != other.id) return false; if (internalDNS1 == null) { if (other.internalDNS1 != null) @@ -283,10 +277,7 @@ public class Zone { return false; } else if (!name.equals(other.name)) return false; - if (networkType == null) { - if (other.networkType != null) - return false; - } else if (!networkType.equals(other.networkType)) + if (networkType != other.networkType) return false; if (status == null) { if (other.status != null) diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkAsyncClient.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkAsyncClient.java index ab934de3bf..060df493c6 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkAsyncClient.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkAsyncClient.java @@ -68,6 +68,6 @@ public interface NetworkAsyncClient { @Unwrap(depth = 3, edgeCollection = Set.class) @Consumes(MediaType.APPLICATION_JSON) @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getNetwork(@QueryParam("id") String id); + ListenableFuture getNetwork(@QueryParam("id") long id); } diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java index 5874c99870..eb2d31e56f 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/NetworkClient.java @@ -52,6 +52,6 @@ public interface NetworkClient { * network to get * @return network or null if not found */ - Network getNetwork(String id); + Network getNetwork(long id); } diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingAsyncClient.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingAsyncClient.java index 46961a8477..492b57334a 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingAsyncClient.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingAsyncClient.java @@ -72,7 +72,7 @@ public interface OfferingAsyncClient { @Unwrap(depth = 3, edgeCollection = Set.class) @Consumes(MediaType.APPLICATION_JSON) @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getServiceOffering(@QueryParam("id") String id); + ListenableFuture getServiceOffering(@QueryParam("id") long id); /** * @see OfferingClient#listDiskOfferings @@ -92,7 +92,7 @@ public interface OfferingAsyncClient { @Unwrap(depth = 3, edgeCollection = Set.class) @Consumes(MediaType.APPLICATION_JSON) @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getDiskOffering(@QueryParam("id") String id); + ListenableFuture getDiskOffering(@QueryParam("id") long id); /** * @see NetworkOfferingClient#listNetworkOfferings @@ -112,6 +112,6 @@ public interface OfferingAsyncClient { @Unwrap(depth = 3, edgeCollection = Set.class) @Consumes(MediaType.APPLICATION_JSON) @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture getNetworkOffering(@QueryParam("id") String id); + ListenableFuture getNetworkOffering(@QueryParam("id") long id); } diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java index b8453e81f8..0f17e0313c 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/OfferingClient.java @@ -56,7 +56,7 @@ public interface OfferingClient { * offering to get * @return service offering or null if not found */ - ServiceOffering getServiceOffering(String id); + ServiceOffering getServiceOffering(long id); /** * Lists disk offerings @@ -74,7 +74,7 @@ public interface OfferingClient { * offering to get * @return disk offering or null if not found */ - DiskOffering getDiskOffering(String id); + DiskOffering getDiskOffering(long id); /** * Lists service offerings @@ -92,5 +92,5 @@ public interface OfferingClient { * offering to get * @return service offering or null if not found */ - NetworkOffering getNetworkOffering(String id); + NetworkOffering getNetworkOffering(long id); } diff --git a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/TemplateAsyncClient.java b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/TemplateAsyncClient.java index a9fc34f53c..4f90b90276 100644 --- a/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/TemplateAsyncClient.java +++ b/sandbox-apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/TemplateAsyncClient.java @@ -78,6 +78,6 @@ public interface TemplateAsyncClient { @Unwrap(depth = 3, edgeCollection = Set.class) @Consumes(MediaType.APPLICATION_JSON) @ExceptionParser(ReturnNullOnNotFoundOr404.class) - ListenableFuture