mirror of https://github.com/apache/jclouds.git
cloudstack ids are always numeric
This commit is contained in:
parent
b0b79e3d5a
commit
5dcf7e6df9
|
@ -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<String> 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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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<? extends NetworkService> services = ImmutableSet.<NetworkService> of();
|
||||
|
||||
|
@ -97,12 +97,12 @@ public class Network {
|
|||
|
||||
}
|
||||
|
||||
public Network(String id, String account, String broadcastDomainType, URI broadcastURI, String displayText,
|
||||
List<String> 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<? extends NetworkService> services) {
|
||||
public Network(long id, String account, String broadcastDomainType, URI broadcastURI, String displayText,
|
||||
List<String> 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<? extends NetworkService> 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 + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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<String> 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;
|
||||
}
|
||||
|
|
|
@ -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<String> 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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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<? extends NIC> nics = ImmutableSet.<NIC> 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<String> 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<String> securityGroupList, long serviceOfferingId, String serviceOfferingName, State state,
|
||||
String templateDisplayText, long templateId, String templateName, long zoneId, String zoneName,
|
||||
Set<? extends NIC> 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)
|
||||
|
|
|
@ -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<String> DNS, String domain, String domainId,
|
||||
public Zone(long id, String description, String displayText, List<String> DNS, String domain, long domainId,
|
||||
String guestCIDRAddress, List<String> 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)
|
||||
|
|
|
@ -68,6 +68,6 @@ public interface NetworkAsyncClient {
|
|||
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Network> getNetwork(@QueryParam("id") String id);
|
||||
ListenableFuture<Network> getNetwork(@QueryParam("id") long id);
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public interface OfferingAsyncClient {
|
|||
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<ServiceOffering> getServiceOffering(@QueryParam("id") String id);
|
||||
ListenableFuture<ServiceOffering> 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<DiskOffering> getDiskOffering(@QueryParam("id") String id);
|
||||
ListenableFuture<DiskOffering> 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<NetworkOffering> getNetworkOffering(@QueryParam("id") String id);
|
||||
ListenableFuture<NetworkOffering> getNetworkOffering(@QueryParam("id") long id);
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -78,6 +78,6 @@ public interface TemplateAsyncClient {
|
|||
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Template> getTemplate(@QueryParam("id") String id);
|
||||
ListenableFuture<Template> getTemplate(@QueryParam("id") long id);
|
||||
|
||||
}
|
||||
|
|
|
@ -61,5 +61,5 @@ public interface TemplateClient {
|
|||
* template to get
|
||||
* @return template or null if not found
|
||||
*/
|
||||
Template getTemplate(String id);
|
||||
Template getTemplate(long id);
|
||||
}
|
||||
|
|
|
@ -68,6 +68,6 @@ public interface VirtualMachineAsyncClient {
|
|||
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<VirtualMachine> getVirtualMachine(@QueryParam("id") String id);
|
||||
ListenableFuture<VirtualMachine> getVirtualMachine(@QueryParam("id") long id);
|
||||
|
||||
}
|
||||
|
|
|
@ -52,5 +52,5 @@ public interface VirtualMachineClient {
|
|||
* VirtualMachine to get
|
||||
* @return VirtualMachine or null if not found
|
||||
*/
|
||||
VirtualMachine getVirtualMachine(String id);
|
||||
VirtualMachine getVirtualMachine(long id);
|
||||
}
|
||||
|
|
|
@ -68,6 +68,6 @@ public interface ZoneAsyncClient {
|
|||
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Zone> getZone(@QueryParam("id") String id);
|
||||
ListenableFuture<Zone> getZone(@QueryParam("id") long id);
|
||||
|
||||
}
|
||||
|
|
|
@ -52,5 +52,5 @@ public interface ZoneClient {
|
|||
* zone to get
|
||||
* @return zone or null if not found
|
||||
*/
|
||||
Zone getZone(String id);
|
||||
Zone getZone(long id);
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@ public class ListDiskOfferingsOptions extends BaseHttpRequestOptions {
|
|||
* @param id
|
||||
* the ID of the disk offering
|
||||
*/
|
||||
public ListDiskOfferingsOptions id(String id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
||||
public ListDiskOfferingsOptions id(long id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -46,8 +46,8 @@ public class ListDiskOfferingsOptions extends BaseHttpRequestOptions {
|
|||
* @param domainId
|
||||
* the ID of the domain associated with the disk offering
|
||||
*/
|
||||
public ListDiskOfferingsOptions domainId(String domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
||||
public ListDiskOfferingsOptions domainId(long domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ public class ListDiskOfferingsOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListDiskOfferingsOptions#domainId
|
||||
*/
|
||||
public static ListDiskOfferingsOptions domainId(String id) {
|
||||
public static ListDiskOfferingsOptions domainId(long id) {
|
||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions();
|
||||
return options.domainId(id);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class ListDiskOfferingsOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListDiskOfferingsOptions#id
|
||||
*/
|
||||
public static ListDiskOfferingsOptions id(String id) {
|
||||
public static ListDiskOfferingsOptions id(long id) {
|
||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions();
|
||||
return options.id(id);
|
||||
}
|
||||
|
|
|
@ -38,8 +38,8 @@ public class ListNetworkOfferingsOptions extends BaseHttpRequestOptions {
|
|||
* @param id
|
||||
* the ID of the network offering
|
||||
*/
|
||||
public ListNetworkOfferingsOptions id(String id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
||||
public ListNetworkOfferingsOptions id(long id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id+""));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ public class ListNetworkOfferingsOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListNetworkOfferingsOptions#id
|
||||
*/
|
||||
public static ListNetworkOfferingsOptions id(String id) {
|
||||
public static ListNetworkOfferingsOptions id(long id) {
|
||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions();
|
||||
return options.id(id);
|
||||
}
|
||||
|
|
|
@ -75,8 +75,8 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
|||
* @param id
|
||||
* list networks by id
|
||||
*/
|
||||
public ListNetworksOptions id(String id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
||||
public ListNetworksOptions id(long id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -95,8 +95,8 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
|||
* @param domainId
|
||||
* domain ID of the account owning a VLAN
|
||||
*/
|
||||
public ListNetworksOptions domainId(String domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
||||
public ListNetworksOptions domainId(long domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -105,8 +105,8 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
|||
* @param zoneId
|
||||
* the Zone ID of the network
|
||||
*/
|
||||
public ListNetworksOptions zoneId(String zoneId) {
|
||||
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId));
|
||||
public ListNetworksOptions zoneId(long zoneId) {
|
||||
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListNetworksOptions#domainId
|
||||
*/
|
||||
public static ListNetworksOptions domainId(String id) {
|
||||
public static ListNetworksOptions domainId(long id) {
|
||||
ListNetworksOptions options = new ListNetworksOptions();
|
||||
return options.domainId(id);
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListNetworksOptions#id
|
||||
*/
|
||||
public static ListNetworksOptions id(String id) {
|
||||
public static ListNetworksOptions id(long id) {
|
||||
ListNetworksOptions options = new ListNetworksOptions();
|
||||
return options.id(id);
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListNetworksOptions#zoneId
|
||||
*/
|
||||
public static ListNetworksOptions zoneId(String id) {
|
||||
public static ListNetworksOptions zoneId(long id) {
|
||||
ListNetworksOptions options = new ListNetworksOptions();
|
||||
return options.zoneId(id);
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@ public class ListServiceOfferingsOptions extends BaseHttpRequestOptions {
|
|||
* @param id
|
||||
* the ID of the service offering
|
||||
*/
|
||||
public ListServiceOfferingsOptions id(String id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
||||
public ListServiceOfferingsOptions id(long id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -46,8 +46,8 @@ public class ListServiceOfferingsOptions extends BaseHttpRequestOptions {
|
|||
* @param domainId
|
||||
* the ID of the domain associated with the service offering
|
||||
*/
|
||||
public ListServiceOfferingsOptions domainId(String domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
||||
public ListServiceOfferingsOptions domainId(long domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -66,8 +66,8 @@ public class ListServiceOfferingsOptions extends BaseHttpRequestOptions {
|
|||
* the ID of the virtual machine. Pass this in if you want to see the available service
|
||||
* offering that a virtual machine can be changed to.
|
||||
*/
|
||||
public ListServiceOfferingsOptions virtualMachineId(String virtualMachineId) {
|
||||
this.queryParameters.replaceValues("virtualmachineid", ImmutableSet.of(virtualMachineId));
|
||||
public ListServiceOfferingsOptions virtualMachineId(long virtualMachineId) {
|
||||
this.queryParameters.replaceValues("virtualmachineid", ImmutableSet.of(virtualMachineId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public class ListServiceOfferingsOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListServiceOfferingsOptions#domainId
|
||||
*/
|
||||
public static ListServiceOfferingsOptions domainId(String id) {
|
||||
public static ListServiceOfferingsOptions domainId(long id) {
|
||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions();
|
||||
return options.domainId(id);
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ public class ListServiceOfferingsOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListServiceOfferingsOptions#id
|
||||
*/
|
||||
public static ListServiceOfferingsOptions id(String id) {
|
||||
public static ListServiceOfferingsOptions id(long id) {
|
||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions();
|
||||
return options.id(id);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public class ListServiceOfferingsOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListServiceOfferingsOptions#virtualMachineId
|
||||
*/
|
||||
public static ListServiceOfferingsOptions virtualMachineId(String virtualMachineId) {
|
||||
public static ListServiceOfferingsOptions virtualMachineId(long virtualMachineId) {
|
||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions();
|
||||
return options.virtualMachineId(virtualMachineId);
|
||||
}
|
||||
|
|
|
@ -50,8 +50,8 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
|||
* @param id
|
||||
* the template ID
|
||||
*/
|
||||
public ListTemplatesOptions id(String id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
||||
public ListTemplatesOptions id(long id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -62,8 +62,8 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
|||
* @param domain
|
||||
* domain id
|
||||
*/
|
||||
public ListTemplatesOptions accountInDomain(String account, String domain) {
|
||||
this.queryParameters.replaceValues("account", ImmutableSet.of(account));
|
||||
public ListTemplatesOptions accountInDomain(long account, long domain) {
|
||||
this.queryParameters.replaceValues("account", ImmutableSet.of(account + ""));
|
||||
return domainId(domain);
|
||||
}
|
||||
|
||||
|
@ -81,8 +81,8 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
|||
* list all templates in specified domain. If used with the account parameter, lists
|
||||
* all templates for an account in the specified domain.
|
||||
*/
|
||||
public ListTemplatesOptions domainId(String domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
||||
public ListTemplatesOptions domainId(long domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -91,8 +91,8 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
|||
* @param zoneId
|
||||
* list templates by zoneId.
|
||||
*/
|
||||
public ListTemplatesOptions zoneId(String zoneId) {
|
||||
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId));
|
||||
public ListTemplatesOptions zoneId(long zoneId) {
|
||||
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListTemplatesOptions#domainId
|
||||
*/
|
||||
public static ListTemplatesOptions domainId(String id) {
|
||||
public static ListTemplatesOptions domainId(long id) {
|
||||
ListTemplatesOptions options = new ListTemplatesOptions();
|
||||
return options.domainId(id);
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListTemplatesOptions#accountInDomain
|
||||
*/
|
||||
public static ListTemplatesOptions accountInDomain(String account, String domain) {
|
||||
public static ListTemplatesOptions accountInDomain(long account, long domain) {
|
||||
ListTemplatesOptions options = new ListTemplatesOptions();
|
||||
return options.accountInDomain(account, domain);
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListTemplatesOptions#id
|
||||
*/
|
||||
public static ListTemplatesOptions id(String id) {
|
||||
public static ListTemplatesOptions id(long id) {
|
||||
ListTemplatesOptions options = new ListTemplatesOptions();
|
||||
return options.id(id);
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListTemplatesOptions#zoneId
|
||||
*/
|
||||
public static ListTemplatesOptions zoneId(String id) {
|
||||
public static ListTemplatesOptions zoneId(long id) {
|
||||
ListTemplatesOptions options = new ListTemplatesOptions();
|
||||
return options.zoneId(id);
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
* @param id
|
||||
* the ID of the virtual machine
|
||||
*/
|
||||
public ListVirtualMachinesOptions id(String id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
||||
public ListVirtualMachinesOptions id(long id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -64,8 +64,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
* @param domainId
|
||||
* the ID of the domain associated with the virtual machine
|
||||
*/
|
||||
public ListVirtualMachinesOptions domainId(String domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
||||
public ListVirtualMachinesOptions domainId(long domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -77,8 +77,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
* @param domain
|
||||
* domain id
|
||||
*/
|
||||
public ListVirtualMachinesOptions accountInDomain(String account, String domain) {
|
||||
this.queryParameters.replaceValues("account", ImmutableSet.of(account));
|
||||
public ListVirtualMachinesOptions accountInDomain(long account, long domain) {
|
||||
this.queryParameters.replaceValues("account", ImmutableSet.of(account + ""));
|
||||
return domainId(domain);
|
||||
}
|
||||
|
||||
|
@ -86,8 +86,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
* @param groupId
|
||||
* list virtual machines by groupId.
|
||||
*/
|
||||
public ListVirtualMachinesOptions groupId(String groupId) {
|
||||
this.queryParameters.replaceValues("groupid", ImmutableSet.of(groupId));
|
||||
public ListVirtualMachinesOptions groupId(long groupId) {
|
||||
this.queryParameters.replaceValues("groupid", ImmutableSet.of(groupId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -96,8 +96,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
* @param hostId
|
||||
* list virtual machines by hostId.
|
||||
*/
|
||||
public ListVirtualMachinesOptions hostId(String hostId) {
|
||||
this.queryParameters.replaceValues("hostid", ImmutableSet.of(hostId));
|
||||
public ListVirtualMachinesOptions hostId(long hostId) {
|
||||
this.queryParameters.replaceValues("hostid", ImmutableSet.of(hostId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -106,8 +106,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
* @param networkId
|
||||
* list virtual machines by networkId.
|
||||
*/
|
||||
public ListVirtualMachinesOptions networkId(String networkId) {
|
||||
this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId));
|
||||
public ListVirtualMachinesOptions networkId(long networkId) {
|
||||
this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -116,8 +116,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
* @param podId
|
||||
* list virtual machines by podId.
|
||||
*/
|
||||
public ListVirtualMachinesOptions podId(String podId) {
|
||||
this.queryParameters.replaceValues("podid", ImmutableSet.of(podId));
|
||||
public ListVirtualMachinesOptions podId(long podId) {
|
||||
this.queryParameters.replaceValues("podid", ImmutableSet.of(podId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -126,8 +126,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
* @param zoneId
|
||||
* list virtual machines by zoneId.
|
||||
*/
|
||||
public ListVirtualMachinesOptions zoneId(String zoneId) {
|
||||
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId));
|
||||
public ListVirtualMachinesOptions zoneId(long zoneId) {
|
||||
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + ""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListVirtualMachinesOptions#accountInDomain
|
||||
*/
|
||||
public static ListVirtualMachinesOptions accountInDomain(String account, String domain) {
|
||||
public static ListVirtualMachinesOptions accountInDomain(long account, long domain) {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||
return options.accountInDomain(account, domain);
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListVirtualMachinesOptions#domainId
|
||||
*/
|
||||
public static ListVirtualMachinesOptions domainId(String id) {
|
||||
public static ListVirtualMachinesOptions domainId(long id) {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||
return options.domainId(id);
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListVirtualMachinesOptions#id
|
||||
*/
|
||||
public static ListVirtualMachinesOptions id(String id) {
|
||||
public static ListVirtualMachinesOptions id(long id) {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||
return options.id(id);
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListVirtualMachinesOptions#groupId
|
||||
*/
|
||||
public static ListVirtualMachinesOptions groupId(String id) {
|
||||
public static ListVirtualMachinesOptions groupId(long id) {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||
return options.groupId(id);
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListVirtualMachinesOptions#hostId
|
||||
*/
|
||||
public static ListVirtualMachinesOptions hostId(String id) {
|
||||
public static ListVirtualMachinesOptions hostId(long id) {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||
return options.hostId(id);
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListVirtualMachinesOptions#networkId
|
||||
*/
|
||||
public static ListVirtualMachinesOptions networkId(String id) {
|
||||
public static ListVirtualMachinesOptions networkId(long id) {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||
return options.networkId(id);
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListVirtualMachinesOptions#podId
|
||||
*/
|
||||
public static ListVirtualMachinesOptions podId(String id) {
|
||||
public static ListVirtualMachinesOptions podId(long id) {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||
return options.podId(id);
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListVirtualMachinesOptions#zoneId
|
||||
*/
|
||||
public static ListVirtualMachinesOptions zoneId(String id) {
|
||||
public static ListVirtualMachinesOptions zoneId(long id) {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||
return options.zoneId(id);
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@ public class ListZonesOptions extends BaseHttpRequestOptions {
|
|||
* @param id
|
||||
* the ID of the zone
|
||||
*/
|
||||
public ListZonesOptions id(String id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
||||
public ListZonesOptions id(long id) {
|
||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id+""));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -46,8 +46,8 @@ public class ListZonesOptions extends BaseHttpRequestOptions {
|
|||
* @param domainId
|
||||
* the ID of the domain associated with the zone
|
||||
*/
|
||||
public ListZonesOptions domainId(String domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
||||
public ListZonesOptions domainId(long domainId) {
|
||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId+""));
|
||||
return this;
|
||||
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class ListZonesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListZonesOptions#domainId
|
||||
*/
|
||||
public static ListZonesOptions domainId(String id) {
|
||||
public static ListZonesOptions domainId(long id) {
|
||||
ListZonesOptions options = new ListZonesOptions();
|
||||
return options.domainId(id);
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ public class ListZonesOptions extends BaseHttpRequestOptions {
|
|||
/**
|
||||
* @see ListZonesOptions#id
|
||||
*/
|
||||
public static ListZonesOptions id(String id) {
|
||||
public static ListZonesOptions id(long id) {
|
||||
ListZonesOptions options = new ListZonesOptions();
|
||||
return options.id(id);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class NetworkAsyncClientTest extends BaseCloudStackAsyncClientTest<Networ
|
|||
HttpRequest httpRequest = processor.createRequest(method);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworks HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworks HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -61,11 +61,11 @@ public class NetworkAsyncClientTest extends BaseCloudStackAsyncClientTest<Networ
|
|||
|
||||
public void testListNetworksOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = NetworkAsyncClient.class.getMethod("listNetworks", ListNetworksOptions[].class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, ListNetworksOptions.Builder.type(NetworkType.ADVANCED).domainId(
|
||||
"domainId").id("id"));
|
||||
HttpRequest httpRequest = processor.createRequest(method, ListNetworksOptions.Builder.type(NetworkType.ADVANCED)
|
||||
.domainId(6).id(5));
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworks&type=Advanced&domainid=domainId&id=id HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworks&type=Advanced&domainid=6&id=5 HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -78,11 +78,11 @@ public class NetworkAsyncClientTest extends BaseCloudStackAsyncClientTest<Networ
|
|||
}
|
||||
|
||||
public void testGetNetwork() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = NetworkAsyncClient.class.getMethod("getNetwork", String.class);
|
||||
Method method = NetworkAsyncClient.class.getMethod("getNetwork", long.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworks&id=id HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworks&id=id HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public class NetworkClientLiveTest extends BaseCloudStackClientLiveTest {
|
|||
ListNetworksOptions.Builder.id(network.getId())));
|
||||
assertEquals(network, newDetails);
|
||||
assertEquals(network, client.getNetworkClient().getNetwork(network.getId()));
|
||||
assert network.getId() != null : network;
|
||||
assert network.getId() > 0 : network;
|
||||
assert network.getName() != null : network;
|
||||
assert network.getDNS().size() != 0 : network;
|
||||
assert network.getGuestIPType() != null && network.getGuestIPType() != GuestIPType.UNRECOGNIZED : network;
|
||||
|
@ -59,15 +59,15 @@ public class NetworkClientLiveTest extends BaseCloudStackClientLiveTest {
|
|||
assert network.getNetworkDomain() != null : network;
|
||||
assert network.getNetworkOfferingAvailability() != null : network;
|
||||
assert network.getNetworkOfferingDisplayText() != null : network;
|
||||
assert network.getNetworkOfferingId() != null : network;
|
||||
assert network.getNetworkOfferingId() > 0 : network;
|
||||
assert network.getNetworkOfferingName() != null : network;
|
||||
assert network.getRelated() != null : network;
|
||||
assert network.getServices().size() != 0 : network;
|
||||
assert network.getState() != null : network;
|
||||
assert network.getTrafficType() != null : network;
|
||||
assert network.getZoneId() != null : network;
|
||||
assert network.getZoneId() > 0 : network;
|
||||
assert network.getDomain() != null : network;
|
||||
assert network.getDomainId() != null : network;
|
||||
assert network.getDomainId() > 0 : network;
|
||||
switch (network.getGuestIPType()) {
|
||||
case VIRTUAL:
|
||||
assert network.getNetmask() == null : network;
|
||||
|
|
|
@ -48,7 +48,7 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
|||
HttpRequest httpRequest = processor.createRequest(method);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listDiskOfferings HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listDiskOfferings HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -62,11 +62,10 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
|||
|
||||
public void testListDiskOfferingsOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = OfferingAsyncClient.class.getMethod("listDiskOfferings", ListDiskOfferingsOptions[].class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, ListDiskOfferingsOptions.Builder.domainId("domainId")
|
||||
.id("id"));
|
||||
HttpRequest httpRequest = processor.createRequest(method, ListDiskOfferingsOptions.Builder.domainId(6).id(5));
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listDiskOfferings&domainid=domainId&id=id HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listDiskOfferings&domainid=6&id=5 HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -79,11 +78,11 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
|||
}
|
||||
|
||||
public void testGetDiskOffering() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = OfferingAsyncClient.class.getMethod("getDiskOffering", String.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
||||
Method method = OfferingAsyncClient.class.getMethod("getDiskOffering", long.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, 5);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listDiskOfferings&id=id HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listDiskOfferings&id=5 HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -100,7 +99,7 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
|||
HttpRequest httpRequest = processor.createRequest(method);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworkOfferings HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworkOfferings HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -114,12 +113,12 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
|||
|
||||
public void testListNetworkOfferingsOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = OfferingAsyncClient.class.getMethod("listNetworkOfferings", ListNetworkOfferingsOptions[].class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, ListNetworkOfferingsOptions.Builder.availability(
|
||||
"Default").isShared(true).id("id"));
|
||||
HttpRequest httpRequest = processor.createRequest(method,
|
||||
ListNetworkOfferingsOptions.Builder.availability("Default").isShared(true).id(6));
|
||||
|
||||
assertRequestLineEquals(
|
||||
httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworkOfferings&availability=Default&isshared=true&id=id HTTP/1.1");
|
||||
httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworkOfferings&availability=Default&isshared=true&id=6 HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -132,11 +131,11 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
|||
}
|
||||
|
||||
public void testGetNetworkOffering() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = OfferingAsyncClient.class.getMethod("getNetworkOffering", String.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
||||
Method method = OfferingAsyncClient.class.getMethod("getNetworkOffering", long.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, 5);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworkOfferings&id=id HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listNetworkOfferings&id=5 HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -153,7 +152,7 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
|||
HttpRequest httpRequest = processor.createRequest(method);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listServiceOfferings HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listServiceOfferings HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -167,12 +166,12 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
|||
|
||||
public void testListServiceOfferingsOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = OfferingAsyncClient.class.getMethod("listServiceOfferings", ListServiceOfferingsOptions[].class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, ListServiceOfferingsOptions.Builder.virtualMachineId(
|
||||
"vmId").domainId("domainId").id("id"));
|
||||
HttpRequest httpRequest = processor.createRequest(method, ListServiceOfferingsOptions.Builder.virtualMachineId(4)
|
||||
.domainId(5).id(6));
|
||||
|
||||
assertRequestLineEquals(
|
||||
httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listServiceOfferings&virtualmachineid=vmId&domainid=domainId&id=id HTTP/1.1");
|
||||
httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listServiceOfferings&virtualmachineid=4&domainid=5&id=6 HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -185,11 +184,11 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
|||
}
|
||||
|
||||
public void testGetServiceOffering() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = OfferingAsyncClient.class.getMethod("getServiceOffering", String.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
||||
Method method = OfferingAsyncClient.class.getMethod("getServiceOffering", long.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, 5);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listServiceOfferings&id=id HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listServiceOfferings&id=5 HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ public class OfferingClientLiveTest extends BaseCloudStackClientLiveTest {
|
|||
ListDiskOfferingsOptions.Builder.id(offering.getId())));
|
||||
assertEquals(offering, newDetails);
|
||||
assertEquals(offering, client.getOfferingClient().getDiskOffering(offering.getId()));
|
||||
assert offering.getId() != null : offering;
|
||||
assert offering.getId() > 0 : offering;
|
||||
assert offering.getName() != null : offering;
|
||||
assert offering.getCreated() != null : offering;
|
||||
assert offering.getDisplayText() != null : offering;
|
||||
|
@ -73,7 +73,7 @@ public class OfferingClientLiveTest extends BaseCloudStackClientLiveTest {
|
|||
ListServiceOfferingsOptions.Builder.id(offering.getId())));
|
||||
assertEquals(offering, newDetails);
|
||||
assertEquals(offering, client.getOfferingClient().getServiceOffering(offering.getId()));
|
||||
assert offering.getId() != null : offering;
|
||||
assert offering.getId() > 0 : offering;
|
||||
assert offering.getName() != null : offering;
|
||||
assert offering.getCreated() != null : offering;
|
||||
assert offering.getDisplayText() != null : offering;
|
||||
|
@ -95,7 +95,7 @@ public class OfferingClientLiveTest extends BaseCloudStackClientLiveTest {
|
|||
ListNetworkOfferingsOptions.Builder.id(offering.getId())));
|
||||
assertEquals(offering, newDetails);
|
||||
assertEquals(offering, client.getOfferingClient().getNetworkOffering(offering.getId()));
|
||||
assert offering.getId() != null : offering;
|
||||
assert offering.getId() > 0 : offering;
|
||||
assert offering.getName() != null : offering;
|
||||
assert offering.getDisplayText() != null : offering;
|
||||
assert offering.getMaxConnections() == null || offering.getMaxConnections() > 0 : offering;
|
||||
|
|
|
@ -47,7 +47,7 @@ public class TemplateAsyncClientTest extends BaseCloudStackAsyncClientTest<Templ
|
|||
HttpRequest httpRequest = processor.createRequest(method);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listTemplates&templatefilter=executable HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listTemplates&templatefilter=executable HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -61,12 +61,12 @@ public class TemplateAsyncClientTest extends BaseCloudStackAsyncClientTest<Templ
|
|||
|
||||
public void testListTemplatesOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = TemplateAsyncClient.class.getMethod("listTemplates", ListTemplatesOptions.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, ListTemplatesOptions.Builder.accountInDomain(
|
||||
"accountId", "domainId").hypervisor("xen").filter(TemplateFilter.FEATURED));
|
||||
HttpRequest httpRequest = processor.createRequest(method, ListTemplatesOptions.Builder.accountInDomain(5, 6)
|
||||
.hypervisor("xen").filter(TemplateFilter.FEATURED));
|
||||
|
||||
assertRequestLineEquals(
|
||||
httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listTemplates&account=accountId&domainid=domainId&hypervisor=xen&templatefilter=featured HTTP/1.1");
|
||||
httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listTemplates&account=5&domainid=6&hypervisor=xen&templatefilter=featured HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -79,11 +79,11 @@ public class TemplateAsyncClientTest extends BaseCloudStackAsyncClientTest<Templ
|
|||
}
|
||||
|
||||
public void testGetTemplate() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = TemplateAsyncClient.class.getMethod("getTemplate", String.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
||||
Method method = TemplateAsyncClient.class.getMethod("getTemplate", long.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, 5);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listTemplates&templatefilter=executable&id=id HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listTemplates&templatefilter=executable&id=5 HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
|
|
@ -48,21 +48,21 @@ public class TemplateClientLiveTest extends BaseCloudStackClientLiveTest {
|
|||
ListTemplatesOptions.Builder.id(template.getId())));
|
||||
assertEquals(template, newDetails);
|
||||
assertEquals(template, client.getTemplateClient().getTemplate(template.getId()));
|
||||
assert template.getId() != null : template;
|
||||
assert template.getId() > 0 : template;
|
||||
assert template.getName() != null : template;
|
||||
assert template.getDisplayText() != null : template;
|
||||
assert template.getCreated() != null : template;
|
||||
assert template.getFormat() != null && template.getFormat() != Template.Format.UNRECOGNIZED : template;
|
||||
assert template.getOSType() != null : template;
|
||||
assert template.getOSTypeId() != null : template;
|
||||
assert template.getOSTypeId() > 0 : template;
|
||||
assert template.getAccount() != null : template;
|
||||
assert template.getZone() != null : template;
|
||||
assert template.getZoneId() != null : template;
|
||||
assert template.getZoneId() > 0 : template;
|
||||
assert template.getStatus() == null : template;
|
||||
assert template.getType() != null && template.getType() != Template.Type.UNRECOGNIZED : template;
|
||||
assert template.getHypervisor() != null : template;
|
||||
assert template.getDomain() != null : template;
|
||||
assert template.getDomainId() != null : template;
|
||||
assert template.getDomainId() > 0 : template;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,11 +63,11 @@ public class VirtualMachineAsyncClientTest extends BaseCloudStackAsyncClientTest
|
|||
Method method = VirtualMachineAsyncClient.class.getMethod("listVirtualMachines",
|
||||
ListVirtualMachinesOptions[].class);
|
||||
HttpRequest httpRequest = processor.createRequest(method,
|
||||
ListVirtualMachinesOptions.Builder.accountInDomain("accountId", "domainId").usesVirtualNetwork(true));
|
||||
ListVirtualMachinesOptions.Builder.accountInDomain(5, 6).usesVirtualNetwork(true));
|
||||
|
||||
assertRequestLineEquals(
|
||||
httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listVirtualMachines&account=accountId&domainid=domainId&forvirtualnetwork=true HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listVirtualMachines&account=5&domainid=6&forvirtualnetwork=true HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -80,11 +80,11 @@ public class VirtualMachineAsyncClientTest extends BaseCloudStackAsyncClientTest
|
|||
}
|
||||
|
||||
public void testGetVirtualMachine() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = VirtualMachineAsyncClient.class.getMethod("getVirtualMachine", String.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
||||
Method method = VirtualMachineAsyncClient.class.getMethod("getVirtualMachine", long.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, 5);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listVirtualMachines&id=id HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listVirtualMachines&id=5 HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
|
|
@ -49,33 +49,33 @@ public class VirtualMachineClientLiveTest extends BaseCloudStackClientLiveTest {
|
|||
ListVirtualMachinesOptions.Builder.id(vm.getId())));
|
||||
assertEquals(vm, newDetails);
|
||||
assertEquals(vm, client.getVirtualMachineClient().getVirtualMachine(vm.getId()));
|
||||
assert vm.getId() != null : vm;
|
||||
assert vm.getId() > 0 : vm;
|
||||
assert vm.getName() != null : vm;
|
||||
assert vm.getDisplayName() != null : vm;
|
||||
assert vm.getAccount() != null : vm;
|
||||
assert vm.getDomain() != null : vm;
|
||||
assert vm.getDomainId() != null : vm;
|
||||
assert vm.getDomainId() > 0 : vm;
|
||||
assert vm.getCreated() != null : vm;
|
||||
assert vm.getState() != null : vm;
|
||||
assert vm.getZoneId() != null : vm;
|
||||
assert vm.getZoneId() > 0 : vm;
|
||||
assert vm.getZoneName() != null : vm;
|
||||
assert vm.getTemplateId() != null : vm;
|
||||
assert vm.getTemplateId() > 0 : vm;
|
||||
assert vm.getTemplateName() != null : vm;
|
||||
assert vm.getTemplateDisplayText() != null : vm;
|
||||
assert vm.getServiceOfferingId() != null : vm;
|
||||
assert vm.getServiceOfferingId() > 0 : vm;
|
||||
assert vm.getServiceOfferingName() != null : vm;
|
||||
assert vm.getCpuCount() > 0 : vm;
|
||||
assert vm.getCpuSpeed() > 0 : vm;
|
||||
assert vm.getMemory() > 0 : vm;
|
||||
assert vm.getGuestOSId() != null : vm;
|
||||
assert vm.getRootDeviceId() != null : vm;
|
||||
assert vm.getGuestOSId() > 0 : vm;
|
||||
assert vm.getRootDeviceId() >= 0 : vm;
|
||||
assert vm.getRootDeviceType() != null : vm;
|
||||
if (vm.getJobId() != null)
|
||||
assert vm.getJobStatus() != null : vm;
|
||||
assert vm.getNICs() != null && vm.getNICs().size() > 0 : vm;
|
||||
for (NIC nic : vm.getNICs()) {
|
||||
assert nic.getId() != null : vm;
|
||||
assert nic.getNetworkId() != null : vm;
|
||||
assert nic.getId() > 0 : vm;
|
||||
assert nic.getNetworkId() > 0 : vm;
|
||||
assert nic.getNetmask() != null : vm;
|
||||
assert nic.getGateway() != null : vm;
|
||||
assert nic.getIPAddress() != null : vm;
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ZoneAsyncClientTest extends BaseCloudStackAsyncClientTest<ZoneAsync
|
|||
HttpRequest httpRequest = processor.createRequest(method);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listZones HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listZones HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -56,8 +56,8 @@ public class ZoneAsyncClientTest extends BaseCloudStackAsyncClientTest<ZoneAsync
|
|||
httpRequest = Iterables.getOnlyElement(httpRequest.getFilters()).filter(httpRequest);
|
||||
|
||||
assertRequestLineEquals(
|
||||
httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listZones&apiKey=apiKey&signature=hNz838u4Z1ofz9vRaqYo9GDv1Io%3D HTTP/1.1");
|
||||
httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listZones&apiKey=apiKey&signature=hNz838u4Z1ofz9vRaqYo9GDv1Io%3D HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -71,11 +71,11 @@ public class ZoneAsyncClientTest extends BaseCloudStackAsyncClientTest<ZoneAsync
|
|||
|
||||
public void testListZonesOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = ZoneAsyncClient.class.getMethod("listZones", ListZonesOptions[].class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, ListZonesOptions.Builder.available(true).domainId(
|
||||
"domainId").id("id"));
|
||||
HttpRequest httpRequest = processor.createRequest(method, ListZonesOptions.Builder.available(true).domainId(5)
|
||||
.id(6));
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listZones&available=true&domainid=domainId&id=id HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listZones&available=true&domainid=5&id=6 HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
@ -88,11 +88,11 @@ public class ZoneAsyncClientTest extends BaseCloudStackAsyncClientTest<ZoneAsync
|
|||
}
|
||||
|
||||
public void testGetZone() throws SecurityException, NoSuchMethodException, IOException {
|
||||
Method method = ZoneAsyncClient.class.getMethod("getZone", String.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
||||
Method method = ZoneAsyncClient.class.getMethod("getZone", long.class);
|
||||
HttpRequest httpRequest = processor.createRequest(method, 6);
|
||||
|
||||
assertRequestLineEquals(httpRequest,
|
||||
"GET http://localhost:8080/client/api?response=json&command=listZones&id=id HTTP/1.1");
|
||||
"GET http://localhost:8080/client/api?response=json&command=listZones&id=6 HTTP/1.1");
|
||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||
assertPayloadEquals(httpRequest, null, null, false);
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ZoneClientLiveTest extends BaseCloudStackClientLiveTest {
|
|||
ListZonesOptions.Builder.id(zone.getId())));
|
||||
assertEquals(zone, newDetails);
|
||||
assertEquals(zone, client.getZoneClient().getZone(zone.getId()));
|
||||
assert zone.getId() != null : zone;
|
||||
assert zone.getId() > 0 : zone;
|
||||
assert zone.getName() != null : zone;
|
||||
assert zone.getNetworkType() != null && zone.getNetworkType() != NetworkType.UNRECOGNIZED : zone;
|
||||
switch (zone.getNetworkType()) {
|
||||
|
@ -65,7 +65,7 @@ public class ZoneClientLiveTest extends BaseCloudStackClientLiveTest {
|
|||
assert zone.getDNS().size() != 0 : zone;
|
||||
assert zone.getInternalDNS().size() != 0 : zone;
|
||||
assert zone.getDomain() != null : zone;
|
||||
assert zone.getDomainId() != null : zone;
|
||||
assert zone.getDomainId() > 0 : zone;
|
||||
assert zone.getGuestCIDRAddress() == null : zone;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -37,33 +37,33 @@ import com.google.common.collect.ImmutableList;
|
|||
public class ListDiskOfferingsOptionsTest {
|
||||
|
||||
public void testId() {
|
||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testIdStatic() {
|
||||
ListDiskOfferingsOptions options = id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListDiskOfferingsOptions options = id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testName() {
|
||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().name("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("name"));
|
||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().name("foo");
|
||||
assertEquals(ImmutableList.of("foo"), options.buildQueryParameters().get("name"));
|
||||
}
|
||||
|
||||
public void testNameStatic() {
|
||||
ListDiskOfferingsOptions options = name("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("name"));
|
||||
ListDiskOfferingsOptions options = name("foo");
|
||||
assertEquals(ImmutableList.of("foo"), options.buildQueryParameters().get("name"));
|
||||
}
|
||||
|
||||
public void testDomainId() {
|
||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testDomainIdStatic() {
|
||||
ListDiskOfferingsOptions options = domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListDiskOfferingsOptions options = domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -51,7 +51,6 @@ public class ListNetworkOfferingsOptionsTest {
|
|||
assertEquals(ImmutableList.of("true"), options.buildQueryParameters().get("isdefault"));
|
||||
}
|
||||
|
||||
|
||||
public void testIsShared() {
|
||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().isShared(true);
|
||||
assertEquals(ImmutableList.of("true"), options.buildQueryParameters().get("isshared"));
|
||||
|
@ -63,13 +62,13 @@ public class ListNetworkOfferingsOptionsTest {
|
|||
}
|
||||
|
||||
public void testId() {
|
||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testIdStatic() {
|
||||
ListNetworkOfferingsOptions options = id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListNetworkOfferingsOptions options = id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testSpecifyVLAN() {
|
||||
|
@ -103,23 +102,23 @@ public class ListNetworkOfferingsOptionsTest {
|
|||
}
|
||||
|
||||
public void testName() {
|
||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testNameStatic() {
|
||||
ListNetworkOfferingsOptions options = id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListNetworkOfferingsOptions options = id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testDisplayText() {
|
||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().displayText("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("displaytext"));
|
||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().displayText("text");
|
||||
assertEquals(ImmutableList.of("text"), options.buildQueryParameters().get("displaytext"));
|
||||
}
|
||||
|
||||
public void testDisplayTextStatic() {
|
||||
ListNetworkOfferingsOptions options = displayText("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("displaytext"));
|
||||
ListNetworkOfferingsOptions options = displayText("text");
|
||||
assertEquals(ImmutableList.of("text"), options.buildQueryParameters().get("displaytext"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -75,23 +75,23 @@ public class ListNetworksOptionsTest {
|
|||
}
|
||||
|
||||
public void testId() {
|
||||
ListNetworksOptions options = new ListNetworksOptions().id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListNetworksOptions options = new ListNetworksOptions().id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testIdStatic() {
|
||||
ListNetworksOptions options = id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListNetworksOptions options = id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testDomainId() {
|
||||
ListNetworksOptions options = new ListNetworksOptions().domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListNetworksOptions options = new ListNetworksOptions().domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testDomainIdStatic() {
|
||||
ListNetworksOptions options = domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListNetworksOptions options = domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testAccountId() {
|
||||
|
@ -115,23 +115,23 @@ public class ListNetworksOptionsTest {
|
|||
}
|
||||
|
||||
public void testName() {
|
||||
ListNetworksOptions options = new ListNetworksOptions().id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListNetworksOptions options = new ListNetworksOptions().id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testNameStatic() {
|
||||
ListNetworksOptions options = id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListNetworksOptions options = id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testZoneId() {
|
||||
ListNetworksOptions options = new ListNetworksOptions().zoneId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
||||
ListNetworksOptions options = new ListNetworksOptions().zoneId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||
}
|
||||
|
||||
public void testZoneIdStatic() {
|
||||
ListNetworksOptions options = zoneId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
||||
ListNetworksOptions options = zoneId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||
}
|
||||
|
||||
public void testType() {
|
||||
|
|
|
@ -38,42 +38,42 @@ import com.google.common.collect.ImmutableList;
|
|||
public class ListServiceOfferingsOptionsTest {
|
||||
|
||||
public void testId() {
|
||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testIdStatic() {
|
||||
ListServiceOfferingsOptions options = id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListServiceOfferingsOptions options = id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testName() {
|
||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().name("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("name"));
|
||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().name("name");
|
||||
assertEquals(ImmutableList.of("name"), options.buildQueryParameters().get("name"));
|
||||
}
|
||||
|
||||
public void testNameStatic() {
|
||||
ListServiceOfferingsOptions options = name("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("name"));
|
||||
ListServiceOfferingsOptions options = name("name");
|
||||
assertEquals(ImmutableList.of("name"), options.buildQueryParameters().get("name"));
|
||||
}
|
||||
|
||||
public void testDomainId() {
|
||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testDomainIdStatic() {
|
||||
ListServiceOfferingsOptions options = domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListServiceOfferingsOptions options = domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testVirtualMachineId() {
|
||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().virtualMachineId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("virtualmachineid"));
|
||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().virtualMachineId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("virtualmachineid"));
|
||||
}
|
||||
|
||||
public void testVirtualMachineIdStatic() {
|
||||
ListServiceOfferingsOptions options = virtualMachineId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("virtualmachineid"));
|
||||
ListServiceOfferingsOptions options = virtualMachineId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("virtualmachineid"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,70 +41,70 @@ import com.google.common.collect.ImmutableList;
|
|||
public class ListTemplatesOptionsTest {
|
||||
|
||||
public void testId() {
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testIdStatic() {
|
||||
ListTemplatesOptions options = id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListTemplatesOptions options = id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testDomainId() {
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testDomainIdStatic() {
|
||||
ListTemplatesOptions options = domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListTemplatesOptions options = domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testAccountInDomainId() {
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().accountInDomain("moo", "goo");
|
||||
assertEquals(ImmutableList.of("moo"), options.buildQueryParameters().get("account"));
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().accountInDomain(5, 6);
|
||||
assertEquals(ImmutableList.of("5"), options.buildQueryParameters().get("account"));
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testAccountInDomainIdStatic() {
|
||||
ListTemplatesOptions options = accountInDomain("moo", "goo");
|
||||
assertEquals(ImmutableList.of("moo"), options.buildQueryParameters().get("account"));
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListTemplatesOptions options = accountInDomain(5, 6);
|
||||
assertEquals(ImmutableList.of("5"), options.buildQueryParameters().get("account"));
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testHypervisor() {
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().hypervisor("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("hypervisor"));
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().hypervisor("KVM");
|
||||
assertEquals(ImmutableList.of("KVM"), options.buildQueryParameters().get("hypervisor"));
|
||||
}
|
||||
|
||||
public void testHypervisorStatic() {
|
||||
ListTemplatesOptions options = hypervisor("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("hypervisor"));
|
||||
ListTemplatesOptions options = hypervisor("KVM");
|
||||
assertEquals(ImmutableList.of("KVM"), options.buildQueryParameters().get("hypervisor"));
|
||||
}
|
||||
|
||||
public void testName() {
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testNameStatic() {
|
||||
ListTemplatesOptions options = id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListTemplatesOptions options = id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testZoneId() {
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().zoneId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
||||
ListTemplatesOptions options = new ListTemplatesOptions().zoneId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||
}
|
||||
|
||||
public void testZoneIdStatic() {
|
||||
ListTemplatesOptions options = zoneId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
||||
ListTemplatesOptions options = zoneId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||
}
|
||||
|
||||
public void testFilterDefault() {
|
||||
assertEquals(ImmutableList.of("executable"), new ListTemplatesOptions().buildQueryParameters().get(
|
||||
"templatefilter"));
|
||||
assertEquals(ImmutableList.of("executable"),
|
||||
new ListTemplatesOptions().buildQueryParameters().get("templatefilter"));
|
||||
}
|
||||
|
||||
public void testFilter() {
|
||||
|
|
|
@ -44,75 +44,75 @@ import com.google.common.collect.ImmutableList;
|
|||
public class ListVirtualMachesOptionsTest {
|
||||
|
||||
public void testHostId() {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().hostId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("hostid"));
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().hostId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("hostid"));
|
||||
}
|
||||
|
||||
public void testHostIdStatic() {
|
||||
ListVirtualMachinesOptions options = hostId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("hostid"));
|
||||
ListVirtualMachinesOptions options = hostId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("hostid"));
|
||||
}
|
||||
|
||||
public void testPodId() {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().podId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("podid"));
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().podId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("podid"));
|
||||
}
|
||||
|
||||
public void testPodIdStatic() {
|
||||
ListVirtualMachinesOptions options = podId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("podid"));
|
||||
ListVirtualMachinesOptions options = podId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("podid"));
|
||||
}
|
||||
|
||||
public void testNetworkId() {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().networkId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("networkid"));
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().networkId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("networkid"));
|
||||
}
|
||||
|
||||
public void testNetworkIdStatic() {
|
||||
ListVirtualMachinesOptions options = networkId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("networkid"));
|
||||
ListVirtualMachinesOptions options = networkId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("networkid"));
|
||||
}
|
||||
|
||||
public void testGroupId() {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().groupId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("groupid"));
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().groupId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("groupid"));
|
||||
}
|
||||
|
||||
public void testGroupIdStatic() {
|
||||
ListVirtualMachinesOptions options = groupId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("groupid"));
|
||||
ListVirtualMachinesOptions options = groupId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("groupid"));
|
||||
}
|
||||
|
||||
public void testAccountInDomainId() {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().accountInDomain("moo", "goo");
|
||||
assertEquals(ImmutableList.of("moo"), options.buildQueryParameters().get("account"));
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().accountInDomain(5, 6);
|
||||
assertEquals(ImmutableList.of("5"), options.buildQueryParameters().get("account"));
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testAccountInDomainIdStatic() {
|
||||
ListVirtualMachinesOptions options = accountInDomain("moo", "goo");
|
||||
assertEquals(ImmutableList.of("moo"), options.buildQueryParameters().get("account"));
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListVirtualMachinesOptions options = accountInDomain(5, 6);
|
||||
assertEquals(ImmutableList.of("5"), options.buildQueryParameters().get("account"));
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testName() {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testNameStatic() {
|
||||
ListVirtualMachinesOptions options = id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListVirtualMachinesOptions options = id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testZoneId() {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().zoneId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().zoneId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||
}
|
||||
|
||||
public void testZoneIdStatic() {
|
||||
ListVirtualMachinesOptions options = zoneId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
||||
ListVirtualMachinesOptions options = zoneId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||
}
|
||||
|
||||
public void testState() {
|
||||
|
@ -136,22 +136,22 @@ public class ListVirtualMachesOptionsTest {
|
|||
}
|
||||
|
||||
public void testId() {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testDomainId() {
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testIdStatic() {
|
||||
ListVirtualMachinesOptions options = id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListVirtualMachinesOptions options = id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testDomainIdStatic() {
|
||||
ListVirtualMachinesOptions options = domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListVirtualMachinesOptions options = domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,8 +37,8 @@ import com.google.common.collect.ImmutableList;
|
|||
public class ListZonesOptionsTest {
|
||||
|
||||
public void testId() {
|
||||
ListZonesOptions options = new ListZonesOptions().id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListZonesOptions options = new ListZonesOptions().id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testAvailable() {
|
||||
|
@ -47,13 +47,13 @@ public class ListZonesOptionsTest {
|
|||
}
|
||||
|
||||
public void testDomainId() {
|
||||
ListZonesOptions options = new ListZonesOptions().domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListZonesOptions options = new ListZonesOptions().domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
|
||||
public void testIdStatic() {
|
||||
ListZonesOptions options = id("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
||||
ListZonesOptions options = id(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||
}
|
||||
|
||||
public void testAvailableStatic() {
|
||||
|
@ -62,7 +62,7 @@ public class ListZonesOptionsTest {
|
|||
}
|
||||
|
||||
public void testDomainIdStatic() {
|
||||
ListZonesOptions options = domainId("goo");
|
||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
||||
ListZonesOptions options = domainId(6);
|
||||
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue