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
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class DiskOffering {
|
public class DiskOffering {
|
||||||
private String id;
|
private long id;
|
||||||
private String name;
|
private String name;
|
||||||
@SerializedName("displaytext")
|
@SerializedName("displaytext")
|
||||||
private String displayText;
|
private String displayText;
|
||||||
private Date created;
|
private Date created;
|
||||||
private String domain;
|
private String domain;
|
||||||
@SerializedName("domainid")
|
@SerializedName("domainid")
|
||||||
private String domainId;
|
private long domainId;
|
||||||
@SerializedName("disksize")
|
@SerializedName("disksize")
|
||||||
private int diskSize;
|
private int diskSize;
|
||||||
@SerializedName("iscustomized")
|
@SerializedName("iscustomized")
|
||||||
private boolean customized;
|
private boolean customized;
|
||||||
private String tags;
|
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) {
|
int diskSize, boolean customized, Set<String> tags) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
@ -71,7 +71,7 @@ public class DiskOffering {
|
||||||
*
|
*
|
||||||
* @return the id of the disk offering
|
* @return the id of the disk offering
|
||||||
*/
|
*/
|
||||||
public String getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ public class DiskOffering {
|
||||||
*
|
*
|
||||||
* @return the domain id of the disk offering
|
* @return the domain id of the disk offering
|
||||||
*/
|
*/
|
||||||
public String getDomainId() {
|
public long getDomainId() {
|
||||||
return domainId;
|
return domainId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,8 +149,8 @@ public class DiskOffering {
|
||||||
result = prime * result + diskSize;
|
result = prime * result + diskSize;
|
||||||
result = prime * result + ((displayText == null) ? 0 : displayText.hashCode());
|
result = prime * result + ((displayText == null) ? 0 : displayText.hashCode());
|
||||||
result = prime * result + ((domain == null) ? 0 : domain.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 + ((id == null) ? 0 : id.hashCode());
|
result = prime * result + (int) (id ^ (id >>> 32));
|
||||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
||||||
result = prime * result + ((tags == null) ? 0 : tags.hashCode());
|
result = prime * result + ((tags == null) ? 0 : tags.hashCode());
|
||||||
return result;
|
return result;
|
||||||
|
@ -184,15 +184,9 @@ public class DiskOffering {
|
||||||
return false;
|
return false;
|
||||||
} else if (!domain.equals(other.domain))
|
} else if (!domain.equals(other.domain))
|
||||||
return false;
|
return false;
|
||||||
if (domainId == null) {
|
if (domainId != other.domainId)
|
||||||
if (other.domainId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!domainId.equals(other.domainId))
|
|
||||||
return false;
|
return false;
|
||||||
if (id == null) {
|
if (id != other.id)
|
||||||
if (other.id != null)
|
|
||||||
return false;
|
|
||||||
} else if (!id.equals(other.id))
|
|
||||||
return false;
|
return false;
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
if (other.name != null)
|
if (other.name != null)
|
||||||
|
|
|
@ -28,7 +28,7 @@ import com.google.gson.annotations.SerializedName;
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class NIC {
|
public class NIC {
|
||||||
private String id;
|
private long id;
|
||||||
@SerializedName("broadcasturi")
|
@SerializedName("broadcasturi")
|
||||||
private URI broadcastURI;
|
private URI broadcastURI;
|
||||||
private String gateway;
|
private String gateway;
|
||||||
|
@ -40,7 +40,7 @@ public class NIC {
|
||||||
private URI isolationURI;
|
private URI isolationURI;
|
||||||
private String netmask;
|
private String netmask;
|
||||||
@SerializedName("networkid")
|
@SerializedName("networkid")
|
||||||
private String networkId;
|
private long networkId;
|
||||||
@SerializedName("traffictype")
|
@SerializedName("traffictype")
|
||||||
private TrafficType trafficType;
|
private TrafficType trafficType;
|
||||||
@SerializedName("type")
|
@SerializedName("type")
|
||||||
|
@ -54,8 +54,8 @@ public class NIC {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public NIC(String id, URI broadcastURI, String gateway, String iPAddress, boolean isDefault, URI isolationURI,
|
public NIC(long id, URI broadcastURI, String gateway, String iPAddress, boolean isDefault, URI isolationURI,
|
||||||
String netmask, String networkId, TrafficType trafficType, GuestIPType guestIPType) {
|
String netmask, long networkId, TrafficType trafficType, GuestIPType guestIPType) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.broadcastURI = broadcastURI;
|
this.broadcastURI = broadcastURI;
|
||||||
this.gateway = gateway;
|
this.gateway = gateway;
|
||||||
|
@ -71,7 +71,7 @@ public class NIC {
|
||||||
/**
|
/**
|
||||||
* the ID of the nic
|
* the ID of the nic
|
||||||
*/
|
*/
|
||||||
public String getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ public class NIC {
|
||||||
/**
|
/**
|
||||||
* the ID of the corresponding network
|
* the ID of the corresponding network
|
||||||
*/
|
*/
|
||||||
public String getNetworkId() {
|
public long getNetworkId() {
|
||||||
return networkId;
|
return networkId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,11 +146,11 @@ public class NIC {
|
||||||
result = prime * result + ((broadcastURI == null) ? 0 : broadcastURI.hashCode());
|
result = prime * result + ((broadcastURI == null) ? 0 : broadcastURI.hashCode());
|
||||||
result = prime * result + ((gateway == null) ? 0 : gateway.hashCode());
|
result = prime * result + ((gateway == null) ? 0 : gateway.hashCode());
|
||||||
result = prime * result + ((guestIPType == null) ? 0 : guestIPType.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 + (isDefault ? 1231 : 1237);
|
||||||
result = prime * result + ((isolationURI == null) ? 0 : isolationURI.hashCode());
|
result = prime * result + ((isolationURI == null) ? 0 : isolationURI.hashCode());
|
||||||
result = prime * result + ((netmask == null) ? 0 : netmask.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());
|
result = prime * result + ((trafficType == null) ? 0 : trafficType.hashCode());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -181,10 +181,7 @@ public class NIC {
|
||||||
return false;
|
return false;
|
||||||
if (guestIPType != other.guestIPType)
|
if (guestIPType != other.guestIPType)
|
||||||
return false;
|
return false;
|
||||||
if (id == null) {
|
if (id != other.id)
|
||||||
if (other.id != null)
|
|
||||||
return false;
|
|
||||||
} else if (!id.equals(other.id))
|
|
||||||
return false;
|
return false;
|
||||||
if (isDefault != other.isDefault)
|
if (isDefault != other.isDefault)
|
||||||
return false;
|
return false;
|
||||||
|
@ -198,10 +195,7 @@ public class NIC {
|
||||||
return false;
|
return false;
|
||||||
} else if (!netmask.equals(other.netmask))
|
} else if (!netmask.equals(other.netmask))
|
||||||
return false;
|
return false;
|
||||||
if (networkId == null) {
|
if (networkId != other.networkId)
|
||||||
if (other.networkId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!networkId.equals(other.networkId))
|
|
||||||
return false;
|
return false;
|
||||||
if (trafficType != other.trafficType)
|
if (trafficType != other.trafficType)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -37,7 +37,7 @@ import com.google.gson.annotations.SerializedName;
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class Network {
|
public class Network {
|
||||||
private String id;
|
private long id;
|
||||||
private String account;
|
private String account;
|
||||||
@SerializedName("broadcastdomaintype")
|
@SerializedName("broadcastdomaintype")
|
||||||
private String broadcastDomainType;
|
private String broadcastDomainType;
|
||||||
|
@ -52,7 +52,7 @@ public class Network {
|
||||||
private String domain;
|
private String domain;
|
||||||
@Nullable
|
@Nullable
|
||||||
@SerializedName("domainid")
|
@SerializedName("domainid")
|
||||||
private String domainId;
|
private long domainId;
|
||||||
@SerializedName("endip")
|
@SerializedName("endip")
|
||||||
private String endIP;
|
private String endIP;
|
||||||
private String gateway;
|
private String gateway;
|
||||||
|
@ -67,10 +67,10 @@ public class Network {
|
||||||
private String networkDomain;
|
private String networkDomain;
|
||||||
@SerializedName("networkofferingavailability")
|
@SerializedName("networkofferingavailability")
|
||||||
private String networkOfferingAvailability;
|
private String networkOfferingAvailability;
|
||||||
@SerializedName("networkofferingid")
|
@SerializedName("networkofferingdisplaytext")
|
||||||
private String networkOfferingDisplayText;
|
private String networkOfferingDisplayText;
|
||||||
@SerializedName("networkofferingid")
|
@SerializedName("networkofferingid")
|
||||||
private String networkOfferingId;
|
private long networkOfferingId;
|
||||||
@SerializedName("networkofferingname")
|
@SerializedName("networkofferingname")
|
||||||
private String networkOfferingName;
|
private String networkOfferingName;
|
||||||
private String related;
|
private String related;
|
||||||
|
@ -85,7 +85,7 @@ public class Network {
|
||||||
@SerializedName("traffictype")
|
@SerializedName("traffictype")
|
||||||
private TrafficType trafficType;
|
private TrafficType trafficType;
|
||||||
@SerializedName("zoneid")
|
@SerializedName("zoneid")
|
||||||
private String zoneId;
|
private long zoneId;
|
||||||
@SerializedName("service")
|
@SerializedName("service")
|
||||||
private Set<? extends NetworkService> services = ImmutableSet.<NetworkService> of();
|
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,
|
public Network(long id, String account, String broadcastDomainType, URI broadcastURI, String displayText,
|
||||||
List<String> DNS, String domain, String domainId, String endIP, String gateway, boolean isDefault,
|
List<String> DNS, String domain, long domainId, String endIP, String gateway, boolean isDefault,
|
||||||
boolean isShared, boolean isSystem, String netmask, String networkDomain,
|
boolean isShared, boolean isSystem, String netmask, String networkDomain, String networkOfferingAvailability,
|
||||||
String networkOfferingAvailability, String networkOfferingDisplayText, String networkOfferingId,
|
String networkOfferingDisplayText, long networkOfferingId, String networkOfferingName, String related,
|
||||||
String networkOfferingName, String related, String startIP, String name, String state, GuestIPType type,
|
String startIP, String name, String state, GuestIPType type, String vLAN, TrafficType trafficType,
|
||||||
String vLAN, TrafficType trafficType, String zoneId, Set<? extends NetworkService> services) {
|
long zoneId, Set<? extends NetworkService> services) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.account = account;
|
this.account = account;
|
||||||
this.broadcastDomainType = broadcastDomainType;
|
this.broadcastDomainType = broadcastDomainType;
|
||||||
|
@ -138,7 +138,7 @@ public class Network {
|
||||||
*
|
*
|
||||||
* @return network id
|
* @return network id
|
||||||
*/
|
*/
|
||||||
public String getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ public class Network {
|
||||||
* @return the ID of the containing domain, null for public zones
|
* @return the ID of the containing domain, null for public zones
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getDomainId() {
|
public long getDomainId() {
|
||||||
return domainId;
|
return domainId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ public class Network {
|
||||||
*
|
*
|
||||||
* @return network offering id the network is created from
|
* @return network offering id the network is created from
|
||||||
*/
|
*/
|
||||||
public String getNetworkOfferingId() {
|
public long getNetworkOfferingId() {
|
||||||
return networkOfferingId;
|
return networkOfferingId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ public class Network {
|
||||||
*
|
*
|
||||||
* @return zone id of the network
|
* @return zone id of the network
|
||||||
*/
|
*/
|
||||||
public String getZoneId() {
|
public long getZoneId() {
|
||||||
return zoneId;
|
return zoneId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -376,10 +376,11 @@ public class Network {
|
||||||
result = prime * result + ((broadcastURI == null) ? 0 : broadcastURI.hashCode());
|
result = prime * result + ((broadcastURI == null) ? 0 : broadcastURI.hashCode());
|
||||||
result = prime * result + ((displayText == null) ? 0 : displayText.hashCode());
|
result = prime * result + ((displayText == null) ? 0 : displayText.hashCode());
|
||||||
result = prime * result + ((domain == null) ? 0 : domain.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 + ((endIP == null) ? 0 : endIP.hashCode());
|
||||||
result = prime * result + ((gateway == null) ? 0 : gateway.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 + (isDefault ? 1231 : 1237);
|
||||||
result = prime * result + (isShared ? 1231 : 1237);
|
result = prime * result + (isShared ? 1231 : 1237);
|
||||||
result = prime * result + (isSystem ? 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 + ((networkDomain == null) ? 0 : networkDomain.hashCode());
|
||||||
result = prime * result + ((networkOfferingAvailability == null) ? 0 : networkOfferingAvailability.hashCode());
|
result = prime * result + ((networkOfferingAvailability == null) ? 0 : networkOfferingAvailability.hashCode());
|
||||||
result = prime * result + ((networkOfferingDisplayText == null) ? 0 : networkOfferingDisplayText.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 + ((networkOfferingName == null) ? 0 : networkOfferingName.hashCode());
|
||||||
result = prime * result + ((related == null) ? 0 : related.hashCode());
|
result = prime * result + ((related == null) ? 0 : related.hashCode());
|
||||||
result = prime * result + ((services == null) ? 0 : services.hashCode());
|
result = prime * result + ((services == null) ? 0 : services.hashCode());
|
||||||
result = prime * result + ((startIP == null) ? 0 : startIP.hashCode());
|
result = prime * result + ((startIP == null) ? 0 : startIP.hashCode());
|
||||||
result = prime * result + ((state == null) ? 0 : state.hashCode());
|
result = prime * result + ((state == null) ? 0 : state.hashCode());
|
||||||
result = prime * result + ((trafficType == null) ? 0 : trafficType.hashCode());
|
result = prime * result + ((trafficType == null) ? 0 : trafficType.hashCode());
|
||||||
result = prime * result + ((guestIPType == null) ? 0 : guestIPType.hashCode());
|
result = prime * result + (int) (zoneId ^ (zoneId >>> 32));
|
||||||
result = prime * result + ((zoneId == null) ? 0 : zoneId.hashCode());
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -449,10 +449,7 @@ public class Network {
|
||||||
return false;
|
return false;
|
||||||
} else if (!domain.equals(other.domain))
|
} else if (!domain.equals(other.domain))
|
||||||
return false;
|
return false;
|
||||||
if (domainId == null) {
|
if (domainId != other.domainId)
|
||||||
if (other.domainId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!domainId.equals(other.domainId))
|
|
||||||
return false;
|
return false;
|
||||||
if (endIP == null) {
|
if (endIP == null) {
|
||||||
if (other.endIP != null)
|
if (other.endIP != null)
|
||||||
|
@ -464,10 +461,9 @@ public class Network {
|
||||||
return false;
|
return false;
|
||||||
} else if (!gateway.equals(other.gateway))
|
} else if (!gateway.equals(other.gateway))
|
||||||
return false;
|
return false;
|
||||||
if (id == null) {
|
if (guestIPType != other.guestIPType)
|
||||||
if (other.id != null)
|
return false;
|
||||||
return false;
|
if (id != other.id)
|
||||||
} else if (!id.equals(other.id))
|
|
||||||
return false;
|
return false;
|
||||||
if (isDefault != other.isDefault)
|
if (isDefault != other.isDefault)
|
||||||
return false;
|
return false;
|
||||||
|
@ -500,10 +496,7 @@ public class Network {
|
||||||
return false;
|
return false;
|
||||||
} else if (!networkOfferingDisplayText.equals(other.networkOfferingDisplayText))
|
} else if (!networkOfferingDisplayText.equals(other.networkOfferingDisplayText))
|
||||||
return false;
|
return false;
|
||||||
if (networkOfferingId == null) {
|
if (networkOfferingId != other.networkOfferingId)
|
||||||
if (other.networkOfferingId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!networkOfferingId.equals(other.networkOfferingId))
|
|
||||||
return false;
|
return false;
|
||||||
if (networkOfferingName == null) {
|
if (networkOfferingName == null) {
|
||||||
if (other.networkOfferingName != null)
|
if (other.networkOfferingName != null)
|
||||||
|
@ -530,35 +523,24 @@ public class Network {
|
||||||
return false;
|
return false;
|
||||||
} else if (!state.equals(other.state))
|
} else if (!state.equals(other.state))
|
||||||
return false;
|
return false;
|
||||||
if (trafficType == null) {
|
if (trafficType != other.trafficType)
|
||||||
if (other.trafficType != null)
|
|
||||||
return false;
|
|
||||||
} else if (!trafficType.equals(other.trafficType))
|
|
||||||
return false;
|
return false;
|
||||||
if (guestIPType == null) {
|
if (zoneId != other.zoneId)
|
||||||
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))
|
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Network [id=" + id + ", state=" + state + ", name=" + name + ", displayText=" + displayText + ", guestIPType="
|
return "[id=" + id + ", state=" + state + ", name=" + name + ", displayText=" + displayText + ", guestIPType="
|
||||||
+ guestIPType + ", trafficType=" + trafficType + ", DNS=" + getDNS() + ", VLAN=" + VLAN + ", account="
|
+ guestIPType + ", trafficType=" + trafficType + ", DNS=" + getDNS() + ", VLAN=" + VLAN + ", account="
|
||||||
+ account + ", startIP=" + startIP + ", endIP=" + endIP + ", netmask=" + netmask + ", gateway="
|
+ account + ", startIP=" + startIP + ", endIP=" + endIP + ", netmask=" + netmask + ", gateway=" + gateway
|
||||||
+ gateway + ", broadcastDomainType=" + broadcastDomainType + ", broadcastURI=" + broadcastURI
|
+ ", broadcastDomainType=" + broadcastDomainType + ", broadcastURI=" + broadcastURI + ", services="
|
||||||
+ ", services=" + services + ", domain=" + domain + ", domainId=" + domainId + ", isDefault="
|
+ services + ", domain=" + domain + ", domainId=" + domainId + ", isDefault=" + isDefault + ", isShared="
|
||||||
+ isDefault + ", isShared=" + isShared + ", isSystem=" + isSystem + ", related=" + related + ", zoneId="
|
+ isShared + ", isSystem=" + isSystem + ", related=" + related + ", zoneId=" + zoneId + ", networkDomain="
|
||||||
+ zoneId + ", networkDomain=" + networkDomain + ", networkOfferingAvailability="
|
+ networkDomain + ", networkOfferingAvailability=" + networkOfferingAvailability
|
||||||
+ networkOfferingAvailability + ", networkOfferingDisplayText=" + networkOfferingDisplayText
|
+ ", networkOfferingDisplayText=" + networkOfferingDisplayText + ", networkOfferingId=" + networkOfferingId
|
||||||
+ ", networkOfferingId=" + networkOfferingId + ", networkOfferingName=" + networkOfferingName + "]";
|
+ ", networkOfferingName=" + networkOfferingName + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ import com.google.gson.annotations.SerializedName;
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class NetworkOffering {
|
public class NetworkOffering {
|
||||||
private String id;
|
private long id;
|
||||||
private String name;
|
private String name;
|
||||||
@SerializedName("displaytext")
|
@SerializedName("displaytext")
|
||||||
private String displayText;
|
private String displayText;
|
||||||
|
@ -50,7 +50,7 @@ public class NetworkOffering {
|
||||||
private TrafficType trafficType;
|
private TrafficType trafficType;
|
||||||
private String tags;
|
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,
|
boolean supportsVLAN, @Nullable Integer maxConnections, boolean isDefault, TrafficType trafficType,
|
||||||
Set<String> tags) {
|
Set<String> tags) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -77,7 +77,7 @@ public class NetworkOffering {
|
||||||
*
|
*
|
||||||
* @return the id of the network offering
|
* @return the id of the network offering
|
||||||
*/
|
*/
|
||||||
public String getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ public class NetworkOffering {
|
||||||
result = prime * result + ((availability == null) ? 0 : availability.hashCode());
|
result = prime * result + ((availability == null) ? 0 : availability.hashCode());
|
||||||
result = prime * result + ((created == null) ? 0 : created.hashCode());
|
result = prime * result + ((created == null) ? 0 : created.hashCode());
|
||||||
result = prime * result + ((displayText == null) ? 0 : displayText.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 + (isDefault ? 1231 : 1237);
|
||||||
result = prime * result + ((maxConnections == null) ? 0 : maxConnections.hashCode());
|
result = prime * result + ((maxConnections == null) ? 0 : maxConnections.hashCode());
|
||||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
||||||
|
@ -197,10 +197,7 @@ public class NetworkOffering {
|
||||||
return false;
|
return false;
|
||||||
} else if (!displayText.equals(other.displayText))
|
} else if (!displayText.equals(other.displayText))
|
||||||
return false;
|
return false;
|
||||||
if (id == null) {
|
if (id != other.id)
|
||||||
if (other.id != null)
|
|
||||||
return false;
|
|
||||||
} else if (!id.equals(other.id))
|
|
||||||
return false;
|
return false;
|
||||||
if (isDefault != other.isDefault)
|
if (isDefault != other.isDefault)
|
||||||
return false;
|
return false;
|
||||||
|
@ -221,10 +218,7 @@ public class NetworkOffering {
|
||||||
return false;
|
return false;
|
||||||
} else if (!tags.equals(other.tags))
|
} else if (!tags.equals(other.tags))
|
||||||
return false;
|
return false;
|
||||||
if (trafficType == null) {
|
if (trafficType != other.trafficType)
|
||||||
if (other.trafficType != null)
|
|
||||||
return false;
|
|
||||||
} else if (!trafficType.equals(other.trafficType))
|
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,14 +32,14 @@ import com.google.gson.annotations.SerializedName;
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class ServiceOffering {
|
public class ServiceOffering {
|
||||||
private String id;
|
private long id;
|
||||||
private String name;
|
private String name;
|
||||||
@SerializedName("displaytext")
|
@SerializedName("displaytext")
|
||||||
private String displayText;
|
private String displayText;
|
||||||
private Date created;
|
private Date created;
|
||||||
private String domain;
|
private String domain;
|
||||||
@SerializedName("domainid")
|
@SerializedName("domainid")
|
||||||
private String domainId;
|
private long domainId;
|
||||||
@SerializedName("cpunumber")
|
@SerializedName("cpunumber")
|
||||||
private int cpuNumber;
|
private int cpuNumber;
|
||||||
@SerializedName("cpuspeed")
|
@SerializedName("cpuspeed")
|
||||||
|
@ -51,7 +51,7 @@ public class ServiceOffering {
|
||||||
private StorageType storageType;
|
private StorageType storageType;
|
||||||
private String tags;
|
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) {
|
int cpuNumber, int cpuSpeed, int memory, boolean haSupport, StorageType storageType, Set<String> tags) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
@ -79,7 +79,7 @@ public class ServiceOffering {
|
||||||
*
|
*
|
||||||
* @return the id of the service offering
|
* @return the id of the service offering
|
||||||
*/
|
*/
|
||||||
public String getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ public class ServiceOffering {
|
||||||
*
|
*
|
||||||
* @return the domain id of the service offering
|
* @return the domain id of the service offering
|
||||||
*/
|
*/
|
||||||
public String getDomainId() {
|
public long getDomainId() {
|
||||||
return domainId;
|
return domainId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,9 +181,9 @@ public class ServiceOffering {
|
||||||
result = prime * result + ((created == null) ? 0 : created.hashCode());
|
result = prime * result + ((created == null) ? 0 : created.hashCode());
|
||||||
result = prime * result + ((displayText == null) ? 0 : displayText.hashCode());
|
result = prime * result + ((displayText == null) ? 0 : displayText.hashCode());
|
||||||
result = prime * result + ((domain == null) ? 0 : domain.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 + (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 + memory;
|
||||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
||||||
result = prime * result + ((storageType == null) ? 0 : storageType.hashCode());
|
result = prime * result + ((storageType == null) ? 0 : storageType.hashCode());
|
||||||
|
@ -219,17 +219,11 @@ public class ServiceOffering {
|
||||||
return false;
|
return false;
|
||||||
} else if (!domain.equals(other.domain))
|
} else if (!domain.equals(other.domain))
|
||||||
return false;
|
return false;
|
||||||
if (domainId == null) {
|
if (domainId != other.domainId)
|
||||||
if (other.domainId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!domainId.equals(other.domainId))
|
|
||||||
return false;
|
return false;
|
||||||
if (haSupport != other.haSupport)
|
if (haSupport != other.haSupport)
|
||||||
return false;
|
return false;
|
||||||
if (id == null) {
|
if (id != other.id)
|
||||||
if (other.id != null)
|
|
||||||
return false;
|
|
||||||
} else if (!id.equals(other.id))
|
|
||||||
return false;
|
return false;
|
||||||
if (memory != other.memory)
|
if (memory != other.memory)
|
||||||
return false;
|
return false;
|
||||||
|
@ -238,10 +232,7 @@ public class ServiceOffering {
|
||||||
return false;
|
return false;
|
||||||
} else if (!name.equals(other.name))
|
} else if (!name.equals(other.name))
|
||||||
return false;
|
return false;
|
||||||
if (storageType == null) {
|
if (storageType != other.storageType)
|
||||||
if (other.storageType != null)
|
|
||||||
return false;
|
|
||||||
} else if (!storageType.equals(other.storageType))
|
|
||||||
return false;
|
return false;
|
||||||
if (tags == null) {
|
if (tags == null) {
|
||||||
if (other.tags != null)
|
if (other.tags != null)
|
||||||
|
|
|
@ -58,23 +58,23 @@ public class Template {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String id;
|
private long id;
|
||||||
@SerializedName("displaytext")
|
@SerializedName("displaytext")
|
||||||
private String displayText;
|
private String displayText;
|
||||||
private String domain;
|
private String domain;
|
||||||
@SerializedName("domainid")
|
@SerializedName("domainid")
|
||||||
private String domainId;
|
private long domainId;
|
||||||
private String account;
|
private String account;
|
||||||
@SerializedName("accountid")
|
@SerializedName("accountid")
|
||||||
private String accountId;
|
private long accountId;
|
||||||
@SerializedName("zonename")
|
@SerializedName("zonename")
|
||||||
private String zone;
|
private String zone;
|
||||||
@SerializedName("zoneid")
|
@SerializedName("zoneid")
|
||||||
private String zoneId;
|
private long zoneId;
|
||||||
@SerializedName("ostypename")
|
@SerializedName("ostypename")
|
||||||
private String OSType;
|
private String OSType;
|
||||||
@SerializedName("ostypeid")
|
@SerializedName("ostypeid")
|
||||||
private String OSTypeId;
|
private long OSTypeId;
|
||||||
private String name;
|
private String name;
|
||||||
@SerializedName("templatetype")
|
@SerializedName("templatetype")
|
||||||
private Type type;
|
private Type type;
|
||||||
|
@ -100,15 +100,15 @@ public class Template {
|
||||||
private boolean passwordEnabled;
|
private boolean passwordEnabled;
|
||||||
@Nullable
|
@Nullable
|
||||||
@SerializedName("jobid")
|
@SerializedName("jobid")
|
||||||
private String jobId;
|
private Long jobId;
|
||||||
@SerializedName("jobstatus")
|
@SerializedName("jobstatus")
|
||||||
private String jobStatus;
|
private String jobStatus;
|
||||||
|
|
||||||
public Template(String id, String displayText, String domain, String domainId, String account, String accountId,
|
public Template(long id, String displayText, String domain, long domainId, String account, long accountId,
|
||||||
String zone, String zoneId, String oSType, String oSTypeId, String name, Type type, String status,
|
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,
|
Format format, String hypervisor, Long size, Date created, Date removed, boolean crossZones,
|
||||||
boolean bootable, boolean extractable, boolean featured, boolean ispublic, boolean ready,
|
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.id = id;
|
||||||
this.displayText = displayText;
|
this.displayText = displayText;
|
||||||
this.domain = domain;
|
this.domain = domain;
|
||||||
|
@ -150,7 +150,7 @@ public class Template {
|
||||||
*
|
*
|
||||||
* @return Template id
|
* @return Template id
|
||||||
*/
|
*/
|
||||||
public String getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ public class Template {
|
||||||
*
|
*
|
||||||
* @return the ID of the domain to which the template beLongs
|
* @return the ID of the domain to which the template beLongs
|
||||||
*/
|
*/
|
||||||
public String getDomainId() {
|
public long getDomainId() {
|
||||||
return domainId;
|
return domainId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ public class Template {
|
||||||
*
|
*
|
||||||
* @return the ID of the account to which the template beLongs
|
* @return the ID of the account to which the template beLongs
|
||||||
*/
|
*/
|
||||||
public String getAccountId() {
|
public long getAccountId() {
|
||||||
return accountId;
|
return accountId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ public class Template {
|
||||||
*
|
*
|
||||||
* @return the ID of the zone to which the template beLongs
|
* @return the ID of the zone to which the template beLongs
|
||||||
*/
|
*/
|
||||||
public String getZoneId() {
|
public long getZoneId() {
|
||||||
return zoneId;
|
return zoneId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +222,7 @@ public class Template {
|
||||||
*
|
*
|
||||||
* @return the ID of the OS type to which the template beLongs
|
* @return the ID of the OS type to which the template beLongs
|
||||||
*/
|
*/
|
||||||
public String getOSTypeId() {
|
public long getOSTypeId() {
|
||||||
return OSTypeId;
|
return OSTypeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ public class Template {
|
||||||
* acting on the template
|
* acting on the template
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getJobId() {
|
public Long getJobId() {
|
||||||
return jobId;
|
return jobId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -369,20 +369,20 @@ public class Template {
|
||||||
final int prime = 31;
|
final int prime = 31;
|
||||||
int result = 1;
|
int result = 1;
|
||||||
result = prime * result + ((OSType == null) ? 0 : OSType.hashCode());
|
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 + ((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 + (bootable ? 1231 : 1237);
|
||||||
result = prime * result + ((created == null) ? 0 : created.hashCode());
|
result = prime * result + ((created == null) ? 0 : created.hashCode());
|
||||||
result = prime * result + (crossZones ? 1231 : 1237);
|
result = prime * result + (crossZones ? 1231 : 1237);
|
||||||
result = prime * result + ((displayText == null) ? 0 : displayText.hashCode());
|
result = prime * result + ((displayText == null) ? 0 : displayText.hashCode());
|
||||||
result = prime * result + ((domain == null) ? 0 : domain.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 + (extractable ? 1231 : 1237);
|
||||||
result = prime * result + (featured ? 1231 : 1237);
|
result = prime * result + (featured ? 1231 : 1237);
|
||||||
result = prime * result + ((format == null) ? 0 : format.hashCode());
|
result = prime * result + ((format == null) ? 0 : format.hashCode());
|
||||||
result = prime * result + ((hypervisor == null) ? 0 : hypervisor.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 + (ispublic ? 1231 : 1237);
|
||||||
result = prime * result + ((jobId == null) ? 0 : jobId.hashCode());
|
result = prime * result + ((jobId == null) ? 0 : jobId.hashCode());
|
||||||
result = prime * result + ((jobStatus == null) ? 0 : jobStatus.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 + ((status == null) ? 0 : status.hashCode());
|
||||||
result = prime * result + ((type == null) ? 0 : type.hashCode());
|
result = prime * result + ((type == null) ? 0 : type.hashCode());
|
||||||
result = prime * result + ((zone == null) ? 0 : zone.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;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -412,20 +412,14 @@ public class Template {
|
||||||
return false;
|
return false;
|
||||||
} else if (!OSType.equals(other.OSType))
|
} else if (!OSType.equals(other.OSType))
|
||||||
return false;
|
return false;
|
||||||
if (OSTypeId == null) {
|
if (OSTypeId != other.OSTypeId)
|
||||||
if (other.OSTypeId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!OSTypeId.equals(other.OSTypeId))
|
|
||||||
return false;
|
return false;
|
||||||
if (account == null) {
|
if (account == null) {
|
||||||
if (other.account != null)
|
if (other.account != null)
|
||||||
return false;
|
return false;
|
||||||
} else if (!account.equals(other.account))
|
} else if (!account.equals(other.account))
|
||||||
return false;
|
return false;
|
||||||
if (accountId == null) {
|
if (accountId != other.accountId)
|
||||||
if (other.accountId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!accountId.equals(other.accountId))
|
|
||||||
return false;
|
return false;
|
||||||
if (bootable != other.bootable)
|
if (bootable != other.bootable)
|
||||||
return false;
|
return false;
|
||||||
|
@ -446,29 +440,20 @@ public class Template {
|
||||||
return false;
|
return false;
|
||||||
} else if (!domain.equals(other.domain))
|
} else if (!domain.equals(other.domain))
|
||||||
return false;
|
return false;
|
||||||
if (domainId == null) {
|
if (domainId != other.domainId)
|
||||||
if (other.domainId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!domainId.equals(other.domainId))
|
|
||||||
return false;
|
return false;
|
||||||
if (extractable != other.extractable)
|
if (extractable != other.extractable)
|
||||||
return false;
|
return false;
|
||||||
if (featured != other.featured)
|
if (featured != other.featured)
|
||||||
return false;
|
return false;
|
||||||
if (format == null) {
|
if (format != other.format)
|
||||||
if (other.format != null)
|
|
||||||
return false;
|
|
||||||
} else if (!format.equals(other.format))
|
|
||||||
return false;
|
return false;
|
||||||
if (hypervisor == null) {
|
if (hypervisor == null) {
|
||||||
if (other.hypervisor != null)
|
if (other.hypervisor != null)
|
||||||
return false;
|
return false;
|
||||||
} else if (!hypervisor.equals(other.hypervisor))
|
} else if (!hypervisor.equals(other.hypervisor))
|
||||||
return false;
|
return false;
|
||||||
if (id == null) {
|
if (id != other.id)
|
||||||
if (other.id != null)
|
|
||||||
return false;
|
|
||||||
} else if (!id.equals(other.id))
|
|
||||||
return false;
|
return false;
|
||||||
if (ispublic != other.ispublic)
|
if (ispublic != other.ispublic)
|
||||||
return false;
|
return false;
|
||||||
|
@ -506,20 +491,14 @@ public class Template {
|
||||||
return false;
|
return false;
|
||||||
} else if (!status.equals(other.status))
|
} else if (!status.equals(other.status))
|
||||||
return false;
|
return false;
|
||||||
if (type == null) {
|
if (type != other.type)
|
||||||
if (other.type != null)
|
|
||||||
return false;
|
|
||||||
} else if (!type.equals(other.type))
|
|
||||||
return false;
|
return false;
|
||||||
if (zone == null) {
|
if (zone == null) {
|
||||||
if (other.zone != null)
|
if (other.zone != null)
|
||||||
return false;
|
return false;
|
||||||
} else if (!zone.equals(other.zone))
|
} else if (!zone.equals(other.zone))
|
||||||
return false;
|
return false;
|
||||||
if (zoneId == null) {
|
if (zoneId != other.zoneId)
|
||||||
if (other.zoneId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!zoneId.equals(other.zoneId))
|
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class VirtualMachine {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String id;
|
private long id;
|
||||||
private String account;
|
private String account;
|
||||||
@SerializedName("cpunumber")
|
@SerializedName("cpunumber")
|
||||||
private long cpuCount;
|
private long cpuCount;
|
||||||
|
@ -67,30 +67,30 @@ public class VirtualMachine {
|
||||||
private Date created;
|
private Date created;
|
||||||
private String domain;
|
private String domain;
|
||||||
@SerializedName("domainid")
|
@SerializedName("domainid")
|
||||||
private String domainId;
|
private long domainId;
|
||||||
@SerializedName("forvirtualnetwork")
|
@SerializedName("forvirtualnetwork")
|
||||||
private boolean usesVirtualNetwork;
|
private boolean usesVirtualNetwork;
|
||||||
private String group;
|
private String group;
|
||||||
@SerializedName("groupid")
|
@SerializedName("groupid")
|
||||||
private String groupId;
|
private long groupId;
|
||||||
@SerializedName("guestosid")
|
@SerializedName("guestosid")
|
||||||
private String guestOSId;
|
private long guestOSId;
|
||||||
@SerializedName("haenable")
|
@SerializedName("haenable")
|
||||||
private boolean HAEnabled;
|
private boolean HAEnabled;
|
||||||
@SerializedName("hostid")
|
@SerializedName("hostid")
|
||||||
private String hostId;
|
private long hostId;
|
||||||
private String hostname;
|
private String hostname;
|
||||||
@SerializedName("ipaddress")
|
@SerializedName("ipaddress")
|
||||||
private String IPAddress;
|
private String IPAddress;
|
||||||
@SerializedName("isodisplaytext")
|
@SerializedName("isodisplaytext")
|
||||||
private String ISODisplayText;
|
private String ISODisplayText;
|
||||||
@SerializedName("isoid")
|
@SerializedName("isoid")
|
||||||
private String ISOId;
|
private long ISOId;
|
||||||
@SerializedName("isoname")
|
@SerializedName("isoname")
|
||||||
private String ISOName;
|
private String ISOName;
|
||||||
@SerializedName("jobid")
|
@SerializedName("jobid")
|
||||||
@Nullable
|
@Nullable
|
||||||
private String jobId;
|
private Long jobId;
|
||||||
@SerializedName("jobstatus")
|
@SerializedName("jobstatus")
|
||||||
@Nullable
|
@Nullable
|
||||||
private String jobStatus;
|
private String jobStatus;
|
||||||
|
@ -105,37 +105,37 @@ public class VirtualMachine {
|
||||||
@SerializedName("passwordenabled")
|
@SerializedName("passwordenabled")
|
||||||
private boolean passwordEnabled;
|
private boolean passwordEnabled;
|
||||||
@SerializedName("rootdeviceid")
|
@SerializedName("rootdeviceid")
|
||||||
private String rootDeviceId;
|
private long rootDeviceId;
|
||||||
@SerializedName("rootdevicetype")
|
@SerializedName("rootdevicetype")
|
||||||
private String rootDeviceType;
|
private String rootDeviceType;
|
||||||
@SerializedName("securitygrouplist")
|
@SerializedName("securitygrouplist")
|
||||||
private String securityGroupList;
|
private String securityGroupList;
|
||||||
@SerializedName("serviceofferingid")
|
@SerializedName("serviceofferingid")
|
||||||
private String serviceOfferingId;
|
private long serviceOfferingId;
|
||||||
@SerializedName("serviceofferingname")
|
@SerializedName("serviceofferingname")
|
||||||
private String serviceOfferingName;
|
private String serviceOfferingName;
|
||||||
private State state;
|
private State state;
|
||||||
@SerializedName("templatedisplaytext")
|
@SerializedName("templatedisplaytext")
|
||||||
private String templateDisplayText;
|
private String templateDisplayText;
|
||||||
@SerializedName("templateid")
|
@SerializedName("templateid")
|
||||||
private String templateId;
|
private long templateId;
|
||||||
@SerializedName("templatename")
|
@SerializedName("templatename")
|
||||||
private String templateName;
|
private String templateName;
|
||||||
@SerializedName("zoneid")
|
@SerializedName("zoneid")
|
||||||
private String zoneId;
|
private long zoneId;
|
||||||
@SerializedName("zonename")
|
@SerializedName("zonename")
|
||||||
private String zoneName;
|
private String zoneName;
|
||||||
@SerializedName("nic")
|
@SerializedName("nic")
|
||||||
private Set<? extends NIC> nics = ImmutableSet.<NIC> of();
|
private Set<? extends NIC> nics = ImmutableSet.<NIC> of();
|
||||||
private String hypervisor;
|
private String hypervisor;
|
||||||
|
|
||||||
public VirtualMachine(String id, String account, long cpuCount, long cpuSpeed, long cpuUsed, String displayName,
|
public VirtualMachine(long id, String account, long cpuCount, long cpuSpeed, long cpuUsed, String displayName,
|
||||||
Date created, String domain, String domainId, boolean usesVirtualNetwork, String group, String groupId,
|
Date created, String domain, long domainId, boolean usesVirtualNetwork, String group, long groupId,
|
||||||
String guestOSId, boolean hAEnabled, String hostId, String hostname, String iPAddress, String iSODisplayText,
|
long guestOSId, boolean hAEnabled, long hostId, String hostname, String iPAddress, String iSODisplayText,
|
||||||
String iSOId, String iSOName, String jobId, String jobStatus, long memory, String name, Long networkKbsRead,
|
long iSOId, String iSOName, Long jobId, String jobStatus, long memory, String name, Long networkKbsRead,
|
||||||
Long networkKbsWrite, String password, boolean passwordEnabled, String rootDeviceId, String rootDeviceType,
|
Long networkKbsWrite, String password, boolean passwordEnabled, long rootDeviceId, String rootDeviceType,
|
||||||
Set<String> securityGroupList, String serviceOfferingId, String serviceOfferingName, State state,
|
Set<String> securityGroupList, long serviceOfferingId, String serviceOfferingName, State state,
|
||||||
String templateDisplayText, String templateId, String templateName, String zoneId, String zoneName,
|
String templateDisplayText, long templateId, String templateName, long zoneId, String zoneName,
|
||||||
Set<? extends NIC> nics, String hypervisor) {
|
Set<? extends NIC> nics, String hypervisor) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.account = account;
|
this.account = account;
|
||||||
|
@ -190,7 +190,7 @@ public class VirtualMachine {
|
||||||
/**
|
/**
|
||||||
* @return the ID of the virtual machine
|
* @return the ID of the virtual machine
|
||||||
*/
|
*/
|
||||||
public String getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +247,7 @@ public class VirtualMachine {
|
||||||
/**
|
/**
|
||||||
* @return the ID of the domain in which the virtual machine exists
|
* @return the ID of the domain in which the virtual machine exists
|
||||||
*/
|
*/
|
||||||
public String getDomainId() {
|
public long getDomainId() {
|
||||||
return domainId;
|
return domainId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -268,14 +268,14 @@ public class VirtualMachine {
|
||||||
/**
|
/**
|
||||||
* @return the group ID of the virtual machine
|
* @return the group ID of the virtual machine
|
||||||
*/
|
*/
|
||||||
public String getGroupId() {
|
public long getGroupId() {
|
||||||
return groupId;
|
return groupId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Os type ID of the virtual machine
|
* @return Os type ID of the virtual machine
|
||||||
*/
|
*/
|
||||||
public String getGuestOSId() {
|
public long getGuestOSId() {
|
||||||
return guestOSId;
|
return guestOSId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,7 +289,7 @@ public class VirtualMachine {
|
||||||
/**
|
/**
|
||||||
* @return the ID of the host for the virtual machine
|
* @return the ID of the host for the virtual machine
|
||||||
*/
|
*/
|
||||||
public String getHostId() {
|
public long getHostId() {
|
||||||
return hostId;
|
return hostId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ public class VirtualMachine {
|
||||||
/**
|
/**
|
||||||
* @return the ID of the ISO attached to the virtual machine
|
* @return the ID of the ISO attached to the virtual machine
|
||||||
*/
|
*/
|
||||||
public String getISOId() {
|
public long getISOId() {
|
||||||
return ISOId;
|
return ISOId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ public class VirtualMachine {
|
||||||
* pending jobs are acting on the virtual machine
|
* pending jobs are acting on the virtual machine
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getJobId() {
|
public Long getJobId() {
|
||||||
return jobId;
|
return jobId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ public class VirtualMachine {
|
||||||
/**
|
/**
|
||||||
* @return device ID of the root volume
|
* @return device ID of the root volume
|
||||||
*/
|
*/
|
||||||
public String getRootDeviceId() {
|
public long getRootDeviceId() {
|
||||||
return rootDeviceId;
|
return rootDeviceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,7 +413,7 @@ public class VirtualMachine {
|
||||||
/**
|
/**
|
||||||
* @return the ID of the service offering of the virtual machine
|
* @return the ID of the service offering of the virtual machine
|
||||||
*/
|
*/
|
||||||
public String getServiceOfferingId() {
|
public long getServiceOfferingId() {
|
||||||
return serviceOfferingId;
|
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
|
* @return the ID of the template for the virtual machine. A -1 is returned if the virtual
|
||||||
* machine was created from an ISO file.
|
* machine was created from an ISO file.
|
||||||
*/
|
*/
|
||||||
public String getTemplateId() {
|
public long getTemplateId() {
|
||||||
return templateId;
|
return templateId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -456,7 +456,7 @@ public class VirtualMachine {
|
||||||
/**
|
/**
|
||||||
* @return the ID of the availablility zone for the virtual machine
|
* @return the ID of the availablility zone for the virtual machine
|
||||||
*/
|
*/
|
||||||
public String getZoneId() {
|
public long getZoneId() {
|
||||||
return zoneId;
|
return zoneId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -488,7 +488,7 @@ public class VirtualMachine {
|
||||||
result = prime * result + (HAEnabled ? 1231 : 1237);
|
result = prime * result + (HAEnabled ? 1231 : 1237);
|
||||||
result = prime * result + ((IPAddress == null) ? 0 : IPAddress.hashCode());
|
result = prime * result + ((IPAddress == null) ? 0 : IPAddress.hashCode());
|
||||||
result = prime * result + ((ISODisplayText == null) ? 0 : ISODisplayText.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 + ((ISOName == null) ? 0 : ISOName.hashCode());
|
||||||
result = prime * result + ((account == null) ? 0 : account.hashCode());
|
result = prime * result + ((account == null) ? 0 : account.hashCode());
|
||||||
result = prime * result + (int) (cpuCount ^ (cpuCount >>> 32));
|
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 + ((created == null) ? 0 : created.hashCode());
|
||||||
result = prime * result + ((displayName == null) ? 0 : displayName.hashCode());
|
result = prime * result + ((displayName == null) ? 0 : displayName.hashCode());
|
||||||
result = prime * result + ((domain == null) ? 0 : domain.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 + ((group == null) ? 0 : group.hashCode());
|
||||||
result = prime * result + ((groupId == null) ? 0 : groupId.hashCode());
|
result = prime * result + (int) (groupId ^ (groupId >>> 32));
|
||||||
result = prime * result + ((guestOSId == null) ? 0 : guestOSId.hashCode());
|
result = prime * result + (int) (guestOSId ^ (guestOSId >>> 32));
|
||||||
result = prime * result + ((hostId == null) ? 0 : hostId.hashCode());
|
result = prime * result + (int) (hostId ^ (hostId >>> 32));
|
||||||
result = prime * result + ((hostname == null) ? 0 : hostname.hashCode());
|
result = prime * result + ((hostname == null) ? 0 : hostname.hashCode());
|
||||||
result = prime * result + ((hypervisor == null) ? 0 : hypervisor.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 + ((jobId == null) ? 0 : jobId.hashCode());
|
||||||
result = prime * result + ((jobStatus == null) ? 0 : jobStatus.hashCode());
|
result = prime * result + ((jobStatus == null) ? 0 : jobStatus.hashCode());
|
||||||
result = prime * result + (int) (memory ^ (memory >>> 32));
|
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 + ((nics == null) ? 0 : nics.hashCode());
|
||||||
result = prime * result + ((password == null) ? 0 : password.hashCode());
|
result = prime * result + ((password == null) ? 0 : password.hashCode());
|
||||||
result = prime * result + (passwordEnabled ? 1231 : 1237);
|
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 + ((rootDeviceType == null) ? 0 : rootDeviceType.hashCode());
|
||||||
result = prime * result + ((securityGroupList == null) ? 0 : securityGroupList.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 + ((serviceOfferingName == null) ? 0 : serviceOfferingName.hashCode());
|
||||||
result = prime * result + ((state == null) ? 0 : state.hashCode());
|
result = prime * result + ((state == null) ? 0 : state.hashCode());
|
||||||
result = prime * result + ((templateDisplayText == null) ? 0 : templateDisplayText.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 + ((templateName == null) ? 0 : templateName.hashCode());
|
||||||
result = prime * result + (usesVirtualNetwork ? 1231 : 1237);
|
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());
|
result = prime * result + ((zoneName == null) ? 0 : zoneName.hashCode());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -550,10 +550,7 @@ public class VirtualMachine {
|
||||||
return false;
|
return false;
|
||||||
} else if (!ISODisplayText.equals(other.ISODisplayText))
|
} else if (!ISODisplayText.equals(other.ISODisplayText))
|
||||||
return false;
|
return false;
|
||||||
if (ISOId == null) {
|
if (ISOId != other.ISOId)
|
||||||
if (other.ISOId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!ISOId.equals(other.ISOId))
|
|
||||||
return false;
|
return false;
|
||||||
if (ISOName == null) {
|
if (ISOName == null) {
|
||||||
if (other.ISOName != null)
|
if (other.ISOName != null)
|
||||||
|
@ -589,30 +586,18 @@ public class VirtualMachine {
|
||||||
return false;
|
return false;
|
||||||
} else if (!domain.equals(other.domain))
|
} else if (!domain.equals(other.domain))
|
||||||
return false;
|
return false;
|
||||||
if (domainId == null) {
|
if (domainId != other.domainId)
|
||||||
if (other.domainId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!domainId.equals(other.domainId))
|
|
||||||
return false;
|
return false;
|
||||||
if (group == null) {
|
if (group == null) {
|
||||||
if (other.group != null)
|
if (other.group != null)
|
||||||
return false;
|
return false;
|
||||||
} else if (!group.equals(other.group))
|
} else if (!group.equals(other.group))
|
||||||
return false;
|
return false;
|
||||||
if (groupId == null) {
|
if (groupId != other.groupId)
|
||||||
if (other.groupId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!groupId.equals(other.groupId))
|
|
||||||
return false;
|
return false;
|
||||||
if (guestOSId == null) {
|
if (guestOSId != other.guestOSId)
|
||||||
if (other.guestOSId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!guestOSId.equals(other.guestOSId))
|
|
||||||
return false;
|
return false;
|
||||||
if (hostId == null) {
|
if (hostId != other.hostId)
|
||||||
if (other.hostId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!hostId.equals(other.hostId))
|
|
||||||
return false;
|
return false;
|
||||||
if (hostname == null) {
|
if (hostname == null) {
|
||||||
if (other.hostname != null)
|
if (other.hostname != null)
|
||||||
|
@ -624,10 +609,7 @@ public class VirtualMachine {
|
||||||
return false;
|
return false;
|
||||||
} else if (!hypervisor.equals(other.hypervisor))
|
} else if (!hypervisor.equals(other.hypervisor))
|
||||||
return false;
|
return false;
|
||||||
if (id == null) {
|
if (id != other.id)
|
||||||
if (other.id != null)
|
|
||||||
return false;
|
|
||||||
} else if (!id.equals(other.id))
|
|
||||||
return false;
|
return false;
|
||||||
if (jobId == null) {
|
if (jobId == null) {
|
||||||
if (other.jobId != null)
|
if (other.jobId != null)
|
||||||
|
@ -668,10 +650,7 @@ public class VirtualMachine {
|
||||||
return false;
|
return false;
|
||||||
if (passwordEnabled != other.passwordEnabled)
|
if (passwordEnabled != other.passwordEnabled)
|
||||||
return false;
|
return false;
|
||||||
if (rootDeviceId == null) {
|
if (rootDeviceId != other.rootDeviceId)
|
||||||
if (other.rootDeviceId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!rootDeviceId.equals(other.rootDeviceId))
|
|
||||||
return false;
|
return false;
|
||||||
if (rootDeviceType == null) {
|
if (rootDeviceType == null) {
|
||||||
if (other.rootDeviceType != null)
|
if (other.rootDeviceType != null)
|
||||||
|
@ -683,10 +662,7 @@ public class VirtualMachine {
|
||||||
return false;
|
return false;
|
||||||
} else if (!securityGroupList.equals(other.securityGroupList))
|
} else if (!securityGroupList.equals(other.securityGroupList))
|
||||||
return false;
|
return false;
|
||||||
if (serviceOfferingId == null) {
|
if (serviceOfferingId != other.serviceOfferingId)
|
||||||
if (other.serviceOfferingId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!serviceOfferingId.equals(other.serviceOfferingId))
|
|
||||||
return false;
|
return false;
|
||||||
if (serviceOfferingName == null) {
|
if (serviceOfferingName == null) {
|
||||||
if (other.serviceOfferingName != null)
|
if (other.serviceOfferingName != null)
|
||||||
|
@ -700,10 +676,7 @@ public class VirtualMachine {
|
||||||
return false;
|
return false;
|
||||||
} else if (!templateDisplayText.equals(other.templateDisplayText))
|
} else if (!templateDisplayText.equals(other.templateDisplayText))
|
||||||
return false;
|
return false;
|
||||||
if (templateId == null) {
|
if (templateId != other.templateId)
|
||||||
if (other.templateId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!templateId.equals(other.templateId))
|
|
||||||
return false;
|
return false;
|
||||||
if (templateName == null) {
|
if (templateName == null) {
|
||||||
if (other.templateName != null)
|
if (other.templateName != null)
|
||||||
|
@ -712,10 +685,7 @@ public class VirtualMachine {
|
||||||
return false;
|
return false;
|
||||||
if (usesVirtualNetwork != other.usesVirtualNetwork)
|
if (usesVirtualNetwork != other.usesVirtualNetwork)
|
||||||
return false;
|
return false;
|
||||||
if (zoneId == null) {
|
if (zoneId != other.zoneId)
|
||||||
if (other.zoneId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!zoneId.equals(other.zoneId))
|
|
||||||
return false;
|
return false;
|
||||||
if (zoneName == null) {
|
if (zoneName == null) {
|
||||||
if (other.zoneName != null)
|
if (other.zoneName != null)
|
||||||
|
|
|
@ -34,7 +34,7 @@ import com.google.gson.annotations.SerializedName;
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
public class Zone {
|
public class Zone {
|
||||||
private String id;
|
private long id;
|
||||||
private String description;
|
private String description;
|
||||||
@SerializedName("displaytext")
|
@SerializedName("displaytext")
|
||||||
private String displayText;
|
private String displayText;
|
||||||
|
@ -45,7 +45,7 @@ public class Zone {
|
||||||
private String domain;
|
private String domain;
|
||||||
@Nullable
|
@Nullable
|
||||||
@SerializedName("domainid")
|
@SerializedName("domainid")
|
||||||
private String domainId;
|
private long domainId;
|
||||||
@SerializedName("guestcidraddress")
|
@SerializedName("guestcidraddress")
|
||||||
private String guestCIDRAddress;
|
private String guestCIDRAddress;
|
||||||
@SerializedName("internaldns1")
|
@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 guestCIDRAddress, List<String> internalDNS, String name, NetworkType networkType, String status,
|
||||||
String vLAN) {
|
String vLAN) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -90,7 +90,7 @@ public class Zone {
|
||||||
*
|
*
|
||||||
* @return Zone id
|
* @return Zone id
|
||||||
*/
|
*/
|
||||||
public String getId() {
|
public long getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ public class Zone {
|
||||||
* @return the ID of the containing domain, null for public zones
|
* @return the ID of the containing domain, null for public zones
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
public String getDomainId() {
|
public long getDomainId() {
|
||||||
return domainId;
|
return domainId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,9 +203,9 @@ public class Zone {
|
||||||
result = prime * result + ((description == null) ? 0 : description.hashCode());
|
result = prime * result + ((description == null) ? 0 : description.hashCode());
|
||||||
result = prime * result + ((displayText == null) ? 0 : displayText.hashCode());
|
result = prime * result + ((displayText == null) ? 0 : displayText.hashCode());
|
||||||
result = prime * result + ((domain == null) ? 0 : domain.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 + ((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 + ((internalDNS1 == null) ? 0 : internalDNS1.hashCode());
|
||||||
result = prime * result + ((internalDNS2 == null) ? 0 : internalDNS2.hashCode());
|
result = prime * result + ((internalDNS2 == null) ? 0 : internalDNS2.hashCode());
|
||||||
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
result = prime * result + ((name == null) ? 0 : name.hashCode());
|
||||||
|
@ -253,20 +253,14 @@ public class Zone {
|
||||||
return false;
|
return false;
|
||||||
} else if (!domain.equals(other.domain))
|
} else if (!domain.equals(other.domain))
|
||||||
return false;
|
return false;
|
||||||
if (domainId == null) {
|
if (domainId != other.domainId)
|
||||||
if (other.domainId != null)
|
|
||||||
return false;
|
|
||||||
} else if (!domainId.equals(other.domainId))
|
|
||||||
return false;
|
return false;
|
||||||
if (guestCIDRAddress == null) {
|
if (guestCIDRAddress == null) {
|
||||||
if (other.guestCIDRAddress != null)
|
if (other.guestCIDRAddress != null)
|
||||||
return false;
|
return false;
|
||||||
} else if (!guestCIDRAddress.equals(other.guestCIDRAddress))
|
} else if (!guestCIDRAddress.equals(other.guestCIDRAddress))
|
||||||
return false;
|
return false;
|
||||||
if (id == null) {
|
if (id != other.id)
|
||||||
if (other.id != null)
|
|
||||||
return false;
|
|
||||||
} else if (!id.equals(other.id))
|
|
||||||
return false;
|
return false;
|
||||||
if (internalDNS1 == null) {
|
if (internalDNS1 == null) {
|
||||||
if (other.internalDNS1 != null)
|
if (other.internalDNS1 != null)
|
||||||
|
@ -283,10 +277,7 @@ public class Zone {
|
||||||
return false;
|
return false;
|
||||||
} else if (!name.equals(other.name))
|
} else if (!name.equals(other.name))
|
||||||
return false;
|
return false;
|
||||||
if (networkType == null) {
|
if (networkType != other.networkType)
|
||||||
if (other.networkType != null)
|
|
||||||
return false;
|
|
||||||
} else if (!networkType.equals(other.networkType))
|
|
||||||
return false;
|
return false;
|
||||||
if (status == null) {
|
if (status == null) {
|
||||||
if (other.status != null)
|
if (other.status != null)
|
||||||
|
|
|
@ -68,6 +68,6 @@ public interface NetworkAsyncClient {
|
||||||
@Unwrap(depth = 3, edgeCollection = Set.class)
|
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
@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
|
* network to get
|
||||||
* @return network or null if not found
|
* @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)
|
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||||
ListenableFuture<ServiceOffering> getServiceOffering(@QueryParam("id") String id);
|
ListenableFuture<ServiceOffering> getServiceOffering(@QueryParam("id") long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see OfferingClient#listDiskOfferings
|
* @see OfferingClient#listDiskOfferings
|
||||||
|
@ -92,7 +92,7 @@ public interface OfferingAsyncClient {
|
||||||
@Unwrap(depth = 3, edgeCollection = Set.class)
|
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||||
ListenableFuture<DiskOffering> getDiskOffering(@QueryParam("id") String id);
|
ListenableFuture<DiskOffering> getDiskOffering(@QueryParam("id") long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see NetworkOfferingClient#listNetworkOfferings
|
* @see NetworkOfferingClient#listNetworkOfferings
|
||||||
|
@ -112,6 +112,6 @@ public interface OfferingAsyncClient {
|
||||||
@Unwrap(depth = 3, edgeCollection = Set.class)
|
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
@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
|
* offering to get
|
||||||
* @return service offering or null if not found
|
* @return service offering or null if not found
|
||||||
*/
|
*/
|
||||||
ServiceOffering getServiceOffering(String id);
|
ServiceOffering getServiceOffering(long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists disk offerings
|
* Lists disk offerings
|
||||||
|
@ -74,7 +74,7 @@ public interface OfferingClient {
|
||||||
* offering to get
|
* offering to get
|
||||||
* @return disk offering or null if not found
|
* @return disk offering or null if not found
|
||||||
*/
|
*/
|
||||||
DiskOffering getDiskOffering(String id);
|
DiskOffering getDiskOffering(long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists service offerings
|
* Lists service offerings
|
||||||
|
@ -92,5 +92,5 @@ public interface OfferingClient {
|
||||||
* offering to get
|
* offering to get
|
||||||
* @return service offering or null if not found
|
* @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)
|
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
@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
|
* template to get
|
||||||
* @return template or null if not found
|
* @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)
|
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
@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
|
* VirtualMachine to get
|
||||||
* @return VirtualMachine or null if not found
|
* @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)
|
@Unwrap(depth = 3, edgeCollection = Set.class)
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
@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
|
* zone to get
|
||||||
* @return zone or null if not found
|
* @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
|
* @param id
|
||||||
* the ID of the disk offering
|
* the ID of the disk offering
|
||||||
*/
|
*/
|
||||||
public ListDiskOfferingsOptions id(String id) {
|
public ListDiskOfferingsOptions id(long id) {
|
||||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,8 +46,8 @@ public class ListDiskOfferingsOptions extends BaseHttpRequestOptions {
|
||||||
* @param domainId
|
* @param domainId
|
||||||
* the ID of the domain associated with the disk offering
|
* the ID of the domain associated with the disk offering
|
||||||
*/
|
*/
|
||||||
public ListDiskOfferingsOptions domainId(String domainId) {
|
public ListDiskOfferingsOptions domainId(long domainId) {
|
||||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ public class ListDiskOfferingsOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListDiskOfferingsOptions#domainId
|
* @see ListDiskOfferingsOptions#domainId
|
||||||
*/
|
*/
|
||||||
public static ListDiskOfferingsOptions domainId(String id) {
|
public static ListDiskOfferingsOptions domainId(long id) {
|
||||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions();
|
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions();
|
||||||
return options.domainId(id);
|
return options.domainId(id);
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ public class ListDiskOfferingsOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListDiskOfferingsOptions#id
|
* @see ListDiskOfferingsOptions#id
|
||||||
*/
|
*/
|
||||||
public static ListDiskOfferingsOptions id(String id) {
|
public static ListDiskOfferingsOptions id(long id) {
|
||||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions();
|
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions();
|
||||||
return options.id(id);
|
return options.id(id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,8 +38,8 @@ public class ListNetworkOfferingsOptions extends BaseHttpRequestOptions {
|
||||||
* @param id
|
* @param id
|
||||||
* the ID of the network offering
|
* the ID of the network offering
|
||||||
*/
|
*/
|
||||||
public ListNetworkOfferingsOptions id(String id) {
|
public ListNetworkOfferingsOptions id(long id) {
|
||||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
this.queryParameters.replaceValues("id", ImmutableSet.of(id+""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ public class ListNetworkOfferingsOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListNetworkOfferingsOptions#id
|
* @see ListNetworkOfferingsOptions#id
|
||||||
*/
|
*/
|
||||||
public static ListNetworkOfferingsOptions id(String id) {
|
public static ListNetworkOfferingsOptions id(long id) {
|
||||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions();
|
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions();
|
||||||
return options.id(id);
|
return options.id(id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,8 +75,8 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
||||||
* @param id
|
* @param id
|
||||||
* list networks by id
|
* list networks by id
|
||||||
*/
|
*/
|
||||||
public ListNetworksOptions id(String id) {
|
public ListNetworksOptions id(long id) {
|
||||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,8 +95,8 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
||||||
* @param domainId
|
* @param domainId
|
||||||
* domain ID of the account owning a VLAN
|
* domain ID of the account owning a VLAN
|
||||||
*/
|
*/
|
||||||
public ListNetworksOptions domainId(String domainId) {
|
public ListNetworksOptions domainId(long domainId) {
|
||||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -105,8 +105,8 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
||||||
* @param zoneId
|
* @param zoneId
|
||||||
* the Zone ID of the network
|
* the Zone ID of the network
|
||||||
*/
|
*/
|
||||||
public ListNetworksOptions zoneId(String zoneId) {
|
public ListNetworksOptions zoneId(long zoneId) {
|
||||||
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId));
|
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListNetworksOptions#domainId
|
* @see ListNetworksOptions#domainId
|
||||||
*/
|
*/
|
||||||
public static ListNetworksOptions domainId(String id) {
|
public static ListNetworksOptions domainId(long id) {
|
||||||
ListNetworksOptions options = new ListNetworksOptions();
|
ListNetworksOptions options = new ListNetworksOptions();
|
||||||
return options.domainId(id);
|
return options.domainId(id);
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListNetworksOptions#id
|
* @see ListNetworksOptions#id
|
||||||
*/
|
*/
|
||||||
public static ListNetworksOptions id(String id) {
|
public static ListNetworksOptions id(long id) {
|
||||||
ListNetworksOptions options = new ListNetworksOptions();
|
ListNetworksOptions options = new ListNetworksOptions();
|
||||||
return options.id(id);
|
return options.id(id);
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ public class ListNetworksOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListNetworksOptions#zoneId
|
* @see ListNetworksOptions#zoneId
|
||||||
*/
|
*/
|
||||||
public static ListNetworksOptions zoneId(String id) {
|
public static ListNetworksOptions zoneId(long id) {
|
||||||
ListNetworksOptions options = new ListNetworksOptions();
|
ListNetworksOptions options = new ListNetworksOptions();
|
||||||
return options.zoneId(id);
|
return options.zoneId(id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,8 @@ public class ListServiceOfferingsOptions extends BaseHttpRequestOptions {
|
||||||
* @param id
|
* @param id
|
||||||
* the ID of the service offering
|
* the ID of the service offering
|
||||||
*/
|
*/
|
||||||
public ListServiceOfferingsOptions id(String id) {
|
public ListServiceOfferingsOptions id(long id) {
|
||||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,8 +46,8 @@ public class ListServiceOfferingsOptions extends BaseHttpRequestOptions {
|
||||||
* @param domainId
|
* @param domainId
|
||||||
* the ID of the domain associated with the service offering
|
* the ID of the domain associated with the service offering
|
||||||
*/
|
*/
|
||||||
public ListServiceOfferingsOptions domainId(String domainId) {
|
public ListServiceOfferingsOptions domainId(long domainId) {
|
||||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + ""));
|
||||||
return this;
|
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
|
* 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.
|
* offering that a virtual machine can be changed to.
|
||||||
*/
|
*/
|
||||||
public ListServiceOfferingsOptions virtualMachineId(String virtualMachineId) {
|
public ListServiceOfferingsOptions virtualMachineId(long virtualMachineId) {
|
||||||
this.queryParameters.replaceValues("virtualmachineid", ImmutableSet.of(virtualMachineId));
|
this.queryParameters.replaceValues("virtualmachineid", ImmutableSet.of(virtualMachineId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ public class ListServiceOfferingsOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListServiceOfferingsOptions#domainId
|
* @see ListServiceOfferingsOptions#domainId
|
||||||
*/
|
*/
|
||||||
public static ListServiceOfferingsOptions domainId(String id) {
|
public static ListServiceOfferingsOptions domainId(long id) {
|
||||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions();
|
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions();
|
||||||
return options.domainId(id);
|
return options.domainId(id);
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ public class ListServiceOfferingsOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListServiceOfferingsOptions#id
|
* @see ListServiceOfferingsOptions#id
|
||||||
*/
|
*/
|
||||||
public static ListServiceOfferingsOptions id(String id) {
|
public static ListServiceOfferingsOptions id(long id) {
|
||||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions();
|
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions();
|
||||||
return options.id(id);
|
return options.id(id);
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ public class ListServiceOfferingsOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListServiceOfferingsOptions#virtualMachineId
|
* @see ListServiceOfferingsOptions#virtualMachineId
|
||||||
*/
|
*/
|
||||||
public static ListServiceOfferingsOptions virtualMachineId(String virtualMachineId) {
|
public static ListServiceOfferingsOptions virtualMachineId(long virtualMachineId) {
|
||||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions();
|
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions();
|
||||||
return options.virtualMachineId(virtualMachineId);
|
return options.virtualMachineId(virtualMachineId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,8 +50,8 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
||||||
* @param id
|
* @param id
|
||||||
* the template ID
|
* the template ID
|
||||||
*/
|
*/
|
||||||
public ListTemplatesOptions id(String id) {
|
public ListTemplatesOptions id(long id) {
|
||||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
||||||
* @param domain
|
* @param domain
|
||||||
* domain id
|
* domain id
|
||||||
*/
|
*/
|
||||||
public ListTemplatesOptions accountInDomain(String account, String domain) {
|
public ListTemplatesOptions accountInDomain(long account, long domain) {
|
||||||
this.queryParameters.replaceValues("account", ImmutableSet.of(account));
|
this.queryParameters.replaceValues("account", ImmutableSet.of(account + ""));
|
||||||
return domainId(domain);
|
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
|
* list all templates in specified domain. If used with the account parameter, lists
|
||||||
* all templates for an account in the specified domain.
|
* all templates for an account in the specified domain.
|
||||||
*/
|
*/
|
||||||
public ListTemplatesOptions domainId(String domainId) {
|
public ListTemplatesOptions domainId(long domainId) {
|
||||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -91,8 +91,8 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
||||||
* @param zoneId
|
* @param zoneId
|
||||||
* list templates by zoneId.
|
* list templates by zoneId.
|
||||||
*/
|
*/
|
||||||
public ListTemplatesOptions zoneId(String zoneId) {
|
public ListTemplatesOptions zoneId(long zoneId) {
|
||||||
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId));
|
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -119,7 +119,7 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListTemplatesOptions#domainId
|
* @see ListTemplatesOptions#domainId
|
||||||
*/
|
*/
|
||||||
public static ListTemplatesOptions domainId(String id) {
|
public static ListTemplatesOptions domainId(long id) {
|
||||||
ListTemplatesOptions options = new ListTemplatesOptions();
|
ListTemplatesOptions options = new ListTemplatesOptions();
|
||||||
return options.domainId(id);
|
return options.domainId(id);
|
||||||
}
|
}
|
||||||
|
@ -127,7 +127,7 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListTemplatesOptions#accountInDomain
|
* @see ListTemplatesOptions#accountInDomain
|
||||||
*/
|
*/
|
||||||
public static ListTemplatesOptions accountInDomain(String account, String domain) {
|
public static ListTemplatesOptions accountInDomain(long account, long domain) {
|
||||||
ListTemplatesOptions options = new ListTemplatesOptions();
|
ListTemplatesOptions options = new ListTemplatesOptions();
|
||||||
return options.accountInDomain(account, domain);
|
return options.accountInDomain(account, domain);
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListTemplatesOptions#id
|
* @see ListTemplatesOptions#id
|
||||||
*/
|
*/
|
||||||
public static ListTemplatesOptions id(String id) {
|
public static ListTemplatesOptions id(long id) {
|
||||||
ListTemplatesOptions options = new ListTemplatesOptions();
|
ListTemplatesOptions options = new ListTemplatesOptions();
|
||||||
return options.id(id);
|
return options.id(id);
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ public class ListTemplatesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListTemplatesOptions#zoneId
|
* @see ListTemplatesOptions#zoneId
|
||||||
*/
|
*/
|
||||||
public static ListTemplatesOptions zoneId(String id) {
|
public static ListTemplatesOptions zoneId(long id) {
|
||||||
ListTemplatesOptions options = new ListTemplatesOptions();
|
ListTemplatesOptions options = new ListTemplatesOptions();
|
||||||
return options.zoneId(id);
|
return options.zoneId(id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
* @param id
|
* @param id
|
||||||
* the ID of the virtual machine
|
* the ID of the virtual machine
|
||||||
*/
|
*/
|
||||||
public ListVirtualMachinesOptions id(String id) {
|
public ListVirtualMachinesOptions id(long id) {
|
||||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
this.queryParameters.replaceValues("id", ImmutableSet.of(id + ""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,8 +64,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
* @param domainId
|
* @param domainId
|
||||||
* the ID of the domain associated with the virtual machine
|
* the ID of the domain associated with the virtual machine
|
||||||
*/
|
*/
|
||||||
public ListVirtualMachinesOptions domainId(String domainId) {
|
public ListVirtualMachinesOptions domainId(long domainId) {
|
||||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -77,8 +77,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
* @param domain
|
* @param domain
|
||||||
* domain id
|
* domain id
|
||||||
*/
|
*/
|
||||||
public ListVirtualMachinesOptions accountInDomain(String account, String domain) {
|
public ListVirtualMachinesOptions accountInDomain(long account, long domain) {
|
||||||
this.queryParameters.replaceValues("account", ImmutableSet.of(account));
|
this.queryParameters.replaceValues("account", ImmutableSet.of(account + ""));
|
||||||
return domainId(domain);
|
return domainId(domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,8 +86,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
* @param groupId
|
* @param groupId
|
||||||
* list virtual machines by groupId.
|
* list virtual machines by groupId.
|
||||||
*/
|
*/
|
||||||
public ListVirtualMachinesOptions groupId(String groupId) {
|
public ListVirtualMachinesOptions groupId(long groupId) {
|
||||||
this.queryParameters.replaceValues("groupid", ImmutableSet.of(groupId));
|
this.queryParameters.replaceValues("groupid", ImmutableSet.of(groupId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -96,8 +96,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
* @param hostId
|
* @param hostId
|
||||||
* list virtual machines by hostId.
|
* list virtual machines by hostId.
|
||||||
*/
|
*/
|
||||||
public ListVirtualMachinesOptions hostId(String hostId) {
|
public ListVirtualMachinesOptions hostId(long hostId) {
|
||||||
this.queryParameters.replaceValues("hostid", ImmutableSet.of(hostId));
|
this.queryParameters.replaceValues("hostid", ImmutableSet.of(hostId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -106,8 +106,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
* @param networkId
|
* @param networkId
|
||||||
* list virtual machines by networkId.
|
* list virtual machines by networkId.
|
||||||
*/
|
*/
|
||||||
public ListVirtualMachinesOptions networkId(String networkId) {
|
public ListVirtualMachinesOptions networkId(long networkId) {
|
||||||
this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId));
|
this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -116,8 +116,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
* @param podId
|
* @param podId
|
||||||
* list virtual machines by podId.
|
* list virtual machines by podId.
|
||||||
*/
|
*/
|
||||||
public ListVirtualMachinesOptions podId(String podId) {
|
public ListVirtualMachinesOptions podId(long podId) {
|
||||||
this.queryParameters.replaceValues("podid", ImmutableSet.of(podId));
|
this.queryParameters.replaceValues("podid", ImmutableSet.of(podId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -126,8 +126,8 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
* @param zoneId
|
* @param zoneId
|
||||||
* list virtual machines by zoneId.
|
* list virtual machines by zoneId.
|
||||||
*/
|
*/
|
||||||
public ListVirtualMachinesOptions zoneId(String zoneId) {
|
public ListVirtualMachinesOptions zoneId(long zoneId) {
|
||||||
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId));
|
this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + ""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListVirtualMachinesOptions#accountInDomain
|
* @see ListVirtualMachinesOptions#accountInDomain
|
||||||
*/
|
*/
|
||||||
public static ListVirtualMachinesOptions accountInDomain(String account, String domain) {
|
public static ListVirtualMachinesOptions accountInDomain(long account, long domain) {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||||
return options.accountInDomain(account, domain);
|
return options.accountInDomain(account, domain);
|
||||||
}
|
}
|
||||||
|
@ -155,7 +155,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListVirtualMachinesOptions#domainId
|
* @see ListVirtualMachinesOptions#domainId
|
||||||
*/
|
*/
|
||||||
public static ListVirtualMachinesOptions domainId(String id) {
|
public static ListVirtualMachinesOptions domainId(long id) {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||||
return options.domainId(id);
|
return options.domainId(id);
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListVirtualMachinesOptions#id
|
* @see ListVirtualMachinesOptions#id
|
||||||
*/
|
*/
|
||||||
public static ListVirtualMachinesOptions id(String id) {
|
public static ListVirtualMachinesOptions id(long id) {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||||
return options.id(id);
|
return options.id(id);
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListVirtualMachinesOptions#groupId
|
* @see ListVirtualMachinesOptions#groupId
|
||||||
*/
|
*/
|
||||||
public static ListVirtualMachinesOptions groupId(String id) {
|
public static ListVirtualMachinesOptions groupId(long id) {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||||
return options.groupId(id);
|
return options.groupId(id);
|
||||||
}
|
}
|
||||||
|
@ -195,7 +195,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListVirtualMachinesOptions#hostId
|
* @see ListVirtualMachinesOptions#hostId
|
||||||
*/
|
*/
|
||||||
public static ListVirtualMachinesOptions hostId(String id) {
|
public static ListVirtualMachinesOptions hostId(long id) {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||||
return options.hostId(id);
|
return options.hostId(id);
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListVirtualMachinesOptions#networkId
|
* @see ListVirtualMachinesOptions#networkId
|
||||||
*/
|
*/
|
||||||
public static ListVirtualMachinesOptions networkId(String id) {
|
public static ListVirtualMachinesOptions networkId(long id) {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||||
return options.networkId(id);
|
return options.networkId(id);
|
||||||
}
|
}
|
||||||
|
@ -211,7 +211,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListVirtualMachinesOptions#podId
|
* @see ListVirtualMachinesOptions#podId
|
||||||
*/
|
*/
|
||||||
public static ListVirtualMachinesOptions podId(String id) {
|
public static ListVirtualMachinesOptions podId(long id) {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||||
return options.podId(id);
|
return options.podId(id);
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,7 @@ public class ListVirtualMachinesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListVirtualMachinesOptions#zoneId
|
* @see ListVirtualMachinesOptions#zoneId
|
||||||
*/
|
*/
|
||||||
public static ListVirtualMachinesOptions zoneId(String id) {
|
public static ListVirtualMachinesOptions zoneId(long id) {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions();
|
||||||
return options.zoneId(id);
|
return options.zoneId(id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,8 @@ public class ListZonesOptions extends BaseHttpRequestOptions {
|
||||||
* @param id
|
* @param id
|
||||||
* the ID of the zone
|
* the ID of the zone
|
||||||
*/
|
*/
|
||||||
public ListZonesOptions id(String id) {
|
public ListZonesOptions id(long id) {
|
||||||
this.queryParameters.replaceValues("id", ImmutableSet.of(id));
|
this.queryParameters.replaceValues("id", ImmutableSet.of(id+""));
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,8 +46,8 @@ public class ListZonesOptions extends BaseHttpRequestOptions {
|
||||||
* @param domainId
|
* @param domainId
|
||||||
* the ID of the domain associated with the zone
|
* the ID of the domain associated with the zone
|
||||||
*/
|
*/
|
||||||
public ListZonesOptions domainId(String domainId) {
|
public ListZonesOptions domainId(long domainId) {
|
||||||
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId));
|
this.queryParameters.replaceValues("domainid", ImmutableSet.of(domainId+""));
|
||||||
return this;
|
return this;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ public class ListZonesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListZonesOptions#domainId
|
* @see ListZonesOptions#domainId
|
||||||
*/
|
*/
|
||||||
public static ListZonesOptions domainId(String id) {
|
public static ListZonesOptions domainId(long id) {
|
||||||
ListZonesOptions options = new ListZonesOptions();
|
ListZonesOptions options = new ListZonesOptions();
|
||||||
return options.domainId(id);
|
return options.domainId(id);
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ public class ListZonesOptions extends BaseHttpRequestOptions {
|
||||||
/**
|
/**
|
||||||
* @see ListZonesOptions#id
|
* @see ListZonesOptions#id
|
||||||
*/
|
*/
|
||||||
public static ListZonesOptions id(String id) {
|
public static ListZonesOptions id(long id) {
|
||||||
ListZonesOptions options = new ListZonesOptions();
|
ListZonesOptions options = new ListZonesOptions();
|
||||||
return options.id(id);
|
return options.id(id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class NetworkAsyncClientTest extends BaseCloudStackAsyncClientTest<Networ
|
||||||
HttpRequest httpRequest = processor.createRequest(method);
|
HttpRequest httpRequest = processor.createRequest(method);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -61,11 +61,11 @@ public class NetworkAsyncClientTest extends BaseCloudStackAsyncClientTest<Networ
|
||||||
|
|
||||||
public void testListNetworksOptions() throws SecurityException, NoSuchMethodException, IOException {
|
public void testListNetworksOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = NetworkAsyncClient.class.getMethod("listNetworks", ListNetworksOptions[].class);
|
Method method = NetworkAsyncClient.class.getMethod("listNetworks", ListNetworksOptions[].class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, ListNetworksOptions.Builder.type(NetworkType.ADVANCED).domainId(
|
HttpRequest httpRequest = processor.createRequest(method, ListNetworksOptions.Builder.type(NetworkType.ADVANCED)
|
||||||
"domainId").id("id"));
|
.domainId(6).id(5));
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -78,11 +78,11 @@ public class NetworkAsyncClientTest extends BaseCloudStackAsyncClientTest<Networ
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetNetwork() throws SecurityException, NoSuchMethodException, IOException {
|
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");
|
HttpRequest httpRequest = processor.createRequest(method, "id");
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class NetworkClientLiveTest extends BaseCloudStackClientLiveTest {
|
||||||
ListNetworksOptions.Builder.id(network.getId())));
|
ListNetworksOptions.Builder.id(network.getId())));
|
||||||
assertEquals(network, newDetails);
|
assertEquals(network, newDetails);
|
||||||
assertEquals(network, client.getNetworkClient().getNetwork(network.getId()));
|
assertEquals(network, client.getNetworkClient().getNetwork(network.getId()));
|
||||||
assert network.getId() != null : network;
|
assert network.getId() > 0 : network;
|
||||||
assert network.getName() != null : network;
|
assert network.getName() != null : network;
|
||||||
assert network.getDNS().size() != 0 : network;
|
assert network.getDNS().size() != 0 : network;
|
||||||
assert network.getGuestIPType() != null && network.getGuestIPType() != GuestIPType.UNRECOGNIZED : 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.getNetworkDomain() != null : network;
|
||||||
assert network.getNetworkOfferingAvailability() != null : network;
|
assert network.getNetworkOfferingAvailability() != null : network;
|
||||||
assert network.getNetworkOfferingDisplayText() != null : network;
|
assert network.getNetworkOfferingDisplayText() != null : network;
|
||||||
assert network.getNetworkOfferingId() != null : network;
|
assert network.getNetworkOfferingId() > 0 : network;
|
||||||
assert network.getNetworkOfferingName() != null : network;
|
assert network.getNetworkOfferingName() != null : network;
|
||||||
assert network.getRelated() != null : network;
|
assert network.getRelated() != null : network;
|
||||||
assert network.getServices().size() != 0 : network;
|
assert network.getServices().size() != 0 : network;
|
||||||
assert network.getState() != null : network;
|
assert network.getState() != null : network;
|
||||||
assert network.getTrafficType() != null : network;
|
assert network.getTrafficType() != null : network;
|
||||||
assert network.getZoneId() != null : network;
|
assert network.getZoneId() > 0 : network;
|
||||||
assert network.getDomain() != null : network;
|
assert network.getDomain() != null : network;
|
||||||
assert network.getDomainId() != null : network;
|
assert network.getDomainId() > 0 : network;
|
||||||
switch (network.getGuestIPType()) {
|
switch (network.getGuestIPType()) {
|
||||||
case VIRTUAL:
|
case VIRTUAL:
|
||||||
assert network.getNetmask() == null : network;
|
assert network.getNetmask() == null : network;
|
||||||
|
|
|
@ -48,7 +48,7 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
||||||
HttpRequest httpRequest = processor.createRequest(method);
|
HttpRequest httpRequest = processor.createRequest(method);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -62,11 +62,10 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
||||||
|
|
||||||
public void testListDiskOfferingsOptions() throws SecurityException, NoSuchMethodException, IOException {
|
public void testListDiskOfferingsOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = OfferingAsyncClient.class.getMethod("listDiskOfferings", ListDiskOfferingsOptions[].class);
|
Method method = OfferingAsyncClient.class.getMethod("listDiskOfferings", ListDiskOfferingsOptions[].class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, ListDiskOfferingsOptions.Builder.domainId("domainId")
|
HttpRequest httpRequest = processor.createRequest(method, ListDiskOfferingsOptions.Builder.domainId(6).id(5));
|
||||||
.id("id"));
|
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -79,11 +78,11 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetDiskOffering() throws SecurityException, NoSuchMethodException, IOException {
|
public void testGetDiskOffering() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = OfferingAsyncClient.class.getMethod("getDiskOffering", String.class);
|
Method method = OfferingAsyncClient.class.getMethod("getDiskOffering", long.class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
HttpRequest httpRequest = processor.createRequest(method, 5);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -100,7 +99,7 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
||||||
HttpRequest httpRequest = processor.createRequest(method);
|
HttpRequest httpRequest = processor.createRequest(method);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -114,12 +113,12 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
||||||
|
|
||||||
public void testListNetworkOfferingsOptions() throws SecurityException, NoSuchMethodException, IOException {
|
public void testListNetworkOfferingsOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = OfferingAsyncClient.class.getMethod("listNetworkOfferings", ListNetworkOfferingsOptions[].class);
|
Method method = OfferingAsyncClient.class.getMethod("listNetworkOfferings", ListNetworkOfferingsOptions[].class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, ListNetworkOfferingsOptions.Builder.availability(
|
HttpRequest httpRequest = processor.createRequest(method,
|
||||||
"Default").isShared(true).id("id"));
|
ListNetworkOfferingsOptions.Builder.availability("Default").isShared(true).id(6));
|
||||||
|
|
||||||
assertRequestLineEquals(
|
assertRequestLineEquals(
|
||||||
httpRequest,
|
httpRequest,
|
||||||
"GET http://localhost:8080/client/api?response=json&command=listNetworkOfferings&availability=Default&isshared=true&id=id HTTP/1.1");
|
"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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -132,11 +131,11 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetNetworkOffering() throws SecurityException, NoSuchMethodException, IOException {
|
public void testGetNetworkOffering() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = OfferingAsyncClient.class.getMethod("getNetworkOffering", String.class);
|
Method method = OfferingAsyncClient.class.getMethod("getNetworkOffering", long.class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
HttpRequest httpRequest = processor.createRequest(method, 5);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -153,7 +152,7 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
||||||
HttpRequest httpRequest = processor.createRequest(method);
|
HttpRequest httpRequest = processor.createRequest(method);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -167,12 +166,12 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
||||||
|
|
||||||
public void testListServiceOfferingsOptions() throws SecurityException, NoSuchMethodException, IOException {
|
public void testListServiceOfferingsOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = OfferingAsyncClient.class.getMethod("listServiceOfferings", ListServiceOfferingsOptions[].class);
|
Method method = OfferingAsyncClient.class.getMethod("listServiceOfferings", ListServiceOfferingsOptions[].class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, ListServiceOfferingsOptions.Builder.virtualMachineId(
|
HttpRequest httpRequest = processor.createRequest(method, ListServiceOfferingsOptions.Builder.virtualMachineId(4)
|
||||||
"vmId").domainId("domainId").id("id"));
|
.domainId(5).id(6));
|
||||||
|
|
||||||
assertRequestLineEquals(
|
assertRequestLineEquals(
|
||||||
httpRequest,
|
httpRequest,
|
||||||
"GET http://localhost:8080/client/api?response=json&command=listServiceOfferings&virtualmachineid=vmId&domainid=domainId&id=id HTTP/1.1");
|
"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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -185,11 +184,11 @@ public class OfferingAsyncClientTest extends BaseCloudStackAsyncClientTest<Offer
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetServiceOffering() throws SecurityException, NoSuchMethodException, IOException {
|
public void testGetServiceOffering() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = OfferingAsyncClient.class.getMethod("getServiceOffering", String.class);
|
Method method = OfferingAsyncClient.class.getMethod("getServiceOffering", long.class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
HttpRequest httpRequest = processor.createRequest(method, 5);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class OfferingClientLiveTest extends BaseCloudStackClientLiveTest {
|
||||||
ListDiskOfferingsOptions.Builder.id(offering.getId())));
|
ListDiskOfferingsOptions.Builder.id(offering.getId())));
|
||||||
assertEquals(offering, newDetails);
|
assertEquals(offering, newDetails);
|
||||||
assertEquals(offering, client.getOfferingClient().getDiskOffering(offering.getId()));
|
assertEquals(offering, client.getOfferingClient().getDiskOffering(offering.getId()));
|
||||||
assert offering.getId() != null : offering;
|
assert offering.getId() > 0 : offering;
|
||||||
assert offering.getName() != null : offering;
|
assert offering.getName() != null : offering;
|
||||||
assert offering.getCreated() != null : offering;
|
assert offering.getCreated() != null : offering;
|
||||||
assert offering.getDisplayText() != null : offering;
|
assert offering.getDisplayText() != null : offering;
|
||||||
|
@ -73,7 +73,7 @@ public class OfferingClientLiveTest extends BaseCloudStackClientLiveTest {
|
||||||
ListServiceOfferingsOptions.Builder.id(offering.getId())));
|
ListServiceOfferingsOptions.Builder.id(offering.getId())));
|
||||||
assertEquals(offering, newDetails);
|
assertEquals(offering, newDetails);
|
||||||
assertEquals(offering, client.getOfferingClient().getServiceOffering(offering.getId()));
|
assertEquals(offering, client.getOfferingClient().getServiceOffering(offering.getId()));
|
||||||
assert offering.getId() != null : offering;
|
assert offering.getId() > 0 : offering;
|
||||||
assert offering.getName() != null : offering;
|
assert offering.getName() != null : offering;
|
||||||
assert offering.getCreated() != null : offering;
|
assert offering.getCreated() != null : offering;
|
||||||
assert offering.getDisplayText() != null : offering;
|
assert offering.getDisplayText() != null : offering;
|
||||||
|
@ -95,7 +95,7 @@ public class OfferingClientLiveTest extends BaseCloudStackClientLiveTest {
|
||||||
ListNetworkOfferingsOptions.Builder.id(offering.getId())));
|
ListNetworkOfferingsOptions.Builder.id(offering.getId())));
|
||||||
assertEquals(offering, newDetails);
|
assertEquals(offering, newDetails);
|
||||||
assertEquals(offering, client.getOfferingClient().getNetworkOffering(offering.getId()));
|
assertEquals(offering, client.getOfferingClient().getNetworkOffering(offering.getId()));
|
||||||
assert offering.getId() != null : offering;
|
assert offering.getId() > 0 : offering;
|
||||||
assert offering.getName() != null : offering;
|
assert offering.getName() != null : offering;
|
||||||
assert offering.getDisplayText() != null : offering;
|
assert offering.getDisplayText() != null : offering;
|
||||||
assert offering.getMaxConnections() == null || offering.getMaxConnections() > 0 : offering;
|
assert offering.getMaxConnections() == null || offering.getMaxConnections() > 0 : offering;
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class TemplateAsyncClientTest extends BaseCloudStackAsyncClientTest<Templ
|
||||||
HttpRequest httpRequest = processor.createRequest(method);
|
HttpRequest httpRequest = processor.createRequest(method);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -61,12 +61,12 @@ public class TemplateAsyncClientTest extends BaseCloudStackAsyncClientTest<Templ
|
||||||
|
|
||||||
public void testListTemplatesOptions() throws SecurityException, NoSuchMethodException, IOException {
|
public void testListTemplatesOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = TemplateAsyncClient.class.getMethod("listTemplates", ListTemplatesOptions.class);
|
Method method = TemplateAsyncClient.class.getMethod("listTemplates", ListTemplatesOptions.class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, ListTemplatesOptions.Builder.accountInDomain(
|
HttpRequest httpRequest = processor.createRequest(method, ListTemplatesOptions.Builder.accountInDomain(5, 6)
|
||||||
"accountId", "domainId").hypervisor("xen").filter(TemplateFilter.FEATURED));
|
.hypervisor("xen").filter(TemplateFilter.FEATURED));
|
||||||
|
|
||||||
assertRequestLineEquals(
|
assertRequestLineEquals(
|
||||||
httpRequest,
|
httpRequest,
|
||||||
"GET http://localhost:8080/client/api?response=json&command=listTemplates&account=accountId&domainid=domainId&hypervisor=xen&templatefilter=featured HTTP/1.1");
|
"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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -79,11 +79,11 @@ public class TemplateAsyncClientTest extends BaseCloudStackAsyncClientTest<Templ
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetTemplate() throws SecurityException, NoSuchMethodException, IOException {
|
public void testGetTemplate() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = TemplateAsyncClient.class.getMethod("getTemplate", String.class);
|
Method method = TemplateAsyncClient.class.getMethod("getTemplate", long.class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
HttpRequest httpRequest = processor.createRequest(method, 5);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
|
|
@ -48,21 +48,21 @@ public class TemplateClientLiveTest extends BaseCloudStackClientLiveTest {
|
||||||
ListTemplatesOptions.Builder.id(template.getId())));
|
ListTemplatesOptions.Builder.id(template.getId())));
|
||||||
assertEquals(template, newDetails);
|
assertEquals(template, newDetails);
|
||||||
assertEquals(template, client.getTemplateClient().getTemplate(template.getId()));
|
assertEquals(template, client.getTemplateClient().getTemplate(template.getId()));
|
||||||
assert template.getId() != null : template;
|
assert template.getId() > 0 : template;
|
||||||
assert template.getName() != null : template;
|
assert template.getName() != null : template;
|
||||||
assert template.getDisplayText() != null : template;
|
assert template.getDisplayText() != null : template;
|
||||||
assert template.getCreated() != null : template;
|
assert template.getCreated() != null : template;
|
||||||
assert template.getFormat() != null && template.getFormat() != Template.Format.UNRECOGNIZED : template;
|
assert template.getFormat() != null && template.getFormat() != Template.Format.UNRECOGNIZED : template;
|
||||||
assert template.getOSType() != null : template;
|
assert template.getOSType() != null : template;
|
||||||
assert template.getOSTypeId() != null : template;
|
assert template.getOSTypeId() > 0 : template;
|
||||||
assert template.getAccount() != null : template;
|
assert template.getAccount() != null : template;
|
||||||
assert template.getZone() != null : template;
|
assert template.getZone() != null : template;
|
||||||
assert template.getZoneId() != null : template;
|
assert template.getZoneId() > 0 : template;
|
||||||
assert template.getStatus() == null : template;
|
assert template.getStatus() == null : template;
|
||||||
assert template.getType() != null && template.getType() != Template.Type.UNRECOGNIZED : template;
|
assert template.getType() != null && template.getType() != Template.Type.UNRECOGNIZED : template;
|
||||||
assert template.getHypervisor() != null : template;
|
assert template.getHypervisor() != null : template;
|
||||||
assert template.getDomain() != 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",
|
Method method = VirtualMachineAsyncClient.class.getMethod("listVirtualMachines",
|
||||||
ListVirtualMachinesOptions[].class);
|
ListVirtualMachinesOptions[].class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method,
|
HttpRequest httpRequest = processor.createRequest(method,
|
||||||
ListVirtualMachinesOptions.Builder.accountInDomain("accountId", "domainId").usesVirtualNetwork(true));
|
ListVirtualMachinesOptions.Builder.accountInDomain(5, 6).usesVirtualNetwork(true));
|
||||||
|
|
||||||
assertRequestLineEquals(
|
assertRequestLineEquals(
|
||||||
httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -80,11 +80,11 @@ public class VirtualMachineAsyncClientTest extends BaseCloudStackAsyncClientTest
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetVirtualMachine() throws SecurityException, NoSuchMethodException, IOException {
|
public void testGetVirtualMachine() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = VirtualMachineAsyncClient.class.getMethod("getVirtualMachine", String.class);
|
Method method = VirtualMachineAsyncClient.class.getMethod("getVirtualMachine", long.class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
HttpRequest httpRequest = processor.createRequest(method, 5);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
|
|
@ -49,33 +49,33 @@ public class VirtualMachineClientLiveTest extends BaseCloudStackClientLiveTest {
|
||||||
ListVirtualMachinesOptions.Builder.id(vm.getId())));
|
ListVirtualMachinesOptions.Builder.id(vm.getId())));
|
||||||
assertEquals(vm, newDetails);
|
assertEquals(vm, newDetails);
|
||||||
assertEquals(vm, client.getVirtualMachineClient().getVirtualMachine(vm.getId()));
|
assertEquals(vm, client.getVirtualMachineClient().getVirtualMachine(vm.getId()));
|
||||||
assert vm.getId() != null : vm;
|
assert vm.getId() > 0 : vm;
|
||||||
assert vm.getName() != null : vm;
|
assert vm.getName() != null : vm;
|
||||||
assert vm.getDisplayName() != null : vm;
|
assert vm.getDisplayName() != null : vm;
|
||||||
assert vm.getAccount() != null : vm;
|
assert vm.getAccount() != null : vm;
|
||||||
assert vm.getDomain() != null : vm;
|
assert vm.getDomain() != null : vm;
|
||||||
assert vm.getDomainId() != null : vm;
|
assert vm.getDomainId() > 0 : vm;
|
||||||
assert vm.getCreated() != null : vm;
|
assert vm.getCreated() != null : vm;
|
||||||
assert vm.getState() != null : vm;
|
assert vm.getState() != null : vm;
|
||||||
assert vm.getZoneId() != null : vm;
|
assert vm.getZoneId() > 0 : vm;
|
||||||
assert vm.getZoneName() != null : vm;
|
assert vm.getZoneName() != null : vm;
|
||||||
assert vm.getTemplateId() != null : vm;
|
assert vm.getTemplateId() > 0 : vm;
|
||||||
assert vm.getTemplateName() != null : vm;
|
assert vm.getTemplateName() != null : vm;
|
||||||
assert vm.getTemplateDisplayText() != null : vm;
|
assert vm.getTemplateDisplayText() != null : vm;
|
||||||
assert vm.getServiceOfferingId() != null : vm;
|
assert vm.getServiceOfferingId() > 0 : vm;
|
||||||
assert vm.getServiceOfferingName() != null : vm;
|
assert vm.getServiceOfferingName() != null : vm;
|
||||||
assert vm.getCpuCount() > 0 : vm;
|
assert vm.getCpuCount() > 0 : vm;
|
||||||
assert vm.getCpuSpeed() > 0 : vm;
|
assert vm.getCpuSpeed() > 0 : vm;
|
||||||
assert vm.getMemory() > 0 : vm;
|
assert vm.getMemory() > 0 : vm;
|
||||||
assert vm.getGuestOSId() != null : vm;
|
assert vm.getGuestOSId() > 0 : vm;
|
||||||
assert vm.getRootDeviceId() != null : vm;
|
assert vm.getRootDeviceId() >= 0 : vm;
|
||||||
assert vm.getRootDeviceType() != null : vm;
|
assert vm.getRootDeviceType() != null : vm;
|
||||||
if (vm.getJobId() != null)
|
if (vm.getJobId() != null)
|
||||||
assert vm.getJobStatus() != null : vm;
|
assert vm.getJobStatus() != null : vm;
|
||||||
assert vm.getNICs() != null && vm.getNICs().size() > 0 : vm;
|
assert vm.getNICs() != null && vm.getNICs().size() > 0 : vm;
|
||||||
for (NIC nic : vm.getNICs()) {
|
for (NIC nic : vm.getNICs()) {
|
||||||
assert nic.getId() != null : vm;
|
assert nic.getId() > 0 : vm;
|
||||||
assert nic.getNetworkId() != null : vm;
|
assert nic.getNetworkId() > 0 : vm;
|
||||||
assert nic.getNetmask() != null : vm;
|
assert nic.getNetmask() != null : vm;
|
||||||
assert nic.getGateway() != null : vm;
|
assert nic.getGateway() != null : vm;
|
||||||
assert nic.getIPAddress() != null : vm;
|
assert nic.getIPAddress() != null : vm;
|
||||||
|
|
|
@ -47,7 +47,7 @@ public class ZoneAsyncClientTest extends BaseCloudStackAsyncClientTest<ZoneAsync
|
||||||
HttpRequest httpRequest = processor.createRequest(method);
|
HttpRequest httpRequest = processor.createRequest(method);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -56,8 +56,8 @@ public class ZoneAsyncClientTest extends BaseCloudStackAsyncClientTest<ZoneAsync
|
||||||
httpRequest = Iterables.getOnlyElement(httpRequest.getFilters()).filter(httpRequest);
|
httpRequest = Iterables.getOnlyElement(httpRequest.getFilters()).filter(httpRequest);
|
||||||
|
|
||||||
assertRequestLineEquals(
|
assertRequestLineEquals(
|
||||||
httpRequest,
|
httpRequest,
|
||||||
"GET http://localhost:8080/client/api?response=json&command=listZones&apiKey=apiKey&signature=hNz838u4Z1ofz9vRaqYo9GDv1Io%3D HTTP/1.1");
|
"GET http://localhost:8080/client/api?response=json&command=listZones&apiKey=apiKey&signature=hNz838u4Z1ofz9vRaqYo9GDv1Io%3D HTTP/1.1");
|
||||||
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -71,11 +71,11 @@ public class ZoneAsyncClientTest extends BaseCloudStackAsyncClientTest<ZoneAsync
|
||||||
|
|
||||||
public void testListZonesOptions() throws SecurityException, NoSuchMethodException, IOException {
|
public void testListZonesOptions() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = ZoneAsyncClient.class.getMethod("listZones", ListZonesOptions[].class);
|
Method method = ZoneAsyncClient.class.getMethod("listZones", ListZonesOptions[].class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, ListZonesOptions.Builder.available(true).domainId(
|
HttpRequest httpRequest = processor.createRequest(method, ListZonesOptions.Builder.available(true).domainId(5)
|
||||||
"domainId").id("id"));
|
.id(6));
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
@ -88,11 +88,11 @@ public class ZoneAsyncClientTest extends BaseCloudStackAsyncClientTest<ZoneAsync
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGetZone() throws SecurityException, NoSuchMethodException, IOException {
|
public void testGetZone() throws SecurityException, NoSuchMethodException, IOException {
|
||||||
Method method = ZoneAsyncClient.class.getMethod("getZone", String.class);
|
Method method = ZoneAsyncClient.class.getMethod("getZone", long.class);
|
||||||
HttpRequest httpRequest = processor.createRequest(method, "id");
|
HttpRequest httpRequest = processor.createRequest(method, 6);
|
||||||
|
|
||||||
assertRequestLineEquals(httpRequest,
|
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");
|
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
|
||||||
assertPayloadEquals(httpRequest, null, null, false);
|
assertPayloadEquals(httpRequest, null, null, false);
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class ZoneClientLiveTest extends BaseCloudStackClientLiveTest {
|
||||||
ListZonesOptions.Builder.id(zone.getId())));
|
ListZonesOptions.Builder.id(zone.getId())));
|
||||||
assertEquals(zone, newDetails);
|
assertEquals(zone, newDetails);
|
||||||
assertEquals(zone, client.getZoneClient().getZone(zone.getId()));
|
assertEquals(zone, client.getZoneClient().getZone(zone.getId()));
|
||||||
assert zone.getId() != null : zone;
|
assert zone.getId() > 0 : zone;
|
||||||
assert zone.getName() != null : zone;
|
assert zone.getName() != null : zone;
|
||||||
assert zone.getNetworkType() != null && zone.getNetworkType() != NetworkType.UNRECOGNIZED : zone;
|
assert zone.getNetworkType() != null && zone.getNetworkType() != NetworkType.UNRECOGNIZED : zone;
|
||||||
switch (zone.getNetworkType()) {
|
switch (zone.getNetworkType()) {
|
||||||
|
@ -65,7 +65,7 @@ public class ZoneClientLiveTest extends BaseCloudStackClientLiveTest {
|
||||||
assert zone.getDNS().size() != 0 : zone;
|
assert zone.getDNS().size() != 0 : zone;
|
||||||
assert zone.getInternalDNS().size() != 0 : zone;
|
assert zone.getInternalDNS().size() != 0 : zone;
|
||||||
assert zone.getDomain() != null : zone;
|
assert zone.getDomain() != null : zone;
|
||||||
assert zone.getDomainId() != null : zone;
|
assert zone.getDomainId() > 0 : zone;
|
||||||
assert zone.getGuestCIDRAddress() == null : zone;
|
assert zone.getGuestCIDRAddress() == null : zone;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,33 +37,33 @@ import com.google.common.collect.ImmutableList;
|
||||||
public class ListDiskOfferingsOptionsTest {
|
public class ListDiskOfferingsOptionsTest {
|
||||||
|
|
||||||
public void testId() {
|
public void testId() {
|
||||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().id("goo");
|
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIdStatic() {
|
public void testIdStatic() {
|
||||||
ListDiskOfferingsOptions options = id("goo");
|
ListDiskOfferingsOptions options = id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testName() {
|
public void testName() {
|
||||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().name("goo");
|
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().name("foo");
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("name"));
|
assertEquals(ImmutableList.of("foo"), options.buildQueryParameters().get("name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNameStatic() {
|
public void testNameStatic() {
|
||||||
ListDiskOfferingsOptions options = name("goo");
|
ListDiskOfferingsOptions options = name("foo");
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("name"));
|
assertEquals(ImmutableList.of("foo"), options.buildQueryParameters().get("name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainId() {
|
public void testDomainId() {
|
||||||
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().domainId("goo");
|
ListDiskOfferingsOptions options = new ListDiskOfferingsOptions().domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainIdStatic() {
|
public void testDomainIdStatic() {
|
||||||
ListDiskOfferingsOptions options = domainId("goo");
|
ListDiskOfferingsOptions options = domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,6 @@ public class ListNetworkOfferingsOptionsTest {
|
||||||
assertEquals(ImmutableList.of("true"), options.buildQueryParameters().get("isdefault"));
|
assertEquals(ImmutableList.of("true"), options.buildQueryParameters().get("isdefault"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void testIsShared() {
|
public void testIsShared() {
|
||||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().isShared(true);
|
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().isShared(true);
|
||||||
assertEquals(ImmutableList.of("true"), options.buildQueryParameters().get("isshared"));
|
assertEquals(ImmutableList.of("true"), options.buildQueryParameters().get("isshared"));
|
||||||
|
@ -63,13 +62,13 @@ public class ListNetworkOfferingsOptionsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testId() {
|
public void testId() {
|
||||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().id("goo");
|
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIdStatic() {
|
public void testIdStatic() {
|
||||||
ListNetworkOfferingsOptions options = id("goo");
|
ListNetworkOfferingsOptions options = id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testSpecifyVLAN() {
|
public void testSpecifyVLAN() {
|
||||||
|
@ -103,23 +102,23 @@ public class ListNetworkOfferingsOptionsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testName() {
|
public void testName() {
|
||||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().id("goo");
|
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNameStatic() {
|
public void testNameStatic() {
|
||||||
ListNetworkOfferingsOptions options = id("goo");
|
ListNetworkOfferingsOptions options = id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDisplayText() {
|
public void testDisplayText() {
|
||||||
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().displayText("goo");
|
ListNetworkOfferingsOptions options = new ListNetworkOfferingsOptions().displayText("text");
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("displaytext"));
|
assertEquals(ImmutableList.of("text"), options.buildQueryParameters().get("displaytext"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDisplayTextStatic() {
|
public void testDisplayTextStatic() {
|
||||||
ListNetworkOfferingsOptions options = displayText("goo");
|
ListNetworkOfferingsOptions options = displayText("text");
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("displaytext"));
|
assertEquals(ImmutableList.of("text"), options.buildQueryParameters().get("displaytext"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,23 +75,23 @@ public class ListNetworksOptionsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testId() {
|
public void testId() {
|
||||||
ListNetworksOptions options = new ListNetworksOptions().id("goo");
|
ListNetworksOptions options = new ListNetworksOptions().id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIdStatic() {
|
public void testIdStatic() {
|
||||||
ListNetworksOptions options = id("goo");
|
ListNetworksOptions options = id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainId() {
|
public void testDomainId() {
|
||||||
ListNetworksOptions options = new ListNetworksOptions().domainId("goo");
|
ListNetworksOptions options = new ListNetworksOptions().domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainIdStatic() {
|
public void testDomainIdStatic() {
|
||||||
ListNetworksOptions options = domainId("goo");
|
ListNetworksOptions options = domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAccountId() {
|
public void testAccountId() {
|
||||||
|
@ -115,23 +115,23 @@ public class ListNetworksOptionsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testName() {
|
public void testName() {
|
||||||
ListNetworksOptions options = new ListNetworksOptions().id("goo");
|
ListNetworksOptions options = new ListNetworksOptions().id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNameStatic() {
|
public void testNameStatic() {
|
||||||
ListNetworksOptions options = id("goo");
|
ListNetworksOptions options = id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testZoneId() {
|
public void testZoneId() {
|
||||||
ListNetworksOptions options = new ListNetworksOptions().zoneId("goo");
|
ListNetworksOptions options = new ListNetworksOptions().zoneId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testZoneIdStatic() {
|
public void testZoneIdStatic() {
|
||||||
ListNetworksOptions options = zoneId("goo");
|
ListNetworksOptions options = zoneId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testType() {
|
public void testType() {
|
||||||
|
|
|
@ -38,42 +38,42 @@ import com.google.common.collect.ImmutableList;
|
||||||
public class ListServiceOfferingsOptionsTest {
|
public class ListServiceOfferingsOptionsTest {
|
||||||
|
|
||||||
public void testId() {
|
public void testId() {
|
||||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().id("goo");
|
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIdStatic() {
|
public void testIdStatic() {
|
||||||
ListServiceOfferingsOptions options = id("goo");
|
ListServiceOfferingsOptions options = id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testName() {
|
public void testName() {
|
||||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().name("goo");
|
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().name("name");
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("name"));
|
assertEquals(ImmutableList.of("name"), options.buildQueryParameters().get("name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNameStatic() {
|
public void testNameStatic() {
|
||||||
ListServiceOfferingsOptions options = name("goo");
|
ListServiceOfferingsOptions options = name("name");
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("name"));
|
assertEquals(ImmutableList.of("name"), options.buildQueryParameters().get("name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainId() {
|
public void testDomainId() {
|
||||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().domainId("goo");
|
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainIdStatic() {
|
public void testDomainIdStatic() {
|
||||||
ListServiceOfferingsOptions options = domainId("goo");
|
ListServiceOfferingsOptions options = domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testVirtualMachineId() {
|
public void testVirtualMachineId() {
|
||||||
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().virtualMachineId("goo");
|
ListServiceOfferingsOptions options = new ListServiceOfferingsOptions().virtualMachineId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("virtualmachineid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("virtualmachineid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testVirtualMachineIdStatic() {
|
public void testVirtualMachineIdStatic() {
|
||||||
ListServiceOfferingsOptions options = virtualMachineId("goo");
|
ListServiceOfferingsOptions options = virtualMachineId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("virtualmachineid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("virtualmachineid"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,70 +41,70 @@ import com.google.common.collect.ImmutableList;
|
||||||
public class ListTemplatesOptionsTest {
|
public class ListTemplatesOptionsTest {
|
||||||
|
|
||||||
public void testId() {
|
public void testId() {
|
||||||
ListTemplatesOptions options = new ListTemplatesOptions().id("goo");
|
ListTemplatesOptions options = new ListTemplatesOptions().id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIdStatic() {
|
public void testIdStatic() {
|
||||||
ListTemplatesOptions options = id("goo");
|
ListTemplatesOptions options = id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainId() {
|
public void testDomainId() {
|
||||||
ListTemplatesOptions options = new ListTemplatesOptions().domainId("goo");
|
ListTemplatesOptions options = new ListTemplatesOptions().domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainIdStatic() {
|
public void testDomainIdStatic() {
|
||||||
ListTemplatesOptions options = domainId("goo");
|
ListTemplatesOptions options = domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAccountInDomainId() {
|
public void testAccountInDomainId() {
|
||||||
ListTemplatesOptions options = new ListTemplatesOptions().accountInDomain("moo", "goo");
|
ListTemplatesOptions options = new ListTemplatesOptions().accountInDomain(5, 6);
|
||||||
assertEquals(ImmutableList.of("moo"), options.buildQueryParameters().get("account"));
|
assertEquals(ImmutableList.of("5"), options.buildQueryParameters().get("account"));
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAccountInDomainIdStatic() {
|
public void testAccountInDomainIdStatic() {
|
||||||
ListTemplatesOptions options = accountInDomain("moo", "goo");
|
ListTemplatesOptions options = accountInDomain(5, 6);
|
||||||
assertEquals(ImmutableList.of("moo"), options.buildQueryParameters().get("account"));
|
assertEquals(ImmutableList.of("5"), options.buildQueryParameters().get("account"));
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHypervisor() {
|
public void testHypervisor() {
|
||||||
ListTemplatesOptions options = new ListTemplatesOptions().hypervisor("goo");
|
ListTemplatesOptions options = new ListTemplatesOptions().hypervisor("KVM");
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("hypervisor"));
|
assertEquals(ImmutableList.of("KVM"), options.buildQueryParameters().get("hypervisor"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHypervisorStatic() {
|
public void testHypervisorStatic() {
|
||||||
ListTemplatesOptions options = hypervisor("goo");
|
ListTemplatesOptions options = hypervisor("KVM");
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("hypervisor"));
|
assertEquals(ImmutableList.of("KVM"), options.buildQueryParameters().get("hypervisor"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testName() {
|
public void testName() {
|
||||||
ListTemplatesOptions options = new ListTemplatesOptions().id("goo");
|
ListTemplatesOptions options = new ListTemplatesOptions().id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNameStatic() {
|
public void testNameStatic() {
|
||||||
ListTemplatesOptions options = id("goo");
|
ListTemplatesOptions options = id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testZoneId() {
|
public void testZoneId() {
|
||||||
ListTemplatesOptions options = new ListTemplatesOptions().zoneId("goo");
|
ListTemplatesOptions options = new ListTemplatesOptions().zoneId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testZoneIdStatic() {
|
public void testZoneIdStatic() {
|
||||||
ListTemplatesOptions options = zoneId("goo");
|
ListTemplatesOptions options = zoneId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testFilterDefault() {
|
public void testFilterDefault() {
|
||||||
assertEquals(ImmutableList.of("executable"), new ListTemplatesOptions().buildQueryParameters().get(
|
assertEquals(ImmutableList.of("executable"),
|
||||||
"templatefilter"));
|
new ListTemplatesOptions().buildQueryParameters().get("templatefilter"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testFilter() {
|
public void testFilter() {
|
||||||
|
|
|
@ -44,75 +44,75 @@ import com.google.common.collect.ImmutableList;
|
||||||
public class ListVirtualMachesOptionsTest {
|
public class ListVirtualMachesOptionsTest {
|
||||||
|
|
||||||
public void testHostId() {
|
public void testHostId() {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().hostId("goo");
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().hostId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("hostid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("hostid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testHostIdStatic() {
|
public void testHostIdStatic() {
|
||||||
ListVirtualMachinesOptions options = hostId("goo");
|
ListVirtualMachinesOptions options = hostId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("hostid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("hostid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testPodId() {
|
public void testPodId() {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().podId("goo");
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().podId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("podid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("podid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testPodIdStatic() {
|
public void testPodIdStatic() {
|
||||||
ListVirtualMachinesOptions options = podId("goo");
|
ListVirtualMachinesOptions options = podId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("podid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("podid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNetworkId() {
|
public void testNetworkId() {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().networkId("goo");
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().networkId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("networkid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("networkid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNetworkIdStatic() {
|
public void testNetworkIdStatic() {
|
||||||
ListVirtualMachinesOptions options = networkId("goo");
|
ListVirtualMachinesOptions options = networkId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("networkid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("networkid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGroupId() {
|
public void testGroupId() {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().groupId("goo");
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().groupId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("groupid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("groupid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testGroupIdStatic() {
|
public void testGroupIdStatic() {
|
||||||
ListVirtualMachinesOptions options = groupId("goo");
|
ListVirtualMachinesOptions options = groupId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("groupid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("groupid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAccountInDomainId() {
|
public void testAccountInDomainId() {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().accountInDomain("moo", "goo");
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().accountInDomain(5, 6);
|
||||||
assertEquals(ImmutableList.of("moo"), options.buildQueryParameters().get("account"));
|
assertEquals(ImmutableList.of("5"), options.buildQueryParameters().get("account"));
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAccountInDomainIdStatic() {
|
public void testAccountInDomainIdStatic() {
|
||||||
ListVirtualMachinesOptions options = accountInDomain("moo", "goo");
|
ListVirtualMachinesOptions options = accountInDomain(5, 6);
|
||||||
assertEquals(ImmutableList.of("moo"), options.buildQueryParameters().get("account"));
|
assertEquals(ImmutableList.of("5"), options.buildQueryParameters().get("account"));
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testName() {
|
public void testName() {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().id("goo");
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNameStatic() {
|
public void testNameStatic() {
|
||||||
ListVirtualMachinesOptions options = id("goo");
|
ListVirtualMachinesOptions options = id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testZoneId() {
|
public void testZoneId() {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().zoneId("goo");
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().zoneId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testZoneIdStatic() {
|
public void testZoneIdStatic() {
|
||||||
ListVirtualMachinesOptions options = zoneId("goo");
|
ListVirtualMachinesOptions options = zoneId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("zoneid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("zoneid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testState() {
|
public void testState() {
|
||||||
|
@ -136,22 +136,22 @@ public class ListVirtualMachesOptionsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testId() {
|
public void testId() {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().id("goo");
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainId() {
|
public void testDomainId() {
|
||||||
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().domainId("goo");
|
ListVirtualMachinesOptions options = new ListVirtualMachinesOptions().domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIdStatic() {
|
public void testIdStatic() {
|
||||||
ListVirtualMachinesOptions options = id("goo");
|
ListVirtualMachinesOptions options = id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainIdStatic() {
|
public void testDomainIdStatic() {
|
||||||
ListVirtualMachinesOptions options = domainId("goo");
|
ListVirtualMachinesOptions options = domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,8 @@ import com.google.common.collect.ImmutableList;
|
||||||
public class ListZonesOptionsTest {
|
public class ListZonesOptionsTest {
|
||||||
|
|
||||||
public void testId() {
|
public void testId() {
|
||||||
ListZonesOptions options = new ListZonesOptions().id("goo");
|
ListZonesOptions options = new ListZonesOptions().id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAvailable() {
|
public void testAvailable() {
|
||||||
|
@ -47,13 +47,13 @@ public class ListZonesOptionsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainId() {
|
public void testDomainId() {
|
||||||
ListZonesOptions options = new ListZonesOptions().domainId("goo");
|
ListZonesOptions options = new ListZonesOptions().domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testIdStatic() {
|
public void testIdStatic() {
|
||||||
ListZonesOptions options = id("goo");
|
ListZonesOptions options = id(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("id"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("id"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAvailableStatic() {
|
public void testAvailableStatic() {
|
||||||
|
@ -62,7 +62,7 @@ public class ListZonesOptionsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testDomainIdStatic() {
|
public void testDomainIdStatic() {
|
||||||
ListZonesOptions options = domainId("goo");
|
ListZonesOptions options = domainId(6);
|
||||||
assertEquals(ImmutableList.of("goo"), options.buildQueryParameters().get("domainid"));
|
assertEquals(ImmutableList.of("6"), options.buildQueryParameters().get("domainid"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue