mirror of https://github.com/apache/jclouds.git
Initial CloudStack 3.0 compatibility work.
This commit is contained in:
parent
2fef9008eb
commit
792ad9dcb9
|
@ -106,11 +106,11 @@ public class CloudStackComputeServiceContextModule extends
|
|||
bind(new TypeLiteral<Function<Template, OperatingSystem>>() {
|
||||
}).to(TemplateToOperatingSystem.class);
|
||||
install(new FactoryModuleBuilder().build(StaticNATVirtualMachineInNetwork.Factory.class));
|
||||
bind(new TypeLiteral<CacheLoader<Long, Set<IPForwardingRule>>>() {
|
||||
bind(new TypeLiteral<CacheLoader<String, Set<IPForwardingRule>>>() {
|
||||
}).to(GetIPForwardingRulesByVirtualMachine.class);
|
||||
bind(new TypeLiteral<CacheLoader<Long, Zone>>() {
|
||||
bind(new TypeLiteral<CacheLoader<String, Zone>>() {
|
||||
}).to(ZoneIdToZone.class);
|
||||
bind(new TypeLiteral<Supplier<LoadingCache<Long, Zone>>>() {
|
||||
bind(new TypeLiteral<Supplier<LoadingCache<String, Zone>>>() {
|
||||
}).to(ZoneIdToZoneSupplier.class);
|
||||
// to have the compute service adapter override default locations
|
||||
install(new LocationsFromComputeServiceAdapterModule<VirtualMachine, ServiceOffering, Template, Zone>(){});
|
||||
|
@ -119,12 +119,12 @@ public class CloudStackComputeServiceContextModule extends
|
|||
@Provides
|
||||
@Singleton
|
||||
@Memoized
|
||||
public Supplier<Map<Long, String>> listOSCategories(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds,
|
||||
public Supplier<Map<String, String>> listOSCategories(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds,
|
||||
final CloudStackClient client) {
|
||||
return new MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier<Map<Long, String>>(authException,
|
||||
seconds, new Supplier<Map<Long, String>>() {
|
||||
return new MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier<Map<String, String>>(authException,
|
||||
seconds, new Supplier<Map<String, String>>() {
|
||||
@Override
|
||||
public Map<Long, String> get() {
|
||||
public Map<String, String> get() {
|
||||
GuestOSClient guestOSClient = client.getGuestOSClient();
|
||||
return guestOSClient.listOSCategories();
|
||||
}
|
||||
|
@ -134,17 +134,17 @@ public class CloudStackComputeServiceContextModule extends
|
|||
@Provides
|
||||
@Singleton
|
||||
@Memoized
|
||||
public Supplier<Map<Long, OSType>> listOSTypes(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds,
|
||||
public Supplier<Map<String, OSType>> listOSTypes(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds,
|
||||
final CloudStackClient client) {
|
||||
return new MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier<Map<Long, OSType>>(authException,
|
||||
seconds, new Supplier<Map<Long, OSType>>() {
|
||||
return new MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier<Map<String, OSType>>(authException,
|
||||
seconds, new Supplier<Map<String, OSType>>() {
|
||||
@Override
|
||||
public Map<Long, OSType> get() {
|
||||
public Map<String, OSType> get() {
|
||||
GuestOSClient guestOSClient = client.getGuestOSClient();
|
||||
return Maps.uniqueIndex(guestOSClient.listOSTypes(), new Function<OSType, Long>() {
|
||||
return Maps.uniqueIndex(guestOSClient.listOSTypes(), new Function<OSType, String>() {
|
||||
|
||||
@Override
|
||||
public Long apply(OSType arg0) {
|
||||
public String apply(OSType arg0) {
|
||||
return arg0.getId();
|
||||
}
|
||||
});
|
||||
|
@ -155,9 +155,9 @@ public class CloudStackComputeServiceContextModule extends
|
|||
@Provides
|
||||
@Singleton
|
||||
@Memoized
|
||||
public Supplier<Map<Long, Network>> listNetworks(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds,
|
||||
public Supplier<Map<String, Network>> listNetworks(AtomicReference<AuthorizationException> authException, @Named(PROPERTY_SESSION_INTERVAL) long seconds,
|
||||
final NetworksForCurrentUser networksForCurrentUser) {
|
||||
return new MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier<Map<Long, Network>>(authException,
|
||||
return new MemoizedRetryOnTimeOutButNotOnAuthorizationExceptionSupplier<Map<String, Network>>(authException,
|
||||
seconds, networksForCurrentUser);
|
||||
}
|
||||
|
||||
|
@ -172,20 +172,20 @@ public class CloudStackComputeServiceContextModule extends
|
|||
|
||||
@Provides
|
||||
@Singleton
|
||||
protected Predicate<Long> jobComplete(JobComplete jobComplete) {
|
||||
protected Predicate<String> jobComplete(JobComplete jobComplete) {
|
||||
// TODO: parameterize
|
||||
return new RetryablePredicate<Long>(jobComplete, 1200, 1, 5, TimeUnit.SECONDS);
|
||||
return new RetryablePredicate<String>(jobComplete, 1200, 1, 5, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
protected LoadingCache<Long, Set<IPForwardingRule>> getIPForwardingRulesByVirtualMachine(
|
||||
CacheLoader<Long, Set<IPForwardingRule>> getIPForwardingRules) {
|
||||
protected LoadingCache<String, Set<IPForwardingRule>> getIPForwardingRulesByVirtualMachine(
|
||||
CacheLoader<String, Set<IPForwardingRule>> getIPForwardingRules) {
|
||||
return CacheBuilder.newBuilder().build(getIPForwardingRules);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
public static class GetIPForwardingRulesByVirtualMachine extends CacheLoader<Long, Set<IPForwardingRule>> {
|
||||
public static class GetIPForwardingRulesByVirtualMachine extends CacheLoader<String, Set<IPForwardingRule>> {
|
||||
private final CloudStackClient client;
|
||||
|
||||
@Inject
|
||||
|
@ -198,7 +198,7 @@ public class CloudStackComputeServiceContextModule extends
|
|||
* when there is no ip forwarding rule available for the VM
|
||||
*/
|
||||
@Override
|
||||
public Set<IPForwardingRule> load(Long input) {
|
||||
public Set<IPForwardingRule> load(String input) {
|
||||
Set<IPForwardingRule> rules = client.getNATClient().getIPForwardingRulesForVirtualMachine(input);
|
||||
return rules != null ? rules : ImmutableSet.<IPForwardingRule>of();
|
||||
}
|
||||
|
|
|
@ -75,7 +75,7 @@ public class TemplateToImage implements Function<Template, Image> {
|
|||
|
||||
@Override
|
||||
public boolean matches(Template from, Location input) {
|
||||
return input.getId().equals(Long.toString(from.getZoneId()));
|
||||
return input.getId().equals(from.getZoneId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,13 +55,13 @@ public class TemplateToOperatingSystem implements Function<Template, OperatingSy
|
|||
@Named(ComputeServiceConstants.COMPUTE_LOGGER)
|
||||
protected Logger logger = Logger.NULL;
|
||||
|
||||
private final Supplier<Map<Long, OSType>> osTypes;
|
||||
private final Supplier<Map<Long, String>> osCategories;
|
||||
private final Supplier<Map<String, OSType>> osTypes;
|
||||
private final Supplier<Map<String, String>> osCategories;
|
||||
private final Map<OsFamily, Map<String, String>> osVersionMap;
|
||||
|
||||
@Inject
|
||||
public TemplateToOperatingSystem(@Memoized Supplier<Map<Long, OSType>> osTypes,
|
||||
@Memoized Supplier<Map<Long, String>> osCategories, Map<OsFamily, Map<String, String>> osVersionMap) {
|
||||
public TemplateToOperatingSystem(@Memoized Supplier<Map<String, OSType>> osTypes,
|
||||
@Memoized Supplier<Map<String, String>> osCategories, Map<OsFamily, Map<String, String>> osVersionMap) {
|
||||
this.osTypes = checkNotNull(osTypes, "osTypes");
|
||||
this.osCategories = checkNotNull(osCategories, "osCategories");
|
||||
this.osVersionMap = checkNotNull(osVersionMap, "osVersionMap");
|
||||
|
|
|
@ -78,13 +78,13 @@ public class VirtualMachineToNodeMetadata implements Function<VirtualMachine, No
|
|||
|
||||
private final FindLocationForVirtualMachine findLocationForVirtualMachine;
|
||||
private final FindImageForVirtualMachine findImageForVirtualMachine;
|
||||
private final LoadingCache<Long, Set<IPForwardingRule>> getIPForwardingRulesByVirtualMachine;
|
||||
private final LoadingCache<String, Set<IPForwardingRule>> getIPForwardingRulesByVirtualMachine;
|
||||
private final GroupNamingConvention nodeNamingConvention;
|
||||
|
||||
@Inject
|
||||
VirtualMachineToNodeMetadata(FindLocationForVirtualMachine findLocationForVirtualMachine,
|
||||
FindImageForVirtualMachine findImageForVirtualMachine,
|
||||
LoadingCache<Long, Set<IPForwardingRule>> getIPForwardingRulesByVirtualMachine,
|
||||
LoadingCache<String, Set<IPForwardingRule>> getIPForwardingRulesByVirtualMachine,
|
||||
GroupNamingConvention.Factory namingConvention) {
|
||||
this.nodeNamingConvention = checkNotNull(namingConvention, "namingConvention").createWithoutPrefix();
|
||||
this.findLocationForVirtualMachine = checkNotNull(findLocationForVirtualMachine, "findLocationForVirtualMachine");
|
||||
|
@ -178,7 +178,7 @@ public class VirtualMachineToNodeMetadata implements Function<VirtualMachine, No
|
|||
|
||||
@Override
|
||||
public boolean matches(VirtualMachine from, Location input) {
|
||||
return input.getId().equals(Long.toString(from.getZoneId()));
|
||||
return input.getId().equals(from.getZoneId());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,7 +192,7 @@ public class VirtualMachineToNodeMetadata implements Function<VirtualMachine, No
|
|||
|
||||
@Override
|
||||
public boolean matches(VirtualMachine from, Hardware input) {
|
||||
return input.getProviderId().equals(Long.toString(from.getServiceOfferingId()));
|
||||
return input.getProviderId().equals(from.getServiceOfferingId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ZoneToLocation implements Function<Zone, Location> {
|
|||
@Override
|
||||
public Location apply(Zone zone) {
|
||||
return new LocationBuilder().scope(LocationScope.ZONE).metadata(ImmutableMap.<String, Object> of())
|
||||
.description(zone.getName()).id(Long.toString(zone.getId()))
|
||||
.description(zone.getName()).id(zone.getId())
|
||||
.parent(Iterables.getOnlyElement(provider.get())).build();
|
||||
}
|
||||
|
||||
|
|
|
@ -54,9 +54,9 @@ import com.google.common.collect.Sets;
|
|||
*/
|
||||
public class CloudStackTemplateOptions extends TemplateOptions implements Cloneable {
|
||||
|
||||
protected Set<Long> securityGroupIds = Sets.<Long> newLinkedHashSet();
|
||||
protected Set<Long> networkIds = Sets.<Long> newLinkedHashSet();
|
||||
protected Map<String, Long> ipsToNetworks = Maps.<String, Long>newLinkedHashMap();
|
||||
protected Set<String> securityGroupIds = Sets.<String> newLinkedHashSet();
|
||||
protected Set<String> networkIds = Sets.<String> newLinkedHashSet();
|
||||
protected Map<String, String> ipsToNetworks = Maps.<String, String>newLinkedHashMap();
|
||||
protected String ipOnDefaultNetwork;
|
||||
protected String keyPair;
|
||||
protected boolean setupStaticNat = true;
|
||||
|
@ -85,7 +85,7 @@ public class CloudStackTemplateOptions extends TemplateOptions implements Clonea
|
|||
/**
|
||||
* @see DeployVirtualMachineOptions#securityGroupId
|
||||
*/
|
||||
public CloudStackTemplateOptions securityGroupId(long securityGroupId) {
|
||||
public CloudStackTemplateOptions securityGroupId(String securityGroupId) {
|
||||
this.securityGroupIds.add(securityGroupId);
|
||||
return this;
|
||||
}
|
||||
|
@ -93,19 +93,19 @@ public class CloudStackTemplateOptions extends TemplateOptions implements Clonea
|
|||
/**
|
||||
* @see DeployVirtualMachineOptions#securityGroupIds
|
||||
*/
|
||||
public CloudStackTemplateOptions securityGroupIds(Iterable<Long> securityGroupIds) {
|
||||
public CloudStackTemplateOptions securityGroupIds(Iterable<String> securityGroupIds) {
|
||||
Iterables.addAll(this.securityGroupIds, checkNotNull(securityGroupIds, "securityGroupIds was null"));
|
||||
return this;
|
||||
}
|
||||
|
||||
public Set<Long> getSecurityGroupIds() {
|
||||
public Set<String> getSecurityGroupIds() {
|
||||
return securityGroupIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DeployVirtualMachineOptions#networkId
|
||||
*/
|
||||
public CloudStackTemplateOptions networkId(long networkId) {
|
||||
public CloudStackTemplateOptions networkId(String networkId) {
|
||||
this.networkIds.add(networkId);
|
||||
return this;
|
||||
}
|
||||
|
@ -113,12 +113,12 @@ public class CloudStackTemplateOptions extends TemplateOptions implements Clonea
|
|||
/**
|
||||
* @see DeployVirtualMachineOptions#networkIds
|
||||
*/
|
||||
public CloudStackTemplateOptions networkIds(Iterable<Long> networkIds) {
|
||||
public CloudStackTemplateOptions networkIds(Iterable<String> networkIds) {
|
||||
Iterables.addAll(this.networkIds, checkNotNull(networkIds, "networkIds was null"));
|
||||
return this;
|
||||
}
|
||||
|
||||
public Set<Long> getNetworkIds() {
|
||||
public Set<String> getNetworkIds() {
|
||||
return networkIds;
|
||||
}
|
||||
|
||||
|
@ -146,12 +146,12 @@ public class CloudStackTemplateOptions extends TemplateOptions implements Clonea
|
|||
/**
|
||||
* @see DeployVirtualMachineOptions#ipOnDefaultNetwork(String)
|
||||
*/
|
||||
public CloudStackTemplateOptions ipsToNetworks(Map<String, Long> ipsToNetworks) {
|
||||
public CloudStackTemplateOptions ipsToNetworks(Map<String, String> ipsToNetworks) {
|
||||
this.ipsToNetworks.putAll(ipsToNetworks);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Map<String, Long> getIpsToNetworks() {
|
||||
public Map<String, String> getIpsToNetworks() {
|
||||
return ipsToNetworks;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ public class CloudStackTemplateOptions extends TemplateOptions implements Clonea
|
|||
/**
|
||||
* @see CloudStackTemplateOptions#securityGroupId
|
||||
*/
|
||||
public static CloudStackTemplateOptions securityGroupId(long id) {
|
||||
public static CloudStackTemplateOptions securityGroupId(String id) {
|
||||
CloudStackTemplateOptions options = new CloudStackTemplateOptions();
|
||||
return options.securityGroupId(id);
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ public class CloudStackTemplateOptions extends TemplateOptions implements Clonea
|
|||
/**
|
||||
* @see CloudStackTemplateOptions#securityGroupIds
|
||||
*/
|
||||
public static CloudStackTemplateOptions securityGroupIds(Iterable<Long> securityGroupIds) {
|
||||
public static CloudStackTemplateOptions securityGroupIds(Iterable<String> securityGroupIds) {
|
||||
CloudStackTemplateOptions options = new CloudStackTemplateOptions();
|
||||
return options.securityGroupIds(securityGroupIds);
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ public class CloudStackTemplateOptions extends TemplateOptions implements Clonea
|
|||
/**
|
||||
* @see CloudStackTemplateOptions#networkId
|
||||
*/
|
||||
public static CloudStackTemplateOptions networkId(long id) {
|
||||
public static CloudStackTemplateOptions networkId(String id) {
|
||||
CloudStackTemplateOptions options = new CloudStackTemplateOptions();
|
||||
return options.networkId(id);
|
||||
}
|
||||
|
@ -198,7 +198,7 @@ public class CloudStackTemplateOptions extends TemplateOptions implements Clonea
|
|||
/**
|
||||
* @see CloudStackTemplateOptions#networkIds
|
||||
*/
|
||||
public static CloudStackTemplateOptions networkIds(Iterable<Long> networkIds) {
|
||||
public static CloudStackTemplateOptions networkIds(Iterable<String> networkIds) {
|
||||
CloudStackTemplateOptions options = new CloudStackTemplateOptions();
|
||||
return options.networkIds(networkIds);
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ public class CloudStackTemplateOptions extends TemplateOptions implements Clonea
|
|||
/**
|
||||
* @see CloudStackTemplateOptions#ipsToNetworks
|
||||
*/
|
||||
public static CloudStackTemplateOptions ipsToNetworks(Map<String, Long> ipToNetworkMap) {
|
||||
public static CloudStackTemplateOptions ipsToNetworks(Map<String, String> ipToNetworkMap) {
|
||||
CloudStackTemplateOptions options = new CloudStackTemplateOptions();
|
||||
return options.ipsToNetworks(ipToNetworkMap);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ import com.google.common.collect.Iterables;
|
|||
*/
|
||||
public class AdvancedNetworkOptionsConverter implements OptionsConverter {
|
||||
@Override
|
||||
public DeployVirtualMachineOptions apply(CloudStackTemplateOptions templateOptions, Map<Long, Network> networks, long zoneId, DeployVirtualMachineOptions options) {
|
||||
public DeployVirtualMachineOptions apply(CloudStackTemplateOptions templateOptions, Map<String, Network> networks, String zoneId, DeployVirtualMachineOptions options) {
|
||||
// security groups not allowed.
|
||||
// at least one network must be given to CloudStack,
|
||||
// but jclouds will try to autodetect an appropriate network if none given.
|
||||
|
|
|
@ -31,7 +31,7 @@ import org.jclouds.cloudstack.options.DeployVirtualMachineOptions;
|
|||
*/
|
||||
public class BasicNetworkOptionsConverter implements OptionsConverter {
|
||||
@Override
|
||||
public DeployVirtualMachineOptions apply(CloudStackTemplateOptions templateOptions, Map<Long, Network> networks, long zoneId, DeployVirtualMachineOptions options) {
|
||||
public DeployVirtualMachineOptions apply(CloudStackTemplateOptions templateOptions, Map<String, Network> networks, String zoneId, DeployVirtualMachineOptions options) {
|
||||
// both security groups and networks are optional, and CloudStack will
|
||||
// use the zone/user's default network/security group if none given
|
||||
if (templateOptions.getSecurityGroupIds().size() > 0) {
|
||||
|
|
|
@ -81,24 +81,24 @@ public class CloudStackComputeServiceAdapter implements
|
|||
protected Logger logger = Logger.NULL;
|
||||
|
||||
private final CloudStackClient client;
|
||||
private final Predicate<Long> jobComplete;
|
||||
private final Supplier<Map<Long, Network>> networkSupplier;
|
||||
private final Predicate<String> jobComplete;
|
||||
private final Supplier<Map<String, Network>> networkSupplier;
|
||||
private final BlockUntilJobCompletesAndReturnResult blockUntilJobCompletesAndReturnResult;
|
||||
private final Factory staticNATVMInNetwork;
|
||||
private final CreatePortForwardingRulesForIP setupPortForwardingRulesForIP;
|
||||
private final LoadingCache<Long, Set<IPForwardingRule>> vmToRules;
|
||||
private final LoadingCache<String, Set<IPForwardingRule>> vmToRules;
|
||||
private final Map<String, Credentials> credentialStore;
|
||||
private final Map<NetworkType, ? extends OptionsConverter> optionsConverters;
|
||||
private final Supplier<LoadingCache<Long, Zone>> zoneIdToZone;
|
||||
private final Supplier<LoadingCache<String, Zone>> zoneIdToZone;
|
||||
|
||||
@Inject
|
||||
public CloudStackComputeServiceAdapter(CloudStackClient client, Predicate<Long> jobComplete,
|
||||
@Memoized Supplier<Map<Long, Network>> networkSupplier,
|
||||
public CloudStackComputeServiceAdapter(CloudStackClient client, Predicate<String> jobComplete,
|
||||
@Memoized Supplier<Map<String, Network>> networkSupplier,
|
||||
BlockUntilJobCompletesAndReturnResult blockUntilJobCompletesAndReturnResult,
|
||||
StaticNATVirtualMachineInNetwork.Factory staticNATVMInNetwork,
|
||||
CreatePortForwardingRulesForIP setupPortForwardingRulesForIP, LoadingCache<Long, Set<IPForwardingRule>> vmToRules,
|
||||
CreatePortForwardingRulesForIP setupPortForwardingRulesForIP, LoadingCache<String, Set<IPForwardingRule>> vmToRules,
|
||||
Map<String, Credentials> credentialStore, Map<NetworkType, ? extends OptionsConverter> optionsConverters,
|
||||
Supplier<LoadingCache<Long, Zone>> zoneIdToZone) {
|
||||
Supplier<LoadingCache<String, Zone>> zoneIdToZone) {
|
||||
this.client = checkNotNull(client, "client");
|
||||
this.jobComplete = checkNotNull(jobComplete, "jobComplete");
|
||||
this.networkSupplier = checkNotNull(networkSupplier, "networkSupplier");
|
||||
|
@ -120,9 +120,9 @@ public class CloudStackComputeServiceAdapter implements
|
|||
checkArgument(template.getOptions().getClass().isAssignableFrom(CloudStackTemplateOptions.class),
|
||||
"options class %s should have been assignable from CloudStackTemplateOptions", template.getOptions()
|
||||
.getClass());
|
||||
Map<Long, Network> networks = networkSupplier.get();
|
||||
Map<String, Network> networks = networkSupplier.get();
|
||||
|
||||
final long zoneId = Long.parseLong(template.getLocation().getId());
|
||||
final String zoneId = template.getLocation().getId();
|
||||
Zone zone = null;
|
||||
try {
|
||||
zone = zoneIdToZone.get().get(zoneId);
|
||||
|
@ -155,10 +155,10 @@ public class CloudStackComputeServiceAdapter implements
|
|||
}
|
||||
}
|
||||
|
||||
long templateId = Long.parseLong(template.getImage().getId());
|
||||
long serviceOfferingId = Long.parseLong(template.getHardware().getId());
|
||||
String templateId = template.getImage().getId();
|
||||
String serviceOfferingId = template.getHardware().getId();
|
||||
|
||||
logger.info("serviceOfferingId %d, templateId %d, zoneId %d, options %s%n", serviceOfferingId, templateId,
|
||||
logger.info("serviceOfferingId %s, templateId %s, zoneId %s, options %s%n", serviceOfferingId, templateId,
|
||||
zoneId, options);
|
||||
AsyncCreateResponse job = client.getVirtualMachineClient().deployVirtualMachineInZone(zoneId, serviceOfferingId,
|
||||
templateId, options);
|
||||
|
@ -172,7 +172,7 @@ public class CloudStackComputeServiceAdapter implements
|
|||
}
|
||||
if (templateOptions.shouldSetupStaticNat()) {
|
||||
// TODO: possibly not all network ids, do we want to do this
|
||||
for (long networkId : options.getNetworkIds()) {
|
||||
for (String networkId : options.getNetworkIds()) {
|
||||
logger.debug(">> creating static NAT for virtualMachine(%s) in network(%s)", vm.getId(), networkId);
|
||||
PublicIPAddress ip = staticNATVMInNetwork.create(networks.get(networkId)).apply(vm);
|
||||
logger.trace("<< static NATed IPAddress(%s) to virtualMachine(%s)", ip.getId(), vm.getId());
|
||||
|
@ -211,13 +211,13 @@ public class CloudStackComputeServiceAdapter implements
|
|||
|
||||
@Override
|
||||
public VirtualMachine getNode(String id) {
|
||||
long virtualMachineId = Long.parseLong(id);
|
||||
String virtualMachineId = id;
|
||||
return client.getVirtualMachineClient().getVirtualMachine(virtualMachineId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroyNode(String id) {
|
||||
long virtualMachineId = Long.parseLong(id);
|
||||
String virtualMachineId = id;
|
||||
// There was a bug in 2.2.12 release happening when static nat IP address
|
||||
// was being released, and corresponding firewall rules were left behind.
|
||||
// So next time the same IP is allocated, it might be not be static nat
|
||||
|
@ -231,7 +231,7 @@ public class CloudStackComputeServiceAdapter implements
|
|||
// the following:
|
||||
|
||||
// 1) Delete IP forwarding rules associated with IP.
|
||||
Set<Long> ipAddresses = deleteIPForwardingRulesForVMAndReturnDistinctIPs(virtualMachineId);
|
||||
Set<String> ipAddresses = deleteIPForwardingRulesForVMAndReturnDistinctIPs(virtualMachineId);
|
||||
|
||||
// 2) Disable static nat rule for the IP.
|
||||
disableStaticNATOnIPAddresses(ipAddresses);
|
||||
|
@ -244,16 +244,16 @@ public class CloudStackComputeServiceAdapter implements
|
|||
vmToRules.invalidate(virtualMachineId);
|
||||
}
|
||||
|
||||
public void disassociateIPAddresses(Set<Long> ipAddresses) {
|
||||
for (long ipAddress : ipAddresses) {
|
||||
public void disassociateIPAddresses(Set<String> ipAddresses) {
|
||||
for (String ipAddress : ipAddresses) {
|
||||
logger.debug(">> disassociating IPAddress(%s)", ipAddress);
|
||||
client.getAddressClient().disassociateIPAddress(ipAddress);
|
||||
}
|
||||
}
|
||||
|
||||
public void destroyVirtualMachine(long virtualMachineId) {
|
||||
public void destroyVirtualMachine(String virtualMachineId) {
|
||||
|
||||
Long destroyVirtualMachine = client.getVirtualMachineClient().destroyVirtualMachine(virtualMachineId);
|
||||
String destroyVirtualMachine = client.getVirtualMachineClient().destroyVirtualMachine(virtualMachineId);
|
||||
if (destroyVirtualMachine != null) {
|
||||
logger.debug(">> destroying virtualMachine(%s) job(%s)", virtualMachineId, destroyVirtualMachine);
|
||||
awaitCompletion(destroyVirtualMachine);
|
||||
|
@ -263,10 +263,10 @@ public class CloudStackComputeServiceAdapter implements
|
|||
|
||||
}
|
||||
|
||||
public void disableStaticNATOnIPAddresses(Set<Long> ipAddresses) {
|
||||
Builder<Long> jobsToTrack = ImmutableSet.builder();
|
||||
for (Long ipAddress : ipAddresses) {
|
||||
Long disableStaticNAT = client.getNATClient().disableStaticNATOnPublicIP(ipAddress);
|
||||
public void disableStaticNATOnIPAddresses(Set<String> ipAddresses) {
|
||||
Builder<String> jobsToTrack = ImmutableSet.builder();
|
||||
for (String ipAddress : ipAddresses) {
|
||||
String disableStaticNAT = client.getNATClient().disableStaticNATOnPublicIP(ipAddress);
|
||||
if (disableStaticNAT != null) {
|
||||
logger.debug(">> disabling static NAT IPAddress(%s) job(%s)", ipAddress, disableStaticNAT);
|
||||
jobsToTrack.add(disableStaticNAT);
|
||||
|
@ -275,18 +275,18 @@ public class CloudStackComputeServiceAdapter implements
|
|||
awaitCompletion(jobsToTrack.build());
|
||||
}
|
||||
|
||||
public Set<Long> deleteIPForwardingRulesForVMAndReturnDistinctIPs(long virtualMachineId) {
|
||||
Builder<Long> jobsToTrack = ImmutableSet.builder();
|
||||
public Set<String> deleteIPForwardingRulesForVMAndReturnDistinctIPs(String virtualMachineId) {
|
||||
Builder<String> jobsToTrack = ImmutableSet.builder();
|
||||
|
||||
// immutable doesn't permit duplicates
|
||||
Set<Long> ipAddresses = Sets.newLinkedHashSet();
|
||||
Set<String> ipAddresses = Sets.newLinkedHashSet();
|
||||
|
||||
Set<IPForwardingRule> forwardingRules = client.getNATClient().getIPForwardingRulesForVirtualMachine(
|
||||
virtualMachineId);
|
||||
for (IPForwardingRule rule : forwardingRules) {
|
||||
if (!"Deleting".equals(rule.getState())) {
|
||||
ipAddresses.add(rule.getIPAddressId());
|
||||
Long deleteForwardingRule = client.getNATClient().deleteIPForwardingRule(rule.getId());
|
||||
String deleteForwardingRule = client.getNATClient().deleteIPForwardingRule(rule.getId());
|
||||
if (deleteForwardingRule != null) {
|
||||
logger.debug(">> deleting IPForwardingRule(%s) job(%s)", rule.getId(), deleteForwardingRule);
|
||||
jobsToTrack.add(deleteForwardingRule);
|
||||
|
@ -297,22 +297,22 @@ public class CloudStackComputeServiceAdapter implements
|
|||
return ipAddresses;
|
||||
}
|
||||
|
||||
public void awaitCompletion(Iterable<Long> jobs) {
|
||||
public void awaitCompletion(Iterable<String> jobs) {
|
||||
logger.debug(">> awaiting completion of jobs(%s)", jobs);
|
||||
for (long job : jobs)
|
||||
for (String job : jobs)
|
||||
awaitCompletion(job);
|
||||
logger.trace("<< completed jobs(%s)", jobs);
|
||||
}
|
||||
|
||||
public void awaitCompletion(long job) {
|
||||
public void awaitCompletion(String job) {
|
||||
boolean completed = jobComplete.apply(job);
|
||||
logger.trace("<< job(%s) complete(%s)", job, completed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rebootNode(String id) {
|
||||
long virtualMachineId = Long.parseLong(id);
|
||||
Long job = client.getVirtualMachineClient().rebootVirtualMachine(virtualMachineId);
|
||||
String virtualMachineId = id;
|
||||
String job = client.getVirtualMachineClient().rebootVirtualMachine(virtualMachineId);
|
||||
if (job != null) {
|
||||
logger.debug(">> rebooting virtualMachine(%s) job(%s)", virtualMachineId, job);
|
||||
awaitCompletion(job);
|
||||
|
@ -321,8 +321,8 @@ public class CloudStackComputeServiceAdapter implements
|
|||
|
||||
@Override
|
||||
public void resumeNode(String id) {
|
||||
long virtualMachineId = Long.parseLong(id);
|
||||
Long job = client.getVirtualMachineClient().startVirtualMachine(Long.parseLong(id));
|
||||
String virtualMachineId = id;
|
||||
String job = client.getVirtualMachineClient().startVirtualMachine(id);
|
||||
if (job != null) {
|
||||
logger.debug(">> starting virtualMachine(%s) job(%s)", virtualMachineId, job);
|
||||
awaitCompletion(job);
|
||||
|
@ -331,8 +331,8 @@ public class CloudStackComputeServiceAdapter implements
|
|||
|
||||
@Override
|
||||
public void suspendNode(String id) {
|
||||
long virtualMachineId = Long.parseLong(id);
|
||||
Long job = client.getVirtualMachineClient().stopVirtualMachine(Long.parseLong(id));
|
||||
String virtualMachineId = id;
|
||||
String job = client.getVirtualMachineClient().stopVirtualMachine(id);
|
||||
if (job != null) {
|
||||
logger.debug(">> stopping virtualMachine(%s) job(%s)", virtualMachineId, job);
|
||||
awaitCompletion(job);
|
||||
|
|
|
@ -42,6 +42,6 @@ public interface OptionsConverter {
|
|||
* @param options where the resulting set of options will be applied
|
||||
* @return same as "options" parameter
|
||||
*/
|
||||
DeployVirtualMachineOptions apply(CloudStackTemplateOptions templateOptions, Map<Long, Network> networks, long zoneId, DeployVirtualMachineOptions options);
|
||||
DeployVirtualMachineOptions apply(CloudStackTemplateOptions templateOptions, Map<String, Network> networks, String zoneId, DeployVirtualMachineOptions options);
|
||||
|
||||
}
|
||||
|
|
|
@ -80,11 +80,11 @@ public class CloudStackParserModule extends AbstractModule {
|
|||
}
|
||||
|
||||
static final class PortForwardingRuleInternal {
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("ipaddress")
|
||||
private String IPAddress;
|
||||
@SerializedName("ipaddressid")
|
||||
private long IPAddressId;
|
||||
private String IPAddressId;
|
||||
@SerializedName("privateport")
|
||||
private int privatePort;
|
||||
private PortForwardingRule.Protocol protocol;
|
||||
|
@ -94,7 +94,7 @@ public class CloudStackParserModule extends AbstractModule {
|
|||
@SerializedName("virtualmachinedisplayname")
|
||||
private String virtualMachineDisplayName;
|
||||
@SerializedName("virtualmachineid")
|
||||
public long virtualMachineId;
|
||||
public String virtualMachineId;
|
||||
@SerializedName("virtualmachinename")
|
||||
private String virtualMachineName;
|
||||
@SerializedName("cidrlist")
|
||||
|
@ -132,7 +132,7 @@ public class CloudStackParserModule extends AbstractModule {
|
|||
}
|
||||
|
||||
static final class FirewallRuleInternal {
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("cidrlist")
|
||||
private String CIDRs;
|
||||
@SerializedName("startport")
|
||||
|
@ -146,7 +146,7 @@ public class CloudStackParserModule extends AbstractModule {
|
|||
@SerializedName("ipaddress")
|
||||
private String ipAddress;
|
||||
@SerializedName("ipaddressid")
|
||||
private long ipAddressId;
|
||||
private String ipAddressId;
|
||||
private FirewallRule.Protocol protocol;
|
||||
private FirewallRule.State state;
|
||||
}
|
||||
|
@ -173,27 +173,27 @@ public class CloudStackParserModule extends AbstractModule {
|
|||
}
|
||||
|
||||
static final class LoadBalancerRuleInternal {
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private LoadBalancerRule.Algorithm algorithm;
|
||||
private String description;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String name;
|
||||
@SerializedName("privateport")
|
||||
private int privatePort;
|
||||
@SerializedName("publicip")
|
||||
private String publicIP;
|
||||
@SerializedName("publicipid")
|
||||
private long publicIPId;
|
||||
private String publicIPId;
|
||||
@SerializedName("publicport")
|
||||
private int publicPort;
|
||||
private LoadBalancerRule.State state;
|
||||
@SerializedName("cidrlist")
|
||||
private String CIDRs;
|
||||
@SerializedName("zoneId")
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -224,12 +224,12 @@ public class CloudStackParserModule extends AbstractModule {
|
|||
}
|
||||
|
||||
static final class AccountInternal {
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("accounttype")
|
||||
private Account.Type type;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("ipavailable")
|
||||
private String IPsAvailable;
|
||||
@SerializedName("iplimit")
|
||||
|
|
|
@ -43,11 +43,11 @@ public class Account extends ForwardingSet<User> implements Comparable<Account>
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private Type type;
|
||||
private String networkDomain;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private Long IPsAvailable;
|
||||
private Long IPLimit;
|
||||
private long IPs;
|
||||
|
@ -72,7 +72,7 @@ public class Account extends ForwardingSet<User> implements Comparable<Account>
|
|||
private long volumes;
|
||||
private Set<User> users = ImmutableSet.of();
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ public class Account extends ForwardingSet<User> implements Comparable<Account>
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -285,14 +285,14 @@ public class Account extends ForwardingSet<User> implements Comparable<Account>
|
|||
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("accounttype")
|
||||
private Type type;
|
||||
@SerializedName("networkdomain")
|
||||
private String networkDomain;
|
||||
private String domain;
|
||||
@SerializedName("domainId")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("ipsavailable")
|
||||
private Long IPsAvailable;
|
||||
@SerializedName("iplimit")
|
||||
|
@ -337,7 +337,7 @@ public class Account extends ForwardingSet<User> implements Comparable<Account>
|
|||
private long volumes;
|
||||
private Set<User> users;
|
||||
|
||||
public Account(long id, Type type, String networkDomain, String domain, long domainId, Long IPsAvailable, Long IPLimit, long iPs,
|
||||
public Account(String id, Type type, String networkDomain, String domain, String domainId, Long IPsAvailable, Long IPLimit, long iPs,
|
||||
boolean cleanupRequired, String name, long receivedBytes, long sentBytes, Long snapshotsAvailable,
|
||||
Long snapshotLimit, long snapshots, org.jclouds.cloudstack.domain.Account.State state,
|
||||
Long templatesAvailable, Long templateLimit, long templates, Long VMsAvailable, Long VMLimit, long vMsRunning,
|
||||
|
@ -382,7 +382,7 @@ public class Account extends ForwardingSet<User> implements Comparable<Account>
|
|||
/**
|
||||
* @return the id of the account
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -418,7 +418,7 @@ public class Account extends ForwardingSet<User> implements Comparable<Account>
|
|||
/**
|
||||
* @return id of the Domain the account belongs to
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -598,7 +598,7 @@ public class Account extends ForwardingSet<User> implements Comparable<Account>
|
|||
|
||||
@Override
|
||||
public int compareTo(Account arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,12 +34,12 @@ public class Alert implements Comparable<Alert> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String description;
|
||||
private Date sent;
|
||||
private String type;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ public class Alert implements Comparable<Alert> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String description;
|
||||
private Date sent;
|
||||
private String type;
|
||||
|
@ -73,14 +73,14 @@ public class Alert implements Comparable<Alert> {
|
|||
Alert() {
|
||||
}
|
||||
|
||||
private Alert(long id, String description, Date sent, String type) {
|
||||
private Alert(String id, String description, Date sent, String type) {
|
||||
this.id = id;
|
||||
this.description = description;
|
||||
this.sent = sent;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -129,6 +129,6 @@ public class Alert implements Comparable<Alert> {
|
|||
|
||||
@Override
|
||||
public int compareTo(Alert other) {
|
||||
return Long.valueOf(this.getId()).compareTo(other.getId());
|
||||
return this.getId().compareTo(other.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ import com.google.gson.annotations.SerializedName;
|
|||
public class AsyncCreateResponse {
|
||||
public static final AsyncCreateResponse UNINITIALIZED = new AsyncCreateResponse();
|
||||
|
||||
private long id = -1;
|
||||
private String id;
|
||||
@SerializedName("jobid")
|
||||
private long jobId = -1;
|
||||
private String jobId;
|
||||
|
||||
/**
|
||||
* present only for serializer
|
||||
|
@ -40,7 +40,7 @@ public class AsyncCreateResponse {
|
|||
|
||||
}
|
||||
|
||||
public AsyncCreateResponse(long id, long jobId) {
|
||||
public AsyncCreateResponse(String id, String jobId) {
|
||||
this.id = id;
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
@ -48,14 +48,14 @@ public class AsyncCreateResponse {
|
|||
/**
|
||||
* @return id of the resource being created
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return id of the job in progress
|
||||
*/
|
||||
public long getJobId() {
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,21 +103,21 @@ public class AsyncJob<T> {
|
|||
}
|
||||
|
||||
public static class Builder<T> {
|
||||
private long accountId = -1;
|
||||
private String accountId;
|
||||
private String cmd;
|
||||
private Date created;
|
||||
private long id = -1;
|
||||
private long instanceId = -1;
|
||||
private String id;
|
||||
private String instanceId;
|
||||
private String instanceType;
|
||||
private int progress = -1;
|
||||
private int progress;
|
||||
private T result;
|
||||
private ResultCode resultCode = ResultCode.UNKNOWN;
|
||||
private String resultType;
|
||||
private AsyncJobError error;
|
||||
private Status status = Status.UNKNOWN;
|
||||
private int userId = -1;
|
||||
private String userId;
|
||||
|
||||
public Builder<T> accountId(long accountId) {
|
||||
public Builder<T> accountId(String accountId) {
|
||||
this.accountId = accountId;
|
||||
return this;
|
||||
}
|
||||
|
@ -132,12 +132,12 @@ public class AsyncJob<T> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> id(long id) {
|
||||
public Builder<T> id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> instanceId(long instanceId) {
|
||||
public Builder<T> instanceId(String instanceId) {
|
||||
this.instanceId = instanceId;
|
||||
return this;
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ public class AsyncJob<T> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> userId(int userId) {
|
||||
public Builder<T> userId(String userId) {
|
||||
this.userId = userId;
|
||||
return this;
|
||||
}
|
||||
|
@ -195,17 +195,17 @@ public class AsyncJob<T> {
|
|||
}
|
||||
|
||||
@SerializedName("accountid")
|
||||
private long accountId = -1;
|
||||
private String accountId;
|
||||
private String cmd;
|
||||
private Date created;
|
||||
@SerializedName("jobid")
|
||||
private long id = -1;
|
||||
private String id;
|
||||
@SerializedName("jobinstanceid")
|
||||
private long instanceId = -1;
|
||||
private String instanceId;
|
||||
@SerializedName("jobinstancetype")
|
||||
private String instanceType;
|
||||
@SerializedName("jobprocstatus")
|
||||
private int progress = -1;
|
||||
private int progress;
|
||||
@SerializedName("jobresult")
|
||||
private T result;
|
||||
@SerializedName("jobresultcode")
|
||||
|
@ -215,11 +215,11 @@ public class AsyncJob<T> {
|
|||
@SerializedName("jobstatus")
|
||||
private Status status = Status.UNKNOWN;
|
||||
@SerializedName("userid")
|
||||
private int userId = -1;
|
||||
private String userId;
|
||||
private AsyncJobError error;
|
||||
|
||||
public AsyncJob(long accountId, String cmd, Date created, long id, long instanceId, String instanceType,
|
||||
int progress, T result, ResultCode resultCode, String resultType, Status status, int userId, AsyncJobError error) {
|
||||
public AsyncJob(String accountId, String cmd, Date created, String id, String instanceId, String instanceType,
|
||||
int progress, T result, ResultCode resultCode, String resultType, Status status, String userId, AsyncJobError error) {
|
||||
this.accountId = accountId;
|
||||
this.cmd = cmd;
|
||||
this.created = created;
|
||||
|
@ -246,7 +246,7 @@ public class AsyncJob<T> {
|
|||
/**
|
||||
* @return the account that executed the async command
|
||||
*/
|
||||
public long getAccountId() {
|
||||
public String getAccountId() {
|
||||
return accountId;
|
||||
}
|
||||
|
||||
|
@ -267,14 +267,14 @@ public class AsyncJob<T> {
|
|||
/**
|
||||
* @return async job ID
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the unique ID of the instance/entity object related to the job
|
||||
*/
|
||||
public long getInstanceId() {
|
||||
public String getInstanceId() {
|
||||
return instanceId;
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ public class AsyncJob<T> {
|
|||
/**
|
||||
* @return the user that executed the async command
|
||||
*/
|
||||
public int getUserId() {
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,10 +44,10 @@ public class Capacity implements Comparable<Capacity> {
|
|||
private long capacityTotal;
|
||||
private long capacityUsed;
|
||||
private double percentUsed;
|
||||
private long podId;
|
||||
private String podId;
|
||||
private String podName;
|
||||
private Type type;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
|
||||
public Builder capacityTotal(long capacityTotal) {
|
||||
|
@ -65,7 +65,7 @@ public class Capacity implements Comparable<Capacity> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder podId(long podId) {
|
||||
public Builder podId(String podId) {
|
||||
this.podId = podId;
|
||||
return this;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class Capacity implements Comparable<Capacity> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -142,12 +142,12 @@ public class Capacity implements Comparable<Capacity> {
|
|||
@SerializedName("percentused")
|
||||
private double percentUsed;
|
||||
@SerializedName("podid")
|
||||
private long podId = -1;
|
||||
private String podId;
|
||||
@SerializedName("podname")
|
||||
private String podName;
|
||||
private Capacity.Type type;
|
||||
@SerializedName("zoneid")
|
||||
private long zoneId = -1;
|
||||
private String zoneId;
|
||||
@SerializedName("zonename")
|
||||
private String zoneName;
|
||||
|
||||
|
@ -155,7 +155,7 @@ public class Capacity implements Comparable<Capacity> {
|
|||
Capacity() {
|
||||
}
|
||||
|
||||
public Capacity(long capacityTotal, long capacityUsed, double percentUsed, long podId, String podName, Type type, long zoneId, String zoneName) {
|
||||
public Capacity(long capacityTotal, long capacityUsed, double percentUsed, String podId, String podName, Type type, String zoneId, String zoneName) {
|
||||
this.capacityTotal = capacityTotal;
|
||||
this.capacityUsed = capacityUsed;
|
||||
this.percentUsed = percentUsed;
|
||||
|
@ -178,7 +178,7 @@ public class Capacity implements Comparable<Capacity> {
|
|||
return percentUsed;
|
||||
}
|
||||
|
||||
public long getPodId() {
|
||||
public String getPodId() {
|
||||
return podId;
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ public class Capacity implements Comparable<Capacity> {
|
|||
return type;
|
||||
}
|
||||
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -239,9 +239,9 @@ public class Capacity implements Comparable<Capacity> {
|
|||
|
||||
@Override
|
||||
public int compareTo(Capacity other) {
|
||||
int comparison = Long.valueOf(this.zoneId).compareTo(other.zoneId);
|
||||
int comparison = this.zoneId.compareTo(other.zoneId);
|
||||
if (comparison != 0) return comparison;
|
||||
comparison = Long.valueOf(this.podId).compareTo(other.podId);
|
||||
comparison = this.podId.compareTo(other.podId);
|
||||
if (comparison != 0) return comparison;
|
||||
return Integer.valueOf(this.type.code).compareTo(other.type.code);
|
||||
}
|
||||
|
|
|
@ -57,18 +57,18 @@ public class Cluster implements Comparable<Cluster> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private AllocationState allocationState;
|
||||
private Host.ClusterType clusterType;
|
||||
private String hypervisor;
|
||||
private ManagedState managedState;
|
||||
private String name;
|
||||
private long podId;
|
||||
private String podId;
|
||||
private String podName;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ public class Cluster implements Comparable<Cluster> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder podId(long podId) {
|
||||
public Builder podId(String podId) {
|
||||
this.podId = podId;
|
||||
return this;
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class Cluster implements Comparable<Cluster> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -123,21 +123,21 @@ public class Cluster implements Comparable<Cluster> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("allocationstate") private AllocationState allocationState;
|
||||
@SerializedName("clustertype") private Host.ClusterType clusterType;
|
||||
@SerializedName("hypervisortype") private String hypervisor;
|
||||
@SerializedName("managedstate") private ManagedState managedState;
|
||||
private String name;
|
||||
@SerializedName("podid") private long podId;
|
||||
@SerializedName("podid") private String podId;
|
||||
@SerializedName("podname") private String podName;
|
||||
@SerializedName("zoneid") private long zoneId;
|
||||
@SerializedName("zoneid") private String zoneId;
|
||||
@SerializedName("zonename") private String zoneName;
|
||||
|
||||
// Just for the serializer
|
||||
Cluster() {}
|
||||
|
||||
public Cluster(long id, AllocationState allocationState, Host.ClusterType clusterType, String hypervisor, ManagedState managedState, String name, long podId, String podName, long zoneId, String zoneName) {
|
||||
public Cluster(String id, AllocationState allocationState, Host.ClusterType clusterType, String hypervisor, ManagedState managedState, String name, String podId, String podName, String zoneId, String zoneName) {
|
||||
this.id = id;
|
||||
this.allocationState = allocationState;
|
||||
this.clusterType = clusterType;
|
||||
|
@ -150,7 +150,7 @@ public class Cluster implements Comparable<Cluster> {
|
|||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -174,7 +174,7 @@ public class Cluster implements Comparable<Cluster> {
|
|||
return name;
|
||||
}
|
||||
|
||||
public long getPodId() {
|
||||
public String getPodId() {
|
||||
return podId;
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ public class Cluster implements Comparable<Cluster> {
|
|||
return podName;
|
||||
}
|
||||
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -235,6 +235,6 @@ public class Cluster implements Comparable<Cluster> {
|
|||
|
||||
@Override
|
||||
public int compareTo(Cluster other) {
|
||||
return Long.valueOf(this.id).compareTo(other.id);
|
||||
return this.id.compareTo(other.id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,17 +40,17 @@ public class DiskOffering implements Comparable<DiskOffering> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String name;
|
||||
private String displayText;
|
||||
private Date created;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private int diskSize;
|
||||
private boolean customized;
|
||||
private Set<String> tags = ImmutableSet.of();
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class DiskOffering implements Comparable<DiskOffering> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -100,21 +100,21 @@ public class DiskOffering implements Comparable<DiskOffering> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String name;
|
||||
@SerializedName("displaytext")
|
||||
private String displayText;
|
||||
private Date created;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("disksize")
|
||||
private int diskSize;
|
||||
@SerializedName("iscustomized")
|
||||
private boolean customized;
|
||||
private String tags;
|
||||
|
||||
public DiskOffering(long id, String name, String displayText, Date created, String domain, long domainId,
|
||||
public DiskOffering(String id, String name, String displayText, Date created, String domain, String domainId,
|
||||
int diskSize, boolean customized, Set<String> tags) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
|
@ -139,7 +139,7 @@ public class DiskOffering implements Comparable<DiskOffering> {
|
|||
*
|
||||
* @return the id of the disk offering
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ public class DiskOffering implements Comparable<DiskOffering> {
|
|||
*
|
||||
* @return the domain id of the disk offering
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ public class DiskOffering implements Comparable<DiskOffering> {
|
|||
|
||||
@Override
|
||||
public int compareTo(DiskOffering arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -35,15 +35,15 @@ public class Domain implements Comparable<Domain> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private boolean hasChild;
|
||||
private long level;
|
||||
private String name;
|
||||
private String networkDomain;
|
||||
private long parentDomainId;
|
||||
private String parentDomainId;
|
||||
private String parentDomainName;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ public class Domain implements Comparable<Domain> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder parentDomainId(long parentDomainId) {
|
||||
public Builder parentDomainId(String parentDomainId) {
|
||||
this.parentDomainId = parentDomainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class Domain implements Comparable<Domain> {
|
|||
Domain() {
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("haschild")
|
||||
private boolean hasChild;
|
||||
private long level;
|
||||
|
@ -96,12 +96,12 @@ public class Domain implements Comparable<Domain> {
|
|||
@SerializedName("networkdomain")
|
||||
private String networkDomain;
|
||||
@SerializedName("parentdomainid")
|
||||
private long parentDomainId;
|
||||
private String parentDomainId;
|
||||
@SerializedName("parentdomainname")
|
||||
private String parentDomainName;
|
||||
|
||||
public Domain(long id, boolean hasChild, long level, String name, String networkDomain,
|
||||
long parentDomainId, String parentDomainName) {
|
||||
public Domain(String id, boolean hasChild, long level, String name, String networkDomain,
|
||||
String parentDomainId, String parentDomainName) {
|
||||
this.id = id;
|
||||
this.hasChild = hasChild;
|
||||
this.level = level;
|
||||
|
@ -111,7 +111,7 @@ public class Domain implements Comparable<Domain> {
|
|||
this.parentDomainName = parentDomainName;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ public class Domain implements Comparable<Domain> {
|
|||
return networkDomain;
|
||||
}
|
||||
|
||||
public long getParentDomainId() {
|
||||
public String getParentDomainId() {
|
||||
return parentDomainId;
|
||||
}
|
||||
|
||||
|
@ -165,19 +165,19 @@ public class Domain implements Comparable<Domain> {
|
|||
@Override
|
||||
public String toString() {
|
||||
return "Domain{" +
|
||||
"id=" + id +
|
||||
"id='" + id + '\'' +
|
||||
", hasChild=" + hasChild +
|
||||
", level=" + level +
|
||||
", name='" + name + '\'' +
|
||||
", networkDomain='" + networkDomain + '\'' +
|
||||
", parentDomainId=" + parentDomainId +
|
||||
", parentDomainId='" + parentDomainId + '\'' +
|
||||
", parentDomainName='" + parentDomainName + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Domain arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,12 +32,12 @@ public class Event implements Comparable<Event> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private String description;
|
||||
private Date created;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
//TODO Change to enum : the event level (INFO, WARN, ERROR)
|
||||
private String level;
|
||||
private String parentId;
|
||||
|
@ -46,7 +46,7 @@ public class Event implements Comparable<Event> {
|
|||
private String type;
|
||||
private String username;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public class Event implements Comparable<Event> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -107,12 +107,12 @@ public class Event implements Comparable<Event> {
|
|||
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private String description;
|
||||
private Date created;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
//TODO Change to enum : the event level (INFO, WARN, ERROR)
|
||||
private String level;
|
||||
private String parentId;
|
||||
|
@ -121,7 +121,7 @@ public class Event implements Comparable<Event> {
|
|||
private String type;
|
||||
private String username;
|
||||
|
||||
public Event(long id, String account, String description, Date created, String domain, long domainId, String level,
|
||||
public Event(String id, String account, String description, Date created, String domain, String domainId, String level,
|
||||
String parentId, String state, String type, String username) {
|
||||
this.id = id;
|
||||
this.account = account;
|
||||
|
@ -146,7 +146,7 @@ public class Event implements Comparable<Event> {
|
|||
/**
|
||||
* @return the ID of the event
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ public class Event implements Comparable<Event> {
|
|||
/**
|
||||
* @return the id of the account's domain
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,7 @@ public class Event implements Comparable<Event> {
|
|||
|
||||
@Override
|
||||
public int compareTo(Event arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -78,7 +78,7 @@ public class FirewallRule implements Comparable<FirewallRule> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private Set<String> CIDRs;
|
||||
|
||||
private int startPort;
|
||||
|
@ -88,12 +88,12 @@ public class FirewallRule implements Comparable<FirewallRule> {
|
|||
private String icmpType;
|
||||
|
||||
private String ipAddress;
|
||||
private long ipAddressId;
|
||||
private String ipAddressId;
|
||||
|
||||
private Protocol protocol;
|
||||
private State state;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ public class FirewallRule implements Comparable<FirewallRule> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder ipAddressId(long ipAddressId) {
|
||||
public Builder ipAddressId(String ipAddressId) {
|
||||
this.ipAddressId = ipAddressId;
|
||||
return this;
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ public class FirewallRule implements Comparable<FirewallRule> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("cidrlist")
|
||||
private Set<String> CIDRs;
|
||||
@SerializedName("startport")
|
||||
|
@ -163,12 +163,12 @@ public class FirewallRule implements Comparable<FirewallRule> {
|
|||
@SerializedName("ipaddress")
|
||||
private String ipAddress;
|
||||
@SerializedName("ipaddressid")
|
||||
private long ipAddressId;
|
||||
private String ipAddressId;
|
||||
private Protocol protocol;
|
||||
private State state;
|
||||
|
||||
public FirewallRule(long id, Set<String> CIDRs, int startPort, int endPort,
|
||||
String icmpCode, String icmpType, String ipAddress, long ipAddressId,
|
||||
public FirewallRule(String id, Set<String> CIDRs, int startPort, int endPort,
|
||||
String icmpCode, String icmpType, String ipAddress, String ipAddressId,
|
||||
Protocol protocol, State state) {
|
||||
this.id = id;
|
||||
this.CIDRs = ImmutableSet.copyOf(CIDRs);
|
||||
|
@ -184,10 +184,10 @@ public class FirewallRule implements Comparable<FirewallRule> {
|
|||
|
||||
@Override
|
||||
public int compareTo(FirewallRule arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -215,7 +215,7 @@ public class FirewallRule implements Comparable<FirewallRule> {
|
|||
return ipAddress;
|
||||
}
|
||||
|
||||
public long getIpAddressId() {
|
||||
public String getIpAddressId() {
|
||||
return ipAddressId;
|
||||
}
|
||||
|
||||
|
|
|
@ -121,11 +121,11 @@ public class Host implements Comparable<Host> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private AllocationState allocationState;
|
||||
private int averageLoad;
|
||||
private String capabilities;
|
||||
private long clusterId;
|
||||
private String clusterId;
|
||||
private String clusterName;
|
||||
private ClusterType clusterType;
|
||||
private String cpuAllocated;
|
||||
|
@ -143,28 +143,28 @@ public class Host implements Comparable<Host> {
|
|||
private String hypervisor;
|
||||
private String ipAddress;
|
||||
private boolean localStorageActive;
|
||||
private long jobId;
|
||||
private String jobId;
|
||||
private AsyncJob.Status jobStatus;
|
||||
private Date lastPinged;
|
||||
private long managementServerId;
|
||||
private String managementServerId;
|
||||
private long memoryAllocated;
|
||||
private long memoryTotal;
|
||||
private long memoryUsed;
|
||||
private String name;
|
||||
private long networkKbsRead;
|
||||
private long networkKbsWrite;
|
||||
private long osCategoryId;
|
||||
private long osCategoryName;
|
||||
private long podId;
|
||||
private String osCategoryId;
|
||||
private String osCategoryName;
|
||||
private String podId;
|
||||
private String podName;
|
||||
private Date removed;
|
||||
private State state;
|
||||
private Type type;
|
||||
private String version;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -184,7 +184,7 @@ public class Host implements Comparable<Host> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder clusterId(long clusterId) {
|
||||
public Builder clusterId(String clusterId) {
|
||||
this.clusterId = clusterId;
|
||||
return this;
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ public class Host implements Comparable<Host> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder jobId(long jobId) {
|
||||
public Builder jobId(String jobId) {
|
||||
this.jobId = jobId;
|
||||
return this;
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ public class Host implements Comparable<Host> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder managementServerId(long managementServerId) {
|
||||
public Builder managementServerId(String managementServerId) {
|
||||
this.managementServerId = managementServerId;
|
||||
return this;
|
||||
}
|
||||
|
@ -324,17 +324,17 @@ public class Host implements Comparable<Host> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder osCategoryId(long osCategoryId) {
|
||||
public Builder osCategoryId(String osCategoryId) {
|
||||
this.osCategoryId = osCategoryId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder osCategoryName(long osCategoryName) {
|
||||
public Builder osCategoryName(String osCategoryName) {
|
||||
this.osCategoryName = osCategoryName;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder podId(long podId) {
|
||||
public Builder podId(String podId) {
|
||||
this.podId = podId;
|
||||
return this;
|
||||
}
|
||||
|
@ -364,7 +364,7 @@ public class Host implements Comparable<Host> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -388,7 +388,7 @@ public class Host implements Comparable<Host> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("allocationstate")
|
||||
private AllocationState allocationState;
|
||||
@SerializedName("averageload")
|
||||
|
@ -396,7 +396,7 @@ public class Host implements Comparable<Host> {
|
|||
@SerializedName("capabilities")
|
||||
private String capabilities;
|
||||
@SerializedName("clusterid")
|
||||
private long clusterId;
|
||||
private String clusterId;
|
||||
@SerializedName("clustername")
|
||||
private String clusterName;
|
||||
@SerializedName("clustertype")
|
||||
|
@ -428,13 +428,13 @@ public class Host implements Comparable<Host> {
|
|||
@SerializedName("islocalstorageactive")
|
||||
private boolean localStorageActive;
|
||||
@SerializedName("jobid")
|
||||
private long jobId;
|
||||
private String jobId;
|
||||
@SerializedName("jobstatus")
|
||||
private AsyncJob.Status jobStatus;
|
||||
@SerializedName("lastpinged")
|
||||
private Date lastPinged;
|
||||
@SerializedName("managementserverid")
|
||||
private long managementServerId;
|
||||
private String managementServerId;
|
||||
@SerializedName("memoryallocated")
|
||||
private long memoryAllocated;
|
||||
@SerializedName("memorytotal")
|
||||
|
@ -447,11 +447,11 @@ public class Host implements Comparable<Host> {
|
|||
@SerializedName("networkkbswrite")
|
||||
private long networkKbsWrite;
|
||||
@SerializedName("oscategoryid")
|
||||
private long osCategoryId;
|
||||
private String osCategoryId;
|
||||
@SerializedName("oscategoryname")
|
||||
private long osCategoryName;
|
||||
private String osCategoryName;
|
||||
@SerializedName("podid")
|
||||
private long podId;
|
||||
private String podId;
|
||||
@SerializedName("podname")
|
||||
private String podName;
|
||||
private Date removed;
|
||||
|
@ -459,7 +459,7 @@ public class Host implements Comparable<Host> {
|
|||
private Type type;
|
||||
private String version;
|
||||
@SerializedName("zoneid")
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
@SerializedName("zonename")
|
||||
private String zoneName;
|
||||
|
||||
|
@ -467,16 +467,16 @@ public class Host implements Comparable<Host> {
|
|||
Host() {
|
||||
}
|
||||
|
||||
public Host(long id, AllocationState allocationState, int averageLoad, String capabilities,
|
||||
long clusterId, String clusterName, ClusterType clusterType, String cpuAllocated,
|
||||
public Host(String id, AllocationState allocationState, int averageLoad, String capabilities,
|
||||
String clusterId, String clusterName, ClusterType clusterType, String cpuAllocated,
|
||||
int cpuNumber, int cpuSpeed, String cpuUsed, float cpuWithOverProvisioning,
|
||||
Date created, Date disconnected, long diskSizeAllocated, long diskSizeTotal,
|
||||
String events, boolean hasEnoughCapacity, String hostTags, String hypervisor,
|
||||
String ipAddress, boolean localStorageActive, long jobId, AsyncJob.Status jobStatus,
|
||||
Date lastPinged, long managementServerId, long memoryAllocated, long memoryTotal,
|
||||
String ipAddress, boolean localStorageActive, String jobId, AsyncJob.Status jobStatus,
|
||||
Date lastPinged, String managementServerId, long memoryAllocated, long memoryTotal,
|
||||
long memoryUsed, String name, long networkKbsRead, long networkKbsWrite,
|
||||
long osCategoryId, long osCategoryName, long podId, String podName, Date removed,
|
||||
State state, Type type, String version, long zoneId, String zoneName) {
|
||||
String osCategoryId, String osCategoryName, String podId, String podName, Date removed,
|
||||
State state, Type type, String version, String zoneId, String zoneName) {
|
||||
this.id = id;
|
||||
this.allocationState = allocationState;
|
||||
this.averageLoad = averageLoad;
|
||||
|
@ -521,7 +521,7 @@ public class Host implements Comparable<Host> {
|
|||
this.zoneName = zoneName;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -537,7 +537,7 @@ public class Host implements Comparable<Host> {
|
|||
return capabilities;
|
||||
}
|
||||
|
||||
public long getClusterId() {
|
||||
public String getClusterId() {
|
||||
return clusterId;
|
||||
}
|
||||
|
||||
|
@ -609,7 +609,7 @@ public class Host implements Comparable<Host> {
|
|||
return localStorageActive;
|
||||
}
|
||||
|
||||
public long getJobId() {
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
@ -621,7 +621,7 @@ public class Host implements Comparable<Host> {
|
|||
return lastPinged;
|
||||
}
|
||||
|
||||
public long getManagementServerId() {
|
||||
public String getManagementServerId() {
|
||||
return managementServerId;
|
||||
}
|
||||
|
||||
|
@ -649,15 +649,15 @@ public class Host implements Comparable<Host> {
|
|||
return networkKbsWrite;
|
||||
}
|
||||
|
||||
public long getOsCategoryId() {
|
||||
public String getOsCategoryId() {
|
||||
return osCategoryId;
|
||||
}
|
||||
|
||||
public long getOsCategoryName() {
|
||||
public String getOsCategoryName() {
|
||||
return osCategoryName;
|
||||
}
|
||||
|
||||
public long getPodId() {
|
||||
public String getPodId() {
|
||||
return podId;
|
||||
}
|
||||
|
||||
|
@ -681,7 +681,7 @@ public class Host implements Comparable<Host> {
|
|||
return version;
|
||||
}
|
||||
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -802,6 +802,6 @@ public class Host implements Comparable<Host> {
|
|||
|
||||
@Override
|
||||
public int compareTo(Host other) {
|
||||
return Long.valueOf(this.getId()).compareTo(other.getId());
|
||||
return this.getId().compareTo(other.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,22 +35,22 @@ public class IPForwardingRule implements Comparable<IPForwardingRule> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String IPAddress;
|
||||
private long IPAddressId;
|
||||
private String IPAddressId;
|
||||
private int startPort;
|
||||
private String protocol;
|
||||
public int endPort;
|
||||
private String state;
|
||||
private String virtualMachineDisplayName;
|
||||
public long virtualMachineId;
|
||||
public String virtualMachineId;
|
||||
private String virtualMachineName;
|
||||
private Set<String> CIDRs = ImmutableSet.of();
|
||||
private int privateEndPort;
|
||||
private int publicEndPort;
|
||||
public int publicPort;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public class IPForwardingRule implements Comparable<IPForwardingRule> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder IPAddressId(long IPAddressId) {
|
||||
public Builder IPAddressId(String IPAddressId) {
|
||||
this.IPAddressId = IPAddressId;
|
||||
return this;
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ public class IPForwardingRule implements Comparable<IPForwardingRule> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder virtualMachineId(long virtualMachineId) {
|
||||
public Builder virtualMachineId(String virtualMachineId) {
|
||||
this.virtualMachineId = virtualMachineId;
|
||||
return this;
|
||||
}
|
||||
|
@ -126,11 +126,11 @@ public class IPForwardingRule implements Comparable<IPForwardingRule> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("ipaddress")
|
||||
private String IPAddress;
|
||||
@SerializedName("ipaddressid")
|
||||
private long IPAddressId;
|
||||
private String IPAddressId;
|
||||
@SerializedName("startport")
|
||||
private int startPort;
|
||||
private String protocol;
|
||||
|
@ -140,7 +140,7 @@ public class IPForwardingRule implements Comparable<IPForwardingRule> {
|
|||
@SerializedName("virtualmachinedisplayname")
|
||||
private String virtualMachineDisplayName;
|
||||
@SerializedName("virtualmachineid")
|
||||
public long virtualMachineId;
|
||||
public String virtualMachineId;
|
||||
@SerializedName("virtualmachinename")
|
||||
private String virtualMachineName;
|
||||
@SerializedName("publicport")
|
||||
|
@ -157,8 +157,8 @@ public class IPForwardingRule implements Comparable<IPForwardingRule> {
|
|||
|
||||
}
|
||||
|
||||
public IPForwardingRule(long id, String iPAddress, long iPAddressId, int startPort, String protocol, int endPort,
|
||||
String state, String virtualMachineDisplayName, long virtualMachineId, String virtualMachineName,
|
||||
public IPForwardingRule(String id, String iPAddress, String iPAddressId, int startPort, String protocol, int endPort,
|
||||
String state, String virtualMachineDisplayName, String virtualMachineId, String virtualMachineName,
|
||||
int publicEndPort, int publicPort, Set<String> CIDRs, int privateEndPort) {
|
||||
this.id = id;
|
||||
this.IPAddress = iPAddress;
|
||||
|
@ -179,13 +179,13 @@ public class IPForwardingRule implements Comparable<IPForwardingRule> {
|
|||
|
||||
@Override
|
||||
public int compareTo(IPForwardingRule arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ID of the ip forwarding rule
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ public class IPForwardingRule implements Comparable<IPForwardingRule> {
|
|||
/**
|
||||
* @return the public ip address id for the ip forwarding rule
|
||||
*/
|
||||
public long getIPAddressId() {
|
||||
public String getIPAddressId() {
|
||||
return IPAddressId;
|
||||
}
|
||||
|
||||
|
@ -241,7 +241,7 @@ public class IPForwardingRule implements Comparable<IPForwardingRule> {
|
|||
/**
|
||||
* @return the VM ID for the ip forwarding rule
|
||||
*/
|
||||
public long getVirtualMachineId() {
|
||||
public String getVirtualMachineId() {
|
||||
return virtualMachineId;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,43 +36,43 @@ public class ISO implements Comparable<ISO> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private long accountId;
|
||||
private String accountId;
|
||||
private boolean bootable;
|
||||
private String checksum;
|
||||
private Date created;
|
||||
private boolean crossZones;
|
||||
private String displayText;
|
||||
private String domain;
|
||||
private long domainid;
|
||||
private String domainid;
|
||||
private String format;
|
||||
private long hostId;
|
||||
private String hostId;
|
||||
private String hostName;
|
||||
private String hypervisor;
|
||||
private boolean isExtractable;
|
||||
private boolean isFeatured;
|
||||
private boolean isPublic;
|
||||
private boolean isReady;
|
||||
private long jobId;
|
||||
private String jobId;
|
||||
private String jobStatus;
|
||||
private String name;
|
||||
private long osTypeId;
|
||||
private String osTypeId;
|
||||
private String osTypeName;
|
||||
private boolean passwordEnabled;
|
||||
private Date removed;
|
||||
private long size;
|
||||
private long sourceTemplateId;
|
||||
private String sourceTemplateId;
|
||||
private String status;
|
||||
private String templateTag;
|
||||
private String templateType;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
|
||||
/**
|
||||
* @param id the template ID
|
||||
*/
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @param accountId the account id to which the template belongs
|
||||
*/
|
||||
public Builder accountId(long accountId) {
|
||||
public Builder accountId(String accountId) {
|
||||
this.accountId = accountId;
|
||||
return this;
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @param domainid the ID of the domain to which the template belongs
|
||||
*/
|
||||
public Builder domainid(long domainid) {
|
||||
public Builder domainid(String domainid) {
|
||||
this.domainid = domainid;
|
||||
return this;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @param hostId the ID of the secondary storage host for the template
|
||||
*/
|
||||
public Builder hostId(long hostId) {
|
||||
public Builder hostId(String hostId) {
|
||||
this.hostId = hostId;
|
||||
return this;
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @param jobId shows the current pending asynchronous job ID. This tag is not returned if no current pending jobs are acting on the template
|
||||
*/
|
||||
public Builder jobId(long jobId) {
|
||||
public Builder jobId(String jobId) {
|
||||
this.jobId = jobId;
|
||||
return this;
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @param osTypeId the ID of the OS type for this template.
|
||||
*/
|
||||
public Builder osTypeId(long osTypeId) {
|
||||
public Builder osTypeId(String osTypeId) {
|
||||
this.osTypeId = osTypeId;
|
||||
return this;
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @param sourceTemplateId the template ID of the parent template if present
|
||||
*/
|
||||
public Builder sourceTemplateId(long sourceTemplateId) {
|
||||
public Builder sourceTemplateId(String sourceTemplateId) {
|
||||
this.sourceTemplateId = sourceTemplateId;
|
||||
return this;
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @param zoneId the ID of the zone for this template
|
||||
*/
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -327,10 +327,10 @@ public class ISO implements Comparable<ISO> {
|
|||
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
@SerializedName("accountid")
|
||||
private long accountId;
|
||||
private String accountId;
|
||||
private boolean bootable;
|
||||
private String checksum;
|
||||
private Date created;
|
||||
|
@ -339,10 +339,10 @@ public class ISO implements Comparable<ISO> {
|
|||
private String displayText;
|
||||
private String domain;
|
||||
@SerializedName("domainId")
|
||||
private long domainid;
|
||||
private String domainid;
|
||||
private String format;
|
||||
@SerializedName("hostid")
|
||||
private long hostId;
|
||||
private String hostId;
|
||||
@SerializedName("hostname")
|
||||
private String hostName;
|
||||
private String hypervisor;
|
||||
|
@ -355,12 +355,12 @@ public class ISO implements Comparable<ISO> {
|
|||
@SerializedName("isready")
|
||||
private boolean isReady;
|
||||
@SerializedName("jobid")
|
||||
private long jobId;
|
||||
private String jobId;
|
||||
@SerializedName("jobstatus")
|
||||
private String jobStatus;
|
||||
private String name;
|
||||
@SerializedName("ostypeid")
|
||||
private long osTypeId;
|
||||
private String osTypeId;
|
||||
@SerializedName("ostypename")
|
||||
private String osTypeName;
|
||||
@SerializedName("passwordenabled")
|
||||
|
@ -368,14 +368,14 @@ public class ISO implements Comparable<ISO> {
|
|||
private Date removed;
|
||||
private long size;
|
||||
@SerializedName("sourcetemplateid")
|
||||
private long sourceTemplateId;
|
||||
private String sourceTemplateId;
|
||||
private String status;
|
||||
@SerializedName("templatetag")
|
||||
private String templateTag;
|
||||
@SerializedName("templatetype")
|
||||
private String templateType;
|
||||
@SerializedName("zoneid")
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
@SerializedName("zonename")
|
||||
private String zoneName;
|
||||
|
||||
|
@ -388,7 +388,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @return the template ID
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -402,7 +402,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @return the account id to which the template belongs
|
||||
*/
|
||||
public long getAccountId() {
|
||||
public String getAccountId() {
|
||||
return accountId;
|
||||
}
|
||||
|
||||
|
@ -451,7 +451,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @return the ID of the domain to which the template belongs
|
||||
*/
|
||||
public long getDomainid() {
|
||||
public String getDomainid() {
|
||||
return domainid;
|
||||
}
|
||||
|
||||
|
@ -465,7 +465,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @return the ID of the secondary storage host for the template
|
||||
*/
|
||||
public long getHostId() {
|
||||
public String getHostId() {
|
||||
return hostId;
|
||||
}
|
||||
|
||||
|
@ -514,7 +514,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @return shows the current pending asynchronous job ID. This tag is not returned if no current pending jobs are acting on the template
|
||||
*/
|
||||
public long getJobId() {
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
@ -535,7 +535,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @return the ID of the OS type for this template.
|
||||
*/
|
||||
public long getOsTypeId() {
|
||||
public String getOsTypeId() {
|
||||
return osTypeId;
|
||||
}
|
||||
|
||||
|
@ -570,7 +570,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @return the template ID of the parent template if present
|
||||
*/
|
||||
public long getSourceTemplateId() {
|
||||
public String getSourceTemplateId() {
|
||||
return sourceTemplateId;
|
||||
}
|
||||
|
||||
|
@ -598,7 +598,7 @@ public class ISO implements Comparable<ISO> {
|
|||
/**
|
||||
* @return the ID of the zone for this template
|
||||
*/
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -700,7 +700,7 @@ public class ISO implements Comparable<ISO> {
|
|||
|
||||
@Override
|
||||
public int compareTo(ISO other) {
|
||||
return new Long(id).compareTo(other.getId());
|
||||
return id.compareTo(other.getId());
|
||||
}
|
||||
|
||||
public enum ISOFilter {
|
||||
|
|
|
@ -34,10 +34,10 @@ public class ISOExtraction implements Comparable<ISOExtraction> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private long accountId;
|
||||
private String id;
|
||||
private String accountId;
|
||||
private Date created;
|
||||
private long extractId;
|
||||
private String extractId;
|
||||
private ExtractMode extractMode;
|
||||
private String name;
|
||||
private String state;
|
||||
|
@ -45,13 +45,13 @@ public class ISOExtraction implements Comparable<ISOExtraction> {
|
|||
private String storageType;
|
||||
private int uploadPercentage;
|
||||
private String url;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
|
||||
/**
|
||||
* @param id the id of extracted object
|
||||
*/
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ public class ISOExtraction implements Comparable<ISOExtraction> {
|
|||
/**
|
||||
* @param accountId the account id to which the extracted object belongs
|
||||
*/
|
||||
public Builder accountId(long accountId) {
|
||||
public Builder accountId(String accountId) {
|
||||
this.accountId = accountId;
|
||||
return this;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class ISOExtraction implements Comparable<ISOExtraction> {
|
|||
/**
|
||||
* @param extractId the upload id of extracted object
|
||||
*/
|
||||
public Builder extractId(long extractId) {
|
||||
public Builder extractId(String extractId) {
|
||||
this.extractId = extractId;
|
||||
return this;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public class ISOExtraction implements Comparable<ISOExtraction> {
|
|||
/**
|
||||
* @param zoneId zone ID the object was extracted from
|
||||
*/
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -154,11 +154,11 @@ public class ISOExtraction implements Comparable<ISOExtraction> {
|
|||
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("accountid")
|
||||
private long accountId;
|
||||
private String accountId;
|
||||
private Date created;
|
||||
private long extractId;
|
||||
private String extractId;
|
||||
private ExtractMode extractMode;
|
||||
private String name;
|
||||
private String state;
|
||||
|
@ -169,7 +169,7 @@ public class ISOExtraction implements Comparable<ISOExtraction> {
|
|||
private int uploadPercentage;
|
||||
private String url;
|
||||
@SerializedName("zoneid")
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
@SerializedName("zonename")
|
||||
private String zoneName;
|
||||
|
||||
|
@ -182,14 +182,14 @@ public class ISOExtraction implements Comparable<ISOExtraction> {
|
|||
/**
|
||||
* @return the id of extracted object
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the account id to which the extracted object belongs
|
||||
*/
|
||||
public long getAccountId() {
|
||||
public String getAccountId() {
|
||||
return accountId;
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,7 @@ public class ISOExtraction implements Comparable<ISOExtraction> {
|
|||
/**
|
||||
* @return the upload id of extracted object
|
||||
*/
|
||||
public long getExtractId() {
|
||||
public String getExtractId() {
|
||||
return extractId;
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,7 @@ public class ISOExtraction implements Comparable<ISOExtraction> {
|
|||
/**
|
||||
* @return zone ID the object was extracted from
|
||||
*/
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -320,7 +320,7 @@ public class ISOExtraction implements Comparable<ISOExtraction> {
|
|||
|
||||
@Override
|
||||
public int compareTo(ISOExtraction other) {
|
||||
return new Long(id).compareTo(other.getId());
|
||||
return id.compareTo(other.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,15 +34,15 @@ public class ISOPermissions implements Comparable<ISOPermissions> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private boolean isPublic;
|
||||
|
||||
/**
|
||||
* @param id the template ID
|
||||
*/
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public class ISOPermissions implements Comparable<ISOPermissions> {
|
|||
/**
|
||||
* @param domainId the ID of the domain to which the template belongs
|
||||
*/
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -73,11 +73,11 @@ public class ISOPermissions implements Comparable<ISOPermissions> {
|
|||
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("account")
|
||||
private Set<String> accounts;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("ispublic")
|
||||
private boolean isPublic;
|
||||
|
||||
|
@ -90,7 +90,7 @@ public class ISOPermissions implements Comparable<ISOPermissions> {
|
|||
/**
|
||||
* @return the template ID
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ public class ISOPermissions implements Comparable<ISOPermissions> {
|
|||
/**
|
||||
* @return the ID of the domain to which the template belongs
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -147,7 +147,7 @@ public class ISOPermissions implements Comparable<ISOPermissions> {
|
|||
|
||||
@Override
|
||||
public int compareTo(ISOPermissions other) {
|
||||
return new Long(id).compareTo(other.getId());
|
||||
return id.compareTo(other.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public class IngressRule implements Comparable<IngressRule> {
|
|||
private int ICMPCode = -1;
|
||||
private int ICMPType = -1;
|
||||
private String protocol;
|
||||
private long id = -1;
|
||||
private String id;
|
||||
private String securityGroupName;
|
||||
private int startPort = -1;
|
||||
|
||||
|
@ -73,7 +73,7 @@ public class IngressRule implements Comparable<IngressRule> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ public class IngressRule implements Comparable<IngressRule> {
|
|||
private int ICMPType = -1;
|
||||
private String protocol;
|
||||
@SerializedName("ruleid")
|
||||
private long id = -1;
|
||||
private String id;
|
||||
@SerializedName("securitygroupname")
|
||||
private String securityGroupName;
|
||||
@SerializedName("startport")
|
||||
|
@ -115,7 +115,7 @@ public class IngressRule implements Comparable<IngressRule> {
|
|||
|
||||
}
|
||||
|
||||
public IngressRule(String account, String CIDR, int endPort, int iCMPCode, int iCMPType, String protocol, long id,
|
||||
public IngressRule(String account, String CIDR, int endPort, int iCMPCode, int iCMPType, String protocol, String id,
|
||||
String securityGroupName, int startPort) {
|
||||
if (account == null)
|
||||
checkArgument(securityGroupName == null && CIDR != null,
|
||||
|
@ -179,7 +179,7 @@ public class IngressRule implements Comparable<IngressRule> {
|
|||
/**
|
||||
* @return the id of the ingress rule
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -239,6 +239,6 @@ public class IngressRule implements Comparable<IngressRule> {
|
|||
|
||||
@Override
|
||||
public int compareTo(IngressRule arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,22 +72,22 @@ public class LoadBalancerRule implements Comparable<LoadBalancerRule> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private Algorithm algorithm;
|
||||
private String description;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String name;
|
||||
private int privatePort;
|
||||
private String publicIP;
|
||||
private long publicIPId;
|
||||
private String publicIPId;
|
||||
private int publicPort;
|
||||
private State state;
|
||||
private Set<String> CIDRs = ImmutableSet.of();
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class LoadBalancerRule implements Comparable<LoadBalancerRule> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ public class LoadBalancerRule implements Comparable<LoadBalancerRule> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder publicIPId(long publicIPId) {
|
||||
public Builder publicIPId(String publicIPId) {
|
||||
this.publicIPId = publicIPId;
|
||||
return this;
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ public class LoadBalancerRule implements Comparable<LoadBalancerRule> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -163,36 +163,36 @@ public class LoadBalancerRule implements Comparable<LoadBalancerRule> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private Algorithm algorithm;
|
||||
private String description;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String name;
|
||||
@SerializedName("privateport")
|
||||
private int privatePort;
|
||||
@SerializedName("publicip")
|
||||
private String publicIP;
|
||||
@SerializedName("publicipid")
|
||||
private long publicIPId;
|
||||
private String publicIPId;
|
||||
@SerializedName("publicport")
|
||||
private int publicPort;
|
||||
private State state;
|
||||
@SerializedName("cidrlist")
|
||||
private Set<String> CIDRs;
|
||||
@SerializedName("zoneId")
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
|
||||
// for deserializer
|
||||
LoadBalancerRule() {
|
||||
|
||||
}
|
||||
|
||||
public LoadBalancerRule(long id, String account, Algorithm algorithm, String description, String domain,
|
||||
long domainId, String name, int privatePort, String publicIP, long publicIPId, int publicPort, State state,
|
||||
long zoneId, Set<String> CIDRs) {
|
||||
public LoadBalancerRule(String id, String account, Algorithm algorithm, String description, String domain,
|
||||
String domainId, String name, int privatePort, String publicIP, String publicIPId, int publicPort, State state,
|
||||
String zoneId, Set<String> CIDRs) {
|
||||
this.id = id;
|
||||
this.account = account;
|
||||
this.algorithm = algorithm;
|
||||
|
@ -213,7 +213,7 @@ public class LoadBalancerRule implements Comparable<LoadBalancerRule> {
|
|||
/**
|
||||
* @return the load balancer rule ID
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -248,7 +248,7 @@ public class LoadBalancerRule implements Comparable<LoadBalancerRule> {
|
|||
/**
|
||||
* @return the domain ID of the load balancer rule
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ public class LoadBalancerRule implements Comparable<LoadBalancerRule> {
|
|||
/**
|
||||
* @return the public ip address id
|
||||
*/
|
||||
public long getPublicIPId() {
|
||||
public String getPublicIPId() {
|
||||
return publicIPId;
|
||||
}
|
||||
|
||||
|
@ -304,13 +304,13 @@ public class LoadBalancerRule implements Comparable<LoadBalancerRule> {
|
|||
/**
|
||||
* @return the id of the zone the rule beStrings to
|
||||
*/
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(LoadBalancerRule arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ public class LoginResponse implements Comparable<LoginResponse> {
|
|||
public static class Builder {
|
||||
|
||||
private String username;
|
||||
private long userId;
|
||||
private String userId;
|
||||
private String password;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private long timeout;
|
||||
private boolean registered;
|
||||
private String accountName;
|
||||
|
@ -73,7 +73,7 @@ public class LoginResponse implements Comparable<LoginResponse> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder userId(long userId) {
|
||||
public Builder userId(String userId) {
|
||||
this.userId = userId;
|
||||
return this;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ public class LoginResponse implements Comparable<LoginResponse> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -146,10 +146,10 @@ public class LoginResponse implements Comparable<LoginResponse> {
|
|||
|
||||
private final String username;
|
||||
@SerializedName("userid")
|
||||
private final long userId;
|
||||
private final String userId;
|
||||
private final String password;
|
||||
@SerializedName("domainid")
|
||||
private final long domainId;
|
||||
private final String domainId;
|
||||
private final long timeout;
|
||||
private final boolean registered;
|
||||
@SerializedName("account")
|
||||
|
@ -167,7 +167,7 @@ public class LoginResponse implements Comparable<LoginResponse> {
|
|||
private final String sessionKey;
|
||||
private final String jSessionId;
|
||||
|
||||
public LoginResponse(String username, long userId, String password, long domainId, long timeout, boolean registered,
|
||||
public LoginResponse(String username, String userId, String password, String domainId, long timeout, boolean registered,
|
||||
String accountName, String firstName, String lastName, Account.Type accountType, String timezone,
|
||||
String timezoneOffset, String sessionKey, String jSessionId) {
|
||||
this.username = username;
|
||||
|
@ -190,7 +190,7 @@ public class LoginResponse implements Comparable<LoginResponse> {
|
|||
return username;
|
||||
}
|
||||
|
||||
public long getUserId() {
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
|
@ -198,7 +198,7 @@ public class LoginResponse implements Comparable<LoginResponse> {
|
|||
return password;
|
||||
}
|
||||
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ public class NIC {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private URI broadcastURI;
|
||||
private String gateway;
|
||||
private String IPAddress;
|
||||
|
@ -41,11 +41,11 @@ public class NIC {
|
|||
private URI isolationURI;
|
||||
private String netmask;
|
||||
private String macAddress;
|
||||
private long networkId;
|
||||
private String networkId;
|
||||
private TrafficType trafficType;
|
||||
private GuestIPType guestIPType;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public class NIC {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder networkId(long networkId) {
|
||||
public Builder networkId(String networkId) {
|
||||
this.networkId = networkId;
|
||||
return this;
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ public class NIC {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("broadcasturi")
|
||||
private URI broadcastURI;
|
||||
private String gateway;
|
||||
|
@ -121,7 +121,7 @@ public class NIC {
|
|||
@SerializedName("macaddress")
|
||||
private String macAddress;
|
||||
@SerializedName("networkid")
|
||||
private long networkId;
|
||||
private String networkId;
|
||||
@SerializedName("traffictype")
|
||||
private TrafficType trafficType;
|
||||
@SerializedName("type")
|
||||
|
@ -134,8 +134,8 @@ public class NIC {
|
|||
|
||||
}
|
||||
|
||||
public NIC(long id, URI broadcastURI, String gateway, String iPAddress, boolean isDefault, URI isolationURI,
|
||||
String netmask, String macAddress, long networkId, TrafficType trafficType, GuestIPType guestIPType) {
|
||||
public NIC(String id, URI broadcastURI, String gateway, String iPAddress, boolean isDefault, URI isolationURI,
|
||||
String netmask, String macAddress, String networkId, TrafficType trafficType, GuestIPType guestIPType) {
|
||||
this.id = id;
|
||||
this.broadcastURI = broadcastURI;
|
||||
this.gateway = gateway;
|
||||
|
@ -152,7 +152,7 @@ public class NIC {
|
|||
/**
|
||||
* the ID of the nic
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ public class NIC {
|
|||
/**
|
||||
* the ID of the corresponding network
|
||||
*/
|
||||
public long getNetworkId() {
|
||||
public String getNetworkId() {
|
||||
return networkId;
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ public class Network implements Comparable<Network> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String broadcastDomainType;
|
||||
private URI broadcastURI;
|
||||
private String displayText;
|
||||
|
@ -59,24 +59,24 @@ public class Network implements Comparable<Network> {
|
|||
private String networkDomain;
|
||||
private String networkOfferingAvailability;
|
||||
private String networkOfferingDisplayText;
|
||||
private long networkOfferingId;
|
||||
private String networkOfferingId;
|
||||
private String networkOfferingName;
|
||||
private long related;
|
||||
private String related;
|
||||
private String startIP;
|
||||
private String name;
|
||||
private String state;
|
||||
private GuestIPType guestIPType;
|
||||
private String VLAN;
|
||||
private TrafficType trafficType;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private Set<? extends NetworkService> services = ImmutableSet.<NetworkService>of();
|
||||
private String account;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private boolean securityGroupEnabled;
|
||||
private Set<String> tags = ImmutableSet.of();
|
||||
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ public class Network implements Comparable<Network> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ public class Network implements Comparable<Network> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder networkOfferingId(long networkOfferingId) {
|
||||
public Builder networkOfferingId(String networkOfferingId) {
|
||||
this.networkOfferingId = networkOfferingId;
|
||||
return this;
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ public class Network implements Comparable<Network> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder related(long related) {
|
||||
public Builder related(String related) {
|
||||
this.related = related;
|
||||
return this;
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ public class Network implements Comparable<Network> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ public class Network implements Comparable<Network> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
@SerializedName("broadcastdomaintype")
|
||||
private String broadcastDomainType;
|
||||
|
@ -248,7 +248,7 @@ public class Network implements Comparable<Network> {
|
|||
private String DNS2;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("endip")
|
||||
private String endIP;
|
||||
private String gateway;
|
||||
|
@ -267,10 +267,10 @@ public class Network implements Comparable<Network> {
|
|||
@SerializedName("networkofferingdisplaytext")
|
||||
private String networkOfferingDisplayText;
|
||||
@SerializedName("networkofferingid")
|
||||
private long networkOfferingId;
|
||||
private String networkOfferingId;
|
||||
@SerializedName("networkofferingname")
|
||||
private String networkOfferingName;
|
||||
private long related;
|
||||
private String related;
|
||||
@SerializedName("startip")
|
||||
private String startIP;
|
||||
private String name;
|
||||
|
@ -282,7 +282,7 @@ public class Network implements Comparable<Network> {
|
|||
@SerializedName("traffictype")
|
||||
private TrafficType trafficType;
|
||||
@SerializedName("zoneid")
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String tags;
|
||||
@SerializedName("securitygroupenabled")
|
||||
private boolean securityGroupEnabled;
|
||||
|
@ -297,12 +297,12 @@ public class Network implements Comparable<Network> {
|
|||
|
||||
}
|
||||
|
||||
public Network(long id, String broadcastDomainType, URI broadcastURI, String displayText,
|
||||
List<String> DNS, String domain, long domainId, String endIP, String gateway, boolean isDefault,
|
||||
public Network(String id, String broadcastDomainType, URI broadcastURI, String displayText,
|
||||
List<String> DNS, String domain, String domainId, String endIP, String gateway, boolean isDefault,
|
||||
boolean isShared, boolean isSystem, String netmask, String networkDomain, String networkOfferingAvailability,
|
||||
String networkOfferingDisplayText, long networkOfferingId, String networkOfferingName, long related,
|
||||
String networkOfferingDisplayText, String networkOfferingId, String networkOfferingName, String related,
|
||||
String startIP, String name, String state, GuestIPType type, String vLAN, TrafficType trafficType,
|
||||
long zoneId, Set<? extends NetworkService> services, Set<String> tags, boolean securityGroupEnabled,
|
||||
String zoneId, Set<? extends NetworkService> services, Set<String> tags, boolean securityGroupEnabled,
|
||||
String account) {
|
||||
this.id = id;
|
||||
this.broadcastDomainType = broadcastDomainType;
|
||||
|
@ -340,7 +340,7 @@ public class Network implements Comparable<Network> {
|
|||
/**
|
||||
* @return network id
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -387,7 +387,7 @@ public class Network implements Comparable<Network> {
|
|||
/**
|
||||
* @return the domain id of the Network
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -499,7 +499,7 @@ public class Network implements Comparable<Network> {
|
|||
/**
|
||||
* @return network offering id the network is created from
|
||||
*/
|
||||
public long getNetworkOfferingId() {
|
||||
public String getNetworkOfferingId() {
|
||||
return networkOfferingId;
|
||||
}
|
||||
|
||||
|
@ -513,7 +513,7 @@ public class Network implements Comparable<Network> {
|
|||
/**
|
||||
* @return related to what other network configuration
|
||||
*/
|
||||
public long getRelated() {
|
||||
public String getRelated() {
|
||||
return related;
|
||||
}
|
||||
|
||||
|
@ -527,7 +527,7 @@ public class Network implements Comparable<Network> {
|
|||
/**
|
||||
* @return zone id of the network
|
||||
*/
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -640,6 +640,6 @@ public class Network implements Comparable<Network> {
|
|||
|
||||
@Override
|
||||
public int compareTo(Network arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public class NetworkOffering implements Comparable<NetworkOffering> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String name;
|
||||
private String displayText;
|
||||
private Date created;
|
||||
|
@ -54,7 +54,7 @@ public class NetworkOffering implements Comparable<NetworkOffering> {
|
|||
private GuestIPType guestIPType;
|
||||
private Set<String> tags = ImmutableSet.of();
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public class NetworkOffering implements Comparable<NetworkOffering> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String name;
|
||||
@SerializedName("displaytext")
|
||||
private String displayText;
|
||||
|
@ -141,7 +141,7 @@ public class NetworkOffering implements Comparable<NetworkOffering> {
|
|||
private int networkRate = -1;
|
||||
private String tags;
|
||||
|
||||
public NetworkOffering(long id, String name, String displayText, @Nullable Date created,
|
||||
public NetworkOffering(String id, String name, String displayText, @Nullable Date created,
|
||||
NetworkOfferingAvailabilityType availability, boolean supportsVLAN, @Nullable Integer maxConnections,
|
||||
boolean isDefault, TrafficType trafficType, GuestIPType guestIPType, int networkRate, Set<String> tags) {
|
||||
this.id = id;
|
||||
|
@ -170,7 +170,7 @@ public class NetworkOffering implements Comparable<NetworkOffering> {
|
|||
*
|
||||
* @return the id of the network offering
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ public class NetworkOffering implements Comparable<NetworkOffering> {
|
|||
|
||||
@Override
|
||||
public int compareTo(NetworkOffering arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -32,16 +32,16 @@ public class OSType implements Comparable<OSType> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private long OSCategoryId;
|
||||
private String id;
|
||||
private String OSCategoryId;
|
||||
private String description;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder OSCategoryId(long OSCategoryId) {
|
||||
public Builder OSCategoryId(String OSCategoryId) {
|
||||
this.OSCategoryId = OSCategoryId;
|
||||
return this;
|
||||
}
|
||||
|
@ -61,12 +61,12 @@ public class OSType implements Comparable<OSType> {
|
|||
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("oscategoryid")
|
||||
private long OSCategoryId;
|
||||
private String OSCategoryId;
|
||||
private String description;
|
||||
|
||||
public OSType(long id, long OSCategoryId, String description) {
|
||||
public OSType(String id, String OSCategoryId, String description) {
|
||||
this.id = id;
|
||||
this.OSCategoryId = OSCategoryId;
|
||||
this.description = description;
|
||||
|
@ -75,14 +75,14 @@ public class OSType implements Comparable<OSType> {
|
|||
/**
|
||||
* @return the ID of the OS type
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ID of the OS category
|
||||
*/
|
||||
public long getOSCategoryId() {
|
||||
public String getOSCategoryId() {
|
||||
return OSCategoryId;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ public class OSType implements Comparable<OSType> {
|
|||
|
||||
@Override
|
||||
public int compareTo(OSType arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,9 +34,9 @@ public class Pod implements Comparable<Pod> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String name;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private String gateway;
|
||||
private String netmask;
|
||||
|
@ -49,7 +49,7 @@ public class Pod implements Comparable<Pod> {
|
|||
/**
|
||||
* @param id the ID of the Pod
|
||||
*/
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ public class Pod implements Comparable<Pod> {
|
|||
/**
|
||||
* @param zoneId the Zone ID of the Pod
|
||||
*/
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -127,9 +127,9 @@ public class Pod implements Comparable<Pod> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String name;
|
||||
@SerializedName("zoneid") private long zoneId;
|
||||
@SerializedName("zoneid") private String zoneId;
|
||||
@SerializedName("zonename") private String zoneName;
|
||||
private String gateway;
|
||||
private String netmask;
|
||||
|
@ -140,7 +140,7 @@ public class Pod implements Comparable<Pod> {
|
|||
/* Just for the serializer */
|
||||
Pod() {}
|
||||
|
||||
public Pod(long id, String name, long zoneId, String zoneName, String gateway, String netmask, String startIp, String endIp, AllocationState allocationState) {
|
||||
public Pod(String id, String name, String zoneId, String zoneName, String gateway, String netmask, String startIp, String endIp, AllocationState allocationState) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.zoneId = zoneId;
|
||||
|
@ -155,7 +155,7 @@ public class Pod implements Comparable<Pod> {
|
|||
/**
|
||||
* @return id the ID of the Pod
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ public class Pod implements Comparable<Pod> {
|
|||
/**
|
||||
* @return zoneId the Zone ID of the Pod
|
||||
*/
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -257,6 +257,6 @@ public class Pod implements Comparable<Pod> {
|
|||
|
||||
@Override
|
||||
public int compareTo(Pod other) {
|
||||
return Long.valueOf(this.id).compareTo(other.id);
|
||||
return this.id.compareTo(other.id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,21 +78,21 @@ public class PortForwardingRule implements Comparable<PortForwardingRule> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String IPAddress;
|
||||
private long IPAddressId;
|
||||
private String IPAddressId;
|
||||
private int privatePort;
|
||||
private Protocol protocol;
|
||||
public int publicPort;
|
||||
private State state;
|
||||
private String virtualMachineDisplayName;
|
||||
public long virtualMachineId;
|
||||
public String virtualMachineId;
|
||||
private String virtualMachineName;
|
||||
private Set<String> CIDRs = ImmutableSet.of();
|
||||
private int privateEndPort;
|
||||
private int publicEndPort;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ public class PortForwardingRule implements Comparable<PortForwardingRule> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder IPAddressId(long IPAddressId) {
|
||||
public Builder IPAddressId(String IPAddressId) {
|
||||
this.IPAddressId = IPAddressId;
|
||||
return this;
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ public class PortForwardingRule implements Comparable<PortForwardingRule> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder virtualMachineId(long virtualMachineId) {
|
||||
public Builder virtualMachineId(String virtualMachineId) {
|
||||
this.virtualMachineId = virtualMachineId;
|
||||
return this;
|
||||
}
|
||||
|
@ -163,11 +163,11 @@ public class PortForwardingRule implements Comparable<PortForwardingRule> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("ipaddress")
|
||||
private String IPAddress;
|
||||
@SerializedName("ipaddressid")
|
||||
private long IPAddressId;
|
||||
private String IPAddressId;
|
||||
@SerializedName("privateport")
|
||||
private int privatePort;
|
||||
private Protocol protocol;
|
||||
|
@ -177,7 +177,7 @@ public class PortForwardingRule implements Comparable<PortForwardingRule> {
|
|||
@SerializedName("virtualmachinedisplayname")
|
||||
private String virtualMachineDisplayName;
|
||||
@SerializedName("virtualmachineid")
|
||||
public long virtualMachineId;
|
||||
public String virtualMachineId;
|
||||
@SerializedName("virtualmachinename")
|
||||
private String virtualMachineName;
|
||||
@SerializedName("cidrlist")
|
||||
|
@ -187,8 +187,8 @@ public class PortForwardingRule implements Comparable<PortForwardingRule> {
|
|||
@SerializedName("publicendport")
|
||||
private int publicEndPort;
|
||||
|
||||
public PortForwardingRule(long id, String iPAddress, long iPAddressId, int privatePort, Protocol protocol,
|
||||
int publicPort, State state, String virtualMachineDisplayName, long virtualMachineId,
|
||||
public PortForwardingRule(String id, String iPAddress, String iPAddressId, int privatePort, Protocol protocol,
|
||||
int publicPort, State state, String virtualMachineDisplayName, String virtualMachineId,
|
||||
String virtualMachineName, Set<String> CIDRs, int privateEndPort, int publicEndPort) {
|
||||
this.id = id;
|
||||
this.IPAddress = iPAddress;
|
||||
|
@ -207,13 +207,13 @@ public class PortForwardingRule implements Comparable<PortForwardingRule> {
|
|||
|
||||
@Override
|
||||
public int compareTo(PortForwardingRule arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ID of the port forwarding rule
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ public class PortForwardingRule implements Comparable<PortForwardingRule> {
|
|||
/**
|
||||
* @return the public ip address id for the port forwarding rule
|
||||
*/
|
||||
public long getIPAddressId() {
|
||||
public String getIPAddressId() {
|
||||
return IPAddressId;
|
||||
}
|
||||
|
||||
|
@ -269,7 +269,7 @@ public class PortForwardingRule implements Comparable<PortForwardingRule> {
|
|||
/**
|
||||
* @return the VM ID for the port forwarding rule
|
||||
*/
|
||||
public long getVirtualMachineId() {
|
||||
public String getVirtualMachineId() {
|
||||
return virtualMachineId;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,29 +38,29 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private Date allocated;
|
||||
private long associatedNetworkId;
|
||||
private String associatedNetworkId;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private boolean usesVirtualNetwork;
|
||||
private String IPAddress;
|
||||
private boolean isSourceNAT;
|
||||
private boolean isStaticNAT;
|
||||
private long networkId;
|
||||
private String networkId;
|
||||
private State state;
|
||||
private String virtualMachineDisplayName;
|
||||
private long virtualMachineId = -1;
|
||||
private String virtualMachineId;
|
||||
private String virtualMachineName;
|
||||
private long VLANId;
|
||||
private String VLANId;
|
||||
private String VLANName;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private Long jobId;
|
||||
private String jobId;
|
||||
private Integer jobStatus;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder associatedNetworkId(long associatedNetworkId) {
|
||||
public Builder associatedNetworkId(String associatedNetworkId) {
|
||||
this.associatedNetworkId = associatedNetworkId;
|
||||
return this;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder networkId(long networkId) {
|
||||
public Builder networkId(String networkId) {
|
||||
this.networkId = networkId;
|
||||
return this;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder virtualMachineId(long virtualMachineId) {
|
||||
public Builder virtualMachineId(String virtualMachineId) {
|
||||
this.virtualMachineId = virtualMachineId;
|
||||
return this;
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder VLANId(long VLANId) {
|
||||
public Builder VLANId(String VLANId) {
|
||||
this.VLANId = VLANId;
|
||||
return this;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder jobId(Long jobId) {
|
||||
public Builder jobId(String jobId) {
|
||||
this.jobId = jobId;
|
||||
return this;
|
||||
}
|
||||
|
@ -172,14 +172,14 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private Date allocated;
|
||||
@SerializedName("associatednetworkid")
|
||||
private long associatedNetworkId;
|
||||
private String associatedNetworkId;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("forvirtualnetwork")
|
||||
private boolean usesVirtualNetwork;
|
||||
@SerializedName("ipaddress")
|
||||
|
@ -189,25 +189,25 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
@SerializedName("isstaticnat")
|
||||
private boolean isStaticNAT;
|
||||
@SerializedName("networkid")
|
||||
private long networkId;
|
||||
private String networkId;
|
||||
private State state;
|
||||
@SerializedName("virtualmachinedisplayname")
|
||||
private String virtualMachineDisplayName;
|
||||
@SerializedName("virtualmachineid")
|
||||
private long virtualMachineId = -1;
|
||||
private String virtualMachineId;
|
||||
@SerializedName("virtualmachinename")
|
||||
private String virtualMachineName;
|
||||
@SerializedName("VLANid")
|
||||
private long VLANId;
|
||||
private String VLANId;
|
||||
@SerializedName("VLANname")
|
||||
private String VLANName;
|
||||
@SerializedName("zoneid")
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
@SerializedName("zonename")
|
||||
private String zoneName;
|
||||
@SerializedName("jobid")
|
||||
@Nullable
|
||||
private Long jobId;
|
||||
private String jobId;
|
||||
@SerializedName("jobstatus")
|
||||
@Nullable
|
||||
private Integer jobStatus;
|
||||
|
@ -235,10 +235,10 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
|
||||
}
|
||||
|
||||
public PublicIPAddress(long id, String account, Date allocated, long associatedNetworkId, String domain,
|
||||
long domainId, boolean usesVirtualNetwork, String iPAddress, boolean isSourceNAT, boolean isStaticNAT,
|
||||
long networkId, State state, String virtualMachineDisplayName, long virtualMachineId,
|
||||
String virtualMachineName, long VLANId, String VLANName, long zoneId, String zoneName, Long jobId,
|
||||
public PublicIPAddress(String id, String account, Date allocated, String associatedNetworkId, String domain,
|
||||
String domainId, boolean usesVirtualNetwork, String iPAddress, boolean isSourceNAT, boolean isStaticNAT,
|
||||
String networkId, State state, String virtualMachineDisplayName, String virtualMachineId,
|
||||
String virtualMachineName, String VLANId, String VLANName, String zoneId, String zoneName, String jobId,
|
||||
Integer jobStatus) {
|
||||
this.id = id;
|
||||
this.account = account;
|
||||
|
@ -266,13 +266,13 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
|
||||
@Override
|
||||
public int compareTo(PublicIPAddress arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return public IP address id
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
* machine
|
||||
*/
|
||||
@Nullable
|
||||
public Long getJobId() {
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
@ -312,7 +312,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
/**
|
||||
* @return the ID of the Network associated with the IP address
|
||||
*/
|
||||
public long getAssociatedNetworkId() {
|
||||
public String getAssociatedNetworkId() {
|
||||
return associatedNetworkId;
|
||||
}
|
||||
|
||||
|
@ -326,7 +326,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
/**
|
||||
* @return the domain ID the public IP address is associated with
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -361,7 +361,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
/**
|
||||
* @return the ID of the Network where ip belongs to
|
||||
*/
|
||||
public long getNetworkId() {
|
||||
public String getNetworkId() {
|
||||
return networkId;
|
||||
}
|
||||
|
||||
|
@ -385,7 +385,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
* @return virtual machine id the ip address is assigned to (not null only
|
||||
* for static nat Ip)
|
||||
*/
|
||||
public long getVirtualMachineId() {
|
||||
public String getVirtualMachineId() {
|
||||
return virtualMachineId;
|
||||
}
|
||||
|
||||
|
@ -400,7 +400,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
/**
|
||||
* @return the ID of the VLAN associated with the IP address
|
||||
*/
|
||||
public long getVLANId() {
|
||||
public String getVLANId() {
|
||||
return VLANId;
|
||||
}
|
||||
|
||||
|
@ -414,7 +414,7 @@ public class PublicIPAddress implements Comparable<PublicIPAddress> {
|
|||
/**
|
||||
* @return the ID of the zone the public IP address belongs to
|
||||
*/
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ public class ResourceLimit implements Comparable<ResourceLimit> {
|
|||
|
||||
private String account;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private int max;
|
||||
private ResourceType resourceType;
|
||||
|
||||
|
@ -56,7 +56,7 @@ public class ResourceLimit implements Comparable<ResourceLimit> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -84,12 +84,12 @@ public class ResourceLimit implements Comparable<ResourceLimit> {
|
|||
private String account;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private int max;
|
||||
@SerializedName("resourcetype")
|
||||
private ResourceType resourceType;
|
||||
|
||||
public ResourceLimit(String account, String domain, long domainId, int max, ResourceType resourceType) {
|
||||
public ResourceLimit(String account, String domain, String domainId, int max, ResourceType resourceType) {
|
||||
this.account = account;
|
||||
this.domain = domain;
|
||||
this.domainId = domainId;
|
||||
|
@ -105,7 +105,7 @@ public class ResourceLimit implements Comparable<ResourceLimit> {
|
|||
return domain;
|
||||
}
|
||||
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,18 +39,18 @@ public class SecurityGroup implements Comparable<SecurityGroup> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private String name;
|
||||
private String description;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private Long jobId;
|
||||
private String domainId;
|
||||
private String jobId;
|
||||
private Integer jobStatus;
|
||||
|
||||
private Set<IngressRule> ingressRules = ImmutableSet.of();
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -75,12 +75,12 @@ public class SecurityGroup implements Comparable<SecurityGroup> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder jobId(Long jobId) {
|
||||
public Builder jobId(String jobId) {
|
||||
this.jobId = jobId;
|
||||
return this;
|
||||
}
|
||||
|
@ -100,16 +100,16 @@ public class SecurityGroup implements Comparable<SecurityGroup> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private String name;
|
||||
private String description;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("jobid")
|
||||
@Nullable
|
||||
private Long jobId;
|
||||
private String jobId;
|
||||
@SerializedName("jobstatus")
|
||||
@Nullable
|
||||
private Integer jobStatus;
|
||||
|
@ -117,8 +117,8 @@ public class SecurityGroup implements Comparable<SecurityGroup> {
|
|||
// so that tests and serialization come out expected
|
||||
private SortedSet<IngressRule> ingressRules = ImmutableSortedSet.<IngressRule>of();
|
||||
|
||||
public SecurityGroup(long id, String account, String name, String description, String domain, long domainId,
|
||||
Long jobId, Integer jobStatus, Set<IngressRule> ingressRules) {
|
||||
public SecurityGroup(String id, String account, String name, String description, String domain, String domainId,
|
||||
String jobId, Integer jobStatus, Set<IngressRule> ingressRules) {
|
||||
this.id = id;
|
||||
this.account = account;
|
||||
this.name = name;
|
||||
|
@ -140,7 +140,7 @@ public class SecurityGroup implements Comparable<SecurityGroup> {
|
|||
/**
|
||||
* @return the id of the security group
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -169,7 +169,7 @@ public class SecurityGroup implements Comparable<SecurityGroup> {
|
|||
/**
|
||||
* @return the domain id of the security group
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ public class SecurityGroup implements Comparable<SecurityGroup> {
|
|||
* machine
|
||||
*/
|
||||
@Nullable
|
||||
public Long getJobId() {
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
@ -241,6 +241,6 @@ public class SecurityGroup implements Comparable<SecurityGroup> {
|
|||
|
||||
@Override
|
||||
public int compareTo(SecurityGroup arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,12 +39,12 @@ public class ServiceOffering implements Comparable<ServiceOffering> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String name;
|
||||
private String displayText;
|
||||
private Date created;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private int cpuNumber;
|
||||
private int cpuSpeed;
|
||||
private int memory;
|
||||
|
@ -59,7 +59,7 @@ public class ServiceOffering implements Comparable<ServiceOffering> {
|
|||
|
||||
private Set<String> tags = ImmutableSet.of();
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ public class ServiceOffering implements Comparable<ServiceOffering> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -157,14 +157,14 @@ public class ServiceOffering implements Comparable<ServiceOffering> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String name;
|
||||
@SerializedName("displaytext")
|
||||
private String displayText;
|
||||
private Date created;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("cpunumber")
|
||||
private int cpuNumber;
|
||||
@SerializedName("cpuspeed")
|
||||
|
@ -189,7 +189,7 @@ public class ServiceOffering implements Comparable<ServiceOffering> {
|
|||
private boolean systemVmType;
|
||||
|
||||
|
||||
public ServiceOffering(long id, String name, String displayText, Date created, String domain, long domainId,
|
||||
public ServiceOffering(String id, String name, String displayText, Date created, String domain, String domainId,
|
||||
int cpuNumber, int cpuSpeed, int memory, boolean haSupport, StorageType storageType, Set<String> tags,
|
||||
boolean defaultUse, String hostTags, boolean systemOffering, boolean cpuUseLimited, long networkRate,
|
||||
boolean systemVmType) {
|
||||
|
@ -217,7 +217,7 @@ public class ServiceOffering implements Comparable<ServiceOffering> {
|
|||
/**
|
||||
* @return the id of the service offering
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -253,7 +253,7 @@ public class ServiceOffering implements Comparable<ServiceOffering> {
|
|||
/**
|
||||
* @return the domain id of the service offering
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -395,7 +395,7 @@ public class ServiceOffering implements Comparable<ServiceOffering> {
|
|||
|
||||
@Override
|
||||
public int compareTo(ServiceOffering arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,25 +37,25 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private Date created;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private Interval interval;
|
||||
private long jobId;
|
||||
private String jobId;
|
||||
private String jobStatus;
|
||||
private String name;
|
||||
private Type snapshotType;
|
||||
private State state;
|
||||
private long volumeId;
|
||||
private String volumeId;
|
||||
private String volumeName;
|
||||
private Volume.Type volumeType;
|
||||
|
||||
/**
|
||||
* @param id ID of the snapshot
|
||||
*/
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||
/**
|
||||
* @param domainId the domain ID of the snapshot's account
|
||||
*/
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||
/**
|
||||
* @param jobId the job ID associated with the snapshot. This is only displayed if the snapshot listed is part of a currently running asynchronous job.
|
||||
*/
|
||||
public Builder jobId(long jobId) {
|
||||
public Builder jobId(String jobId) {
|
||||
this.jobId = jobId;
|
||||
return this;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||
/**
|
||||
* @param volumeId ID of the disk volume
|
||||
*/
|
||||
public Builder volumeId(long volumeId) {
|
||||
public Builder volumeId(String volumeId) {
|
||||
this.volumeId = volumeId;
|
||||
return this;
|
||||
}
|
||||
|
@ -215,16 +215,16 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private Date created;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("intervaltype")
|
||||
private Interval interval;
|
||||
@SerializedName("jobid")
|
||||
private long jobId;
|
||||
private String jobId;
|
||||
@SerializedName("jobstatus")
|
||||
private String jobStatus;
|
||||
private String name;
|
||||
|
@ -232,14 +232,14 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||
private Type snapshotType;
|
||||
private State state;
|
||||
@SerializedName("volumeid")
|
||||
private long volumeId;
|
||||
private String volumeId;
|
||||
@SerializedName("volumename")
|
||||
private String volumeName;
|
||||
@SerializedName("volumetype")
|
||||
private Volume.Type volumeType;
|
||||
|
||||
public Snapshot(long id, String account, Date created, String domain, long domainId, Interval interval, long jobId,
|
||||
String jobStatus, String name, Type snapshotType, State state, long volumeId, String volumeName, Volume.Type volumeType) {
|
||||
public Snapshot(String id, String account, Date created, String domain, String domainId, Interval interval, String jobId,
|
||||
String jobStatus, String name, Type snapshotType, State state, String volumeId, String volumeName, Volume.Type volumeType) {
|
||||
this.id = id;
|
||||
this.account = account;
|
||||
this.created = created;
|
||||
|
@ -265,7 +265,7 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||
/**
|
||||
* @return ID of the snapshot
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -293,7 +293,7 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||
/**
|
||||
* @return the domain ID of the snapshot's account
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -307,7 +307,7 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||
/**
|
||||
* @return the job ID associated with the snapshot. This is only displayed if the snapshot listed is part of a currently running asynchronous job.
|
||||
*/
|
||||
public long getJobId() {
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
@ -342,7 +342,7 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||
/**
|
||||
* @return ID of the disk volume
|
||||
*/
|
||||
public long getVolumeId() {
|
||||
public String getVolumeId() {
|
||||
return volumeId;
|
||||
}
|
||||
|
||||
|
@ -414,6 +414,6 @@ public class Snapshot implements Comparable<Snapshot> {
|
|||
|
||||
@Override
|
||||
public int compareTo(Snapshot other) {
|
||||
return new Long(this.id).compareTo(other.getId());
|
||||
return id.compareTo(other.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,17 +32,17 @@ public class SnapshotPolicy implements Comparable<SnapshotPolicy> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private Snapshot.Interval interval;
|
||||
private long numberToRetain;
|
||||
private String schedule;
|
||||
private String timezone;
|
||||
private long volumeId;
|
||||
private String volumeId;
|
||||
|
||||
/**
|
||||
* @param id the ID of the snapshot policy
|
||||
*/
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ public class SnapshotPolicy implements Comparable<SnapshotPolicy> {
|
|||
/**
|
||||
* @param volumeId ID of the disk volume
|
||||
*/
|
||||
public Builder volumeId(long volumeId) {
|
||||
public Builder volumeId(String volumeId) {
|
||||
this.volumeId = volumeId;
|
||||
return this;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ public class SnapshotPolicy implements Comparable<SnapshotPolicy> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("intervaltype")
|
||||
private Snapshot.Interval interval;
|
||||
@SerializedName("maxsnaps")
|
||||
|
@ -100,9 +100,9 @@ public class SnapshotPolicy implements Comparable<SnapshotPolicy> {
|
|||
private String schedule;
|
||||
private String timezone;
|
||||
@SerializedName("volumeid")
|
||||
private long volumeId;
|
||||
private String volumeId;
|
||||
|
||||
public SnapshotPolicy(long id, Snapshot.Interval interval, long numberToRetain, String schedule, String timezone, long volumeId) {
|
||||
public SnapshotPolicy(String id, Snapshot.Interval interval, long numberToRetain, String schedule, String timezone, String volumeId) {
|
||||
this.id = id;
|
||||
this.interval = interval;
|
||||
this.numberToRetain = numberToRetain;
|
||||
|
@ -120,7 +120,7 @@ public class SnapshotPolicy implements Comparable<SnapshotPolicy> {
|
|||
/**
|
||||
* @return the ID of the snapshot policy
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ public class SnapshotPolicy implements Comparable<SnapshotPolicy> {
|
|||
/**
|
||||
* @return ID of the disk volume
|
||||
*/
|
||||
public long getVolumeId() {
|
||||
public String getVolumeId() {
|
||||
return volumeId;
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ public class SnapshotPolicy implements Comparable<SnapshotPolicy> {
|
|||
|
||||
@Override
|
||||
public int compareTo(SnapshotPolicy other) {
|
||||
return new Long(id).compareTo(other.getId());
|
||||
return id.compareTo(other.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -94,26 +94,26 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
private Builder() {
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String name;
|
||||
private String path;
|
||||
private String tags;
|
||||
private State state;
|
||||
private Type type;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private long podId;
|
||||
private String podId;
|
||||
private String podName;
|
||||
private long clusterId;
|
||||
private String clusterId;
|
||||
private String clusterName;
|
||||
private Date created;
|
||||
private long diskSizeAllocated;
|
||||
private long diskSizeTotal;
|
||||
private String ipAddress;
|
||||
private Long jobId;
|
||||
private String jobId;
|
||||
private String jobStatus;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder podId(long podId) {
|
||||
public Builder podId(String podId) {
|
||||
this.podId = podId;
|
||||
return this;
|
||||
}
|
||||
|
@ -163,7 +163,7 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder clusterId(long clusterId) {
|
||||
public Builder clusterId(String clusterId) {
|
||||
this.clusterId = clusterId;
|
||||
return this;
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder jobId(Long jobId) {
|
||||
public Builder jobId(String jobId) {
|
||||
this.jobId = jobId;
|
||||
return this;
|
||||
}
|
||||
|
@ -208,30 +208,30 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String name;
|
||||
private String path;
|
||||
private String tags;
|
||||
private State state;
|
||||
private Type type;
|
||||
@SerializedName("zoneid") private long zoneId;
|
||||
@SerializedName("zoneid") private String zoneId;
|
||||
@SerializedName("zonename") private String zoneName;
|
||||
@SerializedName("podid") private long podId;
|
||||
@SerializedName("podid") private String podId;
|
||||
@SerializedName("podname") private String podName;
|
||||
@SerializedName("clusterid") private long clusterId;
|
||||
@SerializedName("clusterid") private String clusterId;
|
||||
@SerializedName("clustername") private String clusterName;
|
||||
private Date created;
|
||||
@SerializedName("disksizeallocated") private long diskSizeAllocated;
|
||||
@SerializedName("disksizetotal") private long diskSizeTotal;
|
||||
@SerializedName("ipaddress") private String ipAddress;
|
||||
@SerializedName("jobid") private Long jobId;
|
||||
@SerializedName("jobid") private String jobId;
|
||||
@SerializedName("jobstatus") private String jobStatus;
|
||||
|
||||
/* Exists only for the serializer */
|
||||
StoragePool() {
|
||||
}
|
||||
|
||||
public StoragePool(long id, String name, String path, String tags, State state, Type type, long zoneId, String zoneName, long podId, String podName, long clusterId, String clusterName, Date created, long diskSizeAllocated, long diskSizeTotal, String ipAddress, Long jobId, String jobStatus) {
|
||||
public StoragePool(String id, String name, String path, String tags, State state, Type type, String zoneId, String zoneName, String podId, String podName, String clusterId, String clusterName, Date created, long diskSizeAllocated, long diskSizeTotal, String ipAddress, String jobId, String jobStatus) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.path = path;
|
||||
|
@ -252,7 +252,7 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
this.jobStatus = jobStatus;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
return type;
|
||||
}
|
||||
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -284,7 +284,7 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
return zoneName;
|
||||
}
|
||||
|
||||
public long getPodId() {
|
||||
public String getPodId() {
|
||||
return podId;
|
||||
}
|
||||
|
||||
|
@ -292,7 +292,7 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
return podName;
|
||||
}
|
||||
|
||||
public long getClusterId() {
|
||||
public String getClusterId() {
|
||||
return clusterId;
|
||||
}
|
||||
|
||||
|
@ -316,7 +316,7 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
return ipAddress;
|
||||
}
|
||||
|
||||
public Long getJobId() {
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
@ -386,6 +386,6 @@ public class StoragePool implements Comparable<StoragePool> {
|
|||
|
||||
@Override
|
||||
public int compareTo(StoragePool other) {
|
||||
return Long.valueOf(this.id).compareTo(other.id);
|
||||
return this.id.compareTo(other.id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,16 +36,16 @@ public class Template implements Comparable<Template> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String displayText;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String account;
|
||||
private long accountId;
|
||||
private String accountId;
|
||||
private String zone;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String OSType;
|
||||
private long OSTypeId;
|
||||
private String OSTypeId;
|
||||
private String name;
|
||||
private Type type;
|
||||
private String status;
|
||||
|
@ -61,15 +61,15 @@ public class Template implements Comparable<Template> {
|
|||
private boolean isPublic;
|
||||
private boolean ready;
|
||||
private boolean passwordEnabled;
|
||||
private Long jobId;
|
||||
private String jobId;
|
||||
private String jobStatus;
|
||||
private String checksum;
|
||||
private Long hostId;
|
||||
private String hostId;
|
||||
private String hostName;
|
||||
private Long sourceTemplateId;
|
||||
private String sourceTemplateId;
|
||||
private String templateTag;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ public class Template implements Comparable<Template> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ public class Template implements Comparable<Template> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder accountId(long accountId) {
|
||||
public Builder accountId(String accountId) {
|
||||
this.accountId = accountId;
|
||||
return this;
|
||||
}
|
||||
|
@ -104,7 +104,7 @@ public class Template implements Comparable<Template> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ public class Template implements Comparable<Template> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder OSTypeId(long OSTypeId) {
|
||||
public Builder OSTypeId(String OSTypeId) {
|
||||
this.OSTypeId = OSTypeId;
|
||||
return this;
|
||||
}
|
||||
|
@ -194,7 +194,7 @@ public class Template implements Comparable<Template> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder jobId(Long jobId) {
|
||||
public Builder jobId(String jobId) {
|
||||
this.jobId = jobId;
|
||||
return this;
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ public class Template implements Comparable<Template> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder hostid(Long hostid) {
|
||||
public Builder hostid(String hostid) {
|
||||
this.hostId = hostid;
|
||||
return this;
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ public class Template implements Comparable<Template> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder sourceTemplateId(Long sourceTemplateId) {
|
||||
public Builder sourceTemplateId(String sourceTemplateId) {
|
||||
this.sourceTemplateId = sourceTemplateId;
|
||||
return this;
|
||||
}
|
||||
|
@ -266,23 +266,23 @@ public class Template implements Comparable<Template> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("displaytext")
|
||||
private String displayText;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String account;
|
||||
@SerializedName("accountid")
|
||||
private long accountId;
|
||||
private String accountId;
|
||||
@SerializedName("zonename")
|
||||
private String zone;
|
||||
@SerializedName("zoneid")
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
@SerializedName("ostypename")
|
||||
private String OSType;
|
||||
@SerializedName("ostypeid")
|
||||
private long OSTypeId;
|
||||
private String OSTypeId;
|
||||
private String name;
|
||||
@SerializedName("templatetype")
|
||||
private Type type;
|
||||
|
@ -309,27 +309,27 @@ public class Template implements Comparable<Template> {
|
|||
private boolean passwordEnabled;
|
||||
@Nullable
|
||||
@SerializedName("jobid")
|
||||
private Long jobId;
|
||||
private String jobId;
|
||||
@SerializedName("jobstatus")
|
||||
//TODO: this should be a type
|
||||
private String jobStatus;
|
||||
private String checksum;
|
||||
@SerializedName("hostId")
|
||||
private Long hostId;
|
||||
private String hostId;
|
||||
@SerializedName("hostname")
|
||||
private String hostName;
|
||||
@SerializedName("sourcetemplateid")
|
||||
@Nullable
|
||||
private Long sourceTemplateId;
|
||||
private String sourceTemplateId;
|
||||
@SerializedName("templatetag")
|
||||
private String templateTag;
|
||||
|
||||
|
||||
public Template(long id, String displayText, String domain, long domainId, String account, long accountId,
|
||||
String zone, long zoneId, String oSType, long oSTypeId, String name, Type type, String status, Format format,
|
||||
public Template(String id, String displayText, String domain, String domainId, String account, String accountId,
|
||||
String zone, String zoneId, String oSType, String oSTypeId, String name, Type type, String status, Format format,
|
||||
String hypervisor, Long size, Date created, Date removed, boolean crossZones, boolean bootable,
|
||||
boolean extractable, boolean featured, boolean ispublic, boolean ready, boolean passwordEnabled, Long jobId,
|
||||
String jobStatus, String checksum, Long hostId, String hostName, Long sourceTemplateId,
|
||||
boolean extractable, boolean featured, boolean ispublic, boolean ready, boolean passwordEnabled, String jobId,
|
||||
String jobStatus, String checksum, String hostId, String hostName, String sourceTemplateId,
|
||||
String templateTag) {
|
||||
this.id = id;
|
||||
this.displayText = displayText;
|
||||
|
@ -376,7 +376,7 @@ public class Template implements Comparable<Template> {
|
|||
/**
|
||||
* @return Template id
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -397,7 +397,7 @@ public class Template implements Comparable<Template> {
|
|||
/**
|
||||
* @return the ID of the domain to which the template beLongs
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -411,7 +411,7 @@ public class Template implements Comparable<Template> {
|
|||
/**
|
||||
* @return the ID of the account to which the template beLongs
|
||||
*/
|
||||
public long getAccountId() {
|
||||
public String getAccountId() {
|
||||
return accountId;
|
||||
}
|
||||
|
||||
|
@ -425,7 +425,7 @@ public class Template implements Comparable<Template> {
|
|||
/**
|
||||
* @return the ID of the zone to which the template beLongs
|
||||
*/
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -439,7 +439,7 @@ public class Template implements Comparable<Template> {
|
|||
/**
|
||||
* @return the ID of the OS type to which the template beLongs
|
||||
*/
|
||||
public long getOSTypeId() {
|
||||
public String getOSTypeId() {
|
||||
return OSTypeId;
|
||||
}
|
||||
|
||||
|
@ -553,7 +553,7 @@ public class Template implements Comparable<Template> {
|
|||
* pending jobs are acting on the template
|
||||
*/
|
||||
@Nullable
|
||||
public Long getJobId() {
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
@ -574,7 +574,7 @@ public class Template implements Comparable<Template> {
|
|||
/**
|
||||
* @return the ID of the secondary storage host for the template
|
||||
*/
|
||||
public Long getHostId() {
|
||||
public String getHostId() {
|
||||
return hostId;
|
||||
}
|
||||
|
||||
|
@ -588,7 +588,7 @@ public class Template implements Comparable<Template> {
|
|||
/**
|
||||
* @return the template ID of the parent template if present
|
||||
*/
|
||||
public Long getSourceTemplateId() {
|
||||
public String getSourceTemplateId() {
|
||||
return sourceTemplateId;
|
||||
}
|
||||
|
||||
|
@ -692,6 +692,6 @@ public class Template implements Comparable<Template> {
|
|||
|
||||
@Override
|
||||
public int compareTo(Template arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private long accountId;
|
||||
private String id;
|
||||
private String accountId;
|
||||
private Date created;
|
||||
private long extractId;
|
||||
private String extractId;
|
||||
private ExtractMode extractMode;
|
||||
private String name;
|
||||
private String state;
|
||||
|
@ -45,13 +45,13 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
|
|||
private String storageType;
|
||||
private int uploadPercentage;
|
||||
private String url;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
|
||||
/**
|
||||
* @param id the id of extracted object
|
||||
*/
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
|
|||
/**
|
||||
* @param accountId the account id to which the extracted object belongs
|
||||
*/
|
||||
public Builder accountId(long accountId) {
|
||||
public Builder accountId(String accountId) {
|
||||
this.accountId = accountId;
|
||||
return this;
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
|
|||
/**
|
||||
* @param extractId the upload id of extracted object
|
||||
*/
|
||||
public Builder extractId(long extractId) {
|
||||
public Builder extractId(String extractId) {
|
||||
this.extractId = extractId;
|
||||
return this;
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
|
|||
/**
|
||||
* @param zoneId zone ID the object was extracted from
|
||||
*/
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -159,11 +159,11 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("accountid")
|
||||
private long accountId;
|
||||
private String accountId;
|
||||
private Date created;
|
||||
private long extractId;
|
||||
private String extractId;
|
||||
private ExtractMode extractMode;
|
||||
private String name;
|
||||
private String state;
|
||||
|
@ -174,15 +174,15 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
|
|||
private int uploadPercentage;
|
||||
private String url;
|
||||
@SerializedName("zoneid")
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
|
||||
/**
|
||||
* Construct a new TemplateExtraction instance
|
||||
*/
|
||||
public TemplateExtraction(long id, long accountId, Date created, long extractId,
|
||||
public TemplateExtraction(String id, String accountId, Date created, String extractId,
|
||||
ExtractMode extractMode, String name, String state, String status,
|
||||
String storageType, int uploadPercentage, String url,
|
||||
long zoneId, String zoneName) {
|
||||
String zoneId, String zoneName) {
|
||||
this.id = id;
|
||||
this.accountId = accountId;
|
||||
this.created = created;
|
||||
|
@ -211,14 +211,14 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
|
|||
/**
|
||||
* @return the id of extracted object
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the account id to which the extracted object belongs
|
||||
*/
|
||||
public long getAccountId() {
|
||||
public String getAccountId() {
|
||||
return accountId;
|
||||
}
|
||||
|
||||
|
@ -232,7 +232,7 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
|
|||
/**
|
||||
* @return the upload id of extracted object
|
||||
*/
|
||||
public long getExtractId() {
|
||||
public String getExtractId() {
|
||||
return extractId;
|
||||
}
|
||||
|
||||
|
@ -288,7 +288,7 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
|
|||
/**
|
||||
* @return zone ID the object was extracted from
|
||||
*/
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -349,7 +349,7 @@ public class TemplateExtraction implements Comparable<TemplateExtraction> {
|
|||
|
||||
@Override
|
||||
public int compareTo(TemplateExtraction other) {
|
||||
return new Long(id).compareTo(other.id);
|
||||
return id.compareTo(other.id);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,11 +31,11 @@ public class TemplateMetadata {
|
|||
|
||||
public static class Builder {
|
||||
private String name;
|
||||
private long osTypeId;
|
||||
private String osTypeId;
|
||||
private String displayText;
|
||||
private Long snapshotId;
|
||||
private Long volumeId;
|
||||
private Long virtualMachineId;
|
||||
private String snapshotId;
|
||||
private String volumeId;
|
||||
private String virtualMachineId;
|
||||
private Boolean passwordEnabled;
|
||||
|
||||
/**
|
||||
|
@ -51,7 +51,7 @@ public class TemplateMetadata {
|
|||
* @param osTypeId
|
||||
* the ID of the OS Type that best represents the OS of this template.
|
||||
*/
|
||||
public Builder osTypeId(long osTypeId) {
|
||||
public Builder osTypeId(String osTypeId) {
|
||||
this.osTypeId = osTypeId;
|
||||
return this;
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class TemplateMetadata {
|
|||
* the ID of the snapshot the template is being created from.
|
||||
* Either this parameter, or volumeId has to be passed in
|
||||
*/
|
||||
public Builder snapshotId(Long snapshotId) {
|
||||
public Builder snapshotId(String snapshotId) {
|
||||
this.snapshotId = snapshotId;
|
||||
return this;
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ public class TemplateMetadata {
|
|||
* the ID of the disk volume the template is being created from.
|
||||
* Either this parameter, or snapshotId has to be passed in
|
||||
*/
|
||||
public Builder volumeId(Long volumeId) {
|
||||
public Builder volumeId(String volumeId) {
|
||||
this.volumeId = volumeId;
|
||||
return this;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public class TemplateMetadata {
|
|||
* @param virtualMachineId
|
||||
* the ID of the disk volume the template is being created from
|
||||
*/
|
||||
public Builder virtualMachineId(Long virtualMachineId) {
|
||||
public Builder virtualMachineId(String virtualMachineId) {
|
||||
this.virtualMachineId = virtualMachineId;
|
||||
return this;
|
||||
}
|
||||
|
@ -113,15 +113,15 @@ public class TemplateMetadata {
|
|||
}
|
||||
|
||||
private String name;
|
||||
private long osTypeId;
|
||||
private String osTypeId;
|
||||
private String displayText;
|
||||
|
||||
private Long snapshotId;
|
||||
private Long volumeId;
|
||||
private Long virtualMachineId;;
|
||||
private String snapshotId;
|
||||
private String volumeId;
|
||||
private String virtualMachineId;;
|
||||
private Boolean passwordEnabled;
|
||||
|
||||
public TemplateMetadata(String name, long osTypeId, String displayText) {
|
||||
public TemplateMetadata(String name, String osTypeId, String displayText) {
|
||||
this.name = name;
|
||||
this.osTypeId = osTypeId;
|
||||
this.displayText = displayText;
|
||||
|
@ -136,33 +136,33 @@ public class TemplateMetadata {
|
|||
/**
|
||||
* @return the ID of the snapshot the template is being created from
|
||||
*/
|
||||
public Long getSnapshotId() {
|
||||
public String getSnapshotId() {
|
||||
return snapshotId;
|
||||
}
|
||||
|
||||
public void setSnapshotId(Long snapshotId) {
|
||||
public void setSnapshotId(String snapshotId) {
|
||||
this.snapshotId = snapshotId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the ID of the disk volume the template is being created from
|
||||
*/
|
||||
public Long getVolumeId() {
|
||||
public String getVolumeId() {
|
||||
return volumeId;
|
||||
}
|
||||
|
||||
public void setVolumeId(Long volumeId) {
|
||||
public void setVolumeId(String volumeId) {
|
||||
this.volumeId = volumeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Optional, VM ID
|
||||
*/
|
||||
public Long getVirtualMachineId() {
|
||||
public String getVirtualMachineId() {
|
||||
return virtualMachineId;
|
||||
}
|
||||
|
||||
public void setVirtualMachineId(Long virtualMachineId) {
|
||||
public void setVirtualMachineId(String virtualMachineId) {
|
||||
this.virtualMachineId = virtualMachineId;
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ public class TemplateMetadata {
|
|||
/**
|
||||
* @return the ID of the OS Type that best represents the OS of this template.
|
||||
*/
|
||||
public long getOsTypeId() {
|
||||
public String getOsTypeId() {
|
||||
return osTypeId;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,12 +31,12 @@ public class TemplatePermission implements Comparable<TemplatePermission> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private boolean isPublic;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ public class TemplatePermission implements Comparable<TemplatePermission> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -61,9 +61,9 @@ public class TemplatePermission implements Comparable<TemplatePermission> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
@SerializedName("domainid") private long domainId;
|
||||
@SerializedName("domainid") private String domainId;
|
||||
@SerializedName("ispublic") private boolean isPublic;
|
||||
|
||||
/**
|
||||
|
@ -73,7 +73,7 @@ public class TemplatePermission implements Comparable<TemplatePermission> {
|
|||
* @param domainId the ID of the domain to which the template belongs
|
||||
* @param isPublic true if this template is a public template, false otherwise
|
||||
*/
|
||||
public TemplatePermission(long id, String account, long domainId, boolean isPublic) {
|
||||
public TemplatePermission(String id, String account, String domainId, boolean isPublic) {
|
||||
this.id = id;
|
||||
this.account = account;
|
||||
this.domainId = domainId;
|
||||
|
@ -90,7 +90,7 @@ public class TemplatePermission implements Comparable<TemplatePermission> {
|
|||
* Gets the template ID
|
||||
* @return the template ID
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -106,7 +106,7 @@ public class TemplatePermission implements Comparable<TemplatePermission> {
|
|||
* Gets the ID of the domain to which the template belongs
|
||||
* @return the ID of the domain to which the template belongs
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ public class TemplatePermission implements Comparable<TemplatePermission> {
|
|||
|
||||
@Override
|
||||
public int compareTo(TemplatePermission other) {
|
||||
return new Long(id).compareTo(other.getId());
|
||||
return id.compareTo(other.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -90,20 +90,20 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
private Builder() {
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String description;
|
||||
private long accountId;
|
||||
private String accountId;
|
||||
private String accountName;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private Date startDate;
|
||||
private Date endDate;
|
||||
private Date assignDate;
|
||||
private long releaseDate;
|
||||
private long zoneId;
|
||||
private long virtualMachineId;
|
||||
private String releaseDate;
|
||||
private String zoneId;
|
||||
private String virtualMachineId;
|
||||
private String virtualMachineName;
|
||||
private long serviceOfferingId;
|
||||
private long templateId;
|
||||
private String serviceOfferingId;
|
||||
private String templateId;
|
||||
private String ipAddress;
|
||||
private boolean isSourceNAT;
|
||||
private double rawUsageHours;
|
||||
|
@ -111,7 +111,7 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
private String type;
|
||||
private UsageType usageType;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder accountId(long accountId) {
|
||||
public Builder accountId(String accountId) {
|
||||
this.accountId = accountId;
|
||||
return this;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -151,17 +151,17 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder releaseDate(long releaseDate) {
|
||||
public Builder releaseDate(String releaseDate) {
|
||||
this.releaseDate = releaseDate;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder virtualMachineId(long virtualMachineId) {
|
||||
public Builder virtualMachineId(String virtualMachineId) {
|
||||
this.virtualMachineId = virtualMachineId;
|
||||
return this;
|
||||
}
|
||||
|
@ -171,12 +171,12 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder serviceOfferingId(long serviceOfferingId) {
|
||||
public Builder serviceOfferingId(String serviceOfferingId) {
|
||||
this.serviceOfferingId = serviceOfferingId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder templateId(long templateId) {
|
||||
public Builder templateId(String templateId) {
|
||||
this.templateId = templateId;
|
||||
return this;
|
||||
}
|
||||
|
@ -216,20 +216,20 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
}
|
||||
}
|
||||
|
||||
@SerializedName("usageid") private long id;
|
||||
@SerializedName("usageid") private String id;
|
||||
private String description;
|
||||
@SerializedName("accountid") private long accountId;
|
||||
@SerializedName("accountid") private String accountId;
|
||||
@SerializedName("account") private String accountName;
|
||||
@SerializedName("domainid") private long domainId;
|
||||
@SerializedName("domainid") private String domainId;
|
||||
@SerializedName("startdate") private Date startDate;
|
||||
@SerializedName("enddate") private Date endDate;
|
||||
@SerializedName("assigndate") private Date assignDate;
|
||||
@SerializedName("releasedate") private long releaseDate;
|
||||
@SerializedName("zoneid") private long zoneId;
|
||||
@SerializedName("virtualmachineid") private long virtualMachineId;
|
||||
@SerializedName("releasedate") private String releaseDate;
|
||||
@SerializedName("zoneid") private String zoneId;
|
||||
@SerializedName("virtualmachineid") private String virtualMachineId;
|
||||
@SerializedName("name") private String virtualMachineName;
|
||||
@SerializedName("offeringid") private long serviceOfferingId;
|
||||
@SerializedName("templateid") private long templateId;
|
||||
@SerializedName("offeringid") private String serviceOfferingId;
|
||||
@SerializedName("templateid") private String templateId;
|
||||
@SerializedName("ipaddress") private String ipAddress;
|
||||
@SerializedName("issourcenat") private boolean isSourceNAT;
|
||||
@SerializedName("rawusage") private double rawUsageHours;
|
||||
|
@ -241,7 +241,7 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
UsageRecord(){
|
||||
}
|
||||
|
||||
public UsageRecord(long id, String description, long accountId, String accountName, long domainId, Date startDate, Date endDate, Date assignDate, long releaseDate, long zoneId, long virtualMachineId, String virtualMachineName, long serviceOfferingId, long templateId, String ipAddress, boolean sourceNAT, double rawUsageHours, String usage, String type, UsageType usageType) {
|
||||
public UsageRecord(String id, String description, String accountId, String accountName, String domainId, Date startDate, Date endDate, Date assignDate, String releaseDate, String zoneId, String virtualMachineId, String virtualMachineName, String serviceOfferingId, String templateId, String ipAddress, boolean sourceNAT, double rawUsageHours, String usage, String type, UsageType usageType) {
|
||||
this.id = id;
|
||||
this.description = description;
|
||||
this.accountId = accountId;
|
||||
|
@ -264,7 +264,7 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
this.usageType = usageType;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -272,7 +272,7 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
return description;
|
||||
}
|
||||
|
||||
public long getAccountId() {
|
||||
public String getAccountId() {
|
||||
return accountId;
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
return accountName;
|
||||
}
|
||||
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -296,15 +296,15 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
return assignDate;
|
||||
}
|
||||
|
||||
public long getReleaseDate() {
|
||||
public String getReleaseDate() {
|
||||
return releaseDate;
|
||||
}
|
||||
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
public long getVirtualMachineId() {
|
||||
public String getVirtualMachineId() {
|
||||
return virtualMachineId;
|
||||
}
|
||||
|
||||
|
@ -312,11 +312,11 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
return virtualMachineName;
|
||||
}
|
||||
|
||||
public long getServiceOfferingId() {
|
||||
public String getServiceOfferingId() {
|
||||
return serviceOfferingId;
|
||||
}
|
||||
|
||||
public long getTemplateId() {
|
||||
public String getTemplateId() {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
|
@ -411,6 +411,6 @@ public class UsageRecord implements Comparable<UsageRecord> {
|
|||
|
||||
@Override
|
||||
public int compareTo(UsageRecord other) {
|
||||
return Long.valueOf(this.id).compareTo(other.id);
|
||||
return this.id.compareTo(other.id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public class User implements Comparable<User> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String name;
|
||||
private String firstName;
|
||||
private String lastName;
|
||||
|
@ -65,12 +65,12 @@ public class User implements Comparable<User> {
|
|||
private String account;
|
||||
private Account.Type accountType;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String timeZone;
|
||||
private String apiKey;
|
||||
private String secretKey;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ public class User implements Comparable<User> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ public class User implements Comparable<User> {
|
|||
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
@SerializedName("username")
|
||||
private String name;
|
||||
@SerializedName("firstname")
|
||||
|
@ -169,7 +169,7 @@ public class User implements Comparable<User> {
|
|||
private Account.Type accountType;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("timezone")
|
||||
private String timeZone;
|
||||
@SerializedName("apikey")
|
||||
|
@ -177,8 +177,8 @@ public class User implements Comparable<User> {
|
|||
@SerializedName("secretkey")
|
||||
private String secretKey;
|
||||
|
||||
public User(long id, String name, String firstname, String lastname, String email, Date created, State state,
|
||||
String account, Type accountType, String domain, long domainId, String timeZone, String apiKey,
|
||||
public User(String id, String name, String firstname, String lastname, String email, Date created, State state,
|
||||
String account, Type accountType, String domain, String domainId, String timeZone, String apiKey,
|
||||
String secretKey) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
|
@ -200,7 +200,7 @@ public class User implements Comparable<User> {
|
|||
*
|
||||
* @return the user ID
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -280,7 +280,7 @@ public class User implements Comparable<User> {
|
|||
*
|
||||
* @return the domain ID of the user
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -310,7 +310,7 @@ public class User implements Comparable<User> {
|
|||
|
||||
@Override
|
||||
public int compareTo(User arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,14 +34,14 @@ public class VMGroup implements Comparable<VMGroup> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private Date created;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String name;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ public class VMGroup implements Comparable<VMGroup> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -76,15 +76,15 @@ public class VMGroup implements Comparable<VMGroup> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private Date created;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String name;
|
||||
|
||||
public VMGroup(long id, String account, Date created, String domain, long domainId, String name) {
|
||||
public VMGroup(String id, String account, Date created, String domain, String domainId, String name) {
|
||||
this.id = id;
|
||||
this.account = account;
|
||||
this.created = created;
|
||||
|
@ -102,7 +102,7 @@ public class VMGroup implements Comparable<VMGroup> {
|
|||
/**
|
||||
* @return the VMGroup's ID
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -130,7 +130,7 @@ public class VMGroup implements Comparable<VMGroup> {
|
|||
/**
|
||||
* @return the ID of the domain that contains the VMGroup
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -177,6 +177,6 @@ public class VMGroup implements Comparable<VMGroup> {
|
|||
|
||||
@Override
|
||||
public int compareTo(VMGroup vmGroup) {
|
||||
return new Long(id).compareTo(vmGroup.getId());
|
||||
return id.compareTo(vmGroup.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private long cpuCount;
|
||||
private long cpuSpeed;
|
||||
|
@ -51,19 +51,19 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
private String displayName;
|
||||
private Date created;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private boolean usesVirtualNetwork;
|
||||
private String group;
|
||||
private long groupId;
|
||||
private long guestOSId;
|
||||
private String groupId;
|
||||
private String guestOSId;
|
||||
private boolean HAEnabled;
|
||||
private long hostId;
|
||||
private String hostId;
|
||||
private String hostname;
|
||||
private String IPAddress;
|
||||
private String ISODisplayText;
|
||||
private long ISOId;
|
||||
private String ISOId;
|
||||
private String ISOName;
|
||||
private Long jobId;
|
||||
private String jobId;
|
||||
private Integer jobStatus;
|
||||
private long memory;
|
||||
private String name;
|
||||
|
@ -71,21 +71,21 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
private Long networkKbsWrite;
|
||||
private String password;
|
||||
private boolean passwordEnabled;
|
||||
private long rootDeviceId;
|
||||
private String rootDeviceId;
|
||||
private String rootDeviceType;
|
||||
private long serviceOfferingId;
|
||||
private String serviceOfferingId;
|
||||
private String serviceOfferingName;
|
||||
private State state;
|
||||
private String templateDisplayText;
|
||||
private long templateId;
|
||||
private String templateId;
|
||||
private String templateName;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
private Set<NIC> nics = ImmutableSet.<NIC> of();
|
||||
private String hypervisor;
|
||||
private Set<SecurityGroup> securityGroups = ImmutableSet.<SecurityGroup> of();
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -140,12 +140,12 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder groupId(long groupId) {
|
||||
public Builder groupId(String groupId) {
|
||||
this.groupId = groupId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder guestOSId(long guestOSId) {
|
||||
public Builder guestOSId(String guestOSId) {
|
||||
this.guestOSId = guestOSId;
|
||||
return this;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder hostId(long hostId) {
|
||||
public Builder hostId(String hostId) {
|
||||
this.hostId = hostId;
|
||||
return this;
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder ISOId(long ISOId) {
|
||||
public Builder ISOId(String ISOId) {
|
||||
this.ISOId = ISOId;
|
||||
return this;
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder jobId(Long jobId) {
|
||||
public Builder jobId(String jobId) {
|
||||
this.jobId = jobId;
|
||||
return this;
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder rootDeviceId(long rootDeviceId) {
|
||||
public Builder rootDeviceId(String rootDeviceId) {
|
||||
this.rootDeviceId = rootDeviceId;
|
||||
return this;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder serviceOfferingId(long serviceOfferingId) {
|
||||
public Builder serviceOfferingId(String serviceOfferingId) {
|
||||
this.serviceOfferingId = serviceOfferingId;
|
||||
return this;
|
||||
}
|
||||
|
@ -255,7 +255,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder templateId(long templateId) {
|
||||
public Builder templateId(String templateId) {
|
||||
this.templateId = templateId;
|
||||
return this;
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -316,7 +316,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
@SerializedName("cpunumber")
|
||||
private long cpuCount;
|
||||
|
@ -329,30 +329,30 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
private Date created;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("forvirtualnetwork")
|
||||
private boolean usesVirtualNetwork;
|
||||
private String group;
|
||||
@SerializedName("groupid")
|
||||
private long groupId;
|
||||
private String groupId;
|
||||
@SerializedName("guestosid")
|
||||
private long guestOSId;
|
||||
private String guestOSId;
|
||||
@SerializedName("haenable")
|
||||
private boolean HAEnabled;
|
||||
@SerializedName("hostid")
|
||||
private long hostId;
|
||||
private String hostId;
|
||||
private String hostname;
|
||||
@SerializedName("ipaddress")
|
||||
private String IPAddress;
|
||||
@SerializedName("isodisplaytext")
|
||||
private String ISODisplayText;
|
||||
@SerializedName("isoid")
|
||||
private long ISOId;
|
||||
private String ISOId;
|
||||
@SerializedName("isoname")
|
||||
private String ISOName;
|
||||
@SerializedName("jobid")
|
||||
@Nullable
|
||||
private Long jobId;
|
||||
private String jobId;
|
||||
@SerializedName("jobstatus")
|
||||
@Nullable
|
||||
private Integer jobStatus;
|
||||
|
@ -367,22 +367,22 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
@SerializedName("passwordenabled")
|
||||
private boolean passwordEnabled;
|
||||
@SerializedName("rootdeviceid")
|
||||
private long rootDeviceId;
|
||||
private String rootDeviceId;
|
||||
@SerializedName("rootdevicetype")
|
||||
private String rootDeviceType;
|
||||
@SerializedName("serviceofferingid")
|
||||
private long serviceOfferingId;
|
||||
private String serviceOfferingId;
|
||||
@SerializedName("serviceofferingname")
|
||||
private String serviceOfferingName;
|
||||
private State state;
|
||||
@SerializedName("templatedisplaytext")
|
||||
private String templateDisplayText;
|
||||
@SerializedName("templateid")
|
||||
private long templateId;
|
||||
private String templateId;
|
||||
@SerializedName("templatename")
|
||||
private String templateName;
|
||||
@SerializedName("zoneid")
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
@SerializedName("zonename")
|
||||
private String zoneName;
|
||||
@SerializedName("nic")
|
||||
|
@ -391,13 +391,13 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
@SerializedName("securitygroup")
|
||||
private Set<SecurityGroup> securityGroups = ImmutableSet.<SecurityGroup> of();
|
||||
|
||||
public VirtualMachine(long id, String account, long cpuCount, long cpuSpeed, String cpuUsed, String displayName,
|
||||
Date created, String domain, long domainId, boolean usesVirtualNetwork, String group, long groupId,
|
||||
long guestOSId, boolean hAEnabled, long hostId, String hostname, String iPAddress, String iSODisplayText,
|
||||
long iSOId, String iSOName, Long jobId, Integer jobStatus, long memory, String name, Long networkKbsRead,
|
||||
Long networkKbsWrite, String password, boolean passwordEnabled, long rootDeviceId, String rootDeviceType,
|
||||
Set<SecurityGroup> securityGroups, long serviceOfferingId, String serviceOfferingName, State state,
|
||||
String templateDisplayText, long templateId, String templateName, long zoneId, String zoneName, Set<NIC> nics,
|
||||
public VirtualMachine(String id, String account, long cpuCount, long cpuSpeed, String cpuUsed, String displayName,
|
||||
Date created, String domain, String domainId, boolean usesVirtualNetwork, String group, String groupId,
|
||||
String guestOSId, boolean hAEnabled, String hostId, String hostname, String iPAddress, String iSODisplayText,
|
||||
String iSOId, String iSOName, String jobId, Integer jobStatus, long memory, String name, Long networkKbsRead,
|
||||
Long networkKbsWrite, String password, boolean passwordEnabled, String rootDeviceId, String rootDeviceType,
|
||||
Set<SecurityGroup> securityGroups, String serviceOfferingId, String serviceOfferingName, State state,
|
||||
String templateDisplayText, String templateId, String templateName, String zoneId, String zoneName, Set<NIC> nics,
|
||||
String hypervisor) {
|
||||
Preconditions.checkArgument(Strings.isNullOrEmpty(cpuUsed) || cpuUsed.matches("^[0-9\\.]+%$"), "cpuUsed value should be a decimal number followed by %");
|
||||
this.id = id;
|
||||
|
@ -453,7 +453,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
/**
|
||||
* @return the ID of the virtual machine
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -510,7 +510,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
/**
|
||||
* @return the ID of the domain in which the virtual machine exists
|
||||
*/
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -531,14 +531,14 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
/**
|
||||
* @return the group ID of the virtual machine
|
||||
*/
|
||||
public long getGroupId() {
|
||||
public String getGroupId() {
|
||||
return groupId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Os type ID of the virtual machine
|
||||
*/
|
||||
public long getGuestOSId() {
|
||||
public String getGuestOSId() {
|
||||
return guestOSId;
|
||||
}
|
||||
|
||||
|
@ -552,7 +552,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
/**
|
||||
* @return the ID of the host for the virtual machine
|
||||
*/
|
||||
public long getHostId() {
|
||||
public String getHostId() {
|
||||
return hostId;
|
||||
}
|
||||
|
||||
|
@ -587,7 +587,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
/**
|
||||
* @return the ID of the ISO attached to the virtual machine
|
||||
*/
|
||||
public long getISOId() {
|
||||
public String getISOId() {
|
||||
return ISOId;
|
||||
}
|
||||
|
||||
|
@ -604,7 +604,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
* machine
|
||||
*/
|
||||
@Nullable
|
||||
public Long getJobId() {
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
@ -662,7 +662,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
/**
|
||||
* @return device ID of the root volume
|
||||
*/
|
||||
public long getRootDeviceId() {
|
||||
public String getRootDeviceId() {
|
||||
return rootDeviceId;
|
||||
}
|
||||
|
||||
|
@ -683,7 +683,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
/**
|
||||
* @return the ID of the service offering of the virtual machine
|
||||
*/
|
||||
public long getServiceOfferingId() {
|
||||
public String getServiceOfferingId() {
|
||||
return serviceOfferingId;
|
||||
}
|
||||
|
||||
|
@ -712,7 +712,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
* @return the ID of the template for the virtual machine. A -1 is returned
|
||||
* if the virtual machine was created from an ISO file.
|
||||
*/
|
||||
public long getTemplateId() {
|
||||
public String getTemplateId() {
|
||||
return templateId;
|
||||
}
|
||||
|
||||
|
@ -726,7 +726,7 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
/**
|
||||
* @return the ID of the availablility zone for the virtual machine
|
||||
*/
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -864,6 +864,6 @@ public class VirtualMachine implements Comparable<VirtualMachine> {
|
|||
|
||||
@Override
|
||||
public int compareTo(VirtualMachine arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,23 +34,23 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String description;
|
||||
private boolean forVirtualNetwork;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String vlan;
|
||||
private String account;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String domain;
|
||||
private long podId;
|
||||
private String podId;
|
||||
private String podName;
|
||||
private String gateway;
|
||||
private String netmask;
|
||||
private String startIP;
|
||||
private String endIP;
|
||||
private long networkId;
|
||||
private String networkId;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -65,16 +65,11 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder vlan(long vlan) {
|
||||
this.vlan = vlan+"";
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder vlan(String vlan) {
|
||||
this.vlan = vlan;
|
||||
return this;
|
||||
|
@ -85,7 +80,7 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -95,7 +90,7 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder podId(long podId) {
|
||||
public Builder podId(String podId) {
|
||||
this.podId = podId;
|
||||
return this;
|
||||
}
|
||||
|
@ -125,7 +120,7 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder networkId(long networkId) {
|
||||
public Builder networkId(String networkId) {
|
||||
this.networkId = networkId;
|
||||
return this;
|
||||
}
|
||||
|
@ -135,26 +130,26 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String description;
|
||||
@SerializedName("forvirtualnetwork") private boolean forVirtualNetwork;
|
||||
@SerializedName("zoneid") private long zoneId;
|
||||
@SerializedName("zoneid") private String zoneId;
|
||||
private String vlan;
|
||||
private String account;
|
||||
@SerializedName("domainid") private long domainId;
|
||||
@SerializedName("domainid") private String domainId;
|
||||
private String domain;
|
||||
@SerializedName("podid") private long podId;
|
||||
@SerializedName("podid") private String podId;
|
||||
@SerializedName("podname") private String podName;
|
||||
private String gateway;
|
||||
private String netmask;
|
||||
@SerializedName("startip") private String startIP;
|
||||
@SerializedName("endip") private String endIP;
|
||||
@SerializedName("networkid") private long networkId;
|
||||
@SerializedName("networkid") private String networkId;
|
||||
|
||||
/* just for the deserializer */
|
||||
VlanIPRange() {}
|
||||
|
||||
public VlanIPRange(long id, String description, boolean forVirtualNetwork, long zoneId, String vlan, String account, long domainId, String domain, long podId, String podName, String gateway, String netmask, String startIP, String endIP, long networkId) {
|
||||
public VlanIPRange(String id, String description, boolean forVirtualNetwork, String zoneId, String vlan, String account, String domainId, String domain, String podId, String podName, String gateway, String netmask, String startIP, String endIP, String networkId) {
|
||||
this.id = id;
|
||||
this.description = description;
|
||||
this.forVirtualNetwork = forVirtualNetwork;
|
||||
|
@ -172,7 +167,7 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
this.networkId = networkId;
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -184,7 +179,7 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
return forVirtualNetwork;
|
||||
}
|
||||
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -196,7 +191,7 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
return account;
|
||||
}
|
||||
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -204,7 +199,7 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
return domain;
|
||||
}
|
||||
|
||||
public long getPodId() {
|
||||
public String getPodId() {
|
||||
return podId;
|
||||
}
|
||||
|
||||
|
@ -228,7 +223,7 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
return endIP;
|
||||
}
|
||||
|
||||
public long getNetworkId() {
|
||||
public String getNetworkId() {
|
||||
return networkId;
|
||||
}
|
||||
|
||||
|
@ -288,6 +283,6 @@ public class VlanIPRange implements Comparable<VlanIPRange> {
|
|||
|
||||
@Override
|
||||
public int compareTo(VlanIPRange other) {
|
||||
return Long.valueOf(this.id).compareTo(other.id);
|
||||
return this.id.compareTo(other.id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,39 +43,39 @@ public class Volume implements Comparable<Volume> {
|
|||
|
||||
public static class Builder {
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private Date attached;
|
||||
private Date created;
|
||||
private boolean destroyed;
|
||||
private long deviceId;
|
||||
private String deviceId;
|
||||
private String diskOfferingDisplayText;
|
||||
private long diskOfferingId;
|
||||
private String diskOfferingId;
|
||||
private String diskOfferingName;
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String hypervisor;
|
||||
private boolean isExtractable;
|
||||
private long jobId;
|
||||
private String jobId;
|
||||
private String jobStatus;
|
||||
private String name;
|
||||
private String serviceOfferingDisplayText;
|
||||
private long serviceOfferingId;
|
||||
private String serviceOfferingId;
|
||||
private String serviceOfferingName;
|
||||
private long size;
|
||||
private long snapshotId;
|
||||
private String snapshotId;
|
||||
private State state;
|
||||
private String storage;
|
||||
private String storageType;
|
||||
private Type type;
|
||||
private long virtualMachineId;
|
||||
private String virtualMachineId;
|
||||
private String vmDisplayName;
|
||||
private String vmName;
|
||||
private VirtualMachine.State vmState;
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
private String zoneName;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder deviceId(long deviceId) {
|
||||
public Builder deviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
return this;
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder diskOfferingId(long diskOfferingId) {
|
||||
public Builder diskOfferingId(String diskOfferingId) {
|
||||
this.diskOfferingId = diskOfferingId;
|
||||
return this;
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder jobId(long jobId) {
|
||||
public Builder jobId(String jobId) {
|
||||
this.jobId = jobId;
|
||||
return this;
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder serviceOfferingId(long serviceOfferingId) {
|
||||
public Builder serviceOfferingId(String serviceOfferingId) {
|
||||
this.serviceOfferingId = serviceOfferingId;
|
||||
return this;
|
||||
}
|
||||
|
@ -175,7 +175,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder snapshotId(long snapshotId) {
|
||||
public Builder snapshotId(String snapshotId) {
|
||||
this.snapshotId = snapshotId;
|
||||
return this;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder virtualMachineId(long virtualMachineId) {
|
||||
public Builder virtualMachineId(String virtualMachineId) {
|
||||
this.virtualMachineId = virtualMachineId;
|
||||
return this;
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder zoneId(long zoneId) {
|
||||
public Builder zoneId(String zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
return this;
|
||||
}
|
||||
|
@ -238,39 +238,39 @@ public class Volume implements Comparable<Volume> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String account;
|
||||
private Date attached;
|
||||
private Date created;
|
||||
private boolean destroyed;
|
||||
@SerializedName("deviceid")
|
||||
private long deviceId;
|
||||
private String deviceId;
|
||||
@SerializedName("diskofferingdisplaytext")
|
||||
private String diskOfferingDisplayText;
|
||||
@SerializedName("diskofferingid")
|
||||
private long diskOfferingId;
|
||||
private String diskOfferingId;
|
||||
@SerializedName("diskofferingname")
|
||||
private String diskOfferingName;
|
||||
private String domain;
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String hypervisor;
|
||||
@SerializedName("isextractable")
|
||||
private boolean isExtractable;
|
||||
@SerializedName("jobid")
|
||||
private long jobId;
|
||||
private String jobId;
|
||||
@SerializedName("jobstatus")
|
||||
private String jobStatus;
|
||||
private String name;
|
||||
@SerializedName("serviceofferingdisplaytext")
|
||||
private String serviceOfferingDisplayText;
|
||||
@SerializedName("serviceofferingid")
|
||||
private long serviceOfferingId;
|
||||
private String serviceOfferingId;
|
||||
@SerializedName("serviceofferingname")
|
||||
private String serviceOfferingName;
|
||||
private long size;
|
||||
@SerializedName("snapshotid")
|
||||
private long snapshotId;
|
||||
private String snapshotId;
|
||||
private State state;
|
||||
private String storage;
|
||||
@SerializedName("storagetype")
|
||||
|
@ -278,7 +278,7 @@ public class Volume implements Comparable<Volume> {
|
|||
private String storageType;
|
||||
private Type type;
|
||||
@SerializedName("virtualmachineid")
|
||||
private long virtualMachineId;
|
||||
private String virtualMachineId;
|
||||
@SerializedName("vmdisplayname")
|
||||
private String vmDisplayName;
|
||||
@SerializedName("vmname")
|
||||
|
@ -286,17 +286,17 @@ public class Volume implements Comparable<Volume> {
|
|||
@SerializedName("vmstate")
|
||||
private VirtualMachine.State vmState;
|
||||
@SerializedName("zoneid")
|
||||
private long zoneId;
|
||||
private String zoneId;
|
||||
@SerializedName("zonename")
|
||||
private String zoneName;
|
||||
|
||||
public Volume(long id,String account, Date attached, Date created, boolean destroyed, long deviceId,
|
||||
String diskOfferingDisplayText, long diskOfferingId, String diskOfferingName,
|
||||
String domain, long domainId, String hypervisor, boolean extractable, long jobId,
|
||||
String jobStatus, String name, String serviceOfferingDisplayText, long serviceOfferingId,
|
||||
String serviceOfferingName, long size, long snapshotId, State state, String storage,
|
||||
String storageType, Type type, long virtualMachineId, String vmDisplayName, String vmName,
|
||||
VirtualMachine.State vmState, long zoneId, String zoneName) {
|
||||
public Volume(String id,String account, Date attached, Date created, boolean destroyed, String deviceId,
|
||||
String diskOfferingDisplayText, String diskOfferingId, String diskOfferingName,
|
||||
String domain, String domainId, String hypervisor, boolean extractable, String jobId,
|
||||
String jobStatus, String name, String serviceOfferingDisplayText, String serviceOfferingId,
|
||||
String serviceOfferingName, long size, String snapshotId, State state, String storage,
|
||||
String storageType, Type type, String virtualMachineId, String vmDisplayName, String vmName,
|
||||
VirtualMachine.State vmState, String zoneId, String zoneName) {
|
||||
this.id = id;
|
||||
this.account = account;
|
||||
this.attached = attached;
|
||||
|
@ -334,7 +334,7 @@ public class Volume implements Comparable<Volume> {
|
|||
Volume() {
|
||||
}
|
||||
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -350,7 +350,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return destroyed;
|
||||
}
|
||||
|
||||
public long getDeviceId() {
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
|
@ -358,7 +358,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return diskOfferingDisplayText;
|
||||
}
|
||||
|
||||
public long getDiskOfferingId() {
|
||||
public String getDiskOfferingId() {
|
||||
return diskOfferingId;
|
||||
}
|
||||
|
||||
|
@ -370,7 +370,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return domain;
|
||||
}
|
||||
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -382,7 +382,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return isExtractable;
|
||||
}
|
||||
|
||||
public long getJobId() {
|
||||
public String getJobId() {
|
||||
return jobId;
|
||||
}
|
||||
|
||||
|
@ -398,7 +398,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return serviceOfferingDisplayText;
|
||||
}
|
||||
|
||||
public long getServiceOfferingId() {
|
||||
public String getServiceOfferingId() {
|
||||
return serviceOfferingId;
|
||||
}
|
||||
|
||||
|
@ -410,7 +410,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return size;
|
||||
}
|
||||
|
||||
public long getSnapshotId() {
|
||||
public String getSnapshotId() {
|
||||
return snapshotId;
|
||||
}
|
||||
|
||||
|
@ -430,7 +430,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return type;
|
||||
}
|
||||
|
||||
public long getVirtualMachineId() {
|
||||
public String getVirtualMachineId() {
|
||||
return virtualMachineId;
|
||||
}
|
||||
|
||||
|
@ -446,7 +446,7 @@ public class Volume implements Comparable<Volume> {
|
|||
return vmState;
|
||||
}
|
||||
|
||||
public long getZoneId() {
|
||||
public String getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
|
@ -460,7 +460,7 @@ public class Volume implements Comparable<Volume> {
|
|||
|
||||
@Override
|
||||
public int compareTo(Volume volume) {
|
||||
return Long.valueOf(this.id).compareTo(volume.id);
|
||||
return this.id.compareTo(volume.id);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -38,12 +38,12 @@ public class Zone implements Comparable<Zone> {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private long id;
|
||||
private String id;
|
||||
private String description;
|
||||
private String displayText;
|
||||
private List<String> DNS = ImmutableList.of();
|
||||
private String domain;
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
private String guestCIDRAddress;
|
||||
private List<String> internalDNS = ImmutableList.of();
|
||||
private String name;
|
||||
|
@ -54,7 +54,7 @@ public class Zone implements Comparable<Zone> {
|
|||
private String dhcpProvider;
|
||||
private String zoneToken;
|
||||
|
||||
public Builder id(long id) {
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ public class Zone implements Comparable<Zone> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder domainId(long domainId) {
|
||||
public Builder domainId(String domainId) {
|
||||
this.domainId = domainId;
|
||||
return this;
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ public class Zone implements Comparable<Zone> {
|
|||
}
|
||||
}
|
||||
|
||||
private long id;
|
||||
private String id;
|
||||
private String description;
|
||||
@SerializedName("displaytext")
|
||||
private String displayText;
|
||||
|
@ -147,7 +147,7 @@ public class Zone implements Comparable<Zone> {
|
|||
private String domain;
|
||||
@Nullable
|
||||
@SerializedName("domainid")
|
||||
private long domainId;
|
||||
private String domainId;
|
||||
@SerializedName("guestcidraddress")
|
||||
private String guestCIDRAddress;
|
||||
@SerializedName("internaldns1")
|
||||
|
@ -175,7 +175,7 @@ public class Zone implements Comparable<Zone> {
|
|||
|
||||
}
|
||||
|
||||
public Zone(long id, String description, String displayText, List<String> DNS, String domain, long domainId,
|
||||
public Zone(String id, String description, String displayText, List<String> DNS, String domain, String domainId,
|
||||
String guestCIDRAddress, List<String> internalDNS, String name, NetworkType networkType,
|
||||
String vLAN, boolean securityGroupsEnabled, AllocationState allocationState, String dhcpProvider, String zoneToken) {
|
||||
this.id = id;
|
||||
|
@ -200,7 +200,7 @@ public class Zone implements Comparable<Zone> {
|
|||
/**
|
||||
* @return Zone id
|
||||
*/
|
||||
public long getId() {
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
@ -241,7 +241,7 @@ public class Zone implements Comparable<Zone> {
|
|||
* @return the ID of the containing domain, null for public zones
|
||||
*/
|
||||
@Nullable
|
||||
public long getDomainId() {
|
||||
public String getDomainId() {
|
||||
return domainId;
|
||||
}
|
||||
|
||||
|
@ -374,6 +374,6 @@ public class Zone implements Comparable<Zone> {
|
|||
|
||||
@Override
|
||||
public int compareTo(Zone arg0) {
|
||||
return new Long(id).compareTo(arg0.getId());
|
||||
return id.compareTo(arg0.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public interface AccountAsyncClient {
|
|||
* @see AccountClient#listAccounts
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listAccounts")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listAccounts", "true" })
|
||||
@SelectJson("account")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -63,11 +63,11 @@ public interface AccountAsyncClient {
|
|||
* @see AccountClient#getAccount
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listAccounts")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listAccounts", "true" })
|
||||
@SelectJson("account")
|
||||
@OnlyElement
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Account> getAccount(@QueryParam("id") long id);
|
||||
ListenableFuture<Account> getAccount(@QueryParam("id") String id);
|
||||
|
||||
}
|
||||
|
|
|
@ -50,5 +50,5 @@ public interface AccountClient {
|
|||
* Account to get
|
||||
* @return Account or null if not found
|
||||
*/
|
||||
Account getAccount(long id);
|
||||
Account getAccount(String id);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public interface AddressAsyncClient {
|
|||
* @see AddressClient#listPublicIPAddresses
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listPublicIpAddresses")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listPublicIpAddresses", "true" })
|
||||
@SelectJson("publicipaddress")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -68,12 +68,12 @@ public interface AddressAsyncClient {
|
|||
* @see AddressClient#getPublicIPAddress
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listPublicIpAddresses")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listPublicIpAddresses", "true" })
|
||||
@SelectJson("publicipaddress")
|
||||
@OnlyElement
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<PublicIPAddress> getPublicIPAddress(@QueryParam("id") long id);
|
||||
ListenableFuture<PublicIPAddress> getPublicIPAddress(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see AddressClient#associateIPAddressInZone
|
||||
|
@ -82,7 +82,7 @@ public interface AddressAsyncClient {
|
|||
@QueryParams(keys = "command", values = "associateIpAddress")
|
||||
@Unwrap
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<AsyncCreateResponse> associateIPAddressInZone(@QueryParam("zoneid") long zoneId,
|
||||
ListenableFuture<AsyncCreateResponse> associateIPAddressInZone(@QueryParam("zoneid") String zoneId,
|
||||
AssociateIPAddressOptions... options);
|
||||
|
||||
/**
|
||||
|
@ -91,6 +91,6 @@ public interface AddressAsyncClient {
|
|||
@GET
|
||||
@QueryParams(keys = "command", values = "disassociateIpAddress")
|
||||
@ExceptionParser(ReturnVoidOnNotFoundOr404OrUnableToFindAccountOwner.class)
|
||||
ListenableFuture<Void> disassociateIPAddress(@QueryParam("id") long id);
|
||||
ListenableFuture<Void> disassociateIPAddress(@QueryParam("id") String id);
|
||||
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ public interface AddressClient {
|
|||
* IPAddress to get
|
||||
* @return IPAddress or null if not found
|
||||
*/
|
||||
PublicIPAddress getPublicIPAddress(long id);
|
||||
PublicIPAddress getPublicIPAddress(String id);
|
||||
|
||||
/**
|
||||
* Acquires and associates a public IP to an account.
|
||||
|
@ -64,7 +64,7 @@ public interface AddressClient {
|
|||
* address from
|
||||
* @return IPAddress
|
||||
*/
|
||||
AsyncCreateResponse associateIPAddressInZone(long zoneId, AssociateIPAddressOptions... options);
|
||||
AsyncCreateResponse associateIPAddressInZone(String zoneId, AssociateIPAddressOptions... options);
|
||||
|
||||
/**
|
||||
* Disassociates an ip address from the account.
|
||||
|
@ -73,5 +73,5 @@ public interface AddressClient {
|
|||
* the id of the public ip address to disassociate
|
||||
*/
|
||||
@Timeout(duration = 120, timeUnit = TimeUnit.SECONDS)
|
||||
void disassociateIPAddress(long id);
|
||||
void disassociateIPAddress(String id);
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public interface AsyncJobAsyncClient {
|
|||
* @see AsyncJobClient#listAsyncJobs
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listAsyncJobs")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listAsyncJobs", "true" })
|
||||
@ResponseParser(ParseAsyncJobsFromHttpResponse.class)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
ListenableFuture<Set<AsyncJob<?>>> listAsyncJobs(ListAsyncJobsOptions... options);
|
||||
|
@ -68,6 +68,6 @@ public interface AsyncJobAsyncClient {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ResponseParser(ParseAsyncJobFromHttpResponse.class)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
<T> ListenableFuture<AsyncJob<T>> getAsyncJob(@QueryParam("jobid") long id);
|
||||
<T> ListenableFuture<AsyncJob<T>> getAsyncJob(@QueryParam("jobid") String id);
|
||||
|
||||
}
|
||||
|
|
|
@ -51,5 +51,5 @@ public interface AsyncJobClient {
|
|||
* asyncJob to get
|
||||
* @return asyncJob or null if not found
|
||||
*/
|
||||
<T> AsyncJob<T> getAsyncJob(long id);
|
||||
<T> AsyncJob<T> getAsyncJob(String id);
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||
* @author Adrian Cole
|
||||
*/
|
||||
@RequestFilters(AuthenticationFilter.class)
|
||||
@QueryParams(keys = "response", values = "json")
|
||||
@QueryParams(keys = { "response", "listAll" }, values = { "json", "true" })
|
||||
public interface ConfigurationAsyncClient {
|
||||
|
||||
/**
|
||||
|
|
|
@ -56,7 +56,7 @@ public interface DomainAccountAsyncClient extends AccountAsyncClient {
|
|||
@SelectJson("account")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Account> enableAccount(@QueryParam("account") String accountName, @QueryParam("domainid") long domainId);
|
||||
ListenableFuture<Account> enableAccount(@QueryParam("account") String accountName, @QueryParam("domainid") String domainId);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -68,6 +68,6 @@ public interface DomainAccountAsyncClient extends AccountAsyncClient {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<AsyncCreateResponse> disableAccount(@QueryParam("account") String accountName,
|
||||
@QueryParam("domainid") long domainId, @QueryParam("lock") boolean onlyLock);
|
||||
@QueryParam("domainid") String domainId, @QueryParam("lock") boolean onlyLock);
|
||||
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public interface DomainAccountClient extends AccountClient {
|
|||
* @param domainId
|
||||
* the domain ID
|
||||
*/
|
||||
Account enableAccount(String accountName, long domainId);
|
||||
Account enableAccount(String accountName, String domainId);
|
||||
|
||||
/**
|
||||
* Disable or lock an account
|
||||
|
@ -56,6 +56,6 @@ public interface DomainAccountClient extends AccountClient {
|
|||
* @param onlyLock
|
||||
* only lock if true disable otherwise
|
||||
*/
|
||||
AsyncCreateResponse disableAccount(String accountName, long domainId, boolean onlyLock);
|
||||
AsyncCreateResponse disableAccount(String accountName, String domainId, boolean onlyLock);
|
||||
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public interface DomainDomainAsyncClient {
|
|||
* @see DomainDomainClient#listDomains
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listDomains")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listDomains", "true" })
|
||||
@SelectJson("domain")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -66,18 +66,18 @@ public interface DomainDomainAsyncClient {
|
|||
* @see DomainDomainClient#getDomainById
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listDomains")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listDomains", "true" })
|
||||
@SelectJson("domain")
|
||||
@OnlyElement
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Domain> getDomainById(@QueryParam("id") long domainId);
|
||||
ListenableFuture<Domain> getDomainById(@QueryParam("id") String domainId);
|
||||
|
||||
/**
|
||||
* @see DomainDomainClient#listDomainChildren
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listDomainChildren")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listDomainChildren", "true" })
|
||||
@SelectJson("domain")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
|
|
@ -56,7 +56,7 @@ public interface DomainDomainClient {
|
|||
* @return
|
||||
* domain instance or null
|
||||
*/
|
||||
Domain getDomainById(long domainId);
|
||||
Domain getDomainById(String domainId);
|
||||
|
||||
/**
|
||||
* Lists all children domains belonging to a specified domain
|
||||
|
|
|
@ -70,7 +70,7 @@ public interface DomainUserAsyncClient {
|
|||
@SelectJson("user")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<User> enableUser(@QueryParam("id") long userId);
|
||||
ListenableFuture<User> enableUser(@QueryParam("id") String userId);
|
||||
|
||||
/**
|
||||
* @see DomainUserClient#disableUser
|
||||
|
@ -80,6 +80,6 @@ public interface DomainUserAsyncClient {
|
|||
@Unwrap
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<AsyncCreateResponse> disableUser(@QueryParam("id") long userId);
|
||||
ListenableFuture<AsyncCreateResponse> disableUser(@QueryParam("id") String userId);
|
||||
|
||||
}
|
||||
|
|
|
@ -53,11 +53,11 @@ public interface DomainUserClient {
|
|||
* @param userId
|
||||
* the user ID to enable
|
||||
*/
|
||||
User enableUser(long userId);
|
||||
User enableUser(String userId);
|
||||
|
||||
/**
|
||||
* Disable a user with a specific ID
|
||||
*/
|
||||
AsyncCreateResponse disableUser(long userId);
|
||||
AsyncCreateResponse disableUser(String userId);
|
||||
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||
* @see <a href="http://download.cloud.com/releases/2.2.0/api_2.2.12/TOC_User.html" />
|
||||
*/
|
||||
@RequestFilters(AuthenticationFilter.class)
|
||||
@QueryParams(keys = "response", values = "json")
|
||||
@QueryParams(keys = { "response", "listAll" }, values = { "json", "true" })
|
||||
public interface EventAsyncClient {
|
||||
/**
|
||||
* @see EventClient#listEventTypes()
|
||||
|
|
|
@ -60,7 +60,7 @@ public interface FirewallAsyncClient {
|
|||
* @see FirewallClient#listFirewallRules
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listFirewallRules")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listFirewallRules", "true" })
|
||||
@SelectJson("firewallrule")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -70,12 +70,12 @@ public interface FirewallAsyncClient {
|
|||
* @see FirewallClient#getFirewallRule
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listFirewallRules")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listFirewallRules", "true" })
|
||||
@SelectJson("firewallrule")
|
||||
@OnlyElement
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<FirewallRule> getFirewallRule(@QueryParam("id") long id);
|
||||
ListenableFuture<FirewallRule> getFirewallRule(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see FirewallClient#createFirewallRuleForIpAndProtocol
|
||||
|
@ -84,7 +84,7 @@ public interface FirewallAsyncClient {
|
|||
@QueryParams(keys = "command", values = "createFirewallRule")
|
||||
@Unwrap
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<AsyncCreateResponse> createFirewallRuleForIpAndProtocol(@QueryParam("ipaddressid") long ipAddressId,
|
||||
ListenableFuture<AsyncCreateResponse> createFirewallRuleForIpAndProtocol(@QueryParam("ipaddressid") String ipAddressId,
|
||||
@QueryParam("protocol") FirewallRule.Protocol protocol, CreateFirewallRuleOptions... options);
|
||||
|
||||
/**
|
||||
|
@ -93,13 +93,13 @@ public interface FirewallAsyncClient {
|
|||
@GET
|
||||
@QueryParams(keys = "command", values = "deleteFirewallRule")
|
||||
@ExceptionParser(ReturnVoidOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deleteFirewallRule(@QueryParam("id") long id);
|
||||
ListenableFuture<Void> deleteFirewallRule(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see FirewallClient#listPortForwardingRules
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listPortForwardingRules")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listPortForwardingRules", "true" })
|
||||
@SelectJson("portforwardingrule")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -109,12 +109,12 @@ public interface FirewallAsyncClient {
|
|||
* @see FirewallClient#getPortForwardingRule
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listPortForwardingRules")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listPortForwardingRules", "true" })
|
||||
@SelectJson("portforwardingrule")
|
||||
@OnlyElement
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<PortForwardingRule> getPortForwardingRule(@QueryParam("id") long id);
|
||||
ListenableFuture<PortForwardingRule> getPortForwardingRule(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see FirewallClient#createPortForwardingRuleForVirtualMachine
|
||||
|
@ -124,8 +124,8 @@ public interface FirewallAsyncClient {
|
|||
@Unwrap
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<AsyncCreateResponse> createPortForwardingRuleForVirtualMachine(
|
||||
@QueryParam("ipaddressid") long ipAddressId, @QueryParam("protocol") PortForwardingRule.Protocol protocol,
|
||||
@QueryParam("publicport") int publicPort, @QueryParam("virtualmachineid") long virtualMachineId,
|
||||
@QueryParam("ipaddressid") String ipAddressId, @QueryParam("protocol") PortForwardingRule.Protocol protocol,
|
||||
@QueryParam("publicport") int publicPort, @QueryParam("virtualmachineid") String virtualMachineId,
|
||||
@QueryParam("privateport") int privatePort);
|
||||
|
||||
/**
|
||||
|
@ -134,6 +134,6 @@ public interface FirewallAsyncClient {
|
|||
@GET
|
||||
@QueryParams(keys = "command", values = "deletePortForwardingRule")
|
||||
@ExceptionParser(ReturnVoidOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deletePortForwardingRule(@QueryParam("id") long id);
|
||||
ListenableFuture<Void> deletePortForwardingRule(@QueryParam("id") String id);
|
||||
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public interface FirewallClient {
|
|||
* @return
|
||||
* firewall rule instance or null
|
||||
*/
|
||||
FirewallRule getFirewallRule(long id);
|
||||
FirewallRule getFirewallRule(String id);
|
||||
|
||||
/**
|
||||
* Create new firewall rule for a specific IP address
|
||||
|
@ -71,7 +71,7 @@ public interface FirewallClient {
|
|||
* optional arguments for firewall rule creation
|
||||
* @return
|
||||
*/
|
||||
AsyncCreateResponse createFirewallRuleForIpAndProtocol(long ipAddressId,
|
||||
AsyncCreateResponse createFirewallRuleForIpAndProtocol(String ipAddressId,
|
||||
FirewallRule.Protocol protocol, CreateFirewallRuleOptions... options);
|
||||
|
||||
/**
|
||||
|
@ -80,7 +80,7 @@ public interface FirewallClient {
|
|||
* @param id
|
||||
* the ID of the firewall rule
|
||||
*/
|
||||
Void deleteFirewallRule(long id);
|
||||
Void deleteFirewallRule(String id);
|
||||
|
||||
/**
|
||||
* List the port forwarding rules
|
||||
|
@ -100,7 +100,7 @@ public interface FirewallClient {
|
|||
* @return
|
||||
* rule instance or null
|
||||
*/
|
||||
PortForwardingRule getPortForwardingRule(long id);
|
||||
PortForwardingRule getPortForwardingRule(String id);
|
||||
|
||||
/**
|
||||
* Creates an port forwarding rule
|
||||
|
@ -117,8 +117,8 @@ public interface FirewallClient {
|
|||
* the private port of the port forwarding rule
|
||||
* @return response used to track creation
|
||||
*/
|
||||
AsyncCreateResponse createPortForwardingRuleForVirtualMachine(long ipAddressId,
|
||||
PortForwardingRule.Protocol protocol, int publicPort, long virtualMachineId, int privatePort);
|
||||
AsyncCreateResponse createPortForwardingRuleForVirtualMachine(String ipAddressId,
|
||||
PortForwardingRule.Protocol protocol, int publicPort, String virtualMachineId, int privatePort);
|
||||
|
||||
/**
|
||||
* Deletes an port forwarding rule
|
||||
|
@ -126,5 +126,5 @@ public interface FirewallClient {
|
|||
* @param id
|
||||
* the id of the forwarding rule
|
||||
*/
|
||||
Void deletePortForwardingRule(long id);
|
||||
Void deletePortForwardingRule(String id);
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public interface GlobalAccountAsyncClient extends DomainAccountAsyncClient {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Account> updateAccount(@QueryParam("account") String accountName,
|
||||
@QueryParam("domainid") long domainId, @QueryParam("newname") String newName, UpdateAccountOptions... options);
|
||||
@QueryParam("domainid") String domainId, @QueryParam("newname") String newName, UpdateAccountOptions... options);
|
||||
|
||||
/**
|
||||
* @see GlobalAccountClient#deleteAccount
|
||||
|
@ -79,5 +79,5 @@ public interface GlobalAccountAsyncClient extends DomainAccountAsyncClient {
|
|||
@QueryParams(keys = "command", values = "deleteAccount")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deleteAccount(@QueryParam("id") long id);
|
||||
ListenableFuture<Void> deleteAccount(@QueryParam("id") String id);
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ public interface GlobalAccountClient extends DomainAccountClient {
|
|||
* @param options optional arguments
|
||||
* @return
|
||||
*/
|
||||
Account updateAccount(String accountName, long domainId, String newName, UpdateAccountOptions... options);
|
||||
Account updateAccount(String accountName, String domainId, String newName, UpdateAccountOptions... options);
|
||||
|
||||
/**
|
||||
* Delete an account with the specified ID
|
||||
|
@ -72,6 +72,6 @@ public interface GlobalAccountClient extends DomainAccountClient {
|
|||
* @param accountId
|
||||
* @return
|
||||
*/
|
||||
Void deleteAccount(long accountId);
|
||||
Void deleteAccount(String accountId);
|
||||
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public interface GlobalAlertAsyncClient {
|
|||
* @see GlobalAlertClient#listAlerts(org.jclouds.cloudstack.options.ListAlertsOptions...)
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listAlerts")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listAlerts", "true" })
|
||||
@SelectJson("alert")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
|
|
@ -52,7 +52,7 @@ public interface GlobalCapacityAsyncClient {
|
|||
* @see GlobalCapacityClient#listCapacity(org.jclouds.cloudstack.options.ListCapacityOptions...)
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listCapacity")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listCapacity", "true" })
|
||||
@SelectJson("capacity")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
|
|
@ -54,7 +54,7 @@ public interface GlobalConfigurationAsyncClient extends ConfigurationAsyncClient
|
|||
* @see GlobalConfigurationClient#listConfigurationEntries
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listConfigurations")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listConfigurations", "true" })
|
||||
@SelectJson("configuration")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
|
|
@ -67,7 +67,7 @@ public interface GlobalDomainAsyncClient extends DomainDomainAsyncClient {
|
|||
@SelectJson("domain")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Domain> updateDomain(@QueryParam("id") long domainId, UpdateDomainOptions... options);
|
||||
ListenableFuture<Domain> updateDomain(@QueryParam("id") String domainId, UpdateDomainOptions... options);
|
||||
|
||||
/**
|
||||
* @see GlobalDomainClient#deleteOnlyDomain
|
||||
|
@ -75,7 +75,7 @@ public interface GlobalDomainAsyncClient extends DomainDomainAsyncClient {
|
|||
@GET
|
||||
@QueryParams(keys = {"command", "cleanup"}, values = {"deleteDomain", "false"})
|
||||
@ExceptionParser(ReturnVoidOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deleteOnlyDomain(@QueryParam("id") long id);
|
||||
ListenableFuture<Void> deleteOnlyDomain(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see GlobalDomainClient#deleteDomainAndAttachedResources
|
||||
|
@ -83,6 +83,6 @@ public interface GlobalDomainAsyncClient extends DomainDomainAsyncClient {
|
|||
@GET
|
||||
@QueryParams(keys = {"command", "cleanup"}, values = {"deleteDomain", "true"})
|
||||
@ExceptionParser(ReturnVoidOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deleteDomainAndAttachedResources(@QueryParam("id") long id);
|
||||
ListenableFuture<Void> deleteDomainAndAttachedResources(@QueryParam("id") String id);
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ public interface GlobalDomainClient extends DomainDomainClient {
|
|||
* @return
|
||||
* domain instance
|
||||
*/
|
||||
Domain updateDomain(long domainId, UpdateDomainOptions... options);
|
||||
Domain updateDomain(String domainId, UpdateDomainOptions... options);
|
||||
|
||||
/**
|
||||
* Delete domain (without deleting attached resources)
|
||||
|
@ -67,7 +67,7 @@ public interface GlobalDomainClient extends DomainDomainClient {
|
|||
* @param id
|
||||
* the domain ID
|
||||
*/
|
||||
Void deleteOnlyDomain(long id);
|
||||
Void deleteOnlyDomain(String id);
|
||||
|
||||
/**
|
||||
* Delete domain and cleanup all attached resources
|
||||
|
@ -75,5 +75,5 @@ public interface GlobalDomainClient extends DomainDomainClient {
|
|||
* @param id
|
||||
* the domain ID
|
||||
*/
|
||||
Void deleteDomainAndAttachedResources(long id);
|
||||
Void deleteDomainAndAttachedResources(String id);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public interface GlobalHostAsyncClient {
|
|||
* @see GlobalHostClient#listHosts
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listHosts")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listHosts", "true" })
|
||||
@SelectJson("host")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -81,7 +81,7 @@ public interface GlobalHostAsyncClient {
|
|||
@QueryParams(keys = "command", values = "addHost")
|
||||
@SelectJson("host")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Host> addHost(@QueryParam("zoneid") long zoneId, @QueryParam("url") String url, @QueryParam("hypervisor") String hypervisor, @QueryParam("username") String username, @QueryParam("password") String password, AddHostOptions... options);
|
||||
ListenableFuture<Host> addHost(@QueryParam("zoneid") String zoneId, @QueryParam("url") String url, @QueryParam("hypervisor") String hypervisor, @QueryParam("username") String username, @QueryParam("password") String password, AddHostOptions... options);
|
||||
|
||||
/**
|
||||
* Updates a host.
|
||||
|
@ -94,7 +94,7 @@ public interface GlobalHostAsyncClient {
|
|||
@QueryParams(keys = "command", values = "updateHost")
|
||||
@SelectJson("host")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Host> updateHost(@QueryParam("id") long hostId, UpdateHostOptions... options);
|
||||
ListenableFuture<Host> updateHost(@QueryParam("id") String hostId, UpdateHostOptions... options);
|
||||
|
||||
/**
|
||||
* Update password of a host on management server.
|
||||
|
@ -106,7 +106,7 @@ public interface GlobalHostAsyncClient {
|
|||
@GET
|
||||
@QueryParams(keys = "command", values = "updateHostPassword")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Void> updateHostPassword(@QueryParam("hostid") long hostId, @QueryParam("username") String username, @QueryParam("password") String password);
|
||||
ListenableFuture<Void> updateHostPassword(@QueryParam("hostid") String hostId, @QueryParam("username") String username, @QueryParam("password") String password);
|
||||
|
||||
/**
|
||||
* Deletes a host.
|
||||
|
@ -117,7 +117,7 @@ public interface GlobalHostAsyncClient {
|
|||
@GET
|
||||
@QueryParams(keys = "command", values = "deleteHost")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Void> deleteHost(@QueryParam("id") long hostId, DeleteHostOptions... options);
|
||||
ListenableFuture<Void> deleteHost(@QueryParam("id") String hostId, DeleteHostOptions... options);
|
||||
|
||||
/**
|
||||
* Prepares a host for maintenance.
|
||||
|
@ -129,7 +129,7 @@ public interface GlobalHostAsyncClient {
|
|||
@QueryParams(keys = "command", values = "prepareHostForMaintenance")
|
||||
@SelectJson("jobid")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Long> prepareHostForMaintenance(@QueryParam("id") long hostId);
|
||||
ListenableFuture<String> prepareHostForMaintenance(@QueryParam("id") String hostId);
|
||||
|
||||
/**
|
||||
* Cancels host maintenance.
|
||||
|
@ -141,7 +141,7 @@ public interface GlobalHostAsyncClient {
|
|||
@QueryParams(keys = "command", values = "cancelHostMaintenance")
|
||||
@SelectJson("jobid")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Long> cancelHostMaintenance(@QueryParam("id") long hostId);
|
||||
ListenableFuture<String> cancelHostMaintenance(@QueryParam("id") String hostId);
|
||||
|
||||
/**
|
||||
* Reconnects a host.
|
||||
|
@ -153,7 +153,7 @@ public interface GlobalHostAsyncClient {
|
|||
@QueryParams(keys = "command", values = "reconnectHost")
|
||||
@SelectJson("jobid")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Long> reconnectHost(@QueryParam("id") long hostId);
|
||||
ListenableFuture<String> reconnectHost(@QueryParam("id") String hostId);
|
||||
|
||||
/**
|
||||
* Adds secondary storage.
|
||||
|
@ -172,7 +172,7 @@ public interface GlobalHostAsyncClient {
|
|||
* @see GlobalHostClient#listClusters
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listClusters")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listClusters", "true" })
|
||||
@SelectJson("cluster")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -192,7 +192,7 @@ public interface GlobalHostAsyncClient {
|
|||
@QueryParams(keys = "command", values = "addCluster")
|
||||
@SelectJson("cluster")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Cluster> addCluster(@QueryParam("zoneid") long zoneId, @QueryParam("clustername") String clusterName, @QueryParam("clustertype") Host.ClusterType clusterType, @QueryParam("hypervisor") String hypervisor, AddClusterOptions... options);
|
||||
ListenableFuture<Cluster> addCluster(@QueryParam("zoneid") String zoneId, @QueryParam("clustername") String clusterName, @QueryParam("clustertype") Host.ClusterType clusterType, @QueryParam("hypervisor") String hypervisor, AddClusterOptions... options);
|
||||
|
||||
/**
|
||||
* Updates an existing cluster.
|
||||
|
@ -205,7 +205,7 @@ public interface GlobalHostAsyncClient {
|
|||
@QueryParams(keys = "command", values = "updateCluster")
|
||||
@SelectJson("cluster")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Cluster> updateCluster(@QueryParam("id") long clusterId, UpdateClusterOptions... options);
|
||||
ListenableFuture<Cluster> updateCluster(@QueryParam("id") String clusterId, UpdateClusterOptions... options);
|
||||
|
||||
/**
|
||||
* Update password of a cluster on management server.
|
||||
|
@ -218,7 +218,7 @@ public interface GlobalHostAsyncClient {
|
|||
@QueryParams(keys = "command", values = "updateHostPassword")
|
||||
@SelectJson("cluster")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Void> updateClusterPassword(@QueryParam("clusterid") long clusterId, @QueryParam("username") String username, @QueryParam("password") String password);
|
||||
ListenableFuture<Void> updateClusterPassword(@QueryParam("clusterid") String clusterId, @QueryParam("username") String username, @QueryParam("password") String password);
|
||||
|
||||
/**
|
||||
* Deletes a cluster.
|
||||
|
@ -228,6 +228,6 @@ public interface GlobalHostAsyncClient {
|
|||
@GET
|
||||
@QueryParams(keys = "command", values = "deleteCluster")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Void> deleteCluster(@QueryParam("id") long clusterId);
|
||||
ListenableFuture<Void> deleteCluster(@QueryParam("id") String clusterId);
|
||||
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ public interface GlobalHostClient {
|
|||
* @param options optional arguments
|
||||
* @return the new host.
|
||||
*/
|
||||
Host addHost(long zoneId, String url, String hypervisor, String username, String password, AddHostOptions... options);
|
||||
Host addHost(String zoneId, String url, String hypervisor, String username, String password, AddHostOptions... options);
|
||||
|
||||
/**
|
||||
* Updates a host.
|
||||
|
@ -74,7 +74,7 @@ public interface GlobalHostClient {
|
|||
* @param options optional arguments
|
||||
* @return the modified host.
|
||||
*/
|
||||
Host updateHost(long hostId, UpdateHostOptions... options);
|
||||
Host updateHost(String hostId, UpdateHostOptions... options);
|
||||
|
||||
/**
|
||||
* Update password of a host on management server.
|
||||
|
@ -83,7 +83,7 @@ public interface GlobalHostClient {
|
|||
* @param username the username for the host
|
||||
* @param password the password for the host
|
||||
*/
|
||||
void updateHostPassword(long hostId, String username, String password);
|
||||
void updateHostPassword(String hostId, String username, String password);
|
||||
|
||||
/**
|
||||
* Deletes a host.
|
||||
|
@ -91,7 +91,7 @@ public interface GlobalHostClient {
|
|||
* @param hostId the host ID
|
||||
* @param options optional arguments
|
||||
*/
|
||||
void deleteHost(long hostId, DeleteHostOptions... options);
|
||||
void deleteHost(String hostId, DeleteHostOptions... options);
|
||||
|
||||
/**
|
||||
* Prepares a host for maintenance.
|
||||
|
@ -99,7 +99,7 @@ public interface GlobalHostClient {
|
|||
* @param hostId the host ID
|
||||
* @return a job reference number for tracking this asynchronous job.
|
||||
*/
|
||||
Long prepareHostForMaintenance(long hostId);
|
||||
String prepareHostForMaintenance(String hostId);
|
||||
|
||||
/**
|
||||
* Cancels host maintenance.
|
||||
|
@ -107,7 +107,7 @@ public interface GlobalHostClient {
|
|||
* @param hostId the host ID
|
||||
* @return a job reference number for tracking this asynchronous job.
|
||||
*/
|
||||
Long cancelHostMaintenance(long hostId);
|
||||
String cancelHostMaintenance(String hostId);
|
||||
|
||||
/**
|
||||
* Reconnects a host.
|
||||
|
@ -115,7 +115,7 @@ public interface GlobalHostClient {
|
|||
* @param hostId
|
||||
* @return a job reference number for tracking this asynchronous job.
|
||||
*/
|
||||
Long reconnectHost(long hostId);
|
||||
String reconnectHost(String hostId);
|
||||
|
||||
/**
|
||||
* Adds secondary storage.
|
||||
|
@ -144,7 +144,7 @@ public interface GlobalHostClient {
|
|||
* @param options optional arguments
|
||||
* @return the new cluster.
|
||||
*/
|
||||
Cluster addCluster(long zoneId, String clusterName, Host.ClusterType clusterType, String hypervisor, AddClusterOptions... options);
|
||||
Cluster addCluster(String zoneId, String clusterName, Host.ClusterType clusterType, String hypervisor, AddClusterOptions... options);
|
||||
|
||||
/**
|
||||
* Updates an existing cluster.
|
||||
|
@ -153,7 +153,7 @@ public interface GlobalHostClient {
|
|||
* @param options optional arguments
|
||||
* @return the modified cluster
|
||||
*/
|
||||
Cluster updateCluster(long clusterId, UpdateClusterOptions... options);
|
||||
Cluster updateCluster(String clusterId, UpdateClusterOptions... options);
|
||||
|
||||
/**
|
||||
* Update password of a cluster on management server.
|
||||
|
@ -162,13 +162,13 @@ public interface GlobalHostClient {
|
|||
* @param username the username for the cluster
|
||||
* @param password the password for the cluster
|
||||
*/
|
||||
void updateClusterPassword(long clusterId, String username, String password);
|
||||
void updateClusterPassword(String clusterId, String username, String password);
|
||||
|
||||
/**
|
||||
* Deletes a cluster.
|
||||
*
|
||||
* @param clusterId the cluster ID
|
||||
*/
|
||||
void deleteCluster(long clusterId);
|
||||
void deleteCluster(String clusterId);
|
||||
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
|
|||
@SelectJson("serviceoffering")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<ServiceOffering> updateServiceOffering(@QueryParam("id") long id, UpdateServiceOfferingOptions... options);
|
||||
ListenableFuture<ServiceOffering> updateServiceOffering(@QueryParam("id") String id, UpdateServiceOfferingOptions... options);
|
||||
|
||||
/**
|
||||
* @see GlobalOfferingClient#deleteServiceOffering
|
||||
|
@ -81,7 +81,7 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
|
|||
@QueryParams(keys = "command", values = "deleteServiceOffering")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deleteServiceOffering(@QueryParam("id") long id);
|
||||
ListenableFuture<Void> deleteServiceOffering(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see GlobalOfferingClient#createDiskOffering
|
||||
|
@ -102,7 +102,7 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
|
|||
@SelectJson("diskoffering")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<DiskOffering> updateDiskOffering(@QueryParam("id") long id, UpdateDiskOfferingOptions... options);
|
||||
ListenableFuture<DiskOffering> updateDiskOffering(@QueryParam("id") String id, UpdateDiskOfferingOptions... options);
|
||||
|
||||
/**
|
||||
* @see GlobalOfferingClient#deleteDiskOffering
|
||||
|
@ -111,7 +111,7 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
|
|||
@QueryParams(keys = "command", values = "deleteDiskOffering")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deleteDiskOffering(@QueryParam("id") long id);
|
||||
ListenableFuture<Void> deleteDiskOffering(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see GlobalOfferingClient#updateNetworkOffering
|
||||
|
@ -121,5 +121,5 @@ public interface GlobalOfferingAsyncClient extends OfferingAsyncClient {
|
|||
@SelectJson("networkoffering")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<NetworkOffering> updateNetworkOffering(@QueryParam("id") long id, UpdateNetworkOfferingOptions... options);
|
||||
ListenableFuture<NetworkOffering> updateNetworkOffering(@QueryParam("id") String id, UpdateNetworkOfferingOptions... options);
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public interface GlobalOfferingClient extends OfferingClient {
|
|||
* @return
|
||||
* service offering instance
|
||||
*/
|
||||
ServiceOffering updateServiceOffering(long id, UpdateServiceOfferingOptions... options);
|
||||
ServiceOffering updateServiceOffering(String id, UpdateServiceOfferingOptions... options);
|
||||
|
||||
/**
|
||||
* Delete service offering
|
||||
|
@ -80,7 +80,7 @@ public interface GlobalOfferingClient extends OfferingClient {
|
|||
* @param id
|
||||
* the ID of the service offering
|
||||
*/
|
||||
Void deleteServiceOffering(long id);
|
||||
Void deleteServiceOffering(String id);
|
||||
|
||||
/**
|
||||
* Create a new disk offering
|
||||
|
@ -106,7 +106,7 @@ public interface GlobalOfferingClient extends OfferingClient {
|
|||
* @return
|
||||
* disk offering instance
|
||||
*/
|
||||
DiskOffering updateDiskOffering(long id, UpdateDiskOfferingOptions... options);
|
||||
DiskOffering updateDiskOffering(String id, UpdateDiskOfferingOptions... options);
|
||||
|
||||
/**
|
||||
* Delete disk offering
|
||||
|
@ -114,7 +114,7 @@ public interface GlobalOfferingClient extends OfferingClient {
|
|||
* @param id
|
||||
* the ID of the disk offering
|
||||
*/
|
||||
Void deleteDiskOffering(long id);
|
||||
Void deleteDiskOffering(String id);
|
||||
|
||||
/**
|
||||
* Update network offering
|
||||
|
@ -126,5 +126,5 @@ public interface GlobalOfferingClient extends OfferingClient {
|
|||
* @return
|
||||
* network offering instance
|
||||
*/
|
||||
NetworkOffering updateNetworkOffering(long id, UpdateNetworkOfferingOptions... options);
|
||||
NetworkOffering updateNetworkOffering(String id, UpdateNetworkOfferingOptions... options);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public interface GlobalPodAsyncClient {
|
|||
* @see PodClient#listPods
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listPods")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listPods", "true" })
|
||||
@SelectJson("pod")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -68,12 +68,12 @@ public interface GlobalPodAsyncClient {
|
|||
* @see PodClient#getPod
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listPods")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listPods", "true" })
|
||||
@SelectJson("pod")
|
||||
@OnlyElement
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Pod> getPod(@QueryParam("id") long id);
|
||||
ListenableFuture<Pod> getPod(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* Creates a new Pod.
|
||||
|
@ -92,7 +92,7 @@ public interface GlobalPodAsyncClient {
|
|||
@SelectJson("pod")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Pod> createPod(@QueryParam("name") String name, @QueryParam("zoneid") long zoneId, @QueryParam("startip") String startIp, @QueryParam("endip") String endIp, @QueryParam("gateway") String gateway, @QueryParam("netmask") String netmask, CreatePodOptions... createPodOptions);
|
||||
ListenableFuture<Pod> createPod(@QueryParam("name") String name, @QueryParam("zoneid") String zoneId, @QueryParam("startip") String startIp, @QueryParam("endip") String endIp, @QueryParam("gateway") String gateway, @QueryParam("netmask") String netmask, CreatePodOptions... createPodOptions);
|
||||
|
||||
/**
|
||||
* Creates a new Pod.
|
||||
|
@ -110,7 +110,7 @@ public interface GlobalPodAsyncClient {
|
|||
@SelectJson("pod")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Pod> createPod(@QueryParam("name") String name, @QueryParam("zoneid") long zoneId, @QueryParam("startip") String startIp, @QueryParam("gateway") String gateway, @QueryParam("netmask") String netmask, CreatePodOptions... createPodOptions);
|
||||
ListenableFuture<Pod> createPod(@QueryParam("name") String name, @QueryParam("zoneid") String zoneId, @QueryParam("startip") String startIp, @QueryParam("gateway") String gateway, @QueryParam("netmask") String netmask, CreatePodOptions... createPodOptions);
|
||||
|
||||
/**
|
||||
* Deletes a Pod.
|
||||
|
@ -120,7 +120,7 @@ public interface GlobalPodAsyncClient {
|
|||
@QueryParams(keys = "command", values = "deletePod")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnVoidOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deletePod(@QueryParam("id") long id);
|
||||
ListenableFuture<Void> deletePod(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* Updates a Pod.
|
||||
|
@ -133,6 +133,6 @@ public interface GlobalPodAsyncClient {
|
|||
@SelectJson("pod")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Pod> updatePod(@QueryParam("id") long id, UpdatePodOptions... updatePodOptions);
|
||||
ListenableFuture<Pod> updatePod(@QueryParam("id") String id, UpdatePodOptions... updatePodOptions);
|
||||
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ public interface GlobalPodClient {
|
|||
* pod to get
|
||||
* @return pod or null if not found
|
||||
*/
|
||||
Pod getPod(long id);
|
||||
Pod getPod(String id);
|
||||
|
||||
/**
|
||||
* Creates a new Pod.
|
||||
|
@ -69,7 +69,7 @@ public interface GlobalPodClient {
|
|||
* @param createPodOptions optional arguments
|
||||
* @return the new Pod
|
||||
*/
|
||||
Pod createPod(String name, long zoneId, String startIp, String endIp, String gateway, String netmask, CreatePodOptions... createPodOptions);
|
||||
Pod createPod(String name, String zoneId, String startIp, String endIp, String gateway, String netmask, CreatePodOptions... createPodOptions);
|
||||
|
||||
/**
|
||||
* Creates a new Pod.
|
||||
|
@ -82,13 +82,13 @@ public interface GlobalPodClient {
|
|||
* @param createPodOptions optional arguments
|
||||
* @return the new Pod
|
||||
*/
|
||||
Pod createPod(String name, long zoneId, String startIp, String gateway, String netmask, CreatePodOptions... createPodOptions);
|
||||
Pod createPod(String name, String zoneId, String startIp, String gateway, String netmask, CreatePodOptions... createPodOptions);
|
||||
|
||||
/**
|
||||
* Deletes a Pod.
|
||||
* @param id the ID of the Pod
|
||||
*/
|
||||
void deletePod(long id);
|
||||
void deletePod(String id);
|
||||
|
||||
/**
|
||||
* Updates a Pod.
|
||||
|
@ -96,6 +96,6 @@ public interface GlobalPodClient {
|
|||
* @param updatePodOptions optional arguments
|
||||
* @return the updated pod
|
||||
*/
|
||||
Pod updatePod(long id, UpdatePodOptions... updatePodOptions);
|
||||
Pod updatePod(String id, UpdatePodOptions... updatePodOptions);
|
||||
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||
public interface GlobalStoragePoolAsyncClient {
|
||||
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listStoragePools")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listStoragePools", "true" })
|
||||
@SelectJson("storagepool")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Set<StoragePool>> listStoragePools(ListStoragePoolsOptions... options);
|
||||
|
|
|
@ -58,7 +58,7 @@ public interface GlobalUsageAsyncClient {
|
|||
ListenableFuture<JobResult> generateUsageRecords(@QueryParam("startdate") @ParamParser(DateToYyyyMmDd.class) Date start, @QueryParam("enddate") @ParamParser(DateToYyyyMmDd.class) Date end, GenerateUsageRecordsOptions... options);
|
||||
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listUsageRecords")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listUsageRecords", "true" })
|
||||
@SelectJson("usagerecord")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Set<UsageRecord>> listUsageRecords(@QueryParam("startdate") @ParamParser(DateToYyyyMmDd.class) Date start, @QueryParam("enddate") @ParamParser(DateToYyyyMmDd.class) Date end, ListUsageRecordsOptions... options);
|
||||
|
|
|
@ -69,7 +69,7 @@ public interface GlobalUserAsyncClient extends DomainUserAsyncClient {
|
|||
@SelectJson("userkeys")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<ApiKeyPair> registerUserKeys(@QueryParam("id") long userId);
|
||||
ListenableFuture<ApiKeyPair> registerUserKeys(@QueryParam("id") String userId);
|
||||
|
||||
/**
|
||||
* @see GlobalUserClient#updateUser
|
||||
|
@ -79,7 +79,7 @@ public interface GlobalUserAsyncClient extends DomainUserAsyncClient {
|
|||
@SelectJson("user")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<User> updateUser(@QueryParam("id") long id, UpdateUserOptions... options);
|
||||
ListenableFuture<User> updateUser(@QueryParam("id") String id, UpdateUserOptions... options);
|
||||
|
||||
/**
|
||||
* @see GlobalUserClient#deleteUser
|
||||
|
@ -88,5 +88,5 @@ public interface GlobalUserAsyncClient extends DomainUserAsyncClient {
|
|||
@QueryParams(keys = "command", values = "deleteUser")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deleteUser(@QueryParam("id") long id);
|
||||
ListenableFuture<Void> deleteUser(@QueryParam("id") String id);
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ public interface GlobalUserClient extends DomainUserClient {
|
|||
* @param userId the ID of the user
|
||||
* @return
|
||||
*/
|
||||
ApiKeyPair registerUserKeys(long userId);
|
||||
ApiKeyPair registerUserKeys(String userId);
|
||||
|
||||
/**
|
||||
* Update an user
|
||||
|
@ -74,12 +74,12 @@ public interface GlobalUserClient extends DomainUserClient {
|
|||
* @param options optional arguments
|
||||
* @return
|
||||
*/
|
||||
User updateUser(long id, UpdateUserOptions... options);
|
||||
User updateUser(String id, UpdateUserOptions... options);
|
||||
|
||||
/**
|
||||
* Delete an user with the specified ID
|
||||
*
|
||||
* @param id user ID
|
||||
*/
|
||||
Void deleteUser(long id);
|
||||
Void deleteUser(String id);
|
||||
}
|
||||
|
|
|
@ -58,12 +58,12 @@ public interface GlobalVlanAsyncClient {
|
|||
* @return the requested IP range.
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listVlanIpRanges")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listVlanIpRanges", "true" })
|
||||
@SelectJson("vlaniprange")
|
||||
@OnlyElement
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<VlanIPRange> getVlanIPRange(@QueryParam("id") long id);
|
||||
ListenableFuture<VlanIPRange> getVlanIPRange(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* Lists all VLAN IP ranges.
|
||||
|
@ -72,7 +72,7 @@ public interface GlobalVlanAsyncClient {
|
|||
* @return the list of IP ranges that match the criteria.
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listVlanIpRanges")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listVlanIpRanges", "true" })
|
||||
@SelectJson("vlaniprange")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -102,5 +102,5 @@ public interface GlobalVlanAsyncClient {
|
|||
@QueryParams(keys = "command", values = "deleteVlanIpRange")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnVoidOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deleteVlanIPRange(@QueryParam("id") long rangeId);
|
||||
ListenableFuture<Void> deleteVlanIPRange(@QueryParam("id") String rangeId);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public interface GlobalVlanClient {
|
|||
* @param id the required IP range.
|
||||
* @return the requested IP range.
|
||||
*/
|
||||
VlanIPRange getVlanIPRange(long id);
|
||||
VlanIPRange getVlanIPRange(String id);
|
||||
|
||||
/**
|
||||
* Lists all VLAN IP ranges.
|
||||
|
@ -66,5 +66,5 @@ public interface GlobalVlanClient {
|
|||
* Deletes a VLAN IP range.
|
||||
* @param rangeId the id of the VLAN IP range
|
||||
*/
|
||||
void deleteVlanIPRange(long rangeId);
|
||||
void deleteVlanIPRange(String rangeId);
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ public interface GlobalZoneAsyncClient extends ZoneAsyncClient {
|
|||
@SelectJson("zone")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Zone> updateZone(@QueryParam("id") long id, UpdateZoneOptions... options);
|
||||
ListenableFuture<Zone> updateZone(@QueryParam("id") String id, UpdateZoneOptions... options);
|
||||
|
||||
/**
|
||||
* @see GlobalZoneClient#deleteZone
|
||||
|
@ -78,5 +78,5 @@ public interface GlobalZoneAsyncClient extends ZoneAsyncClient {
|
|||
@QueryParams(keys = "command", values = "deleteZone")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnVoidOnNotFoundOr404.class)
|
||||
ListenableFuture<Void> deleteZone(@QueryParam("id") long id);
|
||||
ListenableFuture<Void> deleteZone(@QueryParam("id") String id);
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ public interface GlobalZoneClient extends ZoneClient {
|
|||
* optional arguments
|
||||
* @return
|
||||
*/
|
||||
Zone updateZone(long id, UpdateZoneOptions... options);
|
||||
Zone updateZone(String id, UpdateZoneOptions... options);
|
||||
|
||||
/**
|
||||
* Delete a zone with a specific ID
|
||||
|
@ -74,6 +74,6 @@ public interface GlobalZoneClient extends ZoneClient {
|
|||
* @param zoneId
|
||||
* the ID of the Zone
|
||||
*/
|
||||
Void deleteZone(long zoneId);
|
||||
Void deleteZone(String zoneId);
|
||||
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public interface GuestOSAsyncClient {
|
|||
* @see GuestOSClient#listOSTypes
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listOsTypes")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listOsTypes", "true" })
|
||||
@SelectJson("ostype")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -68,29 +68,29 @@ public interface GuestOSAsyncClient {
|
|||
* @see OSTypeClient#getOSType
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listOsTypes")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listOsTypes", "true" })
|
||||
@SelectJson("ostype")
|
||||
@OnlyElement
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<OSType> getOSType(@QueryParam("id") long id);
|
||||
ListenableFuture<OSType> getOSType(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see GuestOSClient#listOSCategories
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listOsCategories")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listOsCategories", "true" })
|
||||
@ResponseParser(ParseIdToNameFromHttpResponse.class)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
ListenableFuture<Map<Long, String>> listOSCategories();
|
||||
ListenableFuture<Map<String, String>> listOSCategories();
|
||||
|
||||
/**
|
||||
* @see GuestOSClient#getOSCategory
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listOsCategories")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listOsCategories", "true" })
|
||||
@ResponseParser(ParseIdToNameEntryFromHttpResponse.class)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Map.Entry<Long, String>> getOSCategory(@QueryParam("id") long id);
|
||||
ListenableFuture<Map.Entry<String, String>> getOSCategory(@QueryParam("id") String id);
|
||||
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public interface GuestOSClient {
|
|||
* os type to get
|
||||
* @return os type or null if not found
|
||||
*/
|
||||
OSType getOSType(long id);
|
||||
OSType getOSType(String id);
|
||||
|
||||
/**
|
||||
* Lists all supported OS categories for this cloud.
|
||||
|
@ -60,7 +60,7 @@ public interface GuestOSClient {
|
|||
* @return os categories matching query, or empty set, if no categories are
|
||||
* found
|
||||
*/
|
||||
Map<Long, String> listOSCategories();
|
||||
Map<String, String> listOSCategories();
|
||||
|
||||
/**
|
||||
* get a specific os category by id
|
||||
|
@ -69,5 +69,5 @@ public interface GuestOSClient {
|
|||
* os category to get
|
||||
* @return os category or null if not found
|
||||
*/
|
||||
Map.Entry<Long, String> getOSCategory(long id);
|
||||
Map.Entry<String, String> getOSCategory(String id);
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public interface HypervisorAsyncClient {
|
|||
* @see HypervisorClient#listHypervisors
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listHypervisors")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listHypervisors", "true" })
|
||||
@ResponseParser(ParseNamesFromHttpResponse.class)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
ListenableFuture<Set<String>> listHypervisors();
|
||||
|
@ -58,8 +58,8 @@ public interface HypervisorAsyncClient {
|
|||
* @see HypervisorClient#listHypervisorsInZone
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listHypervisors")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listHypervisors", "true" })
|
||||
@ResponseParser(ParseNamesFromHttpResponse.class)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
ListenableFuture<Set<String>> listHypervisorsInZone(@QueryParam("zoneid") long zoneId);
|
||||
ListenableFuture<Set<String>> listHypervisorsInZone(@QueryParam("zoneid") String zoneId);
|
||||
}
|
||||
|
|
|
@ -47,6 +47,6 @@ public interface HypervisorClient {
|
|||
* the zone id for listing hypervisors.
|
||||
* @return hypervisors in the zone, or empty set, if no hypervisors are found
|
||||
*/
|
||||
Set<String> listHypervisorsInZone(long zoneId);
|
||||
Set<String> listHypervisorsInZone(String zoneId);
|
||||
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public interface ISOAsyncClient {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "command", values = "attachIso")
|
||||
@Unwrap
|
||||
ListenableFuture<AsyncCreateResponse> attachISO(@QueryParam("id") long isoId, @QueryParam("virtualmachineid") long vmId);
|
||||
ListenableFuture<AsyncCreateResponse> attachISO(@QueryParam("id") String isoId, @QueryParam("virtualmachineid") String vmId);
|
||||
|
||||
/**
|
||||
* Detaches any ISO file (if any) currently attached to a virtual machine.
|
||||
|
@ -82,7 +82,7 @@ public interface ISOAsyncClient {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "command", values = "detachIso")
|
||||
@Unwrap
|
||||
ListenableFuture<AsyncCreateResponse> detachISO(@QueryParam("virtualmachineid") long vmId);
|
||||
ListenableFuture<AsyncCreateResponse> detachISO(@QueryParam("virtualmachineid") String vmId);
|
||||
|
||||
/**
|
||||
* Gets information about an ISO by its ID.
|
||||
|
@ -92,10 +92,10 @@ public interface ISOAsyncClient {
|
|||
*/
|
||||
@GET
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "command", values = "listIsos")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listIsos", "true" })
|
||||
@SelectJson("iso")
|
||||
@OnlyElement
|
||||
ListenableFuture<ISO> getISO(@QueryParam("id") long id);
|
||||
ListenableFuture<ISO> getISO(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* Lists all available ISO files.
|
||||
|
@ -105,7 +105,7 @@ public interface ISOAsyncClient {
|
|||
*/
|
||||
@GET
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "command", values = "listIsos")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listIsos", "true" })
|
||||
@SelectJson("iso")
|
||||
ListenableFuture<Set<ISO>> listISOs(ListISOsOptions... options);
|
||||
|
||||
|
@ -123,7 +123,7 @@ public interface ISOAsyncClient {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "command", values = "registerIso")
|
||||
@Unwrap
|
||||
ListenableFuture<ISO> registerISO(@QueryParam("name") String name, @QueryParam("displaytext") String displayText, @QueryParam("url") String url, @QueryParam("zoneid") long zoneId, RegisterISOOptions... options);
|
||||
ListenableFuture<ISO> registerISO(@QueryParam("name") String name, @QueryParam("displaytext") String displayText, @QueryParam("url") String url, @QueryParam("zoneid") String zoneId, RegisterISOOptions... options);
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -136,7 +136,7 @@ public interface ISOAsyncClient {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "command", values = "updateIso")
|
||||
@Unwrap
|
||||
ListenableFuture<ISO> updateISO(@QueryParam("id") long id, UpdateISOOptions... options);
|
||||
ListenableFuture<ISO> updateISO(@QueryParam("id") String id, UpdateISOOptions... options);
|
||||
|
||||
/**
|
||||
* Deletes an ISO file.
|
||||
|
@ -149,7 +149,7 @@ public interface ISOAsyncClient {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "command", values = "deleteIso")
|
||||
@Unwrap
|
||||
ListenableFuture<AsyncCreateResponse> deleteISO(@QueryParam("id") long id, DeleteISOOptions... options);
|
||||
ListenableFuture<AsyncCreateResponse> deleteISO(@QueryParam("id") String id, DeleteISOOptions... options);
|
||||
|
||||
/**
|
||||
* Copies a template from one zone to another.
|
||||
|
@ -163,7 +163,7 @@ public interface ISOAsyncClient {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "command", values = "copyIso")
|
||||
@Unwrap
|
||||
ListenableFuture<AsyncCreateResponse> copyISO(@QueryParam("id") long isoId, @QueryParam("sourcezoneid") long sourceZoneId, @QueryParam("destzoneid") long destZoneId);
|
||||
ListenableFuture<AsyncCreateResponse> copyISO(@QueryParam("id") String isoId, @QueryParam("sourcezoneid") String sourceZoneId, @QueryParam("destzoneid") String destZoneId);
|
||||
|
||||
/**
|
||||
* Updates iso permissions
|
||||
|
@ -176,7 +176,7 @@ public interface ISOAsyncClient {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "command", values = "updateIsoPermissions")
|
||||
@Unwrap
|
||||
ListenableFuture<Void> updateISOPermissions(@QueryParam("id") long id, UpdateISOPermissionsOptions... options);
|
||||
ListenableFuture<Void> updateISOPermissions(@QueryParam("id") String id, UpdateISOPermissionsOptions... options);
|
||||
|
||||
/**
|
||||
* List template visibility and all accounts that have permissions to view this template.
|
||||
|
@ -187,9 +187,9 @@ public interface ISOAsyncClient {
|
|||
*/
|
||||
@GET
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "command", values = "listIsoPermissions")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listIsoPermissions", "true" })
|
||||
@SelectJson("templatepermission")
|
||||
ListenableFuture<ISOPermissions> listISOPermissions(@QueryParam("id") long id, AccountInDomainOptions... options);
|
||||
ListenableFuture<ISOPermissions> listISOPermissions(@QueryParam("id") String id, AccountInDomainOptions... options);
|
||||
|
||||
/**
|
||||
* Extracts an ISO
|
||||
|
@ -204,6 +204,6 @@ public interface ISOAsyncClient {
|
|||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@QueryParams(keys = "command", values = "extractIso")
|
||||
@Unwrap
|
||||
ListenableFuture<AsyncCreateResponse> extractISO(@QueryParam("id") long id, @QueryParam("mode") ExtractMode mode, @QueryParam("zoneid") long zoneId, ExtractISOOptions... options);
|
||||
ListenableFuture<AsyncCreateResponse> extractISO(@QueryParam("id") String id, @QueryParam("mode") ExtractMode mode, @QueryParam("zoneid") String zoneId, ExtractISOOptions... options);
|
||||
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public interface ISOClient {
|
|||
* @param vmId the ID of the virtual machine
|
||||
* @return an asynchronous job response.
|
||||
*/
|
||||
AsyncCreateResponse attachISO(long isoId, long vmId);
|
||||
AsyncCreateResponse attachISO(String isoId, String vmId);
|
||||
|
||||
/**
|
||||
* Detaches any ISO file (if any) currently attached to a virtual machine.
|
||||
|
@ -60,7 +60,7 @@ public interface ISOClient {
|
|||
* @param vmId The ID of the virtual machine
|
||||
* @return an asynchronous job response.
|
||||
*/
|
||||
AsyncCreateResponse detachISO(long vmId);
|
||||
AsyncCreateResponse detachISO(String vmId);
|
||||
|
||||
/**
|
||||
* Gets information about an ISO by its ID.
|
||||
|
@ -68,7 +68,7 @@ public interface ISOClient {
|
|||
* @param id the ID of the ISO file
|
||||
* @return the ISO object matching the ID
|
||||
*/
|
||||
ISO getISO(long id);
|
||||
ISO getISO(String id);
|
||||
|
||||
/**
|
||||
* Lists all available ISO files.
|
||||
|
@ -88,7 +88,7 @@ public interface ISOClient {
|
|||
* @param options optional arguments
|
||||
* @return the newly-added ISO
|
||||
*/
|
||||
ISO registerISO(String name, String displayText, String url, long zoneId, RegisterISOOptions... options);
|
||||
ISO registerISO(String name, String displayText, String url, String zoneId, RegisterISOOptions... options);
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -97,7 +97,7 @@ public interface ISOClient {
|
|||
* @param options optional arguments
|
||||
* @return the ISO object matching the ID
|
||||
*/
|
||||
ISO updateISO(long id, UpdateISOOptions... options);
|
||||
ISO updateISO(String id, UpdateISOOptions... options);
|
||||
|
||||
/**
|
||||
* Deletes an ISO file.
|
||||
|
@ -106,7 +106,7 @@ public interface ISOClient {
|
|||
* @param options optional arguments
|
||||
* @return an asynchronous job response.
|
||||
*/
|
||||
AsyncCreateResponse deleteISO(long id, DeleteISOOptions... options);
|
||||
AsyncCreateResponse deleteISO(String id, DeleteISOOptions... options);
|
||||
|
||||
/**
|
||||
* Copies a template from one zone to another.
|
||||
|
@ -116,7 +116,7 @@ public interface ISOClient {
|
|||
* @param destZoneId ID of the zone the template is being copied to.
|
||||
* @return an asynchronous job response.
|
||||
*/
|
||||
AsyncCreateResponse copyISO(long isoId, long sourceZoneId, long destZoneId);
|
||||
AsyncCreateResponse copyISO(String isoId, String sourceZoneId, String destZoneId);
|
||||
|
||||
/**
|
||||
* Updates iso permissions
|
||||
|
@ -125,7 +125,7 @@ public interface ISOClient {
|
|||
* @param options optional arguments
|
||||
* @return
|
||||
*/
|
||||
void updateISOPermissions(long id, UpdateISOPermissionsOptions... options);
|
||||
void updateISOPermissions(String id, UpdateISOPermissionsOptions... options);
|
||||
|
||||
/**
|
||||
* List template visibility and all accounts that have permissions to view this template.
|
||||
|
@ -134,7 +134,7 @@ public interface ISOClient {
|
|||
* @param options optional arguments
|
||||
* @return A set of the permissions on this ISO
|
||||
*/
|
||||
ISOPermissions listISOPermissions(long id, AccountInDomainOptions... options);
|
||||
ISOPermissions listISOPermissions(String id, AccountInDomainOptions... options);
|
||||
|
||||
/**
|
||||
* Extracts an ISO
|
||||
|
@ -145,6 +145,6 @@ public interface ISOClient {
|
|||
* @param options optional arguments
|
||||
* @return an asynchronous job response.
|
||||
*/
|
||||
AsyncCreateResponse extractISO(long id, ExtractMode mode, long zoneId, ExtractISOOptions... options);
|
||||
AsyncCreateResponse extractISO(String id, ExtractMode mode, String zoneId, ExtractISOOptions... options);
|
||||
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ public interface LimitAsyncClient {
|
|||
* @see org.jclouds.cloudstack.features.LimitClient#listResourceLimits
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listResourceLimits")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listResourceLimits", "true" })
|
||||
@SelectJson("resourcelimit")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
|
|
@ -60,7 +60,7 @@ public interface LoadBalancerAsyncClient {
|
|||
* @see LoadBalancerClient#listLoadBalancerRules
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listLoadBalancerRules")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRules", "true" })
|
||||
@SelectJson("loadbalancerrule")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -70,12 +70,12 @@ public interface LoadBalancerAsyncClient {
|
|||
* @see LoadBalancerClient#getLoadBalancerRule
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listLoadBalancerRules")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRules", "true" })
|
||||
@SelectJson("loadbalancerrule")
|
||||
@OnlyElement
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<LoadBalancerRule> getLoadBalancerRule(@QueryParam("id") long id);
|
||||
ListenableFuture<LoadBalancerRule> getLoadBalancerRule(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see LoadBalancerClient#createLoadBalancerRuleForPublicIP
|
||||
|
@ -84,7 +84,7 @@ public interface LoadBalancerAsyncClient {
|
|||
@QueryParams(keys = "command", values = "createLoadBalancerRule")
|
||||
@SelectJson("jobid")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Long> createLoadBalancerRuleForPublicIP(@QueryParam("publicipid") long publicIPId,
|
||||
ListenableFuture<String> createLoadBalancerRuleForPublicIP(@QueryParam("publicipid") String publicIPId,
|
||||
@QueryParam("algorithm") Algorithm algorithm, @QueryParam("name") String name,
|
||||
@QueryParam("privateport") int privatePort, @QueryParam("publicport") int publicPort,
|
||||
CreateLoadBalancerRuleOptions... options);
|
||||
|
@ -98,7 +98,7 @@ public interface LoadBalancerAsyncClient {
|
|||
@OnlyElement
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<LoadBalancerRule> updateLoadBalancerRule(@QueryParam("id") long id, UpdateLoadBalancerRuleOptions... options);
|
||||
ListenableFuture<LoadBalancerRule> updateLoadBalancerRule(@QueryParam("id") String id, UpdateLoadBalancerRuleOptions... options);
|
||||
|
||||
/**
|
||||
* @see LoadBalancerClient#deleteLoadBalancerRule
|
||||
|
@ -108,60 +108,60 @@ public interface LoadBalancerAsyncClient {
|
|||
@SelectJson("jobid")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Long> deleteLoadBalancerRule(@QueryParam("id") long id);
|
||||
ListenableFuture<String> deleteLoadBalancerRule(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see LoadBalancerClient#assignVirtualMachinesToLoadBalancerRule(long,Iterable)
|
||||
* @see LoadBalancerClient#assignVirtualMachinesToLoadBalancerRule(String,Iterable)
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "assignToLoadBalancerRule")
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
@SelectJson("jobid")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Long> assignVirtualMachinesToLoadBalancerRule(@QueryParam("id") long id,
|
||||
@QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) Iterable<Long> virtualMachineIds);
|
||||
ListenableFuture<String> assignVirtualMachinesToLoadBalancerRule(@QueryParam("id") String id,
|
||||
@QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) Iterable<String> virtualMachineIds);
|
||||
|
||||
/**
|
||||
* @see LoadBalancerClient#assignVirtualMachinesToLoadBalancerRule(long,long[])
|
||||
* @see LoadBalancerClient#assignVirtualMachinesToLoadBalancerRule(String,String[])
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "assignToLoadBalancerRule")
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
@SelectJson("jobid")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Long> assignVirtualMachinesToLoadBalancerRule(@QueryParam("id") long id,
|
||||
@QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) long... virtualMachineIds);
|
||||
ListenableFuture<String> assignVirtualMachinesToLoadBalancerRule(@QueryParam("id") String id,
|
||||
@QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) String... virtualMachineIds);
|
||||
|
||||
/**
|
||||
* @see LoadBalancerClient#removeVirtualMachinesFromLoadBalancerRule(long,Iterable)
|
||||
* @see LoadBalancerClient#removeVirtualMachinesFromLoadBalancerRule(String,Iterable)
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "removeFromLoadBalancerRule")
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
@SelectJson("jobid")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Long> removeVirtualMachinesFromLoadBalancerRule(@QueryParam("id") long id,
|
||||
@QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) Iterable<Long> virtualMachineIds);
|
||||
ListenableFuture<String> removeVirtualMachinesFromLoadBalancerRule(@QueryParam("id") String id,
|
||||
@QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) Iterable<String> virtualMachineIds);
|
||||
|
||||
/**
|
||||
* @see LoadBalancerClient#removeVirtualMachinesFromLoadBalancerRule(long,long[])
|
||||
* @see LoadBalancerClient#removeVirtualMachinesFromLoadBalancerRule(String,String[])
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "removeFromLoadBalancerRule")
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
@SelectJson("jobid")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Long> removeVirtualMachinesFromLoadBalancerRule(@QueryParam("id") long id,
|
||||
@QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) long... virtualMachineIds);
|
||||
ListenableFuture<String> removeVirtualMachinesFromLoadBalancerRule(@QueryParam("id") String id,
|
||||
@QueryParam("virtualmachineids") @ParamParser(JoinOnComma.class) String... virtualMachineIds);
|
||||
|
||||
/**
|
||||
* @see LoadBalancerClient#listVirtualMachinesAssignedToLoadBalancerRule
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listLoadBalancerRuleInstances")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listLoadBalancerRuleInstances", "true" })
|
||||
@SelectJson("loadbalancerruleinstance")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
ListenableFuture<Set<VirtualMachine>> listVirtualMachinesAssignedToLoadBalancerRule(@QueryParam("id") long id);
|
||||
ListenableFuture<Set<VirtualMachine>> listVirtualMachinesAssignedToLoadBalancerRule(@QueryParam("id") String id);
|
||||
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public interface LoadBalancerClient {
|
|||
* LoadBalancerRule to get
|
||||
* @return LoadBalancerRule or null if not found
|
||||
*/
|
||||
LoadBalancerRule getLoadBalancerRule(long id);
|
||||
LoadBalancerRule getLoadBalancerRule(String id);
|
||||
|
||||
/**
|
||||
* Creates a load balancer rule.
|
||||
|
@ -77,7 +77,7 @@ public interface LoadBalancerClient {
|
|||
* @param options optional call arguments
|
||||
* @return newly created rule
|
||||
*/
|
||||
Long createLoadBalancerRuleForPublicIP(long publicIPId, Algorithm algorithm, String name,
|
||||
String createLoadBalancerRuleForPublicIP(String publicIPId, Algorithm algorithm, String name,
|
||||
int privatePort, int publicPort, CreateLoadBalancerRuleOptions... options);
|
||||
|
||||
/**
|
||||
|
@ -89,7 +89,7 @@ public interface LoadBalancerClient {
|
|||
* optional arguments
|
||||
* @return updated rule
|
||||
*/
|
||||
LoadBalancerRule updateLoadBalancerRule(long id, UpdateLoadBalancerRuleOptions... options);
|
||||
LoadBalancerRule updateLoadBalancerRule(String id, UpdateLoadBalancerRuleOptions... options);
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -100,7 +100,7 @@ public interface LoadBalancerClient {
|
|||
* @return async job id of the job completing or null, if the load balancer
|
||||
* rule was not found.
|
||||
*/
|
||||
Long deleteLoadBalancerRule(long id);
|
||||
String deleteLoadBalancerRule(String id);
|
||||
|
||||
/**
|
||||
* List all virtual machine instances that are assigned to a load balancer
|
||||
|
@ -111,7 +111,7 @@ public interface LoadBalancerClient {
|
|||
* @return VirtualMachines matching query, or empty set, if no
|
||||
* VirtualMachines are assigned
|
||||
*/
|
||||
Set<VirtualMachine> listVirtualMachinesAssignedToLoadBalancerRule(long id);
|
||||
Set<VirtualMachine> listVirtualMachinesAssignedToLoadBalancerRule(String id);
|
||||
|
||||
/**
|
||||
* Assigns virtual machine or a list of virtual machines to a load balancer
|
||||
|
@ -124,7 +124,7 @@ public interface LoadBalancerClient {
|
|||
* to the load balancer rule
|
||||
* @return job id related to the operation
|
||||
*/
|
||||
long assignVirtualMachinesToLoadBalancerRule(long id, Iterable<Long> virtualMachineIds);
|
||||
String assignVirtualMachinesToLoadBalancerRule(String id, Iterable<String> virtualMachineIds);
|
||||
|
||||
/**
|
||||
* Assigns virtual machine or a list of virtual machines to a load balancer
|
||||
|
@ -137,7 +137,7 @@ public interface LoadBalancerClient {
|
|||
* to the load balancer rule
|
||||
* @return job id related to the operation
|
||||
*/
|
||||
long assignVirtualMachinesToLoadBalancerRule(long id, long... virtualMachineIds);
|
||||
String assignVirtualMachinesToLoadBalancerRule(String id, String... virtualMachineIds);
|
||||
|
||||
/**
|
||||
* Removes a virtual machine or a list of virtual machines from a load
|
||||
|
@ -150,7 +150,7 @@ public interface LoadBalancerClient {
|
|||
* from the load balancer rule
|
||||
* @return job id related to the operation
|
||||
*/
|
||||
long removeVirtualMachinesFromLoadBalancerRule(long id, Iterable<Long> virtualMachineIds);
|
||||
String removeVirtualMachinesFromLoadBalancerRule(String id, Iterable<String> virtualMachineIds);
|
||||
|
||||
/**
|
||||
* Removes a virtual machine or a list of virtual machines from a load
|
||||
|
@ -163,5 +163,5 @@ public interface LoadBalancerClient {
|
|||
* from the load balancer rule
|
||||
* @return job id related to the operation
|
||||
*/
|
||||
long removeVirtualMachinesFromLoadBalancerRule(long id, long... virtualMachineIds);
|
||||
String removeVirtualMachinesFromLoadBalancerRule(String id, String... virtualMachineIds);
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public interface NATAsyncClient {
|
|||
* @see NATClient#listIPForwardingRules
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listIpForwardingRules")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
|
||||
@SelectJson("ipforwardingrule")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnEmptySetOnNotFoundOr404.class)
|
||||
|
@ -69,32 +69,32 @@ public interface NATAsyncClient {
|
|||
* @see NATClient#getIPForwardingRule
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listIpForwardingRules")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
|
||||
@SelectJson("ipforwardingrule")
|
||||
@OnlyElement
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<IPForwardingRule> getIPForwardingRule(@QueryParam("id") long id);
|
||||
ListenableFuture<IPForwardingRule> getIPForwardingRule(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see NATClient#getIPForwardingRulesForIPAddress
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listIpForwardingRules")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
|
||||
@SelectJson("ipforwardingrule")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Set<IPForwardingRule>> getIPForwardingRulesForIPAddress(@QueryParam("ipaddressid") long id);
|
||||
ListenableFuture<Set<IPForwardingRule>> getIPForwardingRulesForIPAddress(@QueryParam("ipaddressid") String id);
|
||||
|
||||
/**
|
||||
* @see NATClient#getIPForwardingRulesForVirtualMachine
|
||||
*/
|
||||
@GET
|
||||
@QueryParams(keys = "command", values = "listIpForwardingRules")
|
||||
@QueryParams(keys = { "command", "listAll" }, values = { "listIpForwardingRules", "true" })
|
||||
@SelectJson("ipforwardingrule")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Set<IPForwardingRule>> getIPForwardingRulesForVirtualMachine(@QueryParam("virtualmachineid") long id);
|
||||
ListenableFuture<Set<IPForwardingRule>> getIPForwardingRulesForVirtualMachine(@QueryParam("virtualmachineid") String id);
|
||||
|
||||
/**
|
||||
* @see NATClient#createIPForwardingRule
|
||||
|
@ -103,7 +103,7 @@ public interface NATAsyncClient {
|
|||
@QueryParams(keys = "command", values = "createIpForwardingRule")
|
||||
@Unwrap
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<AsyncCreateResponse> createIPForwardingRule(@QueryParam("ipaddressid") long IPAddressId,
|
||||
ListenableFuture<AsyncCreateResponse> createIPForwardingRule(@QueryParam("ipaddressid") String IPAddressId,
|
||||
@QueryParam("protocol") String protocol, @QueryParam("startport") int startPort,
|
||||
CreateIPForwardingRuleOptions... options);
|
||||
|
||||
|
@ -114,7 +114,7 @@ public interface NATAsyncClient {
|
|||
@QueryParams(keys = "command", values = "enableStaticNat")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
ListenableFuture<Void> enableStaticNATForVirtualMachine(
|
||||
@QueryParam("virtualmachineid") long virtualMachineId, @QueryParam("ipaddressid") long IPAddressId);
|
||||
@QueryParam("virtualmachineid") String virtualMachineId, @QueryParam("ipaddressid") String IPAddressId);
|
||||
|
||||
/**
|
||||
* @see NATClient#deleteIPForwardingRule
|
||||
|
@ -124,7 +124,7 @@ public interface NATAsyncClient {
|
|||
@SelectJson("jobid")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Long> deleteIPForwardingRule(@QueryParam("id") long id);
|
||||
ListenableFuture<String> deleteIPForwardingRule(@QueryParam("id") String id);
|
||||
|
||||
/**
|
||||
* @see NATClient#disableStaticNATOnPublicIP
|
||||
|
@ -134,6 +134,6 @@ public interface NATAsyncClient {
|
|||
@SelectJson("jobid")
|
||||
@Consumes(MediaType.APPLICATION_JSON)
|
||||
@ExceptionParser(ReturnNullOnNotFoundOr404.class)
|
||||
ListenableFuture<Long> disableStaticNATOnPublicIP(@QueryParam("ipaddressid") long IPAddressId);
|
||||
ListenableFuture<String> disableStaticNATOnPublicIP(@QueryParam("ipaddressid") String IPAddressId);
|
||||
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue