diff --git a/agent/src/com/cloud/agent/AgentShell.java b/agent/src/com/cloud/agent/AgentShell.java index 87004f9a1e4..210a8600fad 100644 --- a/agent/src/com/cloud/agent/AgentShell.java +++ b/agent/src/com/cloud/agent/AgentShell.java @@ -304,7 +304,7 @@ public class AgentShell implements IAgentShell, Daemon { // For KVM agent, do it specially here File file = new File("/etc/cloudstack/agent/log4j-cloud.xml"); - if(!file.exists()) { + if (!file.exists()) { file = PropertiesUtil.findConfigFile("log4j-cloud.xml"); } diff --git a/agent/src/com/cloud/agent/resource/DummyResource.java b/agent/src/com/cloud/agent/resource/DummyResource.java index 816f6ede569..73f8ef1a1e9 100755 --- a/agent/src/com/cloud/agent/resource/DummyResource.java +++ b/agent/src/com/cloud/agent/resource/DummyResource.java @@ -180,8 +180,8 @@ public class DummyResource implements ServerResource { return true; } - public void setParams(Map _params) { - this._params = _params; + public void setParams(Map params) { + this._params = params; } @Override diff --git a/api/src/com/cloud/agent/api/to/NfsTO.java b/api/src/com/cloud/agent/api/to/NfsTO.java index ee6c3e3566d..1c9ee38e017 100644 --- a/api/src/com/cloud/agent/api/to/NfsTO.java +++ b/api/src/com/cloud/agent/api/to/NfsTO.java @@ -44,8 +44,8 @@ public class NfsTO implements DataStoreTO { return _url; } - public void setUrl(String _url) { - this._url = _url; + public void setUrl(String url) { + this._url = url; } @Override @@ -53,8 +53,8 @@ public class NfsTO implements DataStoreTO { return _role; } - public void setRole(DataStoreRole _role) { - this._role = _role; + public void setRole(DataStoreRole role) { + this._role = role; } @Override diff --git a/api/src/com/cloud/agent/api/to/VolumeTO.java b/api/src/com/cloud/agent/api/to/VolumeTO.java index eb1d9181cdf..2ad5e0b26f7 100644 --- a/api/src/com/cloud/agent/api/to/VolumeTO.java +++ b/api/src/com/cloud/agent/api/to/VolumeTO.java @@ -129,15 +129,15 @@ public class VolumeTO implements InternalIdentity { public String getChainInfo() { return chainInfo; } - + public void setChainInfo(String chainInfo) { - this.chainInfo = chainInfo; + this.chainInfo = chainInfo; } public String getOsType() { return guestOsType; } - + public void setPath(String path) { this.path = path; } diff --git a/api/src/com/cloud/alert/Alert.java b/api/src/com/cloud/alert/Alert.java index 6555b6fded1..f77442068d6 100644 --- a/api/src/com/cloud/alert/Alert.java +++ b/api/src/com/cloud/alert/Alert.java @@ -39,5 +39,6 @@ public interface Alert extends Identity, InternalIdentity { Date getResolved(); boolean getArchived(); + String getName(); } diff --git a/api/src/com/cloud/deploy/DeploymentPlanner.java b/api/src/com/cloud/deploy/DeploymentPlanner.java index 6916a5bc350..35f406d04f9 100644 --- a/api/src/com/cloud/deploy/DeploymentPlanner.java +++ b/api/src/com/cloud/deploy/DeploymentPlanner.java @@ -99,22 +99,22 @@ public interface DeploymentPlanner extends Adapter { public ExcludeList() { } - public ExcludeList(Set _dcIds, Set _podIds, Set _clusterIds, Set _hostIds, Set _poolIds) { - if (_dcIds != null) { - this._dcIds = new HashSet(_dcIds); + public ExcludeList(Set dcIds, Set podIds, Set clusterIds, Set hostIds, Set poolIds) { + if (dcIds != null) { + this._dcIds = new HashSet(dcIds); } - if (_podIds != null) { - this._podIds = new HashSet(_podIds); + if (podIds != null) { + this._podIds = new HashSet(podIds); } - if (_clusterIds != null) { - this._clusterIds = new HashSet(_clusterIds); + if (clusterIds != null) { + this._clusterIds = new HashSet(clusterIds); } - if (_hostIds != null) { - this._hostIds = new HashSet(_hostIds); + if (hostIds != null) { + this._hostIds = new HashSet(hostIds); } - if (_poolIds != null) { - this._poolIds = new HashSet(_poolIds); + if (poolIds != null) { + this._poolIds = new HashSet(poolIds); } } diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java index d3c29e93028..5a342cd284d 100755 --- a/api/src/com/cloud/event/EventTypes.java +++ b/api/src/com/cloud/event/EventTypes.java @@ -455,7 +455,6 @@ public class EventTypes { //Alert generation public static final String ALERT_GENERATE = "ALERT.GENERATE"; - static { // TODO: need a way to force author adding event types to declare the entity details as well, with out braking diff --git a/api/src/com/cloud/network/Networks.java b/api/src/com/cloud/network/Networks.java index e15ed463657..e4034a5d174 100755 --- a/api/src/com/cloud/network/Networks.java +++ b/api/src/com/cloud/network/Networks.java @@ -31,7 +31,7 @@ public class Networks { None, DcGlobal, // global to data center HostLocal; - public static String DummyPrivateIp = "169.254.1.1"; + public static final String DummyPrivateIp = "169.254.1.1"; } /** diff --git a/api/src/com/cloud/network/OvsProvider.java b/api/src/com/cloud/network/OvsProvider.java index e20491a3a2d..dfa40912417 100644 --- a/api/src/com/cloud/network/OvsProvider.java +++ b/api/src/com/cloud/network/OvsProvider.java @@ -20,7 +20,7 @@ import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; public interface OvsProvider extends InternalIdentity, Identity { - public boolean isEnabled(); + public boolean isEnabled(); - public long getNspId(); + public long getNspId(); } diff --git a/api/src/com/cloud/network/VirtualNetworkApplianceService.java b/api/src/com/cloud/network/VirtualNetworkApplianceService.java index 96162f31949..fa3ef6d2395 100644 --- a/api/src/com/cloud/network/VirtualNetworkApplianceService.java +++ b/api/src/com/cloud/network/VirtualNetworkApplianceService.java @@ -69,5 +69,5 @@ public interface VirtualNetworkApplianceService { List upgradeRouterTemplate(UpgradeRouterTemplateCmd cmd); - public static final String _minVRVersion = "4.2.0"; + public static final String MinVRVersion = "4.2.0"; } diff --git a/api/src/com/cloud/network/as/AutoScalePolicy.java b/api/src/com/cloud/network/as/AutoScalePolicy.java index 8452ba1492c..56ea3f5f7f7 100644 --- a/api/src/com/cloud/network/as/AutoScalePolicy.java +++ b/api/src/com/cloud/network/as/AutoScalePolicy.java @@ -32,8 +32,8 @@ public interface AutoScalePolicy extends ControlledEntity, InternalIdentity { public int getDuration(); public int getQuietTime(); - - public Date getLastQuiteTime(); + + public Date getLastQuiteTime(); public String getAction(); diff --git a/api/src/com/cloud/network/as/AutoScaleVmGroup.java b/api/src/com/cloud/network/as/AutoScaleVmGroup.java index 15f7bea9a4d..e8b328fc267 100644 --- a/api/src/com/cloud/network/as/AutoScaleVmGroup.java +++ b/api/src/com/cloud/network/as/AutoScaleVmGroup.java @@ -47,7 +47,7 @@ public interface AutoScaleVmGroup extends ControlledEntity, InternalIdentity { int getInterval(); - Date getLastInterval(); + Date getLastInterval(); String getState(); diff --git a/api/src/com/cloud/network/as/Counter.java b/api/src/com/cloud/network/as/Counter.java index 99b3364419a..286bf517c79 100644 --- a/api/src/com/cloud/network/as/Counter.java +++ b/api/src/com/cloud/network/as/Counter.java @@ -34,5 +34,5 @@ public interface Counter extends InternalIdentity, Identity { String getValue(); Source getSource(); - + } diff --git a/api/src/com/cloud/network/element/NetworkElement.java b/api/src/com/cloud/network/element/NetworkElement.java index e7988bf08da..951732f727c 100644 --- a/api/src/com/cloud/network/element/NetworkElement.java +++ b/api/src/com/cloud/network/element/NetworkElement.java @@ -22,7 +22,6 @@ import java.util.Set; import com.cloud.deploy.DeployDestination; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; -import com.cloud.exception.InsufficientNetworkCapacityException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.Network; import com.cloud.network.Network.Capability; @@ -67,7 +66,6 @@ public interface NetworkElement extends Adapter { * @return * @throws ConcurrentOperationException * @throws ResourceUnavailableException - * @throws InsufficientNetworkCapacityException */ boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException; diff --git a/api/src/com/cloud/network/element/UserDataServiceProvider.java b/api/src/com/cloud/network/element/UserDataServiceProvider.java index ad485a5b7ab..45ab0d877a3 100644 --- a/api/src/com/cloud/network/element/UserDataServiceProvider.java +++ b/api/src/com/cloud/network/element/UserDataServiceProvider.java @@ -33,5 +33,5 @@ public interface UserDataServiceProvider extends NetworkElement { boolean saveUserData(Network network, NicProfile nic, VirtualMachineProfile vm) throws ResourceUnavailableException; - boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile vm, String SSHPublicKey) throws ResourceUnavailableException; + boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile vm, String sshPublicKey) throws ResourceUnavailableException; } diff --git a/api/src/com/cloud/network/element/VirtualRouterElementService.java b/api/src/com/cloud/network/element/VirtualRouterElementService.java index c8d45cafe53..f8e015088db 100644 --- a/api/src/com/cloud/network/element/VirtualRouterElementService.java +++ b/api/src/com/cloud/network/element/VirtualRouterElementService.java @@ -31,12 +31,13 @@ import com.cloud.utils.component.PluggableService; public interface VirtualRouterElementService extends PluggableService { VirtualRouterProvider configure(ConfigureVirtualRouterElementCmd cmd); - OvsProvider configure(ConfigureOvsElementCmd cmd); + OvsProvider configure(ConfigureOvsElementCmd cmd); + VirtualRouterProvider addElement(Long nspId, Type providerType); VirtualRouterProvider getCreatedElement(long id); List searchForVirtualRouterElement(ListVirtualRouterElementsCmd cmd); - List searchForOvsElement(ListOvsElementsCmd cmd); + List searchForOvsElement(ListOvsElementsCmd cmd); } diff --git a/api/src/com/cloud/network/firewall/FirewallService.java b/api/src/com/cloud/network/firewall/FirewallService.java index 3413c4d4fb8..917bda3de6d 100644 --- a/api/src/com/cloud/network/firewall/FirewallService.java +++ b/api/src/com/cloud/network/firewall/FirewallService.java @@ -44,7 +44,7 @@ public interface FirewallService { boolean applyEgressFirewallRules(FirewallRule rule, Account caller) throws ResourceUnavailableException; - boolean applyIngressFirewallRules(long Ipid, Account caller) throws ResourceUnavailableException; + boolean applyIngressFirewallRules(long ipId, Account caller) throws ResourceUnavailableException; FirewallRule getFirewallRule(long ruleId); diff --git a/api/src/com/cloud/network/lb/LoadBalancingRulesService.java b/api/src/com/cloud/network/lb/LoadBalancingRulesService.java index e62b45cbb1c..cd0a276c73c 100644 --- a/api/src/com/cloud/network/lb/LoadBalancingRulesService.java +++ b/api/src/com/cloud/network/lb/LoadBalancingRulesService.java @@ -101,7 +101,7 @@ public interface LoadBalancingRulesService { boolean applyLoadBalancerConfig(long lbRuleId) throws ResourceUnavailableException; - boolean assignCertToLoadBalancer(long lbRuleId, Long CertId); + boolean assignCertToLoadBalancer(long lbRuleId, Long certId); boolean removeCertFromLoadBalancer(long lbRuleId); @@ -145,7 +145,7 @@ public interface LoadBalancingRulesService { List searchForLBHealthCheckPolicies(ListLBHealthCheckPoliciesCmd cmd); - LoadBalancer findById(long LoadBalancer); + LoadBalancer findById(long loadBalancer); public void updateLBHealthChecks(Scheme scheme) throws ResourceUnavailableException; diff --git a/api/src/com/cloud/network/vpc/NetworkACLService.java b/api/src/com/cloud/network/vpc/NetworkACLService.java index db37833e4f0..4d1188018b5 100644 --- a/api/src/com/cloud/network/vpc/NetworkACLService.java +++ b/api/src/com/cloud/network/vpc/NetworkACLService.java @@ -47,7 +47,7 @@ public interface NetworkACLService { * @param cmd * @return */ - Pair,Integer> listNetworkACLs(ListNetworkACLListsCmd cmd); + Pair, Integer> listNetworkACLs(ListNetworkACLListsCmd cmd); /** * Delete specified network ACL. Deletion fails if the list is not empty diff --git a/api/src/com/cloud/offering/DiskOffering.java b/api/src/com/cloud/offering/DiskOffering.java index 2227fd711c9..4641b9a4ad8 100644 --- a/api/src/com/cloud/offering/DiskOffering.java +++ b/api/src/com/cloud/offering/DiskOffering.java @@ -36,7 +36,7 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId public enum DiskCacheMode { NONE("none"), WRITEBACK("writeback"), WRITETHROUGH("writethrough"); - + private final String _diskCacheMode; DiskCacheMode(String cacheMode) { diff --git a/api/src/com/cloud/region/ha/GlobalLoadBalancerRule.java b/api/src/com/cloud/region/ha/GlobalLoadBalancerRule.java index c5fd9aed2b6..bb311f36e6f 100644 --- a/api/src/com/cloud/region/ha/GlobalLoadBalancerRule.java +++ b/api/src/com/cloud/region/ha/GlobalLoadBalancerRule.java @@ -53,8 +53,8 @@ public interface GlobalLoadBalancerRule extends Identity, InternalIdentity, Cont tcp, udp, http; public static boolean isValidServiceType(String serviceType) { if (tcp.name().equalsIgnoreCase(serviceType) || - udp.name().equalsIgnoreCase(serviceType) || - http.name().equalsIgnoreCase(serviceType)) { + udp.name().equalsIgnoreCase(serviceType) || + http.name().equalsIgnoreCase(serviceType)) { return true; } return false; diff --git a/api/src/com/cloud/storage/VolumeApiService.java b/api/src/com/cloud/storage/VolumeApiService.java index db23c1be227..09ac3ee2cbb 100644 --- a/api/src/com/cloud/storage/VolumeApiService.java +++ b/api/src/com/cloud/storage/VolumeApiService.java @@ -18,8 +18,6 @@ */ package com.cloud.storage; -import java.net.URISyntaxException; - import org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd; import org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd; import org.apache.cloudstack.api.command.user.volume.DetachVolumeCmd; @@ -29,8 +27,6 @@ import org.apache.cloudstack.api.command.user.volume.ResizeVolumeCmd; import org.apache.cloudstack.api.command.user.volume.UploadVolumeCmd; import com.cloud.exception.ConcurrentOperationException; -import com.cloud.exception.InternalErrorException; -import com.cloud.exception.PermissionDeniedException; import com.cloud.exception.ResourceAllocationException; import com.cloud.user.Account; @@ -42,7 +38,6 @@ public interface VolumeApiService { * the API command wrapping the criteria (account/domainId [admin only], zone, diskOffering, snapshot, * name) * @return the volume object - * @throws PermissionDeniedException */ Volume allocVolume(CreateVolumeCmd cmd) throws ResourceAllocationException; @@ -96,9 +91,6 @@ public interface VolumeApiService { * the command specifying url (where the volume needs to be extracted to), zoneId (zone where the volume * exists), * id (the id of the volume) - * @throws URISyntaxException - * @throws InternalErrorException - * @throws PermissionDeniedException * */ String extractVolume(ExtractVolumeCmd cmd); diff --git a/api/src/com/cloud/storage/snapshot/SnapshotApiService.java b/api/src/com/cloud/storage/snapshot/SnapshotApiService.java index 4f135107f07..91c08307bb8 100644 --- a/api/src/com/cloud/storage/snapshot/SnapshotApiService.java +++ b/api/src/com/cloud/storage/snapshot/SnapshotApiService.java @@ -24,7 +24,6 @@ import org.apache.cloudstack.api.command.user.snapshot.ListSnapshotPoliciesCmd; import org.apache.cloudstack.api.command.user.snapshot.ListSnapshotsCmd; import com.cloud.api.commands.ListRecurringSnapshotScheduleCmd; -import com.cloud.exception.PermissionDeniedException; import com.cloud.exception.ResourceAllocationException; import com.cloud.storage.Snapshot; import com.cloud.storage.Volume; @@ -39,7 +38,6 @@ public interface SnapshotApiService { * @param cmd * the command containing the search criteria (order by, limit, etc.) * @return list of snapshots - * @throws PermissionDeniedException */ Pair, Integer> listSnapshots(ListSnapshotsCmd cmd); diff --git a/api/src/com/cloud/user/ResourceLimitService.java b/api/src/com/cloud/user/ResourceLimitService.java index f8923b708a9..e878edd56ee 100644 --- a/api/src/com/cloud/user/ResourceLimitService.java +++ b/api/src/com/cloud/user/ResourceLimitService.java @@ -139,7 +139,6 @@ public interface ResourceLimitService { */ public long getResourceCount(Account account, ResourceType type); - /** * Checks if a limit has been exceeded for an account depending on the displayResource flag * @@ -153,7 +152,6 @@ public interface ResourceLimitService { */ void checkResourceLimit(Account account, ResourceType type, Boolean displayResource, long... count) throws ResourceAllocationException; - /** * Increments the resource count depending on the displayResource flag * diff --git a/api/src/com/cloud/vm/DiskProfile.java b/api/src/com/cloud/vm/DiskProfile.java index d08b710f071..5fdacf2a755 100644 --- a/api/src/com/cloud/vm/DiskProfile.java +++ b/api/src/com/cloud/vm/DiskProfile.java @@ -71,9 +71,9 @@ public class DiskProfile { null); this.hyperType = hyperType; } - + public DiskProfile(DiskProfile dp) { - + } /** @@ -156,17 +156,17 @@ public class DiskProfile { public HypervisorType getHypervisorType() { return this.hyperType; } - + public void setPath(String path) { - this.path = path; + this.path = path; } - + public String getPath() { - return this.path; + return this.path; } - + public void setSize(long size) { - this.size = size; + this.size = size; } public void setBytesReadRate(Long bytesReadRate) { diff --git a/api/src/com/cloud/vm/UserVmService.java b/api/src/com/cloud/vm/UserVmService.java index 5306bf92e57..e02573d7605 100755 --- a/api/src/com/cloud/vm/UserVmService.java +++ b/api/src/com/cloud/vm/UserVmService.java @@ -19,8 +19,6 @@ package com.cloud.vm; import java.util.List; import java.util.Map; -import javax.naming.InsufficientResourcesException; - import org.apache.cloudstack.api.BaseCmd.HTTPMethod; import org.apache.cloudstack.api.command.admin.vm.AssignVMCmd; import org.apache.cloudstack.api.command.admin.vm.ExpungeVMCmd; @@ -197,12 +195,11 @@ public interface UserVmService { * @throws ResourceUnavailableException * if the resources required to deploy the VM is not currently * available. - * @throws InsufficientResourcesException */ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List securityGroupIdList, - Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, HTTPMethod httpmethod, - String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIp, Boolean displayVm, String keyboard, - List affinityGroupIdList, Map customParameter, String customId) throws InsufficientCapacityException, + Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, HTTPMethod httpmethod, + String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIp, Boolean displayVm, String keyboard, + List affinityGroupIdList, Map customParameter, String customId) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException; /** @@ -271,12 +268,11 @@ public interface UserVmService { * @throws ResourceUnavailableException * if the resources required to deploy the VM is not currently * available. - * @throws InsufficientResourcesException */ UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List networkIdList, - List securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, - HTTPMethod httpmethod, String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard, - List affinityGroupIdList, Map customParameters, String customId) throws InsufficientCapacityException, + List securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, + HTTPMethod httpmethod, String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard, + List affinityGroupIdList, Map customParameters, String customId) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException; /** @@ -343,14 +339,13 @@ public interface UserVmService { * @throws ResourceUnavailableException * if the resources required to deploy the VM is not currently * available. - * @throws InsufficientResourcesException */ UserVm createAdvancedVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List networkIdList, Account owner, - String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, HTTPMethod httpmethod, String userData, - String sshKeyPair, Map requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard, List affinityGroupIdList, - Map customParameters, String customId) + String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, HTTPMethod httpmethod, String userData, + String sshKeyPair, Map requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard, List affinityGroupIdList, + Map customParameters, String customId) - throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException; + throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException; /** * Starts the virtual machine created from createVirtualMachine. diff --git a/api/src/com/cloud/vm/VirtualMachine.java b/api/src/com/cloud/vm/VirtualMachine.java index 331b8a3fff9..52b947fe287 100755 --- a/api/src/com/cloud/vm/VirtualMachine.java +++ b/api/src/com/cloud/vm/VirtualMachine.java @@ -29,11 +29,11 @@ import com.cloud.utils.fsm.StateObject; /** * VirtualMachine describes the properties held by a virtual machine - * + * */ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, InternalIdentity, StateObject { - public enum PowerState { + public enum PowerState { PowerUnknown, PowerOn, PowerOff, } @@ -115,7 +115,7 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, I s_fsm.addTransition(State.Expunging, VirtualMachine.Event.ExpungeOperation, State.Expunging); s_fsm.addTransition(State.Error, VirtualMachine.Event.DestroyRequested, State.Expunging); s_fsm.addTransition(State.Error, VirtualMachine.Event.ExpungeOperation, State.Expunging); - + s_fsm.addTransition(State.Stopping, VirtualMachine.Event.FollowAgentPowerOnReport, State.Running); s_fsm.addTransition(State.Stopped, VirtualMachine.Event.FollowAgentPowerOnReport, State.Running); s_fsm.addTransition(State.Running, VirtualMachine.Event.FollowAgentPowerOnReport, State.Running); @@ -125,7 +125,7 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, I s_fsm.addTransition(State.Running, VirtualMachine.Event.FollowAgentPowerOffReport, State.Stopped); s_fsm.addTransition(State.Migrating, VirtualMachine.Event.FollowAgentPowerOffReport, State.Stopped); } - + public static boolean isVmStarted(State oldState, Event e, State newState) { if (oldState == State.Starting && newState == State.Running) { return true; @@ -192,10 +192,10 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, I AgentReportMigrated, RevertRequested, SnapshotRequested, - + // added for new VMSync logic FollowAgentPowerOnReport, - FollowAgentPowerOffReport, + FollowAgentPowerOffReport, }; public enum Type { @@ -206,7 +206,7 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, I * VM with this type. UserBareMetal should treat exactly as User. */ UserBareMetal(false), - + /* * General VM type for queuing VM orchestration work */ @@ -264,7 +264,7 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, I /** * returns the guest OS ID - * + * * @return guestOSId */ long getGuestOSId(); @@ -303,7 +303,7 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, I Date getCreated(); long getServiceOfferingId(); - + Long getDiskOfferingId(); Type getType(); diff --git a/api/src/org/apache/cloudstack/alert/AlertService.java b/api/src/org/apache/cloudstack/alert/AlertService.java index 2143fe8d23f..2e98aea407a 100644 --- a/api/src/org/apache/cloudstack/alert/AlertService.java +++ b/api/src/org/apache/cloudstack/alert/AlertService.java @@ -1,4 +1,3 @@ - // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information @@ -28,7 +27,7 @@ public interface AlertService { private static Set defaultAlertTypes = new HashSet(); private final String name; private final short type; - + private AlertType(short type, String name, boolean isDefault) { this.name = name; this.type = type; @@ -36,12 +35,13 @@ public interface AlertService { defaultAlertTypes.add(this); } } - + public static final AlertType ALERT_TYPE_MEMORY = new AlertType(Capacity.CAPACITY_TYPE_MEMORY, "ALERT.MEMORY", true); public static final AlertType ALERT_TYPE_CPU = new AlertType(Capacity.CAPACITY_TYPE_CPU, "ALERT.CPU", true); public static final AlertType ALERT_TYPE_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_STORAGE, "ALERT.STORAGE", true); public static final AlertType ALERT_TYPE_STORAGE_ALLOCATED = new AlertType(Capacity.CAPACITY_TYPE_STORAGE_ALLOCATED, "ALERT.STORAGE.ALLOCATED", true); - public static final AlertType ALERT_TYPE_VIRTUAL_NETWORK_PUBLIC_IP = new AlertType(Capacity.CAPACITY_TYPE_VIRTUAL_NETWORK_PUBLIC_IP, "ALERT.NETWORK.PUBLICIP", true); + public static final AlertType ALERT_TYPE_VIRTUAL_NETWORK_PUBLIC_IP = new AlertType(Capacity.CAPACITY_TYPE_VIRTUAL_NETWORK_PUBLIC_IP, "ALERT.NETWORK.PUBLICIP", + true); public static final AlertType ALERT_TYPE_PRIVATE_IP = new AlertType(Capacity.CAPACITY_TYPE_PRIVATE_IP, "ALERT.NETWORK.PRIVATEIP", true); public static final AlertType ALERT_TYPE_SECONDARY_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_SECONDARY_STORAGE, "ALERT.STORAGE.SECONDARY", true); public static final AlertType ALERT_TYPE_HOST = new AlertType((short)7, "ALERT.COMPUTE.HOST", true); @@ -51,10 +51,10 @@ public interface AlertService { public static final AlertType ALERT_TYPE_ROUTING = new AlertType((short)11, "ALERT.NETWORK.ROUTING", true); public static final AlertType ALERT_TYPE_STORAGE_MISC = new AlertType((short)12, "ALERT.STORAGE.MISC", true); public static final AlertType ALERT_TYPE_USAGE_SERVER = new AlertType((short)13, "ALERT.USAGE", true); - public static final AlertType ALERT_TYPE_MANAGMENT_NODE = new AlertType((short)14, "ALERT.MANAGEMENT", true); + public static final AlertType ALERT_TYPE_MANAGMENT_NODE = new AlertType((short)14, "ALERT.MANAGEMENT", true); public static final AlertType ALERT_TYPE_DOMAIN_ROUTER_MIGRATE = new AlertType((short)15, "ALERT.NETWORK.DOMAINROUTERMIGRATE", true); public static final AlertType ALERT_TYPE_CONSOLE_PROXY_MIGRATE = new AlertType((short)16, "ALERT.SERVICE.CONSOLEPROXYMIGRATE", true); - public static final AlertType ALERT_TYPE_USERVM_MIGRATE = new AlertType((short)17, "ALERT.USERVM.MIGRATE", true); + public static final AlertType ALERT_TYPE_USERVM_MIGRATE = new AlertType((short)17, "ALERT.USERVM.MIGRATE", true); public static final AlertType ALERT_TYPE_VLAN = new AlertType((short)18, "ALERT.NETWORK.VLAN", true); public static final AlertType ALERT_TYPE_SSVM = new AlertType((short)19, "ALERT.SERVICE.SSVM", true); public static final AlertType ALERT_TYPE_USAGE_SERVER_RESULT = new AlertType((short)20, "ALERT.USAGE.RESULT", true); @@ -69,7 +69,7 @@ public interface AlertService { public short getType() { return type; } - + public String getName() { return name; } @@ -82,7 +82,7 @@ public interface AlertService { } return null; } - + @Override public String toString() { return String.valueOf(this.getType()); @@ -97,7 +97,7 @@ public interface AlertService { } } } - + boolean generateAlert(AlertType alertType, long dataCenterId, Long podId, String msg); } diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java index a132e548258..8f596b7c2a0 100755 --- a/api/src/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/org/apache/cloudstack/api/ApiConstants.java @@ -412,11 +412,11 @@ public class ApiConstants { // Ovs controller public static final String OVS_DEVICE_ID = "ovsdeviceid"; public static final String OVS_DEVICE_NAME = "ovsdevicename"; - // OpenDaylight controller - public static final String ODL_DEVICE_ID = "odldeviceid"; - public static final String ODL_DEVICE_NAME = "odldevicename"; - public static final String ODL_TRANSPORT_ZONE_UUID = "transportzoneuuid"; - public static final String ODL_GATEWAYSERVICE_UUID = "l3gatewayserviceuuid"; + // OpenDaylight controller + public static final String ODL_DEVICE_ID = "odldeviceid"; + public static final String ODL_DEVICE_NAME = "odldevicename"; + public static final String ODL_TRANSPORT_ZONE_UUID = "transportzoneuuid"; + public static final String ODL_GATEWAYSERVICE_UUID = "l3gatewayserviceuuid"; public static final String EXTERNAL_SWITCH_MGMT_DEVICE_ID = "vsmdeviceid"; public static final String EXTERNAL_SWITCH_MGMT_DEVICE_NAME = "vsmdevicename"; diff --git a/api/src/org/apache/cloudstack/api/BaseAsyncCreateCustomIdCmd.java b/api/src/org/apache/cloudstack/api/BaseAsyncCreateCustomIdCmd.java index 0f75653e35d..8680d7f11de 100644 --- a/api/src/org/apache/cloudstack/api/BaseAsyncCreateCustomIdCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseAsyncCreateCustomIdCmd.java @@ -16,9 +16,10 @@ // under the License. package org.apache.cloudstack.api; - -public abstract class BaseAsyncCreateCustomIdCmd extends BaseAsyncCreateCmd{ - @Parameter(name=ApiConstants.CUSTOM_ID, type=CommandType.STRING, description="an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only") +public abstract class BaseAsyncCreateCustomIdCmd extends BaseAsyncCreateCmd { + @Parameter(name = ApiConstants.CUSTOM_ID, + type = CommandType.STRING, + description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only") private String customId; public String getCustomId() { diff --git a/api/src/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java b/api/src/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java index 95be24f5483..18264da1aa2 100644 --- a/api/src/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java @@ -16,9 +16,10 @@ // under the License. package org.apache.cloudstack.api; - public abstract class BaseAsyncCustomIdCmd extends BaseAsyncCmd { - @Parameter(name=ApiConstants.CUSTOM_ID, type=CommandType.STRING, description="an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only") + @Parameter(name = ApiConstants.CUSTOM_ID, + type = CommandType.STRING, + description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only") private String customId; public String getCustomId() { diff --git a/api/src/org/apache/cloudstack/api/BaseCmd.java b/api/src/org/apache/cloudstack/api/BaseCmd.java index 86a7c726d6c..0cfb9509395 100644 --- a/api/src/org/apache/cloudstack/api/BaseCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseCmd.java @@ -94,7 +94,7 @@ public abstract class BaseCmd { public static final DateFormat INPUT_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); public static final DateFormat NEW_INPUT_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static Pattern newInputDateFormat = Pattern.compile("[\\d]+-[\\d]+-[\\d]+ [\\d]+:[\\d]+:[\\d]+"); - private static final DateFormat _outputFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); + private static final DateFormat s_outputFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); private Object _responseObject = null; private Map fullUrlParams; @@ -191,12 +191,11 @@ public abstract class BaseCmd { public InternalLoadBalancerVMService _internalLbSvc; @Inject public NetworkModel _ntwkModel; - @Inject + @Inject public AlertService _alertSvc; - - public abstract void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, - ResourceAllocationException, NetworkRuleConflictException; + public abstract void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, + ResourceAllocationException, NetworkRuleConflictException; public void configure() { } @@ -258,8 +257,8 @@ public abstract class BaseCmd { return ""; } String formattedString = null; - synchronized (_outputFormat) { - formattedString = _outputFormat.format(date); + synchronized (s_outputFormat) { + formattedString = s_outputFormat.format(date); } return formattedString; } diff --git a/api/src/org/apache/cloudstack/api/BaseCustomIdCmd.java b/api/src/org/apache/cloudstack/api/BaseCustomIdCmd.java index df59b44a56a..8ae746f319e 100644 --- a/api/src/org/apache/cloudstack/api/BaseCustomIdCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseCustomIdCmd.java @@ -18,7 +18,9 @@ package org.apache.cloudstack.api; public abstract class BaseCustomIdCmd extends BaseCmd { - @Parameter(name=ApiConstants.CUSTOM_ID, type=CommandType.STRING, description="an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only") + @Parameter(name = ApiConstants.CUSTOM_ID, + type = CommandType.STRING, + description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only") private String customId; public String getCustomId() { diff --git a/api/src/org/apache/cloudstack/api/BaseListCmd.java b/api/src/org/apache/cloudstack/api/BaseListCmd.java index dfb3f3b6ba5..c1a4b4c440f 100644 --- a/api/src/org/apache/cloudstack/api/BaseListCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseListCmd.java @@ -20,8 +20,8 @@ import com.cloud.exception.InvalidParameterValueException; public abstract class BaseListCmd extends BaseCmd { - private static Long MAX_PAGESIZE = null; - public static Long PAGESIZE_UNLIMITED = -1L; + private static Long s_maxPageSize = null; + public static Long s_pageSizeUnlimited = -1L; // /////////////////////////////////////////////////// // ///////// BaseList API parameters ///////////////// @@ -53,11 +53,11 @@ public abstract class BaseListCmd extends BaseCmd { } public Integer getPageSize() { - if (pageSize != null && MAX_PAGESIZE.longValue() != PAGESIZE_UNLIMITED && pageSize.longValue() > MAX_PAGESIZE.longValue()) { - throw new InvalidParameterValueException("Page size can't exceed max allowed page size value: " + MAX_PAGESIZE.longValue()); + if (pageSize != null && s_maxPageSize.longValue() != s_pageSizeUnlimited && pageSize.longValue() > s_maxPageSize.longValue()) { + throw new InvalidParameterValueException("Page size can't exceed max allowed page size value: " + s_maxPageSize.longValue()); } - if (pageSize != null && pageSize.longValue() == PAGESIZE_UNLIMITED && page != null) { + if (pageSize != null && pageSize.longValue() == s_pageSizeUnlimited && page != null) { throw new InvalidParameterValueException("Can't specify page parameter when pagesize is -1 (Unlimited)"); } @@ -66,11 +66,11 @@ public abstract class BaseListCmd extends BaseCmd { @Override public void configure() { - if (MAX_PAGESIZE == null) { - if (_configService.getDefaultPageSize().longValue() != PAGESIZE_UNLIMITED) { - MAX_PAGESIZE = _configService.getDefaultPageSize(); + if (s_maxPageSize == null) { + if (_configService.getDefaultPageSize().longValue() != s_pageSizeUnlimited) { + s_maxPageSize = _configService.getDefaultPageSize(); } else { - MAX_PAGESIZE = PAGESIZE_UNLIMITED; + s_maxPageSize = s_pageSizeUnlimited; } } } @@ -82,12 +82,12 @@ public abstract class BaseListCmd extends BaseCmd { } public Long getPageSizeVal() { - Long defaultPageSize = MAX_PAGESIZE; + Long defaultPageSize = s_maxPageSize; Integer pageSizeInt = getPageSize(); if (pageSizeInt != null) { defaultPageSize = pageSizeInt.longValue(); } - if (defaultPageSize.longValue() == PAGESIZE_UNLIMITED) { + if (defaultPageSize.longValue() == s_pageSizeUnlimited) { defaultPageSize = null; } diff --git a/api/src/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java b/api/src/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java index c9725a55ee4..48c1e02cfd5 100644 --- a/api/src/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java @@ -27,8 +27,8 @@ import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; public class BaseListTemplateOrIsoPermissionsCmd extends BaseCmd { - public Logger s_logger = getLogger(); - protected String s_name = "listtemplatepermissionsresponse"; + public Logger logger = getLogger(); + protected static final String s_name = "listtemplatepermissionsresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -58,6 +58,10 @@ public class BaseListTemplateOrIsoPermissionsCmd extends BaseCmd { return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked } + protected Logger getLogger() { + return Logger.getLogger(BaseUpdateTemplateOrIsoPermissionsCmd.class); + } + @Override public String getCommandName() { return s_name; @@ -71,10 +75,6 @@ public class BaseListTemplateOrIsoPermissionsCmd extends BaseCmd { return "templateOrIso"; } - protected Logger getLogger() { - return Logger.getLogger(BaseUpdateTemplateOrIsoPermissionsCmd.class.getName()); - } - @Override public void execute() { List accountNames = _templateService.listTemplatePermissions(this); @@ -84,6 +84,6 @@ public class BaseListTemplateOrIsoPermissionsCmd extends BaseCmd { TemplatePermissionsResponse response = _responseGenerator.createTemplatePermissionsResponse(accountNames, id, isAdmin); response.setResponseName(getCommandName()); - this.setResponseObject(response); + setResponseObject(response); } } diff --git a/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java b/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java index 5d054398772..77e5a15b09e 100644 --- a/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java @@ -27,13 +27,21 @@ import org.apache.cloudstack.api.response.TemplateResponse; import com.cloud.exception.InvalidParameterValueException; public abstract class BaseUpdateTemplateOrIsoPermissionsCmd extends BaseCmd { - public Logger s_logger = getLogger(); - protected String s_name = getResponseName(); + public Logger _logger = getLogger(); + protected String _name = getResponseName(); // /////////////////////////////////////////////////// // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// + protected Logger getLogger() { + return Logger.getLogger(BaseUpdateTemplateOrIsoPermissionsCmd.class); + } + + protected String getResponseName() { + return "updatetemplateorisopermissionsresponse"; + } + @Parameter(name = ApiConstants.ACCOUNTS, type = CommandType.LIST, collectionType = CommandType.STRING, @@ -109,15 +117,7 @@ public abstract class BaseUpdateTemplateOrIsoPermissionsCmd extends BaseCmd { @Override public String getCommandName() { - return s_name; - } - - protected String getResponseName() { - return "updatetemplateorisopermissionsresponse"; - } - - protected Logger getLogger() { - return Logger.getLogger(BaseUpdateTemplateOrIsoPermissionsCmd.class.getName()); + return _name; } @Override @@ -125,7 +125,7 @@ public abstract class BaseUpdateTemplateOrIsoPermissionsCmd extends BaseCmd { boolean result = _templateService.updateTemplateOrIsoPermissions(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); - this.setResponseObject(response); + setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update template/iso permissions"); } diff --git a/api/src/org/apache/cloudstack/api/ResponseGenerator.java b/api/src/org/apache/cloudstack/api/ResponseGenerator.java index e7a1b350632..1cb53886a7c 100644 --- a/api/src/org/apache/cloudstack/api/ResponseGenerator.java +++ b/api/src/org/apache/cloudstack/api/ResponseGenerator.java @@ -290,7 +290,7 @@ public interface ResponseGenerator { //ListResponse createSecurityGroupResponses(List networkGroups); - SecurityGroupResponse createSecurityGroupResponseFromSecurityGroupRule(List SecurityRules); + SecurityGroupResponse createSecurityGroupResponseFromSecurityGroupRule(List securityRules); SecurityGroupResponse createSecurityGroupResponse(SecurityGroup group); @@ -355,7 +355,7 @@ public interface ResponseGenerator { VirtualRouterProviderResponse createVirtualRouterProviderResponse(VirtualRouterProvider result); - OvsProviderResponse createOvsProviderResponse(OvsProvider result); + OvsProviderResponse createOvsProviderResponse(OvsProvider result); StorageNetworkIpRangeResponse createStorageNetworkIpRangeResponse(StorageNetworkIpRange result); diff --git a/api/src/org/apache/cloudstack/api/command/admin/alert/GenerateAlertCmd.java b/api/src/org/apache/cloudstack/api/command/admin/alert/GenerateAlertCmd.java index b23a3be9dea..620c5ed8faa 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/alert/GenerateAlertCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/alert/GenerateAlertCmd.java @@ -31,7 +31,7 @@ import org.apache.log4j.Logger; import com.cloud.event.EventTypes; -@APICommand(name = "generateAlert", description = "Generates an alert", responseObject = SuccessResponse.class, since="4.3") +@APICommand(name = "generateAlert", description = "Generates an alert", responseObject = SuccessResponse.class, since = "4.3") public class GenerateAlertCmd extends BaseAsyncCmd { public static final Logger s_logger = Logger.getLogger(GenerateAlertCmd.class.getName()); @@ -42,19 +42,19 @@ public class GenerateAlertCmd extends BaseAsyncCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.TYPE, type = CommandType.SHORT, description = "Type of the alert", required=true) + @Parameter(name = ApiConstants.TYPE, type = CommandType.SHORT, description = "Type of the alert", required = true) private Short type; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Name of the alert", required=true) + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Name of the alert", required = true) private String name; - - @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "Alert description", required=true) + + @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "Alert description", required = true) private String description; - - @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class, description="Zone id for which alert is generated") + + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "Zone id for which alert is generated") private Long zoneId; - - @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class, description="Pod id for which alert is generated") + + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "Pod id for which alert is generated") private Long podId; // /////////////////////////////////////////////////// @@ -87,14 +87,11 @@ public class GenerateAlertCmd extends BaseAsyncCmd { public Long getPodId() { return podId; } - // /////////////////////////////////////////////////// // ///////////// API Implementation/////////////////// // /////////////////////////////////////////////////// - - @Override public void execute() { AlertType alertType = AlertService.AlertType.generateAlert(getType(), getName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java b/api/src/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java index 2c31dfdc745..517807d4a78 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java @@ -55,25 +55,25 @@ public class ListCfgsByCmd extends BaseListCmd { type = CommandType.UUID, entityType = ZoneResponse.class, description = "the ID of the Zone to update the parameter value for corresponding zone") - private Long zone_id; + private Long zoneId; @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "the ID of the Cluster to update the parameter value for corresponding cluster") - private Long cluster_id; + private Long clusterId; @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, description = "the ID of the Storage pool to update the parameter value for corresponding storage pool") - private Long storagepool_id; + private Long storagePoolId; @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "the ID of the Account to update the parameter value for corresponding account") - private Long account_id; + private Long accountId; // /////////////////////////////////////////////////// // ///////////////// Accessors /////////////////////// @@ -88,19 +88,19 @@ public class ListCfgsByCmd extends BaseListCmd { } public Long getZoneId() { - return zone_id; + return zoneId; } public Long getClusterId() { - return cluster_id; + return clusterId; } public Long getStoragepoolId() { - return storagepool_id; + return storagePoolId; } public Long getAccountId() { - return account_id; + return accountId; } @Override @@ -108,7 +108,7 @@ public class ListCfgsByCmd extends BaseListCmd { Long defaultPageSize = 500L; Integer pageSizeInt = getPageSize(); if (pageSizeInt != null) { - if (pageSizeInt.longValue() == PAGESIZE_UNLIMITED) { + if (pageSizeInt.longValue() == s_pageSizeUnlimited) { defaultPageSize = null; } else { defaultPageSize = pageSizeInt.longValue(); @@ -151,6 +151,6 @@ public class ListCfgsByCmd extends BaseListCmd { response.setResponses(configResponses, result.second()); response.setResponseName(getCommandName()); - this.setResponseObject(response); + setResponseObject(response); } } diff --git a/api/src/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java b/api/src/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java index fe6e3d65538..9bc9b3cbb5c 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java @@ -52,25 +52,25 @@ public class UpdateCfgCmd extends BaseCmd { type = CommandType.UUID, entityType = ZoneResponse.class, description = "the ID of the Zone to update the parameter value for corresponding zone") - private Long zone_id; + private Long zoneId; @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "the ID of the Cluster to update the parameter value for corresponding cluster") - private Long cluster_id; + private Long clusterId; @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, description = "the ID of the Storage pool to update the parameter value for corresponding storage pool") - private Long storagepool_id; + private Long storagePoolId; @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "the ID of the Account to update the parameter value for corresponding account") - private Long account_id; + private Long accountId; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// @@ -85,19 +85,19 @@ public class UpdateCfgCmd extends BaseCmd { } public Long getZoneId() { - return zone_id; + return zoneId; } public Long getClusterId() { - return cluster_id; + return clusterId; } public Long getStoragepoolId() { - return storagepool_id; + return storagePoolId; } public Long getAccountId() { - return account_id; + return accountId; } ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/admin/internallb/ListInternalLoadBalancerElementsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/internallb/ListInternalLoadBalancerElementsCmd.java index df7135af211..a42a0b306af 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/internallb/ListInternalLoadBalancerElementsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/internallb/ListInternalLoadBalancerElementsCmd.java @@ -45,7 +45,7 @@ import com.cloud.network.VirtualRouterProvider; since = "4.2.0") public class ListInternalLoadBalancerElementsCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListInternalLoadBalancerElementsCmd.class.getName()); - private static final String _name = "listinternalloadbalancerelementsresponse"; + private static final String Name = "listinternalloadbalancerelementsresponse"; @Inject private InternalLoadBalancerElementService _service; @@ -86,7 +86,7 @@ public class ListInternalLoadBalancerElementsCmd extends BaseListCmd { @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java index bdf047233ad..5614295f905 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java @@ -44,7 +44,7 @@ import com.cloud.user.Account; @APICommand(name = "createNetworkOffering", description = "Creates a network offering.", responseObject = NetworkOfferingResponse.class, since = "3.0.0") public class CreateNetworkOfferingCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(CreateNetworkOfferingCmd.class.getName()); - private static final String _name = "createnetworkofferingresponse"; + private static final String Name = "createnetworkofferingresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -164,7 +164,7 @@ public class CreateNetworkOfferingCmd extends BaseCmd { } public static String getName() { - return _name; + return Name; } public Long getServiceOfferingId() { @@ -281,7 +281,7 @@ public class CreateNetworkOfferingCmd extends BaseCmd { ///////////////////////////////////////////////////// @Override public String getCommandName() { - return _name; + return Name; } @Override @@ -295,7 +295,7 @@ public class CreateNetworkOfferingCmd extends BaseCmd { if (result != null) { NetworkOfferingResponse response = _responseGenerator.createNetworkOfferingResponse(result); response.setResponseName(getCommandName()); - this.setResponseObject(response); + setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create network offering"); } diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java index 25d5d0fd631..5a1235b7b61 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java @@ -39,7 +39,7 @@ import com.cloud.utils.Pair; since = "3.0.0") public class ListNetworkServiceProvidersCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListNetworkServiceProvidersCmd.class.getName()); - private static final String _name = "listnetworkserviceprovidersresponse"; + private static final String Name = "listnetworkserviceprovidersresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -79,7 +79,7 @@ public class ListNetworkServiceProvidersCmd extends BaseListCmd { ///////////////////////////////////////////////////// @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java index 0b17666e3c7..89cba471041 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java @@ -43,7 +43,7 @@ import com.cloud.user.Account; public class ListStorageNetworkIpRangeCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListStorageNetworkIpRangeCmd.class); - String s_name = "liststoragenetworkiprangeresponse"; + String _name = "liststoragenetworkiprangeresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -105,7 +105,7 @@ public class ListStorageNetworkIpRangeCmd extends BaseListCmd { @Override public String getCommandName() { - return s_name; + return _name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java index 240c03362cb..342f9b04d88 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java @@ -39,7 +39,7 @@ import com.cloud.user.Account; since = "3.0.0") public class ListSupportedNetworkServicesCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListSupportedNetworkServicesCmd.class.getName()); - private static final String _name = "listsupportednetworkservicesresponse"; + private static final String Name = "listsupportednetworkservicesresponse"; @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, description = "network service provider name") private String providerName; @@ -72,7 +72,7 @@ public class ListSupportedNetworkServicesCmd extends BaseListCmd { ///////////////////////////////////////////////////// @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java index aaff5a1c46b..957450f78f7 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java @@ -32,7 +32,7 @@ import com.cloud.user.Account; @APICommand(name = "updateNetworkOffering", description = "Updates a network offering.", responseObject = NetworkOfferingResponse.class) public class UpdateNetworkOfferingCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(UpdateNetworkOfferingCmd.class.getName()); - private static final String _name = "updatenetworkofferingresponse"; + private static final String Name = "updatenetworkofferingresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -109,7 +109,7 @@ public class UpdateNetworkOfferingCmd extends BaseCmd { ///////////////////////////////////////////////////// @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java index 7dd87e1761c..6f9693cbcb0 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java @@ -36,7 +36,7 @@ import com.cloud.user.Account; @APICommand(name = "createServiceOffering", description = "Creates a service offering.", responseObject = ServiceOfferingResponse.class) public class CreateServiceOfferingCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(CreateServiceOfferingCmd.class.getName()); - private static final String _name = "createserviceofferingresponse"; + private static final String Name = "createserviceofferingresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -220,7 +220,7 @@ public class CreateServiceOfferingCmd extends BaseCmd { @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java index 2fc4084e0ab..397b00a034e 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java @@ -46,8 +46,8 @@ public class ListAlertsCmd extends BaseListCmd { @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "list by alert type") private String type; - - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list by alert name", since="4.3") + + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list by alert name", since = "4.3") private String name; // /////////////////////////////////////////////////// @@ -61,7 +61,7 @@ public class ListAlertsCmd extends BaseListCmd { public String getType() { return type; } - + public String getName() { return name; } diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureOvsElementCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureOvsElementCmd.java index 26cfb31a69d..75b08b1fab5 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureOvsElementCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureOvsElementCmd.java @@ -41,92 +41,92 @@ import com.cloud.user.Account; @APICommand(name = "configureOvsElement", responseObject = OvsProviderResponse.class, description = "Configures an ovs element.") public class ConfigureOvsElementCmd extends BaseAsyncCmd { - public static final Logger s_logger = Logger - .getLogger(ConfigureOvsElementCmd.class.getName()); - private static final String s_name = "configureovselementresponse"; - @Inject - private List _service; + public static final Logger s_logger = Logger + .getLogger(ConfigureOvsElementCmd.class.getName()); + private static final String s_name = "configureovselementresponse"; + @Inject + private List _service; - // /////////////////////////////////////////////////// - // ////////////// API parameters ///////////////////// - // /////////////////////////////////////////////////// + // /////////////////////////////////////////////////// + // ////////////// API parameters ///////////////////// + // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = OvsProviderResponse.class, required = true, description = "the ID of the ovs provider") - private Long id; + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = OvsProviderResponse.class, required = true, description = "the ID of the ovs provider") + private Long id; - @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = true, description = "Enabled/Disabled the service provider") - private Boolean enabled; + @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = true, description = "Enabled/Disabled the service provider") + private Boolean enabled; - // /////////////////////////////////////////////////// - // ///////////////// Accessors /////////////////////// - // /////////////////////////////////////////////////// - public void setId(Long id) { - this.id = id; - } + // /////////////////////////////////////////////////// + // ///////////////// Accessors /////////////////////// + // /////////////////////////////////////////////////// + public void setId(Long id) { + this.id = id; + } - public Long getId() { - return id; - } + public Long getId() { + return id; + } - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } - public Boolean getEnabled() { - return enabled; - } + public Boolean getEnabled() { + return enabled; + } - // /////////////////////////////////////////////////// - // ///////////// API Implementation/////////////////// - // /////////////////////////////////////////////////// + // /////////////////////////////////////////////////// + // ///////////// API Implementation/////////////////// + // /////////////////////////////////////////////////// - @Override - public String getCommandName() { - return s_name; - } + @Override + public String getCommandName() { + return s_name; + } - public static String getResultObjectName() { - return "boolean"; - } + public static String getResultObjectName() { + return "boolean"; + } - @Override - public long getEntityOwnerId() { - return Account.ACCOUNT_ID_SYSTEM; - } + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } - @Override - public String getEventType() { - return EventTypes.EVENT_NETWORK_ELEMENT_CONFIGURE; - } + @Override + public String getEventType() { + return EventTypes.EVENT_NETWORK_ELEMENT_CONFIGURE; + } - @Override - public String getEventDescription() { - return "configuring ovs provider: " + id; - } + @Override + public String getEventDescription() { + return "configuring ovs provider: " + id; + } - @Override - public ApiCommandJobType getInstanceType() { - return ApiCommandJobType.None; - } + @Override + public ApiCommandJobType getInstanceType() { + return ApiCommandJobType.None; + } - @Override - public Long getInstanceId() { - return id; - } + @Override + public Long getInstanceId() { + return id; + } - @Override - public void execute() throws ConcurrentOperationException, - ResourceUnavailableException, InsufficientCapacityException { - CallContext.current().setEventDetails("Ovs element: " + id); - OvsProvider result = _service.get(0).configure(this); - if (result != null) { - OvsProviderResponse ovsResponse = _responseGenerator - .createOvsProviderResponse(result); - ovsResponse.setResponseName(getCommandName()); - this.setResponseObject(ovsResponse); - } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, - "Failed to configure the ovs provider"); - } - } + @Override + public void execute() throws ConcurrentOperationException, + ResourceUnavailableException, InsufficientCapacityException { + CallContext.current().setEventDetails("Ovs element: " + id); + OvsProvider result = _service.get(0).configure(this); + if (result != null) { + OvsProviderResponse ovsResponse = _responseGenerator + .createOvsProviderResponse(result); + ovsResponse.setResponseName(getCommandName()); + this.setResponseObject(ovsResponse); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, + "Failed to configure the ovs provider"); + } + } } diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/ListOvsElementsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/ListOvsElementsCmd.java index 9f5feeedc26..d5f73fd742a 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/ListOvsElementsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/ListOvsElementsCmd.java @@ -41,62 +41,64 @@ import com.cloud.network.element.VirtualRouterElementService; @APICommand(name = "listOvsElements", description = "Lists all available ovs elements.", responseObject = OvsProviderResponse.class) public class ListOvsElementsCmd extends BaseListCmd { - public static final Logger s_logger = Logger - .getLogger(ListNetworkOfferingsCmd.class.getName()); - private static final String _name = "listovselementsresponse"; - @Inject - private List _service; - // /////////////////////////////////////////////////// - // ////////////// API parameters ///////////////////// - // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = OvsProviderResponse.class, description = "list ovs elements by id") - private Long id; + public static final Logger s_logger = Logger + .getLogger(ListNetworkOfferingsCmd.class.getName()); + private static final String Name = "listovselementsresponse"; + @Inject + private List _service; + // /////////////////////////////////////////////////// + // ////////////// API parameters ///////////////////// + // /////////////////////////////////////////////////// + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = OvsProviderResponse.class, description = "list ovs elements by id") + private Long id; - @Parameter(name = ApiConstants.NSP_ID, type = CommandType.UUID, entityType = ProviderResponse.class, description = "list ovs elements by network service provider id") - private Long nspId; + @Parameter(name = ApiConstants.NSP_ID, type = CommandType.UUID, entityType = ProviderResponse.class, description = "list ovs elements by network service provider id") + private Long nspId; - @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, description = "list network offerings by enabled state") - private Boolean enabled; + @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, description = "list network offerings by enabled state") + private Boolean enabled; - // /////////////////////////////////////////////////// - // ///////////////// Accessors /////////////////////// - // /////////////////////////////////////////////////// + // /////////////////////////////////////////////////// + // ///////////////// Accessors /////////////////////// + // /////////////////////////////////////////////////// - public void setId(Long id) { - this.id = id; - } + public void setId(Long id) { + this.id = id; + } - public Long getId() { - return id; - } + public Long getId() { + return id; + } - public void setNspId(Long nspId) { - this.nspId = nspId; - } + public void setNspId(Long nspId) { + this.nspId = nspId; + } - public Long getNspId() { - return nspId; - } + public Long getNspId() { + return nspId; + } - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } - public Boolean getEnabled() { - return enabled; - } + public Boolean getEnabled() { + return enabled; + } - @Override - public String getCommandName() { - return _name; - } - @Override - public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { + @Override + public String getCommandName() { + return Name; + } + + @Override + public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, + ResourceAllocationException { List providers = _service.get(0).searchForOvsElement(this); ListResponse response = new ListResponse(); List providerResponses = new ArrayList(); for (OvsProvider provider : providers) { - OvsProviderResponse providerResponse = _responseGenerator.createOvsProviderResponse(provider); + OvsProviderResponse providerResponse = _responseGenerator.createOvsProviderResponse(provider); providerResponses.add(providerResponse); } response.setResponses(providerResponses); diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java index 4f04018833c..6f1792145be 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java @@ -43,7 +43,7 @@ import com.cloud.network.element.VirtualRouterElementService; @APICommand(name = "listVirtualRouterElements", description = "Lists all available virtual router elements.", responseObject = VirtualRouterProviderResponse.class) public class ListVirtualRouterElementsCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListNetworkOfferingsCmd.class.getName()); - private static final String _name = "listvirtualrouterelementsresponse"; + private static final String Name = "listvirtualrouterelementsresponse"; // TODO, VirtualRouterElementServer is not singleton in system! @Inject @@ -94,7 +94,7 @@ public class ListVirtualRouterElementsCmd extends BaseListCmd { @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java index cc6680bcac4..e665b7d0d24 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java @@ -56,7 +56,7 @@ import com.cloud.storage.ImageStore; public final class AddS3Cmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(AddS3Cmd.class.getName()); - private static String COMMAND_NAME = "adds3response"; + private static final String COMMAND_NAME = "adds3response"; @Parameter(name = S3_ACCESS_KEY, type = STRING, required = true, description = "S3 access key") private String accessKey; @@ -65,22 +65,22 @@ public final class AddS3Cmd extends BaseCmd { private String secretKey; @Parameter(name = S3_END_POINT, type = STRING, required = false, description = "S3 host name") - private String endPoint = null; + private final String endPoint = null; @Parameter(name = S3_BUCKET_NAME, type = STRING, required = true, description = "name of the template storage bucket") private String bucketName; @Parameter(name = S3_HTTPS_FLAG, type = BOOLEAN, required = false, description = "connect to the S3 endpoint via HTTPS?") - private Boolean httpsFlag = null; + private final Boolean httpsFlag = null; @Parameter(name = S3_CONNECTION_TIMEOUT, type = INTEGER, required = false, description = "connection timeout (milliseconds)") - private Integer connectionTimeout = null; + private final Integer connectionTimeout = null; @Parameter(name = S3_MAX_ERROR_RETRY, type = INTEGER, required = false, description = "maximum number of times to retry on error") - private Integer maxErrorRetry = null; + private final Integer maxErrorRetry = null; @Parameter(name = S3_SOCKET_TIMEOUT, type = INTEGER, required = false, description = "socket timeout (milliseconds)") - private Integer socketTimeout = null; + private final Integer socketTimeout = null; @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, @@ -118,7 +118,7 @@ public final class AddS3Cmd extends BaseCmd { storeResponse = _responseGenerator.createImageStoreResponse(result); storeResponse.setResponseName(getCommandName()); storeResponse.setObjectName("secondarystorage"); - this.setResponseObject(storeResponse); + setResponseObject(storeResponse); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add S3 secondary storage"); } @@ -141,35 +141,35 @@ public final class AddS3Cmd extends BaseCmd { final AddS3Cmd thatAddS3Cmd = (AddS3Cmd)thatObject; - if (this.httpsFlag != null ? !this.httpsFlag.equals(thatAddS3Cmd.httpsFlag) : thatAddS3Cmd.httpsFlag != null) { + if (httpsFlag != null ? !httpsFlag.equals(thatAddS3Cmd.httpsFlag) : thatAddS3Cmd.httpsFlag != null) { return false; } - if (this.accessKey != null ? !this.accessKey.equals(thatAddS3Cmd.accessKey) : thatAddS3Cmd.accessKey != null) { + if (accessKey != null ? !accessKey.equals(thatAddS3Cmd.accessKey) : thatAddS3Cmd.accessKey != null) { return false; } - if (this.connectionTimeout != null ? !this.connectionTimeout.equals(thatAddS3Cmd.connectionTimeout) : thatAddS3Cmd.connectionTimeout != null) { + if (connectionTimeout != null ? !connectionTimeout.equals(thatAddS3Cmd.connectionTimeout) : thatAddS3Cmd.connectionTimeout != null) { return false; } - if (this.endPoint != null ? !this.endPoint.equals(thatAddS3Cmd.endPoint) : thatAddS3Cmd.endPoint != null) { + if (endPoint != null ? !endPoint.equals(thatAddS3Cmd.endPoint) : thatAddS3Cmd.endPoint != null) { return false; } - if (this.maxErrorRetry != null ? !this.maxErrorRetry.equals(thatAddS3Cmd.maxErrorRetry) : thatAddS3Cmd.maxErrorRetry != null) { + if (maxErrorRetry != null ? !maxErrorRetry.equals(thatAddS3Cmd.maxErrorRetry) : thatAddS3Cmd.maxErrorRetry != null) { return false; } - if (this.secretKey != null ? !this.secretKey.equals(thatAddS3Cmd.secretKey) : thatAddS3Cmd.secretKey != null) { + if (secretKey != null ? !secretKey.equals(thatAddS3Cmd.secretKey) : thatAddS3Cmd.secretKey != null) { return false; } - if (this.socketTimeout != null ? !this.socketTimeout.equals(thatAddS3Cmd.socketTimeout) : thatAddS3Cmd.socketTimeout != null) { + if (socketTimeout != null ? !socketTimeout.equals(thatAddS3Cmd.socketTimeout) : thatAddS3Cmd.socketTimeout != null) { return false; } - if (this.bucketName != null ? !this.bucketName.equals(thatAddS3Cmd.bucketName) : thatAddS3Cmd.bucketName != null) { + if (bucketName != null ? !bucketName.equals(thatAddS3Cmd.bucketName) : thatAddS3Cmd.bucketName != null) { return false; } @@ -180,14 +180,14 @@ public final class AddS3Cmd extends BaseCmd { @Override public int hashCode() { - int result = this.accessKey != null ? this.accessKey.hashCode() : 0; - result = 31 * result + (this.secretKey != null ? this.secretKey.hashCode() : 0); - result = 31 * result + (this.endPoint != null ? this.endPoint.hashCode() : 0); - result = 31 * result + (this.bucketName != null ? this.bucketName.hashCode() : 0); - result = 31 * result + (this.httpsFlag != null && this.httpsFlag == true ? 1 : 0); - result = 31 * result + (this.connectionTimeout != null ? this.connectionTimeout.hashCode() : 0); - result = 31 * result + (this.maxErrorRetry != null ? this.maxErrorRetry.hashCode() : 0); - result = 31 * result + (this.socketTimeout != null ? this.socketTimeout.hashCode() : 0); + int result = accessKey != null ? accessKey.hashCode() : 0; + result = 31 * result + (secretKey != null ? secretKey.hashCode() : 0); + result = 31 * result + (endPoint != null ? endPoint.hashCode() : 0); + result = 31 * result + (bucketName != null ? bucketName.hashCode() : 0); + result = 31 * result + (httpsFlag != null && httpsFlag == true ? 1 : 0); + result = 31 * result + (connectionTimeout != null ? connectionTimeout.hashCode() : 0); + result = 31 * result + (maxErrorRetry != null ? maxErrorRetry.hashCode() : 0); + result = 31 * result + (socketTimeout != null ? socketTimeout.hashCode() : 0); return result; @@ -204,35 +204,35 @@ public final class AddS3Cmd extends BaseCmd { } public String getAccessKey() { - return this.accessKey; + return accessKey; } public String getSecretKey() { - return this.secretKey; + return secretKey; } public String getEndPoint() { - return this.endPoint; + return endPoint; } public String getBucketName() { - return this.bucketName; + return bucketName; } public Boolean getHttpsFlag() { - return this.httpsFlag; + return httpsFlag; } public Integer getConnectionTimeout() { - return this.connectionTimeout; + return connectionTimeout; } public Integer getMaxErrorRetry() { - return this.maxErrorRetry; + return maxErrorRetry; } public Integer getSocketTimeout() { - return this.socketTimeout; + return socketTimeout; } } diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java index 247df1eaed5..fdb81ea3ee0 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java @@ -66,9 +66,9 @@ public class ScaleSystemVMCmd extends BaseAsyncCmd { description = "the service offering ID to apply to the system vm") private Long serviceOfferingId; - @Parameter(name=ApiConstants.CUSTOM_PARAMETERS, - type = CommandType.MAP, - description = "name value pairs of custom parameters for cpu, memory and cpunumber. example customparameters[i].name=value") + @Parameter(name = ApiConstants.CUSTOM_PARAMETERS, + type = CommandType.MAP, + description = "name value pairs of custom parameters for cpu, memory and cpunumber. example customparameters[i].name=value") private Map customParameters; ///////////////////////////////////////////////////// @@ -84,12 +84,12 @@ public class ScaleSystemVMCmd extends BaseAsyncCmd { } public Map getCustomParameters() { - Map customparameterMap = new HashMap(); + Map customparameterMap = new HashMap(); if (customParameters != null && customParameters.size() != 0) { Collection parameterCollection = customParameters.values(); Iterator iter = parameterCollection.iterator(); while (iter.hasNext()) { - HashMap value = (HashMap) iter.next(); + HashMap value = (HashMap)iter.next(); for (String key : value.keySet()) { customparameterMap.put(key, value.get(key)); } diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java index a49828be89f..a89abb8c7ab 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java @@ -61,9 +61,9 @@ public class UpgradeSystemVMCmd extends BaseCmd { description = "the service offering ID to apply to the system vm") private Long serviceOfferingId; - @Parameter(name=ApiConstants.CUSTOM_PARAMETERS, - type = CommandType.MAP, - description = "name value pairs of custom parameters for cpu, memory and cpunumber. example customparameters[i].name=value") + @Parameter(name = ApiConstants.CUSTOM_PARAMETERS, + type = CommandType.MAP, + description = "name value pairs of custom parameters for cpu, memory and cpunumber. example customparameters[i].name=value") private Map customParameters; ///////////////////////////////////////////////////// @@ -79,12 +79,12 @@ public class UpgradeSystemVMCmd extends BaseCmd { } public Map getCustomParameters() { - Map customparameterMap = new HashMap(); - if (customParameters != null && customParameters.size() !=0){ + Map customparameterMap = new HashMap(); + if (customParameters != null && customParameters.size() != 0) { Collection parameterCollection = customParameters.values(); Iterator iter = parameterCollection.iterator(); while (iter.hasNext()) { - HashMap value = (HashMap) iter.next(); + HashMap value = (HashMap)iter.next(); for (String key : value.keySet()) { customparameterMap.put(key, value.get(key)); } diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java index 3a1dfba61c8..159608ec589 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java @@ -43,7 +43,7 @@ import com.cloud.utils.Pair; since = "3.0.0") public class ListTrafficTypeImplementorsCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListTrafficTypeImplementorsCmd.class); - private static final String _name = "listtraffictypeimplementorsresponse"; + private static final String Name = "listtraffictypeimplementorsresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -87,6 +87,6 @@ public class ListTrafficTypeImplementorsCmd extends BaseListCmd { @Override public String getCommandName() { - return _name; + return Name; } } diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java index 378058f04f7..47ba781cdef 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java @@ -37,7 +37,7 @@ import com.cloud.utils.Pair; @APICommand(name = "listTrafficTypes", description = "Lists traffic types of a given physical network.", responseObject = ProviderResponse.class, since = "3.0.0") public class ListTrafficTypesCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListTrafficTypesCmd.class.getName()); - private static final String _name = "listtraffictypesresponse"; + private static final String Name = "listtraffictypesresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -66,7 +66,7 @@ public class ListTrafficTypesCmd extends BaseListCmd { ///////////////////////////////////////////////////// @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java index e3c04337f73..96d5c6acece 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java @@ -42,7 +42,7 @@ import com.cloud.user.Account; @APICommand(name = "createVPCOffering", description = "Creates VPC offering", responseObject = VpcOfferingResponse.class) public class CreateVPCOfferingCmd extends BaseAsyncCreateCmd { public static final Logger s_logger = Logger.getLogger(CreateVPCOfferingCmd.class.getName()); - private static final String _name = "createvpcofferingresponse"; + private static final String Name = "createvpcofferingresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -150,7 +150,7 @@ public class CreateVPCOfferingCmd extends BaseAsyncCreateCmd { @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java index 05b6f9d6fbd..3526b4b3ac9 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java @@ -33,7 +33,7 @@ import com.cloud.user.Account; @APICommand(name = "updateVPCOffering", description = "Updates VPC offering", responseObject = VpcOfferingResponse.class) public class UpdateVPCOfferingCmd extends BaseAsyncCmd { public static final Logger s_logger = Logger.getLogger(UpdateVPCOfferingCmd.class.getName()); - private static final String _name = "updatevpcofferingresponse"; + private static final String Name = "updatevpcofferingresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -76,7 +76,7 @@ public class UpdateVPCOfferingCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLListsCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLListsCmd.java index 56aad945101..2e50bb8cf22 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLListsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLListsCmd.java @@ -23,7 +23,6 @@ import org.apache.log4j.Logger; import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; -import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; @@ -34,7 +33,7 @@ import org.apache.cloudstack.api.response.VpcResponse; import com.cloud.network.vpc.NetworkACL; import com.cloud.utils.Pair; -@APICommand(name = "listNetworkACLLists", description="Lists all network ACLs", responseObject=NetworkACLResponse.class) +@APICommand(name = "listNetworkACLLists", description = "Lists all network ACLs", responseObject = NetworkACLResponse.class) public class ListNetworkACLListsCmd extends BaseListProjectAndAccountResourcesCmd { public static final Logger s_logger = Logger.getLogger(ListNetworkACLListsCmd.class.getName()); @@ -85,8 +84,8 @@ public class ListNetworkACLListsCmd extends BaseListProjectAndAccountResourcesCm } @Override - public void execute(){ - Pair,Integer> result = _networkACLService.listNetworkACLs(this); + public void execute() { + Pair, Integer> result = _networkACLService.listNetworkACLs(this); ListResponse response = new ListResponse(); List aclResponses = new ArrayList(); @@ -96,6 +95,6 @@ public class ListNetworkACLListsCmd extends BaseListProjectAndAccountResourcesCm } response.setResponses(aclResponses, result.second()); response.setResponseName(getCommandName()); - this.setResponseObject(response); + setResponseObject(response); } } diff --git a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java index 99c620ca14d..7f8aef4cd77 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java @@ -25,7 +25,6 @@ import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.NetworkACLItemResponse; import org.apache.cloudstack.api.response.NetworkACLResponse; @@ -43,8 +42,8 @@ public class ListNetworkACLsCmd extends BaseListTaggedResourcesCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = NetworkACLItemResponse.class, - description="Lists network ACL Item with the specified ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkACLItemResponse.class, + description = "Lists network ACL Item with the specified ID") private Long id; @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "list network ACL Items by network Id") @@ -111,6 +110,6 @@ public class ListNetworkACLsCmd extends BaseListTaggedResourcesCmd { } response.setResponses(aclResponses, result.second()); response.setResponseName(getCommandName()); - this.setResponseObject(response); + setResponseObject(response); } } diff --git a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java index 2c2b1e17a8f..552a64a63b2 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java @@ -35,7 +35,7 @@ import com.cloud.offering.NetworkOffering; @APICommand(name = "listNetworkOfferings", description = "Lists all available network offerings.", responseObject = NetworkOfferingResponse.class) public class ListNetworkOfferingsCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListNetworkOfferingsCmd.class.getName()); - private static final String _name = "listnetworkofferingsresponse"; + private static final String Name = "listnetworkofferingsresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -181,7 +181,7 @@ public class ListNetworkOfferingsCmd extends BaseListCmd { ///////////////////////////////////////////////////// @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java index fa27a4ad212..72c52df4630 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java @@ -36,7 +36,7 @@ import com.cloud.network.Network; @APICommand(name = "listNetworks", description = "Lists all available networks.", responseObject = NetworkResponse.class) public class ListNetworksCmd extends BaseListTaggedResourcesCmd { public static final Logger s_logger = Logger.getLogger(ListNetworksCmd.class.getName()); - private static final String _name = "listnetworksresponse"; + private static final String Name = "listnetworksresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -149,7 +149,7 @@ public class ListNetworksCmd extends BaseListTaggedResourcesCmd { ///////////////////////////////////////////////////// @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java index fee6db25c87..2472a422539 100755 --- a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java @@ -24,7 +24,6 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import org.apache.cloudstack.api.BaseAsyncCreateCustomIdCmd; import org.apache.log4j.Logger; import org.apache.cloudstack.acl.SecurityChecker.AccessType; @@ -34,7 +33,7 @@ import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiCommandJobType; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; -import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.BaseAsyncCreateCustomIdCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DiskOfferingResponse; @@ -232,9 +231,9 @@ public class DeployVMCmd extends BaseAsyncCreateCustomIdCmd { @Parameter(name = ApiConstants.CUSTOM_PARAMETERS, type = CommandType.MAP, - since= "4.3", + since = "4.3", description = "used to specify the custom parameters.") - private Map customParameters; + private Map customParameters; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// @@ -263,12 +262,12 @@ public class DeployVMCmd extends BaseAsyncCreateCustomIdCmd { } public Map getCustomParameters() { - Map customparameterMap = new HashMap(); - if (customParameters != null && customParameters.size() !=0){ + Map customparameterMap = new HashMap(); + if (customParameters != null && customParameters.size() != 0) { Collection parameterCollection = customParameters.values(); Iterator iter = parameterCollection.iterator(); while (iter.hasNext()) { - HashMap value = (HashMap) iter.next(); + HashMap value = (HashMap)iter.next(); for (String key : value.keySet()) { customparameterMap.put(key, value.get(key)); } @@ -289,7 +288,6 @@ public class DeployVMCmd extends BaseAsyncCreateCustomIdCmd { return displayVm; } - public List getSecurityGroupIdList() { if (securityGroupNameList != null && securityGroupIdList != null) { throw new InvalidParameterValueException("securitygroupids parameter is mutually exclusive with securitygroupnames parameter"); diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java index 08a4a5673dc..e122834810d 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java @@ -44,7 +44,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; - @APICommand(name = "scaleVirtualMachine", description = "Scales the virtual machine to a new service offering.", responseObject = SuccessResponse.class) public class ScaleVMCmd extends BaseAsyncCmd { public static final Logger s_logger = Logger.getLogger(ScaleVMCmd.class.getName()); @@ -66,9 +65,9 @@ public class ScaleVMCmd extends BaseAsyncCmd { description = "the ID of the service offering for the virtual machine") private Long serviceOfferingId; - @Parameter(name=ApiConstants.CUSTOM_PARAMETERS, - type = CommandType.MAP, - description = "name value pairs of custom parameters for cpu, memory and cpunumber. example customparameters[i].name=value") + @Parameter(name = ApiConstants.CUSTOM_PARAMETERS, + type = CommandType.MAP, + description = "name value pairs of custom parameters for cpu, memory and cpunumber. example customparameters[i].name=value") private Map customParameters; ///////////////////////////////////////////////////// @@ -87,12 +86,12 @@ public class ScaleVMCmd extends BaseAsyncCmd { //it is because customParameters.values() cannot be cast to a map. //it gives a exception public Map getCustomParameters() { - Map customparameterMap = new HashMap(); - if (customParameters != null && customParameters.size() !=0){ + Map customparameterMap = new HashMap(); + if (customParameters != null && customParameters.size() != 0) { Collection parameterCollection = customParameters.values(); Iterator iter = parameterCollection.iterator(); while (iter.hasNext()) { - HashMap value = (HashMap) iter.next(); + HashMap value = (HashMap)iter.next(); for (String key : value.keySet()) { customparameterMap.put(key, value.get(key)); } diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java index 967d8f4d525..e0ca787b6d6 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java @@ -16,13 +16,12 @@ // under the License. package org.apache.cloudstack.api.command.user.vm; -import org.apache.cloudstack.api.BaseCustomIdCmd; import org.apache.log4j.Logger; import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; -import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.BaseCustomIdCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.GuestOSResponse; @@ -143,7 +142,7 @@ public class UpdateVMCmd extends BaseCustomIdCmd { if (result != null) { UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0); response.setResponseName(getCommandName()); - this.setResponseObject(response); + setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update vm"); } diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java index 43497811b13..033717d0bc1 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java @@ -59,9 +59,9 @@ public class UpgradeVMCmd extends BaseCmd { description = "the service offering ID to apply to the virtual machine") private Long serviceOfferingId; - @Parameter(name=ApiConstants.CUSTOM_PARAMETERS, - type = CommandType.MAP, - description = "name value pairs of custom parameters for cpu, memory and cpunumber. example customparameters[i].name=value") + @Parameter(name = ApiConstants.CUSTOM_PARAMETERS, + type = CommandType.MAP, + description = "name value pairs of custom parameters for cpu, memory and cpunumber. example customparameters[i].name=value") private Map customParameters; ///////////////////////////////////////////////////// @@ -77,12 +77,12 @@ public class UpgradeVMCmd extends BaseCmd { } public Map getCustomParameters() { - Map customparameterMap = new HashMap(); - if (customParameters != null && customParameters.size() !=0){ + Map customparameterMap = new HashMap(); + if (customParameters != null && customParameters.size() != 0) { Collection parameterCollection = customParameters.values(); Iterator iter = parameterCollection.iterator(); while (iter.hasNext()) { - HashMap value = (HashMap) iter.next(); + HashMap value = (HashMap)iter.next(); for (String key : value.keySet()) { customparameterMap.put(key, value.get(key)); } diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java index cb7b13a6a7e..c6457c60eb3 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java @@ -100,7 +100,10 @@ public class CreateVolumeCmd extends BaseAsyncCreateCustomIdCmd { @Parameter(name = ApiConstants.DISPLAY_VOLUME, type = CommandType.BOOLEAN, description = "an optional field, whether to display the volume to the end user or not.") private Boolean displayVolume; - @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "the ID of the virtual machine; to be used with snapshot Id, VM to which the volume gets attached after creation") + @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, + type = CommandType.UUID, + entityType = UserVmResponse.class, + description = "the ID of the virtual machine; to be used with snapshot Id, VM to which the volume gets attached after creation") private Long virtualMachineId; ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java index 7233b4fb5d3..b57f2b489d6 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java @@ -16,14 +16,13 @@ // under the License. package org.apache.cloudstack.api.command.user.volume; -import org.apache.cloudstack.api.BaseAsyncCustomIdCmd; import org.apache.log4j.Logger; import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiCommandJobType; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; -import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.BaseAsyncCustomIdCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.StoragePoolResponse; @@ -145,7 +144,7 @@ public class UpdateVolumeCmd extends BaseAsyncCustomIdCmd { if (result != null) { VolumeResponse response = _responseGenerator.createVolumeResponse(result); response.setResponseName(getCommandName()); - this.setResponseObject(response); + setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update volume"); } diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java index f12d15b5f0e..d4c52b8e42a 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java @@ -47,44 +47,44 @@ public class CreateVPCCmd extends BaseAsyncCreateCmd { // /////////////////////////////////////////////////// @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account associated with the VPC. " + - "Must be used with the domainId parameter.") + "Must be used with the domainId parameter.") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "the domain ID associated with the VPC. " + - "If used with the account parameter returns the VPC associated with the account for the specified domain.") + description = "the domain ID associated with the VPC. " + + "If used with the account parameter returns the VPC associated with the account for the specified domain.") private Long domainId; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, - description = "create VPC for the project") + description = "create VPC for the project") private Long projectId; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - required = true, description = "the ID of the availability zone") + required = true, description = "the ID of the availability zone") private Long zoneId; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the VPC") private String vpcName; @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, required = true, description = "the display text of " + - "the VPC") + "the VPC") private String displayText; @Parameter(name = ApiConstants.CIDR, type = CommandType.STRING, required = true, description = "the cidr of the VPC. All VPC " + - "guest networks' cidrs should be within this CIDR") + "guest networks' cidrs should be within this CIDR") private String cidr; @Parameter(name = ApiConstants.VPC_OFF_ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, - required = true, description = "the ID of the VPC offering") + required = true, description = "the ID of the VPC offering") private Long vpcOffering; @Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, - description = "VPC network domain. All networks inside the VPC will belong to this domain") + description = "VPC network domain. All networks inside the VPC will belong to this domain") private String networkDomain; @Parameter(name = ApiConstants.START, type = CommandType.BOOLEAN, - description = "If set to false, the VPC won't start (VPC VR will not get allocated) until its first network gets implemented. " + - "True by default.", since = "4.3") + description = "If set to false, the VPC won't start (VPC VR will not get allocated) until its first network gets implemented. " + + "True by default.", since = "4.3") private Boolean start; // /////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java index 85051cfdf61..e3d0bc606f5 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java @@ -33,7 +33,7 @@ import com.cloud.network.vpc.VpcOffering; @APICommand(name = "listVPCOfferings", description = "Lists VPC offerings", responseObject = VpcOfferingResponse.class) public class ListVPCOfferingsCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListVPCOfferingsCmd.class.getName()); - private static final String _name = "listvpcofferingsresponse"; + private static final String Name = "listvpcofferingsresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -109,7 +109,7 @@ public class ListVPCOfferingsCmd extends BaseListCmd { @Override public String getCommandName() { - return _name; + return Name; } } diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java index ce144512f39..eb048ceea0b 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java @@ -37,7 +37,7 @@ import com.cloud.user.Account; @APICommand(name = "restartVPC", description = "Restarts a VPC", responseObject = VpcResponse.class) public class RestartVPCCmd extends BaseAsyncCmd { public static final Logger s_logger = Logger.getLogger(RestartVPCCmd.class.getName()); - private static final String _name = "restartvpcresponse"; + private static final String Name = "restartvpcresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -59,7 +59,7 @@ public class RestartVPCCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java index 73585247976..5732c652214 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java @@ -33,7 +33,7 @@ import com.cloud.user.Account; @APICommand(name = "updateVPC", description = "Updates a VPC", responseObject = VpcResponse.class) public class UpdateVPCCmd extends BaseAsyncCmd { public static final Logger s_logger = Logger.getLogger(UpdateVPCCmd.class.getName()); - private static final String _name = "updatevpcresponse"; + private static final String Name = "updatevpcresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -69,7 +69,7 @@ public class UpdateVPCCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Override public String getCommandName() { - return _name; + return Name; } @Override diff --git a/api/src/org/apache/cloudstack/api/response/AlertResponse.java b/api/src/org/apache/cloudstack/api/response/AlertResponse.java index a2554c3b095..2016bcf5e00 100644 --- a/api/src/org/apache/cloudstack/api/response/AlertResponse.java +++ b/api/src/org/apache/cloudstack/api/response/AlertResponse.java @@ -42,8 +42,9 @@ public class AlertResponse extends BaseResponse { + "MANAGMENT_NODE = 13: lost connection to default route (to the gateway), " + "DOMAIN_ROUTER_MIGRATE = 14, CONSOLE_PROXY_MIGRATE = 15, USERVM_MIGRATE = 16, VLAN = 17, SSVM = 18, " + "USAGE_SERVER_RESULT = 19") private Short alertType; - - @SerializedName(ApiConstants.NAME) @Param(description="the name of the alert", since="4.3") + + @SerializedName(ApiConstants.NAME) + @Param(description = "the name of the alert", since = "4.3") private String alertName; @SerializedName(ApiConstants.DESCRIPTION) @@ -69,7 +70,7 @@ public class AlertResponse extends BaseResponse { public void setLastSent(Date lastSent) { this.lastSent = lastSent; } - + public void setName(String name) { this.alertName = name; } diff --git a/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java b/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java index 4840c60528f..c8de5873367 100644 --- a/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java +++ b/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java @@ -63,7 +63,7 @@ public class CapabilitiesResponse extends BaseResponse { @SerializedName("kvmsnapshotenabled") @Param(description = "true if snapshot is supported for KVM host, false otherwise") - private boolean KVMSnapshotEnabled; + private boolean kvmSnapshotEnabled; @SerializedName("apilimitmax") @Param(description = "Max allowed number of api requests within the specified interval") @@ -101,8 +101,8 @@ public class CapabilitiesResponse extends BaseResponse { this.regionSecondaryEnabled = regionSecondaryEnabled; } - public void setKVMSnapshotEnabled(boolean KVMSnapshotEnabled) { - this.KVMSnapshotEnabled = KVMSnapshotEnabled; + public void setKVMSnapshotEnabled(boolean kvmSnapshotEnabled) { + this.kvmSnapshotEnabled = kvmSnapshotEnabled; } public void setApiLimitInterval(Integer apiLimitInterval) { diff --git a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java index 3917cb5eaf3..ebc22428326 100644 --- a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java +++ b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java @@ -97,7 +97,8 @@ public class DiskOfferingResponse extends BaseResponse { @Param(description = "io requests write rate of the disk offering") private Long iopsWriteRate; - @SerializedName("cacheMode") @Param(description="the cache mode to use for this disk offering. none, writeback or writethrough") + @SerializedName("cacheMode") + @Param(description = "the cache mode to use for this disk offering. none, writeback or writethrough") private String cacheMode; @SerializedName("displayoffering") diff --git a/api/src/org/apache/cloudstack/api/response/OvsProviderResponse.java b/api/src/org/apache/cloudstack/api/response/OvsProviderResponse.java index 223576d001d..ac5b9e309c8 100644 --- a/api/src/org/apache/cloudstack/api/response/OvsProviderResponse.java +++ b/api/src/org/apache/cloudstack/api/response/OvsProviderResponse.java @@ -27,67 +27,67 @@ import com.google.gson.annotations.SerializedName; @EntityReference(value = OvsProvider.class) @SuppressWarnings("unused") public class OvsProviderResponse extends BaseResponse implements - ControlledEntityResponse { - @SerializedName(ApiConstants.ID) - @Param(description = "the id of the ovs") - private String id; - @SerializedName(ApiConstants.NSP_ID) - @Param(description = "the physical network service provider id of the provider") - private String nspId; - @SerializedName(ApiConstants.ENABLED) - @Param(description = "Enabled/Disabled the service provider") - private Boolean enabled; - @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account associated with the provider") - private String accountName; - @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the ipaddress") - private String projectId; - @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the address") - private String projectName; - @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID associated with the provider") - private String domainId; + ControlledEntityResponse { + @SerializedName(ApiConstants.ID) + @Param(description = "the id of the ovs") + private String id; + @SerializedName(ApiConstants.NSP_ID) + @Param(description = "the physical network service provider id of the provider") + private String nspId; + @SerializedName(ApiConstants.ENABLED) + @Param(description = "Enabled/Disabled the service provider") + private Boolean enabled; + @SerializedName(ApiConstants.ACCOUNT) + @Param(description = "the account associated with the provider") + private String accountName; + @SerializedName(ApiConstants.PROJECT_ID) + @Param(description = "the project id of the ipaddress") + private String projectId; + @SerializedName(ApiConstants.PROJECT) + @Param(description = "the project name of the address") + private String projectName; + @SerializedName(ApiConstants.DOMAIN_ID) + @Param(description = "the domain ID associated with the provider") + private String domainId; - @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain associated with the provider") - private String domainName; + @SerializedName(ApiConstants.DOMAIN) + @Param(description = "the domain associated with the provider") + private String domainName; - @Override - public void setAccountName(String accountName) { - this.accountName = accountName; - } + @Override + public void setAccountName(String accountName) { + this.accountName = accountName; + } - public void setId(String id) { - this.id = id; - } + public void setId(String id) { + this.id = id; + } - @Override - public void setDomainId(String domainId) { - this.domainId = domainId; - } + @Override + public void setDomainId(String domainId) { + this.domainId = domainId; + } - @Override - public void setDomainName(String domainName) { - this.domainName = domainName; - } + @Override + public void setDomainName(String domainName) { + this.domainName = domainName; + } - @Override - public void setProjectId(String projectId) { - this.projectId = projectId; - } + @Override + public void setProjectId(String projectId) { + this.projectId = projectId; + } - @Override - public void setProjectName(String projectName) { - this.projectName = projectName; - } + @Override + public void setProjectName(String projectName) { + this.projectName = projectName; + } - public void setNspId(String nspId) { - this.nspId = nspId; - } + public void setNspId(String nspId) { + this.nspId = nspId; + } - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } } diff --git a/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java index c8dee140323..526e52b71a5 100644 --- a/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java @@ -100,7 +100,7 @@ public class ServiceOfferingResponse extends BaseResponse { @SerializedName(ApiConstants.SYSTEM_VM_TYPE) @Param(description = "is this a the systemvm type for system vm offering") - private String vm_type; + private String vmType; @SerializedName(ApiConstants.NETWORKRATE) @Param(description = "data transfer rate in megabits per second allowed.") @@ -170,11 +170,11 @@ public class ServiceOfferingResponse extends BaseResponse { } public String getSystemVmType() { - return vm_type; + return vmType; } public void setSystemVmType(String vmtype) { - vm_type = vmtype; + vmType = vmtype; } public String getDisplayText() { diff --git a/api/src/org/apache/cloudstack/context/CallContext.java b/api/src/org/apache/cloudstack/context/CallContext.java index 2d5aea45eb1..dbeb5c7ea21 100644 --- a/api/src/org/apache/cloudstack/context/CallContext.java +++ b/api/src/org/apache/cloudstack/context/CallContext.java @@ -42,10 +42,10 @@ public class CallContext { private static final Logger s_logger = Logger.getLogger(CallContext.class); private static ManagedThreadLocal s_currentContext = new ManagedThreadLocal(); private static ManagedThreadLocal> s_currentContextStack = new ManagedThreadLocal>() { - @Override - protected Stack initialValue() { - return new Stack(); - } + @Override + protected Stack initialValue() { + return new Stack(); + } }; private String contextId; @@ -76,9 +76,9 @@ public class CallContext { protected CallContext(User user, Account account, String contextId) { this.user = user; - this.userId = user.getId(); + userId = user.getId(); this.account = account; - this.accountId = account.getId(); + accountId = account.getId(); this.contextId = contextId; } @@ -119,7 +119,7 @@ public class CallContext { /** * This method should only be called if you can propagate the context id * from another CallContext. - * + * * @param callingUser calling user * @param callingAccount calling account * @param contextId context id propagated from another call context @@ -132,7 +132,6 @@ public class CallContext { protected static CallContext register(User callingUser, Account callingAccount, Long userId, Long accountId, String contextId) { /* Unit tests will have multiple times of setup/tear-down call to this, remove assertions to all unit test to run - assert s_currentContext.get() == null : "There's a context already so what does this new register context mean? " + s_currentContext.get().toString(); if (s_currentContext.get() != null) { // FIXME: This should be removed soon. I added this check only to surface all the places that have this problem. throw new CloudRuntimeException("There's a context already so what does this new register context mean? " + s_currentContext.get().toString()); @@ -149,9 +148,9 @@ public class CallContext { if (s_logger.isTraceEnabled()) { s_logger.trace("Registered: " + callingContext); } - + s_currentContextStack.get().push(callingContext); - + return callingContext; } @@ -197,7 +196,7 @@ public class CallContext { } return register(user, account); } - + public static CallContext register(long callingUserId, long callingAccountId, String contextId) throws CloudAuthenticationException { Account account = s_entityMgr.findById(Account.class, callingAccountId); if (account == null) { @@ -215,7 +214,7 @@ public class CallContext { // NOOP } } - + public static CallContext unregister() { CallContext context = s_currentContext.get(); if (context == null) { @@ -274,7 +273,7 @@ public class CallContext { public String getEventDetails() { return eventDetails; } - + public String getEventType() { return eventType; } @@ -282,7 +281,7 @@ public class CallContext { public void setEventType(String eventType) { this.eventType = eventType; } - + public String getEventDescription() { return eventDescription; } diff --git a/api/test/org/apache/cloudstack/api/command/test/AddIpToVmNicTest.java b/api/test/org/apache/cloudstack/api/command/test/AddIpToVmNicTest.java index 195486aedd0..121659b46ed 100644 --- a/api/test/org/apache/cloudstack/api/command/test/AddIpToVmNicTest.java +++ b/api/test/org/apache/cloudstack/api/command/test/AddIpToVmNicTest.java @@ -67,7 +67,8 @@ public class AddIpToVmNicTest extends TestCase { AddIpToVmNicCmd ipTonicCmd = Mockito.mock(AddIpToVmNicCmd.class); NicSecondaryIp secIp = Mockito.mock(NicSecondaryIp.class); - Mockito.when(networkService.allocateSecondaryGuestIP(Matchers.any(Account.class), Matchers.anyLong(), Matchers.anyLong(), Matchers.anyLong(), Matchers.anyString())) + Mockito.when( + networkService.allocateSecondaryGuestIP(Matchers.any(Account.class), Matchers.anyLong(), Matchers.anyLong(), Matchers.anyLong(), Matchers.anyString())) .thenReturn(secIp); ipTonicCmd._networkService = networkService; @@ -86,7 +87,8 @@ public class AddIpToVmNicTest extends TestCase { NetworkService networkService = Mockito.mock(NetworkService.class); AddIpToVmNicCmd ipTonicCmd = Mockito.mock(AddIpToVmNicCmd.class); - Mockito.when(networkService.allocateSecondaryGuestIP(Matchers.any(Account.class), Matchers.anyLong(), Matchers.anyLong(), Matchers.anyLong(), Matchers.anyString())) + Mockito.when( + networkService.allocateSecondaryGuestIP(Matchers.any(Account.class), Matchers.anyLong(), Matchers.anyLong(), Matchers.anyLong(), Matchers.anyString())) .thenReturn(null); ipTonicCmd._networkService = networkService; diff --git a/awsapi/src/com/amazon/ec2/AmazonEC2MessageReceiverInOut.java b/awsapi/src/com/amazon/ec2/AmazonEC2MessageReceiverInOut.java index e04952a5684..302644c772e 100644 --- a/awsapi/src/com/amazon/ec2/AmazonEC2MessageReceiverInOut.java +++ b/awsapi/src/com/amazon/ec2/AmazonEC2MessageReceiverInOut.java @@ -59,7 +59,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describePlacementGroupsResponse289 = - skel.describePlacementGroups(wrappedParam); + skel.describePlacementGroups(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describePlacementGroupsResponse289, false); } else @@ -73,7 +73,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createSecurityGroupResponse291 = - skel.createSecurityGroup(wrappedParam); + skel.createSecurityGroup(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createSecurityGroupResponse291, false); } else @@ -87,7 +87,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab resetNetworkInterfaceAttributeResponse293 = - skel.resetNetworkInterfaceAttribute(wrappedParam); + skel.resetNetworkInterfaceAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), resetNetworkInterfaceAttributeResponse293, false); } else @@ -101,7 +101,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createDhcpOptionsResponse295 = - skel.createDhcpOptions(wrappedParam); + skel.createDhcpOptions(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createDhcpOptionsResponse295, false); } else @@ -115,7 +115,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createRouteTableResponse297 = - skel.createRouteTable(wrappedParam); + skel.createRouteTable(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createRouteTableResponse297, false); } else @@ -129,7 +129,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeSubnetsResponse299 = - skel.describeSubnets(wrappedParam); + skel.describeSubnets(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeSubnetsResponse299, false); } else @@ -143,7 +143,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deactivateLicenseResponse301 = - skel.deactivateLicense(wrappedParam); + skel.deactivateLicense(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deactivateLicenseResponse301, false); } else @@ -157,7 +157,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteVpcResponse303 = - skel.deleteVpc(wrappedParam); + skel.deleteVpc(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteVpcResponse303, false); } else @@ -171,7 +171,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab cancelSpotInstanceRequestsResponse305 = - skel.cancelSpotInstanceRequests(wrappedParam); + skel.cancelSpotInstanceRequests(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), cancelSpotInstanceRequestsResponse305, false); } else @@ -185,7 +185,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createSubnetResponse307 = - skel.createSubnet(wrappedParam); + skel.createSubnet(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createSubnetResponse307, false); } else @@ -199,7 +199,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteVpnGatewayResponse309 = - skel.deleteVpnGateway(wrappedParam); + skel.deleteVpnGateway(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteVpnGatewayResponse309, false); } else @@ -213,7 +213,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createNetworkAclEntryResponse311 = - skel.createNetworkAclEntry(wrappedParam); + skel.createNetworkAclEntry(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createNetworkAclEntryResponse311, false); } else @@ -227,7 +227,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab requestSpotInstancesResponse313 = - skel.requestSpotInstances(wrappedParam); + skel.requestSpotInstances(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), requestSpotInstancesResponse313, false); } else @@ -241,7 +241,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeVolumeAttributeResponse315 = - skel.describeVolumeAttribute(wrappedParam); + skel.describeVolumeAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeVolumeAttributeResponse315, false); } else @@ -255,7 +255,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab associateDhcpOptionsResponse317 = - skel.associateDhcpOptions(wrappedParam); + skel.associateDhcpOptions(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), associateDhcpOptionsResponse317, false); } else @@ -269,7 +269,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeTagsResponse319 = - skel.describeTags(wrappedParam); + skel.describeTags(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeTagsResponse319, false); } else @@ -283,7 +283,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab importKeyPairResponse321 = - skel.importKeyPair(wrappedParam); + skel.importKeyPair(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), importKeyPairResponse321, false); } else @@ -297,7 +297,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteNetworkInterfaceResponse323 = - skel.deleteNetworkInterface(wrappedParam); + skel.deleteNetworkInterface(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteNetworkInterfaceResponse323, false); } else @@ -311,7 +311,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeVpcsResponse325 = - skel.describeVpcs(wrappedParam); + skel.describeVpcs(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeVpcsResponse325, false); } else @@ -325,7 +325,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeLicensesResponse327 = - skel.describeLicenses(wrappedParam); + skel.describeLicenses(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeLicensesResponse327, false); } else @@ -339,7 +339,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab bundleInstanceResponse329 = - skel.bundleInstance(wrappedParam); + skel.bundleInstance(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), bundleInstanceResponse329, false); } else @@ -353,7 +353,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeVpnConnectionsResponse331 = - skel.describeVpnConnections(wrappedParam); + skel.describeVpnConnections(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeVpnConnectionsResponse331, false); } else @@ -367,7 +367,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeImagesResponse333 = - skel.describeImages(wrappedParam); + skel.describeImages(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeImagesResponse333, false); } else @@ -381,7 +381,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createInternetGatewayResponse335 = - skel.createInternetGateway(wrappedParam); + skel.createInternetGateway(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createInternetGatewayResponse335, false); } else @@ -395,7 +395,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab disassociateRouteTableResponse337 = - skel.disassociateRouteTable(wrappedParam); + skel.disassociateRouteTable(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), disassociateRouteTableResponse337, false); } else @@ -409,7 +409,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab replaceNetworkAclEntryResponse339 = - skel.replaceNetworkAclEntry(wrappedParam); + skel.replaceNetworkAclEntry(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), replaceNetworkAclEntryResponse339, false); } else @@ -423,7 +423,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab authorizeSecurityGroupIngressResponse341 = - skel.authorizeSecurityGroupIngress(wrappedParam); + skel.authorizeSecurityGroupIngress(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), authorizeSecurityGroupIngressResponse341, false); } else @@ -437,7 +437,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeSnapshotAttributeResponse343 = - skel.describeSnapshotAttribute(wrappedParam); + skel.describeSnapshotAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeSnapshotAttributeResponse343, false); } else @@ -451,7 +451,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createVpnGatewayResponse345 = - skel.createVpnGateway(wrappedParam); + skel.createVpnGateway(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createVpnGatewayResponse345, false); } else @@ -465,7 +465,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab resetInstanceAttributeResponse347 = - skel.resetInstanceAttribute(wrappedParam); + skel.resetInstanceAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), resetInstanceAttributeResponse347, false); } else @@ -479,7 +479,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createTagsResponse349 = - skel.createTags(wrappedParam); + skel.createTags(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createTagsResponse349, false); } else @@ -493,7 +493,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab authorizeSecurityGroupEgressResponse351 = - skel.authorizeSecurityGroupEgress(wrappedParam); + skel.authorizeSecurityGroupEgress(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), authorizeSecurityGroupEgressResponse351, false); } else @@ -507,7 +507,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab associateAddressResponse353 = - skel.associateAddress(wrappedParam); + skel.associateAddress(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), associateAddressResponse353, false); } else @@ -521,7 +521,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeImageAttributeResponse355 = - skel.describeImageAttribute(wrappedParam); + skel.describeImageAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeImageAttributeResponse355, false); } else @@ -535,7 +535,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeSpotPriceHistoryResponse357 = - skel.describeSpotPriceHistory(wrappedParam); + skel.describeSpotPriceHistory(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeSpotPriceHistoryResponse357, false); } else @@ -549,7 +549,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab modifySnapshotAttributeResponse359 = - skel.modifySnapshotAttribute(wrappedParam); + skel.modifySnapshotAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), modifySnapshotAttributeResponse359, false); } else @@ -563,7 +563,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeSpotInstanceRequestsResponse361 = - skel.describeSpotInstanceRequests(wrappedParam); + skel.describeSpotInstanceRequests(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeSpotInstanceRequestsResponse361, false); } else @@ -577,7 +577,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab importInstanceResponse363 = - skel.importInstance(wrappedParam); + skel.importInstance(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), importInstanceResponse363, false); } else @@ -591,7 +591,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeKeyPairsResponse365 = - skel.describeKeyPairs(wrappedParam); + skel.describeKeyPairs(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeKeyPairsResponse365, false); } else @@ -605,7 +605,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab revokeSecurityGroupIngressResponse367 = - skel.revokeSecurityGroupIngress(wrappedParam); + skel.revokeSecurityGroupIngress(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), revokeSecurityGroupIngressResponse367, false); } else @@ -619,7 +619,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createPlacementGroupResponse369 = - skel.createPlacementGroup(wrappedParam); + skel.createPlacementGroup(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createPlacementGroupResponse369, false); } else @@ -633,7 +633,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteNetworkAclEntryResponse371 = - skel.deleteNetworkAclEntry(wrappedParam); + skel.deleteNetworkAclEntry(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteNetworkAclEntryResponse371, false); } else @@ -647,7 +647,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab activateLicenseResponse373 = - skel.activateLicense(wrappedParam); + skel.activateLicense(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), activateLicenseResponse373, false); } else @@ -661,7 +661,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteRouteTableResponse375 = - skel.deleteRouteTable(wrappedParam); + skel.deleteRouteTable(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteRouteTableResponse375, false); } else @@ -675,7 +675,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab unmonitorInstancesResponse377 = - skel.unmonitorInstances(wrappedParam); + skel.unmonitorInstances(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), unmonitorInstancesResponse377, false); } else @@ -689,7 +689,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab startInstancesResponse379 = - skel.startInstances(wrappedParam); + skel.startInstances(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), startInstancesResponse379, false); } else @@ -703,7 +703,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab confirmProductInstanceResponse381 = - skel.confirmProductInstance(wrappedParam); + skel.confirmProductInstance(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), confirmProductInstanceResponse381, false); } else @@ -717,7 +717,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeNetworkInterfaceAttributeResponse383 = - skel.describeNetworkInterfaceAttribute(wrappedParam); + skel.describeNetworkInterfaceAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeNetworkInterfaceAttributeResponse383, false); } else @@ -731,7 +731,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab runInstancesResponse385 = - skel.runInstances(wrappedParam); + skel.runInstances(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), runInstancesResponse385, false); } else @@ -745,7 +745,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createReservedInstancesListingResponse387 = - skel.createReservedInstancesListing(wrappedParam); + skel.createReservedInstancesListing(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createReservedInstancesListingResponse387, false); } else @@ -759,7 +759,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createCustomerGatewayResponse389 = - skel.createCustomerGateway(wrappedParam); + skel.createCustomerGateway(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createCustomerGatewayResponse389, false); } else @@ -773,7 +773,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createNetworkAclResponse391 = - skel.createNetworkAcl(wrappedParam); + skel.createNetworkAcl(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createNetworkAclResponse391, false); } else @@ -787,7 +787,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab resetImageAttributeResponse393 = - skel.resetImageAttribute(wrappedParam); + skel.resetImageAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), resetImageAttributeResponse393, false); } else @@ -801,7 +801,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab modifyVolumeAttributeResponse395 = - skel.modifyVolumeAttribute(wrappedParam); + skel.modifyVolumeAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), modifyVolumeAttributeResponse395, false); } else @@ -815,7 +815,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeReservedInstancesResponse397 = - skel.describeReservedInstances(wrappedParam); + skel.describeReservedInstances(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeReservedInstancesResponse397, false); } else @@ -829,7 +829,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab resetSnapshotAttributeResponse399 = - skel.resetSnapshotAttribute(wrappedParam); + skel.resetSnapshotAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), resetSnapshotAttributeResponse399, false); } else @@ -843,7 +843,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteVolumeResponse401 = - skel.deleteVolume(wrappedParam); + skel.deleteVolume(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteVolumeResponse401, false); } else @@ -857,7 +857,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeAvailabilityZonesResponse403 = - skel.describeAvailabilityZones(wrappedParam); + skel.describeAvailabilityZones(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeAvailabilityZonesResponse403, false); } else @@ -871,7 +871,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createVpnConnectionResponse405 = - skel.createVpnConnection(wrappedParam); + skel.createVpnConnection(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createVpnConnectionResponse405, false); } else @@ -885,7 +885,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab cancelBundleTaskResponse407 = - skel.cancelBundleTask(wrappedParam); + skel.cancelBundleTask(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), cancelBundleTaskResponse407, false); } else @@ -899,7 +899,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab replaceNetworkAclAssociationResponse409 = - skel.replaceNetworkAclAssociation(wrappedParam); + skel.replaceNetworkAclAssociation(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), replaceNetworkAclAssociationResponse409, false); } else @@ -913,7 +913,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab detachVpnGatewayResponse411 = - skel.detachVpnGateway(wrappedParam); + skel.detachVpnGateway(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), detachVpnGatewayResponse411, false); } else @@ -927,7 +927,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeSnapshotsResponse413 = - skel.describeSnapshots(wrappedParam); + skel.describeSnapshots(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeSnapshotsResponse413, false); } else @@ -941,7 +941,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteSubnetResponse415 = - skel.deleteSubnet(wrappedParam); + skel.deleteSubnet(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteSubnetResponse415, false); } else @@ -955,7 +955,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeBundleTasksResponse417 = - skel.describeBundleTasks(wrappedParam); + skel.describeBundleTasks(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeBundleTasksResponse417, false); } else @@ -969,7 +969,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createKeyPairResponse419 = - skel.createKeyPair(wrappedParam); + skel.createKeyPair(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createKeyPairResponse419, false); } else @@ -983,7 +983,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createImageResponse421 = - skel.createImage(wrappedParam); + skel.createImage(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createImageResponse421, false); } else @@ -997,7 +997,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab enableVgwRoutePropagationResponse423 = - skel.enableVgwRoutePropagation(wrappedParam); + skel.enableVgwRoutePropagation(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), enableVgwRoutePropagationResponse423, false); } else @@ -1011,7 +1011,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab unassignPrivateIpAddressesResponse425 = - skel.unassignPrivateIpAddresses(wrappedParam); + skel.unassignPrivateIpAddresses(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), unassignPrivateIpAddressesResponse425, false); } else @@ -1025,7 +1025,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deregisterImageResponse427 = - skel.deregisterImage(wrappedParam); + skel.deregisterImage(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deregisterImageResponse427, false); } else @@ -1039,7 +1039,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteVpnConnectionRouteResponse429 = - skel.deleteVpnConnectionRoute(wrappedParam); + skel.deleteVpnConnectionRoute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteVpnConnectionRouteResponse429, false); } else @@ -1053,7 +1053,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab modifyImageAttributeResponse431 = - skel.modifyImageAttribute(wrappedParam); + skel.modifyImageAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), modifyImageAttributeResponse431, false); } else @@ -1067,7 +1067,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab cancelConversionTaskResponse433 = - skel.cancelConversionTask(wrappedParam); + skel.cancelConversionTask(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), cancelConversionTaskResponse433, false); } else @@ -1081,7 +1081,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeVolumesResponse435 = - skel.describeVolumes(wrappedParam); + skel.describeVolumes(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeVolumesResponse435, false); } else @@ -1095,7 +1095,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab cancelReservedInstancesListingResponse437 = - skel.cancelReservedInstancesListing(wrappedParam); + skel.cancelReservedInstancesListing(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), cancelReservedInstancesListingResponse437, false); } else @@ -1109,7 +1109,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab getPasswordDataResponse439 = - skel.getPasswordData(wrappedParam); + skel.getPasswordData(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getPasswordDataResponse439, false); } else @@ -1123,7 +1123,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab allocateAddressResponse441 = - skel.allocateAddress(wrappedParam); + skel.allocateAddress(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), allocateAddressResponse441, false); } else @@ -1137,7 +1137,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteSecurityGroupResponse443 = - skel.deleteSecurityGroup(wrappedParam); + skel.deleteSecurityGroup(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteSecurityGroupResponse443, false); } else @@ -1151,7 +1151,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deletePlacementGroupResponse445 = - skel.deletePlacementGroup(wrappedParam); + skel.deletePlacementGroup(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deletePlacementGroupResponse445, false); } else @@ -1165,7 +1165,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab disassociateAddressResponse447 = - skel.disassociateAddress(wrappedParam); + skel.disassociateAddress(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), disassociateAddressResponse447, false); } else @@ -1179,7 +1179,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteDhcpOptionsResponse449 = - skel.deleteDhcpOptions(wrappedParam); + skel.deleteDhcpOptions(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteDhcpOptionsResponse449, false); } else @@ -1193,7 +1193,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeSpotDatafeedSubscriptionResponse451 = - skel.describeSpotDatafeedSubscription(wrappedParam); + skel.describeSpotDatafeedSubscription(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeSpotDatafeedSubscriptionResponse451, false); } else @@ -1207,7 +1207,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeNetworkAclsResponse453 = - skel.describeNetworkAcls(wrappedParam); + skel.describeNetworkAcls(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeNetworkAclsResponse453, false); } else @@ -1221,7 +1221,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab enableVolumeIOResponse455 = - skel.enableVolumeIO(wrappedParam); + skel.enableVolumeIO(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), enableVolumeIOResponse455, false); } else @@ -1235,7 +1235,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab attachVpnGatewayResponse457 = - skel.attachVpnGateway(wrappedParam); + skel.attachVpnGateway(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), attachVpnGatewayResponse457, false); } else @@ -1249,7 +1249,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeInternetGatewaysResponse459 = - skel.describeInternetGateways(wrappedParam); + skel.describeInternetGateways(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeInternetGatewaysResponse459, false); } else @@ -1263,7 +1263,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeDhcpOptionsResponse461 = - skel.describeDhcpOptions(wrappedParam); + skel.describeDhcpOptions(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeDhcpOptionsResponse461, false); } else @@ -1277,7 +1277,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createSpotDatafeedSubscriptionResponse463 = - skel.createSpotDatafeedSubscription(wrappedParam); + skel.createSpotDatafeedSubscription(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createSpotDatafeedSubscriptionResponse463, false); } else @@ -1291,7 +1291,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeReservedInstancesListingsResponse465 = - skel.describeReservedInstancesListings(wrappedParam); + skel.describeReservedInstancesListings(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeReservedInstancesListingsResponse465, false); } else @@ -1305,7 +1305,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeInstanceStatusResponse467 = - skel.describeInstanceStatus(wrappedParam); + skel.describeInstanceStatus(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeInstanceStatusResponse467, false); } else @@ -1319,7 +1319,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab modifyNetworkInterfaceAttributeResponse469 = - skel.modifyNetworkInterfaceAttribute(wrappedParam); + skel.modifyNetworkInterfaceAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), modifyNetworkInterfaceAttributeResponse469, false); } else @@ -1333,7 +1333,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab disableVgwRoutePropagationResponse471 = - skel.disableVgwRoutePropagation(wrappedParam); + skel.disableVgwRoutePropagation(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), disableVgwRoutePropagationResponse471, false); } else @@ -1347,7 +1347,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeVolumeStatusResponse473 = - skel.describeVolumeStatus(wrappedParam); + skel.describeVolumeStatus(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeVolumeStatusResponse473, false); } else @@ -1361,7 +1361,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab detachNetworkInterfaceResponse475 = - skel.detachNetworkInterface(wrappedParam); + skel.detachNetworkInterface(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), detachNetworkInterfaceResponse475, false); } else @@ -1375,7 +1375,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeSecurityGroupsResponse477 = - skel.describeSecurityGroups(wrappedParam); + skel.describeSecurityGroups(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeSecurityGroupsResponse477, false); } else @@ -1389,7 +1389,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeInstancesResponse479 = - skel.describeInstances(wrappedParam); + skel.describeInstances(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeInstancesResponse479, false); } else @@ -1403,7 +1403,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeNetworkInterfacesResponse481 = - skel.describeNetworkInterfaces(wrappedParam); + skel.describeNetworkInterfaces(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeNetworkInterfacesResponse481, false); } else @@ -1417,7 +1417,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteKeyPairResponse483 = - skel.deleteKeyPair(wrappedParam); + skel.deleteKeyPair(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteKeyPairResponse483, false); } else @@ -1431,7 +1431,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createSnapshotResponse485 = - skel.createSnapshot(wrappedParam); + skel.createSnapshot(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createSnapshotResponse485, false); } else @@ -1445,7 +1445,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeVpnGatewaysResponse487 = - skel.describeVpnGateways(wrappedParam); + skel.describeVpnGateways(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeVpnGatewaysResponse487, false); } else @@ -1459,7 +1459,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteTagsResponse489 = - skel.deleteTags(wrappedParam); + skel.deleteTags(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteTagsResponse489, false); } else @@ -1473,7 +1473,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteSnapshotResponse491 = - skel.deleteSnapshot(wrappedParam); + skel.deleteSnapshot(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteSnapshotResponse491, false); } else @@ -1487,7 +1487,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteCustomerGatewayResponse493 = - skel.deleteCustomerGateway(wrappedParam); + skel.deleteCustomerGateway(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteCustomerGatewayResponse493, false); } else @@ -1501,7 +1501,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createVolumeResponse495 = - skel.createVolume(wrappedParam); + skel.createVolume(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createVolumeResponse495, false); } else @@ -1515,7 +1515,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab cancelExportTaskResponse497 = - skel.cancelExportTask(wrappedParam); + skel.cancelExportTask(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), cancelExportTaskResponse497, false); } else @@ -1529,7 +1529,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab registerImageResponse499 = - skel.registerImage(wrappedParam); + skel.registerImage(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), registerImageResponse499, false); } else @@ -1543,7 +1543,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab detachVolumeResponse501 = - skel.detachVolume(wrappedParam); + skel.detachVolume(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), detachVolumeResponse501, false); } else @@ -1557,7 +1557,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab stopInstancesResponse503 = - skel.stopInstances(wrappedParam); + skel.stopInstances(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), stopInstancesResponse503, false); } else @@ -1571,7 +1571,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createRouteResponse505 = - skel.createRoute(wrappedParam); + skel.createRoute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createRouteResponse505, false); } else @@ -1585,7 +1585,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab releaseAddressResponse507 = - skel.releaseAddress(wrappedParam); + skel.releaseAddress(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), releaseAddressResponse507, false); } else @@ -1599,7 +1599,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeRouteTablesResponse509 = - skel.describeRouteTables(wrappedParam); + skel.describeRouteTables(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeRouteTablesResponse509, false); } else @@ -1613,7 +1613,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeCustomerGatewaysResponse511 = - skel.describeCustomerGateways(wrappedParam); + skel.describeCustomerGateways(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeCustomerGatewaysResponse511, false); } else @@ -1627,7 +1627,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteNetworkAclResponse513 = - skel.deleteNetworkAcl(wrappedParam); + skel.deleteNetworkAcl(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteNetworkAclResponse513, false); } else @@ -1641,7 +1641,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteRouteResponse515 = - skel.deleteRoute(wrappedParam); + skel.deleteRoute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteRouteResponse515, false); } else @@ -1655,7 +1655,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab rebootInstancesResponse517 = - skel.rebootInstances(wrappedParam); + skel.rebootInstances(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), rebootInstancesResponse517, false); } else @@ -1669,7 +1669,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab modifyInstanceAttributeResponse519 = - skel.modifyInstanceAttribute(wrappedParam); + skel.modifyInstanceAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), modifyInstanceAttributeResponse519, false); } else @@ -1683,7 +1683,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab terminateInstancesResponse521 = - skel.terminateInstances(wrappedParam); + skel.terminateInstances(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), terminateInstancesResponse521, false); } else @@ -1697,7 +1697,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createVpnConnectionRouteResponse523 = - skel.createVpnConnectionRoute(wrappedParam); + skel.createVpnConnectionRoute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createVpnConnectionRouteResponse523, false); } else @@ -1711,7 +1711,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeConversionTasksResponse525 = - skel.describeConversionTasks(wrappedParam); + skel.describeConversionTasks(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeConversionTasksResponse525, false); } else @@ -1725,7 +1725,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeAddressesResponse527 = - skel.describeAddresses(wrappedParam); + skel.describeAddresses(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeAddressesResponse527, false); } else @@ -1739,7 +1739,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeInstanceAttributeResponse529 = - skel.describeInstanceAttribute(wrappedParam); + skel.describeInstanceAttribute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeInstanceAttributeResponse529, false); } else @@ -1753,7 +1753,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab attachInternetGatewayResponse531 = - skel.attachInternetGateway(wrappedParam); + skel.attachInternetGateway(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), attachInternetGatewayResponse531, false); } else @@ -1767,7 +1767,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createVpcResponse533 = - skel.createVpc(wrappedParam); + skel.createVpc(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createVpcResponse533, false); } else @@ -1781,7 +1781,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab replaceRouteTableAssociationResponse535 = - skel.replaceRouteTableAssociation(wrappedParam); + skel.replaceRouteTableAssociation(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), replaceRouteTableAssociationResponse535, false); } else @@ -1795,7 +1795,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab associateRouteTableResponse537 = - skel.associateRouteTable(wrappedParam); + skel.associateRouteTable(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), associateRouteTableResponse537, false); } else @@ -1809,7 +1809,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab detachInternetGatewayResponse539 = - skel.detachInternetGateway(wrappedParam); + skel.detachInternetGateway(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), detachInternetGatewayResponse539, false); } else @@ -1823,7 +1823,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab purchaseReservedInstancesOfferingResponse541 = - skel.purchaseReservedInstancesOffering(wrappedParam); + skel.purchaseReservedInstancesOffering(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), purchaseReservedInstancesOfferingResponse541, false); } else @@ -1837,7 +1837,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab importVolumeResponse543 = - skel.importVolume(wrappedParam); + skel.importVolume(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), importVolumeResponse543, false); } else @@ -1851,7 +1851,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeExportTasksResponse545 = - skel.describeExportTasks(wrappedParam); + skel.describeExportTasks(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeExportTasksResponse545, false); } else @@ -1865,7 +1865,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createInstanceExportTaskResponse547 = - skel.createInstanceExportTask(wrappedParam); + skel.createInstanceExportTask(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createInstanceExportTaskResponse547, false); } else @@ -1879,7 +1879,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab assignPrivateIpAddressesResponse549 = - skel.assignPrivateIpAddresses(wrappedParam); + skel.assignPrivateIpAddresses(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), assignPrivateIpAddressesResponse549, false); } else @@ -1893,7 +1893,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab reportInstanceStatusResponse551 = - skel.reportInstanceStatus(wrappedParam); + skel.reportInstanceStatus(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), reportInstanceStatusResponse551, false); } else @@ -1907,7 +1907,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeReservedInstancesOfferingsResponse553 = - skel.describeReservedInstancesOfferings(wrappedParam); + skel.describeReservedInstancesOfferings(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeReservedInstancesOfferingsResponse553, false); } else @@ -1921,7 +1921,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteVpnConnectionResponse555 = - skel.deleteVpnConnection(wrappedParam); + skel.deleteVpnConnection(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteVpnConnectionResponse555, false); } else @@ -1935,7 +1935,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteInternetGatewayResponse557 = - skel.deleteInternetGateway(wrappedParam); + skel.deleteInternetGateway(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteInternetGatewayResponse557, false); } else @@ -1949,7 +1949,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab deleteSpotDatafeedSubscriptionResponse559 = - skel.deleteSpotDatafeedSubscription(wrappedParam); + skel.deleteSpotDatafeedSubscription(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteSpotDatafeedSubscriptionResponse559, false); } else @@ -1963,7 +1963,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab attachNetworkInterfaceResponse561 = - skel.attachNetworkInterface(wrappedParam); + skel.attachNetworkInterface(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), attachNetworkInterfaceResponse561, false); } else @@ -1977,7 +1977,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab createNetworkInterfaceResponse563 = - skel.createNetworkInterface(wrappedParam); + skel.createNetworkInterface(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createNetworkInterfaceResponse563, false); } else @@ -1991,7 +1991,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab revokeSecurityGroupEgressResponse565 = - skel.revokeSecurityGroupEgress(wrappedParam); + skel.revokeSecurityGroupEgress(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), revokeSecurityGroupEgressResponse565, false); } else @@ -2005,7 +2005,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab monitorInstancesResponse567 = - skel.monitorInstances(wrappedParam); + skel.monitorInstances(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), monitorInstancesResponse567, false); } else @@ -2019,7 +2019,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab replaceRouteResponse569 = - skel.replaceRoute(wrappedParam); + skel.replaceRoute(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), replaceRouteResponse569, false); } else @@ -2033,7 +2033,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab attachVolumeResponse571 = - skel.attachVolume(wrappedParam); + skel.attachVolume(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), attachVolumeResponse571, false); } else @@ -2047,7 +2047,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab getConsoleOutputResponse573 = - skel.getConsoleOutput(wrappedParam); + skel.getConsoleOutput(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getConsoleOutputResponse573, false); } else @@ -2061,7 +2061,7 @@ public class AmazonEC2MessageReceiverInOut extends org.apache.axis2.receivers.Ab describeRegionsResponse575 = - skel.describeRegions(wrappedParam); + skel.describeRegions(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), describeRegionsResponse575, false); diff --git a/awsapi/src/com/amazon/ec2/UserDataType.java b/awsapi/src/com/amazon/ec2/UserDataType.java index 4b04afd4b55..2f84fbef788 100644 --- a/awsapi/src/com/amazon/ec2/UserDataType.java +++ b/awsapi/src/com/amazon/ec2/UserDataType.java @@ -482,7 +482,7 @@ public class UserDataType implements org.apache.axis2.databinding.ADBBean { // handle attribute "version" java.lang.String tempAttribVersion = - reader.getAttributeValue(null, "version"); + reader.getAttributeValue(null, "version"); if (tempAttribVersion != null) { java.lang.String content = tempAttribVersion; @@ -499,7 +499,7 @@ public class UserDataType implements org.apache.axis2.databinding.ADBBean { // handle attribute "encoding" java.lang.String tempAttribEncoding = - reader.getAttributeValue(null, "encoding"); + reader.getAttributeValue(null, "encoding"); if (tempAttribEncoding != null) { java.lang.String content = tempAttribEncoding; diff --git a/awsapi/src/com/amazon/ec2/client/AmazonEC2Stub.java b/awsapi/src/com/amazon/ec2/client/AmazonEC2Stub.java index b6698a8aa0f..0da7d69465b 100644 --- a/awsapi/src/com/amazon/ec2/client/AmazonEC2Stub.java +++ b/awsapi/src/com/amazon/ec2/client/AmazonEC2Stub.java @@ -1131,9 +1131,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribePlacementGroupsResponse describePlacementGroups( - com.amazon.ec2.client.AmazonEC2Stub.DescribePlacementGroups describePlacementGroups0) + com.amazon.ec2.client.AmazonEC2Stub.DescribePlacementGroups describePlacementGroups0) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -1234,11 +1234,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribePlacementGroups( - com.amazon.ec2.client.AmazonEC2Stub.DescribePlacementGroups describePlacementGroups0, + com.amazon.ec2.client.AmazonEC2Stub.DescribePlacementGroups describePlacementGroups0, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName()); _operationClient.getOptions().setAction("DescribePlacementGroups"); @@ -1366,9 +1366,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateSecurityGroupResponse createSecurityGroup( - com.amazon.ec2.client.AmazonEC2Stub.CreateSecurityGroup createSecurityGroup2) + com.amazon.ec2.client.AmazonEC2Stub.CreateSecurityGroup createSecurityGroup2) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -1468,11 +1468,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateSecurityGroup( - com.amazon.ec2.client.AmazonEC2Stub.CreateSecurityGroup createSecurityGroup2, + com.amazon.ec2.client.AmazonEC2Stub.CreateSecurityGroup createSecurityGroup2, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName()); _operationClient.getOptions().setAction("CreateSecurityGroup"); @@ -1600,9 +1600,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ResetNetworkInterfaceAttributeResponse resetNetworkInterfaceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ResetNetworkInterfaceAttribute resetNetworkInterfaceAttribute4) + com.amazon.ec2.client.AmazonEC2Stub.ResetNetworkInterfaceAttribute resetNetworkInterfaceAttribute4) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -1703,11 +1703,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startresetNetworkInterfaceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ResetNetworkInterfaceAttribute resetNetworkInterfaceAttribute4, + com.amazon.ec2.client.AmazonEC2Stub.ResetNetworkInterfaceAttribute resetNetworkInterfaceAttribute4, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName()); _operationClient.getOptions().setAction("ResetNetworkInterfaceAttribute"); @@ -1835,9 +1835,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateDhcpOptionsResponse createDhcpOptions( - com.amazon.ec2.client.AmazonEC2Stub.CreateDhcpOptions createDhcpOptions6) + com.amazon.ec2.client.AmazonEC2Stub.CreateDhcpOptions createDhcpOptions6) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -1937,11 +1937,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateDhcpOptions( - com.amazon.ec2.client.AmazonEC2Stub.CreateDhcpOptions createDhcpOptions6, + com.amazon.ec2.client.AmazonEC2Stub.CreateDhcpOptions createDhcpOptions6, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName()); _operationClient.getOptions().setAction("CreateDhcpOptions"); @@ -2069,9 +2069,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateRouteTableResponse createRouteTable( - com.amazon.ec2.client.AmazonEC2Stub.CreateRouteTable createRouteTable8) + com.amazon.ec2.client.AmazonEC2Stub.CreateRouteTable createRouteTable8) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -2171,11 +2171,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateRouteTable( - com.amazon.ec2.client.AmazonEC2Stub.CreateRouteTable createRouteTable8, + com.amazon.ec2.client.AmazonEC2Stub.CreateRouteTable createRouteTable8, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName()); _operationClient.getOptions().setAction("CreateRouteTable"); @@ -2303,9 +2303,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeSubnetsResponse describeSubnets( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSubnets describeSubnets10) + com.amazon.ec2.client.AmazonEC2Stub.DescribeSubnets describeSubnets10) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -2405,11 +2405,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeSubnets( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSubnets describeSubnets10, + com.amazon.ec2.client.AmazonEC2Stub.DescribeSubnets describeSubnets10, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[5].getName()); _operationClient.getOptions().setAction("DescribeSubnets"); @@ -2536,9 +2536,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeactivateLicenseResponse deactivateLicense( - com.amazon.ec2.client.AmazonEC2Stub.DeactivateLicense deactivateLicense12) + com.amazon.ec2.client.AmazonEC2Stub.DeactivateLicense deactivateLicense12) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -2638,11 +2638,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeactivateLicense( - com.amazon.ec2.client.AmazonEC2Stub.DeactivateLicense deactivateLicense12, + com.amazon.ec2.client.AmazonEC2Stub.DeactivateLicense deactivateLicense12, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[6].getName()); _operationClient.getOptions().setAction("DeactivateLicense"); @@ -2770,9 +2770,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteVpcResponse deleteVpc( - com.amazon.ec2.client.AmazonEC2Stub.DeleteVpc deleteVpc14) + com.amazon.ec2.client.AmazonEC2Stub.DeleteVpc deleteVpc14) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -2872,11 +2872,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteVpc( - com.amazon.ec2.client.AmazonEC2Stub.DeleteVpc deleteVpc14, + com.amazon.ec2.client.AmazonEC2Stub.DeleteVpc deleteVpc14, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[7].getName()); _operationClient.getOptions().setAction("DeleteVpc"); @@ -3003,9 +3003,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CancelSpotInstanceRequestsResponse cancelSpotInstanceRequests( - com.amazon.ec2.client.AmazonEC2Stub.CancelSpotInstanceRequests cancelSpotInstanceRequests16) + com.amazon.ec2.client.AmazonEC2Stub.CancelSpotInstanceRequests cancelSpotInstanceRequests16) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -3106,11 +3106,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcancelSpotInstanceRequests( - com.amazon.ec2.client.AmazonEC2Stub.CancelSpotInstanceRequests cancelSpotInstanceRequests16, + com.amazon.ec2.client.AmazonEC2Stub.CancelSpotInstanceRequests cancelSpotInstanceRequests16, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName()); _operationClient.getOptions().setAction("CancelSpotInstanceRequests"); @@ -3238,9 +3238,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateSubnetResponse createSubnet( - com.amazon.ec2.client.AmazonEC2Stub.CreateSubnet createSubnet18) + com.amazon.ec2.client.AmazonEC2Stub.CreateSubnet createSubnet18) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -3340,11 +3340,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateSubnet( - com.amazon.ec2.client.AmazonEC2Stub.CreateSubnet createSubnet18, + com.amazon.ec2.client.AmazonEC2Stub.CreateSubnet createSubnet18, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[9].getName()); _operationClient.getOptions().setAction("CreateSubnet"); @@ -3471,9 +3471,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnGatewayResponse deleteVpnGateway( - com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnGateway deleteVpnGateway20) + com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnGateway deleteVpnGateway20) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -3573,11 +3573,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteVpnGateway( - com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnGateway deleteVpnGateway20, + com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnGateway deleteVpnGateway20, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[10].getName()); _operationClient.getOptions().setAction("DeleteVpnGateway"); @@ -3705,9 +3705,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkAclEntryResponse createNetworkAclEntry( - com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkAclEntry createNetworkAclEntry22) + com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkAclEntry createNetworkAclEntry22) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -3807,11 +3807,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateNetworkAclEntry( - com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkAclEntry createNetworkAclEntry22, + com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkAclEntry createNetworkAclEntry22, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[11].getName()); _operationClient.getOptions().setAction("CreateNetworkAclEntry"); @@ -3939,9 +3939,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.RequestSpotInstancesResponse requestSpotInstances( - com.amazon.ec2.client.AmazonEC2Stub.RequestSpotInstances requestSpotInstances24) + com.amazon.ec2.client.AmazonEC2Stub.RequestSpotInstances requestSpotInstances24) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -4041,11 +4041,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startrequestSpotInstances( - com.amazon.ec2.client.AmazonEC2Stub.RequestSpotInstances requestSpotInstances24, + com.amazon.ec2.client.AmazonEC2Stub.RequestSpotInstances requestSpotInstances24, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[12].getName()); _operationClient.getOptions().setAction("RequestSpotInstances"); @@ -4173,9 +4173,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumeAttributeResponse describeVolumeAttribute( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumeAttribute describeVolumeAttribute26) + com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumeAttribute describeVolumeAttribute26) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -4276,11 +4276,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeVolumeAttribute( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumeAttribute describeVolumeAttribute26, + com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumeAttribute describeVolumeAttribute26, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[13].getName()); _operationClient.getOptions().setAction("DescribeVolumeAttribute"); @@ -4408,9 +4408,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.AssociateDhcpOptionsResponse associateDhcpOptions( - com.amazon.ec2.client.AmazonEC2Stub.AssociateDhcpOptions associateDhcpOptions28) + com.amazon.ec2.client.AmazonEC2Stub.AssociateDhcpOptions associateDhcpOptions28) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -4510,11 +4510,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startassociateDhcpOptions( - com.amazon.ec2.client.AmazonEC2Stub.AssociateDhcpOptions associateDhcpOptions28, + com.amazon.ec2.client.AmazonEC2Stub.AssociateDhcpOptions associateDhcpOptions28, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[14].getName()); _operationClient.getOptions().setAction("AssociateDhcpOptions"); @@ -4642,9 +4642,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeTagsResponse describeTags( - com.amazon.ec2.client.AmazonEC2Stub.DescribeTags describeTags30) + com.amazon.ec2.client.AmazonEC2Stub.DescribeTags describeTags30) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -4744,11 +4744,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeTags( - com.amazon.ec2.client.AmazonEC2Stub.DescribeTags describeTags30, + com.amazon.ec2.client.AmazonEC2Stub.DescribeTags describeTags30, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[15].getName()); _operationClient.getOptions().setAction("DescribeTags"); @@ -4875,9 +4875,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ImportKeyPairResponse importKeyPair( - com.amazon.ec2.client.AmazonEC2Stub.ImportKeyPair importKeyPair32) + com.amazon.ec2.client.AmazonEC2Stub.ImportKeyPair importKeyPair32) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -4977,11 +4977,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startimportKeyPair( - com.amazon.ec2.client.AmazonEC2Stub.ImportKeyPair importKeyPair32, + com.amazon.ec2.client.AmazonEC2Stub.ImportKeyPair importKeyPair32, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[16].getName()); _operationClient.getOptions().setAction("ImportKeyPair"); @@ -5108,9 +5108,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkInterfaceResponse deleteNetworkInterface( - com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkInterface deleteNetworkInterface34) + com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkInterface deleteNetworkInterface34) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -5211,11 +5211,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteNetworkInterface( - com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkInterface deleteNetworkInterface34, + com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkInterface deleteNetworkInterface34, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[17].getName()); _operationClient.getOptions().setAction("DeleteNetworkInterface"); @@ -5343,9 +5343,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeVpcsResponse describeVpcs( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVpcs describeVpcs36) + com.amazon.ec2.client.AmazonEC2Stub.DescribeVpcs describeVpcs36) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -5445,11 +5445,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeVpcs( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVpcs describeVpcs36, + com.amazon.ec2.client.AmazonEC2Stub.DescribeVpcs describeVpcs36, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[18].getName()); _operationClient.getOptions().setAction("DescribeVpcs"); @@ -5576,9 +5576,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeLicensesResponse describeLicenses( - com.amazon.ec2.client.AmazonEC2Stub.DescribeLicenses describeLicenses38) + com.amazon.ec2.client.AmazonEC2Stub.DescribeLicenses describeLicenses38) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -5678,11 +5678,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeLicenses( - com.amazon.ec2.client.AmazonEC2Stub.DescribeLicenses describeLicenses38, + com.amazon.ec2.client.AmazonEC2Stub.DescribeLicenses describeLicenses38, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[19].getName()); _operationClient.getOptions().setAction("DescribeLicenses"); @@ -5810,9 +5810,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.BundleInstanceResponse bundleInstance( - com.amazon.ec2.client.AmazonEC2Stub.BundleInstance bundleInstance40) + com.amazon.ec2.client.AmazonEC2Stub.BundleInstance bundleInstance40) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -5912,11 +5912,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startbundleInstance( - com.amazon.ec2.client.AmazonEC2Stub.BundleInstance bundleInstance40, + com.amazon.ec2.client.AmazonEC2Stub.BundleInstance bundleInstance40, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[20].getName()); _operationClient.getOptions().setAction("BundleInstance"); @@ -6043,9 +6043,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeVpnConnectionsResponse describeVpnConnections( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVpnConnections describeVpnConnections42) + com.amazon.ec2.client.AmazonEC2Stub.DescribeVpnConnections describeVpnConnections42) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -6146,11 +6146,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeVpnConnections( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVpnConnections describeVpnConnections42, + com.amazon.ec2.client.AmazonEC2Stub.DescribeVpnConnections describeVpnConnections42, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[21].getName()); _operationClient.getOptions().setAction("DescribeVpnConnections"); @@ -6278,9 +6278,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeImagesResponse describeImages( - com.amazon.ec2.client.AmazonEC2Stub.DescribeImages describeImages44) + com.amazon.ec2.client.AmazonEC2Stub.DescribeImages describeImages44) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -6380,11 +6380,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeImages( - com.amazon.ec2.client.AmazonEC2Stub.DescribeImages describeImages44, + com.amazon.ec2.client.AmazonEC2Stub.DescribeImages describeImages44, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[22].getName()); _operationClient.getOptions().setAction("DescribeImages"); @@ -6511,9 +6511,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateInternetGatewayResponse createInternetGateway( - com.amazon.ec2.client.AmazonEC2Stub.CreateInternetGateway createInternetGateway46) + com.amazon.ec2.client.AmazonEC2Stub.CreateInternetGateway createInternetGateway46) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -6613,11 +6613,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateInternetGateway( - com.amazon.ec2.client.AmazonEC2Stub.CreateInternetGateway createInternetGateway46, + com.amazon.ec2.client.AmazonEC2Stub.CreateInternetGateway createInternetGateway46, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[23].getName()); _operationClient.getOptions().setAction("CreateInternetGateway"); @@ -6745,9 +6745,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DisassociateRouteTableResponse disassociateRouteTable( - com.amazon.ec2.client.AmazonEC2Stub.DisassociateRouteTable disassociateRouteTable48) + com.amazon.ec2.client.AmazonEC2Stub.DisassociateRouteTable disassociateRouteTable48) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -6848,11 +6848,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdisassociateRouteTable( - com.amazon.ec2.client.AmazonEC2Stub.DisassociateRouteTable disassociateRouteTable48, + com.amazon.ec2.client.AmazonEC2Stub.DisassociateRouteTable disassociateRouteTable48, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[24].getName()); _operationClient.getOptions().setAction("DisassociateRouteTable"); @@ -6980,9 +6980,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ReplaceNetworkAclEntryResponse replaceNetworkAclEntry( - com.amazon.ec2.client.AmazonEC2Stub.ReplaceNetworkAclEntry replaceNetworkAclEntry50) + com.amazon.ec2.client.AmazonEC2Stub.ReplaceNetworkAclEntry replaceNetworkAclEntry50) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -7083,11 +7083,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startreplaceNetworkAclEntry( - com.amazon.ec2.client.AmazonEC2Stub.ReplaceNetworkAclEntry replaceNetworkAclEntry50, + com.amazon.ec2.client.AmazonEC2Stub.ReplaceNetworkAclEntry replaceNetworkAclEntry50, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[25].getName()); _operationClient.getOptions().setAction("ReplaceNetworkAclEntry"); @@ -7215,9 +7215,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.AuthorizeSecurityGroupIngressResponse authorizeSecurityGroupIngress( - com.amazon.ec2.client.AmazonEC2Stub.AuthorizeSecurityGroupIngress authorizeSecurityGroupIngress52) + com.amazon.ec2.client.AmazonEC2Stub.AuthorizeSecurityGroupIngress authorizeSecurityGroupIngress52) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -7318,11 +7318,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startauthorizeSecurityGroupIngress( - com.amazon.ec2.client.AmazonEC2Stub.AuthorizeSecurityGroupIngress authorizeSecurityGroupIngress52, + com.amazon.ec2.client.AmazonEC2Stub.AuthorizeSecurityGroupIngress authorizeSecurityGroupIngress52, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[26].getName()); _operationClient.getOptions().setAction("AuthorizeSecurityGroupIngress"); @@ -7450,9 +7450,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeSnapshotAttributeResponse describeSnapshotAttribute( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSnapshotAttribute describeSnapshotAttribute54) + com.amazon.ec2.client.AmazonEC2Stub.DescribeSnapshotAttribute describeSnapshotAttribute54) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -7553,11 +7553,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeSnapshotAttribute( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSnapshotAttribute describeSnapshotAttribute54, + com.amazon.ec2.client.AmazonEC2Stub.DescribeSnapshotAttribute describeSnapshotAttribute54, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[27].getName()); _operationClient.getOptions().setAction("DescribeSnapshotAttribute"); @@ -7685,9 +7685,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateVpnGatewayResponse createVpnGateway( - com.amazon.ec2.client.AmazonEC2Stub.CreateVpnGateway createVpnGateway56) + com.amazon.ec2.client.AmazonEC2Stub.CreateVpnGateway createVpnGateway56) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -7787,11 +7787,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateVpnGateway( - com.amazon.ec2.client.AmazonEC2Stub.CreateVpnGateway createVpnGateway56, + com.amazon.ec2.client.AmazonEC2Stub.CreateVpnGateway createVpnGateway56, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[28].getName()); _operationClient.getOptions().setAction("CreateVpnGateway"); @@ -7919,9 +7919,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ResetInstanceAttributeResponse resetInstanceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ResetInstanceAttribute resetInstanceAttribute58) + com.amazon.ec2.client.AmazonEC2Stub.ResetInstanceAttribute resetInstanceAttribute58) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -8022,11 +8022,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startresetInstanceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ResetInstanceAttribute resetInstanceAttribute58, + com.amazon.ec2.client.AmazonEC2Stub.ResetInstanceAttribute resetInstanceAttribute58, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[29].getName()); _operationClient.getOptions().setAction("ResetInstanceAttribute"); @@ -8154,9 +8154,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateTagsResponse createTags( - com.amazon.ec2.client.AmazonEC2Stub.CreateTags createTags60) + com.amazon.ec2.client.AmazonEC2Stub.CreateTags createTags60) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -8256,11 +8256,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateTags( - com.amazon.ec2.client.AmazonEC2Stub.CreateTags createTags60, + com.amazon.ec2.client.AmazonEC2Stub.CreateTags createTags60, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[30].getName()); _operationClient.getOptions().setAction("CreateTags"); @@ -8387,9 +8387,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.AuthorizeSecurityGroupEgressResponse authorizeSecurityGroupEgress( - com.amazon.ec2.client.AmazonEC2Stub.AuthorizeSecurityGroupEgress authorizeSecurityGroupEgress62) + com.amazon.ec2.client.AmazonEC2Stub.AuthorizeSecurityGroupEgress authorizeSecurityGroupEgress62) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -8490,11 +8490,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startauthorizeSecurityGroupEgress( - com.amazon.ec2.client.AmazonEC2Stub.AuthorizeSecurityGroupEgress authorizeSecurityGroupEgress62, + com.amazon.ec2.client.AmazonEC2Stub.AuthorizeSecurityGroupEgress authorizeSecurityGroupEgress62, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[31].getName()); _operationClient.getOptions().setAction("AuthorizeSecurityGroupEgress"); @@ -8622,9 +8622,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.AssociateAddressResponse associateAddress( - com.amazon.ec2.client.AmazonEC2Stub.AssociateAddress associateAddress64) + com.amazon.ec2.client.AmazonEC2Stub.AssociateAddress associateAddress64) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -8724,11 +8724,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startassociateAddress( - com.amazon.ec2.client.AmazonEC2Stub.AssociateAddress associateAddress64, + com.amazon.ec2.client.AmazonEC2Stub.AssociateAddress associateAddress64, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[32].getName()); _operationClient.getOptions().setAction("AssociateAddress"); @@ -8856,9 +8856,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeImageAttributeResponse describeImageAttribute( - com.amazon.ec2.client.AmazonEC2Stub.DescribeImageAttribute describeImageAttribute66) + com.amazon.ec2.client.AmazonEC2Stub.DescribeImageAttribute describeImageAttribute66) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -8959,11 +8959,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeImageAttribute( - com.amazon.ec2.client.AmazonEC2Stub.DescribeImageAttribute describeImageAttribute66, + com.amazon.ec2.client.AmazonEC2Stub.DescribeImageAttribute describeImageAttribute66, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[33].getName()); _operationClient.getOptions().setAction("DescribeImageAttribute"); @@ -9091,9 +9091,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotPriceHistoryResponse describeSpotPriceHistory( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotPriceHistory describeSpotPriceHistory68) + com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotPriceHistory describeSpotPriceHistory68) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -9194,11 +9194,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeSpotPriceHistory( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotPriceHistory describeSpotPriceHistory68, + com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotPriceHistory describeSpotPriceHistory68, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[34].getName()); _operationClient.getOptions().setAction("DescribeSpotPriceHistory"); @@ -9326,9 +9326,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ModifySnapshotAttributeResponse modifySnapshotAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ModifySnapshotAttribute modifySnapshotAttribute70) + com.amazon.ec2.client.AmazonEC2Stub.ModifySnapshotAttribute modifySnapshotAttribute70) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -9429,11 +9429,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startmodifySnapshotAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ModifySnapshotAttribute modifySnapshotAttribute70, + com.amazon.ec2.client.AmazonEC2Stub.ModifySnapshotAttribute modifySnapshotAttribute70, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[35].getName()); _operationClient.getOptions().setAction("ModifySnapshotAttribute"); @@ -9561,9 +9561,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotInstanceRequestsResponse describeSpotInstanceRequests( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotInstanceRequests describeSpotInstanceRequests72) + com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotInstanceRequests describeSpotInstanceRequests72) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -9664,11 +9664,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeSpotInstanceRequests( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotInstanceRequests describeSpotInstanceRequests72, + com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotInstanceRequests describeSpotInstanceRequests72, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[36].getName()); _operationClient.getOptions().setAction("DescribeSpotInstanceRequests"); @@ -9796,9 +9796,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ImportInstanceResponse importInstance( - com.amazon.ec2.client.AmazonEC2Stub.ImportInstance importInstance74) + com.amazon.ec2.client.AmazonEC2Stub.ImportInstance importInstance74) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -9898,11 +9898,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startimportInstance( - com.amazon.ec2.client.AmazonEC2Stub.ImportInstance importInstance74, + com.amazon.ec2.client.AmazonEC2Stub.ImportInstance importInstance74, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[37].getName()); _operationClient.getOptions().setAction("ImportInstance"); @@ -10029,9 +10029,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeKeyPairsResponse describeKeyPairs( - com.amazon.ec2.client.AmazonEC2Stub.DescribeKeyPairs describeKeyPairs76) + com.amazon.ec2.client.AmazonEC2Stub.DescribeKeyPairs describeKeyPairs76) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -10131,11 +10131,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeKeyPairs( - com.amazon.ec2.client.AmazonEC2Stub.DescribeKeyPairs describeKeyPairs76, + com.amazon.ec2.client.AmazonEC2Stub.DescribeKeyPairs describeKeyPairs76, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[38].getName()); _operationClient.getOptions().setAction("DescribeKeyPairs"); @@ -10263,9 +10263,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.RevokeSecurityGroupIngressResponse revokeSecurityGroupIngress( - com.amazon.ec2.client.AmazonEC2Stub.RevokeSecurityGroupIngress revokeSecurityGroupIngress78) + com.amazon.ec2.client.AmazonEC2Stub.RevokeSecurityGroupIngress revokeSecurityGroupIngress78) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -10366,11 +10366,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startrevokeSecurityGroupIngress( - com.amazon.ec2.client.AmazonEC2Stub.RevokeSecurityGroupIngress revokeSecurityGroupIngress78, + com.amazon.ec2.client.AmazonEC2Stub.RevokeSecurityGroupIngress revokeSecurityGroupIngress78, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[39].getName()); _operationClient.getOptions().setAction("RevokeSecurityGroupIngress"); @@ -10498,9 +10498,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreatePlacementGroupResponse createPlacementGroup( - com.amazon.ec2.client.AmazonEC2Stub.CreatePlacementGroup createPlacementGroup80) + com.amazon.ec2.client.AmazonEC2Stub.CreatePlacementGroup createPlacementGroup80) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -10600,11 +10600,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreatePlacementGroup( - com.amazon.ec2.client.AmazonEC2Stub.CreatePlacementGroup createPlacementGroup80, + com.amazon.ec2.client.AmazonEC2Stub.CreatePlacementGroup createPlacementGroup80, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[40].getName()); _operationClient.getOptions().setAction("CreatePlacementGroup"); @@ -10732,9 +10732,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkAclEntryResponse deleteNetworkAclEntry( - com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkAclEntry deleteNetworkAclEntry82) + com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkAclEntry deleteNetworkAclEntry82) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -10834,11 +10834,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteNetworkAclEntry( - com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkAclEntry deleteNetworkAclEntry82, + com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkAclEntry deleteNetworkAclEntry82, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[41].getName()); _operationClient.getOptions().setAction("DeleteNetworkAclEntry"); @@ -10966,9 +10966,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ActivateLicenseResponse activateLicense( - com.amazon.ec2.client.AmazonEC2Stub.ActivateLicense activateLicense84) + com.amazon.ec2.client.AmazonEC2Stub.ActivateLicense activateLicense84) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -11068,11 +11068,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startactivateLicense( - com.amazon.ec2.client.AmazonEC2Stub.ActivateLicense activateLicense84, + com.amazon.ec2.client.AmazonEC2Stub.ActivateLicense activateLicense84, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[42].getName()); _operationClient.getOptions().setAction("ActivateLicense"); @@ -11199,9 +11199,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteRouteTableResponse deleteRouteTable( - com.amazon.ec2.client.AmazonEC2Stub.DeleteRouteTable deleteRouteTable86) + com.amazon.ec2.client.AmazonEC2Stub.DeleteRouteTable deleteRouteTable86) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -11301,11 +11301,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteRouteTable( - com.amazon.ec2.client.AmazonEC2Stub.DeleteRouteTable deleteRouteTable86, + com.amazon.ec2.client.AmazonEC2Stub.DeleteRouteTable deleteRouteTable86, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[43].getName()); _operationClient.getOptions().setAction("DeleteRouteTable"); @@ -11433,9 +11433,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.UnmonitorInstancesResponse unmonitorInstances( - com.amazon.ec2.client.AmazonEC2Stub.UnmonitorInstances unmonitorInstances88) + com.amazon.ec2.client.AmazonEC2Stub.UnmonitorInstances unmonitorInstances88) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -11535,11 +11535,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startunmonitorInstances( - com.amazon.ec2.client.AmazonEC2Stub.UnmonitorInstances unmonitorInstances88, + com.amazon.ec2.client.AmazonEC2Stub.UnmonitorInstances unmonitorInstances88, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[44].getName()); _operationClient.getOptions().setAction("UnmonitorInstances"); @@ -11667,9 +11667,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.StartInstancesResponse startInstances( - com.amazon.ec2.client.AmazonEC2Stub.StartInstances startInstances90) + com.amazon.ec2.client.AmazonEC2Stub.StartInstances startInstances90) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -11769,11 +11769,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startstartInstances( - com.amazon.ec2.client.AmazonEC2Stub.StartInstances startInstances90, + com.amazon.ec2.client.AmazonEC2Stub.StartInstances startInstances90, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[45].getName()); _operationClient.getOptions().setAction("StartInstances"); @@ -11900,9 +11900,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ConfirmProductInstanceResponse confirmProductInstance( - com.amazon.ec2.client.AmazonEC2Stub.ConfirmProductInstance confirmProductInstance92) + com.amazon.ec2.client.AmazonEC2Stub.ConfirmProductInstance confirmProductInstance92) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -12003,11 +12003,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startconfirmProductInstance( - com.amazon.ec2.client.AmazonEC2Stub.ConfirmProductInstance confirmProductInstance92, + com.amazon.ec2.client.AmazonEC2Stub.ConfirmProductInstance confirmProductInstance92, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[46].getName()); _operationClient.getOptions().setAction("ConfirmProductInstance"); @@ -12135,9 +12135,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkInterfaceAttributeResponse describeNetworkInterfaceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkInterfaceAttribute describeNetworkInterfaceAttribute94) + com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkInterfaceAttribute describeNetworkInterfaceAttribute94) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -12238,11 +12238,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeNetworkInterfaceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkInterfaceAttribute describeNetworkInterfaceAttribute94, + com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkInterfaceAttribute describeNetworkInterfaceAttribute94, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[47].getName()); _operationClient.getOptions().setAction("DescribeNetworkInterfaceAttribute"); @@ -12370,9 +12370,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.RunInstancesResponse runInstances( - com.amazon.ec2.client.AmazonEC2Stub.RunInstances runInstances96) + com.amazon.ec2.client.AmazonEC2Stub.RunInstances runInstances96) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -12472,11 +12472,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startrunInstances( - com.amazon.ec2.client.AmazonEC2Stub.RunInstances runInstances96, + com.amazon.ec2.client.AmazonEC2Stub.RunInstances runInstances96, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[48].getName()); _operationClient.getOptions().setAction("RunInstances"); @@ -12603,9 +12603,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateReservedInstancesListingResponse createReservedInstancesListing( - com.amazon.ec2.client.AmazonEC2Stub.CreateReservedInstancesListing createReservedInstancesListing98) + com.amazon.ec2.client.AmazonEC2Stub.CreateReservedInstancesListing createReservedInstancesListing98) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -12706,11 +12706,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateReservedInstancesListing( - com.amazon.ec2.client.AmazonEC2Stub.CreateReservedInstancesListing createReservedInstancesListing98, + com.amazon.ec2.client.AmazonEC2Stub.CreateReservedInstancesListing createReservedInstancesListing98, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[49].getName()); _operationClient.getOptions().setAction("CreateReservedInstancesListing"); @@ -12838,9 +12838,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateCustomerGatewayResponse createCustomerGateway( - com.amazon.ec2.client.AmazonEC2Stub.CreateCustomerGateway createCustomerGateway100) + com.amazon.ec2.client.AmazonEC2Stub.CreateCustomerGateway createCustomerGateway100) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -12940,11 +12940,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateCustomerGateway( - com.amazon.ec2.client.AmazonEC2Stub.CreateCustomerGateway createCustomerGateway100, + com.amazon.ec2.client.AmazonEC2Stub.CreateCustomerGateway createCustomerGateway100, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[50].getName()); _operationClient.getOptions().setAction("CreateCustomerGateway"); @@ -13072,9 +13072,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkAclResponse createNetworkAcl( - com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkAcl createNetworkAcl102) + com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkAcl createNetworkAcl102) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -13174,11 +13174,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateNetworkAcl( - com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkAcl createNetworkAcl102, + com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkAcl createNetworkAcl102, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[51].getName()); _operationClient.getOptions().setAction("CreateNetworkAcl"); @@ -13306,9 +13306,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ResetImageAttributeResponse resetImageAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ResetImageAttribute resetImageAttribute104) + com.amazon.ec2.client.AmazonEC2Stub.ResetImageAttribute resetImageAttribute104) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -13408,11 +13408,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startresetImageAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ResetImageAttribute resetImageAttribute104, + com.amazon.ec2.client.AmazonEC2Stub.ResetImageAttribute resetImageAttribute104, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[52].getName()); _operationClient.getOptions().setAction("ResetImageAttribute"); @@ -13540,9 +13540,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ModifyVolumeAttributeResponse modifyVolumeAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ModifyVolumeAttribute modifyVolumeAttribute106) + com.amazon.ec2.client.AmazonEC2Stub.ModifyVolumeAttribute modifyVolumeAttribute106) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -13642,11 +13642,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startmodifyVolumeAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ModifyVolumeAttribute modifyVolumeAttribute106, + com.amazon.ec2.client.AmazonEC2Stub.ModifyVolumeAttribute modifyVolumeAttribute106, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[53].getName()); _operationClient.getOptions().setAction("ModifyVolumeAttribute"); @@ -13774,9 +13774,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstancesResponse describeReservedInstances( - com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstances describeReservedInstances108) + com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstances describeReservedInstances108) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -13877,11 +13877,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeReservedInstances( - com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstances describeReservedInstances108, + com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstances describeReservedInstances108, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[54].getName()); _operationClient.getOptions().setAction("DescribeReservedInstances"); @@ -14009,9 +14009,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ResetSnapshotAttributeResponse resetSnapshotAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ResetSnapshotAttribute resetSnapshotAttribute110) + com.amazon.ec2.client.AmazonEC2Stub.ResetSnapshotAttribute resetSnapshotAttribute110) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -14112,11 +14112,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startresetSnapshotAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ResetSnapshotAttribute resetSnapshotAttribute110, + com.amazon.ec2.client.AmazonEC2Stub.ResetSnapshotAttribute resetSnapshotAttribute110, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[55].getName()); _operationClient.getOptions().setAction("ResetSnapshotAttribute"); @@ -14244,9 +14244,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteVolumeResponse deleteVolume( - com.amazon.ec2.client.AmazonEC2Stub.DeleteVolume deleteVolume112) + com.amazon.ec2.client.AmazonEC2Stub.DeleteVolume deleteVolume112) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -14346,11 +14346,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteVolume( - com.amazon.ec2.client.AmazonEC2Stub.DeleteVolume deleteVolume112, + com.amazon.ec2.client.AmazonEC2Stub.DeleteVolume deleteVolume112, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[56].getName()); _operationClient.getOptions().setAction("DeleteVolume"); @@ -14477,9 +14477,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeAvailabilityZonesResponse describeAvailabilityZones( - com.amazon.ec2.client.AmazonEC2Stub.DescribeAvailabilityZones describeAvailabilityZones114) + com.amazon.ec2.client.AmazonEC2Stub.DescribeAvailabilityZones describeAvailabilityZones114) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -14580,11 +14580,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeAvailabilityZones( - com.amazon.ec2.client.AmazonEC2Stub.DescribeAvailabilityZones describeAvailabilityZones114, + com.amazon.ec2.client.AmazonEC2Stub.DescribeAvailabilityZones describeAvailabilityZones114, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[57].getName()); _operationClient.getOptions().setAction("DescribeAvailabilityZones"); @@ -14712,9 +14712,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateVpnConnectionResponse createVpnConnection( - com.amazon.ec2.client.AmazonEC2Stub.CreateVpnConnection createVpnConnection116) + com.amazon.ec2.client.AmazonEC2Stub.CreateVpnConnection createVpnConnection116) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -14814,11 +14814,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateVpnConnection( - com.amazon.ec2.client.AmazonEC2Stub.CreateVpnConnection createVpnConnection116, + com.amazon.ec2.client.AmazonEC2Stub.CreateVpnConnection createVpnConnection116, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[58].getName()); _operationClient.getOptions().setAction("CreateVpnConnection"); @@ -14946,9 +14946,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CancelBundleTaskResponse cancelBundleTask( - com.amazon.ec2.client.AmazonEC2Stub.CancelBundleTask cancelBundleTask118) + com.amazon.ec2.client.AmazonEC2Stub.CancelBundleTask cancelBundleTask118) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -15048,11 +15048,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcancelBundleTask( - com.amazon.ec2.client.AmazonEC2Stub.CancelBundleTask cancelBundleTask118, + com.amazon.ec2.client.AmazonEC2Stub.CancelBundleTask cancelBundleTask118, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[59].getName()); _operationClient.getOptions().setAction("CancelBundleTask"); @@ -15180,9 +15180,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ReplaceNetworkAclAssociationResponse replaceNetworkAclAssociation( - com.amazon.ec2.client.AmazonEC2Stub.ReplaceNetworkAclAssociation replaceNetworkAclAssociation120) + com.amazon.ec2.client.AmazonEC2Stub.ReplaceNetworkAclAssociation replaceNetworkAclAssociation120) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -15283,11 +15283,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startreplaceNetworkAclAssociation( - com.amazon.ec2.client.AmazonEC2Stub.ReplaceNetworkAclAssociation replaceNetworkAclAssociation120, + com.amazon.ec2.client.AmazonEC2Stub.ReplaceNetworkAclAssociation replaceNetworkAclAssociation120, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[60].getName()); _operationClient.getOptions().setAction("ReplaceNetworkAclAssociation"); @@ -15415,9 +15415,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DetachVpnGatewayResponse detachVpnGateway( - com.amazon.ec2.client.AmazonEC2Stub.DetachVpnGateway detachVpnGateway122) + com.amazon.ec2.client.AmazonEC2Stub.DetachVpnGateway detachVpnGateway122) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -15517,11 +15517,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdetachVpnGateway( - com.amazon.ec2.client.AmazonEC2Stub.DetachVpnGateway detachVpnGateway122, + com.amazon.ec2.client.AmazonEC2Stub.DetachVpnGateway detachVpnGateway122, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[61].getName()); _operationClient.getOptions().setAction("DetachVpnGateway"); @@ -15649,9 +15649,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeSnapshotsResponse describeSnapshots( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSnapshots describeSnapshots124) + com.amazon.ec2.client.AmazonEC2Stub.DescribeSnapshots describeSnapshots124) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -15751,11 +15751,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeSnapshots( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSnapshots describeSnapshots124, + com.amazon.ec2.client.AmazonEC2Stub.DescribeSnapshots describeSnapshots124, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[62].getName()); _operationClient.getOptions().setAction("DescribeSnapshots"); @@ -15883,9 +15883,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteSubnetResponse deleteSubnet( - com.amazon.ec2.client.AmazonEC2Stub.DeleteSubnet deleteSubnet126) + com.amazon.ec2.client.AmazonEC2Stub.DeleteSubnet deleteSubnet126) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -15985,11 +15985,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteSubnet( - com.amazon.ec2.client.AmazonEC2Stub.DeleteSubnet deleteSubnet126, + com.amazon.ec2.client.AmazonEC2Stub.DeleteSubnet deleteSubnet126, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[63].getName()); _operationClient.getOptions().setAction("DeleteSubnet"); @@ -16116,9 +16116,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeBundleTasksResponse describeBundleTasks( - com.amazon.ec2.client.AmazonEC2Stub.DescribeBundleTasks describeBundleTasks128) + com.amazon.ec2.client.AmazonEC2Stub.DescribeBundleTasks describeBundleTasks128) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -16218,11 +16218,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeBundleTasks( - com.amazon.ec2.client.AmazonEC2Stub.DescribeBundleTasks describeBundleTasks128, + com.amazon.ec2.client.AmazonEC2Stub.DescribeBundleTasks describeBundleTasks128, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[64].getName()); _operationClient.getOptions().setAction("DescribeBundleTasks"); @@ -16350,9 +16350,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateKeyPairResponse createKeyPair( - com.amazon.ec2.client.AmazonEC2Stub.CreateKeyPair createKeyPair130) + com.amazon.ec2.client.AmazonEC2Stub.CreateKeyPair createKeyPair130) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -16452,11 +16452,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateKeyPair( - com.amazon.ec2.client.AmazonEC2Stub.CreateKeyPair createKeyPair130, + com.amazon.ec2.client.AmazonEC2Stub.CreateKeyPair createKeyPair130, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[65].getName()); _operationClient.getOptions().setAction("CreateKeyPair"); @@ -16583,9 +16583,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateImageResponse createImage( - com.amazon.ec2.client.AmazonEC2Stub.CreateImage createImage132) + com.amazon.ec2.client.AmazonEC2Stub.CreateImage createImage132) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -16685,11 +16685,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateImage( - com.amazon.ec2.client.AmazonEC2Stub.CreateImage createImage132, + com.amazon.ec2.client.AmazonEC2Stub.CreateImage createImage132, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[66].getName()); _operationClient.getOptions().setAction("CreateImage"); @@ -16816,9 +16816,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.EnableVgwRoutePropagationResponse enableVgwRoutePropagation( - com.amazon.ec2.client.AmazonEC2Stub.EnableVgwRoutePropagation enableVgwRoutePropagation134) + com.amazon.ec2.client.AmazonEC2Stub.EnableVgwRoutePropagation enableVgwRoutePropagation134) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -16919,11 +16919,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startenableVgwRoutePropagation( - com.amazon.ec2.client.AmazonEC2Stub.EnableVgwRoutePropagation enableVgwRoutePropagation134, + com.amazon.ec2.client.AmazonEC2Stub.EnableVgwRoutePropagation enableVgwRoutePropagation134, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[67].getName()); _operationClient.getOptions().setAction("EnableVgwRoutePropagation"); @@ -17051,9 +17051,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.UnassignPrivateIpAddressesResponse unassignPrivateIpAddresses( - com.amazon.ec2.client.AmazonEC2Stub.UnassignPrivateIpAddresses unassignPrivateIpAddresses136) + com.amazon.ec2.client.AmazonEC2Stub.UnassignPrivateIpAddresses unassignPrivateIpAddresses136) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -17154,11 +17154,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startunassignPrivateIpAddresses( - com.amazon.ec2.client.AmazonEC2Stub.UnassignPrivateIpAddresses unassignPrivateIpAddresses136, + com.amazon.ec2.client.AmazonEC2Stub.UnassignPrivateIpAddresses unassignPrivateIpAddresses136, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[68].getName()); _operationClient.getOptions().setAction("UnassignPrivateIpAddresses"); @@ -17286,9 +17286,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeregisterImageResponse deregisterImage( - com.amazon.ec2.client.AmazonEC2Stub.DeregisterImage deregisterImage138) + com.amazon.ec2.client.AmazonEC2Stub.DeregisterImage deregisterImage138) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -17388,11 +17388,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startderegisterImage( - com.amazon.ec2.client.AmazonEC2Stub.DeregisterImage deregisterImage138, + com.amazon.ec2.client.AmazonEC2Stub.DeregisterImage deregisterImage138, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[69].getName()); _operationClient.getOptions().setAction("DeregisterImage"); @@ -17519,9 +17519,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnConnectionRouteResponse deleteVpnConnectionRoute( - com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnConnectionRoute deleteVpnConnectionRoute140) + com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnConnectionRoute deleteVpnConnectionRoute140) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -17622,11 +17622,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteVpnConnectionRoute( - com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnConnectionRoute deleteVpnConnectionRoute140, + com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnConnectionRoute deleteVpnConnectionRoute140, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[70].getName()); _operationClient.getOptions().setAction("DeleteVpnConnectionRoute"); @@ -17754,9 +17754,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ModifyImageAttributeResponse modifyImageAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ModifyImageAttribute modifyImageAttribute142) + com.amazon.ec2.client.AmazonEC2Stub.ModifyImageAttribute modifyImageAttribute142) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -17856,11 +17856,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startmodifyImageAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ModifyImageAttribute modifyImageAttribute142, + com.amazon.ec2.client.AmazonEC2Stub.ModifyImageAttribute modifyImageAttribute142, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[71].getName()); _operationClient.getOptions().setAction("ModifyImageAttribute"); @@ -17988,9 +17988,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CancelConversionTaskResponse cancelConversionTask( - com.amazon.ec2.client.AmazonEC2Stub.CancelConversionTask cancelConversionTask144) + com.amazon.ec2.client.AmazonEC2Stub.CancelConversionTask cancelConversionTask144) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -18090,11 +18090,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcancelConversionTask( - com.amazon.ec2.client.AmazonEC2Stub.CancelConversionTask cancelConversionTask144, + com.amazon.ec2.client.AmazonEC2Stub.CancelConversionTask cancelConversionTask144, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[72].getName()); _operationClient.getOptions().setAction("CancelConversionTask"); @@ -18222,9 +18222,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumesResponse describeVolumes( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumes describeVolumes146) + com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumes describeVolumes146) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -18324,11 +18324,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeVolumes( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumes describeVolumes146, + com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumes describeVolumes146, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[73].getName()); _operationClient.getOptions().setAction("DescribeVolumes"); @@ -18455,9 +18455,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CancelReservedInstancesListingResponse cancelReservedInstancesListing( - com.amazon.ec2.client.AmazonEC2Stub.CancelReservedInstancesListing cancelReservedInstancesListing148) + com.amazon.ec2.client.AmazonEC2Stub.CancelReservedInstancesListing cancelReservedInstancesListing148) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -18558,11 +18558,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcancelReservedInstancesListing( - com.amazon.ec2.client.AmazonEC2Stub.CancelReservedInstancesListing cancelReservedInstancesListing148, + com.amazon.ec2.client.AmazonEC2Stub.CancelReservedInstancesListing cancelReservedInstancesListing148, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[74].getName()); _operationClient.getOptions().setAction("CancelReservedInstancesListing"); @@ -18690,9 +18690,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.GetPasswordDataResponse getPasswordData( - com.amazon.ec2.client.AmazonEC2Stub.GetPasswordData getPasswordData150) + com.amazon.ec2.client.AmazonEC2Stub.GetPasswordData getPasswordData150) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -18792,11 +18792,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startgetPasswordData( - com.amazon.ec2.client.AmazonEC2Stub.GetPasswordData getPasswordData150, + com.amazon.ec2.client.AmazonEC2Stub.GetPasswordData getPasswordData150, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[75].getName()); _operationClient.getOptions().setAction("GetPasswordData"); @@ -18923,9 +18923,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.AllocateAddressResponse allocateAddress( - com.amazon.ec2.client.AmazonEC2Stub.AllocateAddress allocateAddress152) + com.amazon.ec2.client.AmazonEC2Stub.AllocateAddress allocateAddress152) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -19025,11 +19025,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startallocateAddress( - com.amazon.ec2.client.AmazonEC2Stub.AllocateAddress allocateAddress152, + com.amazon.ec2.client.AmazonEC2Stub.AllocateAddress allocateAddress152, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[76].getName()); _operationClient.getOptions().setAction("AllocateAddress"); @@ -19156,9 +19156,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteSecurityGroupResponse deleteSecurityGroup( - com.amazon.ec2.client.AmazonEC2Stub.DeleteSecurityGroup deleteSecurityGroup154) + com.amazon.ec2.client.AmazonEC2Stub.DeleteSecurityGroup deleteSecurityGroup154) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -19258,11 +19258,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteSecurityGroup( - com.amazon.ec2.client.AmazonEC2Stub.DeleteSecurityGroup deleteSecurityGroup154, + com.amazon.ec2.client.AmazonEC2Stub.DeleteSecurityGroup deleteSecurityGroup154, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[77].getName()); _operationClient.getOptions().setAction("DeleteSecurityGroup"); @@ -19390,9 +19390,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeletePlacementGroupResponse deletePlacementGroup( - com.amazon.ec2.client.AmazonEC2Stub.DeletePlacementGroup deletePlacementGroup156) + com.amazon.ec2.client.AmazonEC2Stub.DeletePlacementGroup deletePlacementGroup156) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -19492,11 +19492,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeletePlacementGroup( - com.amazon.ec2.client.AmazonEC2Stub.DeletePlacementGroup deletePlacementGroup156, + com.amazon.ec2.client.AmazonEC2Stub.DeletePlacementGroup deletePlacementGroup156, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[78].getName()); _operationClient.getOptions().setAction("DeletePlacementGroup"); @@ -19624,9 +19624,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DisassociateAddressResponse disassociateAddress( - com.amazon.ec2.client.AmazonEC2Stub.DisassociateAddress disassociateAddress158) + com.amazon.ec2.client.AmazonEC2Stub.DisassociateAddress disassociateAddress158) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -19726,11 +19726,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdisassociateAddress( - com.amazon.ec2.client.AmazonEC2Stub.DisassociateAddress disassociateAddress158, + com.amazon.ec2.client.AmazonEC2Stub.DisassociateAddress disassociateAddress158, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[79].getName()); _operationClient.getOptions().setAction("DisassociateAddress"); @@ -19858,9 +19858,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteDhcpOptionsResponse deleteDhcpOptions( - com.amazon.ec2.client.AmazonEC2Stub.DeleteDhcpOptions deleteDhcpOptions160) + com.amazon.ec2.client.AmazonEC2Stub.DeleteDhcpOptions deleteDhcpOptions160) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -19960,11 +19960,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteDhcpOptions( - com.amazon.ec2.client.AmazonEC2Stub.DeleteDhcpOptions deleteDhcpOptions160, + com.amazon.ec2.client.AmazonEC2Stub.DeleteDhcpOptions deleteDhcpOptions160, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[80].getName()); _operationClient.getOptions().setAction("DeleteDhcpOptions"); @@ -20092,9 +20092,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotDatafeedSubscriptionResponse describeSpotDatafeedSubscription( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotDatafeedSubscription describeSpotDatafeedSubscription162) + com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotDatafeedSubscription describeSpotDatafeedSubscription162) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -20195,11 +20195,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeSpotDatafeedSubscription( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotDatafeedSubscription describeSpotDatafeedSubscription162, + com.amazon.ec2.client.AmazonEC2Stub.DescribeSpotDatafeedSubscription describeSpotDatafeedSubscription162, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[81].getName()); _operationClient.getOptions().setAction("DescribeSpotDatafeedSubscription"); @@ -20327,9 +20327,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkAclsResponse describeNetworkAcls( - com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkAcls describeNetworkAcls164) + com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkAcls describeNetworkAcls164) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -20429,11 +20429,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeNetworkAcls( - com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkAcls describeNetworkAcls164, + com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkAcls describeNetworkAcls164, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[82].getName()); _operationClient.getOptions().setAction("DescribeNetworkAcls"); @@ -20561,9 +20561,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.EnableVolumeIOResponse enableVolumeIO( - com.amazon.ec2.client.AmazonEC2Stub.EnableVolumeIO enableVolumeIO166) + com.amazon.ec2.client.AmazonEC2Stub.EnableVolumeIO enableVolumeIO166) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -20663,11 +20663,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startenableVolumeIO( - com.amazon.ec2.client.AmazonEC2Stub.EnableVolumeIO enableVolumeIO166, + com.amazon.ec2.client.AmazonEC2Stub.EnableVolumeIO enableVolumeIO166, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[83].getName()); _operationClient.getOptions().setAction("EnableVolumeIO"); @@ -20794,9 +20794,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.AttachVpnGatewayResponse attachVpnGateway( - com.amazon.ec2.client.AmazonEC2Stub.AttachVpnGateway attachVpnGateway168) + com.amazon.ec2.client.AmazonEC2Stub.AttachVpnGateway attachVpnGateway168) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -20896,11 +20896,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startattachVpnGateway( - com.amazon.ec2.client.AmazonEC2Stub.AttachVpnGateway attachVpnGateway168, + com.amazon.ec2.client.AmazonEC2Stub.AttachVpnGateway attachVpnGateway168, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[84].getName()); _operationClient.getOptions().setAction("AttachVpnGateway"); @@ -21028,9 +21028,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeInternetGatewaysResponse describeInternetGateways( - com.amazon.ec2.client.AmazonEC2Stub.DescribeInternetGateways describeInternetGateways170) + com.amazon.ec2.client.AmazonEC2Stub.DescribeInternetGateways describeInternetGateways170) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -21131,11 +21131,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeInternetGateways( - com.amazon.ec2.client.AmazonEC2Stub.DescribeInternetGateways describeInternetGateways170, + com.amazon.ec2.client.AmazonEC2Stub.DescribeInternetGateways describeInternetGateways170, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[85].getName()); _operationClient.getOptions().setAction("DescribeInternetGateways"); @@ -21263,9 +21263,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeDhcpOptionsResponse describeDhcpOptions( - com.amazon.ec2.client.AmazonEC2Stub.DescribeDhcpOptions describeDhcpOptions172) + com.amazon.ec2.client.AmazonEC2Stub.DescribeDhcpOptions describeDhcpOptions172) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -21365,11 +21365,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeDhcpOptions( - com.amazon.ec2.client.AmazonEC2Stub.DescribeDhcpOptions describeDhcpOptions172, + com.amazon.ec2.client.AmazonEC2Stub.DescribeDhcpOptions describeDhcpOptions172, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[86].getName()); _operationClient.getOptions().setAction("DescribeDhcpOptions"); @@ -21497,9 +21497,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateSpotDatafeedSubscriptionResponse createSpotDatafeedSubscription( - com.amazon.ec2.client.AmazonEC2Stub.CreateSpotDatafeedSubscription createSpotDatafeedSubscription174) + com.amazon.ec2.client.AmazonEC2Stub.CreateSpotDatafeedSubscription createSpotDatafeedSubscription174) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -21600,11 +21600,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateSpotDatafeedSubscription( - com.amazon.ec2.client.AmazonEC2Stub.CreateSpotDatafeedSubscription createSpotDatafeedSubscription174, + com.amazon.ec2.client.AmazonEC2Stub.CreateSpotDatafeedSubscription createSpotDatafeedSubscription174, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[87].getName()); _operationClient.getOptions().setAction("CreateSpotDatafeedSubscription"); @@ -21732,9 +21732,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstancesListingsResponse describeReservedInstancesListings( - com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstancesListings describeReservedInstancesListings176) + com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstancesListings describeReservedInstancesListings176) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -21835,11 +21835,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeReservedInstancesListings( - com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstancesListings describeReservedInstancesListings176, + com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstancesListings describeReservedInstancesListings176, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[88].getName()); _operationClient.getOptions().setAction("DescribeReservedInstancesListings"); @@ -21967,9 +21967,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeInstanceStatusResponse describeInstanceStatus( - com.amazon.ec2.client.AmazonEC2Stub.DescribeInstanceStatus describeInstanceStatus178) + com.amazon.ec2.client.AmazonEC2Stub.DescribeInstanceStatus describeInstanceStatus178) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -22070,11 +22070,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeInstanceStatus( - com.amazon.ec2.client.AmazonEC2Stub.DescribeInstanceStatus describeInstanceStatus178, + com.amazon.ec2.client.AmazonEC2Stub.DescribeInstanceStatus describeInstanceStatus178, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[89].getName()); _operationClient.getOptions().setAction("DescribeInstanceStatus"); @@ -22202,9 +22202,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ModifyNetworkInterfaceAttributeResponse modifyNetworkInterfaceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ModifyNetworkInterfaceAttribute modifyNetworkInterfaceAttribute180) + com.amazon.ec2.client.AmazonEC2Stub.ModifyNetworkInterfaceAttribute modifyNetworkInterfaceAttribute180) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -22305,11 +22305,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startmodifyNetworkInterfaceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ModifyNetworkInterfaceAttribute modifyNetworkInterfaceAttribute180, + com.amazon.ec2.client.AmazonEC2Stub.ModifyNetworkInterfaceAttribute modifyNetworkInterfaceAttribute180, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[90].getName()); _operationClient.getOptions().setAction("ModifyNetworkInterfaceAttribute"); @@ -22437,9 +22437,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DisableVgwRoutePropagationResponse disableVgwRoutePropagation( - com.amazon.ec2.client.AmazonEC2Stub.DisableVgwRoutePropagation disableVgwRoutePropagation182) + com.amazon.ec2.client.AmazonEC2Stub.DisableVgwRoutePropagation disableVgwRoutePropagation182) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -22540,11 +22540,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdisableVgwRoutePropagation( - com.amazon.ec2.client.AmazonEC2Stub.DisableVgwRoutePropagation disableVgwRoutePropagation182, + com.amazon.ec2.client.AmazonEC2Stub.DisableVgwRoutePropagation disableVgwRoutePropagation182, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[91].getName()); _operationClient.getOptions().setAction("DisableVgwRoutePropagation"); @@ -22672,9 +22672,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumeStatusResponse describeVolumeStatus( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumeStatus describeVolumeStatus184) + com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumeStatus describeVolumeStatus184) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -22774,11 +22774,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeVolumeStatus( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumeStatus describeVolumeStatus184, + com.amazon.ec2.client.AmazonEC2Stub.DescribeVolumeStatus describeVolumeStatus184, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[92].getName()); _operationClient.getOptions().setAction("DescribeVolumeStatus"); @@ -22906,9 +22906,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DetachNetworkInterfaceResponse detachNetworkInterface( - com.amazon.ec2.client.AmazonEC2Stub.DetachNetworkInterface detachNetworkInterface186) + com.amazon.ec2.client.AmazonEC2Stub.DetachNetworkInterface detachNetworkInterface186) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -23009,11 +23009,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdetachNetworkInterface( - com.amazon.ec2.client.AmazonEC2Stub.DetachNetworkInterface detachNetworkInterface186, + com.amazon.ec2.client.AmazonEC2Stub.DetachNetworkInterface detachNetworkInterface186, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[93].getName()); _operationClient.getOptions().setAction("DetachNetworkInterface"); @@ -23141,9 +23141,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeSecurityGroupsResponse describeSecurityGroups( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSecurityGroups describeSecurityGroups188) + com.amazon.ec2.client.AmazonEC2Stub.DescribeSecurityGroups describeSecurityGroups188) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -23244,11 +23244,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeSecurityGroups( - com.amazon.ec2.client.AmazonEC2Stub.DescribeSecurityGroups describeSecurityGroups188, + com.amazon.ec2.client.AmazonEC2Stub.DescribeSecurityGroups describeSecurityGroups188, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[94].getName()); _operationClient.getOptions().setAction("DescribeSecurityGroups"); @@ -23376,9 +23376,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeInstancesResponse describeInstances( - com.amazon.ec2.client.AmazonEC2Stub.DescribeInstances describeInstances190) + com.amazon.ec2.client.AmazonEC2Stub.DescribeInstances describeInstances190) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -23478,11 +23478,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeInstances( - com.amazon.ec2.client.AmazonEC2Stub.DescribeInstances describeInstances190, + com.amazon.ec2.client.AmazonEC2Stub.DescribeInstances describeInstances190, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[95].getName()); _operationClient.getOptions().setAction("DescribeInstances"); @@ -23610,9 +23610,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkInterfacesResponse describeNetworkInterfaces( - com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkInterfaces describeNetworkInterfaces192) + com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkInterfaces describeNetworkInterfaces192) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -23713,11 +23713,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeNetworkInterfaces( - com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkInterfaces describeNetworkInterfaces192, + com.amazon.ec2.client.AmazonEC2Stub.DescribeNetworkInterfaces describeNetworkInterfaces192, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[96].getName()); _operationClient.getOptions().setAction("DescribeNetworkInterfaces"); @@ -23845,9 +23845,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteKeyPairResponse deleteKeyPair( - com.amazon.ec2.client.AmazonEC2Stub.DeleteKeyPair deleteKeyPair194) + com.amazon.ec2.client.AmazonEC2Stub.DeleteKeyPair deleteKeyPair194) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -23947,11 +23947,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteKeyPair( - com.amazon.ec2.client.AmazonEC2Stub.DeleteKeyPair deleteKeyPair194, + com.amazon.ec2.client.AmazonEC2Stub.DeleteKeyPair deleteKeyPair194, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[97].getName()); _operationClient.getOptions().setAction("DeleteKeyPair"); @@ -24078,9 +24078,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateSnapshotResponse createSnapshot( - com.amazon.ec2.client.AmazonEC2Stub.CreateSnapshot createSnapshot196) + com.amazon.ec2.client.AmazonEC2Stub.CreateSnapshot createSnapshot196) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -24180,11 +24180,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateSnapshot( - com.amazon.ec2.client.AmazonEC2Stub.CreateSnapshot createSnapshot196, + com.amazon.ec2.client.AmazonEC2Stub.CreateSnapshot createSnapshot196, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[98].getName()); _operationClient.getOptions().setAction("CreateSnapshot"); @@ -24311,9 +24311,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeVpnGatewaysResponse describeVpnGateways( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVpnGateways describeVpnGateways198) + com.amazon.ec2.client.AmazonEC2Stub.DescribeVpnGateways describeVpnGateways198) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -24413,11 +24413,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeVpnGateways( - com.amazon.ec2.client.AmazonEC2Stub.DescribeVpnGateways describeVpnGateways198, + com.amazon.ec2.client.AmazonEC2Stub.DescribeVpnGateways describeVpnGateways198, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[99].getName()); _operationClient.getOptions().setAction("DescribeVpnGateways"); @@ -24545,9 +24545,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteTagsResponse deleteTags( - com.amazon.ec2.client.AmazonEC2Stub.DeleteTags deleteTags200) + com.amazon.ec2.client.AmazonEC2Stub.DeleteTags deleteTags200) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -24647,11 +24647,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteTags( - com.amazon.ec2.client.AmazonEC2Stub.DeleteTags deleteTags200, + com.amazon.ec2.client.AmazonEC2Stub.DeleteTags deleteTags200, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[100].getName()); _operationClient.getOptions().setAction("DeleteTags"); @@ -24778,9 +24778,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteSnapshotResponse deleteSnapshot( - com.amazon.ec2.client.AmazonEC2Stub.DeleteSnapshot deleteSnapshot202) + com.amazon.ec2.client.AmazonEC2Stub.DeleteSnapshot deleteSnapshot202) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -24880,11 +24880,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteSnapshot( - com.amazon.ec2.client.AmazonEC2Stub.DeleteSnapshot deleteSnapshot202, + com.amazon.ec2.client.AmazonEC2Stub.DeleteSnapshot deleteSnapshot202, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[101].getName()); _operationClient.getOptions().setAction("DeleteSnapshot"); @@ -25011,9 +25011,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteCustomerGatewayResponse deleteCustomerGateway( - com.amazon.ec2.client.AmazonEC2Stub.DeleteCustomerGateway deleteCustomerGateway204) + com.amazon.ec2.client.AmazonEC2Stub.DeleteCustomerGateway deleteCustomerGateway204) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -25113,11 +25113,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteCustomerGateway( - com.amazon.ec2.client.AmazonEC2Stub.DeleteCustomerGateway deleteCustomerGateway204, + com.amazon.ec2.client.AmazonEC2Stub.DeleteCustomerGateway deleteCustomerGateway204, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[102].getName()); _operationClient.getOptions().setAction("DeleteCustomerGateway"); @@ -25245,9 +25245,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateVolumeResponse createVolume( - com.amazon.ec2.client.AmazonEC2Stub.CreateVolume createVolume206) + com.amazon.ec2.client.AmazonEC2Stub.CreateVolume createVolume206) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -25347,11 +25347,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateVolume( - com.amazon.ec2.client.AmazonEC2Stub.CreateVolume createVolume206, + com.amazon.ec2.client.AmazonEC2Stub.CreateVolume createVolume206, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[103].getName()); _operationClient.getOptions().setAction("CreateVolume"); @@ -25478,9 +25478,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CancelExportTaskResponse cancelExportTask( - com.amazon.ec2.client.AmazonEC2Stub.CancelExportTask cancelExportTask208) + com.amazon.ec2.client.AmazonEC2Stub.CancelExportTask cancelExportTask208) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -25580,11 +25580,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcancelExportTask( - com.amazon.ec2.client.AmazonEC2Stub.CancelExportTask cancelExportTask208, + com.amazon.ec2.client.AmazonEC2Stub.CancelExportTask cancelExportTask208, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[104].getName()); _operationClient.getOptions().setAction("CancelExportTask"); @@ -25712,9 +25712,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.RegisterImageResponse registerImage( - com.amazon.ec2.client.AmazonEC2Stub.RegisterImage registerImage210) + com.amazon.ec2.client.AmazonEC2Stub.RegisterImage registerImage210) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -25814,11 +25814,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startregisterImage( - com.amazon.ec2.client.AmazonEC2Stub.RegisterImage registerImage210, + com.amazon.ec2.client.AmazonEC2Stub.RegisterImage registerImage210, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[105].getName()); _operationClient.getOptions().setAction("RegisterImage"); @@ -25945,9 +25945,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DetachVolumeResponse detachVolume( - com.amazon.ec2.client.AmazonEC2Stub.DetachVolume detachVolume212) + com.amazon.ec2.client.AmazonEC2Stub.DetachVolume detachVolume212) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -26047,11 +26047,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdetachVolume( - com.amazon.ec2.client.AmazonEC2Stub.DetachVolume detachVolume212, + com.amazon.ec2.client.AmazonEC2Stub.DetachVolume detachVolume212, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[106].getName()); _operationClient.getOptions().setAction("DetachVolume"); @@ -26178,9 +26178,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.StopInstancesResponse stopInstances( - com.amazon.ec2.client.AmazonEC2Stub.StopInstances stopInstances214) + com.amazon.ec2.client.AmazonEC2Stub.StopInstances stopInstances214) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -26280,11 +26280,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startstopInstances( - com.amazon.ec2.client.AmazonEC2Stub.StopInstances stopInstances214, + com.amazon.ec2.client.AmazonEC2Stub.StopInstances stopInstances214, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[107].getName()); _operationClient.getOptions().setAction("StopInstances"); @@ -26411,9 +26411,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateRouteResponse createRoute( - com.amazon.ec2.client.AmazonEC2Stub.CreateRoute createRoute216) + com.amazon.ec2.client.AmazonEC2Stub.CreateRoute createRoute216) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -26513,11 +26513,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateRoute( - com.amazon.ec2.client.AmazonEC2Stub.CreateRoute createRoute216, + com.amazon.ec2.client.AmazonEC2Stub.CreateRoute createRoute216, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[108].getName()); _operationClient.getOptions().setAction("CreateRoute"); @@ -26644,9 +26644,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ReleaseAddressResponse releaseAddress( - com.amazon.ec2.client.AmazonEC2Stub.ReleaseAddress releaseAddress218) + com.amazon.ec2.client.AmazonEC2Stub.ReleaseAddress releaseAddress218) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -26746,11 +26746,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startreleaseAddress( - com.amazon.ec2.client.AmazonEC2Stub.ReleaseAddress releaseAddress218, + com.amazon.ec2.client.AmazonEC2Stub.ReleaseAddress releaseAddress218, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[109].getName()); _operationClient.getOptions().setAction("ReleaseAddress"); @@ -26877,9 +26877,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeRouteTablesResponse describeRouteTables( - com.amazon.ec2.client.AmazonEC2Stub.DescribeRouteTables describeRouteTables220) + com.amazon.ec2.client.AmazonEC2Stub.DescribeRouteTables describeRouteTables220) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -26979,11 +26979,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeRouteTables( - com.amazon.ec2.client.AmazonEC2Stub.DescribeRouteTables describeRouteTables220, + com.amazon.ec2.client.AmazonEC2Stub.DescribeRouteTables describeRouteTables220, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[110].getName()); _operationClient.getOptions().setAction("DescribeRouteTables"); @@ -27111,9 +27111,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeCustomerGatewaysResponse describeCustomerGateways( - com.amazon.ec2.client.AmazonEC2Stub.DescribeCustomerGateways describeCustomerGateways222) + com.amazon.ec2.client.AmazonEC2Stub.DescribeCustomerGateways describeCustomerGateways222) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -27214,11 +27214,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeCustomerGateways( - com.amazon.ec2.client.AmazonEC2Stub.DescribeCustomerGateways describeCustomerGateways222, + com.amazon.ec2.client.AmazonEC2Stub.DescribeCustomerGateways describeCustomerGateways222, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[111].getName()); _operationClient.getOptions().setAction("DescribeCustomerGateways"); @@ -27346,9 +27346,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkAclResponse deleteNetworkAcl( - com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkAcl deleteNetworkAcl224) + com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkAcl deleteNetworkAcl224) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -27448,11 +27448,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteNetworkAcl( - com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkAcl deleteNetworkAcl224, + com.amazon.ec2.client.AmazonEC2Stub.DeleteNetworkAcl deleteNetworkAcl224, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[112].getName()); _operationClient.getOptions().setAction("DeleteNetworkAcl"); @@ -27580,9 +27580,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteRouteResponse deleteRoute( - com.amazon.ec2.client.AmazonEC2Stub.DeleteRoute deleteRoute226) + com.amazon.ec2.client.AmazonEC2Stub.DeleteRoute deleteRoute226) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -27682,11 +27682,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteRoute( - com.amazon.ec2.client.AmazonEC2Stub.DeleteRoute deleteRoute226, + com.amazon.ec2.client.AmazonEC2Stub.DeleteRoute deleteRoute226, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[113].getName()); _operationClient.getOptions().setAction("DeleteRoute"); @@ -27813,9 +27813,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.RebootInstancesResponse rebootInstances( - com.amazon.ec2.client.AmazonEC2Stub.RebootInstances rebootInstances228) + com.amazon.ec2.client.AmazonEC2Stub.RebootInstances rebootInstances228) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -27915,11 +27915,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startrebootInstances( - com.amazon.ec2.client.AmazonEC2Stub.RebootInstances rebootInstances228, + com.amazon.ec2.client.AmazonEC2Stub.RebootInstances rebootInstances228, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[114].getName()); _operationClient.getOptions().setAction("RebootInstances"); @@ -28046,9 +28046,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ModifyInstanceAttributeResponse modifyInstanceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ModifyInstanceAttribute modifyInstanceAttribute230) + com.amazon.ec2.client.AmazonEC2Stub.ModifyInstanceAttribute modifyInstanceAttribute230) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -28149,11 +28149,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startmodifyInstanceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.ModifyInstanceAttribute modifyInstanceAttribute230, + com.amazon.ec2.client.AmazonEC2Stub.ModifyInstanceAttribute modifyInstanceAttribute230, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[115].getName()); _operationClient.getOptions().setAction("ModifyInstanceAttribute"); @@ -28281,9 +28281,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.TerminateInstancesResponse terminateInstances( - com.amazon.ec2.client.AmazonEC2Stub.TerminateInstances terminateInstances232) + com.amazon.ec2.client.AmazonEC2Stub.TerminateInstances terminateInstances232) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -28383,11 +28383,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startterminateInstances( - com.amazon.ec2.client.AmazonEC2Stub.TerminateInstances terminateInstances232, + com.amazon.ec2.client.AmazonEC2Stub.TerminateInstances terminateInstances232, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[116].getName()); _operationClient.getOptions().setAction("TerminateInstances"); @@ -28515,9 +28515,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateVpnConnectionRouteResponse createVpnConnectionRoute( - com.amazon.ec2.client.AmazonEC2Stub.CreateVpnConnectionRoute createVpnConnectionRoute234) + com.amazon.ec2.client.AmazonEC2Stub.CreateVpnConnectionRoute createVpnConnectionRoute234) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -28618,11 +28618,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateVpnConnectionRoute( - com.amazon.ec2.client.AmazonEC2Stub.CreateVpnConnectionRoute createVpnConnectionRoute234, + com.amazon.ec2.client.AmazonEC2Stub.CreateVpnConnectionRoute createVpnConnectionRoute234, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[117].getName()); _operationClient.getOptions().setAction("CreateVpnConnectionRoute"); @@ -28750,9 +28750,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeConversionTasksResponse describeConversionTasks( - com.amazon.ec2.client.AmazonEC2Stub.DescribeConversionTasks describeConversionTasks236) + com.amazon.ec2.client.AmazonEC2Stub.DescribeConversionTasks describeConversionTasks236) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -28853,11 +28853,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeConversionTasks( - com.amazon.ec2.client.AmazonEC2Stub.DescribeConversionTasks describeConversionTasks236, + com.amazon.ec2.client.AmazonEC2Stub.DescribeConversionTasks describeConversionTasks236, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[118].getName()); _operationClient.getOptions().setAction("DescribeConversionTasks"); @@ -28985,9 +28985,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeAddressesResponse describeAddresses( - com.amazon.ec2.client.AmazonEC2Stub.DescribeAddresses describeAddresses238) + com.amazon.ec2.client.AmazonEC2Stub.DescribeAddresses describeAddresses238) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -29087,11 +29087,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeAddresses( - com.amazon.ec2.client.AmazonEC2Stub.DescribeAddresses describeAddresses238, + com.amazon.ec2.client.AmazonEC2Stub.DescribeAddresses describeAddresses238, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[119].getName()); _operationClient.getOptions().setAction("DescribeAddresses"); @@ -29219,9 +29219,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeInstanceAttributeResponse describeInstanceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.DescribeInstanceAttribute describeInstanceAttribute240) + com.amazon.ec2.client.AmazonEC2Stub.DescribeInstanceAttribute describeInstanceAttribute240) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -29322,11 +29322,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeInstanceAttribute( - com.amazon.ec2.client.AmazonEC2Stub.DescribeInstanceAttribute describeInstanceAttribute240, + com.amazon.ec2.client.AmazonEC2Stub.DescribeInstanceAttribute describeInstanceAttribute240, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[120].getName()); _operationClient.getOptions().setAction("DescribeInstanceAttribute"); @@ -29454,9 +29454,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.AttachInternetGatewayResponse attachInternetGateway( - com.amazon.ec2.client.AmazonEC2Stub.AttachInternetGateway attachInternetGateway242) + com.amazon.ec2.client.AmazonEC2Stub.AttachInternetGateway attachInternetGateway242) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -29556,11 +29556,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startattachInternetGateway( - com.amazon.ec2.client.AmazonEC2Stub.AttachInternetGateway attachInternetGateway242, + com.amazon.ec2.client.AmazonEC2Stub.AttachInternetGateway attachInternetGateway242, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[121].getName()); _operationClient.getOptions().setAction("AttachInternetGateway"); @@ -29688,9 +29688,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateVpcResponse createVpc( - com.amazon.ec2.client.AmazonEC2Stub.CreateVpc createVpc244) + com.amazon.ec2.client.AmazonEC2Stub.CreateVpc createVpc244) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -29790,11 +29790,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateVpc( - com.amazon.ec2.client.AmazonEC2Stub.CreateVpc createVpc244, + com.amazon.ec2.client.AmazonEC2Stub.CreateVpc createVpc244, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[122].getName()); _operationClient.getOptions().setAction("CreateVpc"); @@ -29921,9 +29921,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ReplaceRouteTableAssociationResponse replaceRouteTableAssociation( - com.amazon.ec2.client.AmazonEC2Stub.ReplaceRouteTableAssociation replaceRouteTableAssociation246) + com.amazon.ec2.client.AmazonEC2Stub.ReplaceRouteTableAssociation replaceRouteTableAssociation246) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -30024,11 +30024,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startreplaceRouteTableAssociation( - com.amazon.ec2.client.AmazonEC2Stub.ReplaceRouteTableAssociation replaceRouteTableAssociation246, + com.amazon.ec2.client.AmazonEC2Stub.ReplaceRouteTableAssociation replaceRouteTableAssociation246, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[123].getName()); _operationClient.getOptions().setAction("ReplaceRouteTableAssociation"); @@ -30156,9 +30156,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.AssociateRouteTableResponse associateRouteTable( - com.amazon.ec2.client.AmazonEC2Stub.AssociateRouteTable associateRouteTable248) + com.amazon.ec2.client.AmazonEC2Stub.AssociateRouteTable associateRouteTable248) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -30258,11 +30258,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startassociateRouteTable( - com.amazon.ec2.client.AmazonEC2Stub.AssociateRouteTable associateRouteTable248, + com.amazon.ec2.client.AmazonEC2Stub.AssociateRouteTable associateRouteTable248, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[124].getName()); _operationClient.getOptions().setAction("AssociateRouteTable"); @@ -30390,9 +30390,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DetachInternetGatewayResponse detachInternetGateway( - com.amazon.ec2.client.AmazonEC2Stub.DetachInternetGateway detachInternetGateway250) + com.amazon.ec2.client.AmazonEC2Stub.DetachInternetGateway detachInternetGateway250) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -30492,11 +30492,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdetachInternetGateway( - com.amazon.ec2.client.AmazonEC2Stub.DetachInternetGateway detachInternetGateway250, + com.amazon.ec2.client.AmazonEC2Stub.DetachInternetGateway detachInternetGateway250, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[125].getName()); _operationClient.getOptions().setAction("DetachInternetGateway"); @@ -30624,9 +30624,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.PurchaseReservedInstancesOfferingResponse purchaseReservedInstancesOffering( - com.amazon.ec2.client.AmazonEC2Stub.PurchaseReservedInstancesOffering purchaseReservedInstancesOffering252) + com.amazon.ec2.client.AmazonEC2Stub.PurchaseReservedInstancesOffering purchaseReservedInstancesOffering252) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -30727,11 +30727,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startpurchaseReservedInstancesOffering( - com.amazon.ec2.client.AmazonEC2Stub.PurchaseReservedInstancesOffering purchaseReservedInstancesOffering252, + com.amazon.ec2.client.AmazonEC2Stub.PurchaseReservedInstancesOffering purchaseReservedInstancesOffering252, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[126].getName()); _operationClient.getOptions().setAction("PurchaseReservedInstancesOffering"); @@ -30859,9 +30859,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ImportVolumeResponse importVolume( - com.amazon.ec2.client.AmazonEC2Stub.ImportVolume importVolume254) + com.amazon.ec2.client.AmazonEC2Stub.ImportVolume importVolume254) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -30961,11 +30961,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startimportVolume( - com.amazon.ec2.client.AmazonEC2Stub.ImportVolume importVolume254, + com.amazon.ec2.client.AmazonEC2Stub.ImportVolume importVolume254, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[127].getName()); _operationClient.getOptions().setAction("ImportVolume"); @@ -31092,9 +31092,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeExportTasksResponse describeExportTasks( - com.amazon.ec2.client.AmazonEC2Stub.DescribeExportTasks describeExportTasks256) + com.amazon.ec2.client.AmazonEC2Stub.DescribeExportTasks describeExportTasks256) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -31194,11 +31194,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeExportTasks( - com.amazon.ec2.client.AmazonEC2Stub.DescribeExportTasks describeExportTasks256, + com.amazon.ec2.client.AmazonEC2Stub.DescribeExportTasks describeExportTasks256, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[128].getName()); _operationClient.getOptions().setAction("DescribeExportTasks"); @@ -31326,9 +31326,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateInstanceExportTaskResponse createInstanceExportTask( - com.amazon.ec2.client.AmazonEC2Stub.CreateInstanceExportTask createInstanceExportTask258) + com.amazon.ec2.client.AmazonEC2Stub.CreateInstanceExportTask createInstanceExportTask258) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -31429,11 +31429,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateInstanceExportTask( - com.amazon.ec2.client.AmazonEC2Stub.CreateInstanceExportTask createInstanceExportTask258, + com.amazon.ec2.client.AmazonEC2Stub.CreateInstanceExportTask createInstanceExportTask258, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[129].getName()); _operationClient.getOptions().setAction("CreateInstanceExportTask"); @@ -31561,9 +31561,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.AssignPrivateIpAddressesResponse assignPrivateIpAddresses( - com.amazon.ec2.client.AmazonEC2Stub.AssignPrivateIpAddresses assignPrivateIpAddresses260) + com.amazon.ec2.client.AmazonEC2Stub.AssignPrivateIpAddresses assignPrivateIpAddresses260) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -31664,11 +31664,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startassignPrivateIpAddresses( - com.amazon.ec2.client.AmazonEC2Stub.AssignPrivateIpAddresses assignPrivateIpAddresses260, + com.amazon.ec2.client.AmazonEC2Stub.AssignPrivateIpAddresses assignPrivateIpAddresses260, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[130].getName()); _operationClient.getOptions().setAction("AssignPrivateIpAddresses"); @@ -31796,9 +31796,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ReportInstanceStatusResponse reportInstanceStatus( - com.amazon.ec2.client.AmazonEC2Stub.ReportInstanceStatus reportInstanceStatus262) + com.amazon.ec2.client.AmazonEC2Stub.ReportInstanceStatus reportInstanceStatus262) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -31898,11 +31898,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startreportInstanceStatus( - com.amazon.ec2.client.AmazonEC2Stub.ReportInstanceStatus reportInstanceStatus262, + com.amazon.ec2.client.AmazonEC2Stub.ReportInstanceStatus reportInstanceStatus262, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[131].getName()); _operationClient.getOptions().setAction("ReportInstanceStatus"); @@ -32030,9 +32030,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstancesOfferingsResponse describeReservedInstancesOfferings( - com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstancesOfferings describeReservedInstancesOfferings264) + com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstancesOfferings describeReservedInstancesOfferings264) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -32133,11 +32133,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeReservedInstancesOfferings( - com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstancesOfferings describeReservedInstancesOfferings264, + com.amazon.ec2.client.AmazonEC2Stub.DescribeReservedInstancesOfferings describeReservedInstancesOfferings264, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[132].getName()); _operationClient.getOptions().setAction("DescribeReservedInstancesOfferings"); @@ -32265,9 +32265,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnConnectionResponse deleteVpnConnection( - com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnConnection deleteVpnConnection266) + com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnConnection deleteVpnConnection266) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -32367,11 +32367,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteVpnConnection( - com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnConnection deleteVpnConnection266, + com.amazon.ec2.client.AmazonEC2Stub.DeleteVpnConnection deleteVpnConnection266, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[133].getName()); _operationClient.getOptions().setAction("DeleteVpnConnection"); @@ -32499,9 +32499,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteInternetGatewayResponse deleteInternetGateway( - com.amazon.ec2.client.AmazonEC2Stub.DeleteInternetGateway deleteInternetGateway268) + com.amazon.ec2.client.AmazonEC2Stub.DeleteInternetGateway deleteInternetGateway268) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -32601,11 +32601,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteInternetGateway( - com.amazon.ec2.client.AmazonEC2Stub.DeleteInternetGateway deleteInternetGateway268, + com.amazon.ec2.client.AmazonEC2Stub.DeleteInternetGateway deleteInternetGateway268, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[134].getName()); _operationClient.getOptions().setAction("DeleteInternetGateway"); @@ -32733,9 +32733,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DeleteSpotDatafeedSubscriptionResponse deleteSpotDatafeedSubscription( - com.amazon.ec2.client.AmazonEC2Stub.DeleteSpotDatafeedSubscription deleteSpotDatafeedSubscription270) + com.amazon.ec2.client.AmazonEC2Stub.DeleteSpotDatafeedSubscription deleteSpotDatafeedSubscription270) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -32836,11 +32836,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdeleteSpotDatafeedSubscription( - com.amazon.ec2.client.AmazonEC2Stub.DeleteSpotDatafeedSubscription deleteSpotDatafeedSubscription270, + com.amazon.ec2.client.AmazonEC2Stub.DeleteSpotDatafeedSubscription deleteSpotDatafeedSubscription270, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[135].getName()); _operationClient.getOptions().setAction("DeleteSpotDatafeedSubscription"); @@ -32968,9 +32968,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.AttachNetworkInterfaceResponse attachNetworkInterface( - com.amazon.ec2.client.AmazonEC2Stub.AttachNetworkInterface attachNetworkInterface272) + com.amazon.ec2.client.AmazonEC2Stub.AttachNetworkInterface attachNetworkInterface272) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -33071,11 +33071,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startattachNetworkInterface( - com.amazon.ec2.client.AmazonEC2Stub.AttachNetworkInterface attachNetworkInterface272, + com.amazon.ec2.client.AmazonEC2Stub.AttachNetworkInterface attachNetworkInterface272, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[136].getName()); _operationClient.getOptions().setAction("AttachNetworkInterface"); @@ -33203,9 +33203,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkInterfaceResponse createNetworkInterface( - com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkInterface createNetworkInterface274) + com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkInterface createNetworkInterface274) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -33306,11 +33306,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startcreateNetworkInterface( - com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkInterface createNetworkInterface274, + com.amazon.ec2.client.AmazonEC2Stub.CreateNetworkInterface createNetworkInterface274, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[137].getName()); _operationClient.getOptions().setAction("CreateNetworkInterface"); @@ -33438,9 +33438,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.RevokeSecurityGroupEgressResponse revokeSecurityGroupEgress( - com.amazon.ec2.client.AmazonEC2Stub.RevokeSecurityGroupEgress revokeSecurityGroupEgress276) + com.amazon.ec2.client.AmazonEC2Stub.RevokeSecurityGroupEgress revokeSecurityGroupEgress276) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -33541,11 +33541,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startrevokeSecurityGroupEgress( - com.amazon.ec2.client.AmazonEC2Stub.RevokeSecurityGroupEgress revokeSecurityGroupEgress276, + com.amazon.ec2.client.AmazonEC2Stub.RevokeSecurityGroupEgress revokeSecurityGroupEgress276, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[138].getName()); _operationClient.getOptions().setAction("RevokeSecurityGroupEgress"); @@ -33673,9 +33673,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.MonitorInstancesResponse monitorInstances( - com.amazon.ec2.client.AmazonEC2Stub.MonitorInstances monitorInstances278) + com.amazon.ec2.client.AmazonEC2Stub.MonitorInstances monitorInstances278) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -33775,11 +33775,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startmonitorInstances( - com.amazon.ec2.client.AmazonEC2Stub.MonitorInstances monitorInstances278, + com.amazon.ec2.client.AmazonEC2Stub.MonitorInstances monitorInstances278, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[139].getName()); _operationClient.getOptions().setAction("MonitorInstances"); @@ -33907,9 +33907,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.ReplaceRouteResponse replaceRoute( - com.amazon.ec2.client.AmazonEC2Stub.ReplaceRoute replaceRoute280) + com.amazon.ec2.client.AmazonEC2Stub.ReplaceRoute replaceRoute280) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -34009,11 +34009,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startreplaceRoute( - com.amazon.ec2.client.AmazonEC2Stub.ReplaceRoute replaceRoute280, + com.amazon.ec2.client.AmazonEC2Stub.ReplaceRoute replaceRoute280, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[140].getName()); _operationClient.getOptions().setAction("ReplaceRoute"); @@ -34140,9 +34140,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.AttachVolumeResponse attachVolume( - com.amazon.ec2.client.AmazonEC2Stub.AttachVolume attachVolume282) + com.amazon.ec2.client.AmazonEC2Stub.AttachVolume attachVolume282) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -34242,11 +34242,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startattachVolume( - com.amazon.ec2.client.AmazonEC2Stub.AttachVolume attachVolume282, + com.amazon.ec2.client.AmazonEC2Stub.AttachVolume attachVolume282, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[141].getName()); _operationClient.getOptions().setAction("AttachVolume"); @@ -34373,9 +34373,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.GetConsoleOutputResponse getConsoleOutput( - com.amazon.ec2.client.AmazonEC2Stub.GetConsoleOutput getConsoleOutput284) + com.amazon.ec2.client.AmazonEC2Stub.GetConsoleOutput getConsoleOutput284) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -34475,11 +34475,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startgetConsoleOutput( - com.amazon.ec2.client.AmazonEC2Stub.GetConsoleOutput getConsoleOutput284, + com.amazon.ec2.client.AmazonEC2Stub.GetConsoleOutput getConsoleOutput284, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[142].getName()); _operationClient.getOptions().setAction("GetConsoleOutput"); @@ -34607,9 +34607,9 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { public com.amazon.ec2.client.AmazonEC2Stub.DescribeRegionsResponse describeRegions( - com.amazon.ec2.client.AmazonEC2Stub.DescribeRegions describeRegions286) + com.amazon.ec2.client.AmazonEC2Stub.DescribeRegions describeRegions286) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -34709,11 +34709,11 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { */ public void startdescribeRegions( - com.amazon.ec2.client.AmazonEC2Stub.DescribeRegions describeRegions286, + com.amazon.ec2.client.AmazonEC2Stub.DescribeRegions describeRegions286, - final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) + final com.amazon.ec2.client.AmazonEC2CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[143].getName()); _operationClient.getOptions().setAction("DescribeRegions"); @@ -207841,7 +207841,7 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { // handle attribute "version" java.lang.String tempAttribVersion = - reader.getAttributeValue(null, "version"); + reader.getAttributeValue(null, "version"); if (tempAttribVersion != null) { java.lang.String content = tempAttribVersion; @@ -207858,7 +207858,7 @@ public class AmazonEC2Stub extends org.apache.axis2.client.Stub { // handle attribute "encoding" java.lang.String tempAttribEncoding = - reader.getAttributeValue(null, "encoding"); + reader.getAttributeValue(null, "encoding"); if (tempAttribEncoding != null) { java.lang.String content = tempAttribEncoding; diff --git a/awsapi/src/com/amazon/s3/AmazonS3MessageReceiverInOut.java b/awsapi/src/com/amazon/s3/AmazonS3MessageReceiverInOut.java index 0e8c332e142..4b9c0a4f4ff 100644 --- a/awsapi/src/com/amazon/s3/AmazonS3MessageReceiverInOut.java +++ b/awsapi/src/com/amazon/s3/AmazonS3MessageReceiverInOut.java @@ -59,7 +59,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs getBucketLoggingStatusResponse33 = - skel.getBucketLoggingStatus(wrappedParam); + skel.getBucketLoggingStatus(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getBucketLoggingStatusResponse33, false); } else @@ -73,7 +73,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs copyObjectResponse35 = - skel.copyObject(wrappedParam); + skel.copyObject(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), copyObjectResponse35, false); } else @@ -87,7 +87,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs getBucketAccessControlPolicyResponse37 = - skel.getBucketAccessControlPolicy(wrappedParam); + skel.getBucketAccessControlPolicy(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getBucketAccessControlPolicyResponse37, false); } else @@ -101,7 +101,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs listBucketResponse39 = - skel.listBucket(wrappedParam); + skel.listBucket(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), listBucketResponse39, false); } else @@ -115,7 +115,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs putObjectResponse41 = - skel.putObject(wrappedParam); + skel.putObject(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), putObjectResponse41, false); } else @@ -129,7 +129,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs createBucketResponse43 = - skel.createBucket(wrappedParam); + skel.createBucket(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), createBucketResponse43, false); } else @@ -143,7 +143,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs listAllMyBucketsResponse45 = - skel.listAllMyBuckets(wrappedParam); + skel.listAllMyBuckets(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), listAllMyBucketsResponse45, false); } else @@ -157,7 +157,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs getObjectResponse47 = - skel.getObject(wrappedParam); + skel.getObject(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getObjectResponse47, false); } else @@ -171,7 +171,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs deleteBucketResponse49 = - skel.deleteBucket(wrappedParam); + skel.deleteBucket(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteBucketResponse49, false); } else @@ -185,7 +185,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs setBucketLoggingStatusResponse51 = - skel.setBucketLoggingStatus(wrappedParam); + skel.setBucketLoggingStatus(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), setBucketLoggingStatusResponse51, false); } else @@ -199,7 +199,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs getObjectAccessControlPolicyResponse53 = - skel.getObjectAccessControlPolicy(wrappedParam); + skel.getObjectAccessControlPolicy(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getObjectAccessControlPolicyResponse53, false); } else @@ -213,7 +213,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs deleteObjectResponse55 = - skel.deleteObject(wrappedParam); + skel.deleteObject(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), deleteObjectResponse55, false); } else @@ -227,7 +227,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs setBucketAccessControlPolicyResponse57 = - skel.setBucketAccessControlPolicy(wrappedParam); + skel.setBucketAccessControlPolicy(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), setBucketAccessControlPolicyResponse57, false); } else @@ -241,7 +241,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs setObjectAccessControlPolicyResponse59 = - skel.setObjectAccessControlPolicy(wrappedParam); + skel.setObjectAccessControlPolicy(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), setObjectAccessControlPolicyResponse59, false); } else @@ -255,7 +255,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs putObjectInlineResponse61 = - skel.putObjectInline(wrappedParam); + skel.putObjectInline(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), putObjectInlineResponse61, false); } else @@ -269,7 +269,7 @@ public class AmazonS3MessageReceiverInOut extends org.apache.axis2.receivers.Abs getObjectExtendedResponse63 = - skel.getObjectExtended(wrappedParam); + skel.getObjectExtended(wrappedParam); envelope = toEnvelope(getSOAPFactory(msgContext), getObjectExtendedResponse63, false); diff --git a/awsapi/src/com/amazon/s3/MetadataDirective.java b/awsapi/src/com/amazon/s3/MetadataDirective.java index b3766861cc7..a558f60e09f 100644 --- a/awsapi/src/com/amazon/s3/MetadataDirective.java +++ b/awsapi/src/com/amazon/s3/MetadataDirective.java @@ -333,7 +333,7 @@ public class MetadataDirective implements org.apache.axis2.databinding.ADBBean { public static MetadataDirective fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { MetadataDirective enumeration = (MetadataDirective) - _table_.get(value); + _table_.get(value); if (enumeration == null) throw new java.lang.IllegalArgumentException(); diff --git a/awsapi/src/com/amazon/s3/MfaDeleteStatus.java b/awsapi/src/com/amazon/s3/MfaDeleteStatus.java index 63e982762e4..a050d8c1a16 100644 --- a/awsapi/src/com/amazon/s3/MfaDeleteStatus.java +++ b/awsapi/src/com/amazon/s3/MfaDeleteStatus.java @@ -333,7 +333,7 @@ public class MfaDeleteStatus implements org.apache.axis2.databinding.ADBBean { public static MfaDeleteStatus fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { MfaDeleteStatus enumeration = (MfaDeleteStatus) - _table_.get(value); + _table_.get(value); if (enumeration == null) throw new java.lang.IllegalArgumentException(); diff --git a/awsapi/src/com/amazon/s3/Payer.java b/awsapi/src/com/amazon/s3/Payer.java index ea33c567b43..61b7b7f0d1f 100644 --- a/awsapi/src/com/amazon/s3/Payer.java +++ b/awsapi/src/com/amazon/s3/Payer.java @@ -333,7 +333,7 @@ public class Payer implements org.apache.axis2.databinding.ADBBean { public static Payer fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { Payer enumeration = (Payer) - _table_.get(value); + _table_.get(value); if (enumeration == null) throw new java.lang.IllegalArgumentException(); diff --git a/awsapi/src/com/amazon/s3/Permission.java b/awsapi/src/com/amazon/s3/Permission.java index 1fad5a7ceea..736fd64ffdb 100644 --- a/awsapi/src/com/amazon/s3/Permission.java +++ b/awsapi/src/com/amazon/s3/Permission.java @@ -345,7 +345,7 @@ public class Permission implements org.apache.axis2.databinding.ADBBean { public static Permission fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { Permission enumeration = (Permission) - _table_.get(value); + _table_.get(value); if (enumeration == null) throw new java.lang.IllegalArgumentException(); diff --git a/awsapi/src/com/amazon/s3/StorageClass.java b/awsapi/src/com/amazon/s3/StorageClass.java index 56f7edacec7..d10c069ed52 100644 --- a/awsapi/src/com/amazon/s3/StorageClass.java +++ b/awsapi/src/com/amazon/s3/StorageClass.java @@ -333,7 +333,7 @@ public class StorageClass implements org.apache.axis2.databinding.ADBBean { public static StorageClass fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { StorageClass enumeration = (StorageClass) - _table_.get(value); + _table_.get(value); if (enumeration == null) throw new java.lang.IllegalArgumentException(); diff --git a/awsapi/src/com/amazon/s3/VersioningStatus.java b/awsapi/src/com/amazon/s3/VersioningStatus.java index 74b3de09564..c05604feec6 100644 --- a/awsapi/src/com/amazon/s3/VersioningStatus.java +++ b/awsapi/src/com/amazon/s3/VersioningStatus.java @@ -333,7 +333,7 @@ public class VersioningStatus implements org.apache.axis2.databinding.ADBBean { public static VersioningStatus fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { VersioningStatus enumeration = (VersioningStatus) - _table_.get(value); + _table_.get(value); if (enumeration == null) throw new java.lang.IllegalArgumentException(); diff --git a/awsapi/src/com/amazon/s3/client/AmazonS3Stub.java b/awsapi/src/com/amazon/s3/client/AmazonS3Stub.java index 06ba65517d5..ad740f08df7 100644 --- a/awsapi/src/com/amazon/s3/client/AmazonS3Stub.java +++ b/awsapi/src/com/amazon/s3/client/AmazonS3Stub.java @@ -235,9 +235,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.GetBucketLoggingStatusResponse getBucketLoggingStatus( - com.amazon.s3.client.AmazonS3Stub.GetBucketLoggingStatus getBucketLoggingStatus0) + com.amazon.s3.client.AmazonS3Stub.GetBucketLoggingStatus getBucketLoggingStatus0) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -335,11 +335,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startgetBucketLoggingStatus( - com.amazon.s3.client.AmazonS3Stub.GetBucketLoggingStatus getBucketLoggingStatus0, + com.amazon.s3.client.AmazonS3Stub.GetBucketLoggingStatus getBucketLoggingStatus0, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/GetBucketLoggingStatusRequest"); @@ -471,9 +471,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.CopyObjectResponse copyObject( - com.amazon.s3.client.AmazonS3Stub.CopyObject copyObject2) + com.amazon.s3.client.AmazonS3Stub.CopyObject copyObject2) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -571,11 +571,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startcopyObject( - com.amazon.s3.client.AmazonS3Stub.CopyObject copyObject2, + com.amazon.s3.client.AmazonS3Stub.CopyObject copyObject2, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/CopyObjectRequest"); @@ -706,9 +706,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.GetBucketAccessControlPolicyResponse getBucketAccessControlPolicy( - com.amazon.s3.client.AmazonS3Stub.GetBucketAccessControlPolicy getBucketAccessControlPolicy4) + com.amazon.s3.client.AmazonS3Stub.GetBucketAccessControlPolicy getBucketAccessControlPolicy4) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -807,11 +807,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startgetBucketAccessControlPolicy( - com.amazon.s3.client.AmazonS3Stub.GetBucketAccessControlPolicy getBucketAccessControlPolicy4, + com.amazon.s3.client.AmazonS3Stub.GetBucketAccessControlPolicy getBucketAccessControlPolicy4, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/GetBucketAccessControlPolicyRequest"); @@ -943,9 +943,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.ListBucketResponse listBucket( - com.amazon.s3.client.AmazonS3Stub.ListBucket listBucket6) + com.amazon.s3.client.AmazonS3Stub.ListBucket listBucket6) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -1043,11 +1043,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startlistBucket( - com.amazon.s3.client.AmazonS3Stub.ListBucket listBucket6, + com.amazon.s3.client.AmazonS3Stub.ListBucket listBucket6, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/ListBucketRequest"); @@ -1178,9 +1178,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.PutObjectResponse putObject( - com.amazon.s3.client.AmazonS3Stub.PutObject putObject8) + com.amazon.s3.client.AmazonS3Stub.PutObject putObject8) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -1278,11 +1278,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startputObject( - com.amazon.s3.client.AmazonS3Stub.PutObject putObject8, + com.amazon.s3.client.AmazonS3Stub.PutObject putObject8, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/PutObjectRequest"); @@ -1413,9 +1413,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.CreateBucketResponse createBucket( - com.amazon.s3.client.AmazonS3Stub.CreateBucket createBucket10) + com.amazon.s3.client.AmazonS3Stub.CreateBucket createBucket10) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -1513,11 +1513,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startcreateBucket( - com.amazon.s3.client.AmazonS3Stub.CreateBucket createBucket10, + com.amazon.s3.client.AmazonS3Stub.CreateBucket createBucket10, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[5].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/CreateBucketRequest"); @@ -1648,9 +1648,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.ListAllMyBucketsResponse listAllMyBuckets( - com.amazon.s3.client.AmazonS3Stub.ListAllMyBuckets listAllMyBuckets12) + com.amazon.s3.client.AmazonS3Stub.ListAllMyBuckets listAllMyBuckets12) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -1748,11 +1748,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startlistAllMyBuckets( - com.amazon.s3.client.AmazonS3Stub.ListAllMyBuckets listAllMyBuckets12, + com.amazon.s3.client.AmazonS3Stub.ListAllMyBuckets listAllMyBuckets12, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[6].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/ListAllMyBucketsRequest"); @@ -1883,9 +1883,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.GetObjectResponse getObject( - com.amazon.s3.client.AmazonS3Stub.GetObject getObject14) + com.amazon.s3.client.AmazonS3Stub.GetObject getObject14) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -1983,11 +1983,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startgetObject( - com.amazon.s3.client.AmazonS3Stub.GetObject getObject14, + com.amazon.s3.client.AmazonS3Stub.GetObject getObject14, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[7].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/GetObjectRequest"); @@ -2118,9 +2118,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.DeleteBucketResponse deleteBucket( - com.amazon.s3.client.AmazonS3Stub.DeleteBucket deleteBucket16) + com.amazon.s3.client.AmazonS3Stub.DeleteBucket deleteBucket16) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -2218,11 +2218,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startdeleteBucket( - com.amazon.s3.client.AmazonS3Stub.DeleteBucket deleteBucket16, + com.amazon.s3.client.AmazonS3Stub.DeleteBucket deleteBucket16, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/DeleteBucketRequest"); @@ -2353,9 +2353,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.SetBucketLoggingStatusResponse setBucketLoggingStatus( - com.amazon.s3.client.AmazonS3Stub.SetBucketLoggingStatus setBucketLoggingStatus18) + com.amazon.s3.client.AmazonS3Stub.SetBucketLoggingStatus setBucketLoggingStatus18) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -2453,11 +2453,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startsetBucketLoggingStatus( - com.amazon.s3.client.AmazonS3Stub.SetBucketLoggingStatus setBucketLoggingStatus18, + com.amazon.s3.client.AmazonS3Stub.SetBucketLoggingStatus setBucketLoggingStatus18, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[9].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/SetBucketLoggingStatusRequest"); @@ -2589,9 +2589,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.GetObjectAccessControlPolicyResponse getObjectAccessControlPolicy( - com.amazon.s3.client.AmazonS3Stub.GetObjectAccessControlPolicy getObjectAccessControlPolicy20) + com.amazon.s3.client.AmazonS3Stub.GetObjectAccessControlPolicy getObjectAccessControlPolicy20) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -2690,11 +2690,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startgetObjectAccessControlPolicy( - com.amazon.s3.client.AmazonS3Stub.GetObjectAccessControlPolicy getObjectAccessControlPolicy20, + com.amazon.s3.client.AmazonS3Stub.GetObjectAccessControlPolicy getObjectAccessControlPolicy20, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[10].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/GetObjectAccessControlPolicyRequest"); @@ -2826,9 +2826,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.DeleteObjectResponse deleteObject( - com.amazon.s3.client.AmazonS3Stub.DeleteObject deleteObject22) + com.amazon.s3.client.AmazonS3Stub.DeleteObject deleteObject22) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -2926,11 +2926,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startdeleteObject( - com.amazon.s3.client.AmazonS3Stub.DeleteObject deleteObject22, + com.amazon.s3.client.AmazonS3Stub.DeleteObject deleteObject22, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[11].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/DeleteObjectRequest"); @@ -3061,9 +3061,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.SetBucketAccessControlPolicyResponse setBucketAccessControlPolicy( - com.amazon.s3.client.AmazonS3Stub.SetBucketAccessControlPolicy setBucketAccessControlPolicy24) + com.amazon.s3.client.AmazonS3Stub.SetBucketAccessControlPolicy setBucketAccessControlPolicy24) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -3162,11 +3162,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startsetBucketAccessControlPolicy( - com.amazon.s3.client.AmazonS3Stub.SetBucketAccessControlPolicy setBucketAccessControlPolicy24, + com.amazon.s3.client.AmazonS3Stub.SetBucketAccessControlPolicy setBucketAccessControlPolicy24, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[12].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/SetBucketAccessControlPolicyRequest"); @@ -3298,9 +3298,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.SetObjectAccessControlPolicyResponse setObjectAccessControlPolicy( - com.amazon.s3.client.AmazonS3Stub.SetObjectAccessControlPolicy setObjectAccessControlPolicy26) + com.amazon.s3.client.AmazonS3Stub.SetObjectAccessControlPolicy setObjectAccessControlPolicy26) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -3399,11 +3399,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startsetObjectAccessControlPolicy( - com.amazon.s3.client.AmazonS3Stub.SetObjectAccessControlPolicy setObjectAccessControlPolicy26, + com.amazon.s3.client.AmazonS3Stub.SetObjectAccessControlPolicy setObjectAccessControlPolicy26, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[13].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/SetObjectAccessControlPolicyRequest"); @@ -3535,9 +3535,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.PutObjectInlineResponse putObjectInline( - com.amazon.s3.client.AmazonS3Stub.PutObjectInline putObjectInline28) + com.amazon.s3.client.AmazonS3Stub.PutObjectInline putObjectInline28) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -3635,11 +3635,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startputObjectInline( - com.amazon.s3.client.AmazonS3Stub.PutObjectInline putObjectInline28, + com.amazon.s3.client.AmazonS3Stub.PutObjectInline putObjectInline28, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[14].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/PutObjectInlineRequest"); @@ -3770,9 +3770,9 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public com.amazon.s3.client.AmazonS3Stub.GetObjectExtendedResponse getObjectExtended( - com.amazon.s3.client.AmazonS3Stub.GetObjectExtended getObjectExtended30) + com.amazon.s3.client.AmazonS3Stub.GetObjectExtended getObjectExtended30) - throws java.rmi.RemoteException + throws java.rmi.RemoteException { org.apache.axis2.context.MessageContext _messageContext = null; @@ -3870,11 +3870,11 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { */ public void startgetObjectExtended( - com.amazon.s3.client.AmazonS3Stub.GetObjectExtended getObjectExtended30, + com.amazon.s3.client.AmazonS3Stub.GetObjectExtended getObjectExtended30, - final com.amazon.s3.client.AmazonS3CallbackHandler callback) + final com.amazon.s3.client.AmazonS3CallbackHandler callback) - throws java.rmi.RemoteException { + throws java.rmi.RemoteException { org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[15].getName()); _operationClient.getOptions().setAction("http://s3.amazonaws.com/doc/2006-03-01/AmazonS3/GetObjectExtendedRequest"); @@ -18445,7 +18445,7 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public static Permission fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { Permission enumeration = (Permission) - _table_.get(value); + _table_.get(value); if (enumeration == null) throw new java.lang.IllegalArgumentException(); @@ -23125,7 +23125,7 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public static MetadataDirective fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { MetadataDirective enumeration = (MetadataDirective) - _table_.get(value); + _table_.get(value); if (enumeration == null) throw new java.lang.IllegalArgumentException(); @@ -29108,7 +29108,7 @@ public class AmazonS3Stub extends org.apache.axis2.client.Stub { public static StorageClass fromValue(java.lang.String value) throws java.lang.IllegalArgumentException { StorageClass enumeration = (StorageClass) - _table_.get(value); + _table_.get(value); if (enumeration == null) throw new java.lang.IllegalArgumentException(); diff --git a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java index fd2919dc117..9ac5c4e3206 100644 --- a/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java +++ b/awsapi/src/com/cloud/bridge/service/EC2RestServlet.java @@ -582,12 +582,12 @@ public class EC2RestServlet extends HttpServlet { credentialDao.setCertificateId( accessKey[0], null ); */txn = TransactionLegacy.open(TransactionLegacy.AWSAPI_DB); - UserCredentialsVO user = ucDao.getByAccessKey(accessKey[0]); - user.setCertUniqueId(null); - ucDao.update(user.getId(), user); - response.setStatus(200); - endResponse(response, "User certificate deleted successfully"); - txn.commit(); + UserCredentialsVO user = ucDao.getByAccessKey(accessKey[0]); + user.setCertUniqueId(null); + ucDao.update(user.getId(), user); + response.setStatus(200); + endResponse(response, "User certificate deleted successfully"); + txn.commit(); } else response.setStatus(404); @@ -834,7 +834,7 @@ public class EC2RestServlet extends HttpServlet { // -> execute the request RevokeSecurityGroupIngressResponse EC2response = - EC2SoapServiceImpl.toRevokeSecurityGroupIngressResponse(ServiceProvider.getInstance().getEC2Engine().revokeSecurityGroup(EC2request)); + EC2SoapServiceImpl.toRevokeSecurityGroupIngressResponse(ServiceProvider.getInstance().getEC2Engine().revokeSecurityGroup(EC2request)); serializeResponse(response, EC2response); } @@ -919,7 +919,7 @@ public class EC2RestServlet extends HttpServlet { // -> execute the request AuthorizeSecurityGroupIngressResponse EC2response = - EC2SoapServiceImpl.toAuthorizeSecurityGroupIngressResponse(ServiceProvider.getInstance().getEC2Engine().authorizeSecurityGroup(EC2request)); + EC2SoapServiceImpl.toAuthorizeSecurityGroupIngressResponse(ServiceProvider.getInstance().getEC2Engine().authorizeSecurityGroup(EC2request)); serializeResponse(response, EC2response); } @@ -1016,7 +1016,7 @@ public class EC2RestServlet extends HttpServlet { // -> execute the request CreateSecurityGroupResponse EC2response = - EC2SoapServiceImpl.toCreateSecurityGroupResponse(ServiceProvider.getInstance().getEC2Engine().createSecurityGroup(groupName, groupDescription)); + EC2SoapServiceImpl.toCreateSecurityGroupResponse(ServiceProvider.getInstance().getEC2Engine().createSecurityGroup(groupName, groupDescription)); serializeResponse(response, EC2response); } @@ -1032,7 +1032,7 @@ public class EC2RestServlet extends HttpServlet { // -> execute the request DeleteSecurityGroupResponse EC2response = - EC2SoapServiceImpl.toDeleteSecurityGroupResponse(ServiceProvider.getInstance().getEC2Engine().deleteSecurityGroup(groupName)); + EC2SoapServiceImpl.toDeleteSecurityGroupResponse(ServiceProvider.getInstance().getEC2Engine().deleteSecurityGroup(groupName)); serializeResponse(response, EC2response); } @@ -1170,7 +1170,7 @@ public class EC2RestServlet extends HttpServlet { // -> execute the request ModifyImageAttributeResponse EC2response = - EC2SoapServiceImpl.toModifyImageAttributeResponse(ServiceProvider.getInstance().getEC2Engine().modifyImageAttribute(ec2request)); + EC2SoapServiceImpl.toModifyImageAttributeResponse(ServiceProvider.getInstance().getEC2Engine().modifyImageAttribute(ec2request)); serializeResponse(response, EC2response); } @@ -1235,7 +1235,7 @@ public class EC2RestServlet extends HttpServlet { // -> execute the request ResetImageAttributeResponse EC2response = - EC2SoapServiceImpl.toResetImageAttributeResponse(ServiceProvider.getInstance().getEC2Engine().modifyImageAttribute(ec2request)); + EC2SoapServiceImpl.toResetImageAttributeResponse(ServiceProvider.getInstance().getEC2Engine().modifyImageAttribute(ec2request)); serializeResponse(response, EC2response); } @@ -1447,7 +1447,7 @@ public class EC2RestServlet extends HttpServlet { // -> execute the request DescribeAvailabilityZonesResponse EC2response = - EC2SoapServiceImpl.toDescribeAvailabilityZonesResponse(ServiceProvider.getInstance().getEC2Engine().describeAvailabilityZones(EC2request)); + EC2SoapServiceImpl.toDescribeAvailabilityZonesResponse(ServiceProvider.getInstance().getEC2Engine().describeAvailabilityZones(EC2request)); serializeResponse(response, EC2response); } @@ -1503,7 +1503,7 @@ public class EC2RestServlet extends HttpServlet { } DescribeImageAttributeResponse EC2response = - EC2SoapServiceImpl.toDescribeImageAttributeResponse(ServiceProvider.getInstance().getEC2Engine().describeImageAttribute(ec2request)); + EC2SoapServiceImpl.toDescribeImageAttributeResponse(ServiceProvider.getInstance().getEC2Engine().describeImageAttribute(ec2request)); serializeResponse(response, EC2response); } @@ -1681,7 +1681,7 @@ public class EC2RestServlet extends HttpServlet { // -> execute the request DescribeInstanceAttributeResponse EC2response = - EC2SoapServiceImpl.toDescribeInstanceAttributeResponse(ServiceProvider.getInstance().getEC2Engine().describeInstances(EC2request)); + EC2SoapServiceImpl.toDescribeInstanceAttributeResponse(ServiceProvider.getInstance().getEC2Engine().describeInstances(EC2request)); serializeResponse(response, EC2response); } @@ -1711,7 +1711,7 @@ public class EC2RestServlet extends HttpServlet { // -> execute the request ModifyInstanceAttributeResponse EC2response = - EC2SoapServiceImpl.toModifyInstanceAttributeResponse(ServiceProvider.getInstance().getEC2Engine().modifyInstanceAttribute(ec2Request)); + EC2SoapServiceImpl.toModifyInstanceAttributeResponse(ServiceProvider.getInstance().getEC2Engine().modifyInstanceAttribute(ec2Request)); serializeResponse(response, EC2response); } @@ -1770,7 +1770,7 @@ public class EC2RestServlet extends HttpServlet { // -> execute the request EC2Engine engine = ServiceProvider.getInstance().getEC2Engine(); DescribeVolumesResponse EC2response = - EC2SoapServiceImpl.toDescribeVolumesResponse(ServiceProvider.getInstance().getEC2Engine().describeVolumes(EC2request), engine); + EC2SoapServiceImpl.toDescribeVolumesResponse(ServiceProvider.getInstance().getEC2Engine().describeVolumes(EC2request), engine); serializeResponse(response, EC2response); } @@ -1992,7 +1992,7 @@ public class EC2RestServlet extends HttpServlet { * parameter to see if the signature has expired and if so the request fails. */ private boolean authenticateRequest(HttpServletRequest request, HttpServletResponse response) throws SignatureException, IOException, InstantiationException, - IllegalAccessException, ClassNotFoundException, SQLException, ParseException { + IllegalAccessException, ClassNotFoundException, SQLException, ParseException { String cloudSecretKey = null; String cloudAccessKey = null; String signature = null; diff --git a/awsapi/src/com/cloud/bridge/service/controller/s3/ServiceProvider.java b/awsapi/src/com/cloud/bridge/service/controller/s3/ServiceProvider.java index e00408e1edf..4b8c7581535 100644 --- a/awsapi/src/com/cloud/bridge/service/controller/s3/ServiceProvider.java +++ b/awsapi/src/com/cloud/bridge/service/controller/s3/ServiceProvider.java @@ -121,7 +121,7 @@ public class ServiceProvider extends ManagerBase { long mhostId = 0; if (mhost != null) mhostId = mhost.getId() != null ? mhost.getId().longValue() : 0L; - return mhostId; + return mhostId; } /** diff --git a/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java b/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java index ccac6749479..60f974a5e1d 100644 --- a/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java +++ b/awsapi/src/com/cloud/bridge/service/core/ec2/EC2Engine.java @@ -126,7 +126,7 @@ public class EC2Engine extends ManagerBase { FileInputStream ec2PropFile = null; try { EC2Prop.load(new FileInputStream(propertiesFile)); - ec2PropFile = new FileInputStream( propertiesFile ); + ec2PropFile = new FileInputStream(propertiesFile); EC2Prop.load(ec2PropFile); } catch (FileNotFoundException e) { @@ -371,12 +371,12 @@ public class EC2Engine extends ManagerBase { CloudStackSecurityGroup resp = null; if (ipPerm.getProtocol().equalsIgnoreCase("icmp")) { resp = - getApi().authorizeSecurityGroupIngress(null, constructList(ipPerm.getIpRangeSet()), null, null, ipPerm.getIcmpCode(), ipPerm.getIcmpType(), - ipPerm.getProtocol(), null, request.getName(), null, secGroupList); + getApi().authorizeSecurityGroupIngress(null, constructList(ipPerm.getIpRangeSet()), null, null, ipPerm.getIcmpCode(), ipPerm.getIcmpType(), + ipPerm.getProtocol(), null, request.getName(), null, secGroupList); } else { resp = - getApi().authorizeSecurityGroupIngress(null, constructList(ipPerm.getIpRangeSet()), null, ipPerm.getToPort().longValue(), null, null, - ipPerm.getProtocol(), null, request.getName(), ipPerm.getFromPort().longValue(), secGroupList); + getApi().authorizeSecurityGroupIngress(null, constructList(ipPerm.getIpRangeSet()), null, ipPerm.getToPort().longValue(), null, null, + ipPerm.getProtocol(), null, request.getName(), ipPerm.getFromPort().longValue(), secGroupList); } if (resp != null) { List ingressRules = resp.getIngressRules(); @@ -815,7 +815,7 @@ public class EC2Engine extends ManagerBase { CloudStackIpAddress cloudIp = cloudIps.get(0); List vmList = - getApi().listVirtualMachines(null, null, true, null, null, null, null, request.getInstanceId(), null, null, null, null, null, null, null, null, null); + getApi().listVirtualMachines(null, null, true, null, null, null, null, request.getInstanceId(), null, null, null, null, null, null, null, null, null); if (vmList == null || vmList.size() == 0) { throw new Exception("Instance not found"); } @@ -972,8 +972,8 @@ public class EC2Engine extends ManagerBase { String osTypeId = imageSet[0].getOsTypeId(); CloudStackTemplate resp = - getApi().createTemplate((request.getDescription() == null ? "" : request.getDescription()), request.getName(), osTypeId, null, null, null, null, null, - null, volumeId); + getApi().createTemplate((request.getDescription() == null ? "" : request.getDescription()), request.getName(), osTypeId, null, null, null, null, null, + null, volumeId); if (resp == null || resp.getId() == null) { throw new Exception("Image couldn't be created"); } @@ -1003,9 +1003,9 @@ public class EC2Engine extends ManagerBase { EC2CreateImageResponse image = new EC2CreateImageResponse(); try { List templates = - getApi().registerTemplate((request.getDescription() == null ? request.getName() : request.getDescription()), request.getFormat(), - request.getHypervisor(), request.getName(), toOSTypeId(request.getOsTypeName()), request.getLocation(), toZoneId(request.getZoneName(), null), null, - null, null, null, null, null, null, null, null); + getApi().registerTemplate((request.getDescription() == null ? request.getName() : request.getDescription()), request.getFormat(), + request.getHypervisor(), request.getName(), toOSTypeId(request.getOsTypeName()), request.getLocation(), toZoneId(request.getZoneName(), null), null, + null, null, null, null, null, null, null, null); if (templates != null) { // technically we will only ever register a single template... for (CloudStackTemplate template : templates) { @@ -1226,7 +1226,7 @@ public class EC2Engine extends ManagerBase { // -> no volume name is given in the Amazon request but is required in the cloud API CloudStackVolume vol = - getApi().createVolume(UUID.randomUUID().toString(), null, diskOfferingId, null, size, snapshotId, toZoneId(request.getZoneName(), null)); + getApi().createVolume(UUID.randomUUID().toString(), null, diskOfferingId, null, size, snapshotId, toZoneId(request.getZoneName(), null)); if (vol != null) { resp.setAttached(vol.getAttached()); resp.setCreated(vol.getCreated()); @@ -1449,8 +1449,8 @@ public class EC2Engine extends ManagerBase { for (int i = 0; i < createInstances; i++) { try { CloudStackUserVm resp = - getApi().deployVirtualMachine(svcOffering.getId(), request.getTemplateId(), zoneId, null, null, null, null, null, null, null, - request.getKeyName(), null, null, groupIds, groupNames, request.getSize().longValue(), request.getUserData()); + getApi().deployVirtualMachine(svcOffering.getId(), request.getTemplateId(), zoneId, null, null, null, null, null, null, null, + request.getKeyName(), null, null, groupIds, groupNames, request.getSize().longValue(), request.getUserData()); EC2Instance vm = new EC2Instance(); vm.setId(resp.getId().toString()); vm.setName(resp.getName()); @@ -1673,7 +1673,7 @@ public class EC2Engine extends ManagerBase { * @param ifs - filter out unwanted instances */ private EC2DescribeInstancesResponse listVirtualMachines(String[] virtualMachineIds, EC2InstanceFilterSet ifs, List resourceTags) - throws Exception { + throws Exception { EC2DescribeInstancesResponse instances = new EC2DescribeInstancesResponse(); if (null == virtualMachineIds || 0 == virtualMachineIds.length) { @@ -1697,7 +1697,7 @@ public class EC2Engine extends ManagerBase { * @param instanceId - if interested in volumes for a specific instance, null if instance is not important */ private EC2DescribeVolumesResponse listVolumes(String volumeId, String instanceId, EC2DescribeVolumesResponse volumes, List resourceTagSet) - throws Exception { + throws Exception { List vols = getApi().listVolumes(null, null, null, volumeId, null, null, null, null, null, instanceId, null, resourceTagSet); if (vols != null && vols.size() > 0) { @@ -1888,11 +1888,11 @@ public class EC2Engine extends ManagerBase { * EC2Instance objects loaded. */ private EC2DescribeInstancesResponse lookupInstances(String instanceId, EC2DescribeInstancesResponse instances, List resourceTagSet) - throws Exception { + throws Exception { String instId = instanceId != null ? instanceId : null; List vms = - getApi().listVirtualMachines(null, null, true, null, null, null, null, instId, null, null, null, null, null, null, null, null, resourceTagSet); + getApi().listVirtualMachines(null, null, true, null, null, null, null, instId, null, null, null, null, null, null, null, null, resourceTagSet); if (vms != null && vms.size() > 0) { for (CloudStackUserVm cloudVm : vms) { @@ -2308,7 +2308,7 @@ public class EC2Engine extends ManagerBase { */ private CloudStackNetwork createDefaultGuestNetwork(String zoneId, CloudStackNetworkOffering offering, CloudStackAccount owner) throws Exception { return getApi().createNetwork(owner.getName() + "-network", owner.getName() + "-network", offering.getId(), zoneId, owner.getName(), owner.getDomainId(), true, - null, null, null, null, null, null, null, null); + null, null, null, null, null, null, null, null); } /** @@ -2695,8 +2695,8 @@ public class EC2Engine extends ManagerBase { if (errorMessage.contains("Object vm_instance(uuid:") && errorMessage.contains(") does not exist")) { throw new EC2ServiceException(ClientError.InvalidInstanceID_NotFound, "Specified Instance ID does not exist"); } else if (errorMessage.contains("Unable to find security group by name") || errorMessage.contains("Unable to find security group") || - (errorMessage.contains("Object security_group(uuid:") && errorMessage.contains(") does not exist")) || - errorMessage.contains("Unable to find group by name ")) { + (errorMessage.contains("Object security_group(uuid:") && errorMessage.contains(") does not exist")) || + errorMessage.contains("Unable to find group by name ")) { throw new EC2ServiceException(ClientError.InvalidGroup_NotFound, "Specified Security Group does not exist"); } else if (errorMessage.contains("Invalid port numbers")) { throw new EC2ServiceException(ClientError.InvalidPermission_Malformed, "Specified Port value is invalid"); @@ -2715,7 +2715,7 @@ public class EC2Engine extends ManagerBase { } else if (errorMessage.contains("Object snapshots(uuid:") && errorMessage.contains(") does not exist")) { throw new EC2ServiceException(ClientError.InvalidSnapshot_NotFound, "Specified Snapshot ID doesn't exist"); } else if ((errorMessage.contains("A key pair with name '") && errorMessage.contains("' does not exist")) || - (errorMessage.contains("A key pair with name '") && errorMessage.contains("' was not found"))) { + (errorMessage.contains("A key pair with name '") && errorMessage.contains("' was not found"))) { throw new EC2ServiceException(ClientError.InvalidKeyPair_NotFound, "Specified Key pair name is invalid"); } else if (errorMessage.contains("A key pair with name '") && errorMessage.contains("' already exists")) { throw new EC2ServiceException(ClientError.InvalidKeyPair_Duplicate, "Specified Key pair already exists"); @@ -2742,7 +2742,7 @@ public class EC2Engine extends ManagerBase { } else if (errorMessage.contains("Unable to find tags by parameters specified")) { throw new EC2ServiceException(ClientError.InvalidParameterValue, "Specified resourceTag for the specified resourceId doesn't exist"); } else if (errorMessage.contains("Failed to enable static nat for the ip address with specified ipId " - + "as vm with specified vmId is already associated with specified currentIp")) { + + "as vm with specified vmId is already associated with specified currentIp")) { throw new EC2ServiceException(ClientError.InvalidParameterValue, "Specified publicIp is already associated to the specified VM"); } else if (errorMessage.contains("Specified IP address id is not associated with any vm Id")) { throw new EC2ServiceException(ClientError.InvalidParameterValue, "Specified publicIp is not associated to any VM"); @@ -2790,7 +2790,7 @@ public class EC2Engine extends ManagerBase { throw new EC2ServiceException(ClientError.InvalidAMIID_NotFound, "Specified ImageId is unavailable"); } else if (errorMessage.contains("cannot stop VM") && errorMessage.contains("when it is in state Starting")) { throw new EC2ServiceException(ClientError.IncorrectInstanceState, - "Unable to stop. One or more of the specified instances is in an incorrect state 'pending'"); + "Unable to stop. One or more of the specified instances is in an incorrect state 'pending'"); } else if (errorMessage.contains("Failed to authorize security group ingress rule(s)")) { throw new EC2ServiceException(ClientError.InvalidParameterValue, "Specified Ip-permission is invalid" + " or the Ip-permission already exists"); } else if (errorMessage.contains("Failed to reboot vm instance")) { @@ -2805,7 +2805,7 @@ public class EC2Engine extends ManagerBase { throw new EC2ServiceException(ClientError.VolumeLimitExceeded, "You have reached the limit on the number of volumes that can be created"); } else if (errorMessage.contains("Maximum number of resources of type 'public_ip' for account") && errorMessage.contains("has been exceeded")) { throw new EC2ServiceException(ClientError.AddressLimitExceeded, - "You have reached the limit on the number of elastic ip addresses your account can have"); + "You have reached the limit on the number of elastic ip addresses your account can have"); } else if (errorMessage.contains("Unable to apply save userdata entry on router")) { throw new EC2ServiceException(ClientError.InvalidParameterValue, "The value supplied for parameter UserData is invalid"); } else { @@ -2853,7 +2853,7 @@ public class EC2Engine extends ManagerBase { throw new EC2ServiceException(ServerError.InternalError, "Unable to start the instance that was stopped during image creation"); } else if (errorMessage.contains("One or more of instanceIds specified is in stopped state")) { throw new EC2ServiceException(ClientError.IncorrectInstanceState, - "Unable to reboot. One or more of the specified instances is in an incorrect state 'stopped'"); + "Unable to reboot. One or more of the specified instances is in an incorrect state 'stopped'"); } else if (errorMessage.contains("Specified ipAddress doesn't exist")) { throw new EC2ServiceException(ClientError.InvalidParameterValue, "Specified publicIp doesn't exist"); } else if (errorMessage.contains("Min Count is greater than the number of instances left to allocate")) { @@ -2872,7 +2872,7 @@ public class EC2Engine extends ManagerBase { throw new EC2ServiceException(ClientError.InvalidInstanceID_NotFound, "One or more of the specified instanceId not found"); } else if (errorMessage.contains("Cannot modify, instance should be in stopped state")) { throw new EC2ServiceException(ClientError.IncorrectInstanceState, - "Unable to modify instance attribute. Specified instance is not in the correct state 'stopped'"); + "Unable to modify instance attribute. Specified instance is not in the correct state 'stopped'"); } else { throw new EC2ServiceException(ServerError.InternalError, "An unexpected error occured"); } diff --git a/build/checkstyle/src/main/resources/tooling/checkstyle.xml b/build/checkstyle/src/main/resources/tooling/checkstyle.xml index 9b6502949d1..47ea1fb706e 100644 --- a/build/checkstyle/src/main/resources/tooling/checkstyle.xml +++ b/build/checkstyle/src/main/resources/tooling/checkstyle.xml @@ -1,56 +1,55 @@ - + - - + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - + + + + + + + + + + - + + + diff --git a/core/src/com/cloud/agent/api/AttachVolumeCommand.java b/core/src/com/cloud/agent/api/AttachVolumeCommand.java index 911ff543bf9..a0ee4199156 100644 --- a/core/src/com/cloud/agent/api/AttachVolumeCommand.java +++ b/core/src/com/cloud/agent/api/AttachVolumeCommand.java @@ -84,7 +84,7 @@ public class AttachVolumeCommand extends Command { } public String getVolumeName() { - return volumeName; + return volumeName; } public Long getVolumeSize() { diff --git a/core/src/com/cloud/agent/api/ComputeChecksumCommand.java b/core/src/com/cloud/agent/api/ComputeChecksumCommand.java index aec244b1e4e..8c654d71ec5 100755 --- a/core/src/com/cloud/agent/api/ComputeChecksumCommand.java +++ b/core/src/com/cloud/agent/api/ComputeChecksumCommand.java @@ -16,10 +16,10 @@ // under the License. package com.cloud.agent.api; -import com.cloud.agent.api.storage.ssCommand; +import com.cloud.agent.api.storage.SsCommand; import com.cloud.agent.api.to.DataStoreTO; -public class ComputeChecksumCommand extends ssCommand { +public class ComputeChecksumCommand extends SsCommand { private DataStoreTO store; private String templatePath; diff --git a/core/src/com/cloud/agent/api/CreatePrivateTemplateFromVolumeCommand.java b/core/src/com/cloud/agent/api/CreatePrivateTemplateFromVolumeCommand.java index 84f50af4bef..7880554478d 100644 --- a/core/src/com/cloud/agent/api/CreatePrivateTemplateFromVolumeCommand.java +++ b/core/src/com/cloud/agent/api/CreatePrivateTemplateFromVolumeCommand.java @@ -79,8 +79,8 @@ public class CreatePrivateTemplateFromVolumeCommand extends SnapshotCommand { } @Override - public void setVolumePath(String _volumePath) { - this._volumePath = _volumePath; + public void setVolumePath(String volumePath) { + this._volumePath = volumePath; } @Override diff --git a/core/src/com/cloud/agent/api/ManageSnapshotCommand.java b/core/src/com/cloud/agent/api/ManageSnapshotCommand.java index e3abb503294..fb2d0d52803 100644 --- a/core/src/com/cloud/agent/api/ManageSnapshotCommand.java +++ b/core/src/com/cloud/agent/api/ManageSnapshotCommand.java @@ -22,8 +22,8 @@ import com.cloud.storage.StoragePool; public class ManageSnapshotCommand extends Command { // XXX: Should be an enum // XXX: Anyway there is something called inheritance in Java - public static String CREATE_SNAPSHOT = "-c"; - public static String DESTROY_SNAPSHOT = "-d"; + public static final String CREATE_SNAPSHOT = "-c"; + public static final String DESTROY_SNAPSHOT = "-d"; private String _commandSwitch; diff --git a/core/src/com/cloud/agent/api/PerformanceMonitorAnswer.java b/core/src/com/cloud/agent/api/PerformanceMonitorAnswer.java index 10f4185719d..f8ec05dfd72 100644 --- a/core/src/com/cloud/agent/api/PerformanceMonitorAnswer.java +++ b/core/src/com/cloud/agent/api/PerformanceMonitorAnswer.java @@ -17,11 +17,11 @@ package com.cloud.agent.api; public class PerformanceMonitorAnswer extends Answer { - public PerformanceMonitorAnswer() { - } + public PerformanceMonitorAnswer() { + } - public PerformanceMonitorAnswer(PerformanceMonitorCommand cmd, - boolean result, String details) { - super(cmd, result, details); - } + public PerformanceMonitorAnswer(PerformanceMonitorCommand cmd, + boolean result, String details) { + super(cmd, result, details); + } } diff --git a/core/src/com/cloud/agent/api/PerformanceMonitorCommand.java b/core/src/com/cloud/agent/api/PerformanceMonitorCommand.java index 882d7b18763..d0a6eb1f714 100644 --- a/core/src/com/cloud/agent/api/PerformanceMonitorCommand.java +++ b/core/src/com/cloud/agent/api/PerformanceMonitorCommand.java @@ -21,26 +21,26 @@ import java.util.Map; public class PerformanceMonitorCommand extends Command { - Map params = new HashMap(); + Map params = new HashMap(); - public PerformanceMonitorCommand() { - } + public PerformanceMonitorCommand() { + } - public PerformanceMonitorCommand(Map params, int wait) { - setWait(wait); - this.params = params; - } + public PerformanceMonitorCommand(Map params, int wait) { + setWait(wait); + this.params = params; + } - @Override - public boolean executeInSequence() { - return false; - } + @Override + public boolean executeInSequence() { + return false; + } - public Map getParams() { - return params; - } + public Map getParams() { + return params; + } - public void setParams(Map params) { - this.params = params; - } + public void setParams(Map params) { + this.params = params; + } } diff --git a/core/src/com/cloud/agent/api/StartAnswer.java b/core/src/com/cloud/agent/api/StartAnswer.java index 92dce84b6df..3bd7bff65db 100644 --- a/core/src/com/cloud/agent/api/StartAnswer.java +++ b/core/src/com/cloud/agent/api/StartAnswer.java @@ -22,7 +22,7 @@ import com.cloud.agent.api.to.VirtualMachineTO; public class StartAnswer extends Answer { VirtualMachineTO vm; - String host_guid; + String hostGuid; Map _iqnToPath; protected StartAnswer() { @@ -41,13 +41,13 @@ public class StartAnswer extends Answer { public StartAnswer(StartCommand cmd) { super(cmd, true, null); this.vm = cmd.getVirtualMachine(); - this.host_guid = null; + this.hostGuid = null; } public StartAnswer(StartCommand cmd, String msg, String guid) { super(cmd, true, msg); this.vm = cmd.getVirtualMachine(); - this.host_guid = guid; + this.hostGuid = guid; } public VirtualMachineTO getVirtualMachine() { @@ -55,7 +55,7 @@ public class StartAnswer extends Answer { } public String getHost_guid() { - return host_guid; + return hostGuid; } public void setIqnToPath(Map iqnToPath) { diff --git a/core/src/com/cloud/agent/api/StopAnswer.java b/core/src/com/cloud/agent/api/StopAnswer.java index b5931747175..ff2cd191899 100755 --- a/core/src/com/cloud/agent/api/StopAnswer.java +++ b/core/src/com/cloud/agent/api/StopAnswer.java @@ -24,12 +24,12 @@ public class StopAnswer extends RebootAnswer { } public StopAnswer(StopCommand cmd, String details, String platform, boolean success) { - super(cmd, details, success); + super(cmd, details, success); this.platform = platform; } public StopAnswer(StopCommand cmd, String details, boolean success) { - super(cmd, details, success); + super(cmd, details, success); this.platform = null; } diff --git a/core/src/com/cloud/agent/api/UpdateHostPasswordCommand.java b/core/src/com/cloud/agent/api/UpdateHostPasswordCommand.java index 6e448eeade4..15fb7140e9c 100644 --- a/core/src/com/cloud/agent/api/UpdateHostPasswordCommand.java +++ b/core/src/com/cloud/agent/api/UpdateHostPasswordCommand.java @@ -20,24 +20,24 @@ import com.cloud.agent.api.LogLevel.Log4jLevel; public class UpdateHostPasswordCommand extends Command { @LogLevel(Log4jLevel.Off) - protected String _username; + protected String username; @LogLevel(Log4jLevel.Off) - protected String _new_password; + protected String newPassword; protected UpdateHostPasswordCommand() { } - public UpdateHostPasswordCommand(String username, String new_password) { - this._username = username; - this._new_password = new_password; + public UpdateHostPasswordCommand(String username, String newPassword) { + this.username = username; + this.newPassword = newPassword; } public String getNewPassword() { - return _new_password; + return newPassword; } public String getUsername() { - return _username; + return username; } @Override diff --git a/core/src/com/cloud/agent/api/baremetal/prepareCreateTemplateCommand.java b/core/src/com/cloud/agent/api/baremetal/PrepareCreateTemplateCommand.java similarity index 93% rename from core/src/com/cloud/agent/api/baremetal/prepareCreateTemplateCommand.java rename to core/src/com/cloud/agent/api/baremetal/PrepareCreateTemplateCommand.java index b18742055df..f88526a8250 100644 --- a/core/src/com/cloud/agent/api/baremetal/prepareCreateTemplateCommand.java +++ b/core/src/com/cloud/agent/api/baremetal/PrepareCreateTemplateCommand.java @@ -18,7 +18,7 @@ package com.cloud.agent.api.baremetal; import com.cloud.agent.api.Command; -public class prepareCreateTemplateCommand extends Command { +public class PrepareCreateTemplateCommand extends Command { String ip; String mac; String netMask; @@ -31,7 +31,7 @@ public class prepareCreateTemplateCommand extends Command { return true; } - public prepareCreateTemplateCommand(String ip, String mac, String netMask, String gateway, String dns, String template) { + public PrepareCreateTemplateCommand(String ip, String mac, String netMask, String gateway, String dns, String template) { this.ip = ip; this.mac = mac; this.netMask = netMask; diff --git a/core/src/com/cloud/agent/api/routing/IpAliasTO.java b/core/src/com/cloud/agent/api/routing/IpAliasTO.java index fac3ed5af8f..3876e148dbe 100644 --- a/core/src/com/cloud/agent/api/routing/IpAliasTO.java +++ b/core/src/com/cloud/agent/api/routing/IpAliasTO.java @@ -19,12 +19,12 @@ package com.cloud.agent.api.routing; public class IpAliasTO { String routerip; String netmask; - String alias_count; + String aliasCount; - public IpAliasTO(String routerip, String netmask, String alias_count) { + public IpAliasTO(String routerip, String netmask, String aliasCount) { this.routerip = routerip; this.netmask = netmask; - this.alias_count = alias_count; + this.aliasCount = aliasCount; } public String getRouterip() { @@ -36,6 +36,6 @@ public class IpAliasTO { } public String getAlias_count() { - return alias_count; + return aliasCount; } } diff --git a/core/src/com/cloud/agent/api/routing/LoadBalancerConfigCommand.java b/core/src/com/cloud/agent/api/routing/LoadBalancerConfigCommand.java index 5c54375dba6..06ef62b104f 100644 --- a/core/src/com/cloud/agent/api/routing/LoadBalancerConfigCommand.java +++ b/core/src/com/cloud/agent/api/routing/LoadBalancerConfigCommand.java @@ -46,12 +46,12 @@ public class LoadBalancerConfigCommand extends NetworkElementCommand { this.vpcId = vpcId; } - public LoadBalancerConfigCommand(LoadBalancerTO[] loadBalancers, String PublicIp, String GuestIp, String PrivateIp, NicTO nic, Long vpcId, String maxconn, + public LoadBalancerConfigCommand(LoadBalancerTO[] loadBalancers, String publicIp, String guestIp, String privateIp, NicTO nic, Long vpcId, String maxconn, boolean keepAliveEnabled) { this.loadBalancers = loadBalancers; - this.lbStatsPublicIP = PublicIp; - this.lbStatsPrivateIP = PrivateIp; - this.lbStatsGuestIP = GuestIp; + this.lbStatsPublicIP = publicIp; + this.lbStatsPrivateIP = privateIp; + this.lbStatsGuestIP = guestIp; this.nic = nic; this.vpcId = vpcId; this.maxconn = maxconn; diff --git a/core/src/com/cloud/agent/api/storage/AbstractDownloadCommand.java b/core/src/com/cloud/agent/api/storage/AbstractDownloadCommand.java index 097717503a7..097af66ad00 100644 --- a/core/src/com/cloud/agent/api/storage/AbstractDownloadCommand.java +++ b/core/src/com/cloud/agent/api/storage/AbstractDownloadCommand.java @@ -18,7 +18,7 @@ package com.cloud.agent.api.storage; import com.cloud.storage.Storage.ImageFormat; -public abstract class AbstractDownloadCommand extends ssCommand { +public abstract class AbstractDownloadCommand extends SsCommand { private String url; private ImageFormat format; diff --git a/core/src/com/cloud/agent/api/storage/CreatePrivateTemplateAnswer.java b/core/src/com/cloud/agent/api/storage/CreatePrivateTemplateAnswer.java index 56d9c30912c..250405eedb2 100644 --- a/core/src/com/cloud/agent/api/storage/CreatePrivateTemplateAnswer.java +++ b/core/src/com/cloud/agent/api/storage/CreatePrivateTemplateAnswer.java @@ -61,8 +61,8 @@ public class CreatePrivateTemplateAnswer extends Answer { _virtualSize = virtualSize; } - public void setphysicalSize(long _physicalSize) { - this._physicalSize = _physicalSize; + public void setphysicalSize(long physicalSize) { + this._physicalSize = physicalSize; } public long getphysicalSize() { diff --git a/core/src/com/cloud/agent/api/storage/ssCommand.java b/core/src/com/cloud/agent/api/storage/SsCommand.java similarity index 88% rename from core/src/com/cloud/agent/api/storage/ssCommand.java rename to core/src/com/cloud/agent/api/storage/SsCommand.java index 939e394705f..d4a6e5b73cd 100644 --- a/core/src/com/cloud/agent/api/storage/ssCommand.java +++ b/core/src/com/cloud/agent/api/storage/SsCommand.java @@ -18,17 +18,17 @@ package com.cloud.agent.api.storage; import com.cloud.agent.api.Command; -public abstract class ssCommand extends Command { +public abstract class SsCommand extends Command { private String secUrl; - public ssCommand() { + public SsCommand() { } - protected ssCommand(ssCommand that) { + protected SsCommand(SsCommand that) { this.secUrl = that.secUrl; } - public ssCommand(String secUrl) { + public SsCommand(String secUrl) { this.secUrl = secUrl; } diff --git a/core/src/com/cloud/info/RunningHostInfoAgregator.java b/core/src/com/cloud/info/RunningHostInfoAgregator.java index 689cdeb66e9..cec8037ccc9 100644 --- a/core/src/com/cloud/info/RunningHostInfoAgregator.java +++ b/core/src/com/cloud/info/RunningHostInfoAgregator.java @@ -24,9 +24,9 @@ import com.cloud.host.Host; public class RunningHostInfoAgregator { public static class ZoneHostInfo { - public static int ROUTING_HOST_MASK = 2; - public static int STORAGE_HOST_MASK = 4; - public static int ALL_HOST_MASK = ROUTING_HOST_MASK | STORAGE_HOST_MASK; + public static final int ROUTING_HOST_MASK = 2; + public static final int STORAGE_HOST_MASK = 4; + public static final int ALL_HOST_MASK = ROUTING_HOST_MASK | STORAGE_HOST_MASK; private long dcId; @@ -51,7 +51,7 @@ public class RunningHostInfoAgregator { } } - private Map zoneHostInfoMap = new HashMap(); + private final Map zoneHostInfoMap = new HashMap(); public RunningHostInfoAgregator() { } diff --git a/core/src/com/cloud/network/LoadBalancerValidator.java b/core/src/com/cloud/network/LoadBalancerValidator.java index 3fb8a2f89ab..f3188999f4e 100644 --- a/core/src/com/cloud/network/LoadBalancerValidator.java +++ b/core/src/com/cloud/network/LoadBalancerValidator.java @@ -16,7 +16,6 @@ // under the License. package com.cloud.network; -import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.lb.LoadBalancingRule; public interface LoadBalancerValidator { @@ -24,7 +23,6 @@ public interface LoadBalancerValidator { * Validate rules * @param rule * @return true/false. If there are no validation then true should be return. - * @throws ResourceUnavailableException */ public boolean validateLBRule(LoadBalancingRule rule); } diff --git a/core/src/com/cloud/network/resource/TrafficSentinelResource.java b/core/src/com/cloud/network/resource/TrafficSentinelResource.java index ada5f5e1d6d..67c0dd42f86 100644 --- a/core/src/com/cloud/network/resource/TrafficSentinelResource.java +++ b/core/src/com/cloud/network/resource/TrafficSentinelResource.java @@ -243,11 +243,11 @@ public class TrafficSentinelResource implements ServerResource { return answer; } - private String getScript(List Ips, Date start, Date end) { + private String getScript(List ips, Date start, Date end) { String IpAddresses = ""; - for (int i = 0; i < Ips.size(); i++) { - IpAddresses += Ips.get(i); - if (i != (Ips.size() - 1)) { + for (int i = 0; i < ips.size(); i++) { + IpAddresses += ips.get(i); + if (i != (ips.size() - 1)) { // Append comma for all Ips except the last Ip IpAddresses += ","; } diff --git a/core/src/com/cloud/storage/template/HttpTemplateDownloader.java b/core/src/com/cloud/storage/template/HttpTemplateDownloader.java index f3d34b06c96..b57f6d40c67 100644 --- a/core/src/com/cloud/storage/template/HttpTemplateDownloader.java +++ b/core/src/com/cloud/storage/template/HttpTemplateDownloader.java @@ -72,7 +72,7 @@ public class HttpTemplateDownloader extends ManagedContextRunnable implements Te boolean inited = true; private String toDir; - private long MAX_TEMPLATE_SIZE_IN_BYTES; + private long maxTemplateSizeInBytes; private ResourceType resourceType = ResourceType.TEMPLATE; private final HttpMethodRetryHandler myretryhandler; @@ -83,7 +83,7 @@ public class HttpTemplateDownloader extends ManagedContextRunnable implements Te setToDir(toDir); status = TemplateDownloader.Status.NOT_STARTED; this.resourceType = resourceType; - MAX_TEMPLATE_SIZE_IN_BYTES = maxTemplateSizeInBytes; + this.maxTemplateSizeInBytes = maxTemplateSizeInBytes; totalBytes = 0; client = new HttpClient(s_httpClientManager); @@ -217,15 +217,15 @@ public class HttpTemplateDownloader extends ManagedContextRunnable implements Te remoteSize = remoteSize2; } - if (remoteSize > MAX_TEMPLATE_SIZE_IN_BYTES) { - s_logger.info("Remote size is too large: " + remoteSize + " , max=" + MAX_TEMPLATE_SIZE_IN_BYTES); + if (remoteSize > maxTemplateSizeInBytes) { + s_logger.info("Remote size is too large: " + remoteSize + " , max=" + maxTemplateSizeInBytes); status = Status.UNRECOVERABLE_ERROR; errorString = "Download file size is too large"; return 0; } if (remoteSize == 0) { - remoteSize = MAX_TEMPLATE_SIZE_IN_BYTES; + remoteSize = maxTemplateSizeInBytes; } InputStream in = !chunked ? new BufferedInputStream(request.getResponseBodyAsStream()) : new ChunkedInputStream(request.getResponseBodyAsStream()); @@ -233,7 +233,7 @@ public class HttpTemplateDownloader extends ManagedContextRunnable implements Te RandomAccessFile out = new RandomAccessFile(file, "rwd"); out.seek(localFileSize); - s_logger.info("Starting download from " + getDownloadUrl() + " to " + toFile + " remoteSize=" + remoteSize + " , max size=" + MAX_TEMPLATE_SIZE_IN_BYTES); + s_logger.info("Starting download from " + getDownloadUrl() + " to " + toFile + " remoteSize=" + remoteSize + " , max size=" + maxTemplateSizeInBytes); byte[] block = new byte[CHUNK_SIZE]; long offset = 0; @@ -387,7 +387,7 @@ public class HttpTemplateDownloader extends ManagedContextRunnable implements Te @Override public long getMaxTemplateSizeInBytes() { - return MAX_TEMPLATE_SIZE_IN_BYTES; + return maxTemplateSizeInBytes; } public static void main(String[] args) { diff --git a/core/src/com/cloud/storage/template/TemplateDownloaderBase.java b/core/src/com/cloud/storage/template/TemplateDownloaderBase.java index 7eb0b5fa669..e3fec8ee5a4 100644 --- a/core/src/com/cloud/storage/template/TemplateDownloaderBase.java +++ b/core/src/com/cloud/storage/template/TemplateDownloaderBase.java @@ -40,7 +40,7 @@ public abstract class TemplateDownloaderBase extends ManagedContextRunnable impl protected long _start; protected StorageLayer _storage; protected boolean _inited = false; - private long MAX_TEMPLATE_SIZE_IN_BYTES; + private long maxTemplateSizeInBytes; public TemplateDownloaderBase(StorageLayer storage, String downloadUrl, String toDir, long maxTemplateSizeInBytes, DownloadCompleteCallback callback) { _storage = storage; @@ -49,7 +49,7 @@ public abstract class TemplateDownloaderBase extends ManagedContextRunnable impl _callback = callback; _inited = true; - this.MAX_TEMPLATE_SIZE_IN_BYTES = maxTemplateSizeInBytes; + this.maxTemplateSizeInBytes = maxTemplateSizeInBytes; } @Override @@ -122,7 +122,7 @@ public abstract class TemplateDownloaderBase extends ManagedContextRunnable impl @Override public long getMaxTemplateSizeInBytes() { - return this.MAX_TEMPLATE_SIZE_IN_BYTES; + return this.maxTemplateSizeInBytes; } @Override diff --git a/core/src/com/cloud/storage/template/VhdProcessor.java b/core/src/com/cloud/storage/template/VhdProcessor.java index 308ea6472ef..2e4ac44dcd4 100644 --- a/core/src/com/cloud/storage/template/VhdProcessor.java +++ b/core/src/com/cloud/storage/template/VhdProcessor.java @@ -45,11 +45,11 @@ public class VhdProcessor extends AdapterBase implements Processor { private static final Logger s_logger = Logger.getLogger(VhdProcessor.class); StorageLayer _storage; - private int vhd_footer_size = 512; - private int vhd_footer_creator_app_offset = 28; - private int vhd_footer_creator_ver_offset = 32; - private int vhd_footer_current_size_offset = 48; - private byte[][] citrix_creator_app = { {0x74, 0x61, 0x70, 0x00}, {0x43, 0x54, 0x58, 0x53}}; /*"tap ", and "CTXS"*/ + private int vhdFooterSize = 512; + private int vhdFooterCreatorAppOffset = 28; + private int vhdFooterCreatorVerOffset = 32; + private int vhdFooterCurrentSizeOffset = 48; + private byte[][] citrixCreatorApp = { {0x74, 0x61, 0x70, 0x00}, {0x43, 0x54, 0x58, 0x53}}; /*"tap ", and "CTXS"*/ @Override public FormatInfo process(String templatePath, ImageFormat format, String templateName) throws InternalErrorException { @@ -77,9 +77,9 @@ public class VhdProcessor extends AdapterBase implements Processor { byte[] creatorApp = new byte[4]; try { strm = new FileInputStream(vhdFile); - strm.skip(info.size - vhd_footer_size + vhd_footer_creator_app_offset); + strm.skip(info.size - vhdFooterSize + vhdFooterCreatorAppOffset); strm.read(creatorApp); - strm.skip(vhd_footer_current_size_offset - vhd_footer_creator_ver_offset); + strm.skip(vhdFooterCurrentSizeOffset - vhdFooterCreatorVerOffset); strm.read(currentSize); } catch (Exception e) { s_logger.warn("Unable to read vhd file " + vhdPath, e); @@ -108,9 +108,9 @@ public class VhdProcessor extends AdapterBase implements Processor { byte[] creatorApp = new byte[4]; try { strm = new FileInputStream(file); - strm.skip(file.length() - vhd_footer_size + vhd_footer_creator_app_offset); + strm.skip(file.length() - vhdFooterSize + vhdFooterCreatorAppOffset); strm.read(creatorApp); - strm.skip(vhd_footer_current_size_offset - vhd_footer_creator_ver_offset); + strm.skip(vhdFooterCurrentSizeOffset - vhdFooterCreatorVerOffset); strm.read(currentSize); } catch (Exception e) { s_logger.warn("Unable to read vhd file " + file.getAbsolutePath(), e); @@ -141,8 +141,8 @@ public class VhdProcessor extends AdapterBase implements Processor { private void imageSignatureCheck(byte[] creatorApp) throws InternalErrorException { boolean findKnownCreator = false; - for (int i = 0; i < citrix_creator_app.length; i++) { - if (Arrays.equals(creatorApp, citrix_creator_app[i])) { + for (int i = 0; i < citrixCreatorApp.length; i++) { + if (Arrays.equals(creatorApp, citrixCreatorApp[i])) { findKnownCreator = true; break; } diff --git a/core/src/org/apache/cloudstack/storage/command/DownloadCommand.java b/core/src/org/apache/cloudstack/storage/command/DownloadCommand.java index 60377fa569d..c12d4d02bff 100644 --- a/core/src/org/apache/cloudstack/storage/command/DownloadCommand.java +++ b/core/src/org/apache/cloudstack/storage/command/DownloadCommand.java @@ -158,8 +158,8 @@ public class DownloadCommand extends AbstractDownloadCommand implements Internal return _store; } - public void setDataStore(DataStoreTO _store) { - this._store = _store; + public void setDataStore(DataStoreTO store) { + this._store = store; } public String getInstallPath() { diff --git a/deps/XenServerJava/src/com/xensource/xenapi/APIVersion.java b/deps/XenServerJava/src/com/xensource/xenapi/APIVersion.java index 174cf5ad581..8d7247d4fc3 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/APIVersion.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/APIVersion.java @@ -91,28 +91,28 @@ public enum APIVersion { switch (this) { - case API_1_1: - return "1.1"; - case API_1_2: - return "1.2"; - case API_1_3: - return "1.3"; - case API_1_4: - return "1.4"; - case API_1_5: - return "1.5"; - case API_1_6: - return "1.6"; - case API_1_7: - return "1.7"; - case API_1_8: - return "1.8"; - case API_1_9: - return "1.9"; - case API_1_10: - return "1.10"; - default: - return "Unknown"; + case API_1_1: + return "1.1"; + case API_1_2: + return "1.2"; + case API_1_3: + return "1.3"; + case API_1_4: + return "1.4"; + case API_1_5: + return "1.5"; + case API_1_6: + return "1.6"; + case API_1_7: + return "1.7"; + case API_1_8: + return "1.8"; + case API_1_9: + return "1.9"; + case API_1_10: + return "1.10"; + default: + return "Unknown"; } } } diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Auth.java b/deps/XenServerJava/src/com/xensource/xenapi/Auth.java index fd84390d2a5..cffaaaca965 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Auth.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Auth.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -52,7 +51,6 @@ import org.apache.xmlrpc.XmlRpcException; */ public class Auth extends XenAPIObject { - public String toWireString() { return null; } @@ -64,15 +62,15 @@ public class Auth extends XenAPIObject { * @return the subject_identifier obtained from the external directory service */ public static String getSubjectIdentifier(Connection c, String subjectName) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "auth.get_subject_identifier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectName)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -82,15 +80,15 @@ public class Auth extends XenAPIObject { * @return key-value pairs containing at least a key called subject_name */ public static Map getSubjectInformationFromIdentifier(Connection c, String subjectIdentifier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "auth.get_subject_information_from_identifier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectIdentifier)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -100,15 +98,15 @@ public class Auth extends XenAPIObject { * @return set of subject_identifiers that provides the group membership of subject_identifier passed as argument, it contains, recursively, all groups a subject_identifier is member of. */ public static Set getGroupMembership(Connection c, String subjectIdentifier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "auth.get_group_membership"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectIdentifier)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Blob.java b/deps/XenServerJava/src/com/xensource/xenapi/Blob.java index eeff12e709b..494b9286407 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Blob.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Blob.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Blob extends XenAPIObject { * For internal use only. */ Blob(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Blob extends XenAPIObject { { if (obj != null && obj instanceof Blob) { - Blob other = (Blob) obj; + Blob other = (Blob)obj; return other.ref.equals(this.ref); } else { @@ -113,8 +112,8 @@ public class Blob extends XenAPIObject { /** * Convert a blob.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -161,15 +160,15 @@ public class Blob extends XenAPIObject { * @return all fields from the object */ public Blob.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlobRecord(result); + return Types.toBlobRecord(result); } /** @@ -179,15 +178,15 @@ public class Blob extends XenAPIObject { * @return reference to the object */ public static Blob getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -197,15 +196,15 @@ public class Blob extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfBlob(result); + return Types.toSetOfBlob(result); } /** @@ -214,15 +213,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -231,15 +230,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -248,15 +247,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -265,15 +264,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public Long getSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -282,15 +281,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public Boolean getPublic(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_public"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -299,15 +298,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -316,15 +315,15 @@ public class Blob extends XenAPIObject { * @return value of the field */ public String getMimeType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_mime_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -333,9 +332,9 @@ public class Blob extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -349,9 +348,9 @@ public class Blob extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -365,9 +364,9 @@ public class Blob extends XenAPIObject { * @param _public New value to set */ public void setPublic(Connection c, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.set_public"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(_public)}; @@ -383,15 +382,15 @@ public class Blob extends XenAPIObject { * @return The reference to the created blob */ public static Blob create(Connection c, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -399,9 +398,9 @@ public class Blob extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -415,15 +414,15 @@ public class Blob extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfBlob(result); + return Types.toSetOfBlob(result); } /** @@ -432,15 +431,15 @@ public class Blob extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "blob.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfBlobBlobRecord(result); + return Types.toMapOfBlobBlobRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Bond.java b/deps/XenServerJava/src/com/xensource/xenapi/Bond.java index d9d30459e6e..935fd9847e5 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Bond.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Bond.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Bond extends XenAPIObject { * For internal use only. */ Bond(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Bond extends XenAPIObject { { if (obj != null && obj instanceof Bond) { - Bond other = (Bond) obj; + Bond other = (Bond)obj; return other.ref.equals(this.ref); } else { @@ -114,8 +113,8 @@ public class Bond extends XenAPIObject { /** * Convert a Bond.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("master", this.master == null ? new PIF("OpaqueRef:NULL") : this.master); map.put("slaves", this.slaves == null ? new LinkedHashSet() : this.slaves); @@ -167,15 +166,15 @@ public class Bond extends XenAPIObject { * @return all fields from the object */ public Bond.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBondRecord(result); + return Types.toBondRecord(result); } /** @@ -185,15 +184,15 @@ public class Bond extends XenAPIObject { * @return reference to the object */ public static Bond getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBond(result); + return Types.toBond(result); } /** @@ -202,15 +201,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -219,15 +218,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public PIF getMaster(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -236,15 +235,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public Set getSlaves(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_slaves"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -253,15 +252,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -270,15 +269,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public PIF getPrimarySlave(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_primary_slave"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -287,15 +286,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public Types.BondMode getMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBondMode(result); + return Types.toBondMode(result); } /** @@ -304,15 +303,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public Map getProperties(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_properties"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -321,15 +320,15 @@ public class Bond extends XenAPIObject { * @return value of the field */ public Long getLinksUp(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_links_up"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -338,9 +337,9 @@ public class Bond extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -355,9 +354,9 @@ public class Bond extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -371,9 +370,9 @@ public class Bond extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -392,12 +391,13 @@ public class Bond extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, Network network, Set members, String MAC, Types.BondMode mode, Map properties) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.Bond.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(members), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(properties)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(members), Marshalling.toXMLRPC(MAC), + Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(properties)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -414,15 +414,16 @@ public class Bond extends XenAPIObject { * @return The reference of the created Bond object */ public static Bond create(Connection c, Network network, Set members, String MAC, Types.BondMode mode, Map properties) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(members), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(properties)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(members), Marshalling.toXMLRPC(MAC), + Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(properties)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBond(result); + return Types.toBond(result); } /** @@ -431,9 +432,9 @@ public class Bond extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.Bond.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -447,9 +448,9 @@ public class Bond extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -464,9 +465,9 @@ public class Bond extends XenAPIObject { * @return Task */ public Task setModeAsync(Connection c, Types.BondMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.Bond.set_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -481,9 +482,9 @@ public class Bond extends XenAPIObject { * @param value The new bond mode */ public void setMode(Connection c, Types.BondMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.set_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -499,9 +500,9 @@ public class Bond extends XenAPIObject { * @return Task */ public Task setPropertyAsync(Connection c, String name, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.Bond.set_property"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(value)}; @@ -517,9 +518,9 @@ public class Bond extends XenAPIObject { * @param value The property value */ public void setProperty(Connection c, String name, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.set_property"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(value)}; @@ -533,15 +534,15 @@ public class Bond extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfBond(result); + return Types.toSetOfBond(result); } /** @@ -550,15 +551,15 @@ public class Bond extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Bond.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfBondBondRecord(result); + return Types.toMapOfBondBondRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Connection.java b/deps/XenServerJava/src/com/xensource/xenapi/Connection.java index 20ed00118b1..a6524503609 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Connection.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Connection.java @@ -101,7 +101,7 @@ public class Connection */ @Deprecated public Connection(String client, String username, String password) throws java.net.MalformedURLException, - XmlRpcException, BadServerResponse, SessionAuthenticationFailed, XenAPIException + XmlRpcException, BadServerResponse, SessionAuthenticationFailed, XenAPIException { deprecatedConstructorUsed = true; @@ -121,9 +121,9 @@ public class Connection //was the problem that the host was running rio? If so it will have complained that it got three parameters //instead of two. Let us carefully verify the details of this complaint if (0 == errDesc[0].compareTo("MESSAGE_PARAMETER_COUNT_MISMATCH") - && 0 == errDesc[1].compareTo("session.login_with_password") - && 0 == errDesc[2].compareTo("2") - && 0 == errDesc[3].compareTo("3")) + && 0 == errDesc[1].compareTo("session.login_with_password") + && 0 == errDesc[2].compareTo("2") + && 0 == errDesc[3].compareTo("3")) { //and if so, we can have another go, using the older login method, and see how that goes. this.sessionReference = loginWithPassword(this.client, username, password); @@ -139,13 +139,11 @@ public class Connection try { setAPIVersion(new Session(sessionReference)); - } - catch (XenAPIException exn) + } catch (XenAPIException exn) { dispose(); throw exn; - } - catch (XmlRpcException exn) + } catch (XmlRpcException exn) { dispose(); throw exn; @@ -208,12 +206,11 @@ public class Connection if (sessionReference != null) { String method_call = "session.logout"; - Object[] method_params = { Marshalling.toXMLRPC(this.sessionReference) }; + Object[] method_params = {Marshalling.toXMLRPC(this.sessionReference)}; client.execute(method_call, method_params); sessionReference = null; } - } - catch (XmlRpcException exn) + } catch (XmlRpcException exn) { } } @@ -223,17 +220,17 @@ public class Connection */ @Deprecated private static String loginWithPassword(XmlRpcClient client, String username, String password) - throws BadServerResponse, XmlRpcException, SessionAuthenticationFailed + throws BadServerResponse, XmlRpcException, SessionAuthenticationFailed { String method_call = "session.login_with_password"; - Object[] method_params = { Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password) }; - Map response = (Map) client.execute(method_call, method_params); + Object[] method_params = {Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password)}; + Map response = (Map)client.execute(method_call, method_params); if (response.get("Status").equals("Success")) { - return (String) response.get("Value"); + return (String)response.get("Value"); } else if (response.get("Status").equals("Failure")) { - Object[] error = (Object[]) response.get("ErrorDescription"); + Object[] error = (Object[])response.get("ErrorDescription"); if (error[0].equals("SESSION_AUTHENTICATION_FAILED")) { throw new SessionAuthenticationFailed(); @@ -247,18 +244,18 @@ public class Connection */ @Deprecated private static String loginWithPassword(XmlRpcClient client, String username, String password, String ApiVersion) - throws BadServerResponse, XmlRpcException, SessionAuthenticationFailed + throws BadServerResponse, XmlRpcException, SessionAuthenticationFailed { String method_call = "session.login_with_password"; - Object[] method_params = { Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), - Marshalling.toXMLRPC(ApiVersion) }; - Map response = (Map) client.execute(method_call, method_params); + Object[] method_params = {Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), + Marshalling.toXMLRPC(ApiVersion)}; + Map response = (Map)client.execute(method_call, method_params); if (response.get("Status").equals("Success")) { - return (String) response.get("Value"); + return (String)response.get("Value"); } else if (response.get("Status").equals("Failure")) { - Object[] error = (Object[]) response.get("ErrorDescription"); + Object[] error = (Object[])response.get("ErrorDescription"); if (error[0].equals("SESSION_AUTHENTICATION_FAILED")) { throw new SessionAuthenticationFailed(); @@ -271,8 +268,9 @@ public class Connection public XmlRpcClientConfigImpl getConfig() { - return config; + return config; } + private XmlRpcClient getClientFromURL(URL url) { config.setTimeZone(TimeZone.getTimeZone("UTC")); @@ -300,7 +298,7 @@ public class Connection */ protected Map dispatch(String method_call, Object[] method_params) throws XmlRpcException, XenAPIException { - Map response = (Map) client.execute(method_call, method_params); + Map response = (Map)client.execute(method_call, method_params); if (!deprecatedConstructorUsed) { @@ -316,7 +314,7 @@ public class Connection setAPIVersion(session); } else if (method_call.equals("session.slave_local_login_with_password") && - response.get("Status").equals("Success")) + response.get("Status").equals("Success")) { // Store the Session reference and assume the latest API version. sessionReference = Types.toSession(response.get("Value")).ref; @@ -331,7 +329,7 @@ public class Connection // this session from the master instead. if (response.get("Status").equals("Failure")) { - Object[] error = (Object[]) response.get("ErrorDescription"); + Object[] error = (Object[])response.get("ErrorDescription"); if (error.length == 2 && error[0].equals("HOST_IS_SLAVE")) { try @@ -340,20 +338,18 @@ public class Connection ((XmlRpcHttpClientConfig)client.getClientConfig()).getServerURL(); Connection tmp_conn = new Connection(new URL(client_url.getProtocol(), - (String)error[1], - client_url.getPort(), - client_url.getFile()), _wait); + (String)error[1], + client_url.getPort(), + client_url.getFile()), _wait); tmp_conn.sessionReference = sessionReference; try { Session.logout(tmp_conn); - } - finally + } finally { tmp_conn.dispose(); } - } - catch (Exception exn2) + } catch (Exception exn2) { // Ignore -- we're going to throw HostIsSlave anyway. } @@ -368,7 +364,6 @@ public class Connection return Types.checkResponse(response); } - private void setAPIVersion(Session session) throws XenAPIException, XmlRpcException { try @@ -376,8 +371,7 @@ public class Connection long major = session.getThisHost(this).getAPIVersionMajor(this); long minor = session.getThisHost(this).getAPIVersionMinor(this); apiVersion = APIVersion.fromMajorMinor(major, minor); - } - catch (BadServerResponse exn) + } catch (BadServerResponse exn) { apiVersion = APIVersion.API_1_1; } diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Console.java b/deps/XenServerJava/src/com/xensource/xenapi/Console.java index c734a839629..ac2c9a7ce8a 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Console.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Console.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Console extends XenAPIObject { * For internal use only. */ Console(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Console extends XenAPIObject { { if (obj != null && obj instanceof Console) { - Console other = (Console) obj; + Console other = (Console)obj; return other.ref.equals(this.ref); } else { @@ -111,8 +110,8 @@ public class Console extends XenAPIObject { /** * Convert a console.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("protocol", this.protocol == null ? Types.ConsoleProtocol.UNRECOGNIZED : this.protocol); map.put("location", this.location == null ? "" : this.location); @@ -149,15 +148,15 @@ public class Console extends XenAPIObject { * @return all fields from the object */ public Console.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toConsoleRecord(result); + return Types.toConsoleRecord(result); } /** @@ -167,15 +166,15 @@ public class Console extends XenAPIObject { * @return reference to the object */ public static Console getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toConsole(result); + return Types.toConsole(result); } /** @@ -185,9 +184,9 @@ public class Console extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, Console.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.console.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -204,16 +203,16 @@ public class Console extends XenAPIObject { * @return reference to the newly created object */ public static Console create(Connection c, Console.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toConsole(result); + return Types.toConsole(result); } /** @@ -222,9 +221,9 @@ public class Console extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.console.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -238,9 +237,9 @@ public class Console extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -254,15 +253,15 @@ public class Console extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -271,15 +270,15 @@ public class Console extends XenAPIObject { * @return value of the field */ public Types.ConsoleProtocol getProtocol(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_protocol"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toConsoleProtocol(result); + return Types.toConsoleProtocol(result); } /** @@ -288,15 +287,15 @@ public class Console extends XenAPIObject { * @return value of the field */ public String getLocation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_location"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -305,15 +304,15 @@ public class Console extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -322,15 +321,15 @@ public class Console extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -339,9 +338,9 @@ public class Console extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -356,9 +355,9 @@ public class Console extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -372,9 +371,9 @@ public class Console extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -388,15 +387,15 @@ public class Console extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfConsole(result); + return Types.toSetOfConsole(result); } /** @@ -405,15 +404,15 @@ public class Console extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "console.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfConsoleConsoleRecord(result); + return Types.toMapOfConsoleConsoleRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Crashdump.java b/deps/XenServerJava/src/com/xensource/xenapi/Crashdump.java index d1187bb4a7a..be11588cc25 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Crashdump.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Crashdump.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Crashdump extends XenAPIObject { * For internal use only. */ Crashdump(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Crashdump extends XenAPIObject { { if (obj != null && obj instanceof Crashdump) { - Crashdump other = (Crashdump) obj; + Crashdump other = (Crashdump)obj; return other.ref.equals(this.ref); } else { @@ -110,8 +109,8 @@ public class Crashdump extends XenAPIObject { /** * Convert a crashdump.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("VM", this.VM == null ? new VM("OpaqueRef:NULL") : this.VM); map.put("VDI", this.VDI == null ? new VDI("OpaqueRef:NULL") : this.VDI); @@ -143,15 +142,15 @@ public class Crashdump extends XenAPIObject { * @return all fields from the object */ public Crashdump.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toCrashdumpRecord(result); + return Types.toCrashdumpRecord(result); } /** @@ -161,15 +160,15 @@ public class Crashdump extends XenAPIObject { * @return reference to the object */ public static Crashdump getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toCrashdump(result); + return Types.toCrashdump(result); } /** @@ -178,15 +177,15 @@ public class Crashdump extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -195,15 +194,15 @@ public class Crashdump extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -212,15 +211,15 @@ public class Crashdump extends XenAPIObject { * @return value of the field */ public VDI getVDI(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_VDI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -229,15 +228,15 @@ public class Crashdump extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -246,9 +245,9 @@ public class Crashdump extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -263,9 +262,9 @@ public class Crashdump extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -279,9 +278,9 @@ public class Crashdump extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -295,9 +294,9 @@ public class Crashdump extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.crashdump.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -311,9 +310,9 @@ public class Crashdump extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -327,15 +326,15 @@ public class Crashdump extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfCrashdump(result); + return Types.toSetOfCrashdump(result); } /** @@ -344,15 +343,15 @@ public class Crashdump extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "crashdump.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfCrashdumpCrashdumpRecord(result); + return Types.toMapOfCrashdumpCrashdumpRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/DRTask.java b/deps/XenServerJava/src/com/xensource/xenapi/DRTask.java index 9694faa3c3c..14a5e4064a7 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/DRTask.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/DRTask.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class DRTask extends XenAPIObject { * For internal use only. */ DRTask(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class DRTask extends XenAPIObject { { if (obj != null && obj instanceof DRTask) { - DRTask other = (DRTask) obj; + DRTask other = (DRTask)obj; return other.ref.equals(this.ref); } else { @@ -108,8 +107,8 @@ public class DRTask extends XenAPIObject { /** * Convert a DR_task.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("introduced_SRs", this.introducedSRs == null ? new LinkedHashSet() : this.introducedSRs); return map; @@ -131,15 +130,15 @@ public class DRTask extends XenAPIObject { * @return all fields from the object */ public DRTask.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDRTaskRecord(result); + return Types.toDRTaskRecord(result); } /** @@ -149,15 +148,15 @@ public class DRTask extends XenAPIObject { * @return reference to the object */ public static DRTask getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDRTask(result); + return Types.toDRTask(result); } /** @@ -166,15 +165,15 @@ public class DRTask extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -183,15 +182,15 @@ public class DRTask extends XenAPIObject { * @return value of the field */ public Set getIntroducedSRs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_introduced_SRs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSR(result); + return Types.toSetOfSR(result); } /** @@ -203,9 +202,9 @@ public class DRTask extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, String type, Map deviceConfig, Set whitelist) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.DR_task.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(whitelist)}; @@ -223,15 +222,15 @@ public class DRTask extends XenAPIObject { * @return The reference to the created task */ public static DRTask create(Connection c, String type, Map deviceConfig, Set whitelist) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(whitelist)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDRTask(result); + return Types.toDRTask(result); } /** @@ -240,9 +239,9 @@ public class DRTask extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.DR_task.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -256,9 +255,9 @@ public class DRTask extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -272,15 +271,15 @@ public class DRTask extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfDRTask(result); + return Types.toSetOfDRTask(result); } /** @@ -289,15 +288,15 @@ public class DRTask extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "DR_task.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfDRTaskDRTaskRecord(result); + return Types.toMapOfDRTaskDRTaskRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/DataSource.java b/deps/XenServerJava/src/com/xensource/xenapi/DataSource.java index a0f46fb4fe8..5f777a32197 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/DataSource.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/DataSource.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class DataSource extends XenAPIObject { * For internal use only. */ DataSource(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class DataSource extends XenAPIObject { { if (obj != null && obj instanceof DataSource) { - DataSource other = (DataSource) obj; + DataSource other = (DataSource)obj; return other.ref.equals(this.ref); } else { @@ -114,8 +113,8 @@ public class DataSource extends XenAPIObject { /** * Convert a data_source.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); map.put("enabled", this.enabled == null ? false : this.enabled); diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Event.java b/deps/XenServerJava/src/com/xensource/xenapi/Event.java index 3574cd19b0f..68594fb7fe9 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Event.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Event.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Event extends XenAPIObject { * For internal use only. */ Event(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Event extends XenAPIObject { { if (obj != null && obj instanceof Event) { - Event other = (Event) obj; + Event other = (Event)obj; return other.ref.equals(this.ref); } else { @@ -113,8 +112,8 @@ public class Event extends XenAPIObject { /** * Convert a event.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("id", this.id == null ? 0 : this.id); map.put("timestamp", this.timestamp == null ? new Date(0) : this.timestamp); map.put("class", this.clazz == null ? "" : this.clazz); @@ -163,9 +162,9 @@ public class Event extends XenAPIObject { * @return Task */ public static Task registerAsync(Connection c, Set classes) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.event.register"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(classes)}; @@ -180,9 +179,9 @@ public class Event extends XenAPIObject { * @param classes register for events for the indicated classes */ public static void register(Connection c, Set classes) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "event.register"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(classes)}; @@ -197,9 +196,9 @@ public class Event extends XenAPIObject { * @return Task */ public static Task unregisterAsync(Connection c, Set classes) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.event.unregister"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(classes)}; @@ -214,9 +213,9 @@ public class Event extends XenAPIObject { * @param classes remove this session's registration for the indicated classes */ public static void unregister(Connection c, Set classes) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "event.unregister"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(classes)}; @@ -230,17 +229,17 @@ public class Event extends XenAPIObject { * @return the batch of events */ public static Set next(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SessionNotRegistered, - Types.EventsLost { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SessionNotRegistered, + Types.EventsLost { String method_call = "event.next"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfEventRecord(result); + return Types.toSetOfEventRecord(result); } /** @@ -252,17 +251,17 @@ public class Event extends XenAPIObject { * @return the batch of events */ public static Set from(Connection c, Set classes, String token, Double timeout) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SessionNotRegistered, - Types.EventsLost { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SessionNotRegistered, + Types.EventsLost { String method_call = "event.from"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(classes), Marshalling.toXMLRPC(token), Marshalling.toXMLRPC(timeout)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfEventRecord(result); + return Types.toSetOfEventRecord(result); } /** @@ -271,15 +270,15 @@ public class Event extends XenAPIObject { * @return the event ID */ public static Long getCurrentId(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "event.get_current_id"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -290,15 +289,15 @@ public class Event extends XenAPIObject { * @return the event ID */ public static String inject(Connection c, String clazz, String ref) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "event.inject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(clazz), Marshalling.toXMLRPC(ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/GPUGroup.java b/deps/XenServerJava/src/com/xensource/xenapi/GPUGroup.java index fbd7d7d59dd..90704462703 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/GPUGroup.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/GPUGroup.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class GPUGroup extends XenAPIObject { * For internal use only. */ GPUGroup(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class GPUGroup extends XenAPIObject { { if (obj != null && obj instanceof GPUGroup) { - GPUGroup other = (GPUGroup) obj; + GPUGroup other = (GPUGroup)obj; return other.ref.equals(this.ref); } else { @@ -113,8 +112,8 @@ public class GPUGroup extends XenAPIObject { /** * Convert a GPU_group.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -161,15 +160,15 @@ public class GPUGroup extends XenAPIObject { * @return all fields from the object */ public GPUGroup.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toGPUGroupRecord(result); + return Types.toGPUGroupRecord(result); } /** @@ -179,15 +178,15 @@ public class GPUGroup extends XenAPIObject { * @return reference to the object */ public static GPUGroup getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toGPUGroup(result); + return Types.toGPUGroup(result); } /** @@ -197,15 +196,15 @@ public class GPUGroup extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfGPUGroup(result); + return Types.toSetOfGPUGroup(result); } /** @@ -214,15 +213,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -231,15 +230,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -248,15 +247,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -265,15 +264,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public Set getPGPUs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_PGPUs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPGPU(result); + return Types.toSetOfPGPU(result); } /** @@ -282,15 +281,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public Set getVGPUs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_VGPUs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVGPU(result); + return Types.toSetOfVGPU(result); } /** @@ -299,15 +298,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public Set getGPUTypes(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_GPU_types"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -316,15 +315,15 @@ public class GPUGroup extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -333,9 +332,9 @@ public class GPUGroup extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -349,9 +348,9 @@ public class GPUGroup extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -365,9 +364,9 @@ public class GPUGroup extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -382,9 +381,9 @@ public class GPUGroup extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -398,9 +397,9 @@ public class GPUGroup extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -414,15 +413,15 @@ public class GPUGroup extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfGPUGroup(result); + return Types.toSetOfGPUGroup(result); } /** @@ -431,15 +430,15 @@ public class GPUGroup extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "GPU_group.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfGPUGroupGPUGroupRecord(result); + return Types.toMapOfGPUGroupGPUGroupRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Host.java b/deps/XenServerJava/src/com/xensource/xenapi/Host.java index 2368930b55b..21950482123 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Host.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Host.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Host extends XenAPIObject { * For internal use only. */ Host(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Host extends XenAPIObject { { if (obj != null && obj instanceof Host) { - Host other = (Host) obj; + Host other = (Host)obj; return other.ref.equals(this.ref); } else { @@ -153,8 +152,8 @@ public class Host extends XenAPIObject { /** * Convert a host.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -164,7 +163,8 @@ public class Host extends XenAPIObject { map.put("API_version_major", this.APIVersionMajor == null ? 0 : this.APIVersionMajor); map.put("API_version_minor", this.APIVersionMinor == null ? 0 : this.APIVersionMinor); map.put("API_version_vendor", this.APIVersionVendor == null ? "" : this.APIVersionVendor); - map.put("API_version_vendor_implementation", this.APIVersionVendorImplementation == null ? new HashMap() : this.APIVersionVendorImplementation); + map.put("API_version_vendor_implementation", this.APIVersionVendorImplementation == null ? new HashMap() + : this.APIVersionVendorImplementation); map.put("enabled", this.enabled == null ? false : this.enabled); map.put("software_version", this.softwareVersion == null ? new HashMap() : this.softwareVersion); map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig); @@ -401,15 +401,15 @@ public class Host extends XenAPIObject { * @return all fields from the object */ public Host.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostRecord(result); + return Types.toHostRecord(result); } /** @@ -419,15 +419,15 @@ public class Host extends XenAPIObject { * @return reference to the object */ public static Host getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -437,15 +437,15 @@ public class Host extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHost(result); + return Types.toSetOfHost(result); } /** @@ -454,15 +454,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -471,15 +471,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -488,15 +488,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -505,15 +505,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Long getMemoryOverhead(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -522,15 +522,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostAllowedOperations(result); + return Types.toSetOfHostAllowedOperations(result); } /** @@ -539,15 +539,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringHostAllowedOperations(result); + return Types.toMapOfStringHostAllowedOperations(result); } /** @@ -556,15 +556,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Long getAPIVersionMajor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_API_version_major"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -573,15 +573,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Long getAPIVersionMinor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_API_version_minor"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -590,15 +590,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getAPIVersionVendor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_API_version_vendor"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -607,15 +607,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getAPIVersionVendorImplementation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_API_version_vendor_implementation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -624,15 +624,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Boolean getEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -641,15 +641,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getSoftwareVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_software_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -658,15 +658,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -675,15 +675,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getCapabilities(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_capabilities"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -692,15 +692,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getCpuConfiguration(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_cpu_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -709,15 +709,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getSchedPolicy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_sched_policy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -726,15 +726,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getSupportedBootloaders(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_supported_bootloaders"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -743,15 +743,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getResidentVMs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_resident_VMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -760,15 +760,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getLogging(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_logging"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -777,15 +777,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getPIFs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_PIFs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -794,15 +794,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public SR getSuspendImageSr(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_suspend_image_sr"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -811,15 +811,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public SR getCrashDumpSr(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_crash_dump_sr"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -828,15 +828,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getCrashdumps(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_crashdumps"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostCrashdump(result); + return Types.toSetOfHostCrashdump(result); } /** @@ -845,15 +845,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getPatches(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_patches"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostPatch(result); + return Types.toSetOfHostPatch(result); } /** @@ -862,15 +862,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getPBDs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_PBDs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPBD(result); + return Types.toSetOfPBD(result); } /** @@ -879,15 +879,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getHostCPUs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_host_CPUs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostCpu(result); + return Types.toSetOfHostCpu(result); } /** @@ -896,15 +896,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getCpuInfo(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_cpu_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -913,15 +913,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getHostname(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_hostname"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -930,15 +930,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getAddress(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_address"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -947,15 +947,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public HostMetrics getMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostMetrics(result); + return Types.toHostMetrics(result); } /** @@ -964,15 +964,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getLicenseParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_license_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -981,15 +981,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getHaStatefiles(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_ha_statefiles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -998,15 +998,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getHaNetworkPeers(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_ha_network_peers"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1015,15 +1015,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getBlobs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_blobs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringBlob(result); + return Types.toMapOfStringBlob(result); } /** @@ -1032,15 +1032,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1049,15 +1049,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getExternalAuthType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_external_auth_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1066,15 +1066,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getExternalAuthServiceName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_external_auth_service_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1083,15 +1083,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getExternalAuthConfiguration(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_external_auth_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1100,15 +1100,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getEdition(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_edition"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1117,15 +1117,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getLicenseServer(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_license_server"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1134,15 +1134,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getBiosStrings(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_bios_strings"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1151,15 +1151,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public String getPowerOnMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_power_on_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1168,15 +1168,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getPowerOnConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_power_on_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1185,15 +1185,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public SR getLocalCacheSr(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_local_cache_sr"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -1202,15 +1202,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Map getChipsetInfo(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_chipset_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1219,15 +1219,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getPCIs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_PCIs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPCI(result); + return Types.toSetOfPCI(result); } /** @@ -1236,15 +1236,15 @@ public class Host extends XenAPIObject { * @return value of the field */ public Set getPGPUs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_PGPUs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPGPU(result); + return Types.toSetOfPGPU(result); } /** @@ -1253,9 +1253,9 @@ public class Host extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -1269,9 +1269,9 @@ public class Host extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -1285,9 +1285,9 @@ public class Host extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -1302,9 +1302,9 @@ public class Host extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1318,9 +1318,9 @@ public class Host extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1334,9 +1334,9 @@ public class Host extends XenAPIObject { * @param logging New value to set */ public void setLogging(Connection c, Map logging) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_logging"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(logging)}; @@ -1351,9 +1351,9 @@ public class Host extends XenAPIObject { * @param value Value to add */ public void addToLogging(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.add_to_logging"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1367,9 +1367,9 @@ public class Host extends XenAPIObject { * @param key Key to remove */ public void removeFromLogging(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.remove_from_logging"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1383,9 +1383,9 @@ public class Host extends XenAPIObject { * @param suspendImageSr New value to set */ public void setSuspendImageSr(Connection c, SR suspendImageSr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_suspend_image_sr"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(suspendImageSr)}; @@ -1399,9 +1399,9 @@ public class Host extends XenAPIObject { * @param crashDumpSr New value to set */ public void setCrashDumpSr(Connection c, SR crashDumpSr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_crash_dump_sr"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(crashDumpSr)}; @@ -1415,9 +1415,9 @@ public class Host extends XenAPIObject { * @param hostname New value to set */ public void setHostname(Connection c, String hostname) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_hostname"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(hostname)}; @@ -1431,9 +1431,9 @@ public class Host extends XenAPIObject { * @param address New value to set */ public void setAddress(Connection c, String address) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_address"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(address)}; @@ -1447,9 +1447,9 @@ public class Host extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -1463,9 +1463,9 @@ public class Host extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1479,9 +1479,9 @@ public class Host extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1495,9 +1495,9 @@ public class Host extends XenAPIObject { * @param licenseServer New value to set */ public void setLicenseServer(Connection c, Map licenseServer) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_license_server"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(licenseServer)}; @@ -1512,9 +1512,9 @@ public class Host extends XenAPIObject { * @param value Value to add */ public void addToLicenseServer(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.add_to_license_server"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1528,9 +1528,9 @@ public class Host extends XenAPIObject { * @param key Key to remove */ public void removeFromLicenseServer(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.remove_from_license_server"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1544,9 +1544,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task disableAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.disable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1560,9 +1560,9 @@ public class Host extends XenAPIObject { * */ public void disable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.disable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1576,9 +1576,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task enableAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.enable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1592,9 +1592,9 @@ public class Host extends XenAPIObject { * */ public void enable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.enable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1608,9 +1608,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task shutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1624,9 +1624,9 @@ public class Host extends XenAPIObject { * */ public void shutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1640,9 +1640,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task rebootAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1656,9 +1656,9 @@ public class Host extends XenAPIObject { * */ public void reboot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1672,9 +1672,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task dmesgAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.dmesg"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1689,15 +1689,15 @@ public class Host extends XenAPIObject { * @return dmesg string */ public String dmesg(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.dmesg"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1706,9 +1706,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task dmesgClearAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.dmesg_clear"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1723,15 +1723,15 @@ public class Host extends XenAPIObject { * @return dmesg string */ public String dmesgClear(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.dmesg_clear"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1740,9 +1740,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task getLogAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.get_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1757,15 +1757,15 @@ public class Host extends XenAPIObject { * @return The contents of the host's primary log file */ public String getLog(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1775,9 +1775,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task sendDebugKeysAsync(Connection c, String keys) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.send_debug_keys"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(keys)}; @@ -1792,9 +1792,9 @@ public class Host extends XenAPIObject { * @param keys The keys to send */ public void sendDebugKeys(Connection c, String keys) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.send_debug_keys"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(keys)}; @@ -1810,9 +1810,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task bugreportUploadAsync(Connection c, String url, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.bugreport_upload"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(url), Marshalling.toXMLRPC(options)}; @@ -1828,9 +1828,9 @@ public class Host extends XenAPIObject { * @param options Extra configuration operations */ public void bugreportUpload(Connection c, String url, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.bugreport_upload"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(url), Marshalling.toXMLRPC(options)}; @@ -1844,15 +1844,15 @@ public class Host extends XenAPIObject { * @return The name of every supported method. */ public static Set listMethods(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.list_methods"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1862,10 +1862,10 @@ public class Host extends XenAPIObject { * @return Task */ public Task licenseApplyAsync(Connection c, String contents) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.LicenseProcessingError { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.LicenseProcessingError { String method_call = "Async.host.license_apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(contents)}; @@ -1880,10 +1880,10 @@ public class Host extends XenAPIObject { * @param contents The contents of the license file, base64 encoded */ public void licenseApply(Connection c, String contents) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.LicenseProcessingError { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.LicenseProcessingError { String method_call = "host.license_apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(contents)}; @@ -1897,9 +1897,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1913,9 +1913,9 @@ public class Host extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1929,9 +1929,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task powerOnAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.power_on"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1945,9 +1945,9 @@ public class Host extends XenAPIObject { * */ public void powerOn(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.power_on"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1960,9 +1960,9 @@ public class Host extends XenAPIObject { * */ public static void emergencyHaDisable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.emergency_ha_disable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1976,15 +1976,15 @@ public class Host extends XenAPIObject { * @return A set of data sources */ public Set getDataSources(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_data_sources"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfDataSourceRecord(result); + return Types.toSetOfDataSourceRecord(result); } /** @@ -1993,9 +1993,9 @@ public class Host extends XenAPIObject { * @param dataSource The data source to record */ public void recordDataSource(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.record_data_source"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; @@ -2010,15 +2010,15 @@ public class Host extends XenAPIObject { * @return The latest value, averaged over the last 5 seconds */ public Double queryDataSource(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.query_data_source"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -2027,9 +2027,9 @@ public class Host extends XenAPIObject { * @param dataSource The data source whose archives are to be forgotten */ public void forgetDataSourceArchives(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.forget_data_source_archives"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; @@ -2043,9 +2043,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task assertCanEvacuateAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.assert_can_evacuate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2059,9 +2059,9 @@ public class Host extends XenAPIObject { * */ public void assertCanEvacuate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.assert_can_evacuate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2075,9 +2075,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task getVmsWhichPreventEvacuationAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.get_vms_which_prevent_evacuation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2092,15 +2092,15 @@ public class Host extends XenAPIObject { * @return VMs which block evacuation together with reasons */ public Map> getVmsWhichPreventEvacuation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_vms_which_prevent_evacuation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMSetOfString(result); + return Types.toMapOfVMSetOfString(result); } /** @@ -2109,10 +2109,11 @@ public class Host extends XenAPIObject { * * @return Task */ - @Deprecated public Task getUncooperativeResidentVMsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Task getUncooperativeResidentVMsAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.get_uncooperative_resident_VMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2127,16 +2128,17 @@ public class Host extends XenAPIObject { * * @return VMs which are not co-operating */ - @Deprecated public Set getUncooperativeResidentVMs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Set getUncooperativeResidentVMs(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_uncooperative_resident_VMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -2145,9 +2147,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task evacuateAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.evacuate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2161,9 +2163,9 @@ public class Host extends XenAPIObject { * */ public void evacuate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.evacuate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2177,9 +2179,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task syslogReconfigureAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.syslog_reconfigure"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2193,9 +2195,9 @@ public class Host extends XenAPIObject { * */ public void syslogReconfigure(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.syslog_reconfigure"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2210,9 +2212,9 @@ public class Host extends XenAPIObject { * @return Task */ public static Task managementReconfigureAsync(Connection c, PIF pif) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.management_reconfigure"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(pif)}; @@ -2227,9 +2229,9 @@ public class Host extends XenAPIObject { * @param pif reference to a PIF object corresponding to the management interface */ public static void managementReconfigure(Connection c, PIF pif) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.management_reconfigure"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(pif)}; @@ -2243,9 +2245,9 @@ public class Host extends XenAPIObject { * @param iface name of the interface to use as a management interface */ public static void localManagementReconfigure(Connection c, String iface) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.local_management_reconfigure"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(iface)}; @@ -2258,9 +2260,9 @@ public class Host extends XenAPIObject { * */ public static void managementDisable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.management_disable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2274,9 +2276,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task getManagementIfaceAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.get_management_interface"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2291,15 +2293,15 @@ public class Host extends XenAPIObject { * @return The managment interface for the host */ public PIF getManagementIface(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_management_interface"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -2308,15 +2310,15 @@ public class Host extends XenAPIObject { * @return An XML fragment containing the system status capabilities. */ public String getSystemStatusCapabilities(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_system_status_capabilities"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -2325,9 +2327,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task restartAgentAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.restart_agent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2341,9 +2343,9 @@ public class Host extends XenAPIObject { * */ public void restartAgent(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.restart_agent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2356,9 +2358,9 @@ public class Host extends XenAPIObject { * */ public static void shutdownAgent(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.shutdown_agent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2372,10 +2374,10 @@ public class Host extends XenAPIObject { * @param hostname The new host name */ public void setHostnameLive(Connection c, String hostname) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.HostNameInvalid { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.HostNameInvalid { String method_call = "host.set_hostname_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(hostname)}; @@ -2389,9 +2391,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task computeFreeMemoryAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.compute_free_memory"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2406,15 +2408,15 @@ public class Host extends XenAPIObject { * @return the amount of free memory on the host. */ public Long computeFreeMemory(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.compute_free_memory"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -2423,9 +2425,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task computeMemoryOverheadAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.compute_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2440,15 +2442,15 @@ public class Host extends XenAPIObject { * @return the virtualization memory overhead of the host. */ public Long computeMemoryOverhead(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.compute_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -2456,9 +2458,9 @@ public class Host extends XenAPIObject { * */ public void syncData(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.sync_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2472,9 +2474,9 @@ public class Host extends XenAPIObject { * @param delay Delay in seconds from when the call is received to perform the backup */ public void backupRrds(Connection c, Double delay) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.backup_rrds"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(delay)}; @@ -2491,12 +2493,13 @@ public class Host extends XenAPIObject { * @return Task */ public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), + Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -2511,15 +2514,16 @@ public class Host extends XenAPIObject { * @return The reference of the blob, needed for populating its data */ public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), + Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -2531,12 +2535,13 @@ public class Host extends XenAPIObject { * @return Task */ public Task callPluginAsync(Connection c, String plugin, String fn, Map args) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.call_plugin"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(plugin), Marshalling.toXMLRPC(fn), Marshalling.toXMLRPC(args)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(plugin), Marshalling.toXMLRPC(fn), + Marshalling.toXMLRPC(args)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -2551,15 +2556,16 @@ public class Host extends XenAPIObject { * @return Result from the plugin */ public String callPlugin(Connection c, String plugin, String fn, Map args) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.call_plugin"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(plugin), Marshalling.toXMLRPC(fn), Marshalling.toXMLRPC(args)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(plugin), Marshalling.toXMLRPC(fn), + Marshalling.toXMLRPC(args)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -2568,15 +2574,15 @@ public class Host extends XenAPIObject { * @return The current time */ public Date getServertime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_servertime"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -2585,15 +2591,15 @@ public class Host extends XenAPIObject { * @return The current local time */ public Date getServerLocaltime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_server_localtime"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -2604,12 +2610,13 @@ public class Host extends XenAPIObject { * @param authType The type of authentication (e.g. AD for Active Directory) */ public void enableExternalAuth(Connection c, Map config, String serviceName, String authType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.enable_external_auth"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config), Marshalling.toXMLRPC(serviceName), Marshalling.toXMLRPC(authType)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config), Marshalling.toXMLRPC(serviceName), + Marshalling.toXMLRPC(authType)}; Map response = c.dispatch(method_call, method_params); return; } @@ -2620,9 +2627,9 @@ public class Host extends XenAPIObject { * @param config Optional parameters as a list of key-values containing the configuration data */ public void disableExternalAuth(Connection c, Map config) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.disable_external_auth"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config)}; @@ -2636,9 +2643,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task retrieveWlbEvacuateRecommendationsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.retrieve_wlb_evacuate_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2653,15 +2660,15 @@ public class Host extends XenAPIObject { * @return VMs and the reasons why they would block evacuation, or their target host recommended by the wlb server */ public Map> retrieveWlbEvacuateRecommendations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.retrieve_wlb_evacuate_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMSetOfString(result); + return Types.toMapOfVMSetOfString(result); } /** @@ -2670,9 +2677,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task getServerCertificateAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.get_server_certificate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2687,15 +2694,15 @@ public class Host extends XenAPIObject { * @return The installed server SSL certificate, in PEM form. */ public String getServerCertificate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_server_certificate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -2704,9 +2711,9 @@ public class Host extends XenAPIObject { * @param edition The requested edition */ public void applyEdition(Connection c, String edition) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.apply_edition"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(edition)}; @@ -2720,9 +2727,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task refreshPackInfoAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.refresh_pack_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2736,9 +2743,9 @@ public class Host extends XenAPIObject { * */ public void refreshPackInfo(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.refresh_pack_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2754,9 +2761,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task setPowerOnModeAsync(Connection c, String powerOnMode, Map powerOnConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.set_power_on_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(powerOnMode), Marshalling.toXMLRPC(powerOnConfig)}; @@ -2772,9 +2779,9 @@ public class Host extends XenAPIObject { * @param powerOnConfig Power on config */ public void setPowerOnMode(Connection c, String powerOnMode, Map powerOnConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_power_on_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(powerOnMode), Marshalling.toXMLRPC(powerOnConfig)}; @@ -2788,9 +2795,9 @@ public class Host extends XenAPIObject { * @param features The features string (32 hexadecimal digits) */ public void setCpuFeatures(Connection c, String features) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.set_cpu_features"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(features)}; @@ -2803,9 +2810,9 @@ public class Host extends XenAPIObject { * */ public void resetCpuFeatures(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.reset_cpu_features"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2819,9 +2826,9 @@ public class Host extends XenAPIObject { * @param sr The SR to use as a local cache */ public void enableLocalStorageCaching(Connection c, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.enable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sr)}; @@ -2834,9 +2841,9 @@ public class Host extends XenAPIObject { * */ public void disableLocalStorageCaching(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.disable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2852,9 +2859,9 @@ public class Host extends XenAPIObject { * @return Task */ public Task migrateReceiveAsync(Connection c, Network network, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host.migrate_receive"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(options)}; @@ -2871,15 +2878,15 @@ public class Host extends XenAPIObject { * @return A value which should be passed to VM.migrate */ public Map migrateReceive(Connection c, Network network, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.migrate_receive"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -2888,15 +2895,15 @@ public class Host extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHost(result); + return Types.toSetOfHost(result); } /** @@ -2905,15 +2912,15 @@ public class Host extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostHostRecord(result); + return Types.toMapOfHostHostRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/HostCpu.java b/deps/XenServerJava/src/com/xensource/xenapi/HostCpu.java index 4f4cdbc7296..15fcfa7113f 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/HostCpu.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/HostCpu.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class HostCpu extends XenAPIObject { * For internal use only. */ HostCpu(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class HostCpu extends XenAPIObject { { if (obj != null && obj instanceof HostCpu) { - HostCpu other = (HostCpu) obj; + HostCpu other = (HostCpu)obj; return other.ref.equals(this.ref); } else { @@ -119,8 +118,8 @@ public class HostCpu extends XenAPIObject { /** * Convert a host_cpu.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("host", this.host == null ? new Host("OpaqueRef:NULL") : this.host); map.put("number", this.number == null ? 0 : this.number); @@ -197,16 +196,17 @@ public class HostCpu extends XenAPIObject { * * @return all fields from the object */ - @Deprecated public HostCpu.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public HostCpu.Record getRecord(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostCpuRecord(result); + return Types.toHostCpuRecord(result); } /** @@ -216,16 +216,17 @@ public class HostCpu extends XenAPIObject { * @param uuid UUID of object to return * @return reference to the object */ - @Deprecated public static HostCpu getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public static HostCpu getByUuid(Connection c, String uuid) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostCpu(result); + return Types.toHostCpu(result); } /** @@ -234,15 +235,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -251,15 +252,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -268,15 +269,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Long getNumber(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_number"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -285,15 +286,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getVendor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_vendor"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -302,15 +303,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Long getSpeed(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_speed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -319,15 +320,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getModelname(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_modelname"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -336,15 +337,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Long getFamily(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_family"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -353,15 +354,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Long getModel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_model"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -370,15 +371,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getStepping(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_stepping"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -387,15 +388,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getFlags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_flags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -404,15 +405,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public String getFeatures(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_features"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -421,15 +422,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Double getUtilisation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -438,15 +439,15 @@ public class HostCpu extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -455,9 +456,9 @@ public class HostCpu extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -472,9 +473,9 @@ public class HostCpu extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -488,9 +489,9 @@ public class HostCpu extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -504,16 +505,17 @@ public class HostCpu extends XenAPIObject { * * @return references to all objects */ - @Deprecated public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public static Set getAll(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostCpu(result); + return Types.toSetOfHostCpu(result); } /** @@ -522,15 +524,15 @@ public class HostCpu extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_cpu.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostCpuHostCpuRecord(result); + return Types.toMapOfHostCpuHostCpuRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/HostCrashdump.java b/deps/XenServerJava/src/com/xensource/xenapi/HostCrashdump.java index f63479054a3..02c3bd943f6 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/HostCrashdump.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/HostCrashdump.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class HostCrashdump extends XenAPIObject { * For internal use only. */ HostCrashdump(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class HostCrashdump extends XenAPIObject { { if (obj != null && obj instanceof HostCrashdump) { - HostCrashdump other = (HostCrashdump) obj; + HostCrashdump other = (HostCrashdump)obj; return other.ref.equals(this.ref); } else { @@ -111,8 +110,8 @@ public class HostCrashdump extends XenAPIObject { /** * Convert a host_crashdump.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("host", this.host == null ? new Host("OpaqueRef:NULL") : this.host); map.put("timestamp", this.timestamp == null ? new Date(0) : this.timestamp); @@ -149,15 +148,15 @@ public class HostCrashdump extends XenAPIObject { * @return all fields from the object */ public HostCrashdump.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostCrashdumpRecord(result); + return Types.toHostCrashdumpRecord(result); } /** @@ -167,15 +166,15 @@ public class HostCrashdump extends XenAPIObject { * @return reference to the object */ public static HostCrashdump getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostCrashdump(result); + return Types.toHostCrashdump(result); } /** @@ -184,15 +183,15 @@ public class HostCrashdump extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -201,15 +200,15 @@ public class HostCrashdump extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -218,15 +217,15 @@ public class HostCrashdump extends XenAPIObject { * @return value of the field */ public Date getTimestamp(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_timestamp"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -235,15 +234,15 @@ public class HostCrashdump extends XenAPIObject { * @return value of the field */ public Long getSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -252,15 +251,15 @@ public class HostCrashdump extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -269,9 +268,9 @@ public class HostCrashdump extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -286,9 +285,9 @@ public class HostCrashdump extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -302,9 +301,9 @@ public class HostCrashdump extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -318,9 +317,9 @@ public class HostCrashdump extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host_crashdump.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -334,9 +333,9 @@ public class HostCrashdump extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -352,9 +351,9 @@ public class HostCrashdump extends XenAPIObject { * @return Task */ public Task uploadAsync(Connection c, String url, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host_crashdump.upload"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(url), Marshalling.toXMLRPC(options)}; @@ -370,9 +369,9 @@ public class HostCrashdump extends XenAPIObject { * @param options Extra configuration operations */ public void upload(Connection c, String url, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.upload"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(url), Marshalling.toXMLRPC(options)}; @@ -386,15 +385,15 @@ public class HostCrashdump extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostCrashdump(result); + return Types.toSetOfHostCrashdump(result); } /** @@ -403,15 +402,15 @@ public class HostCrashdump extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_crashdump.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostCrashdumpHostCrashdumpRecord(result); + return Types.toMapOfHostCrashdumpHostCrashdumpRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/HostMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/HostMetrics.java index 5c7c7805902..b41277aeb05 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/HostMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/HostMetrics.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class HostMetrics extends XenAPIObject { * For internal use only. */ HostMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class HostMetrics extends XenAPIObject { { if (obj != null && obj instanceof HostMetrics) { - HostMetrics other = (HostMetrics) obj; + HostMetrics other = (HostMetrics)obj; return other.ref.equals(this.ref); } else { @@ -112,8 +111,8 @@ public class HostMetrics extends XenAPIObject { /** * Convert a host_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("memory_total", this.memoryTotal == null ? 0 : this.memoryTotal); map.put("memory_free", this.memoryFree == null ? 0 : this.memoryFree); @@ -155,15 +154,15 @@ public class HostMetrics extends XenAPIObject { * @return all fields from the object */ public HostMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostMetricsRecord(result); + return Types.toHostMetricsRecord(result); } /** @@ -173,15 +172,15 @@ public class HostMetrics extends XenAPIObject { * @return reference to the object */ public static HostMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostMetrics(result); + return Types.toHostMetrics(result); } /** @@ -190,15 +189,15 @@ public class HostMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -207,15 +206,15 @@ public class HostMetrics extends XenAPIObject { * @return value of the field */ public Long getMemoryTotal(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_memory_total"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -224,16 +223,17 @@ public class HostMetrics extends XenAPIObject { * * @return value of the field */ - @Deprecated public Long getMemoryFree(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Long getMemoryFree(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_memory_free"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -242,15 +242,15 @@ public class HostMetrics extends XenAPIObject { * @return value of the field */ public Boolean getLive(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -259,15 +259,15 @@ public class HostMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -276,15 +276,15 @@ public class HostMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -293,9 +293,9 @@ public class HostMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -310,9 +310,9 @@ public class HostMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -326,9 +326,9 @@ public class HostMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -342,15 +342,15 @@ public class HostMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostMetrics(result); + return Types.toSetOfHostMetrics(result); } /** @@ -359,15 +359,15 @@ public class HostMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostMetricsHostMetricsRecord(result); + return Types.toMapOfHostMetricsHostMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/HostPatch.java b/deps/XenServerJava/src/com/xensource/xenapi/HostPatch.java index fafe4377f42..fa77588232a 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/HostPatch.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/HostPatch.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class HostPatch extends XenAPIObject { * For internal use only. */ HostPatch(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class HostPatch extends XenAPIObject { { if (obj != null && obj instanceof HostPatch) { - HostPatch other = (HostPatch) obj; + HostPatch other = (HostPatch)obj; return other.ref.equals(this.ref); } else { @@ -116,8 +115,8 @@ public class HostPatch extends XenAPIObject { /** * Convert a host_patch.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -179,15 +178,15 @@ public class HostPatch extends XenAPIObject { * @return all fields from the object */ public HostPatch.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostPatchRecord(result); + return Types.toHostPatchRecord(result); } /** @@ -197,15 +196,15 @@ public class HostPatch extends XenAPIObject { * @return reference to the object */ public static HostPatch getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHostPatch(result); + return Types.toHostPatch(result); } /** @@ -215,15 +214,15 @@ public class HostPatch extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostPatch(result); + return Types.toSetOfHostPatch(result); } /** @@ -232,15 +231,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -249,15 +248,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -266,15 +265,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -283,15 +282,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public String getVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -300,15 +299,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -317,15 +316,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public Boolean getApplied(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_applied"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -334,15 +333,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public Date getTimestampApplied(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_timestamp_applied"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -351,15 +350,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public Long getSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -368,15 +367,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public PoolPatch getPoolPatch(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_pool_patch"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPoolPatch(result); + return Types.toPoolPatch(result); } /** @@ -385,15 +384,15 @@ public class HostPatch extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -402,9 +401,9 @@ public class HostPatch extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -419,9 +418,9 @@ public class HostPatch extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -435,9 +434,9 @@ public class HostPatch extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -451,10 +450,11 @@ public class HostPatch extends XenAPIObject { * * @return Task */ - @Deprecated public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Task destroyAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host_patch.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -468,10 +468,11 @@ public class HostPatch extends XenAPIObject { * @deprecated * */ - @Deprecated public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public void destroy(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -485,10 +486,11 @@ public class HostPatch extends XenAPIObject { * * @return Task */ - @Deprecated public Task applyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Task applyAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.host_patch.apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -503,16 +505,17 @@ public class HostPatch extends XenAPIObject { * * @return the output of the patch application process */ - @Deprecated public String apply(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public String apply(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -521,15 +524,15 @@ public class HostPatch extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostPatch(result); + return Types.toSetOfHostPatch(result); } /** @@ -538,15 +541,15 @@ public class HostPatch extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "host_patch.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostPatchHostPatchRecord(result); + return Types.toMapOfHostPatchHostPatchRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java b/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java index 6a2565d66ed..865bc16af11 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java @@ -29,8 +29,8 @@ public final class Marshalling { o instanceof Double || o instanceof Date) { return o; - } else if (o instanceof Long) { - return o.toString(); + } else if (o instanceof Long) { + return o.toString(); } else if (o instanceof Map) { Map result = new HashMap(); Map m = (Map)o; @@ -46,14 +46,14 @@ public final class Marshalling { result.add(toXMLRPC(e)); } return result; - } else if (o instanceof XenAPIObject) { - return ((XenAPIObject) o).toWireString(); - } else if (o instanceof Enum) { - return o.toString(); - }else if (o == null){ - return ""; + } else if (o instanceof XenAPIObject) { + return ((XenAPIObject)o).toWireString(); + } else if (o instanceof Enum) { + return o.toString(); + } else if (o == null) { + return ""; } else { - throw new RuntimeException ("=============don't know how to marshall:({[" + o + "]})"); + throw new RuntimeException("=============don't know how to marshall:({[" + o + "]})"); } } } diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Message.java b/deps/XenServerJava/src/com/xensource/xenapi/Message.java index 95bcc8fa107..a3658e38344 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Message.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Message.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Message extends XenAPIObject { * For internal use only. */ Message(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Message extends XenAPIObject { { if (obj != null && obj instanceof Message) { - Message other = (Message) obj; + Message other = (Message)obj; return other.ref.equals(this.ref); } else { @@ -113,8 +112,8 @@ public class Message extends XenAPIObject { /** * Convert a message.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name", this.name == null ? "" : this.name); map.put("priority", this.priority == null ? 0 : this.priority); @@ -166,15 +165,16 @@ public class Message extends XenAPIObject { * @return The reference of the created message */ public static Message create(Connection c, String name, Long priority, Types.Cls cls, String objUuid, String body) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(priority), Marshalling.toXMLRPC(cls), Marshalling.toXMLRPC(objUuid), Marshalling.toXMLRPC(body)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(priority), Marshalling.toXMLRPC(cls), + Marshalling.toXMLRPC(objUuid), Marshalling.toXMLRPC(body)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMessage(result); + return Types.toMessage(result); } /** @@ -182,9 +182,9 @@ public class Message extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -201,15 +201,15 @@ public class Message extends XenAPIObject { * @return The relevant messages */ public static Map get(Connection c, Types.Cls cls, String objUuid, Date since) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(cls), Marshalling.toXMLRPC(objUuid), Marshalling.toXMLRPC(since)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfMessageMessageRecord(result); + return Types.toMapOfMessageMessageRecord(result); } /** @@ -218,15 +218,15 @@ public class Message extends XenAPIObject { * @return The references to the messages */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfMessage(result); + return Types.toSetOfMessage(result); } /** @@ -236,15 +236,15 @@ public class Message extends XenAPIObject { * @return The relevant messages */ public static Map getSince(Connection c, Date since) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_since"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(since)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfMessageMessageRecord(result); + return Types.toMapOfMessageMessageRecord(result); } /** @@ -253,15 +253,15 @@ public class Message extends XenAPIObject { * @return The message record */ public Message.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMessageRecord(result); + return Types.toMessageRecord(result); } /** @@ -271,15 +271,15 @@ public class Message extends XenAPIObject { * @return The message reference */ public static Message getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMessage(result); + return Types.toMessage(result); } /** @@ -288,15 +288,15 @@ public class Message extends XenAPIObject { * @return The messages */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfMessageMessageRecord(result); + return Types.toMapOfMessageMessageRecord(result); } /** @@ -306,15 +306,15 @@ public class Message extends XenAPIObject { * @return The messages */ public static Map getAllRecordsWhere(Connection c, String expr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "message.get_all_records_where"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(expr)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfMessageMessageRecord(result); + return Types.toMapOfMessageMessageRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Network.java b/deps/XenServerJava/src/com/xensource/xenapi/Network.java index 1b23afeee4d..e9194ef7103 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Network.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Network.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Network extends XenAPIObject { * For internal use only. */ Network(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Network extends XenAPIObject { { if (obj != null && obj instanceof Network) { - Network other = (Network) obj; + Network other = (Network)obj; return other.ref.equals(this.ref); } else { @@ -119,8 +118,8 @@ public class Network extends XenAPIObject { /** * Convert a network.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -197,15 +196,15 @@ public class Network extends XenAPIObject { * @return all fields from the object */ public Network.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetworkRecord(result); + return Types.toNetworkRecord(result); } /** @@ -215,15 +214,15 @@ public class Network extends XenAPIObject { * @return reference to the object */ public static Network getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetwork(result); + return Types.toNetwork(result); } /** @@ -233,9 +232,9 @@ public class Network extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, Network.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.network.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -252,16 +251,16 @@ public class Network extends XenAPIObject { * @return reference to the newly created object */ public static Network create(Connection c, Network.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetwork(result); + return Types.toNetwork(result); } /** @@ -270,9 +269,9 @@ public class Network extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.network.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -286,9 +285,9 @@ public class Network extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -303,15 +302,15 @@ public class Network extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfNetwork(result); + return Types.toSetOfNetwork(result); } /** @@ -320,15 +319,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -337,15 +336,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -354,15 +353,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -371,15 +370,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfNetworkOperations(result); + return Types.toSetOfNetworkOperations(result); } /** @@ -388,15 +387,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringNetworkOperations(result); + return Types.toMapOfStringNetworkOperations(result); } /** @@ -405,15 +404,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Set getVIFs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_VIFs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVIF(result); + return Types.toSetOfVIF(result); } /** @@ -422,15 +421,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Set getPIFs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_PIFs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -439,15 +438,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Long getMTU(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_MTU"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -456,15 +455,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -473,15 +472,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public String getBridge(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_bridge"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -490,15 +489,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Map getBlobs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_blobs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringBlob(result); + return Types.toMapOfStringBlob(result); } /** @@ -507,15 +506,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -524,15 +523,15 @@ public class Network extends XenAPIObject { * @return value of the field */ public Types.NetworkDefaultLockingMode getDefaultLockingMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_default_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetworkDefaultLockingMode(result); + return Types.toNetworkDefaultLockingMode(result); } /** @@ -541,9 +540,9 @@ public class Network extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -557,9 +556,9 @@ public class Network extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -573,9 +572,9 @@ public class Network extends XenAPIObject { * @param MTU New value to set */ public void setMTU(Connection c, Long MTU) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_MTU"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(MTU)}; @@ -589,9 +588,9 @@ public class Network extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -606,9 +605,9 @@ public class Network extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -622,9 +621,9 @@ public class Network extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -638,9 +637,9 @@ public class Network extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -654,9 +653,9 @@ public class Network extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -670,9 +669,9 @@ public class Network extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -689,12 +688,13 @@ public class Network extends XenAPIObject { * @return Task */ public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.network.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), + Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -709,15 +709,16 @@ public class Network extends XenAPIObject { * @return The reference of the blob, needed for populating its data */ public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), + Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -727,9 +728,9 @@ public class Network extends XenAPIObject { * @return Task */ public Task setDefaultLockingModeAsync(Connection c, Types.NetworkDefaultLockingMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.network.set_default_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -744,9 +745,9 @@ public class Network extends XenAPIObject { * @param value The default locking mode for VIFs attached to this network. */ public void setDefaultLockingMode(Connection c, Types.NetworkDefaultLockingMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.set_default_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -760,15 +761,15 @@ public class Network extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfNetwork(result); + return Types.toSetOfNetwork(result); } /** @@ -777,15 +778,15 @@ public class Network extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "network.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfNetworkNetworkRecord(result); + return Types.toMapOfNetworkNetworkRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PBD.java b/deps/XenServerJava/src/com/xensource/xenapi/PBD.java index 6fddfa68542..d2898247572 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PBD.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PBD.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class PBD extends XenAPIObject { * For internal use only. */ PBD(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class PBD extends XenAPIObject { { if (obj != null && obj instanceof PBD) { - PBD other = (PBD) obj; + PBD other = (PBD)obj; return other.ref.equals(this.ref); } else { @@ -112,8 +111,8 @@ public class PBD extends XenAPIObject { /** * Convert a PBD.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("host", this.host == null ? new Host("OpaqueRef:NULL") : this.host); map.put("SR", this.SR == null ? new SR("OpaqueRef:NULL") : this.SR); @@ -155,15 +154,15 @@ public class PBD extends XenAPIObject { * @return all fields from the object */ public PBD.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPBDRecord(result); + return Types.toPBDRecord(result); } /** @@ -173,15 +172,15 @@ public class PBD extends XenAPIObject { * @return reference to the object */ public static PBD getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPBD(result); + return Types.toPBD(result); } /** @@ -191,9 +190,9 @@ public class PBD extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, PBD.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PBD.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -210,16 +209,16 @@ public class PBD extends XenAPIObject { * @return reference to the newly created object */ public static PBD create(Connection c, PBD.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPBD(result); + return Types.toPBD(result); } /** @@ -228,9 +227,9 @@ public class PBD extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PBD.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -244,9 +243,9 @@ public class PBD extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -260,15 +259,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -277,15 +276,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -294,15 +293,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public SR getSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -311,15 +310,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public Map getDeviceConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_device_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -328,15 +327,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public Boolean getCurrentlyAttached(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_currently_attached"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -345,15 +344,15 @@ public class PBD extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -362,9 +361,9 @@ public class PBD extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -379,9 +378,9 @@ public class PBD extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -395,9 +394,9 @@ public class PBD extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -411,10 +410,10 @@ public class PBD extends XenAPIObject { * @return Task */ public Task plugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrUnknownDriver { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrUnknownDriver { String method_call = "Async.PBD.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -428,10 +427,10 @@ public class PBD extends XenAPIObject { * */ public void plug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrUnknownDriver { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrUnknownDriver { String method_call = "PBD.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -445,9 +444,9 @@ public class PBD extends XenAPIObject { * @return Task */ public Task unplugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PBD.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -461,9 +460,9 @@ public class PBD extends XenAPIObject { * */ public void unplug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -478,9 +477,9 @@ public class PBD extends XenAPIObject { * @return Task */ public Task setDeviceConfigAsync(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PBD.set_device_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -495,9 +494,9 @@ public class PBD extends XenAPIObject { * @param value The new value of the PBD's device_config */ public void setDeviceConfig(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.set_device_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -511,15 +510,15 @@ public class PBD extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPBD(result); + return Types.toSetOfPBD(result); } /** @@ -528,15 +527,15 @@ public class PBD extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PBD.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPBDPBDRecord(result); + return Types.toMapOfPBDPBDRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PCI.java b/deps/XenServerJava/src/com/xensource/xenapi/PCI.java index 9e2ec77d0be..e11230a6289 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PCI.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PCI.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class PCI extends XenAPIObject { * For internal use only. */ PCI(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class PCI extends XenAPIObject { { if (obj != null && obj instanceof PCI) { - PCI other = (PCI) obj; + PCI other = (PCI)obj; return other.ref.equals(this.ref); } else { @@ -114,8 +113,8 @@ public class PCI extends XenAPIObject { /** * Convert a PCI.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("class_name", this.clazzName == null ? "" : this.clazzName); map.put("vendor_name", this.vendorName == null ? "" : this.vendorName); @@ -167,15 +166,15 @@ public class PCI extends XenAPIObject { * @return all fields from the object */ public PCI.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPCIRecord(result); + return Types.toPCIRecord(result); } /** @@ -185,15 +184,15 @@ public class PCI extends XenAPIObject { * @return reference to the object */ public static PCI getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPCI(result); + return Types.toPCI(result); } /** @@ -202,15 +201,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -219,15 +218,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public String getClazzName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_class_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -236,15 +235,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public String getVendorName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_vendor_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -253,15 +252,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public String getDeviceName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_device_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -270,15 +269,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -287,15 +286,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public String getPciId(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_pci_id"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -304,15 +303,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public Set getDependencies(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_dependencies"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPCI(result); + return Types.toSetOfPCI(result); } /** @@ -321,15 +320,15 @@ public class PCI extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -338,9 +337,9 @@ public class PCI extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -355,9 +354,9 @@ public class PCI extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -371,9 +370,9 @@ public class PCI extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -387,15 +386,15 @@ public class PCI extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPCI(result); + return Types.toSetOfPCI(result); } /** @@ -404,15 +403,15 @@ public class PCI extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PCI.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPCIPCIRecord(result); + return Types.toMapOfPCIPCIRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java b/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java index a9e1c432dad..0f5ddb4bdf9 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PGPU.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class PGPU extends XenAPIObject { * For internal use only. */ PGPU(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class PGPU extends XenAPIObject { { if (obj != null && obj instanceof PGPU) { - PGPU other = (PGPU) obj; + PGPU other = (PGPU)obj; return other.ref.equals(this.ref); } else { @@ -111,8 +110,8 @@ public class PGPU extends XenAPIObject { /** * Convert a PGPU.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("PCI", this.PCI == null ? new PCI("OpaqueRef:NULL") : this.PCI); map.put("GPU_group", this.GPUGroup == null ? new GPUGroup("OpaqueRef:NULL") : this.GPUGroup); @@ -149,15 +148,15 @@ public class PGPU extends XenAPIObject { * @return all fields from the object */ public PGPU.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPGPURecord(result); + return Types.toPGPURecord(result); } /** @@ -167,15 +166,15 @@ public class PGPU extends XenAPIObject { * @return reference to the object */ public static PGPU getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPGPU(result); + return Types.toPGPU(result); } /** @@ -184,15 +183,15 @@ public class PGPU extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -201,15 +200,15 @@ public class PGPU extends XenAPIObject { * @return value of the field */ public PCI getPCI(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_PCI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPCI(result); + return Types.toPCI(result); } /** @@ -218,15 +217,15 @@ public class PGPU extends XenAPIObject { * @return value of the field */ public GPUGroup getGPUGroup(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_GPU_group"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toGPUGroup(result); + return Types.toGPUGroup(result); } /** @@ -235,15 +234,15 @@ public class PGPU extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -252,15 +251,15 @@ public class PGPU extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -269,9 +268,9 @@ public class PGPU extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -286,9 +285,9 @@ public class PGPU extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -302,9 +301,9 @@ public class PGPU extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -318,15 +317,15 @@ public class PGPU extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPGPU(result); + return Types.toSetOfPGPU(result); } /** @@ -335,15 +334,15 @@ public class PGPU extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PGPU.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPGPUPGPURecord(result); + return Types.toMapOfPGPUPGPURecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PIF.java b/deps/XenServerJava/src/com/xensource/xenapi/PIF.java index 950afebce14..27618b4105b 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PIF.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PIF.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class PIF extends XenAPIObject { * For internal use only. */ PIF(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class PIF extends XenAPIObject { { if (obj != null && obj instanceof PIF) { - PIF other = (PIF) obj; + PIF other = (PIF)obj; return other.ref.equals(this.ref); } else { @@ -134,8 +133,8 @@ public class PIF extends XenAPIObject { /** * Convert a PIF.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("device", this.device == null ? "" : this.device); map.put("network", this.network == null ? new Network("OpaqueRef:NULL") : this.network); @@ -287,15 +286,15 @@ public class PIF extends XenAPIObject { * @return all fields from the object */ public PIF.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIFRecord(result); + return Types.toPIFRecord(result); } /** @@ -305,15 +304,15 @@ public class PIF extends XenAPIObject { * @return reference to the object */ public static PIF getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -322,15 +321,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -339,15 +338,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getDevice(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_device"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -356,15 +355,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Network getNetwork(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_network"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetwork(result); + return Types.toNetwork(result); } /** @@ -373,15 +372,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Host getHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -390,15 +389,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getMAC(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_MAC"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -407,15 +406,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Long getMTU(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_MTU"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -424,15 +423,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Long getVLAN(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_VLAN"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -441,15 +440,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public PIFMetrics getMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIFMetrics(result); + return Types.toPIFMetrics(result); } /** @@ -458,15 +457,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Boolean getPhysical(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_physical"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -475,15 +474,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Boolean getCurrentlyAttached(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_currently_attached"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -492,15 +491,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Types.IpConfigurationMode getIpConfigurationMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_ip_configuration_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toIpConfigurationMode(result); + return Types.toIpConfigurationMode(result); } /** @@ -509,15 +508,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getIP(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_IP"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -526,15 +525,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getNetmask(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_netmask"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -543,15 +542,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getGateway(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_gateway"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -560,15 +559,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getDNS(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_DNS"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -577,15 +576,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Bond getBondSlaveOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_bond_slave_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBond(result); + return Types.toBond(result); } /** @@ -594,15 +593,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Set getBondMasterOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_bond_master_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfBond(result); + return Types.toSetOfBond(result); } /** @@ -611,15 +610,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public VLAN getVLANMasterOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_VLAN_master_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVLAN(result); + return Types.toVLAN(result); } /** @@ -628,15 +627,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Set getVLANSlaveOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_VLAN_slave_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVLAN(result); + return Types.toSetOfVLAN(result); } /** @@ -645,15 +644,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Boolean getManagement(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_management"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -662,15 +661,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -679,15 +678,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Boolean getDisallowUnplug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_disallow_unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -696,15 +695,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Set getTunnelAccessPIFOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_tunnel_access_PIF_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTunnel(result); + return Types.toSetOfTunnel(result); } /** @@ -713,15 +712,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Set getTunnelTransportPIFOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_tunnel_transport_PIF_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTunnel(result); + return Types.toSetOfTunnel(result); } /** @@ -730,15 +729,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Types.Ipv6ConfigurationMode getIpv6ConfigurationMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_ipv6_configuration_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toIpv6ConfigurationMode(result); + return Types.toIpv6ConfigurationMode(result); } /** @@ -747,15 +746,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Set getIPv6(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_IPv6"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -764,15 +763,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public String getIpv6Gateway(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_ipv6_gateway"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -781,15 +780,15 @@ public class PIF extends XenAPIObject { * @return value of the field */ public Types.PrimaryAddressType getPrimaryAddressType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_primary_address_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPrimaryAddressType(result); + return Types.toPrimaryAddressType(result); } /** @@ -798,9 +797,9 @@ public class PIF extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -815,9 +814,9 @@ public class PIF extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -831,9 +830,9 @@ public class PIF extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -847,9 +846,9 @@ public class PIF extends XenAPIObject { * @param disallowUnplug New value to set */ public void setDisallowUnplug(Connection c, Boolean disallowUnplug) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.set_disallow_unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(disallowUnplug)}; @@ -867,14 +866,16 @@ public class PIF extends XenAPIObject { * @param VLAN VLAN tag for the new interface * @return Task */ - @Deprecated public static Task createVLANAsync(Connection c, String device, Network network, Host host, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + @Deprecated + public static Task createVLANAsync(Connection c, String device, Network network, Host host, Long VLAN) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "Async.PIF.create_VLAN"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(VLAN)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), + Marshalling.toXMLRPC(VLAN)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -890,17 +891,19 @@ public class PIF extends XenAPIObject { * @param VLAN VLAN tag for the new interface * @return The reference of the created PIF object */ - @Deprecated public static PIF createVLAN(Connection c, String device, Network network, Host host, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + @Deprecated + public static PIF createVLAN(Connection c, String device, Network network, Host host, Long VLAN) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "PIF.create_VLAN"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(VLAN)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), + Marshalling.toXMLRPC(VLAN)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -909,11 +912,12 @@ public class PIF extends XenAPIObject { * * @return Task */ - @Deprecated public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.PifIsPhysical { + @Deprecated + public Task destroyAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.PifIsPhysical { String method_call = "Async.PIF.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -927,11 +931,12 @@ public class PIF extends XenAPIObject { * @deprecated * */ - @Deprecated public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.PifIsPhysical { + @Deprecated + public void destroy(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.PifIsPhysical { String method_call = "PIF.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -950,12 +955,13 @@ public class PIF extends XenAPIObject { * @return Task */ public Task reconfigureIpAsync(Connection c, Types.IpConfigurationMode mode, String IP, String netmask, String gateway, String DNS) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.reconfigure_ip"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IP), + Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -971,12 +977,13 @@ public class PIF extends XenAPIObject { * @param DNS the new DNS settings */ public void reconfigureIp(Connection c, Types.IpConfigurationMode mode, String IP, String netmask, String gateway, String DNS) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.reconfigure_ip"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IP), + Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; Map response = c.dispatch(method_call, method_params); return; } @@ -991,12 +998,13 @@ public class PIF extends XenAPIObject { * @return Task */ public Task reconfigureIpv6Async(Connection c, Types.Ipv6ConfigurationMode mode, String IPv6, String gateway, String DNS) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.reconfigure_ipv6"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IPv6), + Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1011,12 +1019,13 @@ public class PIF extends XenAPIObject { * @param DNS the new DNS settings */ public void reconfigureIpv6(Connection c, Types.Ipv6ConfigurationMode mode, String IPv6, String gateway, String DNS) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.reconfigure_ipv6"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode), Marshalling.toXMLRPC(IPv6), + Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS)}; Map response = c.dispatch(method_call, method_params); return; } @@ -1028,9 +1037,9 @@ public class PIF extends XenAPIObject { * @return Task */ public Task setPrimaryAddressTypeAsync(Connection c, Types.PrimaryAddressType primaryAddressType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.set_primary_address_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(primaryAddressType)}; @@ -1045,9 +1054,9 @@ public class PIF extends XenAPIObject { * @param primaryAddressType Whether to prefer IPv4 or IPv6 connections */ public void setPrimaryAddressType(Connection c, Types.PrimaryAddressType primaryAddressType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.set_primary_address_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(primaryAddressType)}; @@ -1062,9 +1071,9 @@ public class PIF extends XenAPIObject { * @return Task */ public static Task scanAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.scan"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1079,9 +1088,9 @@ public class PIF extends XenAPIObject { * @param host The host on which to scan */ public static void scan(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.scan"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1098,9 +1107,9 @@ public class PIF extends XenAPIObject { * @return Task */ public static Task introduceAsync(Connection c, Host host, String MAC, String device) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.introduce"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(device)}; @@ -1118,15 +1127,15 @@ public class PIF extends XenAPIObject { * @return The reference of the created PIF object */ public static PIF introduce(Connection c, Host host, String MAC, String device) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.introduce"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(device)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -1135,10 +1144,10 @@ public class PIF extends XenAPIObject { * @return Task */ public Task forgetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.PifTunnelStillExists { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.PifTunnelStillExists { String method_call = "Async.PIF.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1152,10 +1161,10 @@ public class PIF extends XenAPIObject { * */ public void forget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.PifTunnelStillExists { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.PifTunnelStillExists { String method_call = "PIF.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1169,9 +1178,9 @@ public class PIF extends XenAPIObject { * @return Task */ public Task unplugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1185,9 +1194,9 @@ public class PIF extends XenAPIObject { * */ public void unplug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1201,10 +1210,10 @@ public class PIF extends XenAPIObject { * @return Task */ public Task plugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.TransportPifNotConfigured { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.TransportPifNotConfigured { String method_call = "Async.PIF.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1218,10 +1227,10 @@ public class PIF extends XenAPIObject { * */ public void plug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.TransportPifNotConfigured { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.TransportPifNotConfigured { String method_call = "PIF.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1255,13 +1264,20 @@ public class PIF extends XenAPIObject { * @param primaryAddressType * @return Task */ - public static Task dbIntroduceAsync(Connection c, String device, Network network, Host host, String MAC, Long MTU, Long VLAN, Boolean physical, Types.IpConfigurationMode ipConfigurationMode, String IP, String netmask, String gateway, String DNS, Bond bondSlaveOf, VLAN VLANMasterOf, Boolean management, Map otherConfig, Boolean disallowUnplug, Types.Ipv6ConfigurationMode ipv6ConfigurationMode, Set IPv6, String ipv6Gateway, Types.PrimaryAddressType primaryAddressType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static Task dbIntroduceAsync(Connection c, String device, Network network, Host host, String MAC, Long MTU, Long VLAN, Boolean physical, + Types.IpConfigurationMode ipConfigurationMode, String IP, String netmask, String gateway, String DNS, Bond bondSlaveOf, VLAN VLANMasterOf, Boolean management, + Map otherConfig, Boolean disallowUnplug, Types.Ipv6ConfigurationMode ipv6ConfigurationMode, Set IPv6, String ipv6Gateway, + Types.PrimaryAddressType primaryAddressType) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.db_introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(MTU), Marshalling.toXMLRPC(VLAN), Marshalling.toXMLRPC(physical), Marshalling.toXMLRPC(ipConfigurationMode), Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS), Marshalling.toXMLRPC(bondSlaveOf), Marshalling.toXMLRPC(VLANMasterOf), Marshalling.toXMLRPC(management), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(disallowUnplug), Marshalling.toXMLRPC(ipv6ConfigurationMode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(ipv6Gateway), Marshalling.toXMLRPC(primaryAddressType)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), + Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(MTU), Marshalling.toXMLRPC(VLAN), Marshalling.toXMLRPC(physical), Marshalling.toXMLRPC(ipConfigurationMode), + Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS), Marshalling.toXMLRPC(bondSlaveOf), + Marshalling.toXMLRPC(VLANMasterOf), Marshalling.toXMLRPC(management), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(disallowUnplug), + Marshalling.toXMLRPC(ipv6ConfigurationMode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(ipv6Gateway), Marshalling.toXMLRPC(primaryAddressType)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1293,16 +1309,23 @@ public class PIF extends XenAPIObject { * @param primaryAddressType * @return The ref of the newly created PIF record. */ - public static PIF dbIntroduce(Connection c, String device, Network network, Host host, String MAC, Long MTU, Long VLAN, Boolean physical, Types.IpConfigurationMode ipConfigurationMode, String IP, String netmask, String gateway, String DNS, Bond bondSlaveOf, VLAN VLANMasterOf, Boolean management, Map otherConfig, Boolean disallowUnplug, Types.Ipv6ConfigurationMode ipv6ConfigurationMode, Set IPv6, String ipv6Gateway, Types.PrimaryAddressType primaryAddressType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static PIF dbIntroduce(Connection c, String device, Network network, Host host, String MAC, Long MTU, Long VLAN, Boolean physical, + Types.IpConfigurationMode ipConfigurationMode, String IP, String netmask, String gateway, String DNS, Bond bondSlaveOf, VLAN VLANMasterOf, Boolean management, + Map otherConfig, Boolean disallowUnplug, Types.Ipv6ConfigurationMode ipv6ConfigurationMode, Set IPv6, String ipv6Gateway, + Types.PrimaryAddressType primaryAddressType) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.db_introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(MTU), Marshalling.toXMLRPC(VLAN), Marshalling.toXMLRPC(physical), Marshalling.toXMLRPC(ipConfigurationMode), Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS), Marshalling.toXMLRPC(bondSlaveOf), Marshalling.toXMLRPC(VLANMasterOf), Marshalling.toXMLRPC(management), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(disallowUnplug), Marshalling.toXMLRPC(ipv6ConfigurationMode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(ipv6Gateway), Marshalling.toXMLRPC(primaryAddressType)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(host), + Marshalling.toXMLRPC(MAC), Marshalling.toXMLRPC(MTU), Marshalling.toXMLRPC(VLAN), Marshalling.toXMLRPC(physical), Marshalling.toXMLRPC(ipConfigurationMode), + Marshalling.toXMLRPC(IP), Marshalling.toXMLRPC(netmask), Marshalling.toXMLRPC(gateway), Marshalling.toXMLRPC(DNS), Marshalling.toXMLRPC(bondSlaveOf), + Marshalling.toXMLRPC(VLANMasterOf), Marshalling.toXMLRPC(management), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(disallowUnplug), + Marshalling.toXMLRPC(ipv6ConfigurationMode), Marshalling.toXMLRPC(IPv6), Marshalling.toXMLRPC(ipv6Gateway), Marshalling.toXMLRPC(primaryAddressType)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -1311,9 +1334,9 @@ public class PIF extends XenAPIObject { * @return Task */ public Task dbForgetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.PIF.db_forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1327,9 +1350,9 @@ public class PIF extends XenAPIObject { * */ public void dbForget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.db_forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1343,15 +1366,15 @@ public class PIF extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -1360,15 +1383,15 @@ public class PIF extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPIFPIFRecord(result); + return Types.toMapOfPIFPIFRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PIFMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/PIFMetrics.java index d0a3911d327..ab6268ee8f7 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PIFMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PIFMetrics.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class PIFMetrics extends XenAPIObject { * For internal use only. */ PIFMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class PIFMetrics extends XenAPIObject { { if (obj != null && obj instanceof PIFMetrics) { - PIFMetrics other = (PIFMetrics) obj; + PIFMetrics other = (PIFMetrics)obj; return other.ref.equals(this.ref); } else { @@ -119,8 +118,8 @@ public class PIFMetrics extends XenAPIObject { /** * Convert a PIF_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("io_read_kbs", this.ioReadKbs == null ? 0.0 : this.ioReadKbs); map.put("io_write_kbs", this.ioWriteKbs == null ? 0.0 : this.ioWriteKbs); @@ -197,15 +196,15 @@ public class PIFMetrics extends XenAPIObject { * @return all fields from the object */ public PIFMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIFMetricsRecord(result); + return Types.toPIFMetricsRecord(result); } /** @@ -215,15 +214,15 @@ public class PIFMetrics extends XenAPIObject { * @return reference to the object */ public static PIFMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIFMetrics(result); + return Types.toPIFMetrics(result); } /** @@ -232,15 +231,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -249,15 +248,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Double getIoReadKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_io_read_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -266,15 +265,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Double getIoWriteKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_io_write_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -283,15 +282,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Boolean getCarrier(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_carrier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -300,15 +299,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getVendorId(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_vendor_id"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -317,15 +316,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getVendorName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_vendor_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -334,15 +333,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getDeviceId(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_device_id"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -351,15 +350,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getDeviceName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_device_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -368,15 +367,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Long getSpeed(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_speed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -385,15 +384,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Boolean getDuplex(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_duplex"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -402,15 +401,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public String getPciBusPath(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_pci_bus_path"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -419,15 +418,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -436,15 +435,15 @@ public class PIFMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -453,9 +452,9 @@ public class PIFMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -470,9 +469,9 @@ public class PIFMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -486,9 +485,9 @@ public class PIFMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -502,15 +501,15 @@ public class PIFMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIFMetrics(result); + return Types.toSetOfPIFMetrics(result); } /** @@ -519,15 +518,15 @@ public class PIFMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "PIF_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPIFMetricsPIFMetricsRecord(result); + return Types.toMapOfPIFMetricsPIFMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Pool.java b/deps/XenServerJava/src/com/xensource/xenapi/Pool.java index 2dc0fac9c78..7ceebb02d56 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Pool.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Pool.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Pool extends XenAPIObject { * For internal use only. */ Pool(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Pool extends XenAPIObject { { if (obj != null && obj instanceof Pool) { - Pool other = (Pool) obj; + Pool other = (Pool)obj; return other.ref.equals(this.ref); } else { @@ -133,8 +132,8 @@ public class Pool extends XenAPIObject { /** * Convert a pool.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -281,15 +280,15 @@ public class Pool extends XenAPIObject { * @return all fields from the object */ public Pool.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPoolRecord(result); + return Types.toPoolRecord(result); } /** @@ -299,15 +298,15 @@ public class Pool extends XenAPIObject { * @return reference to the object */ public static Pool getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPool(result); + return Types.toPool(result); } /** @@ -316,15 +315,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -333,15 +332,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -350,15 +349,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -367,15 +366,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Host getMaster(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -384,15 +383,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public SR getDefaultSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_default_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -401,15 +400,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public SR getSuspendImageSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_suspend_image_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -418,15 +417,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public SR getCrashDumpSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_crash_dump_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -435,15 +434,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -452,15 +451,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getHaEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -469,15 +468,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Map getHaConfiguration(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -486,15 +485,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Set getHaStatefiles(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_statefiles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -503,15 +502,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Long getHaHostFailuresToTolerate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_host_failures_to_tolerate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -520,15 +519,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Long getHaPlanExistsFor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_plan_exists_for"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -537,15 +536,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getHaAllowOvercommit(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_allow_overcommit"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -554,15 +553,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getHaOvercommitted(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_ha_overcommitted"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -571,15 +570,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Map getBlobs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_blobs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringBlob(result); + return Types.toMapOfStringBlob(result); } /** @@ -588,15 +587,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -605,15 +604,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Map getGuiConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_gui_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -622,15 +621,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getWlbUrl(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_wlb_url"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -639,15 +638,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getWlbUsername(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_wlb_username"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -656,15 +655,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getWlbEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_wlb_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -673,15 +672,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getWlbVerifyCert(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_wlb_verify_cert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -690,15 +689,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Boolean getRedoLogEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_redo_log_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -707,15 +706,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public VDI getRedoLogVdi(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_redo_log_vdi"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -724,15 +723,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public String getVswitchController(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_vswitch_controller"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -741,15 +740,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Map getRestrictions(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_restrictions"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -758,15 +757,15 @@ public class Pool extends XenAPIObject { * @return value of the field */ public Set getMetadataVDIs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_metadata_VDIs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVDI(result); + return Types.toSetOfVDI(result); } /** @@ -775,9 +774,9 @@ public class Pool extends XenAPIObject { * @param nameLabel New value to set */ public void setNameLabel(Connection c, String nameLabel) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(nameLabel)}; @@ -791,9 +790,9 @@ public class Pool extends XenAPIObject { * @param nameDescription New value to set */ public void setNameDescription(Connection c, String nameDescription) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(nameDescription)}; @@ -807,9 +806,9 @@ public class Pool extends XenAPIObject { * @param defaultSR New value to set */ public void setDefaultSR(Connection c, SR defaultSR) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_default_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(defaultSR)}; @@ -823,9 +822,9 @@ public class Pool extends XenAPIObject { * @param suspendImageSR New value to set */ public void setSuspendImageSR(Connection c, SR suspendImageSR) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_suspend_image_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(suspendImageSR)}; @@ -839,9 +838,9 @@ public class Pool extends XenAPIObject { * @param crashDumpSR New value to set */ public void setCrashDumpSR(Connection c, SR crashDumpSR) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_crash_dump_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(crashDumpSR)}; @@ -855,9 +854,9 @@ public class Pool extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -872,9 +871,9 @@ public class Pool extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -888,9 +887,9 @@ public class Pool extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -904,9 +903,9 @@ public class Pool extends XenAPIObject { * @param haAllowOvercommit New value to set */ public void setHaAllowOvercommit(Connection c, Boolean haAllowOvercommit) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_ha_allow_overcommit"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(haAllowOvercommit)}; @@ -920,9 +919,9 @@ public class Pool extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -936,9 +935,9 @@ public class Pool extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -952,9 +951,9 @@ public class Pool extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -968,9 +967,9 @@ public class Pool extends XenAPIObject { * @param guiConfig New value to set */ public void setGuiConfig(Connection c, Map guiConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_gui_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(guiConfig)}; @@ -985,9 +984,9 @@ public class Pool extends XenAPIObject { * @param value Value to add */ public void addToGuiConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.add_to_gui_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1001,9 +1000,9 @@ public class Pool extends XenAPIObject { * @param key Key to remove */ public void removeFromGuiConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.remove_from_gui_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1017,9 +1016,9 @@ public class Pool extends XenAPIObject { * @param wlbEnabled New value to set */ public void setWlbEnabled(Connection c, Boolean wlbEnabled) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_wlb_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(wlbEnabled)}; @@ -1033,9 +1032,9 @@ public class Pool extends XenAPIObject { * @param wlbVerifyCert New value to set */ public void setWlbVerifyCert(Connection c, Boolean wlbVerifyCert) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_wlb_verify_cert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(wlbVerifyCert)}; @@ -1052,13 +1051,14 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task joinAsync(Connection c, String masterAddress, String masterUsername, String masterPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.JoiningHostCannotContainSharedSrs { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.JoiningHostCannotContainSharedSrs { String method_call = "Async.pool.join"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), Marshalling.toXMLRPC(masterPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), + Marshalling.toXMLRPC(masterPassword)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1072,13 +1072,14 @@ public class Pool extends XenAPIObject { * @param masterPassword The password for the master (for initial authentication) */ public static void join(Connection c, String masterAddress, String masterUsername, String masterPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.JoiningHostCannotContainSharedSrs { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.JoiningHostCannotContainSharedSrs { String method_call = "pool.join"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), Marshalling.toXMLRPC(masterPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), + Marshalling.toXMLRPC(masterPassword)}; Map response = c.dispatch(method_call, method_params); return; } @@ -1092,12 +1093,13 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task joinForceAsync(Connection c, String masterAddress, String masterUsername, String masterPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.join_force"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), Marshalling.toXMLRPC(masterPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), + Marshalling.toXMLRPC(masterPassword)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1111,12 +1113,13 @@ public class Pool extends XenAPIObject { * @param masterPassword The password for the master (for initial authentication) */ public static void joinForce(Connection c, String masterAddress, String masterUsername, String masterPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.join_force"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), Marshalling.toXMLRPC(masterPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress), Marshalling.toXMLRPC(masterUsername), + Marshalling.toXMLRPC(masterPassword)}; Map response = c.dispatch(method_call, method_params); return; } @@ -1128,9 +1131,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task ejectAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.eject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1145,9 +1148,9 @@ public class Pool extends XenAPIObject { * @param host The host to eject */ public static void eject(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.eject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1160,9 +1163,9 @@ public class Pool extends XenAPIObject { * */ public static void emergencyTransitionToMaster(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.emergency_transition_to_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1176,9 +1179,9 @@ public class Pool extends XenAPIObject { * @param masterAddress The hostname of the master */ public static void emergencyResetMaster(Connection c, String masterAddress) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.emergency_reset_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(masterAddress)}; @@ -1192,9 +1195,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task recoverSlavesAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.recover_slaves"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1209,15 +1212,15 @@ public class Pool extends XenAPIObject { * @return list of hosts whose master address were succesfully reset */ public static Set recoverSlaves(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.recover_slaves"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHost(result); + return Types.toSetOfHost(result); } /** @@ -1229,10 +1232,10 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task createVLANAsync(Connection c, String device, Network network, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "Async.pool.create_VLAN"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(VLAN)}; @@ -1250,16 +1253,16 @@ public class Pool extends XenAPIObject { * @return The references of the created PIF objects */ public static Set createVLAN(Connection c, String device, Network network, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "pool.create_VLAN"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(VLAN)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -1271,10 +1274,10 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task createVLANFromPIFAsync(Connection c, PIF pif, Network network, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "Async.pool.create_VLAN_from_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(pif), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(VLAN)}; @@ -1292,16 +1295,16 @@ public class Pool extends XenAPIObject { * @return The references of the created PIF objects */ public static Set createVLANFromPIF(Connection c, PIF pif, Network network, Long VLAN) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VlanTagInvalid { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VlanTagInvalid { String method_call = "pool.create_VLAN_from_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(pif), Marshalling.toXMLRPC(network), Marshalling.toXMLRPC(VLAN)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPIF(result); + return Types.toSetOfPIF(result); } /** @@ -1312,9 +1315,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task enableHaAsync(Connection c, Set heartbeatSrs, Map configuration) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.enable_ha"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(heartbeatSrs), Marshalling.toXMLRPC(configuration)}; @@ -1330,9 +1333,9 @@ public class Pool extends XenAPIObject { * @param configuration Detailed HA configuration to apply */ public static void enableHa(Connection c, Set heartbeatSrs, Map configuration) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.enable_ha"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(heartbeatSrs), Marshalling.toXMLRPC(configuration)}; @@ -1346,9 +1349,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task disableHaAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.disable_ha"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1362,9 +1365,9 @@ public class Pool extends XenAPIObject { * */ public static void disableHa(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.disable_ha"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1378,9 +1381,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task syncDatabaseAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.sync_database"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1394,9 +1397,9 @@ public class Pool extends XenAPIObject { * */ public static void syncDatabase(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.sync_database"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1411,9 +1414,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task designateNewMasterAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.designate_new_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1428,9 +1431,9 @@ public class Pool extends XenAPIObject { * @param host The host who should become the new master */ public static void designateNewMaster(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.designate_new_master"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host)}; @@ -1444,9 +1447,9 @@ public class Pool extends XenAPIObject { * @param seconds The number of seconds to block the restart thread for */ public static void haPreventRestartsFor(Connection c, Long seconds) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.ha_prevent_restarts_for"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(seconds)}; @@ -1461,15 +1464,15 @@ public class Pool extends XenAPIObject { * @return true if a failover plan exists for the supplied number of host failures */ public static Boolean haFailoverPlanExists(Connection c, Long n) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.ha_failover_plan_exists"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(n)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -1478,15 +1481,15 @@ public class Pool extends XenAPIObject { * @return maximum value for ha_host_failures_to_tolerate given current configuration */ public static Long haComputeMaxHostFailuresToTolerate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.ha_compute_max_host_failures_to_tolerate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1496,15 +1499,15 @@ public class Pool extends XenAPIObject { * @return maximum value for ha_host_failures_to_tolerate given provided configuration */ public static Long haComputeHypotheticalMaxHostFailuresToTolerate(Connection c, Map configuration) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.ha_compute_hypothetical_max_host_failures_to_tolerate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(configuration)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1515,15 +1518,15 @@ public class Pool extends XenAPIObject { * @return VM failover plan: a map of VM to host to restart the host on */ public static Map> haComputeVmFailoverPlan(Connection c, Set failedHosts, Set failedVms) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.ha_compute_vm_failover_plan"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(failedHosts), Marshalling.toXMLRPC(failedVms)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMMapOfStringString(result); + return Types.toMapOfVMMapOfStringString(result); } /** @@ -1533,9 +1536,9 @@ public class Pool extends XenAPIObject { * @return Task */ public Task setHaHostFailuresToTolerateAsync(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.set_ha_host_failures_to_tolerate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1550,9 +1553,9 @@ public class Pool extends XenAPIObject { * @param value New number of host failures to consider */ public void setHaHostFailuresToTolerate(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_ha_host_failures_to_tolerate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1569,12 +1572,13 @@ public class Pool extends XenAPIObject { * @return Task */ public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), + Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1589,15 +1593,16 @@ public class Pool extends XenAPIObject { * @return The reference of the blob, needed for populating its data */ public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), + Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -1608,12 +1613,13 @@ public class Pool extends XenAPIObject { * @param authType The type of authentication (e.g. AD for Active Directory) */ public void enableExternalAuth(Connection c, Map config, String serviceName, String authType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.enable_external_auth"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config), Marshalling.toXMLRPC(serviceName), Marshalling.toXMLRPC(authType)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config), Marshalling.toXMLRPC(serviceName), + Marshalling.toXMLRPC(authType)}; Map response = c.dispatch(method_call, method_params); return; } @@ -1624,9 +1630,9 @@ public class Pool extends XenAPIObject { * @param config Optional parameters as a list of key-values containing the configuration data */ public void disableExternalAuth(Connection c, Map config) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.disable_external_auth"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config)}; @@ -1639,9 +1645,9 @@ public class Pool extends XenAPIObject { * */ public void detectNonhomogeneousExternalAuth(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.detect_nonhomogeneous_external_auth"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1660,12 +1666,13 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task initializeWlbAsync(Connection c, String wlbUrl, String wlbUsername, String wlbPassword, String xenserverUsername, String xenserverPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.initialize_wlb"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(wlbUrl), Marshalling.toXMLRPC(wlbUsername), Marshalling.toXMLRPC(wlbPassword), Marshalling.toXMLRPC(xenserverUsername), Marshalling.toXMLRPC(xenserverPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(wlbUrl), Marshalling.toXMLRPC(wlbUsername), Marshalling.toXMLRPC(wlbPassword), + Marshalling.toXMLRPC(xenserverUsername), Marshalling.toXMLRPC(xenserverPassword)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1681,12 +1688,13 @@ public class Pool extends XenAPIObject { * @param xenserverPassword The password used by the wlb server to authenticate with the xenserver */ public static void initializeWlb(Connection c, String wlbUrl, String wlbUsername, String wlbPassword, String xenserverUsername, String xenserverPassword) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.initialize_wlb"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(wlbUrl), Marshalling.toXMLRPC(wlbUsername), Marshalling.toXMLRPC(wlbPassword), Marshalling.toXMLRPC(xenserverUsername), Marshalling.toXMLRPC(xenserverPassword)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(wlbUrl), Marshalling.toXMLRPC(wlbUsername), Marshalling.toXMLRPC(wlbPassword), + Marshalling.toXMLRPC(xenserverUsername), Marshalling.toXMLRPC(xenserverPassword)}; Map response = c.dispatch(method_call, method_params); return; } @@ -1697,9 +1705,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task deconfigureWlbAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.deconfigure_wlb"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1713,9 +1721,9 @@ public class Pool extends XenAPIObject { * */ public static void deconfigureWlb(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.deconfigure_wlb"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1730,9 +1738,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task sendWlbConfigurationAsync(Connection c, Map config) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.send_wlb_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(config)}; @@ -1747,9 +1755,9 @@ public class Pool extends XenAPIObject { * @param config The configuration to use in optimizing this pool */ public static void sendWlbConfiguration(Connection c, Map config) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.send_wlb_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(config)}; @@ -1763,9 +1771,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task retrieveWlbConfigurationAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.retrieve_wlb_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1780,15 +1788,15 @@ public class Pool extends XenAPIObject { * @return The configuration used in optimizing this pool */ public static Map retrieveWlbConfiguration(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.retrieve_wlb_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1797,9 +1805,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task retrieveWlbRecommendationsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.retrieve_wlb_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1814,15 +1822,15 @@ public class Pool extends XenAPIObject { * @return The list of vm migration recommendations */ public static Map> retrieveWlbRecommendations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.retrieve_wlb_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMSetOfString(result); + return Types.toMapOfVMSetOfString(result); } /** @@ -1834,9 +1842,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task sendTestPostAsync(Connection c, String host, Long port, String body) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.send_test_post"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(port), Marshalling.toXMLRPC(body)}; @@ -1854,15 +1862,15 @@ public class Pool extends XenAPIObject { * @return The response */ public static String sendTestPost(Connection c, String host, Long port, String body) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.send_test_post"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(port), Marshalling.toXMLRPC(body)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1873,9 +1881,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task certificateInstallAsync(Connection c, String name, String cert) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.certificate_install"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(cert)}; @@ -1891,9 +1899,9 @@ public class Pool extends XenAPIObject { * @param cert The certificate */ public static void certificateInstall(Connection c, String name, String cert) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.certificate_install"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(cert)}; @@ -1908,9 +1916,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task certificateUninstallAsync(Connection c, String name) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.certificate_uninstall"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name)}; @@ -1925,9 +1933,9 @@ public class Pool extends XenAPIObject { * @param name The certificate name */ public static void certificateUninstall(Connection c, String name) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.certificate_uninstall"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name)}; @@ -1941,9 +1949,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task certificateListAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.certificate_list"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -1958,15 +1966,15 @@ public class Pool extends XenAPIObject { * @return All installed certificates */ public static Set certificateList(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.certificate_list"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1977,9 +1985,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task crlInstallAsync(Connection c, String name, String cert) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.crl_install"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(cert)}; @@ -1995,9 +2003,9 @@ public class Pool extends XenAPIObject { * @param cert The CRL */ public static void crlInstall(Connection c, String name, String cert) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.crl_install"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(cert)}; @@ -2012,9 +2020,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task crlUninstallAsync(Connection c, String name) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.crl_uninstall"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name)}; @@ -2029,9 +2037,9 @@ public class Pool extends XenAPIObject { * @param name The CRL name */ public static void crlUninstall(Connection c, String name) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.crl_uninstall"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(name)}; @@ -2045,9 +2053,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task crlListAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.crl_list"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2062,15 +2070,15 @@ public class Pool extends XenAPIObject { * @return All installed CRLs */ public static Set crlList(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.crl_list"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -2079,9 +2087,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task certificateSyncAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.certificate_sync"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2095,9 +2103,9 @@ public class Pool extends XenAPIObject { * */ public static void certificateSync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.certificate_sync"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2112,9 +2120,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task enableRedoLogAsync(Connection c, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.enable_redo_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(sr)}; @@ -2129,9 +2137,9 @@ public class Pool extends XenAPIObject { * @param sr SR to hold the redo log. */ public static void enableRedoLog(Connection c, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.enable_redo_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(sr)}; @@ -2145,9 +2153,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task disableRedoLogAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.disable_redo_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2161,9 +2169,9 @@ public class Pool extends XenAPIObject { * */ public static void disableRedoLog(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.disable_redo_log"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -2178,9 +2186,9 @@ public class Pool extends XenAPIObject { * @return Task */ public static Task setVswitchControllerAsync(Connection c, String address) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.set_vswitch_controller"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(address)}; @@ -2195,9 +2203,9 @@ public class Pool extends XenAPIObject { * @param address IP address of the vswitch controller. */ public static void setVswitchController(Connection c, String address) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.set_vswitch_controller"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(address)}; @@ -2212,15 +2220,15 @@ public class Pool extends XenAPIObject { * @return An XMLRPC result */ public String testArchiveTarget(Connection c, Map config) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.test_archive_target"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(config)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -2229,9 +2237,9 @@ public class Pool extends XenAPIObject { * @return Task */ public Task enableLocalStorageCachingAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.enable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2245,9 +2253,9 @@ public class Pool extends XenAPIObject { * */ public void enableLocalStorageCaching(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.enable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2261,9 +2269,9 @@ public class Pool extends XenAPIObject { * @return Task */ public Task disableLocalStorageCachingAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool.disable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2277,9 +2285,9 @@ public class Pool extends XenAPIObject { * */ public void disableLocalStorageCaching(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.disable_local_storage_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2293,15 +2301,15 @@ public class Pool extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPool(result); + return Types.toSetOfPool(result); } /** @@ -2310,15 +2318,15 @@ public class Pool extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPoolPoolRecord(result); + return Types.toMapOfPoolPoolRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/PoolPatch.java b/deps/XenServerJava/src/com/xensource/xenapi/PoolPatch.java index 750a9f3225c..7361bc7da0e 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/PoolPatch.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/PoolPatch.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class PoolPatch extends XenAPIObject { * For internal use only. */ PoolPatch(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class PoolPatch extends XenAPIObject { { if (obj != null && obj instanceof PoolPatch) { - PoolPatch other = (PoolPatch) obj; + PoolPatch other = (PoolPatch)obj; return other.ref.equals(this.ref); } else { @@ -115,8 +114,8 @@ public class PoolPatch extends XenAPIObject { /** * Convert a pool_patch.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -173,15 +172,15 @@ public class PoolPatch extends XenAPIObject { * @return all fields from the object */ public PoolPatch.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPoolPatchRecord(result); + return Types.toPoolPatchRecord(result); } /** @@ -191,15 +190,15 @@ public class PoolPatch extends XenAPIObject { * @return reference to the object */ public static PoolPatch getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPoolPatch(result); + return Types.toPoolPatch(result); } /** @@ -209,15 +208,15 @@ public class PoolPatch extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPoolPatch(result); + return Types.toSetOfPoolPatch(result); } /** @@ -226,15 +225,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -243,15 +242,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -260,15 +259,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -277,15 +276,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public String getVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -294,15 +293,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public Long getSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -311,15 +310,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public Boolean getPoolApplied(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_pool_applied"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -328,15 +327,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public Set getHostPatches(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_host_patches"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHostPatch(result); + return Types.toSetOfHostPatch(result); } /** @@ -345,15 +344,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public Set getAfterApplyGuidance(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_after_apply_guidance"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfAfterApplyGuidance(result); + return Types.toSetOfAfterApplyGuidance(result); } /** @@ -362,15 +361,15 @@ public class PoolPatch extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -379,9 +378,9 @@ public class PoolPatch extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -396,9 +395,9 @@ public class PoolPatch extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -412,9 +411,9 @@ public class PoolPatch extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -429,9 +428,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task applyAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -447,15 +446,15 @@ public class PoolPatch extends XenAPIObject { * @return the output of the patch application process */ public String apply(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -464,9 +463,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task poolApplyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.pool_apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -480,9 +479,9 @@ public class PoolPatch extends XenAPIObject { * */ public void poolApply(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.pool_apply"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -497,9 +496,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task precheckAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.precheck"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -515,15 +514,15 @@ public class PoolPatch extends XenAPIObject { * @return the output of the patch prechecks */ public String precheck(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.precheck"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -532,9 +531,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task cleanAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.clean"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -548,9 +547,9 @@ public class PoolPatch extends XenAPIObject { * */ public void clean(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.clean"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -564,9 +563,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task poolCleanAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.pool_clean"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -580,9 +579,9 @@ public class PoolPatch extends XenAPIObject { * */ public void poolClean(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.pool_clean"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -596,9 +595,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -612,9 +611,9 @@ public class PoolPatch extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -629,9 +628,9 @@ public class PoolPatch extends XenAPIObject { * @return Task */ public Task cleanOnHostAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.pool_patch.clean_on_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -646,9 +645,9 @@ public class PoolPatch extends XenAPIObject { * @param host The host on which to clean the patch */ public void cleanOnHost(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.clean_on_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -662,15 +661,15 @@ public class PoolPatch extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPoolPatch(result); + return Types.toSetOfPoolPatch(result); } /** @@ -679,15 +678,15 @@ public class PoolPatch extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "pool_patch.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfPoolPatchPoolPatchRecord(result); + return Types.toMapOfPoolPatchPoolPatchRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Role.java b/deps/XenServerJava/src/com/xensource/xenapi/Role.java index f8dea77010b..5808b13cdb2 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Role.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Role.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Role extends XenAPIObject { * For internal use only. */ Role(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Role extends XenAPIObject { { if (obj != null && obj instanceof Role) { - Role other = (Role) obj; + Role other = (Role)obj; return other.ref.equals(this.ref); } else { @@ -110,8 +109,8 @@ public class Role extends XenAPIObject { /** * Convert a role.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -143,15 +142,15 @@ public class Role extends XenAPIObject { * @return all fields from the object */ public Role.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toRoleRecord(result); + return Types.toRoleRecord(result); } /** @@ -161,15 +160,15 @@ public class Role extends XenAPIObject { * @return reference to the object */ public static Role getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toRole(result); + return Types.toRole(result); } /** @@ -179,15 +178,15 @@ public class Role extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -196,15 +195,15 @@ public class Role extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -213,15 +212,15 @@ public class Role extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -230,15 +229,15 @@ public class Role extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -247,15 +246,15 @@ public class Role extends XenAPIObject { * @return value of the field */ public Set getSubroles(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_subroles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -264,15 +263,15 @@ public class Role extends XenAPIObject { * @return a list of permissions */ public Set getPermissions(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_permissions"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -281,15 +280,15 @@ public class Role extends XenAPIObject { * @return a list of permission names */ public Set getPermissionsNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_permissions_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -298,15 +297,15 @@ public class Role extends XenAPIObject { * @return a list of references to roles */ public Set getByPermission(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_by_permission"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -316,15 +315,15 @@ public class Role extends XenAPIObject { * @return a list of references to roles */ public static Set getByPermissionNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_by_permission_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -333,15 +332,15 @@ public class Role extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -350,15 +349,15 @@ public class Role extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "role.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfRoleRoleRecord(result); + return Types.toMapOfRoleRoleRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/SM.java b/deps/XenServerJava/src/com/xensource/xenapi/SM.java index 9c7341ceb10..0ec362694b6 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/SM.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/SM.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class SM extends XenAPIObject { * For internal use only. */ SM(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class SM extends XenAPIObject { { if (obj != null && obj instanceof SM) { - SM other = (SM) obj; + SM other = (SM)obj; return other.ref.equals(this.ref); } else { @@ -118,8 +117,8 @@ public class SM extends XenAPIObject { /** * Convert a SM.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -191,15 +190,15 @@ public class SM extends XenAPIObject { * @return all fields from the object */ public SM.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSMRecord(result); + return Types.toSMRecord(result); } /** @@ -209,15 +208,15 @@ public class SM extends XenAPIObject { * @return reference to the object */ public static SM getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSM(result); + return Types.toSM(result); } /** @@ -227,15 +226,15 @@ public class SM extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSM(result); + return Types.toSetOfSM(result); } /** @@ -244,15 +243,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -261,15 +260,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -278,15 +277,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -295,15 +294,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -312,15 +311,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getVendor(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_vendor"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -329,15 +328,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getCopyright(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_copyright"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -346,15 +345,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -363,15 +362,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getRequiredApiVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_required_api_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -380,15 +379,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public Map getConfiguration(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_configuration"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -397,15 +396,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public Set getCapabilities(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_capabilities"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -414,15 +413,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -431,15 +430,15 @@ public class SM extends XenAPIObject { * @return value of the field */ public String getDriverFilename(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_driver_filename"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -448,9 +447,9 @@ public class SM extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -465,9 +464,9 @@ public class SM extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -481,9 +480,9 @@ public class SM extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -497,15 +496,15 @@ public class SM extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSM(result); + return Types.toSetOfSM(result); } /** @@ -514,15 +513,15 @@ public class SM extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SM.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfSMSMRecord(result); + return Types.toMapOfSMSMRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/SR.java b/deps/XenServerJava/src/com/xensource/xenapi/SR.java index 72314032506..db6770fbe8f 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/SR.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/SR.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class SR extends XenAPIObject { * For internal use only. */ SR(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class SR extends XenAPIObject { { if (obj != null && obj instanceof SR) { - SR other = (SR) obj; + SR other = (SR)obj; return other.ref.equals(this.ref); } else { @@ -125,8 +124,8 @@ public class SR extends XenAPIObject { /** * Convert a SR.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -233,15 +232,15 @@ public class SR extends XenAPIObject { * @return all fields from the object */ public SR.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSRRecord(result); + return Types.toSRRecord(result); } /** @@ -251,15 +250,15 @@ public class SR extends XenAPIObject { * @return reference to the object */ public static SR getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -269,15 +268,15 @@ public class SR extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSR(result); + return Types.toSetOfSR(result); } /** @@ -286,15 +285,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -303,15 +302,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -320,15 +319,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -337,15 +336,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfStorageOperations(result); + return Types.toSetOfStorageOperations(result); } /** @@ -354,15 +353,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringStorageOperations(result); + return Types.toMapOfStringStorageOperations(result); } /** @@ -371,15 +370,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Set getVDIs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_VDIs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVDI(result); + return Types.toSetOfVDI(result); } /** @@ -388,15 +387,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Set getPBDs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_PBDs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPBD(result); + return Types.toSetOfPBD(result); } /** @@ -405,15 +404,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Long getVirtualAllocation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_virtual_allocation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -422,15 +421,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Long getPhysicalUtilisation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_physical_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -439,15 +438,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Long getPhysicalSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_physical_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -456,15 +455,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public String getType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -473,15 +472,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public String getContentType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_content_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -490,15 +489,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Boolean getShared(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_shared"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -507,15 +506,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -524,15 +523,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -541,15 +540,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Map getSmConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -558,15 +557,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Map getBlobs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_blobs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringBlob(result); + return Types.toMapOfStringBlob(result); } /** @@ -575,15 +574,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public Boolean getLocalCacheEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_local_cache_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -592,15 +591,15 @@ public class SR extends XenAPIObject { * @return value of the field */ public DRTask getIntroducedBy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_introduced_by"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDRTask(result); + return Types.toDRTask(result); } /** @@ -609,9 +608,9 @@ public class SR extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -626,9 +625,9 @@ public class SR extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -642,9 +641,9 @@ public class SR extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -658,9 +657,9 @@ public class SR extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -674,9 +673,9 @@ public class SR extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -690,9 +689,9 @@ public class SR extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -706,9 +705,9 @@ public class SR extends XenAPIObject { * @param smConfig New value to set */ public void setSmConfig(Connection c, Map smConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(smConfig)}; @@ -723,9 +722,9 @@ public class SR extends XenAPIObject { * @param value Value to add */ public void addToSmConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.add_to_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -739,9 +738,9 @@ public class SR extends XenAPIObject { * @param key Key to remove */ public void removeFromSmConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.remove_from_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -763,15 +762,16 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return Task */ - public static Task createAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException, - Types.SrUnknownDriver { + public static Task createAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, + String contentType, Boolean shared, Map smConfig) throws + BadServerResponse, + VersionException, + XenAPIException, + XmlRpcException, + Types.SrUnknownDriver { - if(c.rioConnection){ - if (smConfig.isEmpty()){ + if (c.rioConnection) { + if (smConfig.isEmpty()) { return rioCreateAsync(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType, shared); } else { throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); @@ -781,29 +781,33 @@ public class SR extends XenAPIObject { } } - - - private static Task rioCreateAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Boolean shared) throws - BadServerResponse, - XmlRpcException, - XenAPIException, - Types.SrUnknownDriver { + private static Task rioCreateAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, + String type, String contentType, Boolean shared) throws + BadServerResponse, + XmlRpcException, + XenAPIException, + Types.SrUnknownDriver { String method_call = "Async.SR.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), + Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), + Marshalling.toXMLRPC(shared)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); } - private static Task miamiCreateAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException, - Types.SrUnknownDriver { + private static Task miamiCreateAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, + String type, String contentType, Boolean shared, Map smConfig) throws + BadServerResponse, + XmlRpcException, + XenAPIException, + Types.SrUnknownDriver { String method_call = "Async.SR.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), + Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), + Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -823,15 +827,16 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return The reference of the newly created Storage Repository. */ - public static SR create(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException, - Types.SrUnknownDriver { + public static SR create(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, + String contentType, Boolean shared, Map smConfig) throws + BadServerResponse, + VersionException, + XenAPIException, + XmlRpcException, + Types.SrUnknownDriver { - if(c.rioConnection){ - if (smConfig.isEmpty()){ + if (c.rioConnection) { + if (smConfig.isEmpty()) { return rioCreate(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType, shared); } else { throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); @@ -841,32 +846,36 @@ public class SR extends XenAPIObject { } } - - - private static SR rioCreate(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Boolean shared) throws - BadServerResponse, - XmlRpcException, - XenAPIException, - Types.SrUnknownDriver { + private static SR rioCreate(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, + String contentType, Boolean shared) throws + BadServerResponse, + XmlRpcException, + XenAPIException, + Types.SrUnknownDriver { String method_call = "SR.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), + Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), + Marshalling.toXMLRPC(shared)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } - private static SR miamiCreate(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException, - Types.SrUnknownDriver { + private static SR miamiCreate(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, + String contentType, Boolean shared, Map smConfig) throws + BadServerResponse, + XmlRpcException, + XenAPIException, + Types.SrUnknownDriver { String method_call = "SR.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), + Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), + Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -881,14 +890,15 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return Task */ - public static Task introduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { + public static Task introduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, + Map smConfig) throws + BadServerResponse, + VersionException, + XenAPIException, + XmlRpcException { - if(c.rioConnection){ - if (smConfig.isEmpty()){ + if (c.rioConnection) { + if (smConfig.isEmpty()) { return rioIntroduceAsync(c, uuid, nameLabel, nameDescription, type, contentType, shared); } else { throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); @@ -898,27 +908,28 @@ public class SR extends XenAPIObject { } } - - private static Task rioIntroduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "Async.SR.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), + Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); } - private static Task miamiIntroduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + private static Task miamiIntroduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, + Map smConfig) throws + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "Async.SR.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), + Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -936,14 +947,15 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return The reference of the newly introduced Storage Repository. */ - public static SR introduce(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { + public static SR introduce(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, + Map smConfig) throws + BadServerResponse, + VersionException, + XenAPIException, + XmlRpcException { - if(c.rioConnection){ - if (smConfig.isEmpty()){ + if (c.rioConnection) { + if (smConfig.isEmpty()) { return rioIntroduce(c, uuid, nameLabel, nameDescription, type, contentType, shared); } else { throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); @@ -953,30 +965,31 @@ public class SR extends XenAPIObject { } } - - private static SR rioIntroduce(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "SR.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), + Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } - private static SR miamiIntroduce(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + private static SR miamiIntroduce(Connection c, String uuid, String nameLabel, String nameDescription, String type, String contentType, Boolean shared, + Map smConfig) throws + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "SR.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), + Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(shared), Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -993,14 +1006,16 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return Task */ - @Deprecated public static Task makeAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { + @Deprecated + public static Task makeAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, + String contentType, Map smConfig) throws + BadServerResponse, + VersionException, + XenAPIException, + XmlRpcException { - if(c.rioConnection){ - if (smConfig.isEmpty()){ + if (c.rioConnection) { + if (smConfig.isEmpty()) { return rioMakeAsync(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType); } else { throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); @@ -1010,27 +1025,32 @@ public class SR extends XenAPIObject { } } - - - @Deprecated private static Task rioMakeAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + @Deprecated + private static Task rioMakeAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, + String contentType) throws + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "Async.SR.make"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), + Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); } - @Deprecated private static Task miamiMakeAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + @Deprecated + private static Task miamiMakeAsync(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, + String type, String contentType, Map smConfig) throws + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "Async.SR.make"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), + Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), + Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1050,14 +1070,16 @@ public class SR extends XenAPIObject { * @param smConfig Storage backend specific configuration options * @return The uuid of the newly created Storage Repository. */ - @Deprecated public static String make(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Map smConfig) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { + @Deprecated + public static String make(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, + String contentType, Map smConfig) throws + BadServerResponse, + VersionException, + XenAPIException, + XmlRpcException { - if(c.rioConnection){ - if (smConfig.isEmpty()){ + if (c.rioConnection) { + if (smConfig.isEmpty()) { return rioMake(c, host, deviceConfig, physicalSize, nameLabel, nameDescription, type, contentType); } else { throw new Types.VersionException("smConfig parameter must be empty map for Rio (legacy XenServer) host"); @@ -1067,30 +1089,35 @@ public class SR extends XenAPIObject { } } - - - @Deprecated private static String rioMake(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + @Deprecated + private static String rioMake(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, + String contentType) throws + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "SR.make"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), + Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } - @Deprecated private static String miamiMake(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, String contentType, Map smConfig) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + @Deprecated + private static String miamiMake(Connection c, Host host, Map deviceConfig, Long physicalSize, String nameLabel, String nameDescription, String type, + String contentType, Map smConfig) throws + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "SR.make"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(physicalSize), + Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(contentType), + Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1099,10 +1126,10 @@ public class SR extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrHasPbd { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrHasPbd { String method_call = "Async.SR.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1116,10 +1143,10 @@ public class SR extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrHasPbd { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrHasPbd { String method_call = "SR.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1133,10 +1160,10 @@ public class SR extends XenAPIObject { * @return Task */ public Task forgetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrHasPbd { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrHasPbd { String method_call = "Async.SR.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1150,10 +1177,10 @@ public class SR extends XenAPIObject { * */ public void forget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrHasPbd { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrHasPbd { String method_call = "SR.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1167,9 +1194,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task updateAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.update"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1183,9 +1210,9 @@ public class SR extends XenAPIObject { * */ public void update(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.update"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1199,15 +1226,15 @@ public class SR extends XenAPIObject { * @return the supported SR types */ public static Set getSupportedTypes(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_supported_types"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1216,9 +1243,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task scanAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.scan"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1232,9 +1259,9 @@ public class SR extends XenAPIObject { * */ public void scan(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.scan"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1252,12 +1279,13 @@ public class SR extends XenAPIObject { * @return Task */ public static Task probeAsync(Connection c, Host host, Map deviceConfig, String type, Map smConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.probe"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(type), + Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1273,15 +1301,16 @@ public class SR extends XenAPIObject { * @return An XML fragment containing the scan results. These are specific to the scan being performed, and the backend. */ public static String probe(Connection c, Host host, Map deviceConfig, String type, Map smConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.probe"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(smConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(deviceConfig), Marshalling.toXMLRPC(type), + Marshalling.toXMLRPC(smConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1291,9 +1320,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task setSharedAsync(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.set_shared"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1308,9 +1337,9 @@ public class SR extends XenAPIObject { * @param value True if the SR is shared */ public void setShared(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_shared"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1325,9 +1354,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task setNameLabelAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1342,9 +1371,9 @@ public class SR extends XenAPIObject { * @param value The name label for the SR */ public void setNameLabel(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1359,9 +1388,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task setNameDescriptionAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1376,9 +1405,9 @@ public class SR extends XenAPIObject { * @param value The name description for the SR */ public void setNameDescription(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1395,12 +1424,13 @@ public class SR extends XenAPIObject { * @return Task */ public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), + Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1415,15 +1445,16 @@ public class SR extends XenAPIObject { * @return The reference of the blob, needed for populating its data */ public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), + Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -1432,9 +1463,9 @@ public class SR extends XenAPIObject { * @param value The new value of the SR's physical_size */ public void setPhysicalSize(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_physical_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1448,9 +1479,9 @@ public class SR extends XenAPIObject { * @param value The new value of the SR's virtual_allocation */ public void setVirtualAllocation(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_virtual_allocation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1464,9 +1495,9 @@ public class SR extends XenAPIObject { * @param value The new value of the SR's physical utilisation */ public void setPhysicalUtilisation(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.set_physical_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1480,9 +1511,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task assertCanHostHaStatefileAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.assert_can_host_ha_statefile"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1496,9 +1527,9 @@ public class SR extends XenAPIObject { * */ public void assertCanHostHaStatefile(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.assert_can_host_ha_statefile"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1512,9 +1543,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task assertSupportsDatabaseReplicationAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.assert_supports_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1528,9 +1559,9 @@ public class SR extends XenAPIObject { * */ public void assertSupportsDatabaseReplication(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.assert_supports_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1544,9 +1575,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task enableDatabaseReplicationAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.enable_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1560,9 +1591,9 @@ public class SR extends XenAPIObject { * */ public void enableDatabaseReplication(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.enable_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1576,9 +1607,9 @@ public class SR extends XenAPIObject { * @return Task */ public Task disableDatabaseReplicationAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.SR.disable_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1592,9 +1623,9 @@ public class SR extends XenAPIObject { * */ public void disableDatabaseReplication(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.disable_database_replication"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1608,15 +1639,15 @@ public class SR extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSR(result); + return Types.toSetOfSR(result); } /** @@ -1625,15 +1656,15 @@ public class SR extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "SR.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfSRSRRecord(result); + return Types.toMapOfSRSRRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Secret.java b/deps/XenServerJava/src/com/xensource/xenapi/Secret.java index a9f8eddc847..870725fda50 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Secret.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Secret.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Secret extends XenAPIObject { * For internal use only. */ Secret(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Secret extends XenAPIObject { { if (obj != null && obj instanceof Secret) { - Secret other = (Secret) obj; + Secret other = (Secret)obj; return other.ref.equals(this.ref); } else { @@ -109,8 +108,8 @@ public class Secret extends XenAPIObject { /** * Convert a secret.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("value", this.value == null ? "" : this.value); map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig); @@ -137,15 +136,15 @@ public class Secret extends XenAPIObject { * @return all fields from the object */ public Secret.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSecretRecord(result); + return Types.toSecretRecord(result); } /** @@ -155,15 +154,15 @@ public class Secret extends XenAPIObject { * @return reference to the object */ public static Secret getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSecret(result); + return Types.toSecret(result); } /** @@ -173,9 +172,9 @@ public class Secret extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, Secret.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.secret.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -192,16 +191,16 @@ public class Secret extends XenAPIObject { * @return reference to the newly created object */ public static Secret create(Connection c, Secret.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSecret(result); + return Types.toSecret(result); } /** @@ -210,9 +209,9 @@ public class Secret extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.secret.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -226,9 +225,9 @@ public class Secret extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -242,15 +241,15 @@ public class Secret extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -259,15 +258,15 @@ public class Secret extends XenAPIObject { * @return value of the field */ public String getValue(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_value"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -276,15 +275,15 @@ public class Secret extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -293,9 +292,9 @@ public class Secret extends XenAPIObject { * @param value New value to set */ public void setValue(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.set_value"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -309,9 +308,9 @@ public class Secret extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -326,9 +325,9 @@ public class Secret extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -342,9 +341,9 @@ public class Secret extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -358,15 +357,15 @@ public class Secret extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSecret(result); + return Types.toSetOfSecret(result); } /** @@ -375,15 +374,15 @@ public class Secret extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "secret.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfSecretSecretRecord(result); + return Types.toMapOfSecretSecretRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Session.java b/deps/XenServerJava/src/com/xensource/xenapi/Session.java index f34476b162a..bdf3b4cf80b 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Session.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Session.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Session extends XenAPIObject { * For internal use only. */ Session(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Session extends XenAPIObject { { if (obj != null && obj instanceof Session) { - Session other = (Session) obj; + Session other = (Session)obj; return other.ref.equals(this.ref); } else { @@ -120,8 +119,8 @@ public class Session extends XenAPIObject { /** * Convert a session.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("this_host", this.thisHost == null ? new Host("OpaqueRef:NULL") : this.thisHost); map.put("this_user", this.thisUser == null ? new User("OpaqueRef:NULL") : this.thisUser); @@ -203,15 +202,15 @@ public class Session extends XenAPIObject { * @return all fields from the object */ public Session.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSessionRecord(result); + return Types.toSessionRecord(result); } /** @@ -221,15 +220,15 @@ public class Session extends XenAPIObject { * @return reference to the object */ public static Session getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSession(result); + return Types.toSession(result); } /** @@ -238,15 +237,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -255,15 +254,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Host getThisHost(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_this_host"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -272,15 +271,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public User getThisUser(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_this_user"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toUser(result); + return Types.toUser(result); } /** @@ -289,15 +288,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Date getLastActive(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_last_active"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -306,15 +305,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Boolean getPool(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_pool"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -323,15 +322,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -340,15 +339,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Boolean getIsLocalSuperuser(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_is_local_superuser"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -357,15 +356,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Subject getSubject(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_subject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSubject(result); + return Types.toSubject(result); } /** @@ -374,15 +373,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Date getValidationTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_validation_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -391,15 +390,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public String getAuthUserSid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_auth_user_sid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -408,15 +407,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public String getAuthUserName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_auth_user_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -425,15 +424,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Set getRbacPermissions(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_rbac_permissions"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -442,15 +441,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Set getTasks(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_tasks"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTask(result); + return Types.toSetOfTask(result); } /** @@ -459,15 +458,15 @@ public class Session extends XenAPIObject { * @return value of the field */ public Session getParent(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_parent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSession(result); + return Types.toSession(result); } /** @@ -476,9 +475,9 @@ public class Session extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -493,9 +492,9 @@ public class Session extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -509,9 +508,9 @@ public class Session extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -528,15 +527,15 @@ public class Session extends XenAPIObject { * @return reference of newly created session */ public static Session loginWithPassword(Connection c, String uname, String pwd, String version) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SessionAuthenticationFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SessionAuthenticationFailed { String method_call = "session.login_with_password"; Object[] method_params = {Marshalling.toXMLRPC(uname), Marshalling.toXMLRPC(pwd), Marshalling.toXMLRPC(version)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSession(result); + return Types.toSession(result); } /** @@ -544,9 +543,9 @@ public class Session extends XenAPIObject { * */ public static void logout(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.logout"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -561,9 +560,9 @@ public class Session extends XenAPIObject { * @param newPwd New password for account */ public static void changePassword(Connection c, String oldPwd, String newPwd) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.change_password"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(oldPwd), Marshalling.toXMLRPC(newPwd)}; @@ -579,14 +578,14 @@ public class Session extends XenAPIObject { * @return ID of newly created session */ public static Session slaveLocalLoginWithPassword(Connection c, String uname, String pwd) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.slave_local_login_with_password"; Object[] method_params = {Marshalling.toXMLRPC(uname), Marshalling.toXMLRPC(pwd)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSession(result); + return Types.toSession(result); } /** @@ -594,9 +593,9 @@ public class Session extends XenAPIObject { * */ public static void localLogout(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.local_logout"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -610,9 +609,9 @@ public class Session extends XenAPIObject { * @return Task */ public static Task getAllSubjectIdentifiersAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.session.get_all_subject_identifiers"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; @@ -627,15 +626,15 @@ public class Session extends XenAPIObject { * @return The list of user subject-identifiers of all existing sessions */ public static Set getAllSubjectIdentifiers(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.get_all_subject_identifiers"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -645,9 +644,9 @@ public class Session extends XenAPIObject { * @return Task */ public static Task logoutSubjectIdentifierAsync(Connection c, String subjectIdentifier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.session.logout_subject_identifier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectIdentifier)}; @@ -662,9 +661,9 @@ public class Session extends XenAPIObject { * @param subjectIdentifier User subject-identifier of the sessions to be destroyed */ public static void logoutSubjectIdentifier(Connection c, String subjectIdentifier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "session.logout_subject_identifier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(subjectIdentifier)}; diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Subject.java b/deps/XenServerJava/src/com/xensource/xenapi/Subject.java index a181b58fda5..a599f237be9 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Subject.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Subject.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Subject extends XenAPIObject { * For internal use only. */ Subject(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Subject extends XenAPIObject { { if (obj != null && obj instanceof Subject) { - Subject other = (Subject) obj; + Subject other = (Subject)obj; return other.ref.equals(this.ref); } else { @@ -110,8 +109,8 @@ public class Subject extends XenAPIObject { /** * Convert a subject.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("subject_identifier", this.subjectIdentifier == null ? "" : this.subjectIdentifier); map.put("other_config", this.otherConfig == null ? new HashMap() : this.otherConfig); @@ -143,15 +142,15 @@ public class Subject extends XenAPIObject { * @return all fields from the object */ public Subject.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSubjectRecord(result); + return Types.toSubjectRecord(result); } /** @@ -161,15 +160,15 @@ public class Subject extends XenAPIObject { * @return reference to the object */ public static Subject getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSubject(result); + return Types.toSubject(result); } /** @@ -179,9 +178,9 @@ public class Subject extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, Subject.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.subject.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -198,16 +197,16 @@ public class Subject extends XenAPIObject { * @return reference to the newly created object */ public static Subject create(Connection c, Subject.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSubject(result); + return Types.toSubject(result); } /** @@ -216,9 +215,9 @@ public class Subject extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.subject.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -232,9 +231,9 @@ public class Subject extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -248,15 +247,15 @@ public class Subject extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -265,15 +264,15 @@ public class Subject extends XenAPIObject { * @return value of the field */ public String getSubjectIdentifier(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_subject_identifier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -282,15 +281,15 @@ public class Subject extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -299,15 +298,15 @@ public class Subject extends XenAPIObject { * @return value of the field */ public Set getRoles(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_roles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfRole(result); + return Types.toSetOfRole(result); } /** @@ -316,9 +315,9 @@ public class Subject extends XenAPIObject { * @param role The unique role reference */ public void addToRoles(Connection c, Role role) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.add_to_roles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(role)}; @@ -332,9 +331,9 @@ public class Subject extends XenAPIObject { * @param role The unique role reference in the subject's roles field */ public void removeFromRoles(Connection c, Role role) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.remove_from_roles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(role)}; @@ -348,15 +347,15 @@ public class Subject extends XenAPIObject { * @return a list of permission names */ public Set getPermissionsNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_permissions_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -365,15 +364,15 @@ public class Subject extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfSubject(result); + return Types.toSetOfSubject(result); } /** @@ -382,15 +381,15 @@ public class Subject extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "subject.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfSubjectSubjectRecord(result); + return Types.toMapOfSubjectSubjectRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Task.java b/deps/XenServerJava/src/com/xensource/xenapi/Task.java index beb9686332e..59d59f6131b 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Task.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Task.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Task extends XenAPIObject { * For internal use only. */ Task(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Task extends XenAPIObject { { if (obj != null && obj instanceof Task) { - Task other = (Task) obj; + Task other = (Task)obj; return other.ref.equals(this.ref); } else { @@ -122,8 +121,8 @@ public class Task extends XenAPIObject { /** * Convert a task.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -215,15 +214,15 @@ public class Task extends XenAPIObject { * @return all fields from the object */ public Task.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTaskRecord(result); + return Types.toTaskRecord(result); } /** @@ -233,15 +232,15 @@ public class Task extends XenAPIObject { * @return reference to the object */ public static Task getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTask(result); + return Types.toTask(result); } /** @@ -251,15 +250,15 @@ public class Task extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTask(result); + return Types.toSetOfTask(result); } /** @@ -268,15 +267,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -285,15 +284,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -302,15 +301,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -319,15 +318,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTaskAllowedOperations(result); + return Types.toSetOfTaskAllowedOperations(result); } /** @@ -336,15 +335,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringTaskAllowedOperations(result); + return Types.toMapOfStringTaskAllowedOperations(result); } /** @@ -353,15 +352,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Date getCreated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_created"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -370,15 +369,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Date getFinished(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_finished"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -387,15 +386,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Types.TaskStatusType getStatus(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_status"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTaskStatusType(result); + return Types.toTaskStatusType(result); } /** @@ -404,15 +403,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Host getResidentOn(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_resident_on"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -421,15 +420,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Double getProgress(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_progress"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -438,15 +437,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public String getType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -455,15 +454,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public String getResult(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_result"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -472,15 +471,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Set getErrorInfo(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_error_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -489,15 +488,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -506,15 +505,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Task getSubtaskOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_subtask_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTask(result); + return Types.toTask(result); } /** @@ -523,15 +522,15 @@ public class Task extends XenAPIObject { * @return value of the field */ public Set getSubtasks(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_subtasks"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTask(result); + return Types.toSetOfTask(result); } /** @@ -540,9 +539,9 @@ public class Task extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -557,9 +556,9 @@ public class Task extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -573,9 +572,9 @@ public class Task extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -591,15 +590,15 @@ public class Task extends XenAPIObject { * @return The reference of the created task object */ public static Task create(Connection c, String label, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label), Marshalling.toXMLRPC(description)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTask(result); + return Types.toTask(result); } /** @@ -607,9 +606,9 @@ public class Task extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -623,10 +622,10 @@ public class Task extends XenAPIObject { * @return Task */ public Task cancelAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationNotAllowed { String method_call = "Async.task.cancel"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -640,10 +639,10 @@ public class Task extends XenAPIObject { * */ public void cancel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationNotAllowed { String method_call = "task.cancel"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -657,15 +656,15 @@ public class Task extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTask(result); + return Types.toSetOfTask(result); } /** @@ -674,15 +673,15 @@ public class Task extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "task.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfTaskTaskRecord(result); + return Types.toMapOfTaskTaskRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java b/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java index 8289e8f35d2..44b236df1b7 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Tunnel.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class Tunnel extends XenAPIObject { * For internal use only. */ Tunnel(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class Tunnel extends XenAPIObject { { if (obj != null && obj instanceof Tunnel) { - Tunnel other = (Tunnel) obj; + Tunnel other = (Tunnel)obj; return other.ref.equals(this.ref); } else { @@ -111,8 +110,8 @@ public class Tunnel extends XenAPIObject { /** * Convert a tunnel.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("access_PIF", this.accessPIF == null ? new PIF("OpaqueRef:NULL") : this.accessPIF); map.put("transport_PIF", this.transportPIF == null ? new PIF("OpaqueRef:NULL") : this.transportPIF); @@ -149,15 +148,15 @@ public class Tunnel extends XenAPIObject { * @return all fields from the object */ public Tunnel.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTunnelRecord(result); + return Types.toTunnelRecord(result); } /** @@ -167,15 +166,15 @@ public class Tunnel extends XenAPIObject { * @return reference to the object */ public static Tunnel getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTunnel(result); + return Types.toTunnel(result); } /** @@ -184,15 +183,15 @@ public class Tunnel extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -201,15 +200,15 @@ public class Tunnel extends XenAPIObject { * @return value of the field */ public PIF getAccessPIF(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_access_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -218,15 +217,15 @@ public class Tunnel extends XenAPIObject { * @return value of the field */ public PIF getTransportPIF(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_transport_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -235,15 +234,15 @@ public class Tunnel extends XenAPIObject { * @return value of the field */ public Map getStatus(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_status"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -252,15 +251,15 @@ public class Tunnel extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -269,9 +268,9 @@ public class Tunnel extends XenAPIObject { * @param status New value to set */ public void setStatus(Connection c, Map status) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.set_status"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(status)}; @@ -286,9 +285,9 @@ public class Tunnel extends XenAPIObject { * @param value Value to add */ public void addToStatus(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.add_to_status"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -302,9 +301,9 @@ public class Tunnel extends XenAPIObject { * @param key Key to remove */ public void removeFromStatus(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.remove_from_status"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -318,9 +317,9 @@ public class Tunnel extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -335,9 +334,9 @@ public class Tunnel extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -351,9 +350,9 @@ public class Tunnel extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -369,12 +368,12 @@ public class Tunnel extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, PIF transportPIF, Network network) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OpenvswitchNotActive, - Types.TransportPifNotConfigured, - Types.IsTunnelAccessPif { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OpenvswitchNotActive, + Types.TransportPifNotConfigured, + Types.IsTunnelAccessPif { String method_call = "Async.tunnel.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(transportPIF), Marshalling.toXMLRPC(network)}; @@ -391,18 +390,18 @@ public class Tunnel extends XenAPIObject { * @return The reference of the created tunnel object */ public static Tunnel create(Connection c, PIF transportPIF, Network network) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OpenvswitchNotActive, - Types.TransportPifNotConfigured, - Types.IsTunnelAccessPif { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OpenvswitchNotActive, + Types.TransportPifNotConfigured, + Types.IsTunnelAccessPif { String method_call = "tunnel.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(transportPIF), Marshalling.toXMLRPC(network)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toTunnel(result); + return Types.toTunnel(result); } /** @@ -411,9 +410,9 @@ public class Tunnel extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.tunnel.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -427,9 +426,9 @@ public class Tunnel extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -443,15 +442,15 @@ public class Tunnel extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfTunnel(result); + return Types.toSetOfTunnel(result); } /** @@ -460,15 +459,15 @@ public class Tunnel extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "tunnel.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfTunnelTunnelRecord(result); + return Types.toMapOfTunnelTunnelRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Types.java b/deps/XenServerJava/src/com/xensource/xenapi/Types.java index bde887a4ec3..c6451ff035b 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Types.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Types.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import java.util.Date; @@ -69,7 +68,7 @@ public class Types String[] result = new String[objArray.length]; for (int i = 0; i < objArray.length; i++) { - result[i] = (String) objArray[i]; + result[i] = (String)objArray[i]; } return result; } @@ -119,6 +118,7 @@ public class Types return sb.toString(); } } + /** * Thrown if the response from the server contains an invalid status. */ @@ -126,7 +126,7 @@ public class Types { public BadServerResponse(Map response) { - super(ObjectArrayToStringArray((Object[]) response.get("ErrorDescription"))); + super(ObjectArrayToStringArray((Object[])response.get("ErrorDescription"))); } } @@ -172,10 +172,11 @@ public class Types return matcher.group(1); } - /** - * Checks the provided server response was successful. If the call failed, throws a XenAPIException. If the server - * returned an invalid response, throws a BadServerResponse. Otherwise, returns the server response as passed in. - */ + + /** + * Checks the provided server response was successful. If the call failed, throws a XenAPIException. If the server + * returned an invalid response, throws a BadServerResponse. Otherwise, returns the server response as passed in. + */ static Map checkResponse(Map response) throws XenAPIException, BadServerResponse { if (response.get("Status").equals("Success")) @@ -185,7 +186,7 @@ public class Types if (response.get("Status").equals("Failure")) { - String[] ErrorDescription = ObjectArrayToStringArray((Object[]) response.get("ErrorDescription")); + String[] ErrorDescription = ObjectArrayToStringArray((Object[])response.get("ErrorDescription")); if (ErrorDescription[0].equals("RESTORE_TARGET_MISSING_DEVICE")) { @@ -1993,21 +1994,34 @@ public class Types */ BLOCKED; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == SCAN) return "scan"; - if (this == CLONE) return "clone"; - if (this == COPY) return "copy"; - if (this == RESIZE) return "resize"; - if (this == RESIZE_ONLINE) return "resize_online"; - if (this == SNAPSHOT) return "snapshot"; - if (this == DESTROY) return "destroy"; - if (this == FORGET) return "forget"; - if (this == UPDATE) return "update"; - if (this == FORCE_UNLOCK) return "force_unlock"; - if (this == GENERATE_CONFIG) return "generate_config"; - if (this == BLOCKED) return "blocked"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == SCAN) + return "scan"; + if (this == CLONE) + return "clone"; + if (this == COPY) + return "copy"; + if (this == RESIZE) + return "resize"; + if (this == RESIZE_ONLINE) + return "resize_online"; + if (this == SNAPSHOT) + return "snapshot"; + if (this == DESTROY) + return "destroy"; + if (this == FORGET) + return "forget"; + if (this == UPDATE) + return "update"; + if (this == FORCE_UNLOCK) + return "force_unlock"; + if (this == GENERATE_CONFIG) + return "generate_config"; + if (this == BLOCKED) + return "blocked"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2038,14 +2052,20 @@ public class Types */ VMPP; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == VM) return "VM"; - if (this == HOST) return "Host"; - if (this == SR) return "SR"; - if (this == POOL) return "Pool"; - if (this == VMPP) return "VMPP"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == VM) + return "VM"; + if (this == HOST) + return "Host"; + if (this == SR) + return "SR"; + if (this == POOL) + return "Pool"; + if (this == VMPP) + return "VMPP"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2088,17 +2108,26 @@ public class Types */ REDO_LOG; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == SYSTEM) return "system"; - if (this == USER) return "user"; - if (this == EPHEMERAL) return "ephemeral"; - if (this == SUSPEND) return "suspend"; - if (this == CRASHDUMP) return "crashdump"; - if (this == HA_STATEFILE) return "ha_statefile"; - if (this == METADATA) return "metadata"; - if (this == REDO_LOG) return "redo_log"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == SYSTEM) + return "system"; + if (this == USER) + return "user"; + if (this == EPHEMERAL) + return "ephemeral"; + if (this == SUSPEND) + return "suspend"; + if (this == CRASHDUMP) + return "crashdump"; + if (this == HA_STATEFILE) + return "ha_statefile"; + if (this == METADATA) + return "metadata"; + if (this == REDO_LOG) + return "redo_log"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2125,13 +2154,18 @@ public class Types */ RESTARTXAPI; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == RESTARTHVM) return "restartHVM"; - if (this == RESTARTPV) return "restartPV"; - if (this == RESTARTHOST) return "restartHost"; - if (this == RESTARTXAPI) return "restartXAPI"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == RESTARTHVM) + return "restartHVM"; + if (this == RESTARTPV) + return "restartPV"; + if (this == RESTARTHOST) + return "restartHost"; + if (this == RESTARTXAPI) + return "restartXAPI"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2154,12 +2188,16 @@ public class Types */ MOD; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == ADD) return "add"; - if (this == DEL) return "del"; - if (this == MOD) return "mod"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == ADD) + return "add"; + if (this == DEL) + return "del"; + if (this == MOD) + return "mod"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2178,11 +2216,14 @@ public class Types */ IPV6; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == IPV4) return "IPv4"; - if (this == IPV6) return "IPv6"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == IPV4) + return "IPv4"; + if (this == IPV6) + return "IPv6"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2197,10 +2238,12 @@ public class Types */ CANCEL; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == CANCEL) return "cancel"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == CANCEL) + return "cancel"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2231,14 +2274,20 @@ public class Types */ CANCELLED; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == PENDING) return "pending"; - if (this == SUCCESS) return "success"; - if (this == FAILURE) return "failure"; - if (this == CANCELLING) return "cancelling"; - if (this == CANCELLED) return "cancelled"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == PENDING) + return "pending"; + if (this == SUCCESS) + return "success"; + if (this == FAILURE) + return "failure"; + if (this == CANCELLING) + return "cancelling"; + if (this == CANCELLED) + return "cancelled"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2253,10 +2302,12 @@ public class Types */ ATTACHING; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == ATTACHING) return "attaching"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == ATTACHING) + return "attaching"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2279,12 +2330,16 @@ public class Types */ RDP; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == VT100) return "vt100"; - if (this == RFB) return "rfb"; - if (this == RDP) return "rdp"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == VT100) + return "vt100"; + if (this == RFB) + return "rfb"; + if (this == RDP) + return "rdp"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2319,15 +2374,22 @@ public class Types */ RENAME_RESTART; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == DESTROY) return "destroy"; - if (this == COREDUMP_AND_DESTROY) return "coredump_and_destroy"; - if (this == RESTART) return "restart"; - if (this == COREDUMP_AND_RESTART) return "coredump_and_restart"; - if (this == PRESERVE) return "preserve"; - if (this == RENAME_RESTART) return "rename_restart"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == DESTROY) + return "destroy"; + if (this == COREDUMP_AND_DESTROY) + return "coredump_and_destroy"; + if (this == RESTART) + return "restart"; + if (this == COREDUMP_AND_RESTART) + return "coredump_and_restart"; + if (this == PRESERVE) + return "preserve"; + if (this == RENAME_RESTART) + return "rename_restart"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2346,11 +2408,14 @@ public class Types */ CHECKPOINT; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == SNAPSHOT) return "snapshot"; - if (this == CHECKPOINT) return "checkpoint"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == SNAPSHOT) + return "snapshot"; + if (this == CHECKPOINT) + return "checkpoint"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2369,11 +2434,14 @@ public class Types */ RESTART; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == DESTROY) return "destroy"; - if (this == RESTART) return "restart"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == DESTROY) + return "destroy"; + if (this == RESTART) + return "restart"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2396,12 +2464,16 @@ public class Types */ UNPLUG; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == ATTACH) return "attach"; - if (this == PLUG) return "plug"; - if (this == UNPLUG) return "unplug"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == ATTACH) + return "attach"; + if (this == PLUG) + return "plug"; + if (this == UNPLUG) + return "unplug"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2592,54 +2664,100 @@ public class Types */ VGPU; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == SESSION) return "session"; - if (this == AUTH) return "auth"; - if (this == SUBJECT) return "subject"; - if (this == ROLE) return "role"; - if (this == TASK) return "task"; - if (this == EVENT) return "event"; - if (this == POOL) return "pool"; - if (this == POOL_PATCH) return "pool_patch"; - if (this == VM) return "VM"; - if (this == VM_METRICS) return "VM_metrics"; - if (this == VM_GUEST_METRICS) return "VM_guest_metrics"; - if (this == VMPP) return "VMPP"; - if (this == VM_APPLIANCE) return "VM_appliance"; - if (this == DR_TASK) return "DR_task"; - if (this == HOST) return "host"; - if (this == HOST_CRASHDUMP) return "host_crashdump"; - if (this == HOST_PATCH) return "host_patch"; - if (this == HOST_METRICS) return "host_metrics"; - if (this == HOST_CPU) return "host_cpu"; - if (this == NETWORK) return "network"; - if (this == VIF) return "VIF"; - if (this == VIF_METRICS) return "VIF_metrics"; - if (this == PIF) return "PIF"; - if (this == PIF_METRICS) return "PIF_metrics"; - if (this == BOND) return "Bond"; - if (this == VLAN) return "VLAN"; - if (this == SM) return "SM"; - if (this == SR) return "SR"; - if (this == VDI) return "VDI"; - if (this == VBD) return "VBD"; - if (this == VBD_METRICS) return "VBD_metrics"; - if (this == PBD) return "PBD"; - if (this == CRASHDUMP) return "crashdump"; - if (this == VTPM) return "VTPM"; - if (this == CONSOLE) return "console"; - if (this == USER) return "user"; - if (this == DATA_SOURCE) return "data_source"; - if (this == BLOB) return "blob"; - if (this == MESSAGE) return "message"; - if (this == SECRET) return "secret"; - if (this == TUNNEL) return "tunnel"; - if (this == PCI) return "PCI"; - if (this == PGPU) return "PGPU"; - if (this == GPU_GROUP) return "GPU_group"; - if (this == VGPU) return "VGPU"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == SESSION) + return "session"; + if (this == AUTH) + return "auth"; + if (this == SUBJECT) + return "subject"; + if (this == ROLE) + return "role"; + if (this == TASK) + return "task"; + if (this == EVENT) + return "event"; + if (this == POOL) + return "pool"; + if (this == POOL_PATCH) + return "pool_patch"; + if (this == VM) + return "VM"; + if (this == VM_METRICS) + return "VM_metrics"; + if (this == VM_GUEST_METRICS) + return "VM_guest_metrics"; + if (this == VMPP) + return "VMPP"; + if (this == VM_APPLIANCE) + return "VM_appliance"; + if (this == DR_TASK) + return "DR_task"; + if (this == HOST) + return "host"; + if (this == HOST_CRASHDUMP) + return "host_crashdump"; + if (this == HOST_PATCH) + return "host_patch"; + if (this == HOST_METRICS) + return "host_metrics"; + if (this == HOST_CPU) + return "host_cpu"; + if (this == NETWORK) + return "network"; + if (this == VIF) + return "VIF"; + if (this == VIF_METRICS) + return "VIF_metrics"; + if (this == PIF) + return "PIF"; + if (this == PIF_METRICS) + return "PIF_metrics"; + if (this == BOND) + return "Bond"; + if (this == VLAN) + return "VLAN"; + if (this == SM) + return "SM"; + if (this == SR) + return "SR"; + if (this == VDI) + return "VDI"; + if (this == VBD) + return "VBD"; + if (this == VBD_METRICS) + return "VBD_metrics"; + if (this == PBD) + return "PBD"; + if (this == CRASHDUMP) + return "crashdump"; + if (this == VTPM) + return "VTPM"; + if (this == CONSOLE) + return "console"; + if (this == USER) + return "user"; + if (this == DATA_SOURCE) + return "data_source"; + if (this == BLOB) + return "blob"; + if (this == MESSAGE) + return "message"; + if (this == SECRET) + return "secret"; + if (this == TUNNEL) + return "tunnel"; + if (this == PCI) + return "PCI"; + if (this == PGPU) + return "PGPU"; + if (this == GPU_GROUP) + return "GPU_group"; + if (this == VGPU) + return "VGPU"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2682,17 +2800,26 @@ public class Types */ VM_MIGRATE; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == PROVISION) return "provision"; - if (this == EVACUATE) return "evacuate"; - if (this == SHUTDOWN) return "shutdown"; - if (this == REBOOT) return "reboot"; - if (this == POWER_ON) return "power_on"; - if (this == VM_START) return "vm_start"; - if (this == VM_RESUME) return "vm_resume"; - if (this == VM_MIGRATE) return "vm_migrate"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == PROVISION) + return "provision"; + if (this == EVACUATE) + return "evacuate"; + if (this == SHUTDOWN) + return "shutdown"; + if (this == REBOOT) + return "reboot"; + if (this == POWER_ON) + return "power_on"; + if (this == VM_START) + return "vm_start"; + if (this == VM_RESUME) + return "vm_resume"; + if (this == VM_MIGRATE) + return "vm_migrate"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2719,13 +2846,18 @@ public class Types */ WEEKLY; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == NEVER) return "never"; - if (this == ALWAYS_AFTER_BACKUP) return "always_after_backup"; - if (this == DAILY) return "daily"; - if (this == WEEKLY) return "weekly"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == NEVER) + return "never"; + if (this == ALWAYS_AFTER_BACKUP) + return "always_after_backup"; + if (this == DAILY) + return "daily"; + if (this == WEEKLY) + return "weekly"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2748,12 +2880,16 @@ public class Types */ NFS; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == NONE) return "none"; - if (this == CIFS) return "cifs"; - if (this == NFS) return "nfs"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == NONE) + return "none"; + if (this == CIFS) + return "cifs"; + if (this == NFS) + return "nfs"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2772,11 +2908,14 @@ public class Types */ RW; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == RO) return "RO"; - if (this == RW) return "RW"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == RO) + return "RO"; + if (this == RW) + return "RW"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2803,13 +2942,18 @@ public class Types */ AUTOCONF; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == NONE) return "None"; - if (this == DHCP) return "DHCP"; - if (this == STATIC) return "Static"; - if (this == AUTOCONF) return "Autoconf"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == NONE) + return "None"; + if (this == DHCP) + return "DHCP"; + if (this == STATIC) + return "Static"; + if (this == AUTOCONF) + return "Autoconf"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2828,11 +2972,14 @@ public class Types */ DISK; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == CD) return "CD"; - if (this == DISK) return "Disk"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == CD) + return "CD"; + if (this == DISK) + return "Disk"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2851,11 +2998,14 @@ public class Types */ PERSIST; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == RESET) return "reset"; - if (this == PERSIST) return "persist"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == RESET) + return "reset"; + if (this == PERSIST) + return "persist"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2882,13 +3032,18 @@ public class Types */ SHUTDOWN; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == START) return "start"; - if (this == CLEAN_SHUTDOWN) return "clean_shutdown"; - if (this == HARD_SHUTDOWN) return "hard_shutdown"; - if (this == SHUTDOWN) return "shutdown"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == START) + return "start"; + if (this == CLEAN_SHUTDOWN) + return "clean_shutdown"; + if (this == HARD_SHUTDOWN) + return "hard_shutdown"; + if (this == SHUTDOWN) + return "shutdown"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2931,17 +3086,26 @@ public class Types */ UNPAUSE; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == ATTACH) return "attach"; - if (this == EJECT) return "eject"; - if (this == INSERT) return "insert"; - if (this == PLUG) return "plug"; - if (this == UNPLUG) return "unplug"; - if (this == UNPLUG_FORCE) return "unplug_force"; - if (this == PAUSE) return "pause"; - if (this == UNPAUSE) return "unpause"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == ATTACH) + return "attach"; + if (this == EJECT) + return "eject"; + if (this == INSERT) + return "insert"; + if (this == PLUG) + return "plug"; + if (this == UNPLUG) + return "unplug"; + if (this == UNPLUG_FORCE) + return "unplug_force"; + if (this == PAUSE) + return "pause"; + if (this == UNPAUSE) + return "unpause"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2964,12 +3128,16 @@ public class Types */ WEEKLY; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == HOURLY) return "hourly"; - if (this == DAILY) return "daily"; - if (this == WEEKLY) return "weekly"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == HOURLY) + return "hourly"; + if (this == DAILY) + return "daily"; + if (this == WEEKLY) + return "weekly"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -2988,11 +3156,14 @@ public class Types */ DISABLED; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == UNLOCKED) return "unlocked"; - if (this == DISABLED) return "disabled"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == UNLOCKED) + return "unlocked"; + if (this == DISABLED) + return "disabled"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3019,13 +3190,18 @@ public class Types */ SUSPENDED; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == HALTED) return "Halted"; - if (this == PAUSED) return "Paused"; - if (this == RUNNING) return "Running"; - if (this == SUSPENDED) return "Suspended"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == HALTED) + return "Halted"; + if (this == PAUSED) + return "Paused"; + if (this == RUNNING) + return "Running"; + if (this == SUSPENDED) + return "Suspended"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3216,54 +3392,100 @@ public class Types */ DESTROY; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == SNAPSHOT) return "snapshot"; - if (this == CLONE) return "clone"; - if (this == COPY) return "copy"; - if (this == CREATE_TEMPLATE) return "create_template"; - if (this == REVERT) return "revert"; - if (this == CHECKPOINT) return "checkpoint"; - if (this == SNAPSHOT_WITH_QUIESCE) return "snapshot_with_quiesce"; - if (this == PROVISION) return "provision"; - if (this == START) return "start"; - if (this == START_ON) return "start_on"; - if (this == PAUSE) return "pause"; - if (this == UNPAUSE) return "unpause"; - if (this == CLEAN_SHUTDOWN) return "clean_shutdown"; - if (this == CLEAN_REBOOT) return "clean_reboot"; - if (this == HARD_SHUTDOWN) return "hard_shutdown"; - if (this == POWER_STATE_RESET) return "power_state_reset"; - if (this == HARD_REBOOT) return "hard_reboot"; - if (this == SUSPEND) return "suspend"; - if (this == CSVM) return "csvm"; - if (this == RESUME) return "resume"; - if (this == RESUME_ON) return "resume_on"; - if (this == POOL_MIGRATE) return "pool_migrate"; - if (this == MIGRATE_SEND) return "migrate_send"; - if (this == GET_BOOT_RECORD) return "get_boot_record"; - if (this == SEND_SYSRQ) return "send_sysrq"; - if (this == SEND_TRIGGER) return "send_trigger"; - if (this == QUERY_SERVICES) return "query_services"; - if (this == CHANGING_MEMORY_LIVE) return "changing_memory_live"; - if (this == AWAITING_MEMORY_LIVE) return "awaiting_memory_live"; - if (this == CHANGING_DYNAMIC_RANGE) return "changing_dynamic_range"; - if (this == CHANGING_STATIC_RANGE) return "changing_static_range"; - if (this == CHANGING_MEMORY_LIMITS) return "changing_memory_limits"; - if (this == CHANGING_SHADOW_MEMORY) return "changing_shadow_memory"; - if (this == CHANGING_SHADOW_MEMORY_LIVE) return "changing_shadow_memory_live"; - if (this == CHANGING_VCPUS) return "changing_VCPUs"; - if (this == CHANGING_VCPUS_LIVE) return "changing_VCPUs_live"; - if (this == ASSERT_OPERATION_VALID) return "assert_operation_valid"; - if (this == DATA_SOURCE_OP) return "data_source_op"; - if (this == UPDATE_ALLOWED_OPERATIONS) return "update_allowed_operations"; - if (this == MAKE_INTO_TEMPLATE) return "make_into_template"; - if (this == IMPORT) return "import"; - if (this == EXPORT) return "export"; - if (this == METADATA_EXPORT) return "metadata_export"; - if (this == REVERTING) return "reverting"; - if (this == DESTROY) return "destroy"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == SNAPSHOT) + return "snapshot"; + if (this == CLONE) + return "clone"; + if (this == COPY) + return "copy"; + if (this == CREATE_TEMPLATE) + return "create_template"; + if (this == REVERT) + return "revert"; + if (this == CHECKPOINT) + return "checkpoint"; + if (this == SNAPSHOT_WITH_QUIESCE) + return "snapshot_with_quiesce"; + if (this == PROVISION) + return "provision"; + if (this == START) + return "start"; + if (this == START_ON) + return "start_on"; + if (this == PAUSE) + return "pause"; + if (this == UNPAUSE) + return "unpause"; + if (this == CLEAN_SHUTDOWN) + return "clean_shutdown"; + if (this == CLEAN_REBOOT) + return "clean_reboot"; + if (this == HARD_SHUTDOWN) + return "hard_shutdown"; + if (this == POWER_STATE_RESET) + return "power_state_reset"; + if (this == HARD_REBOOT) + return "hard_reboot"; + if (this == SUSPEND) + return "suspend"; + if (this == CSVM) + return "csvm"; + if (this == RESUME) + return "resume"; + if (this == RESUME_ON) + return "resume_on"; + if (this == POOL_MIGRATE) + return "pool_migrate"; + if (this == MIGRATE_SEND) + return "migrate_send"; + if (this == GET_BOOT_RECORD) + return "get_boot_record"; + if (this == SEND_SYSRQ) + return "send_sysrq"; + if (this == SEND_TRIGGER) + return "send_trigger"; + if (this == QUERY_SERVICES) + return "query_services"; + if (this == CHANGING_MEMORY_LIVE) + return "changing_memory_live"; + if (this == AWAITING_MEMORY_LIVE) + return "awaiting_memory_live"; + if (this == CHANGING_DYNAMIC_RANGE) + return "changing_dynamic_range"; + if (this == CHANGING_STATIC_RANGE) + return "changing_static_range"; + if (this == CHANGING_MEMORY_LIMITS) + return "changing_memory_limits"; + if (this == CHANGING_SHADOW_MEMORY) + return "changing_shadow_memory"; + if (this == CHANGING_SHADOW_MEMORY_LIVE) + return "changing_shadow_memory_live"; + if (this == CHANGING_VCPUS) + return "changing_VCPUs"; + if (this == CHANGING_VCPUS_LIVE) + return "changing_VCPUs_live"; + if (this == ASSERT_OPERATION_VALID) + return "assert_operation_valid"; + if (this == DATA_SOURCE_OP) + return "data_source_op"; + if (this == UPDATE_ALLOWED_OPERATIONS) + return "update_allowed_operations"; + if (this == MAKE_INTO_TEMPLATE) + return "make_into_template"; + if (this == IMPORT) + return "import"; + if (this == EXPORT) + return "export"; + if (this == METADATA_EXPORT) + return "metadata_export"; + if (this == REVERTING) + return "reverting"; + if (this == DESTROY) + return "destroy"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3286,12 +3508,16 @@ public class Types */ LACP; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == BALANCE_SLB) return "balance-slb"; - if (this == ACTIVE_BACKUP) return "active-backup"; - if (this == LACP) return "lacp"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == BALANCE_SLB) + return "balance-slb"; + if (this == ACTIVE_BACKUP) + return "active-backup"; + if (this == LACP) + return "lacp"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3314,12 +3540,16 @@ public class Types */ STATIC; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == NONE) return "None"; - if (this == DHCP) return "DHCP"; - if (this == STATIC) return "Static"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == NONE) + return "None"; + if (this == DHCP) + return "DHCP"; + if (this == STATIC) + return "Static"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3386,23 +3616,38 @@ public class Types */ PBD_DESTROY; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == SCAN) return "scan"; - if (this == DESTROY) return "destroy"; - if (this == FORGET) return "forget"; - if (this == PLUG) return "plug"; - if (this == UNPLUG) return "unplug"; - if (this == UPDATE) return "update"; - if (this == VDI_CREATE) return "vdi_create"; - if (this == VDI_INTRODUCE) return "vdi_introduce"; - if (this == VDI_DESTROY) return "vdi_destroy"; - if (this == VDI_RESIZE) return "vdi_resize"; - if (this == VDI_CLONE) return "vdi_clone"; - if (this == VDI_SNAPSHOT) return "vdi_snapshot"; - if (this == PBD_CREATE) return "pbd_create"; - if (this == PBD_DESTROY) return "pbd_destroy"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == SCAN) + return "scan"; + if (this == DESTROY) + return "destroy"; + if (this == FORGET) + return "forget"; + if (this == PLUG) + return "plug"; + if (this == UNPLUG) + return "unplug"; + if (this == UPDATE) + return "update"; + if (this == VDI_CREATE) + return "vdi_create"; + if (this == VDI_INTRODUCE) + return "vdi_introduce"; + if (this == VDI_DESTROY) + return "vdi_destroy"; + if (this == VDI_RESIZE) + return "vdi_resize"; + if (this == VDI_CLONE) + return "vdi_clone"; + if (this == VDI_SNAPSHOT) + return "vdi_snapshot"; + if (this == PBD_CREATE) + return "pbd_create"; + if (this == PBD_DESTROY) + return "pbd_destroy"; + /* This can never be reached */ + return "illegal enum"; } }; @@ -3429,18 +3674,22 @@ public class Types */ DISABLED; public String toString() { - if (this == UNRECOGNIZED) return "UNRECOGNIZED"; - if (this == NETWORK_DEFAULT) return "network_default"; - if (this == LOCKED) return "locked"; - if (this == UNLOCKED) return "unlocked"; - if (this == DISABLED) return "disabled"; - /* This can never be reached */ - return "illegal enum"; + if (this == UNRECOGNIZED) + return "UNRECOGNIZED"; + if (this == NETWORK_DEFAULT) + return "network_default"; + if (this == LOCKED) + return "locked"; + if (this == UNLOCKED) + return "unlocked"; + if (this == DISABLED) + return "disabled"; + /* This can never be reached */ + return "illegal enum"; } }; - /** * The restore could not be performed because a network interface is missing */ @@ -9614,33 +9863,32 @@ public class Types } - public static String toString(Object object) { if (object == null) { return null; } - return (String) object; + return (String)object; } public static Long toLong(Object object) { if (object == null) { return null; } - return Long.valueOf((String) object); + return Long.valueOf((String)object); } public static Double toDouble(Object object) { if (object == null) { return null; } - return (Double) object; + return (Double)object; } public static Boolean toBoolean(Object object) { if (object == null) { return null; } - return (Boolean) object; + return (Boolean)object; } public static Date toDate(Object object) { @@ -9648,11 +9896,11 @@ public class Types return null; } try { - return (Date) object; - } catch (ClassCastException e){ + return (Date)object; + } catch (ClassCastException e) { //Occasionally the date comes back as an ocaml float rather than //in the xmlrpc format! Catch this and convert. - return (new Date((long) (1000*Double.parseDouble((String) object)))); + return (new Date((long)(1000 * Double.parseDouble((String)object)))); } } @@ -9661,7 +9909,7 @@ public class Types return null; } try { - return XenAPIObjects.valueOf(((String) object).toUpperCase().replace('-','_')); + return XenAPIObjects.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return XenAPIObjects.UNRECOGNIZED; } @@ -9672,7 +9920,7 @@ public class Types return null; } try { - return AfterApplyGuidance.valueOf(((String) object).toUpperCase().replace('-','_')); + return AfterApplyGuidance.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return AfterApplyGuidance.UNRECOGNIZED; } @@ -9683,7 +9931,7 @@ public class Types return null; } try { - return BondMode.valueOf(((String) object).toUpperCase().replace('-','_')); + return BondMode.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return BondMode.UNRECOGNIZED; } @@ -9694,7 +9942,7 @@ public class Types return null; } try { - return Cls.valueOf(((String) object).toUpperCase().replace('-','_')); + return Cls.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return Cls.UNRECOGNIZED; } @@ -9705,7 +9953,7 @@ public class Types return null; } try { - return ConsoleProtocol.valueOf(((String) object).toUpperCase().replace('-','_')); + return ConsoleProtocol.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return ConsoleProtocol.UNRECOGNIZED; } @@ -9716,7 +9964,7 @@ public class Types return null; } try { - return EventOperation.valueOf(((String) object).toUpperCase().replace('-','_')); + return EventOperation.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return EventOperation.UNRECOGNIZED; } @@ -9727,7 +9975,7 @@ public class Types return null; } try { - return HostAllowedOperations.valueOf(((String) object).toUpperCase().replace('-','_')); + return HostAllowedOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return HostAllowedOperations.UNRECOGNIZED; } @@ -9738,7 +9986,7 @@ public class Types return null; } try { - return IpConfigurationMode.valueOf(((String) object).toUpperCase().replace('-','_')); + return IpConfigurationMode.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return IpConfigurationMode.UNRECOGNIZED; } @@ -9749,7 +9997,7 @@ public class Types return null; } try { - return Ipv6ConfigurationMode.valueOf(((String) object).toUpperCase().replace('-','_')); + return Ipv6ConfigurationMode.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return Ipv6ConfigurationMode.UNRECOGNIZED; } @@ -9760,7 +10008,7 @@ public class Types return null; } try { - return NetworkDefaultLockingMode.valueOf(((String) object).toUpperCase().replace('-','_')); + return NetworkDefaultLockingMode.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return NetworkDefaultLockingMode.UNRECOGNIZED; } @@ -9771,7 +10019,7 @@ public class Types return null; } try { - return NetworkOperations.valueOf(((String) object).toUpperCase().replace('-','_')); + return NetworkOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return NetworkOperations.UNRECOGNIZED; } @@ -9782,7 +10030,7 @@ public class Types return null; } try { - return OnBoot.valueOf(((String) object).toUpperCase().replace('-','_')); + return OnBoot.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return OnBoot.UNRECOGNIZED; } @@ -9793,7 +10041,7 @@ public class Types return null; } try { - return OnCrashBehaviour.valueOf(((String) object).toUpperCase().replace('-','_')); + return OnCrashBehaviour.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return OnCrashBehaviour.UNRECOGNIZED; } @@ -9804,7 +10052,7 @@ public class Types return null; } try { - return OnNormalExit.valueOf(((String) object).toUpperCase().replace('-','_')); + return OnNormalExit.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return OnNormalExit.UNRECOGNIZED; } @@ -9815,7 +10063,7 @@ public class Types return null; } try { - return PrimaryAddressType.valueOf(((String) object).toUpperCase().replace('-','_')); + return PrimaryAddressType.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return PrimaryAddressType.UNRECOGNIZED; } @@ -9826,7 +10074,7 @@ public class Types return null; } try { - return StorageOperations.valueOf(((String) object).toUpperCase().replace('-','_')); + return StorageOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return StorageOperations.UNRECOGNIZED; } @@ -9837,7 +10085,7 @@ public class Types return null; } try { - return TaskAllowedOperations.valueOf(((String) object).toUpperCase().replace('-','_')); + return TaskAllowedOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return TaskAllowedOperations.UNRECOGNIZED; } @@ -9848,7 +10096,7 @@ public class Types return null; } try { - return TaskStatusType.valueOf(((String) object).toUpperCase().replace('-','_')); + return TaskStatusType.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return TaskStatusType.UNRECOGNIZED; } @@ -9859,7 +10107,7 @@ public class Types return null; } try { - return VbdMode.valueOf(((String) object).toUpperCase().replace('-','_')); + return VbdMode.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VbdMode.UNRECOGNIZED; } @@ -9870,7 +10118,7 @@ public class Types return null; } try { - return VbdOperations.valueOf(((String) object).toUpperCase().replace('-','_')); + return VbdOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VbdOperations.UNRECOGNIZED; } @@ -9881,7 +10129,7 @@ public class Types return null; } try { - return VbdType.valueOf(((String) object).toUpperCase().replace('-','_')); + return VbdType.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VbdType.UNRECOGNIZED; } @@ -9892,7 +10140,7 @@ public class Types return null; } try { - return VdiOperations.valueOf(((String) object).toUpperCase().replace('-','_')); + return VdiOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VdiOperations.UNRECOGNIZED; } @@ -9903,7 +10151,7 @@ public class Types return null; } try { - return VdiType.valueOf(((String) object).toUpperCase().replace('-','_')); + return VdiType.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VdiType.UNRECOGNIZED; } @@ -9914,7 +10162,7 @@ public class Types return null; } try { - return VifLockingMode.valueOf(((String) object).toUpperCase().replace('-','_')); + return VifLockingMode.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VifLockingMode.UNRECOGNIZED; } @@ -9925,7 +10173,7 @@ public class Types return null; } try { - return VifOperations.valueOf(((String) object).toUpperCase().replace('-','_')); + return VifOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VifOperations.UNRECOGNIZED; } @@ -9936,7 +10184,7 @@ public class Types return null; } try { - return VmApplianceOperation.valueOf(((String) object).toUpperCase().replace('-','_')); + return VmApplianceOperation.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VmApplianceOperation.UNRECOGNIZED; } @@ -9947,7 +10195,7 @@ public class Types return null; } try { - return VmOperations.valueOf(((String) object).toUpperCase().replace('-','_')); + return VmOperations.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VmOperations.UNRECOGNIZED; } @@ -9958,7 +10206,7 @@ public class Types return null; } try { - return VmPowerState.valueOf(((String) object).toUpperCase().replace('-','_')); + return VmPowerState.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VmPowerState.UNRECOGNIZED; } @@ -9969,7 +10217,7 @@ public class Types return null; } try { - return VmppArchiveFrequency.valueOf(((String) object).toUpperCase().replace('-','_')); + return VmppArchiveFrequency.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VmppArchiveFrequency.UNRECOGNIZED; } @@ -9980,7 +10228,7 @@ public class Types return null; } try { - return VmppArchiveTargetType.valueOf(((String) object).toUpperCase().replace('-','_')); + return VmppArchiveTargetType.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VmppArchiveTargetType.UNRECOGNIZED; } @@ -9991,7 +10239,7 @@ public class Types return null; } try { - return VmppBackupFrequency.valueOf(((String) object).toUpperCase().replace('-','_')); + return VmppBackupFrequency.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VmppBackupFrequency.UNRECOGNIZED; } @@ -10002,7 +10250,7 @@ public class Types return null; } try { - return VmppBackupType.valueOf(((String) object).toUpperCase().replace('-','_')); + return VmppBackupType.valueOf(((String)object).toUpperCase().replace('-', '_')); } catch (IllegalArgumentException ex) { return VmppBackupType.UNRECOGNIZED; } @@ -10012,9 +10260,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { String typed = toString(item); result.add(typed); } @@ -10025,9 +10273,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Types.AfterApplyGuidance typed = toAfterApplyGuidance(item); result.add(typed); } @@ -10038,9 +10286,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Types.HostAllowedOperations typed = toHostAllowedOperations(item); result.add(typed); } @@ -10051,9 +10299,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Types.NetworkOperations typed = toNetworkOperations(item); result.add(typed); } @@ -10064,9 +10312,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Types.StorageOperations typed = toStorageOperations(item); result.add(typed); } @@ -10077,9 +10325,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Types.TaskAllowedOperations typed = toTaskAllowedOperations(item); result.add(typed); } @@ -10090,9 +10338,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Types.VbdOperations typed = toVbdOperations(item); result.add(typed); } @@ -10103,9 +10351,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Types.VdiOperations typed = toVdiOperations(item); result.add(typed); } @@ -10116,9 +10364,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Types.VifOperations typed = toVifOperations(item); result.add(typed); } @@ -10129,9 +10377,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Types.VmApplianceOperation typed = toVmApplianceOperation(item); result.add(typed); } @@ -10142,9 +10390,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Types.VmOperations typed = toVmOperations(item); result.add(typed); } @@ -10155,9 +10403,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Bond typed = toBond(item); result.add(typed); } @@ -10168,9 +10416,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { DRTask typed = toDRTask(item); result.add(typed); } @@ -10181,9 +10429,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { GPUGroup typed = toGPUGroup(item); result.add(typed); } @@ -10194,9 +10442,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { PBD typed = toPBD(item); result.add(typed); } @@ -10207,9 +10455,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { PCI typed = toPCI(item); result.add(typed); } @@ -10220,9 +10468,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { PGPU typed = toPGPU(item); result.add(typed); } @@ -10233,9 +10481,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { PIF typed = toPIF(item); result.add(typed); } @@ -10246,9 +10494,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { PIFMetrics typed = toPIFMetrics(item); result.add(typed); } @@ -10259,9 +10507,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { SM typed = toSM(item); result.add(typed); } @@ -10272,9 +10520,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { SR typed = toSR(item); result.add(typed); } @@ -10285,9 +10533,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VBD typed = toVBD(item); result.add(typed); } @@ -10298,9 +10546,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VBDMetrics typed = toVBDMetrics(item); result.add(typed); } @@ -10311,9 +10559,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VDI typed = toVDI(item); result.add(typed); } @@ -10324,9 +10572,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VGPU typed = toVGPU(item); result.add(typed); } @@ -10337,9 +10585,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VIF typed = toVIF(item); result.add(typed); } @@ -10350,9 +10598,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VIFMetrics typed = toVIFMetrics(item); result.add(typed); } @@ -10363,9 +10611,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VLAN typed = toVLAN(item); result.add(typed); } @@ -10376,9 +10624,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VM typed = toVM(item); result.add(typed); } @@ -10389,9 +10637,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VMPP typed = toVMPP(item); result.add(typed); } @@ -10402,9 +10650,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VMAppliance typed = toVMAppliance(item); result.add(typed); } @@ -10415,9 +10663,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VMGuestMetrics typed = toVMGuestMetrics(item); result.add(typed); } @@ -10428,9 +10676,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VMMetrics typed = toVMMetrics(item); result.add(typed); } @@ -10441,9 +10689,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { VTPM typed = toVTPM(item); result.add(typed); } @@ -10454,9 +10702,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Blob typed = toBlob(item); result.add(typed); } @@ -10467,9 +10715,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Console typed = toConsole(item); result.add(typed); } @@ -10480,9 +10728,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Crashdump typed = toCrashdump(item); result.add(typed); } @@ -10493,9 +10741,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Host typed = toHost(item); result.add(typed); } @@ -10506,9 +10754,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { HostCpu typed = toHostCpu(item); result.add(typed); } @@ -10519,9 +10767,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { HostCrashdump typed = toHostCrashdump(item); result.add(typed); } @@ -10532,9 +10780,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { HostMetrics typed = toHostMetrics(item); result.add(typed); } @@ -10545,9 +10793,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { HostPatch typed = toHostPatch(item); result.add(typed); } @@ -10558,9 +10806,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Message typed = toMessage(item); result.add(typed); } @@ -10571,9 +10819,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Network typed = toNetwork(item); result.add(typed); } @@ -10584,9 +10832,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Pool typed = toPool(item); result.add(typed); } @@ -10597,9 +10845,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { PoolPatch typed = toPoolPatch(item); result.add(typed); } @@ -10610,9 +10858,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Role typed = toRole(item); result.add(typed); } @@ -10623,9 +10871,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Secret typed = toSecret(item); result.add(typed); } @@ -10636,9 +10884,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Subject typed = toSubject(item); result.add(typed); } @@ -10649,9 +10897,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Task typed = toTask(item); result.add(typed); } @@ -10662,9 +10910,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Tunnel typed = toTunnel(item); result.add(typed); } @@ -10675,9 +10923,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { DataSource.Record typed = toDataSourceRecord(item); result.add(typed); } @@ -10688,9 +10936,9 @@ public class Types if (object == null) { return null; } - Object[] items = (Object[]) object; + Object[] items = (Object[])object; Set result = new LinkedHashSet(); - for(Object item: items) { + for (Object item : items) { Event.Record typed = toEventRecord(item); result.add(typed); } @@ -10701,10 +10949,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { String key = toString(entry.getKey()); String value = toString(entry.getValue()); result.put(key, value); @@ -10716,10 +10964,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { String key = toString(entry.getKey()); Types.HostAllowedOperations value = toHostAllowedOperations(entry.getValue()); result.put(key, value); @@ -10731,10 +10979,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { String key = toString(entry.getKey()); Types.NetworkOperations value = toNetworkOperations(entry.getValue()); result.put(key, value); @@ -10746,10 +10994,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { String key = toString(entry.getKey()); Types.StorageOperations value = toStorageOperations(entry.getValue()); result.put(key, value); @@ -10761,10 +11009,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { String key = toString(entry.getKey()); Types.TaskAllowedOperations value = toTaskAllowedOperations(entry.getValue()); result.put(key, value); @@ -10776,10 +11024,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { String key = toString(entry.getKey()); Types.VbdOperations value = toVbdOperations(entry.getValue()); result.put(key, value); @@ -10791,10 +11039,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { String key = toString(entry.getKey()); Types.VdiOperations value = toVdiOperations(entry.getValue()); result.put(key, value); @@ -10806,10 +11054,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { String key = toString(entry.getKey()); Types.VifOperations value = toVifOperations(entry.getValue()); result.put(key, value); @@ -10821,10 +11069,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { String key = toString(entry.getKey()); Types.VmApplianceOperation value = toVmApplianceOperation(entry.getValue()); result.put(key, value); @@ -10836,10 +11084,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { String key = toString(entry.getKey()); Types.VmOperations value = toVmOperations(entry.getValue()); result.put(key, value); @@ -10851,10 +11099,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { String key = toString(entry.getKey()); Blob value = toBlob(entry.getValue()); result.put(key, value); @@ -10866,10 +11114,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Long key = toLong(entry.getKey()); Long value = toLong(entry.getValue()); result.put(key, value); @@ -10881,10 +11129,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Long key = toLong(entry.getKey()); Double value = toDouble(entry.getValue()); result.put(key, value); @@ -10896,10 +11144,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map> result = new HashMap>(); + Map map = (Map)object; + Map> result = new HashMap>(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Long key = toLong(entry.getKey()); Set value = toSetOfString(entry.getValue()); result.put(key, value); @@ -10911,10 +11159,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Types.VmOperations key = toVmOperations(entry.getKey()); String value = toString(entry.getValue()); result.put(key, value); @@ -10926,10 +11174,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Bond key = toBond(entry.getKey()); Bond.Record value = toBondRecord(entry.getValue()); result.put(key, value); @@ -10941,10 +11189,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { DRTask key = toDRTask(entry.getKey()); DRTask.Record value = toDRTaskRecord(entry.getValue()); result.put(key, value); @@ -10956,10 +11204,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { GPUGroup key = toGPUGroup(entry.getKey()); GPUGroup.Record value = toGPUGroupRecord(entry.getValue()); result.put(key, value); @@ -10971,10 +11219,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { PBD key = toPBD(entry.getKey()); PBD.Record value = toPBDRecord(entry.getValue()); result.put(key, value); @@ -10986,10 +11234,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { PCI key = toPCI(entry.getKey()); PCI.Record value = toPCIRecord(entry.getValue()); result.put(key, value); @@ -11001,10 +11249,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { PGPU key = toPGPU(entry.getKey()); PGPU.Record value = toPGPURecord(entry.getValue()); result.put(key, value); @@ -11016,10 +11264,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { PIF key = toPIF(entry.getKey()); PIF.Record value = toPIFRecord(entry.getValue()); result.put(key, value); @@ -11031,10 +11279,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { PIFMetrics key = toPIFMetrics(entry.getKey()); PIFMetrics.Record value = toPIFMetricsRecord(entry.getValue()); result.put(key, value); @@ -11046,10 +11294,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { SM key = toSM(entry.getKey()); SM.Record value = toSMRecord(entry.getValue()); result.put(key, value); @@ -11061,10 +11309,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { SR key = toSR(entry.getKey()); SR.Record value = toSRRecord(entry.getValue()); result.put(key, value); @@ -11076,10 +11324,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VBD key = toVBD(entry.getKey()); VBD.Record value = toVBDRecord(entry.getValue()); result.put(key, value); @@ -11091,10 +11339,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VBDMetrics key = toVBDMetrics(entry.getKey()); VBDMetrics.Record value = toVBDMetricsRecord(entry.getValue()); result.put(key, value); @@ -11106,10 +11354,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VDI key = toVDI(entry.getKey()); SR value = toSR(entry.getValue()); result.put(key, value); @@ -11121,10 +11369,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VDI key = toVDI(entry.getKey()); VDI.Record value = toVDIRecord(entry.getValue()); result.put(key, value); @@ -11136,10 +11384,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VGPU key = toVGPU(entry.getKey()); VGPU.Record value = toVGPURecord(entry.getValue()); result.put(key, value); @@ -11151,10 +11399,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VIF key = toVIF(entry.getKey()); Network value = toNetwork(entry.getValue()); result.put(key, value); @@ -11166,10 +11414,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VIF key = toVIF(entry.getKey()); VIF.Record value = toVIFRecord(entry.getValue()); result.put(key, value); @@ -11181,10 +11429,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VIFMetrics key = toVIFMetrics(entry.getKey()); VIFMetrics.Record value = toVIFMetricsRecord(entry.getValue()); result.put(key, value); @@ -11196,10 +11444,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VLAN key = toVLAN(entry.getKey()); VLAN.Record value = toVLANRecord(entry.getValue()); result.put(key, value); @@ -11211,10 +11459,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VM key = toVM(entry.getKey()); String value = toString(entry.getValue()); result.put(key, value); @@ -11226,10 +11474,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map> result = new HashMap>(); + Map map = (Map)object; + Map> result = new HashMap>(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VM key = toVM(entry.getKey()); Set value = toSetOfString(entry.getValue()); result.put(key, value); @@ -11241,10 +11489,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map> result = new HashMap>(); + Map map = (Map)object; + Map> result = new HashMap>(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VM key = toVM(entry.getKey()); Map value = toMapOfStringString(entry.getValue()); result.put(key, value); @@ -11256,10 +11504,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VM key = toVM(entry.getKey()); VM.Record value = toVMRecord(entry.getValue()); result.put(key, value); @@ -11271,10 +11519,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VMPP key = toVMPP(entry.getKey()); VMPP.Record value = toVMPPRecord(entry.getValue()); result.put(key, value); @@ -11286,10 +11534,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VMAppliance key = toVMAppliance(entry.getKey()); VMAppliance.Record value = toVMApplianceRecord(entry.getValue()); result.put(key, value); @@ -11301,10 +11549,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VMGuestMetrics key = toVMGuestMetrics(entry.getKey()); VMGuestMetrics.Record value = toVMGuestMetricsRecord(entry.getValue()); result.put(key, value); @@ -11316,10 +11564,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { VMMetrics key = toVMMetrics(entry.getKey()); VMMetrics.Record value = toVMMetricsRecord(entry.getValue()); result.put(key, value); @@ -11331,10 +11579,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Blob key = toBlob(entry.getKey()); Blob.Record value = toBlobRecord(entry.getValue()); result.put(key, value); @@ -11346,10 +11594,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Console key = toConsole(entry.getKey()); Console.Record value = toConsoleRecord(entry.getValue()); result.put(key, value); @@ -11361,10 +11609,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Crashdump key = toCrashdump(entry.getKey()); Crashdump.Record value = toCrashdumpRecord(entry.getValue()); result.put(key, value); @@ -11376,10 +11624,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map> result = new HashMap>(); + Map map = (Map)object; + Map> result = new HashMap>(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Host key = toHost(entry.getKey()); Set value = toSetOfString(entry.getValue()); result.put(key, value); @@ -11391,10 +11639,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Host key = toHost(entry.getKey()); Host.Record value = toHostRecord(entry.getValue()); result.put(key, value); @@ -11406,10 +11654,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { HostCpu key = toHostCpu(entry.getKey()); HostCpu.Record value = toHostCpuRecord(entry.getValue()); result.put(key, value); @@ -11421,10 +11669,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { HostCrashdump key = toHostCrashdump(entry.getKey()); HostCrashdump.Record value = toHostCrashdumpRecord(entry.getValue()); result.put(key, value); @@ -11436,10 +11684,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { HostMetrics key = toHostMetrics(entry.getKey()); HostMetrics.Record value = toHostMetricsRecord(entry.getValue()); result.put(key, value); @@ -11451,10 +11699,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { HostPatch key = toHostPatch(entry.getKey()); HostPatch.Record value = toHostPatchRecord(entry.getValue()); result.put(key, value); @@ -11466,10 +11714,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Message key = toMessage(entry.getKey()); Message.Record value = toMessageRecord(entry.getValue()); result.put(key, value); @@ -11481,10 +11729,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Network key = toNetwork(entry.getKey()); Network.Record value = toNetworkRecord(entry.getValue()); result.put(key, value); @@ -11496,10 +11744,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Pool key = toPool(entry.getKey()); Pool.Record value = toPoolRecord(entry.getValue()); result.put(key, value); @@ -11511,10 +11759,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { PoolPatch key = toPoolPatch(entry.getKey()); PoolPatch.Record value = toPoolPatchRecord(entry.getValue()); result.put(key, value); @@ -11526,10 +11774,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Role key = toRole(entry.getKey()); Role.Record value = toRoleRecord(entry.getValue()); result.put(key, value); @@ -11541,10 +11789,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Secret key = toSecret(entry.getKey()); Secret.Record value = toSecretRecord(entry.getValue()); result.put(key, value); @@ -11556,10 +11804,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Subject key = toSubject(entry.getKey()); Subject.Record value = toSubjectRecord(entry.getValue()); result.put(key, value); @@ -11571,10 +11819,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Task key = toTask(entry.getKey()); Task.Record value = toTaskRecord(entry.getValue()); result.put(key, value); @@ -11586,10 +11834,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; - Map result = new HashMap(); + Map map = (Map)object; + Map result = new HashMap(); Set entries = map.entrySet(); - for(Map.Entry entry: entries) { + for (Map.Entry entry : entries) { Tunnel key = toTunnel(entry.getKey()); Tunnel.Record value = toTunnelRecord(entry.getValue()); result.put(key, value); @@ -11601,310 +11849,310 @@ public class Types if (object == null) { return null; } - return new Bond((String) object); + return new Bond((String)object); } public static DRTask toDRTask(Object object) { if (object == null) { return null; } - return new DRTask((String) object); + return new DRTask((String)object); } public static GPUGroup toGPUGroup(Object object) { if (object == null) { return null; } - return new GPUGroup((String) object); + return new GPUGroup((String)object); } public static PBD toPBD(Object object) { if (object == null) { return null; } - return new PBD((String) object); + return new PBD((String)object); } public static PCI toPCI(Object object) { if (object == null) { return null; } - return new PCI((String) object); + return new PCI((String)object); } public static PGPU toPGPU(Object object) { if (object == null) { return null; } - return new PGPU((String) object); + return new PGPU((String)object); } public static PIF toPIF(Object object) { if (object == null) { return null; } - return new PIF((String) object); + return new PIF((String)object); } public static PIFMetrics toPIFMetrics(Object object) { if (object == null) { return null; } - return new PIFMetrics((String) object); + return new PIFMetrics((String)object); } public static SM toSM(Object object) { if (object == null) { return null; } - return new SM((String) object); + return new SM((String)object); } public static SR toSR(Object object) { if (object == null) { return null; } - return new SR((String) object); + return new SR((String)object); } public static VBD toVBD(Object object) { if (object == null) { return null; } - return new VBD((String) object); + return new VBD((String)object); } public static VBDMetrics toVBDMetrics(Object object) { if (object == null) { return null; } - return new VBDMetrics((String) object); + return new VBDMetrics((String)object); } public static VDI toVDI(Object object) { if (object == null) { return null; } - return new VDI((String) object); + return new VDI((String)object); } public static VGPU toVGPU(Object object) { if (object == null) { return null; } - return new VGPU((String) object); + return new VGPU((String)object); } public static VIF toVIF(Object object) { if (object == null) { return null; } - return new VIF((String) object); + return new VIF((String)object); } public static VIFMetrics toVIFMetrics(Object object) { if (object == null) { return null; } - return new VIFMetrics((String) object); + return new VIFMetrics((String)object); } public static VLAN toVLAN(Object object) { if (object == null) { return null; } - return new VLAN((String) object); + return new VLAN((String)object); } public static VM toVM(Object object) { if (object == null) { return null; } - return new VM((String) object); + return new VM((String)object); } public static VMPP toVMPP(Object object) { if (object == null) { return null; } - return new VMPP((String) object); + return new VMPP((String)object); } public static VMAppliance toVMAppliance(Object object) { if (object == null) { return null; } - return new VMAppliance((String) object); + return new VMAppliance((String)object); } public static VMGuestMetrics toVMGuestMetrics(Object object) { if (object == null) { return null; } - return new VMGuestMetrics((String) object); + return new VMGuestMetrics((String)object); } public static VMMetrics toVMMetrics(Object object) { if (object == null) { return null; } - return new VMMetrics((String) object); + return new VMMetrics((String)object); } public static VTPM toVTPM(Object object) { if (object == null) { return null; } - return new VTPM((String) object); + return new VTPM((String)object); } public static Blob toBlob(Object object) { if (object == null) { return null; } - return new Blob((String) object); + return new Blob((String)object); } public static Console toConsole(Object object) { if (object == null) { return null; } - return new Console((String) object); + return new Console((String)object); } public static Crashdump toCrashdump(Object object) { if (object == null) { return null; } - return new Crashdump((String) object); + return new Crashdump((String)object); } public static Host toHost(Object object) { if (object == null) { return null; } - return new Host((String) object); + return new Host((String)object); } public static HostCpu toHostCpu(Object object) { if (object == null) { return null; } - return new HostCpu((String) object); + return new HostCpu((String)object); } public static HostCrashdump toHostCrashdump(Object object) { if (object == null) { return null; } - return new HostCrashdump((String) object); + return new HostCrashdump((String)object); } public static HostMetrics toHostMetrics(Object object) { if (object == null) { return null; } - return new HostMetrics((String) object); + return new HostMetrics((String)object); } public static HostPatch toHostPatch(Object object) { if (object == null) { return null; } - return new HostPatch((String) object); + return new HostPatch((String)object); } public static Message toMessage(Object object) { if (object == null) { return null; } - return new Message((String) object); + return new Message((String)object); } public static Network toNetwork(Object object) { if (object == null) { return null; } - return new Network((String) object); + return new Network((String)object); } public static Pool toPool(Object object) { if (object == null) { return null; } - return new Pool((String) object); + return new Pool((String)object); } public static PoolPatch toPoolPatch(Object object) { if (object == null) { return null; } - return new PoolPatch((String) object); + return new PoolPatch((String)object); } public static Role toRole(Object object) { if (object == null) { return null; } - return new Role((String) object); + return new Role((String)object); } public static Secret toSecret(Object object) { if (object == null) { return null; } - return new Secret((String) object); + return new Secret((String)object); } public static Session toSession(Object object) { if (object == null) { return null; } - return new Session((String) object); + return new Session((String)object); } public static Subject toSubject(Object object) { if (object == null) { return null; } - return new Subject((String) object); + return new Subject((String)object); } public static Task toTask(Object object) { if (object == null) { return null; } - return new Task((String) object); + return new Task((String)object); } public static Tunnel toTunnel(Object object) { if (object == null) { return null; } - return new Tunnel((String) object); + return new Tunnel((String)object); } public static User toUser(Object object) { if (object == null) { return null; } - return new User((String) object); + return new User((String)object); } public static Bond.Record toBondRecord(Object object) { if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Bond.Record record = new Bond.Record(); - record.uuid = toString(map.get("uuid")); - record.master = toPIF(map.get("master")); - record.slaves = toSetOfPIF(map.get("slaves")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.primarySlave = toPIF(map.get("primary_slave")); - record.mode = toBondMode(map.get("mode")); - record.properties = toMapOfStringString(map.get("properties")); - record.linksUp = toLong(map.get("links_up")); + record.uuid = toString(map.get("uuid")); + record.master = toPIF(map.get("master")); + record.slaves = toSetOfPIF(map.get("slaves")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.primarySlave = toPIF(map.get("primary_slave")); + record.mode = toBondMode(map.get("mode")); + record.properties = toMapOfStringString(map.get("properties")); + record.linksUp = toLong(map.get("links_up")); return record; } @@ -11912,10 +12160,10 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; DRTask.Record record = new DRTask.Record(); - record.uuid = toString(map.get("uuid")); - record.introducedSRs = toSetOfSR(map.get("introduced_SRs")); + record.uuid = toString(map.get("uuid")); + record.introducedSRs = toSetOfSR(map.get("introduced_SRs")); return record; } @@ -11923,15 +12171,15 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; GPUGroup.Record record = new GPUGroup.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.PGPUs = toSetOfPGPU(map.get("PGPUs")); - record.VGPUs = toSetOfVGPU(map.get("VGPUs")); - record.GPUTypes = toSetOfString(map.get("GPU_types")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.PGPUs = toSetOfPGPU(map.get("PGPUs")); + record.VGPUs = toSetOfVGPU(map.get("VGPUs")); + record.GPUTypes = toSetOfString(map.get("GPU_types")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -11939,14 +12187,14 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; PBD.Record record = new PBD.Record(); - record.uuid = toString(map.get("uuid")); - record.host = toHost(map.get("host")); - record.SR = toSR(map.get("SR")); - record.deviceConfig = toMapOfStringString(map.get("device_config")); - record.currentlyAttached = toBoolean(map.get("currently_attached")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.host = toHost(map.get("host")); + record.SR = toSR(map.get("SR")); + record.deviceConfig = toMapOfStringString(map.get("device_config")); + record.currentlyAttached = toBoolean(map.get("currently_attached")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -11954,16 +12202,16 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; PCI.Record record = new PCI.Record(); - record.uuid = toString(map.get("uuid")); - record.clazzName = toString(map.get("class_name")); - record.vendorName = toString(map.get("vendor_name")); - record.deviceName = toString(map.get("device_name")); - record.host = toHost(map.get("host")); - record.pciId = toString(map.get("pci_id")); - record.dependencies = toSetOfPCI(map.get("dependencies")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.clazzName = toString(map.get("class_name")); + record.vendorName = toString(map.get("vendor_name")); + record.deviceName = toString(map.get("device_name")); + record.host = toHost(map.get("host")); + record.pciId = toString(map.get("pci_id")); + record.dependencies = toSetOfPCI(map.get("dependencies")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -11971,13 +12219,13 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; PGPU.Record record = new PGPU.Record(); - record.uuid = toString(map.get("uuid")); - record.PCI = toPCI(map.get("PCI")); - record.GPUGroup = toGPUGroup(map.get("GPU_group")); - record.host = toHost(map.get("host")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.PCI = toPCI(map.get("PCI")); + record.GPUGroup = toGPUGroup(map.get("GPU_group")); + record.host = toHost(map.get("host")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -11985,36 +12233,36 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; PIF.Record record = new PIF.Record(); - record.uuid = toString(map.get("uuid")); - record.device = toString(map.get("device")); - record.network = toNetwork(map.get("network")); - record.host = toHost(map.get("host")); - record.MAC = toString(map.get("MAC")); - record.MTU = toLong(map.get("MTU")); - record.VLAN = toLong(map.get("VLAN")); - record.metrics = toPIFMetrics(map.get("metrics")); - record.physical = toBoolean(map.get("physical")); - record.currentlyAttached = toBoolean(map.get("currently_attached")); - record.ipConfigurationMode = toIpConfigurationMode(map.get("ip_configuration_mode")); - record.IP = toString(map.get("IP")); - record.netmask = toString(map.get("netmask")); - record.gateway = toString(map.get("gateway")); - record.DNS = toString(map.get("DNS")); - record.bondSlaveOf = toBond(map.get("bond_slave_of")); - record.bondMasterOf = toSetOfBond(map.get("bond_master_of")); - record.VLANMasterOf = toVLAN(map.get("VLAN_master_of")); - record.VLANSlaveOf = toSetOfVLAN(map.get("VLAN_slave_of")); - record.management = toBoolean(map.get("management")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.disallowUnplug = toBoolean(map.get("disallow_unplug")); - record.tunnelAccessPIFOf = toSetOfTunnel(map.get("tunnel_access_PIF_of")); - record.tunnelTransportPIFOf = toSetOfTunnel(map.get("tunnel_transport_PIF_of")); - record.ipv6ConfigurationMode = toIpv6ConfigurationMode(map.get("ipv6_configuration_mode")); - record.IPv6 = toSetOfString(map.get("IPv6")); - record.ipv6Gateway = toString(map.get("ipv6_gateway")); - record.primaryAddressType = toPrimaryAddressType(map.get("primary_address_type")); + record.uuid = toString(map.get("uuid")); + record.device = toString(map.get("device")); + record.network = toNetwork(map.get("network")); + record.host = toHost(map.get("host")); + record.MAC = toString(map.get("MAC")); + record.MTU = toLong(map.get("MTU")); + record.VLAN = toLong(map.get("VLAN")); + record.metrics = toPIFMetrics(map.get("metrics")); + record.physical = toBoolean(map.get("physical")); + record.currentlyAttached = toBoolean(map.get("currently_attached")); + record.ipConfigurationMode = toIpConfigurationMode(map.get("ip_configuration_mode")); + record.IP = toString(map.get("IP")); + record.netmask = toString(map.get("netmask")); + record.gateway = toString(map.get("gateway")); + record.DNS = toString(map.get("DNS")); + record.bondSlaveOf = toBond(map.get("bond_slave_of")); + record.bondMasterOf = toSetOfBond(map.get("bond_master_of")); + record.VLANMasterOf = toVLAN(map.get("VLAN_master_of")); + record.VLANSlaveOf = toSetOfVLAN(map.get("VLAN_slave_of")); + record.management = toBoolean(map.get("management")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.disallowUnplug = toBoolean(map.get("disallow_unplug")); + record.tunnelAccessPIFOf = toSetOfTunnel(map.get("tunnel_access_PIF_of")); + record.tunnelTransportPIFOf = toSetOfTunnel(map.get("tunnel_transport_PIF_of")); + record.ipv6ConfigurationMode = toIpv6ConfigurationMode(map.get("ipv6_configuration_mode")); + record.IPv6 = toSetOfString(map.get("IPv6")); + record.ipv6Gateway = toString(map.get("ipv6_gateway")); + record.primaryAddressType = toPrimaryAddressType(map.get("primary_address_type")); return record; } @@ -12022,21 +12270,21 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; PIFMetrics.Record record = new PIFMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.ioReadKbs = toDouble(map.get("io_read_kbs")); - record.ioWriteKbs = toDouble(map.get("io_write_kbs")); - record.carrier = toBoolean(map.get("carrier")); - record.vendorId = toString(map.get("vendor_id")); - record.vendorName = toString(map.get("vendor_name")); - record.deviceId = toString(map.get("device_id")); - record.deviceName = toString(map.get("device_name")); - record.speed = toLong(map.get("speed")); - record.duplex = toBoolean(map.get("duplex")); - record.pciBusPath = toString(map.get("pci_bus_path")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.ioReadKbs = toDouble(map.get("io_read_kbs")); + record.ioWriteKbs = toDouble(map.get("io_write_kbs")); + record.carrier = toBoolean(map.get("carrier")); + record.vendorId = toString(map.get("vendor_id")); + record.vendorName = toString(map.get("vendor_name")); + record.deviceId = toString(map.get("device_id")); + record.deviceName = toString(map.get("device_name")); + record.speed = toLong(map.get("speed")); + record.duplex = toBoolean(map.get("duplex")); + record.pciBusPath = toString(map.get("pci_bus_path")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12044,20 +12292,20 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; SM.Record record = new SM.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.type = toString(map.get("type")); - record.vendor = toString(map.get("vendor")); - record.copyright = toString(map.get("copyright")); - record.version = toString(map.get("version")); - record.requiredApiVersion = toString(map.get("required_api_version")); - record.configuration = toMapOfStringString(map.get("configuration")); - record.capabilities = toSetOfString(map.get("capabilities")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.driverFilename = toString(map.get("driver_filename")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.type = toString(map.get("type")); + record.vendor = toString(map.get("vendor")); + record.copyright = toString(map.get("copyright")); + record.version = toString(map.get("version")); + record.requiredApiVersion = toString(map.get("required_api_version")); + record.configuration = toMapOfStringString(map.get("configuration")); + record.capabilities = toSetOfString(map.get("capabilities")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.driverFilename = toString(map.get("driver_filename")); return record; } @@ -12065,27 +12313,27 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; SR.Record record = new SR.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.allowedOperations = toSetOfStorageOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringStorageOperations(map.get("current_operations")); - record.VDIs = toSetOfVDI(map.get("VDIs")); - record.PBDs = toSetOfPBD(map.get("PBDs")); - record.virtualAllocation = toLong(map.get("virtual_allocation")); - record.physicalUtilisation = toLong(map.get("physical_utilisation")); - record.physicalSize = toLong(map.get("physical_size")); - record.type = toString(map.get("type")); - record.contentType = toString(map.get("content_type")); - record.shared = toBoolean(map.get("shared")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.tags = toSetOfString(map.get("tags")); - record.smConfig = toMapOfStringString(map.get("sm_config")); - record.blobs = toMapOfStringBlob(map.get("blobs")); - record.localCacheEnabled = toBoolean(map.get("local_cache_enabled")); - record.introducedBy = toDRTask(map.get("introduced_by")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.allowedOperations = toSetOfStorageOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringStorageOperations(map.get("current_operations")); + record.VDIs = toSetOfVDI(map.get("VDIs")); + record.PBDs = toSetOfPBD(map.get("PBDs")); + record.virtualAllocation = toLong(map.get("virtual_allocation")); + record.physicalUtilisation = toLong(map.get("physical_utilisation")); + record.physicalSize = toLong(map.get("physical_size")); + record.type = toString(map.get("type")); + record.contentType = toString(map.get("content_type")); + record.shared = toBoolean(map.get("shared")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.tags = toSetOfString(map.get("tags")); + record.smConfig = toMapOfStringString(map.get("sm_config")); + record.blobs = toMapOfStringBlob(map.get("blobs")); + record.localCacheEnabled = toBoolean(map.get("local_cache_enabled")); + record.introducedBy = toDRTask(map.get("introduced_by")); return record; } @@ -12093,30 +12341,30 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VBD.Record record = new VBD.Record(); - record.uuid = toString(map.get("uuid")); - record.allowedOperations = toSetOfVbdOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringVbdOperations(map.get("current_operations")); - record.VM = toVM(map.get("VM")); - record.VDI = toVDI(map.get("VDI")); - record.device = toString(map.get("device")); - record.userdevice = toString(map.get("userdevice")); - record.bootable = toBoolean(map.get("bootable")); - record.mode = toVbdMode(map.get("mode")); - record.type = toVbdType(map.get("type")); - record.unpluggable = toBoolean(map.get("unpluggable")); - record.storageLock = toBoolean(map.get("storage_lock")); - record.empty = toBoolean(map.get("empty")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.currentlyAttached = toBoolean(map.get("currently_attached")); - record.statusCode = toLong(map.get("status_code")); - record.statusDetail = toString(map.get("status_detail")); - record.runtimeProperties = toMapOfStringString(map.get("runtime_properties")); - record.qosAlgorithmType = toString(map.get("qos_algorithm_type")); - record.qosAlgorithmParams = toMapOfStringString(map.get("qos_algorithm_params")); - record.qosSupportedAlgorithms = toSetOfString(map.get("qos_supported_algorithms")); - record.metrics = toVBDMetrics(map.get("metrics")); + record.uuid = toString(map.get("uuid")); + record.allowedOperations = toSetOfVbdOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringVbdOperations(map.get("current_operations")); + record.VM = toVM(map.get("VM")); + record.VDI = toVDI(map.get("VDI")); + record.device = toString(map.get("device")); + record.userdevice = toString(map.get("userdevice")); + record.bootable = toBoolean(map.get("bootable")); + record.mode = toVbdMode(map.get("mode")); + record.type = toVbdType(map.get("type")); + record.unpluggable = toBoolean(map.get("unpluggable")); + record.storageLock = toBoolean(map.get("storage_lock")); + record.empty = toBoolean(map.get("empty")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.currentlyAttached = toBoolean(map.get("currently_attached")); + record.statusCode = toLong(map.get("status_code")); + record.statusDetail = toString(map.get("status_detail")); + record.runtimeProperties = toMapOfStringString(map.get("runtime_properties")); + record.qosAlgorithmType = toString(map.get("qos_algorithm_type")); + record.qosAlgorithmParams = toMapOfStringString(map.get("qos_algorithm_params")); + record.qosSupportedAlgorithms = toSetOfString(map.get("qos_supported_algorithms")); + record.metrics = toVBDMetrics(map.get("metrics")); return record; } @@ -12124,13 +12372,13 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VBDMetrics.Record record = new VBDMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.ioReadKbs = toDouble(map.get("io_read_kbs")); - record.ioWriteKbs = toDouble(map.get("io_write_kbs")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.ioReadKbs = toDouble(map.get("io_read_kbs")); + record.ioWriteKbs = toDouble(map.get("io_write_kbs")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12138,38 +12386,38 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VDI.Record record = new VDI.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.allowedOperations = toSetOfVdiOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringVdiOperations(map.get("current_operations")); - record.SR = toSR(map.get("SR")); - record.VBDs = toSetOfVBD(map.get("VBDs")); - record.crashDumps = toSetOfCrashdump(map.get("crash_dumps")); - record.virtualSize = toLong(map.get("virtual_size")); - record.physicalUtilisation = toLong(map.get("physical_utilisation")); - record.type = toVdiType(map.get("type")); - record.sharable = toBoolean(map.get("sharable")); - record.readOnly = toBoolean(map.get("read_only")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.storageLock = toBoolean(map.get("storage_lock")); - record.location = toString(map.get("location")); - record.managed = toBoolean(map.get("managed")); - record.missing = toBoolean(map.get("missing")); - record.parent = toVDI(map.get("parent")); - record.xenstoreData = toMapOfStringString(map.get("xenstore_data")); - record.smConfig = toMapOfStringString(map.get("sm_config")); - record.isASnapshot = toBoolean(map.get("is_a_snapshot")); - record.snapshotOf = toVDI(map.get("snapshot_of")); - record.snapshots = toSetOfVDI(map.get("snapshots")); - record.snapshotTime = toDate(map.get("snapshot_time")); - record.tags = toSetOfString(map.get("tags")); - record.allowCaching = toBoolean(map.get("allow_caching")); - record.onBoot = toOnBoot(map.get("on_boot")); - record.metadataOfPool = toPool(map.get("metadata_of_pool")); - record.metadataLatest = toBoolean(map.get("metadata_latest")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.allowedOperations = toSetOfVdiOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringVdiOperations(map.get("current_operations")); + record.SR = toSR(map.get("SR")); + record.VBDs = toSetOfVBD(map.get("VBDs")); + record.crashDumps = toSetOfCrashdump(map.get("crash_dumps")); + record.virtualSize = toLong(map.get("virtual_size")); + record.physicalUtilisation = toLong(map.get("physical_utilisation")); + record.type = toVdiType(map.get("type")); + record.sharable = toBoolean(map.get("sharable")); + record.readOnly = toBoolean(map.get("read_only")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.storageLock = toBoolean(map.get("storage_lock")); + record.location = toString(map.get("location")); + record.managed = toBoolean(map.get("managed")); + record.missing = toBoolean(map.get("missing")); + record.parent = toVDI(map.get("parent")); + record.xenstoreData = toMapOfStringString(map.get("xenstore_data")); + record.smConfig = toMapOfStringString(map.get("sm_config")); + record.isASnapshot = toBoolean(map.get("is_a_snapshot")); + record.snapshotOf = toVDI(map.get("snapshot_of")); + record.snapshots = toSetOfVDI(map.get("snapshots")); + record.snapshotTime = toDate(map.get("snapshot_time")); + record.tags = toSetOfString(map.get("tags")); + record.allowCaching = toBoolean(map.get("allow_caching")); + record.onBoot = toOnBoot(map.get("on_boot")); + record.metadataOfPool = toPool(map.get("metadata_of_pool")); + record.metadataLatest = toBoolean(map.get("metadata_latest")); return record; } @@ -12177,14 +12425,14 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VGPU.Record record = new VGPU.Record(); - record.uuid = toString(map.get("uuid")); - record.VM = toVM(map.get("VM")); - record.GPUGroup = toGPUGroup(map.get("GPU_group")); - record.device = toString(map.get("device")); - record.currentlyAttached = toBoolean(map.get("currently_attached")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.VM = toVM(map.get("VM")); + record.GPUGroup = toGPUGroup(map.get("GPU_group")); + record.device = toString(map.get("device")); + record.currentlyAttached = toBoolean(map.get("currently_attached")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12192,29 +12440,29 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VIF.Record record = new VIF.Record(); - record.uuid = toString(map.get("uuid")); - record.allowedOperations = toSetOfVifOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringVifOperations(map.get("current_operations")); - record.device = toString(map.get("device")); - record.network = toNetwork(map.get("network")); - record.VM = toVM(map.get("VM")); - record.MAC = toString(map.get("MAC")); - record.MTU = toLong(map.get("MTU")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.currentlyAttached = toBoolean(map.get("currently_attached")); - record.statusCode = toLong(map.get("status_code")); - record.statusDetail = toString(map.get("status_detail")); - record.runtimeProperties = toMapOfStringString(map.get("runtime_properties")); - record.qosAlgorithmType = toString(map.get("qos_algorithm_type")); - record.qosAlgorithmParams = toMapOfStringString(map.get("qos_algorithm_params")); - record.qosSupportedAlgorithms = toSetOfString(map.get("qos_supported_algorithms")); - record.metrics = toVIFMetrics(map.get("metrics")); - record.MACAutogenerated = toBoolean(map.get("MAC_autogenerated")); - record.lockingMode = toVifLockingMode(map.get("locking_mode")); - record.ipv4Allowed = toSetOfString(map.get("ipv4_allowed")); - record.ipv6Allowed = toSetOfString(map.get("ipv6_allowed")); + record.uuid = toString(map.get("uuid")); + record.allowedOperations = toSetOfVifOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringVifOperations(map.get("current_operations")); + record.device = toString(map.get("device")); + record.network = toNetwork(map.get("network")); + record.VM = toVM(map.get("VM")); + record.MAC = toString(map.get("MAC")); + record.MTU = toLong(map.get("MTU")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.currentlyAttached = toBoolean(map.get("currently_attached")); + record.statusCode = toLong(map.get("status_code")); + record.statusDetail = toString(map.get("status_detail")); + record.runtimeProperties = toMapOfStringString(map.get("runtime_properties")); + record.qosAlgorithmType = toString(map.get("qos_algorithm_type")); + record.qosAlgorithmParams = toMapOfStringString(map.get("qos_algorithm_params")); + record.qosSupportedAlgorithms = toSetOfString(map.get("qos_supported_algorithms")); + record.metrics = toVIFMetrics(map.get("metrics")); + record.MACAutogenerated = toBoolean(map.get("MAC_autogenerated")); + record.lockingMode = toVifLockingMode(map.get("locking_mode")); + record.ipv4Allowed = toSetOfString(map.get("ipv4_allowed")); + record.ipv6Allowed = toSetOfString(map.get("ipv6_allowed")); return record; } @@ -12222,13 +12470,13 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VIFMetrics.Record record = new VIFMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.ioReadKbs = toDouble(map.get("io_read_kbs")); - record.ioWriteKbs = toDouble(map.get("io_write_kbs")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.ioReadKbs = toDouble(map.get("io_read_kbs")); + record.ioWriteKbs = toDouble(map.get("io_write_kbs")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12236,13 +12484,13 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VLAN.Record record = new VLAN.Record(); - record.uuid = toString(map.get("uuid")); - record.taggedPIF = toPIF(map.get("tagged_PIF")); - record.untaggedPIF = toPIF(map.get("untagged_PIF")); - record.tag = toLong(map.get("tag")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.taggedPIF = toPIF(map.get("tagged_PIF")); + record.untaggedPIF = toPIF(map.get("untagged_PIF")); + record.tag = toLong(map.get("tag")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12250,82 +12498,82 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VM.Record record = new VM.Record(); - record.uuid = toString(map.get("uuid")); - record.allowedOperations = toSetOfVmOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringVmOperations(map.get("current_operations")); - record.powerState = toVmPowerState(map.get("power_state")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.userVersion = toLong(map.get("user_version")); - record.isATemplate = toBoolean(map.get("is_a_template")); - record.suspendVDI = toVDI(map.get("suspend_VDI")); - record.residentOn = toHost(map.get("resident_on")); - record.affinity = toHost(map.get("affinity")); - record.memoryOverhead = toLong(map.get("memory_overhead")); - record.memoryTarget = toLong(map.get("memory_target")); - record.memoryStaticMax = toLong(map.get("memory_static_max")); - record.memoryDynamicMax = toLong(map.get("memory_dynamic_max")); - record.memoryDynamicMin = toLong(map.get("memory_dynamic_min")); - record.memoryStaticMin = toLong(map.get("memory_static_min")); - record.VCPUsParams = toMapOfStringString(map.get("VCPUs_params")); - record.VCPUsMax = toLong(map.get("VCPUs_max")); - record.VCPUsAtStartup = toLong(map.get("VCPUs_at_startup")); - record.actionsAfterShutdown = toOnNormalExit(map.get("actions_after_shutdown")); - record.actionsAfterReboot = toOnNormalExit(map.get("actions_after_reboot")); - record.actionsAfterCrash = toOnCrashBehaviour(map.get("actions_after_crash")); - record.consoles = toSetOfConsole(map.get("consoles")); - record.VIFs = toSetOfVIF(map.get("VIFs")); - record.VBDs = toSetOfVBD(map.get("VBDs")); - record.crashDumps = toSetOfCrashdump(map.get("crash_dumps")); - record.VTPMs = toSetOfVTPM(map.get("VTPMs")); - record.PVBootloader = toString(map.get("PV_bootloader")); - record.PVKernel = toString(map.get("PV_kernel")); - record.PVRamdisk = toString(map.get("PV_ramdisk")); - record.PVArgs = toString(map.get("PV_args")); - record.PVBootloaderArgs = toString(map.get("PV_bootloader_args")); - record.PVLegacyArgs = toString(map.get("PV_legacy_args")); - record.HVMBootPolicy = toString(map.get("HVM_boot_policy")); - record.HVMBootParams = toMapOfStringString(map.get("HVM_boot_params")); - record.HVMShadowMultiplier = toDouble(map.get("HVM_shadow_multiplier")); - record.platform = toMapOfStringString(map.get("platform")); - record.PCIBus = toString(map.get("PCI_bus")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.domid = toLong(map.get("domid")); - record.domarch = toString(map.get("domarch")); - record.lastBootCPUFlags = toMapOfStringString(map.get("last_boot_CPU_flags")); - record.isControlDomain = toBoolean(map.get("is_control_domain")); - record.metrics = toVMMetrics(map.get("metrics")); - record.guestMetrics = toVMGuestMetrics(map.get("guest_metrics")); - record.lastBootedRecord = toString(map.get("last_booted_record")); - record.recommendations = toString(map.get("recommendations")); - record.xenstoreData = toMapOfStringString(map.get("xenstore_data")); - record.haAlwaysRun = toBoolean(map.get("ha_always_run")); - record.haRestartPriority = toString(map.get("ha_restart_priority")); - record.isASnapshot = toBoolean(map.get("is_a_snapshot")); - record.snapshotOf = toVM(map.get("snapshot_of")); - record.snapshots = toSetOfVM(map.get("snapshots")); - record.snapshotTime = toDate(map.get("snapshot_time")); - record.transportableSnapshotId = toString(map.get("transportable_snapshot_id")); - record.blobs = toMapOfStringBlob(map.get("blobs")); - record.tags = toSetOfString(map.get("tags")); - record.blockedOperations = toMapOfVmOperationsString(map.get("blocked_operations")); - record.snapshotInfo = toMapOfStringString(map.get("snapshot_info")); - record.snapshotMetadata = toString(map.get("snapshot_metadata")); - record.parent = toVM(map.get("parent")); - record.children = toSetOfVM(map.get("children")); - record.biosStrings = toMapOfStringString(map.get("bios_strings")); - record.protectionPolicy = toVMPP(map.get("protection_policy")); - record.isSnapshotFromVmpp = toBoolean(map.get("is_snapshot_from_vmpp")); - record.appliance = toVMAppliance(map.get("appliance")); - record.startDelay = toLong(map.get("start_delay")); - record.shutdownDelay = toLong(map.get("shutdown_delay")); - record.order = toLong(map.get("order")); - record.VGPUs = toSetOfVGPU(map.get("VGPUs")); - record.attachedPCIs = toSetOfPCI(map.get("attached_PCIs")); - record.suspendSR = toSR(map.get("suspend_SR")); - record.version = toLong(map.get("version")); + record.uuid = toString(map.get("uuid")); + record.allowedOperations = toSetOfVmOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringVmOperations(map.get("current_operations")); + record.powerState = toVmPowerState(map.get("power_state")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.userVersion = toLong(map.get("user_version")); + record.isATemplate = toBoolean(map.get("is_a_template")); + record.suspendVDI = toVDI(map.get("suspend_VDI")); + record.residentOn = toHost(map.get("resident_on")); + record.affinity = toHost(map.get("affinity")); + record.memoryOverhead = toLong(map.get("memory_overhead")); + record.memoryTarget = toLong(map.get("memory_target")); + record.memoryStaticMax = toLong(map.get("memory_static_max")); + record.memoryDynamicMax = toLong(map.get("memory_dynamic_max")); + record.memoryDynamicMin = toLong(map.get("memory_dynamic_min")); + record.memoryStaticMin = toLong(map.get("memory_static_min")); + record.VCPUsParams = toMapOfStringString(map.get("VCPUs_params")); + record.VCPUsMax = toLong(map.get("VCPUs_max")); + record.VCPUsAtStartup = toLong(map.get("VCPUs_at_startup")); + record.actionsAfterShutdown = toOnNormalExit(map.get("actions_after_shutdown")); + record.actionsAfterReboot = toOnNormalExit(map.get("actions_after_reboot")); + record.actionsAfterCrash = toOnCrashBehaviour(map.get("actions_after_crash")); + record.consoles = toSetOfConsole(map.get("consoles")); + record.VIFs = toSetOfVIF(map.get("VIFs")); + record.VBDs = toSetOfVBD(map.get("VBDs")); + record.crashDumps = toSetOfCrashdump(map.get("crash_dumps")); + record.VTPMs = toSetOfVTPM(map.get("VTPMs")); + record.PVBootloader = toString(map.get("PV_bootloader")); + record.PVKernel = toString(map.get("PV_kernel")); + record.PVRamdisk = toString(map.get("PV_ramdisk")); + record.PVArgs = toString(map.get("PV_args")); + record.PVBootloaderArgs = toString(map.get("PV_bootloader_args")); + record.PVLegacyArgs = toString(map.get("PV_legacy_args")); + record.HVMBootPolicy = toString(map.get("HVM_boot_policy")); + record.HVMBootParams = toMapOfStringString(map.get("HVM_boot_params")); + record.HVMShadowMultiplier = toDouble(map.get("HVM_shadow_multiplier")); + record.platform = toMapOfStringString(map.get("platform")); + record.PCIBus = toString(map.get("PCI_bus")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.domid = toLong(map.get("domid")); + record.domarch = toString(map.get("domarch")); + record.lastBootCPUFlags = toMapOfStringString(map.get("last_boot_CPU_flags")); + record.isControlDomain = toBoolean(map.get("is_control_domain")); + record.metrics = toVMMetrics(map.get("metrics")); + record.guestMetrics = toVMGuestMetrics(map.get("guest_metrics")); + record.lastBootedRecord = toString(map.get("last_booted_record")); + record.recommendations = toString(map.get("recommendations")); + record.xenstoreData = toMapOfStringString(map.get("xenstore_data")); + record.haAlwaysRun = toBoolean(map.get("ha_always_run")); + record.haRestartPriority = toString(map.get("ha_restart_priority")); + record.isASnapshot = toBoolean(map.get("is_a_snapshot")); + record.snapshotOf = toVM(map.get("snapshot_of")); + record.snapshots = toSetOfVM(map.get("snapshots")); + record.snapshotTime = toDate(map.get("snapshot_time")); + record.transportableSnapshotId = toString(map.get("transportable_snapshot_id")); + record.blobs = toMapOfStringBlob(map.get("blobs")); + record.tags = toSetOfString(map.get("tags")); + record.blockedOperations = toMapOfVmOperationsString(map.get("blocked_operations")); + record.snapshotInfo = toMapOfStringString(map.get("snapshot_info")); + record.snapshotMetadata = toString(map.get("snapshot_metadata")); + record.parent = toVM(map.get("parent")); + record.children = toSetOfVM(map.get("children")); + record.biosStrings = toMapOfStringString(map.get("bios_strings")); + record.protectionPolicy = toVMPP(map.get("protection_policy")); + record.isSnapshotFromVmpp = toBoolean(map.get("is_snapshot_from_vmpp")); + record.appliance = toVMAppliance(map.get("appliance")); + record.startDelay = toLong(map.get("start_delay")); + record.shutdownDelay = toLong(map.get("shutdown_delay")); + record.order = toLong(map.get("order")); + record.VGPUs = toSetOfVGPU(map.get("VGPUs")); + record.attachedPCIs = toSetOfPCI(map.get("attached_PCIs")); + record.suspendSR = toSR(map.get("suspend_SR")); + record.version = toLong(map.get("version")); return record; } @@ -12333,28 +12581,28 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VMPP.Record record = new VMPP.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.isPolicyEnabled = toBoolean(map.get("is_policy_enabled")); - record.backupType = toVmppBackupType(map.get("backup_type")); - record.backupRetentionValue = toLong(map.get("backup_retention_value")); - record.backupFrequency = toVmppBackupFrequency(map.get("backup_frequency")); - record.backupSchedule = toMapOfStringString(map.get("backup_schedule")); - record.isBackupRunning = toBoolean(map.get("is_backup_running")); - record.backupLastRunTime = toDate(map.get("backup_last_run_time")); - record.archiveTargetType = toVmppArchiveTargetType(map.get("archive_target_type")); - record.archiveTargetConfig = toMapOfStringString(map.get("archive_target_config")); - record.archiveFrequency = toVmppArchiveFrequency(map.get("archive_frequency")); - record.archiveSchedule = toMapOfStringString(map.get("archive_schedule")); - record.isArchiveRunning = toBoolean(map.get("is_archive_running")); - record.archiveLastRunTime = toDate(map.get("archive_last_run_time")); - record.VMs = toSetOfVM(map.get("VMs")); - record.isAlarmEnabled = toBoolean(map.get("is_alarm_enabled")); - record.alarmConfig = toMapOfStringString(map.get("alarm_config")); - record.recentAlerts = toSetOfString(map.get("recent_alerts")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.isPolicyEnabled = toBoolean(map.get("is_policy_enabled")); + record.backupType = toVmppBackupType(map.get("backup_type")); + record.backupRetentionValue = toLong(map.get("backup_retention_value")); + record.backupFrequency = toVmppBackupFrequency(map.get("backup_frequency")); + record.backupSchedule = toMapOfStringString(map.get("backup_schedule")); + record.isBackupRunning = toBoolean(map.get("is_backup_running")); + record.backupLastRunTime = toDate(map.get("backup_last_run_time")); + record.archiveTargetType = toVmppArchiveTargetType(map.get("archive_target_type")); + record.archiveTargetConfig = toMapOfStringString(map.get("archive_target_config")); + record.archiveFrequency = toVmppArchiveFrequency(map.get("archive_frequency")); + record.archiveSchedule = toMapOfStringString(map.get("archive_schedule")); + record.isArchiveRunning = toBoolean(map.get("is_archive_running")); + record.archiveLastRunTime = toDate(map.get("archive_last_run_time")); + record.VMs = toSetOfVM(map.get("VMs")); + record.isAlarmEnabled = toBoolean(map.get("is_alarm_enabled")); + record.alarmConfig = toMapOfStringString(map.get("alarm_config")); + record.recentAlerts = toSetOfString(map.get("recent_alerts")); return record; } @@ -12362,14 +12610,14 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VMAppliance.Record record = new VMAppliance.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.allowedOperations = toSetOfVmApplianceOperation(map.get("allowed_operations")); - record.currentOperations = toMapOfStringVmApplianceOperation(map.get("current_operations")); - record.VMs = toSetOfVM(map.get("VMs")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.allowedOperations = toSetOfVmApplianceOperation(map.get("allowed_operations")); + record.currentOperations = toMapOfStringVmApplianceOperation(map.get("current_operations")); + record.VMs = toSetOfVM(map.get("VMs")); return record; } @@ -12377,19 +12625,19 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VMGuestMetrics.Record record = new VMGuestMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.osVersion = toMapOfStringString(map.get("os_version")); - record.PVDriversVersion = toMapOfStringString(map.get("PV_drivers_version")); - record.PVDriversUpToDate = toBoolean(map.get("PV_drivers_up_to_date")); - record.memory = toMapOfStringString(map.get("memory")); - record.disks = toMapOfStringString(map.get("disks")); - record.networks = toMapOfStringString(map.get("networks")); - record.other = toMapOfStringString(map.get("other")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.live = toBoolean(map.get("live")); + record.uuid = toString(map.get("uuid")); + record.osVersion = toMapOfStringString(map.get("os_version")); + record.PVDriversVersion = toMapOfStringString(map.get("PV_drivers_version")); + record.PVDriversUpToDate = toBoolean(map.get("PV_drivers_up_to_date")); + record.memory = toMapOfStringString(map.get("memory")); + record.disks = toMapOfStringString(map.get("disks")); + record.networks = toMapOfStringString(map.get("networks")); + record.other = toMapOfStringString(map.get("other")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.live = toBoolean(map.get("live")); return record; } @@ -12397,20 +12645,20 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VMMetrics.Record record = new VMMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.memoryActual = toLong(map.get("memory_actual")); - record.VCPUsNumber = toLong(map.get("VCPUs_number")); - record.VCPUsUtilisation = toMapOfLongDouble(map.get("VCPUs_utilisation")); - record.VCPUsCPU = toMapOfLongLong(map.get("VCPUs_CPU")); - record.VCPUsParams = toMapOfStringString(map.get("VCPUs_params")); - record.VCPUsFlags = toMapOfLongSetOfString(map.get("VCPUs_flags")); - record.state = toSetOfString(map.get("state")); - record.startTime = toDate(map.get("start_time")); - record.installTime = toDate(map.get("install_time")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.memoryActual = toLong(map.get("memory_actual")); + record.VCPUsNumber = toLong(map.get("VCPUs_number")); + record.VCPUsUtilisation = toMapOfLongDouble(map.get("VCPUs_utilisation")); + record.VCPUsCPU = toMapOfLongLong(map.get("VCPUs_CPU")); + record.VCPUsParams = toMapOfStringString(map.get("VCPUs_params")); + record.VCPUsFlags = toMapOfLongSetOfString(map.get("VCPUs_flags")); + record.state = toSetOfString(map.get("state")); + record.startTime = toDate(map.get("start_time")); + record.installTime = toDate(map.get("install_time")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12418,11 +12666,11 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; VTPM.Record record = new VTPM.Record(); - record.uuid = toString(map.get("uuid")); - record.VM = toVM(map.get("VM")); - record.backend = toVM(map.get("backend")); + record.uuid = toString(map.get("uuid")); + record.VM = toVM(map.get("VM")); + record.backend = toVM(map.get("backend")); return record; } @@ -12430,15 +12678,15 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Blob.Record record = new Blob.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.size = toLong(map.get("size")); - record._public = toBoolean(map.get("public")); - record.lastUpdated = toDate(map.get("last_updated")); - record.mimeType = toString(map.get("mime_type")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.size = toLong(map.get("size")); + record._public = toBoolean(map.get("public")); + record.lastUpdated = toDate(map.get("last_updated")); + record.mimeType = toString(map.get("mime_type")); return record; } @@ -12446,13 +12694,13 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Console.Record record = new Console.Record(); - record.uuid = toString(map.get("uuid")); - record.protocol = toConsoleProtocol(map.get("protocol")); - record.location = toString(map.get("location")); - record.VM = toVM(map.get("VM")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.protocol = toConsoleProtocol(map.get("protocol")); + record.location = toString(map.get("location")); + record.VM = toVM(map.get("VM")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12460,12 +12708,12 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Crashdump.Record record = new Crashdump.Record(); - record.uuid = toString(map.get("uuid")); - record.VM = toVM(map.get("VM")); - record.VDI = toVDI(map.get("VDI")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.VM = toVM(map.get("VM")); + record.VDI = toVDI(map.get("VDI")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12473,16 +12721,16 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; DataSource.Record record = new DataSource.Record(); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.enabled = toBoolean(map.get("enabled")); - record.standard = toBoolean(map.get("standard")); - record.units = toString(map.get("units")); - record.min = toDouble(map.get("min")); - record.max = toDouble(map.get("max")); - record.value = toDouble(map.get("value")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.enabled = toBoolean(map.get("enabled")); + record.standard = toBoolean(map.get("standard")); + record.units = toString(map.get("units")); + record.min = toDouble(map.get("min")); + record.max = toDouble(map.get("max")); + record.value = toDouble(map.get("value")); return record; } @@ -12490,65 +12738,153 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Event.Record record = new Event.Record(); - record.id = toLong(map.get("id")); - record.timestamp = toDate(map.get("timestamp")); - record.clazz = toString(map.get("class")); - record.operation = toEventOperation(map.get("operation")); - record.ref = toString(map.get("ref")); - record.objUuid = toString(map.get("obj_uuid")); + record.id = toLong(map.get("id")); + record.timestamp = toDate(map.get("timestamp")); + record.clazz = toString(map.get("class")); + record.operation = toEventOperation(map.get("operation")); + record.ref = toString(map.get("ref")); + record.objUuid = toString(map.get("obj_uuid")); - - Object a,b; - a=map.get("snapshot"); - switch(toXenAPIObjects(record.clazz)) + Object a, b; + a = map.get("snapshot"); + switch (toXenAPIObjects(record.clazz)) { - case SESSION: b = toSessionRecord(a); break; - case SUBJECT: b = toSubjectRecord(a); break; - case ROLE: b = toRoleRecord(a); break; - case TASK: b = toTaskRecord(a); break; - case EVENT: b = toEventRecord(a); break; - case POOL: b = toPoolRecord(a); break; - case POOL_PATCH: b = toPoolPatchRecord(a); break; - case VM: b = toVMRecord(a); break; - case VM_METRICS: b = toVMMetricsRecord(a); break; - case VM_GUEST_METRICS: b = toVMGuestMetricsRecord(a); break; - case VMPP: b = toVMPPRecord(a); break; - case VM_APPLIANCE: b = toVMApplianceRecord(a); break; - case DR_TASK: b = toDRTaskRecord(a); break; - case HOST: b = toHostRecord(a); break; - case HOST_CRASHDUMP: b = toHostCrashdumpRecord(a); break; - case HOST_PATCH: b = toHostPatchRecord(a); break; - case HOST_METRICS: b = toHostMetricsRecord(a); break; - case HOST_CPU: b = toHostCpuRecord(a); break; - case NETWORK: b = toNetworkRecord(a); break; - case VIF: b = toVIFRecord(a); break; - case VIF_METRICS: b = toVIFMetricsRecord(a); break; - case PIF: b = toPIFRecord(a); break; - case PIF_METRICS: b = toPIFMetricsRecord(a); break; - case BOND: b = toBondRecord(a); break; - case VLAN: b = toVLANRecord(a); break; - case SM: b = toSMRecord(a); break; - case SR: b = toSRRecord(a); break; - case VDI: b = toVDIRecord(a); break; - case VBD: b = toVBDRecord(a); break; - case VBD_METRICS: b = toVBDMetricsRecord(a); break; - case PBD: b = toPBDRecord(a); break; - case CRASHDUMP: b = toCrashdumpRecord(a); break; - case VTPM: b = toVTPMRecord(a); break; - case CONSOLE: b = toConsoleRecord(a); break; - case USER: b = toUserRecord(a); break; - case DATA_SOURCE: b = toDataSourceRecord(a); break; - case BLOB: b = toBlobRecord(a); break; - case MESSAGE: b = toMessageRecord(a); break; - case SECRET: b = toSecretRecord(a); break; - case TUNNEL: b = toTunnelRecord(a); break; - case PCI: b = toPCIRecord(a); break; - case PGPU: b = toPGPURecord(a); break; - case GPU_GROUP: b = toGPUGroupRecord(a); break; - case VGPU: b = toVGPURecord(a); break; - default: throw new RuntimeException("Internal error in auto-generated code whilst unmarshalling event snapshot"); + case SESSION: + b = toSessionRecord(a); + break; + case SUBJECT: + b = toSubjectRecord(a); + break; + case ROLE: + b = toRoleRecord(a); + break; + case TASK: + b = toTaskRecord(a); + break; + case EVENT: + b = toEventRecord(a); + break; + case POOL: + b = toPoolRecord(a); + break; + case POOL_PATCH: + b = toPoolPatchRecord(a); + break; + case VM: + b = toVMRecord(a); + break; + case VM_METRICS: + b = toVMMetricsRecord(a); + break; + case VM_GUEST_METRICS: + b = toVMGuestMetricsRecord(a); + break; + case VMPP: + b = toVMPPRecord(a); + break; + case VM_APPLIANCE: + b = toVMApplianceRecord(a); + break; + case DR_TASK: + b = toDRTaskRecord(a); + break; + case HOST: + b = toHostRecord(a); + break; + case HOST_CRASHDUMP: + b = toHostCrashdumpRecord(a); + break; + case HOST_PATCH: + b = toHostPatchRecord(a); + break; + case HOST_METRICS: + b = toHostMetricsRecord(a); + break; + case HOST_CPU: + b = toHostCpuRecord(a); + break; + case NETWORK: + b = toNetworkRecord(a); + break; + case VIF: + b = toVIFRecord(a); + break; + case VIF_METRICS: + b = toVIFMetricsRecord(a); + break; + case PIF: + b = toPIFRecord(a); + break; + case PIF_METRICS: + b = toPIFMetricsRecord(a); + break; + case BOND: + b = toBondRecord(a); + break; + case VLAN: + b = toVLANRecord(a); + break; + case SM: + b = toSMRecord(a); + break; + case SR: + b = toSRRecord(a); + break; + case VDI: + b = toVDIRecord(a); + break; + case VBD: + b = toVBDRecord(a); + break; + case VBD_METRICS: + b = toVBDMetricsRecord(a); + break; + case PBD: + b = toPBDRecord(a); + break; + case CRASHDUMP: + b = toCrashdumpRecord(a); + break; + case VTPM: + b = toVTPMRecord(a); + break; + case CONSOLE: + b = toConsoleRecord(a); + break; + case USER: + b = toUserRecord(a); + break; + case DATA_SOURCE: + b = toDataSourceRecord(a); + break; + case BLOB: + b = toBlobRecord(a); + break; + case MESSAGE: + b = toMessageRecord(a); + break; + case SECRET: + b = toSecretRecord(a); + break; + case TUNNEL: + b = toTunnelRecord(a); + break; + case PCI: + b = toPCIRecord(a); + break; + case PGPU: + b = toPGPURecord(a); + break; + case GPU_GROUP: + b = toGPUGroupRecord(a); + break; + case VGPU: + b = toVGPURecord(a); + break; + default: + throw new RuntimeException("Internal error in auto-generated code whilst unmarshalling event snapshot"); } record.snapshot = b; return record; @@ -12558,55 +12894,55 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Host.Record record = new Host.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.memoryOverhead = toLong(map.get("memory_overhead")); - record.allowedOperations = toSetOfHostAllowedOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringHostAllowedOperations(map.get("current_operations")); - record.APIVersionMajor = toLong(map.get("API_version_major")); - record.APIVersionMinor = toLong(map.get("API_version_minor")); - record.APIVersionVendor = toString(map.get("API_version_vendor")); - record.APIVersionVendorImplementation = toMapOfStringString(map.get("API_version_vendor_implementation")); - record.enabled = toBoolean(map.get("enabled")); - record.softwareVersion = toMapOfStringString(map.get("software_version")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.capabilities = toSetOfString(map.get("capabilities")); - record.cpuConfiguration = toMapOfStringString(map.get("cpu_configuration")); - record.schedPolicy = toString(map.get("sched_policy")); - record.supportedBootloaders = toSetOfString(map.get("supported_bootloaders")); - record.residentVMs = toSetOfVM(map.get("resident_VMs")); - record.logging = toMapOfStringString(map.get("logging")); - record.PIFs = toSetOfPIF(map.get("PIFs")); - record.suspendImageSr = toSR(map.get("suspend_image_sr")); - record.crashDumpSr = toSR(map.get("crash_dump_sr")); - record.crashdumps = toSetOfHostCrashdump(map.get("crashdumps")); - record.patches = toSetOfHostPatch(map.get("patches")); - record.PBDs = toSetOfPBD(map.get("PBDs")); - record.hostCPUs = toSetOfHostCpu(map.get("host_CPUs")); - record.cpuInfo = toMapOfStringString(map.get("cpu_info")); - record.hostname = toString(map.get("hostname")); - record.address = toString(map.get("address")); - record.metrics = toHostMetrics(map.get("metrics")); - record.licenseParams = toMapOfStringString(map.get("license_params")); - record.haStatefiles = toSetOfString(map.get("ha_statefiles")); - record.haNetworkPeers = toSetOfString(map.get("ha_network_peers")); - record.blobs = toMapOfStringBlob(map.get("blobs")); - record.tags = toSetOfString(map.get("tags")); - record.externalAuthType = toString(map.get("external_auth_type")); - record.externalAuthServiceName = toString(map.get("external_auth_service_name")); - record.externalAuthConfiguration = toMapOfStringString(map.get("external_auth_configuration")); - record.edition = toString(map.get("edition")); - record.licenseServer = toMapOfStringString(map.get("license_server")); - record.biosStrings = toMapOfStringString(map.get("bios_strings")); - record.powerOnMode = toString(map.get("power_on_mode")); - record.powerOnConfig = toMapOfStringString(map.get("power_on_config")); - record.localCacheSr = toSR(map.get("local_cache_sr")); - record.chipsetInfo = toMapOfStringString(map.get("chipset_info")); - record.PCIs = toSetOfPCI(map.get("PCIs")); - record.PGPUs = toSetOfPGPU(map.get("PGPUs")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.memoryOverhead = toLong(map.get("memory_overhead")); + record.allowedOperations = toSetOfHostAllowedOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringHostAllowedOperations(map.get("current_operations")); + record.APIVersionMajor = toLong(map.get("API_version_major")); + record.APIVersionMinor = toLong(map.get("API_version_minor")); + record.APIVersionVendor = toString(map.get("API_version_vendor")); + record.APIVersionVendorImplementation = toMapOfStringString(map.get("API_version_vendor_implementation")); + record.enabled = toBoolean(map.get("enabled")); + record.softwareVersion = toMapOfStringString(map.get("software_version")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.capabilities = toSetOfString(map.get("capabilities")); + record.cpuConfiguration = toMapOfStringString(map.get("cpu_configuration")); + record.schedPolicy = toString(map.get("sched_policy")); + record.supportedBootloaders = toSetOfString(map.get("supported_bootloaders")); + record.residentVMs = toSetOfVM(map.get("resident_VMs")); + record.logging = toMapOfStringString(map.get("logging")); + record.PIFs = toSetOfPIF(map.get("PIFs")); + record.suspendImageSr = toSR(map.get("suspend_image_sr")); + record.crashDumpSr = toSR(map.get("crash_dump_sr")); + record.crashdumps = toSetOfHostCrashdump(map.get("crashdumps")); + record.patches = toSetOfHostPatch(map.get("patches")); + record.PBDs = toSetOfPBD(map.get("PBDs")); + record.hostCPUs = toSetOfHostCpu(map.get("host_CPUs")); + record.cpuInfo = toMapOfStringString(map.get("cpu_info")); + record.hostname = toString(map.get("hostname")); + record.address = toString(map.get("address")); + record.metrics = toHostMetrics(map.get("metrics")); + record.licenseParams = toMapOfStringString(map.get("license_params")); + record.haStatefiles = toSetOfString(map.get("ha_statefiles")); + record.haNetworkPeers = toSetOfString(map.get("ha_network_peers")); + record.blobs = toMapOfStringBlob(map.get("blobs")); + record.tags = toSetOfString(map.get("tags")); + record.externalAuthType = toString(map.get("external_auth_type")); + record.externalAuthServiceName = toString(map.get("external_auth_service_name")); + record.externalAuthConfiguration = toMapOfStringString(map.get("external_auth_configuration")); + record.edition = toString(map.get("edition")); + record.licenseServer = toMapOfStringString(map.get("license_server")); + record.biosStrings = toMapOfStringString(map.get("bios_strings")); + record.powerOnMode = toString(map.get("power_on_mode")); + record.powerOnConfig = toMapOfStringString(map.get("power_on_config")); + record.localCacheSr = toSR(map.get("local_cache_sr")); + record.chipsetInfo = toMapOfStringString(map.get("chipset_info")); + record.PCIs = toSetOfPCI(map.get("PCIs")); + record.PGPUs = toSetOfPGPU(map.get("PGPUs")); return record; } @@ -12614,21 +12950,21 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; HostCpu.Record record = new HostCpu.Record(); - record.uuid = toString(map.get("uuid")); - record.host = toHost(map.get("host")); - record.number = toLong(map.get("number")); - record.vendor = toString(map.get("vendor")); - record.speed = toLong(map.get("speed")); - record.modelname = toString(map.get("modelname")); - record.family = toLong(map.get("family")); - record.model = toLong(map.get("model")); - record.stepping = toString(map.get("stepping")); - record.flags = toString(map.get("flags")); - record.features = toString(map.get("features")); - record.utilisation = toDouble(map.get("utilisation")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.host = toHost(map.get("host")); + record.number = toLong(map.get("number")); + record.vendor = toString(map.get("vendor")); + record.speed = toLong(map.get("speed")); + record.modelname = toString(map.get("modelname")); + record.family = toLong(map.get("family")); + record.model = toLong(map.get("model")); + record.stepping = toString(map.get("stepping")); + record.flags = toString(map.get("flags")); + record.features = toString(map.get("features")); + record.utilisation = toDouble(map.get("utilisation")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12636,13 +12972,13 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; HostCrashdump.Record record = new HostCrashdump.Record(); - record.uuid = toString(map.get("uuid")); - record.host = toHost(map.get("host")); - record.timestamp = toDate(map.get("timestamp")); - record.size = toLong(map.get("size")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.host = toHost(map.get("host")); + record.timestamp = toDate(map.get("timestamp")); + record.size = toLong(map.get("size")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12650,14 +12986,14 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; HostMetrics.Record record = new HostMetrics.Record(); - record.uuid = toString(map.get("uuid")); - record.memoryTotal = toLong(map.get("memory_total")); - record.memoryFree = toLong(map.get("memory_free")); - record.live = toBoolean(map.get("live")); - record.lastUpdated = toDate(map.get("last_updated")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.memoryTotal = toLong(map.get("memory_total")); + record.memoryFree = toLong(map.get("memory_free")); + record.live = toBoolean(map.get("live")); + record.lastUpdated = toDate(map.get("last_updated")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12665,18 +13001,18 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; HostPatch.Record record = new HostPatch.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.version = toString(map.get("version")); - record.host = toHost(map.get("host")); - record.applied = toBoolean(map.get("applied")); - record.timestampApplied = toDate(map.get("timestamp_applied")); - record.size = toLong(map.get("size")); - record.poolPatch = toPoolPatch(map.get("pool_patch")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.version = toString(map.get("version")); + record.host = toHost(map.get("host")); + record.applied = toBoolean(map.get("applied")); + record.timestampApplied = toDate(map.get("timestamp_applied")); + record.size = toLong(map.get("size")); + record.poolPatch = toPoolPatch(map.get("pool_patch")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12684,15 +13020,15 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Message.Record record = new Message.Record(); - record.uuid = toString(map.get("uuid")); - record.name = toString(map.get("name")); - record.priority = toLong(map.get("priority")); - record.cls = toCls(map.get("cls")); - record.objUuid = toString(map.get("obj_uuid")); - record.timestamp = toDate(map.get("timestamp")); - record.body = toString(map.get("body")); + record.uuid = toString(map.get("uuid")); + record.name = toString(map.get("name")); + record.priority = toLong(map.get("priority")); + record.cls = toCls(map.get("cls")); + record.objUuid = toString(map.get("obj_uuid")); + record.timestamp = toDate(map.get("timestamp")); + record.body = toString(map.get("body")); return record; } @@ -12700,21 +13036,21 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Network.Record record = new Network.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.allowedOperations = toSetOfNetworkOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringNetworkOperations(map.get("current_operations")); - record.VIFs = toSetOfVIF(map.get("VIFs")); - record.PIFs = toSetOfPIF(map.get("PIFs")); - record.MTU = toLong(map.get("MTU")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.bridge = toString(map.get("bridge")); - record.blobs = toMapOfStringBlob(map.get("blobs")); - record.tags = toSetOfString(map.get("tags")); - record.defaultLockingMode = toNetworkDefaultLockingMode(map.get("default_locking_mode")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.allowedOperations = toSetOfNetworkOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringNetworkOperations(map.get("current_operations")); + record.VIFs = toSetOfVIF(map.get("VIFs")); + record.PIFs = toSetOfPIF(map.get("PIFs")); + record.MTU = toLong(map.get("MTU")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.bridge = toString(map.get("bridge")); + record.blobs = toMapOfStringBlob(map.get("blobs")); + record.tags = toSetOfString(map.get("tags")); + record.defaultLockingMode = toNetworkDefaultLockingMode(map.get("default_locking_mode")); return record; } @@ -12722,35 +13058,35 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Pool.Record record = new Pool.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.master = toHost(map.get("master")); - record.defaultSR = toSR(map.get("default_SR")); - record.suspendImageSR = toSR(map.get("suspend_image_SR")); - record.crashDumpSR = toSR(map.get("crash_dump_SR")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.haEnabled = toBoolean(map.get("ha_enabled")); - record.haConfiguration = toMapOfStringString(map.get("ha_configuration")); - record.haStatefiles = toSetOfString(map.get("ha_statefiles")); - record.haHostFailuresToTolerate = toLong(map.get("ha_host_failures_to_tolerate")); - record.haPlanExistsFor = toLong(map.get("ha_plan_exists_for")); - record.haAllowOvercommit = toBoolean(map.get("ha_allow_overcommit")); - record.haOvercommitted = toBoolean(map.get("ha_overcommitted")); - record.blobs = toMapOfStringBlob(map.get("blobs")); - record.tags = toSetOfString(map.get("tags")); - record.guiConfig = toMapOfStringString(map.get("gui_config")); - record.wlbUrl = toString(map.get("wlb_url")); - record.wlbUsername = toString(map.get("wlb_username")); - record.wlbEnabled = toBoolean(map.get("wlb_enabled")); - record.wlbVerifyCert = toBoolean(map.get("wlb_verify_cert")); - record.redoLogEnabled = toBoolean(map.get("redo_log_enabled")); - record.redoLogVdi = toVDI(map.get("redo_log_vdi")); - record.vswitchController = toString(map.get("vswitch_controller")); - record.restrictions = toMapOfStringString(map.get("restrictions")); - record.metadataVDIs = toSetOfVDI(map.get("metadata_VDIs")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.master = toHost(map.get("master")); + record.defaultSR = toSR(map.get("default_SR")); + record.suspendImageSR = toSR(map.get("suspend_image_SR")); + record.crashDumpSR = toSR(map.get("crash_dump_SR")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.haEnabled = toBoolean(map.get("ha_enabled")); + record.haConfiguration = toMapOfStringString(map.get("ha_configuration")); + record.haStatefiles = toSetOfString(map.get("ha_statefiles")); + record.haHostFailuresToTolerate = toLong(map.get("ha_host_failures_to_tolerate")); + record.haPlanExistsFor = toLong(map.get("ha_plan_exists_for")); + record.haAllowOvercommit = toBoolean(map.get("ha_allow_overcommit")); + record.haOvercommitted = toBoolean(map.get("ha_overcommitted")); + record.blobs = toMapOfStringBlob(map.get("blobs")); + record.tags = toSetOfString(map.get("tags")); + record.guiConfig = toMapOfStringString(map.get("gui_config")); + record.wlbUrl = toString(map.get("wlb_url")); + record.wlbUsername = toString(map.get("wlb_username")); + record.wlbEnabled = toBoolean(map.get("wlb_enabled")); + record.wlbVerifyCert = toBoolean(map.get("wlb_verify_cert")); + record.redoLogEnabled = toBoolean(map.get("redo_log_enabled")); + record.redoLogVdi = toVDI(map.get("redo_log_vdi")); + record.vswitchController = toString(map.get("vswitch_controller")); + record.restrictions = toMapOfStringString(map.get("restrictions")); + record.metadataVDIs = toSetOfVDI(map.get("metadata_VDIs")); return record; } @@ -12758,17 +13094,17 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; PoolPatch.Record record = new PoolPatch.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.version = toString(map.get("version")); - record.size = toLong(map.get("size")); - record.poolApplied = toBoolean(map.get("pool_applied")); - record.hostPatches = toSetOfHostPatch(map.get("host_patches")); - record.afterApplyGuidance = toSetOfAfterApplyGuidance(map.get("after_apply_guidance")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.version = toString(map.get("version")); + record.size = toLong(map.get("size")); + record.poolApplied = toBoolean(map.get("pool_applied")); + record.hostPatches = toSetOfHostPatch(map.get("host_patches")); + record.afterApplyGuidance = toSetOfAfterApplyGuidance(map.get("after_apply_guidance")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12776,12 +13112,12 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Role.Record record = new Role.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.subroles = toSetOfRole(map.get("subroles")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.subroles = toSetOfRole(map.get("subroles")); return record; } @@ -12789,11 +13125,11 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Secret.Record record = new Secret.Record(); - record.uuid = toString(map.get("uuid")); - record.value = toString(map.get("value")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.value = toString(map.get("value")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12801,22 +13137,22 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Session.Record record = new Session.Record(); - record.uuid = toString(map.get("uuid")); - record.thisHost = toHost(map.get("this_host")); - record.thisUser = toUser(map.get("this_user")); - record.lastActive = toDate(map.get("last_active")); - record.pool = toBoolean(map.get("pool")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.isLocalSuperuser = toBoolean(map.get("is_local_superuser")); - record.subject = toSubject(map.get("subject")); - record.validationTime = toDate(map.get("validation_time")); - record.authUserSid = toString(map.get("auth_user_sid")); - record.authUserName = toString(map.get("auth_user_name")); - record.rbacPermissions = toSetOfString(map.get("rbac_permissions")); - record.tasks = toSetOfTask(map.get("tasks")); - record.parent = toSession(map.get("parent")); + record.uuid = toString(map.get("uuid")); + record.thisHost = toHost(map.get("this_host")); + record.thisUser = toUser(map.get("this_user")); + record.lastActive = toDate(map.get("last_active")); + record.pool = toBoolean(map.get("pool")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.isLocalSuperuser = toBoolean(map.get("is_local_superuser")); + record.subject = toSubject(map.get("subject")); + record.validationTime = toDate(map.get("validation_time")); + record.authUserSid = toString(map.get("auth_user_sid")); + record.authUserName = toString(map.get("auth_user_name")); + record.rbacPermissions = toSetOfString(map.get("rbac_permissions")); + record.tasks = toSetOfTask(map.get("tasks")); + record.parent = toSession(map.get("parent")); return record; } @@ -12824,12 +13160,12 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Subject.Record record = new Subject.Record(); - record.uuid = toString(map.get("uuid")); - record.subjectIdentifier = toString(map.get("subject_identifier")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.roles = toSetOfRole(map.get("roles")); + record.uuid = toString(map.get("uuid")); + record.subjectIdentifier = toString(map.get("subject_identifier")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.roles = toSetOfRole(map.get("roles")); return record; } @@ -12837,24 +13173,24 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Task.Record record = new Task.Record(); - record.uuid = toString(map.get("uuid")); - record.nameLabel = toString(map.get("name_label")); - record.nameDescription = toString(map.get("name_description")); - record.allowedOperations = toSetOfTaskAllowedOperations(map.get("allowed_operations")); - record.currentOperations = toMapOfStringTaskAllowedOperations(map.get("current_operations")); - record.created = toDate(map.get("created")); - record.finished = toDate(map.get("finished")); - record.status = toTaskStatusType(map.get("status")); - record.residentOn = toHost(map.get("resident_on")); - record.progress = toDouble(map.get("progress")); - record.type = toString(map.get("type")); - record.result = toString(map.get("result")); - record.errorInfo = toSetOfString(map.get("error_info")); - record.otherConfig = toMapOfStringString(map.get("other_config")); - record.subtaskOf = toTask(map.get("subtask_of")); - record.subtasks = toSetOfTask(map.get("subtasks")); + record.uuid = toString(map.get("uuid")); + record.nameLabel = toString(map.get("name_label")); + record.nameDescription = toString(map.get("name_description")); + record.allowedOperations = toSetOfTaskAllowedOperations(map.get("allowed_operations")); + record.currentOperations = toMapOfStringTaskAllowedOperations(map.get("current_operations")); + record.created = toDate(map.get("created")); + record.finished = toDate(map.get("finished")); + record.status = toTaskStatusType(map.get("status")); + record.residentOn = toHost(map.get("resident_on")); + record.progress = toDouble(map.get("progress")); + record.type = toString(map.get("type")); + record.result = toString(map.get("result")); + record.errorInfo = toSetOfString(map.get("error_info")); + record.otherConfig = toMapOfStringString(map.get("other_config")); + record.subtaskOf = toTask(map.get("subtask_of")); + record.subtasks = toSetOfTask(map.get("subtasks")); return record; } @@ -12862,13 +13198,13 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; Tunnel.Record record = new Tunnel.Record(); - record.uuid = toString(map.get("uuid")); - record.accessPIF = toPIF(map.get("access_PIF")); - record.transportPIF = toPIF(map.get("transport_PIF")); - record.status = toMapOfStringString(map.get("status")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.accessPIF = toPIF(map.get("access_PIF")); + record.transportPIF = toPIF(map.get("transport_PIF")); + record.status = toMapOfStringString(map.get("status")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } @@ -12876,182 +13212,181 @@ public class Types if (object == null) { return null; } - Map map = (Map) object; + Map map = (Map)object; User.Record record = new User.Record(); - record.uuid = toString(map.get("uuid")); - record.shortName = toString(map.get("short_name")); - record.fullname = toString(map.get("fullname")); - record.otherConfig = toMapOfStringString(map.get("other_config")); + record.uuid = toString(map.get("uuid")); + record.shortName = toString(map.get("short_name")); + record.fullname = toString(map.get("fullname")); + record.otherConfig = toMapOfStringString(map.get("other_config")); return record; } - - public static Bond toBond(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toBond(parseResult(task.getResult(connection))); + public static Bond toBond(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toBond(parseResult(task.getResult(connection))); } - public static DRTask toDRTask(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toDRTask(parseResult(task.getResult(connection))); + public static DRTask toDRTask(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toDRTask(parseResult(task.getResult(connection))); } - public static GPUGroup toGPUGroup(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toGPUGroup(parseResult(task.getResult(connection))); + public static GPUGroup toGPUGroup(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toGPUGroup(parseResult(task.getResult(connection))); } - public static PBD toPBD(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toPBD(parseResult(task.getResult(connection))); + public static PBD toPBD(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toPBD(parseResult(task.getResult(connection))); } - public static PCI toPCI(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toPCI(parseResult(task.getResult(connection))); + public static PCI toPCI(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toPCI(parseResult(task.getResult(connection))); } - public static PGPU toPGPU(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toPGPU(parseResult(task.getResult(connection))); + public static PGPU toPGPU(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toPGPU(parseResult(task.getResult(connection))); } - public static PIF toPIF(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toPIF(parseResult(task.getResult(connection))); + public static PIF toPIF(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toPIF(parseResult(task.getResult(connection))); } - public static PIFMetrics toPIFMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toPIFMetrics(parseResult(task.getResult(connection))); + public static PIFMetrics toPIFMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toPIFMetrics(parseResult(task.getResult(connection))); } - public static SM toSM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toSM(parseResult(task.getResult(connection))); + public static SM toSM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toSM(parseResult(task.getResult(connection))); } - public static SR toSR(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toSR(parseResult(task.getResult(connection))); + public static SR toSR(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toSR(parseResult(task.getResult(connection))); } - public static VBD toVBD(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVBD(parseResult(task.getResult(connection))); + public static VBD toVBD(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVBD(parseResult(task.getResult(connection))); } - public static VBDMetrics toVBDMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVBDMetrics(parseResult(task.getResult(connection))); + public static VBDMetrics toVBDMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVBDMetrics(parseResult(task.getResult(connection))); } - public static VDI toVDI(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVDI(parseResult(task.getResult(connection))); + public static VDI toVDI(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVDI(parseResult(task.getResult(connection))); } - public static VGPU toVGPU(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVGPU(parseResult(task.getResult(connection))); + public static VGPU toVGPU(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVGPU(parseResult(task.getResult(connection))); } - public static VIF toVIF(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVIF(parseResult(task.getResult(connection))); + public static VIF toVIF(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVIF(parseResult(task.getResult(connection))); } - public static VIFMetrics toVIFMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVIFMetrics(parseResult(task.getResult(connection))); + public static VIFMetrics toVIFMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVIFMetrics(parseResult(task.getResult(connection))); } - public static VLAN toVLAN(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVLAN(parseResult(task.getResult(connection))); + public static VLAN toVLAN(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVLAN(parseResult(task.getResult(connection))); } - public static VM toVM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVM(parseResult(task.getResult(connection))); + public static VM toVM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVM(parseResult(task.getResult(connection))); } - public static VMPP toVMPP(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVMPP(parseResult(task.getResult(connection))); + public static VMPP toVMPP(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVMPP(parseResult(task.getResult(connection))); } - public static VMAppliance toVMAppliance(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVMAppliance(parseResult(task.getResult(connection))); + public static VMAppliance toVMAppliance(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVMAppliance(parseResult(task.getResult(connection))); } - public static VMGuestMetrics toVMGuestMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVMGuestMetrics(parseResult(task.getResult(connection))); + public static VMGuestMetrics toVMGuestMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVMGuestMetrics(parseResult(task.getResult(connection))); } - public static VMMetrics toVMMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVMMetrics(parseResult(task.getResult(connection))); + public static VMMetrics toVMMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVMMetrics(parseResult(task.getResult(connection))); } - public static VTPM toVTPM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toVTPM(parseResult(task.getResult(connection))); + public static VTPM toVTPM(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toVTPM(parseResult(task.getResult(connection))); } - public static Blob toBlob(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toBlob(parseResult(task.getResult(connection))); + public static Blob toBlob(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toBlob(parseResult(task.getResult(connection))); } - public static Console toConsole(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toConsole(parseResult(task.getResult(connection))); + public static Console toConsole(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toConsole(parseResult(task.getResult(connection))); } - public static Crashdump toCrashdump(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toCrashdump(parseResult(task.getResult(connection))); + public static Crashdump toCrashdump(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toCrashdump(parseResult(task.getResult(connection))); } - public static Host toHost(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toHost(parseResult(task.getResult(connection))); + public static Host toHost(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toHost(parseResult(task.getResult(connection))); } - public static HostCpu toHostCpu(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toHostCpu(parseResult(task.getResult(connection))); + public static HostCpu toHostCpu(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toHostCpu(parseResult(task.getResult(connection))); } - public static HostCrashdump toHostCrashdump(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toHostCrashdump(parseResult(task.getResult(connection))); + public static HostCrashdump toHostCrashdump(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toHostCrashdump(parseResult(task.getResult(connection))); } - public static HostMetrics toHostMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toHostMetrics(parseResult(task.getResult(connection))); + public static HostMetrics toHostMetrics(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toHostMetrics(parseResult(task.getResult(connection))); } - public static HostPatch toHostPatch(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toHostPatch(parseResult(task.getResult(connection))); + public static HostPatch toHostPatch(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toHostPatch(parseResult(task.getResult(connection))); } - public static Message toMessage(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toMessage(parseResult(task.getResult(connection))); + public static Message toMessage(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toMessage(parseResult(task.getResult(connection))); } - public static Network toNetwork(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toNetwork(parseResult(task.getResult(connection))); + public static Network toNetwork(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toNetwork(parseResult(task.getResult(connection))); } - public static Pool toPool(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toPool(parseResult(task.getResult(connection))); + public static Pool toPool(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toPool(parseResult(task.getResult(connection))); } - public static PoolPatch toPoolPatch(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toPoolPatch(parseResult(task.getResult(connection))); + public static PoolPatch toPoolPatch(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toPoolPatch(parseResult(task.getResult(connection))); } - public static Role toRole(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toRole(parseResult(task.getResult(connection))); + public static Role toRole(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toRole(parseResult(task.getResult(connection))); } - public static Secret toSecret(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toSecret(parseResult(task.getResult(connection))); + public static Secret toSecret(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toSecret(parseResult(task.getResult(connection))); } - public static Session toSession(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toSession(parseResult(task.getResult(connection))); + public static Session toSession(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toSession(parseResult(task.getResult(connection))); } - public static Subject toSubject(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toSubject(parseResult(task.getResult(connection))); + public static Subject toSubject(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toSubject(parseResult(task.getResult(connection))); } - public static Task toTask(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toTask(parseResult(task.getResult(connection))); + public static Task toTask(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toTask(parseResult(task.getResult(connection))); } - public static Tunnel toTunnel(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toTunnel(parseResult(task.getResult(connection))); + public static Tunnel toTunnel(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toTunnel(parseResult(task.getResult(connection))); } - public static User toUser(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult{ - return Types.toUser(parseResult(task.getResult(connection))); + public static User toUser(Task task, Connection connection) throws XenAPIException, BadServerResponse, XmlRpcException, BadAsyncResult { + return Types.toUser(parseResult(task.getResult(connection))); } } diff --git a/deps/XenServerJava/src/com/xensource/xenapi/User.java b/deps/XenServerJava/src/com/xensource/xenapi/User.java index 0d2e4fd81d8..dff27f5b367 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/User.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/User.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class User extends XenAPIObject { * For internal use only. */ User(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class User extends XenAPIObject { { if (obj != null && obj instanceof User) { - User other = (User) obj; + User other = (User)obj; return other.ref.equals(this.ref); } else { @@ -110,8 +109,8 @@ public class User extends XenAPIObject { /** * Convert a user.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("short_name", this.shortName == null ? "" : this.shortName); map.put("fullname", this.fullname == null ? "" : this.fullname); @@ -143,16 +142,17 @@ public class User extends XenAPIObject { * * @return all fields from the object */ - @Deprecated public User.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public User.Record getRecord(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toUserRecord(result); + return Types.toUserRecord(result); } /** @@ -162,16 +162,17 @@ public class User extends XenAPIObject { * @param uuid UUID of object to return * @return reference to the object */ - @Deprecated public static User getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public static User getByUuid(Connection c, String uuid) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toUser(result); + return Types.toUser(result); } /** @@ -181,10 +182,11 @@ public class User extends XenAPIObject { * @param record All constructor arguments * @return Task */ - @Deprecated public static Task createAsync(Connection c, User.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public static Task createAsync(Connection c, User.Record record) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.user.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -201,17 +203,18 @@ public class User extends XenAPIObject { * @param record All constructor arguments * @return reference to the newly created object */ - @Deprecated public static User create(Connection c, User.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public static User create(Connection c, User.Record record) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toUser(result); + return Types.toUser(result); } /** @@ -220,10 +223,11 @@ public class User extends XenAPIObject { * * @return Task */ - @Deprecated public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Task destroyAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.user.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -237,10 +241,11 @@ public class User extends XenAPIObject { * @deprecated * */ - @Deprecated public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public void destroy(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -254,15 +259,15 @@ public class User extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -271,15 +276,15 @@ public class User extends XenAPIObject { * @return value of the field */ public String getShortName(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_short_name"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -288,15 +293,15 @@ public class User extends XenAPIObject { * @return value of the field */ public String getFullname(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_fullname"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -305,15 +310,15 @@ public class User extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -322,9 +327,9 @@ public class User extends XenAPIObject { * @param fullname New value to set */ public void setFullname(Connection c, String fullname) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.set_fullname"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(fullname)}; @@ -338,9 +343,9 @@ public class User extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -355,9 +360,9 @@ public class User extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -371,9 +376,9 @@ public class User extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "user.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VBD.java b/deps/XenServerJava/src/com/xensource/xenapi/VBD.java index 18cbb7b488d..56e6f4b3d0e 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VBD.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VBD.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VBD extends XenAPIObject { * For internal use only. */ VBD(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VBD extends XenAPIObject { { if (obj != null && obj instanceof VBD) { - VBD other = (VBD) obj; + VBD other = (VBD)obj; return other.ref.equals(this.ref); } else { @@ -128,8 +127,8 @@ public class VBD extends XenAPIObject { /** * Convert a VBD.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("allowed_operations", this.allowedOperations == null ? new LinkedHashSet() : this.allowedOperations); map.put("current_operations", this.currentOperations == null ? new HashMap() : this.currentOperations); @@ -251,15 +250,15 @@ public class VBD extends XenAPIObject { * @return all fields from the object */ public VBD.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBDRecord(result); + return Types.toVBDRecord(result); } /** @@ -269,15 +268,15 @@ public class VBD extends XenAPIObject { * @return reference to the object */ public static VBD getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBD(result); + return Types.toVBD(result); } /** @@ -287,9 +286,9 @@ public class VBD extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VBD.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VBD.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -306,16 +305,16 @@ public class VBD extends XenAPIObject { * @return reference to the newly created object */ public static VBD create(Connection c, VBD.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBD(result); + return Types.toVBD(result); } /** @@ -324,9 +323,9 @@ public class VBD extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VBD.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -340,9 +339,9 @@ public class VBD extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -356,15 +355,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -373,15 +372,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVbdOperations(result); + return Types.toSetOfVbdOperations(result); } /** @@ -390,15 +389,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringVbdOperations(result); + return Types.toMapOfStringVbdOperations(result); } /** @@ -407,15 +406,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -424,15 +423,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public VDI getVDI(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_VDI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -441,15 +440,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public String getDevice(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_device"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -458,15 +457,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public String getUserdevice(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_userdevice"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -475,15 +474,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Boolean getBootable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_bootable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -492,15 +491,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Types.VbdMode getMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVbdMode(result); + return Types.toVbdMode(result); } /** @@ -509,15 +508,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Types.VbdType getType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVbdType(result); + return Types.toVbdType(result); } /** @@ -526,15 +525,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Boolean getUnpluggable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_unpluggable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -543,15 +542,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Boolean getStorageLock(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_storage_lock"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -560,15 +559,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Boolean getEmpty(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_empty"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -577,15 +576,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -594,15 +593,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Boolean getCurrentlyAttached(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_currently_attached"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -611,15 +610,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Long getStatusCode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_status_code"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -628,15 +627,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public String getStatusDetail(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_status_detail"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -645,15 +644,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Map getRuntimeProperties(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_runtime_properties"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -662,15 +661,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public String getQosAlgorithmType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_qos_algorithm_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -679,15 +678,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Map getQosAlgorithmParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -696,15 +695,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public Set getQosSupportedAlgorithms(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_qos_supported_algorithms"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -713,15 +712,15 @@ public class VBD extends XenAPIObject { * @return value of the field */ public VBDMetrics getMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBDMetrics(result); + return Types.toVBDMetrics(result); } /** @@ -730,9 +729,9 @@ public class VBD extends XenAPIObject { * @param userdevice New value to set */ public void setUserdevice(Connection c, String userdevice) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_userdevice"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(userdevice)}; @@ -746,9 +745,9 @@ public class VBD extends XenAPIObject { * @param bootable New value to set */ public void setBootable(Connection c, Boolean bootable) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_bootable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(bootable)}; @@ -762,9 +761,9 @@ public class VBD extends XenAPIObject { * @param mode New value to set */ public void setMode(Connection c, Types.VbdMode mode) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(mode)}; @@ -778,9 +777,9 @@ public class VBD extends XenAPIObject { * @param type New value to set */ public void setType(Connection c, Types.VbdType type) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(type)}; @@ -794,9 +793,9 @@ public class VBD extends XenAPIObject { * @param unpluggable New value to set */ public void setUnpluggable(Connection c, Boolean unpluggable) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_unpluggable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(unpluggable)}; @@ -810,9 +809,9 @@ public class VBD extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -827,9 +826,9 @@ public class VBD extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -843,9 +842,9 @@ public class VBD extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -859,9 +858,9 @@ public class VBD extends XenAPIObject { * @param algorithmType New value to set */ public void setQosAlgorithmType(Connection c, String algorithmType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_qos_algorithm_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(algorithmType)}; @@ -875,9 +874,9 @@ public class VBD extends XenAPIObject { * @param algorithmParams New value to set */ public void setQosAlgorithmParams(Connection c, Map algorithmParams) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.set_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(algorithmParams)}; @@ -892,9 +891,9 @@ public class VBD extends XenAPIObject { * @param value Value to add */ public void addToQosAlgorithmParams(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.add_to_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -908,9 +907,9 @@ public class VBD extends XenAPIObject { * @param key Key to remove */ public void removeFromQosAlgorithmParams(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.remove_from_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -924,11 +923,11 @@ public class VBD extends XenAPIObject { * @return Task */ public Task ejectAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VbdNotRemovableMedia, - Types.VbdIsEmpty { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VbdNotRemovableMedia, + Types.VbdIsEmpty { String method_call = "Async.VBD.eject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -942,11 +941,11 @@ public class VBD extends XenAPIObject { * */ public void eject(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VbdNotRemovableMedia, - Types.VbdIsEmpty { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VbdNotRemovableMedia, + Types.VbdIsEmpty { String method_call = "VBD.eject"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -961,11 +960,11 @@ public class VBD extends XenAPIObject { * @return Task */ public Task insertAsync(Connection c, VDI vdi) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VbdNotRemovableMedia, - Types.VbdNotEmpty { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VbdNotRemovableMedia, + Types.VbdNotEmpty { String method_call = "Async.VBD.insert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(vdi)}; @@ -980,11 +979,11 @@ public class VBD extends XenAPIObject { * @param vdi The new VDI to 'insert' */ public void insert(Connection c, VDI vdi) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VbdNotRemovableMedia, - Types.VbdNotEmpty { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VbdNotRemovableMedia, + Types.VbdNotEmpty { String method_call = "VBD.insert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(vdi)}; @@ -998,9 +997,9 @@ public class VBD extends XenAPIObject { * @return Task */ public Task plugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VBD.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1014,9 +1013,9 @@ public class VBD extends XenAPIObject { * */ public void plug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1030,11 +1029,11 @@ public class VBD extends XenAPIObject { * @return Task */ public Task unplugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.DeviceDetachRejected, - Types.DeviceAlreadyDetached { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.DeviceDetachRejected, + Types.DeviceAlreadyDetached { String method_call = "Async.VBD.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1048,11 +1047,11 @@ public class VBD extends XenAPIObject { * */ public void unplug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.DeviceDetachRejected, - Types.DeviceAlreadyDetached { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.DeviceDetachRejected, + Types.DeviceAlreadyDetached { String method_call = "VBD.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1066,9 +1065,9 @@ public class VBD extends XenAPIObject { * @return Task */ public Task unplugForceAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VBD.unplug_force"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1082,9 +1081,9 @@ public class VBD extends XenAPIObject { * */ public void unplugForce(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.unplug_force"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1098,9 +1097,9 @@ public class VBD extends XenAPIObject { * @return Task */ public Task assertAttachableAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VBD.assert_attachable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1114,9 +1113,9 @@ public class VBD extends XenAPIObject { * */ public void assertAttachable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.assert_attachable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1130,15 +1129,15 @@ public class VBD extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVBD(result); + return Types.toSetOfVBD(result); } /** @@ -1147,15 +1146,15 @@ public class VBD extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVBDVBDRecord(result); + return Types.toMapOfVBDVBDRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VBDMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/VBDMetrics.java index adb6bb513de..1f678faecdb 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VBDMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VBDMetrics.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VBDMetrics extends XenAPIObject { * For internal use only. */ VBDMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VBDMetrics extends XenAPIObject { { if (obj != null && obj instanceof VBDMetrics) { - VBDMetrics other = (VBDMetrics) obj; + VBDMetrics other = (VBDMetrics)obj; return other.ref.equals(this.ref); } else { @@ -111,8 +110,8 @@ public class VBDMetrics extends XenAPIObject { /** * Convert a VBD_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("io_read_kbs", this.ioReadKbs == null ? 0.0 : this.ioReadKbs); map.put("io_write_kbs", this.ioWriteKbs == null ? 0.0 : this.ioWriteKbs); @@ -149,15 +148,15 @@ public class VBDMetrics extends XenAPIObject { * @return all fields from the object */ public VBDMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBDMetricsRecord(result); + return Types.toVBDMetricsRecord(result); } /** @@ -167,15 +166,15 @@ public class VBDMetrics extends XenAPIObject { * @return reference to the object */ public static VBDMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVBDMetrics(result); + return Types.toVBDMetrics(result); } /** @@ -184,15 +183,15 @@ public class VBDMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -201,15 +200,15 @@ public class VBDMetrics extends XenAPIObject { * @return value of the field */ public Double getIoReadKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_io_read_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -218,15 +217,15 @@ public class VBDMetrics extends XenAPIObject { * @return value of the field */ public Double getIoWriteKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_io_write_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -235,15 +234,15 @@ public class VBDMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -252,15 +251,15 @@ public class VBDMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -269,9 +268,9 @@ public class VBDMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -286,9 +285,9 @@ public class VBDMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -302,9 +301,9 @@ public class VBDMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -318,15 +317,15 @@ public class VBDMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVBDMetrics(result); + return Types.toSetOfVBDMetrics(result); } /** @@ -335,15 +334,15 @@ public class VBDMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VBD_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVBDMetricsVBDMetricsRecord(result); + return Types.toMapOfVBDMetricsVBDMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VDI.java b/deps/XenServerJava/src/com/xensource/xenapi/VDI.java index 4ea9daff1fa..2c32c84e9fa 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VDI.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VDI.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VDI extends XenAPIObject { * For internal use only. */ VDI(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VDI extends XenAPIObject { { if (obj != null && obj instanceof VDI) { - VDI other = (VDI) obj; + VDI other = (VDI)obj; return other.ref.equals(this.ref); } else { @@ -136,8 +135,8 @@ public class VDI extends XenAPIObject { /** * Convert a VDI.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -299,15 +298,15 @@ public class VDI extends XenAPIObject { * @return all fields from the object */ public VDI.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDIRecord(result); + return Types.toVDIRecord(result); } /** @@ -317,15 +316,15 @@ public class VDI extends XenAPIObject { * @return reference to the object */ public static VDI getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -335,9 +334,9 @@ public class VDI extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VDI.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -354,16 +353,16 @@ public class VDI extends XenAPIObject { * @return reference to the newly created object */ public static VDI create(Connection c, VDI.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -372,9 +371,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -388,9 +387,9 @@ public class VDI extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -405,15 +404,15 @@ public class VDI extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVDI(result); + return Types.toSetOfVDI(result); } /** @@ -422,15 +421,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -439,15 +438,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -456,15 +455,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -473,15 +472,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVdiOperations(result); + return Types.toSetOfVdiOperations(result); } /** @@ -490,15 +489,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringVdiOperations(result); + return Types.toMapOfStringVdiOperations(result); } /** @@ -507,15 +506,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public SR getSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -524,15 +523,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Set getVBDs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_VBDs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVBD(result); + return Types.toSetOfVBD(result); } /** @@ -541,15 +540,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Set getCrashDumps(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_crash_dumps"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfCrashdump(result); + return Types.toSetOfCrashdump(result); } /** @@ -558,15 +557,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Long getVirtualSize(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_virtual_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -575,15 +574,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Long getPhysicalUtilisation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_physical_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -592,15 +591,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Types.VdiType getType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVdiType(result); + return Types.toVdiType(result); } /** @@ -609,15 +608,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getSharable(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_sharable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -626,15 +625,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getReadOnly(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_read_only"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -643,15 +642,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -660,15 +659,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getStorageLock(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_storage_lock"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -677,15 +676,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public String getLocation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_location"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -694,15 +693,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getManaged(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_managed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -711,15 +710,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getMissing(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_missing"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -728,15 +727,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public VDI getParent(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_parent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -745,15 +744,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Map getXenstoreData(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -762,15 +761,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Map getSmConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -779,15 +778,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getIsASnapshot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_is_a_snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -796,15 +795,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public VDI getSnapshotOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_snapshot_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -813,15 +812,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Set getSnapshots(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_snapshots"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVDI(result); + return Types.toSetOfVDI(result); } /** @@ -830,15 +829,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Date getSnapshotTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_snapshot_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -847,15 +846,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -864,15 +863,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getAllowCaching(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_allow_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -881,15 +880,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Types.OnBoot getOnBoot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_on_boot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toOnBoot(result); + return Types.toOnBoot(result); } /** @@ -898,15 +897,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Pool getMetadataOfPool(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_metadata_of_pool"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPool(result); + return Types.toPool(result); } /** @@ -915,15 +914,15 @@ public class VDI extends XenAPIObject { * @return value of the field */ public Boolean getMetadataLatest(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_metadata_latest"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -932,9 +931,9 @@ public class VDI extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -949,9 +948,9 @@ public class VDI extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -965,9 +964,9 @@ public class VDI extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -981,9 +980,9 @@ public class VDI extends XenAPIObject { * @param xenstoreData New value to set */ public void setXenstoreData(Connection c, Map xenstoreData) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(xenstoreData)}; @@ -998,9 +997,9 @@ public class VDI extends XenAPIObject { * @param value Value to add */ public void addToXenstoreData(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.add_to_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1014,9 +1013,9 @@ public class VDI extends XenAPIObject { * @param key Key to remove */ public void removeFromXenstoreData(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.remove_from_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1030,9 +1029,9 @@ public class VDI extends XenAPIObject { * @param smConfig New value to set */ public void setSmConfig(Connection c, Map smConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(smConfig)}; @@ -1047,9 +1046,9 @@ public class VDI extends XenAPIObject { * @param value Value to add */ public void addToSmConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.add_to_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1063,9 +1062,9 @@ public class VDI extends XenAPIObject { * @param key Key to remove */ public void removeFromSmConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.remove_from_sm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1079,9 +1078,9 @@ public class VDI extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -1095,9 +1094,9 @@ public class VDI extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1111,9 +1110,9 @@ public class VDI extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1128,13 +1127,13 @@ public class VDI extends XenAPIObject { * @return Task */ public Task snapshotAsync(Connection c, Map driverParams) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { + BadServerResponse, + VersionException, + XenAPIException, + XmlRpcException { - if(c.rioConnection){ - if (driverParams.isEmpty()){ + if (c.rioConnection) { + if (driverParams.isEmpty()) { return rioSnapshotAsync(c); } else { throw new Types.VersionException("driverParams parameter must be empty map for Rio (legacy XenServer) host"); @@ -1144,12 +1143,10 @@ public class VDI extends XenAPIObject { } } - - private Task rioSnapshotAsync(Connection c) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "Async.VDI.snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1159,9 +1156,9 @@ public class VDI extends XenAPIObject { } private Task miamiSnapshotAsync(Connection c, Map driverParams) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "Async.VDI.snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(driverParams)}; @@ -1177,13 +1174,13 @@ public class VDI extends XenAPIObject { * @return The ID of the newly created VDI. */ public VDI snapshot(Connection c, Map driverParams) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { + BadServerResponse, + VersionException, + XenAPIException, + XmlRpcException { - if(c.rioConnection){ - if (driverParams.isEmpty()){ + if (c.rioConnection) { + if (driverParams.isEmpty()) { return rioSnapshot(c); } else { throw new Types.VersionException("driverParams parameter must be empty map for Rio (legacy XenServer) host"); @@ -1193,30 +1190,28 @@ public class VDI extends XenAPIObject { } } - - private VDI rioSnapshot(Connection c) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "VDI.snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } private VDI miamiSnapshot(Connection c, Map driverParams) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "VDI.snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(driverParams)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -1226,13 +1221,13 @@ public class VDI extends XenAPIObject { * @return Task */ public Task createCloneAsync(Connection c, Map driverParams) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { + BadServerResponse, + VersionException, + XenAPIException, + XmlRpcException { - if(c.rioConnection){ - if (driverParams.isEmpty()){ + if (c.rioConnection) { + if (driverParams.isEmpty()) { return rioCreateCloneAsync(c); } else { throw new Types.VersionException("driverParams parameter must be empty map for Rio (legacy XenServer) host"); @@ -1242,12 +1237,10 @@ public class VDI extends XenAPIObject { } } - - private Task rioCreateCloneAsync(Connection c) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "Async.VDI.clone"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1257,9 +1250,9 @@ public class VDI extends XenAPIObject { } private Task miamiCreateCloneAsync(Connection c, Map driverParams) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "Async.VDI.clone"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(driverParams)}; @@ -1275,13 +1268,13 @@ public class VDI extends XenAPIObject { * @return The ID of the newly created VDI. */ public VDI createClone(Connection c, Map driverParams) throws - BadServerResponse, - VersionException, - XenAPIException, - XmlRpcException { + BadServerResponse, + VersionException, + XenAPIException, + XmlRpcException { - if(c.rioConnection){ - if (driverParams.isEmpty()){ + if (c.rioConnection) { + if (driverParams.isEmpty()) { return rioCreateClone(c); } else { throw new Types.VersionException("driverParams parameter must be empty map for Rio (legacy XenServer) host"); @@ -1291,30 +1284,28 @@ public class VDI extends XenAPIObject { } } - - private VDI rioCreateClone(Connection c) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "VDI.clone"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } private VDI miamiCreateClone(Connection c, Map driverParams) throws - BadServerResponse, - XmlRpcException, - XenAPIException { + BadServerResponse, + XmlRpcException, + XenAPIException { String method_call = "VDI.clone"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(driverParams)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -1324,9 +1315,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task resizeAsync(Connection c, Long size) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.resize"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(size)}; @@ -1341,9 +1332,9 @@ public class VDI extends XenAPIObject { * @param size The new size of the VDI */ public void resize(Connection c, Long size) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.resize"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(size)}; @@ -1358,9 +1349,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task resizeOnlineAsync(Connection c, Long size) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.resize_online"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(size)}; @@ -1375,9 +1366,9 @@ public class VDI extends XenAPIObject { * @param size The new size of the VDI */ public void resizeOnline(Connection c, Long size) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.resize_online"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(size)}; @@ -1408,14 +1399,20 @@ public class VDI extends XenAPIObject { * @param snapshotOf Storage-specific config * @return Task */ - public static Task introduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrOperationNotSupported { + public static Task introduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, + Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, + Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrOperationNotSupported { String method_call = "Async.VDI.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), + Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), + Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), + Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), + Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1444,17 +1441,23 @@ public class VDI extends XenAPIObject { * @param snapshotOf Storage-specific config * @return The ref of the newly created VDI record. */ - public static VDI introduce(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrOperationNotSupported { + public static VDI introduce(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, + Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, + Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrOperationNotSupported { String method_call = "VDI.introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), + Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), + Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), + Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), + Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -1480,13 +1483,19 @@ public class VDI extends XenAPIObject { * @param snapshotOf Storage-specific config * @return Task */ - public static Task dbIntroduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static Task dbIntroduceAsync(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, + Boolean readOnly, Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, + Long virtualSize, Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.db_introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), + Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), + Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), + Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), + Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -1515,16 +1524,22 @@ public class VDI extends XenAPIObject { * @param snapshotOf Storage-specific config * @return The ref of the newly created VDI record. */ - public static VDI dbIntroduce(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public static VDI dbIntroduce(Connection c, String uuid, String nameLabel, String nameDescription, SR SR, Types.VdiType type, Boolean sharable, Boolean readOnly, + Map otherConfig, String location, Map xenstoreData, Map smConfig, Boolean managed, Long virtualSize, + Long physicalUtilisation, Pool metadataOfPool, Boolean isASnapshot, Date snapshotTime, VDI snapshotOf) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.db_introduce"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid), Marshalling.toXMLRPC(nameLabel), Marshalling.toXMLRPC(nameDescription), + Marshalling.toXMLRPC(SR), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(sharable), Marshalling.toXMLRPC(readOnly), Marshalling.toXMLRPC(otherConfig), + Marshalling.toXMLRPC(location), Marshalling.toXMLRPC(xenstoreData), Marshalling.toXMLRPC(smConfig), Marshalling.toXMLRPC(managed), + Marshalling.toXMLRPC(virtualSize), Marshalling.toXMLRPC(physicalUtilisation), Marshalling.toXMLRPC(metadataOfPool), Marshalling.toXMLRPC(isASnapshot), + Marshalling.toXMLRPC(snapshotTime), Marshalling.toXMLRPC(snapshotOf)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -1533,9 +1548,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task dbForgetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.db_forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1549,9 +1564,9 @@ public class VDI extends XenAPIObject { * */ public void dbForget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.db_forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1565,10 +1580,10 @@ public class VDI extends XenAPIObject { * @return Task */ public Task updateAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrOperationNotSupported { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrOperationNotSupported { String method_call = "Async.VDI.update"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1582,10 +1597,10 @@ public class VDI extends XenAPIObject { * */ public void update(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.SrOperationNotSupported { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.SrOperationNotSupported { String method_call = "VDI.update"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1600,9 +1615,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task copyAsync(Connection c, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.copy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sr)}; @@ -1618,15 +1633,15 @@ public class VDI extends XenAPIObject { * @return The reference of the newly created VDI. */ public VDI copy(Connection c, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.copy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sr)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -1635,9 +1650,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's managed field */ public void setManaged(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_managed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1651,9 +1666,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task forgetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1667,9 +1682,9 @@ public class VDI extends XenAPIObject { * */ public void forget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.forget"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1683,9 +1698,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's sharable field */ public void setSharable(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_sharable"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1699,9 +1714,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's read_only field */ public void setReadOnly(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_read_only"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1715,9 +1730,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's missing field */ public void setMissing(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_missing"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1731,9 +1746,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's virtual size */ public void setVirtualSize(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_virtual_size"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1747,9 +1762,9 @@ public class VDI extends XenAPIObject { * @param value The new value of the VDI's physical utilisation */ public void setPhysicalUtilisation(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_physical_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1763,9 +1778,9 @@ public class VDI extends XenAPIObject { * @param value The new value indicating whether this VDI is a snapshot */ public void setIsASnapshot(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_is_a_snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1779,9 +1794,9 @@ public class VDI extends XenAPIObject { * @param value The VDI of which this VDI is a snapshot */ public void setSnapshotOf(Connection c, VDI value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_snapshot_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1795,9 +1810,9 @@ public class VDI extends XenAPIObject { * @param value The snapshot time of this VDI. */ public void setSnapshotTime(Connection c, Date value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_snapshot_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1811,9 +1826,9 @@ public class VDI extends XenAPIObject { * @param value The pool whose metadata is contained by this VDI */ public void setMetadataOfPool(Connection c, Pool value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_metadata_of_pool"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1828,9 +1843,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task setNameLabelAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1845,9 +1860,9 @@ public class VDI extends XenAPIObject { * @param value The name lable for the VDI */ public void setNameLabel(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1862,9 +1877,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task setNameDescriptionAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1879,9 +1894,9 @@ public class VDI extends XenAPIObject { * @param value The name description for the VDI */ public void setNameDescription(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1896,9 +1911,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task setOnBootAsync(Connection c, Types.OnBoot value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.set_on_boot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1913,9 +1928,9 @@ public class VDI extends XenAPIObject { * @param value The value to set */ public void setOnBoot(Connection c, Types.OnBoot value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_on_boot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1930,9 +1945,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task setAllowCachingAsync(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.set_allow_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1947,9 +1962,9 @@ public class VDI extends XenAPIObject { * @param value The value to set */ public void setAllowCaching(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.set_allow_caching"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1963,9 +1978,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task openDatabaseAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.open_database"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -1980,15 +1995,15 @@ public class VDI extends XenAPIObject { * @return A session which can be used to query the database */ public Session openDatabase(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.open_database"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSession(result); + return Types.toSession(result); } /** @@ -1997,9 +2012,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task readDatabasePoolUuidAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.read_database_pool_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2014,15 +2029,15 @@ public class VDI extends XenAPIObject { * @return The cached pool UUID of the database on the VDI. */ public String readDatabasePoolUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.read_database_pool_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -2033,9 +2048,9 @@ public class VDI extends XenAPIObject { * @return Task */ public Task poolMigrateAsync(Connection c, SR sr, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VDI.pool_migrate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(options)}; @@ -2052,15 +2067,15 @@ public class VDI extends XenAPIObject { * @return The new reference of the migrated VDI. */ public VDI poolMigrate(Connection c, SR sr, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.pool_migrate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -2069,15 +2084,15 @@ public class VDI extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVDI(result); + return Types.toSetOfVDI(result); } /** @@ -2086,15 +2101,15 @@ public class VDI extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VDI.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVDIVDIRecord(result); + return Types.toMapOfVDIVDIRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java b/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java index 075ab54757c..19c88fd4561 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VGPU.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VGPU extends XenAPIObject { * For internal use only. */ VGPU(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VGPU extends XenAPIObject { { if (obj != null && obj instanceof VGPU) { - VGPU other = (VGPU) obj; + VGPU other = (VGPU)obj; return other.ref.equals(this.ref); } else { @@ -112,8 +111,8 @@ public class VGPU extends XenAPIObject { /** * Convert a VGPU.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("VM", this.VM == null ? new VM("OpaqueRef:NULL") : this.VM); map.put("GPU_group", this.GPUGroup == null ? new GPUGroup("OpaqueRef:NULL") : this.GPUGroup); @@ -155,15 +154,15 @@ public class VGPU extends XenAPIObject { * @return all fields from the object */ public VGPU.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVGPURecord(result); + return Types.toVGPURecord(result); } /** @@ -173,15 +172,15 @@ public class VGPU extends XenAPIObject { * @return reference to the object */ public static VGPU getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVGPU(result); + return Types.toVGPU(result); } /** @@ -190,15 +189,15 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -207,15 +206,15 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -224,15 +223,15 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public GPUGroup getGPUGroup(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_GPU_group"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toGPUGroup(result); + return Types.toGPUGroup(result); } /** @@ -241,15 +240,15 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public String getDevice(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_device"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -258,15 +257,15 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public Boolean getCurrentlyAttached(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_currently_attached"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -275,15 +274,15 @@ public class VGPU extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -292,9 +291,9 @@ public class VGPU extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -309,9 +308,9 @@ public class VGPU extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -325,9 +324,9 @@ public class VGPU extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -345,12 +344,13 @@ public class VGPU extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VM VM, GPUGroup GPUGroup, String device, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VGPU.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(otherConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device), + Marshalling.toXMLRPC(otherConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -366,15 +366,16 @@ public class VGPU extends XenAPIObject { * @return reference to the newly created object */ public static VGPU create(Connection c, VM VM, GPUGroup GPUGroup, String device, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.create"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device), Marshalling.toXMLRPC(otherConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(VM), Marshalling.toXMLRPC(GPUGroup), Marshalling.toXMLRPC(device), + Marshalling.toXMLRPC(otherConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVGPU(result); + return Types.toVGPU(result); } /** @@ -383,9 +384,9 @@ public class VGPU extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VGPU.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -399,9 +400,9 @@ public class VGPU extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -415,15 +416,15 @@ public class VGPU extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVGPU(result); + return Types.toSetOfVGPU(result); } /** @@ -432,15 +433,15 @@ public class VGPU extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VGPU.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVGPUVGPURecord(result); + return Types.toMapOfVGPUVGPURecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VIF.java b/deps/XenServerJava/src/com/xensource/xenapi/VIF.java index c1d25b445ac..8302800686d 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VIF.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VIF.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VIF extends XenAPIObject { * For internal use only. */ VIF(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VIF extends XenAPIObject { { if (obj != null && obj instanceof VIF) { - VIF other = (VIF) obj; + VIF other = (VIF)obj; return other.ref.equals(this.ref); } else { @@ -127,8 +126,8 @@ public class VIF extends XenAPIObject { /** * Convert a VIF.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("allowed_operations", this.allowedOperations == null ? new LinkedHashSet() : this.allowedOperations); map.put("current_operations", this.currentOperations == null ? new HashMap() : this.currentOperations); @@ -245,15 +244,15 @@ public class VIF extends XenAPIObject { * @return all fields from the object */ public VIF.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIFRecord(result); + return Types.toVIFRecord(result); } /** @@ -263,15 +262,15 @@ public class VIF extends XenAPIObject { * @return reference to the object */ public static VIF getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIF(result); + return Types.toVIF(result); } /** @@ -281,9 +280,9 @@ public class VIF extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VIF.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -300,16 +299,16 @@ public class VIF extends XenAPIObject { * @return reference to the newly created object */ public static VIF create(Connection c, VIF.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIF(result); + return Types.toVIF(result); } /** @@ -318,9 +317,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -334,9 +333,9 @@ public class VIF extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -350,15 +349,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -367,15 +366,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVifOperations(result); + return Types.toSetOfVifOperations(result); } /** @@ -384,15 +383,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringVifOperations(result); + return Types.toMapOfStringVifOperations(result); } /** @@ -401,15 +400,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public String getDevice(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_device"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -418,15 +417,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Network getNetwork(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_network"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toNetwork(result); + return Types.toNetwork(result); } /** @@ -435,15 +434,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -452,15 +451,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public String getMAC(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_MAC"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -469,15 +468,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Long getMTU(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_MTU"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -486,15 +485,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -503,15 +502,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Boolean getCurrentlyAttached(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_currently_attached"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -520,15 +519,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Long getStatusCode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_status_code"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -537,15 +536,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public String getStatusDetail(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_status_detail"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -554,15 +553,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Map getRuntimeProperties(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_runtime_properties"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -571,15 +570,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public String getQosAlgorithmType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_qos_algorithm_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -588,15 +587,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Map getQosAlgorithmParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -605,15 +604,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Set getQosSupportedAlgorithms(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_qos_supported_algorithms"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -622,15 +621,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public VIFMetrics getMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIFMetrics(result); + return Types.toVIFMetrics(result); } /** @@ -639,15 +638,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Boolean getMACAutogenerated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_MAC_autogenerated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -656,15 +655,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Types.VifLockingMode getLockingMode(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVifLockingMode(result); + return Types.toVifLockingMode(result); } /** @@ -673,15 +672,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Set getIpv4Allowed(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -690,15 +689,15 @@ public class VIF extends XenAPIObject { * @return value of the field */ public Set getIpv6Allowed(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -707,9 +706,9 @@ public class VIF extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -724,9 +723,9 @@ public class VIF extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -740,9 +739,9 @@ public class VIF extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -756,9 +755,9 @@ public class VIF extends XenAPIObject { * @param algorithmType New value to set */ public void setQosAlgorithmType(Connection c, String algorithmType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_qos_algorithm_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(algorithmType)}; @@ -772,9 +771,9 @@ public class VIF extends XenAPIObject { * @param algorithmParams New value to set */ public void setQosAlgorithmParams(Connection c, Map algorithmParams) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(algorithmParams)}; @@ -789,9 +788,9 @@ public class VIF extends XenAPIObject { * @param value Value to add */ public void addToQosAlgorithmParams(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.add_to_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -805,9 +804,9 @@ public class VIF extends XenAPIObject { * @param key Key to remove */ public void removeFromQosAlgorithmParams(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.remove_from_qos_algorithm_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -821,9 +820,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task plugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -837,9 +836,9 @@ public class VIF extends XenAPIObject { * */ public void plug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.plug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -853,9 +852,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task unplugAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -869,9 +868,9 @@ public class VIF extends XenAPIObject { * */ public void unplug(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.unplug"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -885,9 +884,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task unplugForceAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.unplug_force"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -901,9 +900,9 @@ public class VIF extends XenAPIObject { * */ public void unplugForce(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.unplug_force"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -918,9 +917,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task setLockingModeAsync(Connection c, Types.VifLockingMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.set_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -935,9 +934,9 @@ public class VIF extends XenAPIObject { * @param value The new locking mode for the VIF */ public void setLockingMode(Connection c, Types.VifLockingMode value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_locking_mode"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -952,9 +951,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task setIpv4AllowedAsync(Connection c, Set value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.set_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -969,9 +968,9 @@ public class VIF extends XenAPIObject { * @param value The IP addresses which will be associated with the VIF */ public void setIpv4Allowed(Connection c, Set value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -986,9 +985,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task addIpv4AllowedAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.add_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1003,9 +1002,9 @@ public class VIF extends XenAPIObject { * @param value The IP address which will be associated with the VIF */ public void addIpv4Allowed(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.add_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1020,9 +1019,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task removeIpv4AllowedAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.remove_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1037,9 +1036,9 @@ public class VIF extends XenAPIObject { * @param value The IP address which will be removed from the VIF */ public void removeIpv4Allowed(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.remove_ipv4_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1054,9 +1053,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task setIpv6AllowedAsync(Connection c, Set value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.set_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1071,9 +1070,9 @@ public class VIF extends XenAPIObject { * @param value The IP addresses which will be associated with the VIF */ public void setIpv6Allowed(Connection c, Set value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.set_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1088,9 +1087,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task addIpv6AllowedAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.add_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1105,9 +1104,9 @@ public class VIF extends XenAPIObject { * @param value The IP address which will be associated with the VIF */ public void addIpv6Allowed(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.add_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1122,9 +1121,9 @@ public class VIF extends XenAPIObject { * @return Task */ public Task removeIpv6AllowedAsync(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VIF.remove_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1139,9 +1138,9 @@ public class VIF extends XenAPIObject { * @param value The IP address which will be removed from the VIF */ public void removeIpv6Allowed(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.remove_ipv6_allowed"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1155,15 +1154,15 @@ public class VIF extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVIF(result); + return Types.toSetOfVIF(result); } /** @@ -1172,15 +1171,15 @@ public class VIF extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVIFVIFRecord(result); + return Types.toMapOfVIFVIFRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java index ed7504c17b1..0c17217956d 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VIFMetrics.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VIFMetrics extends XenAPIObject { * For internal use only. */ VIFMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VIFMetrics extends XenAPIObject { { if (obj != null && obj instanceof VIFMetrics) { - VIFMetrics other = (VIFMetrics) obj; + VIFMetrics other = (VIFMetrics)obj; return other.ref.equals(this.ref); } else { @@ -111,8 +110,8 @@ public class VIFMetrics extends XenAPIObject { /** * Convert a VIF_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("io_read_kbs", this.ioReadKbs == null ? 0.0 : this.ioReadKbs); map.put("io_write_kbs", this.ioWriteKbs == null ? 0.0 : this.ioWriteKbs); @@ -149,15 +148,15 @@ public class VIFMetrics extends XenAPIObject { * @return all fields from the object */ public VIFMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIFMetricsRecord(result); + return Types.toVIFMetricsRecord(result); } /** @@ -167,15 +166,15 @@ public class VIFMetrics extends XenAPIObject { * @return reference to the object */ public static VIFMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVIFMetrics(result); + return Types.toVIFMetrics(result); } /** @@ -184,15 +183,15 @@ public class VIFMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -201,15 +200,15 @@ public class VIFMetrics extends XenAPIObject { * @return value of the field */ public Double getIoReadKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_io_read_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -218,15 +217,15 @@ public class VIFMetrics extends XenAPIObject { * @return value of the field */ public Double getIoWriteKbs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_io_write_kbs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -235,15 +234,15 @@ public class VIFMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -252,15 +251,15 @@ public class VIFMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -269,9 +268,9 @@ public class VIFMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -286,9 +285,9 @@ public class VIFMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -302,9 +301,9 @@ public class VIFMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -318,15 +317,15 @@ public class VIFMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVIFMetrics(result); + return Types.toSetOfVIFMetrics(result); } /** @@ -335,15 +334,15 @@ public class VIFMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VIF_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVIFMetricsVIFMetricsRecord(result); + return Types.toMapOfVIFMetricsVIFMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VLAN.java b/deps/XenServerJava/src/com/xensource/xenapi/VLAN.java index 232640527ac..9bea0399a45 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VLAN.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VLAN.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VLAN extends XenAPIObject { * For internal use only. */ VLAN(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VLAN extends XenAPIObject { { if (obj != null && obj instanceof VLAN) { - VLAN other = (VLAN) obj; + VLAN other = (VLAN)obj; return other.ref.equals(this.ref); } else { @@ -111,8 +110,8 @@ public class VLAN extends XenAPIObject { /** * Convert a VLAN.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("tagged_PIF", this.taggedPIF == null ? new PIF("OpaqueRef:NULL") : this.taggedPIF); map.put("untagged_PIF", this.untaggedPIF == null ? new PIF("OpaqueRef:NULL") : this.untaggedPIF); @@ -149,15 +148,15 @@ public class VLAN extends XenAPIObject { * @return all fields from the object */ public VLAN.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVLANRecord(result); + return Types.toVLANRecord(result); } /** @@ -167,15 +166,15 @@ public class VLAN extends XenAPIObject { * @return reference to the object */ public static VLAN getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVLAN(result); + return Types.toVLAN(result); } /** @@ -184,15 +183,15 @@ public class VLAN extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -201,15 +200,15 @@ public class VLAN extends XenAPIObject { * @return value of the field */ public PIF getTaggedPIF(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_tagged_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -218,15 +217,15 @@ public class VLAN extends XenAPIObject { * @return value of the field */ public PIF getUntaggedPIF(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_untagged_PIF"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toPIF(result); + return Types.toPIF(result); } /** @@ -235,15 +234,15 @@ public class VLAN extends XenAPIObject { * @return value of the field */ public Long getTag(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_tag"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -252,15 +251,15 @@ public class VLAN extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -269,9 +268,9 @@ public class VLAN extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -286,9 +285,9 @@ public class VLAN extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -302,9 +301,9 @@ public class VLAN extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -321,9 +320,9 @@ public class VLAN extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, PIF taggedPIF, Long tag, Network network) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VLAN.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(taggedPIF), Marshalling.toXMLRPC(tag), Marshalling.toXMLRPC(network)}; @@ -341,15 +340,15 @@ public class VLAN extends XenAPIObject { * @return The reference of the created VLAN object */ public static VLAN create(Connection c, PIF taggedPIF, Long tag, Network network) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.create"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(taggedPIF), Marshalling.toXMLRPC(tag), Marshalling.toXMLRPC(network)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVLAN(result); + return Types.toVLAN(result); } /** @@ -358,9 +357,9 @@ public class VLAN extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VLAN.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -374,9 +373,9 @@ public class VLAN extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -390,15 +389,15 @@ public class VLAN extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVLAN(result); + return Types.toSetOfVLAN(result); } /** @@ -407,15 +406,15 @@ public class VLAN extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VLAN.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVLANVLANRecord(result); + return Types.toMapOfVLANVLANRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VM.java b/deps/XenServerJava/src/com/xensource/xenapi/VM.java index 736026654d7..cfa5e6c97c7 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VM.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VM.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VM extends XenAPIObject { * For internal use only. */ VM(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VM extends XenAPIObject { { if (obj != null && obj instanceof VM) { - VM other = (VM) obj; + VM other = (VM)obj; return other.ref.equals(this.ref); } else { @@ -180,8 +179,8 @@ public class VM extends XenAPIObject { /** * Convert a VM.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("allowed_operations", this.allowedOperations == null ? new LinkedHashSet() : this.allowedOperations); map.put("current_operations", this.currentOperations == null ? new HashMap() : this.currentOperations); @@ -563,15 +562,15 @@ public class VM extends XenAPIObject { * @return all fields from the object */ public VM.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMRecord(result); + return Types.toVMRecord(result); } /** @@ -581,15 +580,15 @@ public class VM extends XenAPIObject { * @return reference to the object */ public static VM getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -599,9 +598,9 @@ public class VM extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VM.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -618,16 +617,16 @@ public class VM extends XenAPIObject { * @return reference to the newly created object */ public static VM create(Connection c, VM.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -636,9 +635,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -652,9 +651,9 @@ public class VM extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -669,15 +668,15 @@ public class VM extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -686,15 +685,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -703,15 +702,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVmOperations(result); + return Types.toSetOfVmOperations(result); } /** @@ -720,15 +719,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringVmOperations(result); + return Types.toMapOfStringVmOperations(result); } /** @@ -737,15 +736,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Types.VmPowerState getPowerState(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_power_state"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVmPowerState(result); + return Types.toVmPowerState(result); } /** @@ -754,15 +753,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -771,15 +770,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -788,15 +787,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getUserVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_user_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -805,15 +804,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Boolean getIsATemplate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_is_a_template"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -822,15 +821,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VDI getSuspendVDI(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_suspend_VDI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVDI(result); + return Types.toVDI(result); } /** @@ -839,15 +838,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Host getResidentOn(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_resident_on"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -856,15 +855,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Host getAffinity(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_affinity"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toHost(result); + return Types.toHost(result); } /** @@ -873,15 +872,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getMemoryOverhead(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -890,16 +889,17 @@ public class VM extends XenAPIObject { * * @return value of the field */ - @Deprecated public Long getMemoryTarget(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Long getMemoryTarget(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_target"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -908,15 +908,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getMemoryStaticMax(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_static_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -925,15 +925,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getMemoryDynamicMax(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_dynamic_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -942,15 +942,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getMemoryDynamicMin(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_dynamic_min"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -959,15 +959,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getMemoryStaticMin(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_memory_static_min"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -976,15 +976,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getVCPUsParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VCPUs_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -993,15 +993,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getVCPUsMax(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VCPUs_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1010,15 +1010,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getVCPUsAtStartup(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VCPUs_at_startup"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1027,15 +1027,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Types.OnNormalExit getActionsAfterShutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_actions_after_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toOnNormalExit(result); + return Types.toOnNormalExit(result); } /** @@ -1044,15 +1044,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Types.OnNormalExit getActionsAfterReboot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_actions_after_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toOnNormalExit(result); + return Types.toOnNormalExit(result); } /** @@ -1061,15 +1061,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Types.OnCrashBehaviour getActionsAfterCrash(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_actions_after_crash"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toOnCrashBehaviour(result); + return Types.toOnCrashBehaviour(result); } /** @@ -1078,15 +1078,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getConsoles(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_consoles"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfConsole(result); + return Types.toSetOfConsole(result); } /** @@ -1095,15 +1095,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getVIFs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VIFs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVIF(result); + return Types.toSetOfVIF(result); } /** @@ -1112,15 +1112,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getVBDs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VBDs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVBD(result); + return Types.toSetOfVBD(result); } /** @@ -1129,15 +1129,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getCrashDumps(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_crash_dumps"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfCrashdump(result); + return Types.toSetOfCrashdump(result); } /** @@ -1146,15 +1146,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getVTPMs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VTPMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVTPM(result); + return Types.toSetOfVTPM(result); } /** @@ -1163,15 +1163,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVBootloader(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_bootloader"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1180,15 +1180,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVKernel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_kernel"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1197,15 +1197,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVRamdisk(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_ramdisk"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1214,15 +1214,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVArgs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1231,15 +1231,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVBootloaderArgs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_bootloader_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1248,15 +1248,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getPVLegacyArgs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PV_legacy_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1265,15 +1265,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getHVMBootPolicy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_HVM_boot_policy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1282,15 +1282,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getHVMBootParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_HVM_boot_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1299,15 +1299,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Double getHVMShadowMultiplier(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_HVM_shadow_multiplier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -1316,15 +1316,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getPlatform(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_platform"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1333,16 +1333,17 @@ public class VM extends XenAPIObject { * * @return value of the field */ - @Deprecated public String getPCIBus(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public String getPCIBus(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_PCI_bus"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1351,15 +1352,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1368,15 +1369,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getDomid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_domid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1385,15 +1386,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getDomarch(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_domarch"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1402,15 +1403,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getLastBootCPUFlags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_last_boot_CPU_flags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1419,15 +1420,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Boolean getIsControlDomain(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_is_control_domain"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -1436,15 +1437,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VMMetrics getMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMMetrics(result); + return Types.toVMMetrics(result); } /** @@ -1453,15 +1454,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VMGuestMetrics getGuestMetrics(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_guest_metrics"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMGuestMetrics(result); + return Types.toVMGuestMetrics(result); } /** @@ -1470,15 +1471,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getLastBootedRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_last_booted_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1487,15 +1488,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getRecommendations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1504,15 +1505,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getXenstoreData(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1521,16 +1522,17 @@ public class VM extends XenAPIObject { * * @return value of the field */ - @Deprecated public Boolean getHaAlwaysRun(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Boolean getHaAlwaysRun(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_ha_always_run"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -1539,15 +1541,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getHaRestartPriority(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_ha_restart_priority"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1556,15 +1558,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Boolean getIsASnapshot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_is_a_snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -1573,15 +1575,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VM getSnapshotOf(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_snapshot_of"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -1590,15 +1592,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getSnapshots(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_snapshots"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -1607,15 +1609,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Date getSnapshotTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_snapshot_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -1624,15 +1626,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getTransportableSnapshotId(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_transportable_snapshot_id"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1641,15 +1643,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getBlobs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_blobs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringBlob(result); + return Types.toMapOfStringBlob(result); } /** @@ -1658,15 +1660,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getTags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -1675,15 +1677,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getBlockedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_blocked_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVmOperationsString(result); + return Types.toMapOfVmOperationsString(result); } /** @@ -1692,15 +1694,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getSnapshotInfo(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_snapshot_info"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1709,15 +1711,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public String getSnapshotMetadata(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_snapshot_metadata"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -1726,15 +1728,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VM getParent(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_parent"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -1743,15 +1745,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getChildren(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_children"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -1760,15 +1762,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Map getBiosStrings(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_bios_strings"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -1777,15 +1779,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VMPP getProtectionPolicy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_protection_policy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMPP(result); + return Types.toVMPP(result); } /** @@ -1794,15 +1796,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Boolean getIsSnapshotFromVmpp(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_is_snapshot_from_vmpp"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -1811,15 +1813,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public VMAppliance getAppliance(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_appliance"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMAppliance(result); + return Types.toVMAppliance(result); } /** @@ -1828,15 +1830,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getStartDelay(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_start_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1845,15 +1847,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getShutdownDelay(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_shutdown_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1862,15 +1864,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getOrder(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_order"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1879,15 +1881,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getVGPUs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_VGPUs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVGPU(result); + return Types.toSetOfVGPU(result); } /** @@ -1896,15 +1898,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Set getAttachedPCIs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_attached_PCIs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfPCI(result); + return Types.toSetOfPCI(result); } /** @@ -1913,15 +1915,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public SR getSuspendSR(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_suspend_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSR(result); + return Types.toSR(result); } /** @@ -1930,15 +1932,15 @@ public class VM extends XenAPIObject { * @return value of the field */ public Long getVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -1947,9 +1949,9 @@ public class VM extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -1963,9 +1965,9 @@ public class VM extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -1979,9 +1981,9 @@ public class VM extends XenAPIObject { * @param userVersion New value to set */ public void setUserVersion(Connection c, Long userVersion) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_user_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(userVersion)}; @@ -1995,9 +1997,9 @@ public class VM extends XenAPIObject { * @param isATemplate New value to set */ public void setIsATemplate(Connection c, Boolean isATemplate) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_is_a_template"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(isATemplate)}; @@ -2011,9 +2013,9 @@ public class VM extends XenAPIObject { * @param affinity New value to set */ public void setAffinity(Connection c, Host affinity) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_affinity"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(affinity)}; @@ -2027,9 +2029,9 @@ public class VM extends XenAPIObject { * @param params New value to set */ public void setVCPUsParams(Connection c, Map params) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_VCPUs_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(params)}; @@ -2044,9 +2046,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToVCPUsParams(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_VCPUs_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2060,9 +2062,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromVCPUsParams(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_VCPUs_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2076,9 +2078,9 @@ public class VM extends XenAPIObject { * @param afterShutdown New value to set */ public void setActionsAfterShutdown(Connection c, Types.OnNormalExit afterShutdown) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_actions_after_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(afterShutdown)}; @@ -2092,9 +2094,9 @@ public class VM extends XenAPIObject { * @param afterReboot New value to set */ public void setActionsAfterReboot(Connection c, Types.OnNormalExit afterReboot) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_actions_after_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(afterReboot)}; @@ -2108,9 +2110,9 @@ public class VM extends XenAPIObject { * @param afterCrash New value to set */ public void setActionsAfterCrash(Connection c, Types.OnCrashBehaviour afterCrash) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_actions_after_crash"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(afterCrash)}; @@ -2124,9 +2126,9 @@ public class VM extends XenAPIObject { * @param bootloader New value to set */ public void setPVBootloader(Connection c, String bootloader) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_bootloader"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(bootloader)}; @@ -2140,9 +2142,9 @@ public class VM extends XenAPIObject { * @param kernel New value to set */ public void setPVKernel(Connection c, String kernel) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_kernel"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(kernel)}; @@ -2156,9 +2158,9 @@ public class VM extends XenAPIObject { * @param ramdisk New value to set */ public void setPVRamdisk(Connection c, String ramdisk) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_ramdisk"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(ramdisk)}; @@ -2172,9 +2174,9 @@ public class VM extends XenAPIObject { * @param args New value to set */ public void setPVArgs(Connection c, String args) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(args)}; @@ -2188,9 +2190,9 @@ public class VM extends XenAPIObject { * @param bootloaderArgs New value to set */ public void setPVBootloaderArgs(Connection c, String bootloaderArgs) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_bootloader_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(bootloaderArgs)}; @@ -2204,9 +2206,9 @@ public class VM extends XenAPIObject { * @param legacyArgs New value to set */ public void setPVLegacyArgs(Connection c, String legacyArgs) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PV_legacy_args"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(legacyArgs)}; @@ -2220,9 +2222,9 @@ public class VM extends XenAPIObject { * @param bootPolicy New value to set */ public void setHVMBootPolicy(Connection c, String bootPolicy) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_HVM_boot_policy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(bootPolicy)}; @@ -2236,9 +2238,9 @@ public class VM extends XenAPIObject { * @param bootParams New value to set */ public void setHVMBootParams(Connection c, Map bootParams) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_HVM_boot_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(bootParams)}; @@ -2253,9 +2255,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToHVMBootParams(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_HVM_boot_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2269,9 +2271,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromHVMBootParams(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_HVM_boot_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2285,9 +2287,9 @@ public class VM extends XenAPIObject { * @param platform New value to set */ public void setPlatform(Connection c, Map platform) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_platform"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(platform)}; @@ -2302,9 +2304,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToPlatform(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_platform"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2318,9 +2320,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromPlatform(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_platform"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2334,10 +2336,11 @@ public class VM extends XenAPIObject { * * @param PCIBus New value to set */ - @Deprecated public void setPCIBus(Connection c, String PCIBus) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public void setPCIBus(Connection c, String PCIBus) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_PCI_bus"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(PCIBus)}; @@ -2351,9 +2354,9 @@ public class VM extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -2368,9 +2371,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2384,9 +2387,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2400,9 +2403,9 @@ public class VM extends XenAPIObject { * @param recommendations New value to set */ public void setRecommendations(Connection c, String recommendations) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(recommendations)}; @@ -2416,9 +2419,9 @@ public class VM extends XenAPIObject { * @param xenstoreData New value to set */ public void setXenstoreData(Connection c, Map xenstoreData) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(xenstoreData)}; @@ -2433,9 +2436,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToXenstoreData(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2449,9 +2452,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromXenstoreData(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_xenstore_data"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2465,9 +2468,9 @@ public class VM extends XenAPIObject { * @param tags New value to set */ public void setTags(Connection c, Set tags) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(tags)}; @@ -2481,9 +2484,9 @@ public class VM extends XenAPIObject { * @param value New value to add */ public void addTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -2497,9 +2500,9 @@ public class VM extends XenAPIObject { * @param value Value to remove */ public void removeTags(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_tags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -2513,9 +2516,9 @@ public class VM extends XenAPIObject { * @param blockedOperations New value to set */ public void setBlockedOperations(Connection c, Map blockedOperations) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_blocked_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(blockedOperations)}; @@ -2530,9 +2533,9 @@ public class VM extends XenAPIObject { * @param value Value to add */ public void addToBlockedOperations(Connection c, Types.VmOperations key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_blocked_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -2546,9 +2549,9 @@ public class VM extends XenAPIObject { * @param key Key to remove */ public void removeFromBlockedOperations(Connection c, Types.VmOperations key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.remove_from_blocked_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -2562,9 +2565,9 @@ public class VM extends XenAPIObject { * @param suspendSR New value to set */ public void setSuspendSR(Connection c, SR suspendSR) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_suspend_SR"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(suspendSR)}; @@ -2579,12 +2582,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task snapshotAsync(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "Async.VM.snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; @@ -2600,18 +2603,18 @@ public class VM extends XenAPIObject { * @return The reference of the newly created VM. */ public VM snapshot(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "VM.snapshot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -2621,16 +2624,16 @@ public class VM extends XenAPIObject { * @return Task */ public Task snapshotWithQuiesceAsync(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed, - Types.VmSnapshotWithQuiesceFailed, - Types.VmSnapshotWithQuiesceTimeout, - Types.VmSnapshotWithQuiescePluginDeosNotRespond, - Types.VmSnapshotWithQuiesceNotSupported { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed, + Types.VmSnapshotWithQuiesceFailed, + Types.VmSnapshotWithQuiesceTimeout, + Types.VmSnapshotWithQuiescePluginDeosNotRespond, + Types.VmSnapshotWithQuiesceNotSupported { String method_call = "Async.VM.snapshot_with_quiesce"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; @@ -2646,22 +2649,22 @@ public class VM extends XenAPIObject { * @return The reference of the newly created VM. */ public VM snapshotWithQuiesce(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed, - Types.VmSnapshotWithQuiesceFailed, - Types.VmSnapshotWithQuiesceTimeout, - Types.VmSnapshotWithQuiescePluginDeosNotRespond, - Types.VmSnapshotWithQuiesceNotSupported { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed, + Types.VmSnapshotWithQuiesceFailed, + Types.VmSnapshotWithQuiesceTimeout, + Types.VmSnapshotWithQuiescePluginDeosNotRespond, + Types.VmSnapshotWithQuiesceNotSupported { String method_call = "VM.snapshot_with_quiesce"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -2671,12 +2674,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task createCloneAsync(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "Async.VM.clone"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; @@ -2692,18 +2695,18 @@ public class VM extends XenAPIObject { * @return The reference of the newly created VM. */ public VM createClone(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "VM.clone"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -2714,12 +2717,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task copyAsync(Connection c, String newName, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "Async.VM.copy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName), Marshalling.toXMLRPC(sr)}; @@ -2736,18 +2739,18 @@ public class VM extends XenAPIObject { * @return The reference of the newly created VM. */ public VM copy(Connection c, String newName, SR sr) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "VM.copy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName), Marshalling.toXMLRPC(sr)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -2756,13 +2759,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task revertAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.SrFull, - Types.VmRevertFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.SrFull, + Types.VmRevertFailed { String method_call = "Async.VM.revert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2776,13 +2779,13 @@ public class VM extends XenAPIObject { * */ public void revert(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.SrFull, - Types.VmRevertFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.SrFull, + Types.VmRevertFailed { String method_call = "VM.revert"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2797,14 +2800,14 @@ public class VM extends XenAPIObject { * @return Task */ public Task checkpointAsync(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed, - Types.VmCheckpointSuspendFailed, - Types.VmCheckpointResumeFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed, + Types.VmCheckpointSuspendFailed, + Types.VmCheckpointResumeFailed { String method_call = "Async.VM.checkpoint"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; @@ -2820,20 +2823,20 @@ public class VM extends XenAPIObject { * @return The reference of the newly created VM. */ public VM checkpoint(Connection c, String newName) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed, - Types.VmCheckpointSuspendFailed, - Types.VmCheckpointResumeFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed, + Types.VmCheckpointSuspendFailed, + Types.VmCheckpointResumeFailed { String method_call = "VM.checkpoint"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(newName)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -2842,12 +2845,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task provisionAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "Async.VM.provision"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2861,12 +2864,12 @@ public class VM extends XenAPIObject { * */ public void provision(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.SrFull, - Types.OperationNotAllowed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.SrFull, + Types.OperationNotAllowed { String method_call = "VM.provision"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -2882,18 +2885,18 @@ public class VM extends XenAPIObject { * @return Task */ public Task startAsync(Connection c, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.VmHvmRequired, - Types.VmIsTemplate, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.BootloaderFailed, - Types.UnknownBootloader, - Types.NoHostsAvailable, - Types.LicenceRestriction { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.VmHvmRequired, + Types.VmIsTemplate, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.BootloaderFailed, + Types.UnknownBootloader, + Types.NoHostsAvailable, + Types.LicenceRestriction { String method_call = "Async.VM.start"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; @@ -2909,18 +2912,18 @@ public class VM extends XenAPIObject { * @param force Attempt to force the VM to start. If this flag is false then the VM may fail pre-boot safety checks (e.g. if the CPU the VM last booted on looks substantially different to the current one) */ public void start(Connection c, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.VmHvmRequired, - Types.VmIsTemplate, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.BootloaderFailed, - Types.UnknownBootloader, - Types.NoHostsAvailable, - Types.LicenceRestriction { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.VmHvmRequired, + Types.VmIsTemplate, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.BootloaderFailed, + Types.UnknownBootloader, + Types.NoHostsAvailable, + Types.LicenceRestriction { String method_call = "VM.start"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; @@ -2937,18 +2940,19 @@ public class VM extends XenAPIObject { * @return Task */ public Task startOnAsync(Connection c, Host host, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.VmIsTemplate, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.BootloaderFailed, - Types.UnknownBootloader { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.VmIsTemplate, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.BootloaderFailed, + Types.UnknownBootloader { String method_call = "Async.VM.start_on"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), + Marshalling.toXMLRPC(force)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -2962,18 +2966,19 @@ public class VM extends XenAPIObject { * @param force Attempt to force the VM to start. If this flag is false then the VM may fail pre-boot safety checks (e.g. if the CPU the VM last booted on looks substantially different to the current one) */ public void startOn(Connection c, Host host, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.VmIsTemplate, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.BootloaderFailed, - Types.UnknownBootloader { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.VmIsTemplate, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.BootloaderFailed, + Types.UnknownBootloader { String method_call = "VM.start_on"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), + Marshalling.toXMLRPC(force)}; Map response = c.dispatch(method_call, method_params); return; } @@ -2984,13 +2989,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task pauseAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.pause"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3004,13 +3009,13 @@ public class VM extends XenAPIObject { * */ public void pause(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.pause"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3024,12 +3029,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task unpauseAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.unpause"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3043,12 +3048,12 @@ public class VM extends XenAPIObject { * */ public void unpause(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.unpause"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3062,13 +3067,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task cleanShutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.clean_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3082,13 +3087,13 @@ public class VM extends XenAPIObject { * */ public void cleanShutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.clean_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3102,13 +3107,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task cleanRebootAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.clean_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3122,13 +3127,13 @@ public class VM extends XenAPIObject { * */ public void cleanReboot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.clean_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3142,13 +3147,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task hardShutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.hard_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3162,13 +3167,13 @@ public class VM extends XenAPIObject { * */ public void hardShutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.hard_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3182,9 +3187,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task powerStateResetAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.power_state_reset"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3198,9 +3203,9 @@ public class VM extends XenAPIObject { * */ public void powerStateReset(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.power_state_reset"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3214,13 +3219,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task hardRebootAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.hard_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3234,13 +3239,13 @@ public class VM extends XenAPIObject { * */ public void hardReboot(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.hard_reboot"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3254,13 +3259,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task suspendAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.suspend"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3274,13 +3279,13 @@ public class VM extends XenAPIObject { * */ public void suspend(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.suspend"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3296,12 +3301,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task resumeAsync(Connection c, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.resume"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; @@ -3317,12 +3322,12 @@ public class VM extends XenAPIObject { * @param force Attempt to force the VM to resume. If this flag is false then the VM may fail pre-resume safety checks (e.g. if the CPU the VM was running on looks substantially different to the current one) */ public void resume(Connection c, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.resume"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; @@ -3339,15 +3344,16 @@ public class VM extends XenAPIObject { * @return Task */ public Task resumeOnAsync(Connection c, Host host, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "Async.VM.resume_on"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), + Marshalling.toXMLRPC(force)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -3361,15 +3367,16 @@ public class VM extends XenAPIObject { * @param force Attempt to force the VM to resume. If this flag is false then the VM may fail pre-resume safety checks (e.g. if the CPU the VM was running on looks substantially different to the current one) */ public void resumeOn(Connection c, Host host, Boolean startPaused, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OperationNotAllowed, - Types.VmIsTemplate { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OperationNotAllowed, + Types.VmIsTemplate { String method_call = "VM.resume_on"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), Marshalling.toXMLRPC(force)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(startPaused), + Marshalling.toXMLRPC(force)}; Map response = c.dispatch(method_call, method_params); return; } @@ -3382,15 +3389,15 @@ public class VM extends XenAPIObject { * @return Task */ public Task poolMigrateAsync(Connection c, Host host, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.VmIsTemplate, - Types.OperationNotAllowed, - Types.VmMigrateFailed, - Types.VmMissingPvDrivers { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.VmIsTemplate, + Types.OperationNotAllowed, + Types.VmMigrateFailed, + Types.VmMissingPvDrivers { String method_call = "Async.VM.pool_migrate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(options)}; @@ -3406,15 +3413,15 @@ public class VM extends XenAPIObject { * @param options Extra configuration operations */ public void poolMigrate(Connection c, Host host, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState, - Types.OtherOperationInProgress, - Types.VmIsTemplate, - Types.OperationNotAllowed, - Types.VmMigrateFailed, - Types.VmMissingPvDrivers { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState, + Types.OtherOperationInProgress, + Types.VmIsTemplate, + Types.OperationNotAllowed, + Types.VmMigrateFailed, + Types.VmMissingPvDrivers { String method_call = "VM.pool_migrate"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host), Marshalling.toXMLRPC(options)}; @@ -3429,9 +3436,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setVCPUsNumberLiveAsync(Connection c, Long nvcpu) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_VCPUs_number_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(nvcpu)}; @@ -3446,9 +3453,9 @@ public class VM extends XenAPIObject { * @param nvcpu The number of VCPUs */ public void setVCPUsNumberLive(Connection c, Long nvcpu) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_VCPUs_number_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(nvcpu)}; @@ -3464,9 +3471,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task addToVCPUsParamsLiveAsync(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.add_to_VCPUs_params_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -3482,9 +3489,9 @@ public class VM extends XenAPIObject { * @param value The value */ public void addToVCPUsParamsLive(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.add_to_VCPUs_params_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -3498,9 +3505,9 @@ public class VM extends XenAPIObject { * @param value The value */ public void setHaRestartPriority(Connection c, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_ha_restart_priority"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3514,10 +3521,11 @@ public class VM extends XenAPIObject { * * @param value The value */ - @Deprecated public void setHaAlwaysRun(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public void setHaAlwaysRun(Connection c, Boolean value) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_ha_always_run"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3531,9 +3539,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task computeMemoryOverheadAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.compute_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3548,15 +3556,15 @@ public class VM extends XenAPIObject { * @return the virtualization memory overhead of the VM. */ public Long computeMemoryOverhead(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.compute_memory_overhead"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -3565,9 +3573,9 @@ public class VM extends XenAPIObject { * @param value The new value of memory_dynamic_max */ public void setMemoryDynamicMax(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_dynamic_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3581,9 +3589,9 @@ public class VM extends XenAPIObject { * @param value The new value of memory_dynamic_min */ public void setMemoryDynamicMin(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_dynamic_min"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3599,9 +3607,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setMemoryDynamicRangeAsync(Connection c, Long min, Long max) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_memory_dynamic_range"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(min), Marshalling.toXMLRPC(max)}; @@ -3617,9 +3625,9 @@ public class VM extends XenAPIObject { * @param max The new maximum value */ public void setMemoryDynamicRange(Connection c, Long min, Long max) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_dynamic_range"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(min), Marshalling.toXMLRPC(max)}; @@ -3633,10 +3641,10 @@ public class VM extends XenAPIObject { * @param value The new value of memory_static_max */ public void setMemoryStaticMax(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.HaOperationWouldBreakFailoverPlan { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.HaOperationWouldBreakFailoverPlan { String method_call = "VM.set_memory_static_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3650,9 +3658,9 @@ public class VM extends XenAPIObject { * @param value The new value of memory_static_min */ public void setMemoryStaticMin(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_static_min"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3668,9 +3676,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setMemoryStaticRangeAsync(Connection c, Long min, Long max) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_memory_static_range"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(min), Marshalling.toXMLRPC(max)}; @@ -3686,9 +3694,9 @@ public class VM extends XenAPIObject { * @param max The new maximum value */ public void setMemoryStaticRange(Connection c, Long min, Long max) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_static_range"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(min), Marshalling.toXMLRPC(max)}; @@ -3706,12 +3714,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task setMemoryLimitsAsync(Connection c, Long staticMin, Long staticMax, Long dynamicMin, Long dynamicMax) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_memory_limits"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(staticMin), Marshalling.toXMLRPC(staticMax), Marshalling.toXMLRPC(dynamicMin), Marshalling.toXMLRPC(dynamicMax)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(staticMin), Marshalling.toXMLRPC(staticMax), + Marshalling.toXMLRPC(dynamicMin), Marshalling.toXMLRPC(dynamicMax)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -3726,12 +3735,13 @@ public class VM extends XenAPIObject { * @param dynamicMax The new value of memory_dynamic_max. */ public void setMemoryLimits(Connection c, Long staticMin, Long staticMax, Long dynamicMin, Long dynamicMax) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_limits"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(staticMin), Marshalling.toXMLRPC(staticMax), Marshalling.toXMLRPC(dynamicMin), Marshalling.toXMLRPC(dynamicMax)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(staticMin), Marshalling.toXMLRPC(staticMax), + Marshalling.toXMLRPC(dynamicMin), Marshalling.toXMLRPC(dynamicMax)}; Map response = c.dispatch(method_call, method_params); return; } @@ -3743,10 +3753,11 @@ public class VM extends XenAPIObject { * @param target The target in bytes * @return Task */ - @Deprecated public Task setMemoryTargetLiveAsync(Connection c, Long target) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Task setMemoryTargetLiveAsync(Connection c, Long target) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_memory_target_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(target)}; @@ -3761,10 +3772,11 @@ public class VM extends XenAPIObject { * * @param target The target in bytes */ - @Deprecated public void setMemoryTargetLive(Connection c, Long target) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public void setMemoryTargetLive(Connection c, Long target) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_memory_target_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(target)}; @@ -3778,10 +3790,11 @@ public class VM extends XenAPIObject { * * @return Task */ - @Deprecated public Task waitMemoryTargetLiveAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Task waitMemoryTargetLiveAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.wait_memory_target_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3795,10 +3808,11 @@ public class VM extends XenAPIObject { * @deprecated * */ - @Deprecated public void waitMemoryTargetLive(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public void waitMemoryTargetLive(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.wait_memory_target_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3812,10 +3826,11 @@ public class VM extends XenAPIObject { * * @return Task */ - @Deprecated public Task getCooperativeAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Task getCooperativeAsync(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.get_cooperative"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -3830,16 +3845,17 @@ public class VM extends XenAPIObject { * * @return true if the VM is currently 'co-operative'; false otherwise */ - @Deprecated public Boolean getCooperative(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + @Deprecated + public Boolean getCooperative(Connection c) throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_cooperative"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -3848,9 +3864,9 @@ public class VM extends XenAPIObject { * @param value The new shadow memory multiplier to set */ public void setHVMShadowMultiplier(Connection c, Double value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_HVM_shadow_multiplier"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3865,9 +3881,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setShadowMultiplierLiveAsync(Connection c, Double multiplier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_shadow_multiplier_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(multiplier)}; @@ -3882,9 +3898,9 @@ public class VM extends XenAPIObject { * @param multiplier The new shadow memory multiplier to set */ public void setShadowMultiplierLive(Connection c, Double multiplier) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_shadow_multiplier_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(multiplier)}; @@ -3898,9 +3914,9 @@ public class VM extends XenAPIObject { * @param value The new maximum number of VCPUs */ public void setVCPUsMax(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_VCPUs_max"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3914,9 +3930,9 @@ public class VM extends XenAPIObject { * @param value The new maximum number of VCPUs */ public void setVCPUsAtStartup(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_VCPUs_at_startup"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -3931,10 +3947,10 @@ public class VM extends XenAPIObject { * @return Task */ public Task sendSysrqAsync(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "Async.VM.send_sysrq"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -3949,10 +3965,10 @@ public class VM extends XenAPIObject { * @param key The key to send */ public void sendSysrq(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "VM.send_sysrq"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -3967,10 +3983,10 @@ public class VM extends XenAPIObject { * @return Task */ public Task sendTriggerAsync(Connection c, String trigger) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "Async.VM.send_trigger"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(trigger)}; @@ -3985,10 +4001,10 @@ public class VM extends XenAPIObject { * @param trigger The trigger to send */ public void sendTrigger(Connection c, String trigger) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "VM.send_trigger"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(trigger)}; @@ -4004,9 +4020,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task maximiseMemoryAsync(Connection c, Long total, Boolean approximate) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.maximise_memory"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(total), Marshalling.toXMLRPC(approximate)}; @@ -4023,15 +4039,15 @@ public class VM extends XenAPIObject { * @return The maximum possible static-max */ public Long maximiseMemory(Connection c, Long total, Boolean approximate) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.maximise_memory"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(total), Marshalling.toXMLRPC(approximate)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -4045,13 +4061,14 @@ public class VM extends XenAPIObject { * @return Task */ public Task migrateSendAsync(Connection c, Map dest, Boolean live, Map vdiMap, Map vifMap, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "Async.VM.migrate_send"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), + Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -4067,13 +4084,14 @@ public class VM extends XenAPIObject { * @param options Other parameters */ public void migrateSend(Connection c, Map dest, Boolean live, Map vdiMap, Map vifMap, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmBadPowerState { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmBadPowerState { String method_call = "VM.migrate_send"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), + Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); return; } @@ -4088,13 +4106,15 @@ public class VM extends XenAPIObject { * @param options Other parameters * @return Task */ - public Task assertCanMigrateAsync(Connection c, Map dest, Boolean live, Map vdiMap, Map vifMap, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + public Task assertCanMigrateAsync(Connection c, Map dest, Boolean live, Map vdiMap, Map vifMap, Map options) + throws + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.assert_can_migrate"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), + Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -4110,12 +4130,13 @@ public class VM extends XenAPIObject { * @param options Other parameters */ public void assertCanMigrate(Connection c, Map dest, Boolean live, Map vdiMap, Map vifMap, Map options) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.assert_can_migrate"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dest), Marshalling.toXMLRPC(live), + Marshalling.toXMLRPC(vdiMap), Marshalling.toXMLRPC(vifMap), Marshalling.toXMLRPC(options)}; Map response = c.dispatch(method_call, method_params); return; } @@ -4126,15 +4147,15 @@ public class VM extends XenAPIObject { * @return A record describing the VM */ public VM.Record getBootRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_boot_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMRecord(result); + return Types.toVMRecord(result); } /** @@ -4143,15 +4164,15 @@ public class VM extends XenAPIObject { * @return A set of data sources */ public Set getDataSources(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_data_sources"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfDataSourceRecord(result); + return Types.toSetOfDataSourceRecord(result); } /** @@ -4160,9 +4181,9 @@ public class VM extends XenAPIObject { * @param dataSource The data source to record */ public void recordDataSource(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.record_data_source"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; @@ -4177,15 +4198,15 @@ public class VM extends XenAPIObject { * @return The latest value, averaged over the last 5 seconds */ public Double queryDataSource(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.query_data_source"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDouble(result); + return Types.toDouble(result); } /** @@ -4194,9 +4215,9 @@ public class VM extends XenAPIObject { * @param dataSource The data source whose archives are to be forgotten */ public void forgetDataSourceArchives(Connection c, String dataSource) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.forget_data_source_archives"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(dataSource)}; @@ -4211,9 +4232,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task assertOperationValidAsync(Connection c, Types.VmOperations op) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.assert_operation_valid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(op)}; @@ -4228,9 +4249,9 @@ public class VM extends XenAPIObject { * @param op proposed operation */ public void assertOperationValid(Connection c, Types.VmOperations op) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.assert_operation_valid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(op)}; @@ -4244,9 +4265,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task updateAllowedOperationsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.update_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4260,9 +4281,9 @@ public class VM extends XenAPIObject { * */ public void updateAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.update_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4276,15 +4297,15 @@ public class VM extends XenAPIObject { * @return The allowed values */ public Set getAllowedVBDDevices(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_allowed_VBD_devices"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -4293,15 +4314,15 @@ public class VM extends XenAPIObject { * @return The allowed values */ public Set getAllowedVIFDevices(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_allowed_VIF_devices"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -4310,9 +4331,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task getPossibleHostsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.get_possible_hosts"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4327,15 +4348,15 @@ public class VM extends XenAPIObject { * @return The possible hosts */ public Set getPossibleHosts(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_possible_hosts"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfHost(result); + return Types.toSetOfHost(result); } /** @@ -4345,12 +4366,12 @@ public class VM extends XenAPIObject { * @return Task */ public Task assertCanBootHereAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.HostNotEnoughFreeMemory, - Types.VmRequiresSr, - Types.VmHostIncompatibleVersion { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.HostNotEnoughFreeMemory, + Types.VmRequiresSr, + Types.VmHostIncompatibleVersion { String method_call = "Async.VM.assert_can_boot_here"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -4365,12 +4386,12 @@ public class VM extends XenAPIObject { * @param host The host */ public void assertCanBootHere(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.HostNotEnoughFreeMemory, - Types.VmRequiresSr, - Types.VmHostIncompatibleVersion { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.HostNotEnoughFreeMemory, + Types.VmRequiresSr, + Types.VmHostIncompatibleVersion { String method_call = "VM.assert_can_boot_here"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -4387,12 +4408,13 @@ public class VM extends XenAPIObject { * @return Task */ public Task createNewBlobAsync(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), + Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -4407,15 +4429,16 @@ public class VM extends XenAPIObject { * @return The reference of the blob, needed for populating its data */ public Blob createNewBlob(Connection c, String name, String mimeType, Boolean _public) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.create_new_blob"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), Marshalling.toXMLRPC(_public)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(name), Marshalling.toXMLRPC(mimeType), + Marshalling.toXMLRPC(_public)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBlob(result); + return Types.toBlob(result); } /** @@ -4424,9 +4447,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task assertAgileAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.assert_agile"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4440,9 +4463,9 @@ public class VM extends XenAPIObject { * */ public void assertAgile(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.assert_agile"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4456,9 +4479,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task retrieveWlbRecommendationsAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.retrieve_wlb_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4473,15 +4496,15 @@ public class VM extends XenAPIObject { * @return The potential hosts and their corresponding recommendations or errors */ public Map> retrieveWlbRecommendations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.retrieve_wlb_recommendations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfHostSetOfString(result); + return Types.toMapOfHostSetOfString(result); } /** @@ -4491,9 +4514,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task copyBiosStringsAsync(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.copy_bios_strings"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -4508,9 +4531,9 @@ public class VM extends XenAPIObject { * @param host The host to copy the BIOS strings from */ public void copyBiosStrings(Connection c, Host host) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.copy_bios_strings"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(host)}; @@ -4524,9 +4547,9 @@ public class VM extends XenAPIObject { * @param value The value */ public void setProtectionPolicy(Connection c, VMPP value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_protection_policy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4541,9 +4564,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setStartDelayAsync(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_start_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4558,9 +4581,9 @@ public class VM extends XenAPIObject { * @param value This VM's start delay in seconds */ public void setStartDelay(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_start_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4575,9 +4598,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setShutdownDelayAsync(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_shutdown_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4592,9 +4615,9 @@ public class VM extends XenAPIObject { * @param value This VM's shutdown delay in seconds */ public void setShutdownDelay(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_shutdown_delay"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4609,9 +4632,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setOrderAsync(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_order"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4626,9 +4649,9 @@ public class VM extends XenAPIObject { * @param value This VM's boot order */ public void setOrder(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_order"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4643,9 +4666,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setSuspendVDIAsync(Connection c, VDI value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_suspend_VDI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4660,9 +4683,9 @@ public class VM extends XenAPIObject { * @param value The suspend VDI uuid */ public void setSuspendVDI(Connection c, VDI value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_suspend_VDI"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4677,11 +4700,11 @@ public class VM extends XenAPIObject { * @return Task */ public Task assertCanBeRecoveredAsync(Connection c, Session sessionTo) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmIsPartOfAnAppliance, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmIsPartOfAnAppliance, + Types.VmRequiresSr { String method_call = "Async.VM.assert_can_be_recovered"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo)}; @@ -4696,11 +4719,11 @@ public class VM extends XenAPIObject { * @param sessionTo The session to which the VM is to be recovered. */ public void assertCanBeRecovered(Connection c, Session sessionTo) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmIsPartOfAnAppliance, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmIsPartOfAnAppliance, + Types.VmRequiresSr { String method_call = "VM.assert_can_be_recovered"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo)}; @@ -4716,9 +4739,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task recoverAsync(Connection c, Session sessionTo, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.recover"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo), Marshalling.toXMLRPC(force)}; @@ -4734,9 +4757,9 @@ public class VM extends XenAPIObject { * @param force Whether the VM should replace newer versions of itself. */ public void recover(Connection c, Session sessionTo, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.recover"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo), Marshalling.toXMLRPC(force)}; @@ -4755,12 +4778,13 @@ public class VM extends XenAPIObject { * @return Task */ public static Task importConvertAsync(Connection c, String type, String username, String password, SR sr, Map remoteConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.import_convert"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(remoteConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), + Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(remoteConfig)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); return Types.toTask(result); @@ -4776,12 +4800,13 @@ public class VM extends XenAPIObject { * @param remoteConfig Remote configuration options */ public static void importConvert(Connection c, String type, String username, String password, SR sr, Map remoteConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.import_convert"; String session = c.getSessionReference(); - Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(remoteConfig)}; + Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(type), Marshalling.toXMLRPC(username), Marshalling.toXMLRPC(password), + Marshalling.toXMLRPC(sr), Marshalling.toXMLRPC(remoteConfig)}; Map response = c.dispatch(method_call, method_params); return; } @@ -4793,9 +4818,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task setApplianceAsync(Connection c, VMAppliance value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.set_appliance"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4810,9 +4835,9 @@ public class VM extends XenAPIObject { * @param value The appliance to which this VM should be assigned. */ public void setAppliance(Connection c, VMAppliance value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.set_appliance"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -4826,9 +4851,9 @@ public class VM extends XenAPIObject { * @return Task */ public Task queryServicesAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM.query_services"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -4843,15 +4868,15 @@ public class VM extends XenAPIObject { * @return map of service type to name */ public Map queryServices(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.query_services"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -4860,15 +4885,15 @@ public class VM extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -4877,15 +4902,15 @@ public class VM extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMVMRecord(result); + return Types.toMapOfVMVMRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VMAppliance.java b/deps/XenServerJava/src/com/xensource/xenapi/VMAppliance.java index a04026314b9..b7e7e36684e 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VMAppliance.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VMAppliance.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VMAppliance extends XenAPIObject { * For internal use only. */ VMAppliance(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VMAppliance extends XenAPIObject { { if (obj != null && obj instanceof VMAppliance) { - VMAppliance other = (VMAppliance) obj; + VMAppliance other = (VMAppliance)obj; return other.ref.equals(this.ref); } else { @@ -112,8 +111,8 @@ public class VMAppliance extends XenAPIObject { /** * Convert a VM_appliance.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -155,15 +154,15 @@ public class VMAppliance extends XenAPIObject { * @return all fields from the object */ public VMAppliance.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMApplianceRecord(result); + return Types.toVMApplianceRecord(result); } /** @@ -173,15 +172,15 @@ public class VMAppliance extends XenAPIObject { * @return reference to the object */ public static VMAppliance getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMAppliance(result); + return Types.toVMAppliance(result); } /** @@ -191,9 +190,9 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VMAppliance.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM_appliance.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -210,16 +209,16 @@ public class VMAppliance extends XenAPIObject { * @return reference to the newly created object */ public static VMAppliance create(Connection c, VMAppliance.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMAppliance(result); + return Types.toVMAppliance(result); } /** @@ -228,9 +227,9 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VM_appliance.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -244,9 +243,9 @@ public class VMAppliance extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -261,15 +260,15 @@ public class VMAppliance extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMAppliance(result); + return Types.toSetOfVMAppliance(result); } /** @@ -278,15 +277,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -295,15 +294,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -312,15 +311,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -329,15 +328,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public Set getAllowedOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_allowed_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVmApplianceOperation(result); + return Types.toSetOfVmApplianceOperation(result); } /** @@ -346,15 +345,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public Map getCurrentOperations(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_current_operations"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringVmApplianceOperation(result); + return Types.toMapOfStringVmApplianceOperation(result); } /** @@ -363,15 +362,15 @@ public class VMAppliance extends XenAPIObject { * @return value of the field */ public Set getVMs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_VMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -380,9 +379,9 @@ public class VMAppliance extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -396,9 +395,9 @@ public class VMAppliance extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -413,10 +412,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task startAsync(Connection c, Boolean paused) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "Async.VM_appliance.start"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(paused)}; @@ -431,10 +430,10 @@ public class VMAppliance extends XenAPIObject { * @param paused Instantiate all VMs belonging to this appliance in paused state if set to true. */ public void start(Connection c, Boolean paused) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "VM_appliance.start"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(paused)}; @@ -448,10 +447,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task cleanShutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "Async.VM_appliance.clean_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -465,10 +464,10 @@ public class VMAppliance extends XenAPIObject { * */ public void cleanShutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "VM_appliance.clean_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -482,10 +481,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task hardShutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "Async.VM_appliance.hard_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -499,10 +498,10 @@ public class VMAppliance extends XenAPIObject { * */ public void hardShutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "VM_appliance.hard_shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -516,10 +515,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task shutdownAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "Async.VM_appliance.shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -533,10 +532,10 @@ public class VMAppliance extends XenAPIObject { * */ public void shutdown(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.OperationPartiallyFailed { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.OperationPartiallyFailed { String method_call = "VM_appliance.shutdown"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -551,10 +550,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task assertCanBeRecoveredAsync(Connection c, Session sessionTo) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmRequiresSr { String method_call = "Async.VM_appliance.assert_can_be_recovered"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo)}; @@ -569,10 +568,10 @@ public class VMAppliance extends XenAPIObject { * @param sessionTo The session to which the VM appliance is to be recovered. */ public void assertCanBeRecovered(Connection c, Session sessionTo) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmRequiresSr { String method_call = "VM_appliance.assert_can_be_recovered"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo)}; @@ -588,10 +587,10 @@ public class VMAppliance extends XenAPIObject { * @return Task */ public Task recoverAsync(Connection c, Session sessionTo, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmRequiresSr { String method_call = "Async.VM_appliance.recover"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo), Marshalling.toXMLRPC(force)}; @@ -607,10 +606,10 @@ public class VMAppliance extends XenAPIObject { * @param force Whether the VMs should replace newer versions of themselves. */ public void recover(Connection c, Session sessionTo, Boolean force) throws - BadServerResponse, - XenAPIException, - XmlRpcException, - Types.VmRequiresSr { + BadServerResponse, + XenAPIException, + XmlRpcException, + Types.VmRequiresSr { String method_call = "VM_appliance.recover"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(sessionTo), Marshalling.toXMLRPC(force)}; @@ -624,15 +623,15 @@ public class VMAppliance extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMAppliance(result); + return Types.toSetOfVMAppliance(result); } /** @@ -641,15 +640,15 @@ public class VMAppliance extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_appliance.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMApplianceVMApplianceRecord(result); + return Types.toMapOfVMApplianceVMApplianceRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VMGuestMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/VMGuestMetrics.java index 9a6caf052bd..08d88e3641c 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VMGuestMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VMGuestMetrics.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VMGuestMetrics extends XenAPIObject { * For internal use only. */ VMGuestMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VMGuestMetrics extends XenAPIObject { { if (obj != null && obj instanceof VMGuestMetrics) { - VMGuestMetrics other = (VMGuestMetrics) obj; + VMGuestMetrics other = (VMGuestMetrics)obj; return other.ref.equals(this.ref); } else { @@ -117,8 +116,8 @@ public class VMGuestMetrics extends XenAPIObject { /** * Convert a VM_guest_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("os_version", this.osVersion == null ? new HashMap() : this.osVersion); map.put("PV_drivers_version", this.PVDriversVersion == null ? new HashMap() : this.PVDriversVersion); @@ -185,15 +184,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return all fields from the object */ public VMGuestMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMGuestMetricsRecord(result); + return Types.toVMGuestMetricsRecord(result); } /** @@ -203,15 +202,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return reference to the object */ public static VMGuestMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMGuestMetrics(result); + return Types.toVMGuestMetrics(result); } /** @@ -220,15 +219,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -237,15 +236,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getOsVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_os_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -254,15 +253,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getPVDriversVersion(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_PV_drivers_version"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -271,15 +270,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Boolean getPVDriversUpToDate(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_PV_drivers_up_to_date"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -288,15 +287,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getMemory(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_memory"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -305,15 +304,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getDisks(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_disks"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -322,15 +321,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getNetworks(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_networks"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -339,15 +338,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getOther(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_other"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -356,15 +355,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -373,15 +372,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -390,15 +389,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return value of the field */ public Boolean getLive(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_live"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -407,9 +406,9 @@ public class VMGuestMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -424,9 +423,9 @@ public class VMGuestMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -440,9 +439,9 @@ public class VMGuestMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -456,15 +455,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMGuestMetrics(result); + return Types.toSetOfVMGuestMetrics(result); } /** @@ -473,15 +472,15 @@ public class VMGuestMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_guest_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMGuestMetricsVMGuestMetricsRecord(result); + return Types.toMapOfVMGuestMetricsVMGuestMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VMMetrics.java b/deps/XenServerJava/src/com/xensource/xenapi/VMMetrics.java index 8544e42e143..5f9a7a42c7c 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VMMetrics.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VMMetrics.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VMMetrics extends XenAPIObject { * For internal use only. */ VMMetrics(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VMMetrics extends XenAPIObject { { if (obj != null && obj instanceof VMMetrics) { - VMMetrics other = (VMMetrics) obj; + VMMetrics other = (VMMetrics)obj; return other.ref.equals(this.ref); } else { @@ -118,8 +117,8 @@ public class VMMetrics extends XenAPIObject { /** * Convert a VM_metrics.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("memory_actual", this.memoryActual == null ? 0 : this.memoryActual); map.put("VCPUs_number", this.VCPUsNumber == null ? 0 : this.VCPUsNumber); @@ -191,15 +190,15 @@ public class VMMetrics extends XenAPIObject { * @return all fields from the object */ public VMMetrics.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMMetricsRecord(result); + return Types.toVMMetricsRecord(result); } /** @@ -209,15 +208,15 @@ public class VMMetrics extends XenAPIObject { * @return reference to the object */ public static VMMetrics getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMMetrics(result); + return Types.toVMMetrics(result); } /** @@ -226,15 +225,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -243,15 +242,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Long getMemoryActual(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_memory_actual"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -260,15 +259,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Long getVCPUsNumber(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_VCPUs_number"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -277,15 +276,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Map getVCPUsUtilisation(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_VCPUs_utilisation"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfLongDouble(result); + return Types.toMapOfLongDouble(result); } /** @@ -294,15 +293,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Map getVCPUsCPU(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_VCPUs_CPU"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfLongLong(result); + return Types.toMapOfLongLong(result); } /** @@ -311,15 +310,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Map getVCPUsParams(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_VCPUs_params"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -328,15 +327,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Map> getVCPUsFlags(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_VCPUs_flags"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfLongSetOfString(result); + return Types.toMapOfLongSetOfString(result); } /** @@ -345,15 +344,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Set getState(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_state"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -362,15 +361,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Date getStartTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_start_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -379,15 +378,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Date getInstallTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_install_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -396,15 +395,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Date getLastUpdated(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_last_updated"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -413,15 +412,15 @@ public class VMMetrics extends XenAPIObject { * @return value of the field */ public Map getOtherConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -430,9 +429,9 @@ public class VMMetrics extends XenAPIObject { * @param otherConfig New value to set */ public void setOtherConfig(Connection c, Map otherConfig) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.set_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(otherConfig)}; @@ -447,9 +446,9 @@ public class VMMetrics extends XenAPIObject { * @param value Value to add */ public void addToOtherConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.add_to_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -463,9 +462,9 @@ public class VMMetrics extends XenAPIObject { * @param key Key to remove */ public void removeFromOtherConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.remove_from_other_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -479,15 +478,15 @@ public class VMMetrics extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMMetrics(result); + return Types.toSetOfVMMetrics(result); } /** @@ -496,15 +495,15 @@ public class VMMetrics extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VM_metrics.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMMetricsVMMetricsRecord(result); + return Types.toMapOfVMMetricsVMMetricsRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java b/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java index 3e8d2fbdd42..0ee0b3e7439 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VMPP.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VMPP extends XenAPIObject { * For internal use only. */ VMPP(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VMPP extends XenAPIObject { { if (obj != null && obj instanceof VMPP) { - VMPP other = (VMPP) obj; + VMPP other = (VMPP)obj; return other.ref.equals(this.ref); } else { @@ -126,8 +125,8 @@ public class VMPP extends XenAPIObject { /** * Convert a VMPP.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescription); @@ -239,15 +238,15 @@ public class VMPP extends XenAPIObject { * @return all fields from the object */ public VMPP.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMPPRecord(result); + return Types.toVMPPRecord(result); } /** @@ -257,15 +256,15 @@ public class VMPP extends XenAPIObject { * @return reference to the object */ public static VMPP getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMPP(result); + return Types.toVMPP(result); } /** @@ -275,9 +274,9 @@ public class VMPP extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VMPP.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VMPP.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -294,16 +293,16 @@ public class VMPP extends XenAPIObject { * @return reference to the newly created object */ public static VMPP create(Connection c, VMPP.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVMPP(result); + return Types.toVMPP(result); } /** @@ -312,9 +311,9 @@ public class VMPP extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VMPP.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -328,9 +327,9 @@ public class VMPP extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -345,15 +344,15 @@ public class VMPP extends XenAPIObject { * @return references to objects with matching names */ public static Set getByNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_by_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMPP(result); + return Types.toSetOfVMPP(result); } /** @@ -362,15 +361,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -379,15 +378,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public String getNameLabel(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -396,15 +395,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public String getNameDescription(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -413,15 +412,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Boolean getIsPolicyEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_is_policy_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -430,15 +429,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Types.VmppBackupType getBackupType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_backup_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVmppBackupType(result); + return Types.toVmppBackupType(result); } /** @@ -447,15 +446,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Long getBackupRetentionValue(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_backup_retention_value"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toLong(result); + return Types.toLong(result); } /** @@ -464,15 +463,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Types.VmppBackupFrequency getBackupFrequency(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_backup_frequency"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVmppBackupFrequency(result); + return Types.toVmppBackupFrequency(result); } /** @@ -481,15 +480,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Map getBackupSchedule(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_backup_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -498,15 +497,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Boolean getIsBackupRunning(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_is_backup_running"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -515,15 +514,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Date getBackupLastRunTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_backup_last_run_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -532,15 +531,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Types.VmppArchiveTargetType getArchiveTargetType(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_archive_target_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVmppArchiveTargetType(result); + return Types.toVmppArchiveTargetType(result); } /** @@ -549,15 +548,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Map getArchiveTargetConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_archive_target_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -566,15 +565,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Types.VmppArchiveFrequency getArchiveFrequency(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_archive_frequency"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVmppArchiveFrequency(result); + return Types.toVmppArchiveFrequency(result); } /** @@ -583,15 +582,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Map getArchiveSchedule(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_archive_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -600,15 +599,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Boolean getIsArchiveRunning(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_is_archive_running"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -617,15 +616,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Date getArchiveLastRunTime(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_archive_last_run_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toDate(result); + return Types.toDate(result); } /** @@ -634,15 +633,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Set getVMs(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_VMs"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVM(result); + return Types.toSetOfVM(result); } /** @@ -651,15 +650,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Boolean getIsAlarmEnabled(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_is_alarm_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toBoolean(result); + return Types.toBoolean(result); } /** @@ -668,15 +667,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Map getAlarmConfig(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_alarm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfStringString(result); + return Types.toMapOfStringString(result); } /** @@ -685,15 +684,15 @@ public class VMPP extends XenAPIObject { * @return value of the field */ public Set getRecentAlerts(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_recent_alerts"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -702,9 +701,9 @@ public class VMPP extends XenAPIObject { * @param label New value to set */ public void setNameLabel(Connection c, String label) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_name_label"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(label)}; @@ -718,9 +717,9 @@ public class VMPP extends XenAPIObject { * @param description New value to set */ public void setNameDescription(Connection c, String description) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_name_description"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(description)}; @@ -734,9 +733,9 @@ public class VMPP extends XenAPIObject { * @param isPolicyEnabled New value to set */ public void setIsPolicyEnabled(Connection c, Boolean isPolicyEnabled) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_is_policy_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(isPolicyEnabled)}; @@ -750,9 +749,9 @@ public class VMPP extends XenAPIObject { * @param backupType New value to set */ public void setBackupType(Connection c, Types.VmppBackupType backupType) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_backup_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(backupType)}; @@ -766,15 +765,15 @@ public class VMPP extends XenAPIObject { * @return An XMLRPC result */ public String protectNow(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.protect_now"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -784,15 +783,15 @@ public class VMPP extends XenAPIObject { * @return An XMLRPC result */ public static String archiveNow(Connection c, VM snapshot) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.archive_now"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(snapshot)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -802,15 +801,15 @@ public class VMPP extends XenAPIObject { * @return A list of alerts encoded in xml */ public Set getAlerts(Connection c, Long hoursFromNow) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_alerts"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(hoursFromNow)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfString(result); + return Types.toSetOfString(result); } /** @@ -819,9 +818,9 @@ public class VMPP extends XenAPIObject { * @param value the value to set */ public void setBackupRetentionValue(Connection c, Long value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_backup_retention_value"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -835,9 +834,9 @@ public class VMPP extends XenAPIObject { * @param value the backup frequency */ public void setBackupFrequency(Connection c, Types.VmppBackupFrequency value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_backup_frequency"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -851,9 +850,9 @@ public class VMPP extends XenAPIObject { * @param value the value to set */ public void setBackupSchedule(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_backup_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -867,9 +866,9 @@ public class VMPP extends XenAPIObject { * @param value the archive frequency */ public void setArchiveFrequency(Connection c, Types.VmppArchiveFrequency value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_archive_frequency"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -883,9 +882,9 @@ public class VMPP extends XenAPIObject { * @param value the value to set */ public void setArchiveSchedule(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_archive_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -899,9 +898,9 @@ public class VMPP extends XenAPIObject { * @param value the archive target config type */ public void setArchiveTargetType(Connection c, Types.VmppArchiveTargetType value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_archive_target_type"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -915,9 +914,9 @@ public class VMPP extends XenAPIObject { * @param value the value to set */ public void setArchiveTargetConfig(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_archive_target_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -931,9 +930,9 @@ public class VMPP extends XenAPIObject { * @param value true if alarm is enabled for this policy */ public void setIsAlarmEnabled(Connection c, Boolean value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_is_alarm_enabled"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -947,9 +946,9 @@ public class VMPP extends XenAPIObject { * @param value the value to set */ public void setAlarmConfig(Connection c, Map value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_alarm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -964,9 +963,9 @@ public class VMPP extends XenAPIObject { * @param value the value to add */ public void addToBackupSchedule(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.add_to_backup_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -981,9 +980,9 @@ public class VMPP extends XenAPIObject { * @param value the value to add */ public void addToArchiveTargetConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.add_to_archive_target_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -998,9 +997,9 @@ public class VMPP extends XenAPIObject { * @param value the value to add */ public void addToArchiveSchedule(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.add_to_archive_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1015,9 +1014,9 @@ public class VMPP extends XenAPIObject { * @param value the value to add */ public void addToAlarmConfig(Connection c, String key, String value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.add_to_alarm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key), Marshalling.toXMLRPC(value)}; @@ -1031,9 +1030,9 @@ public class VMPP extends XenAPIObject { * @param key the key to remove */ public void removeFromBackupSchedule(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.remove_from_backup_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1047,9 +1046,9 @@ public class VMPP extends XenAPIObject { * @param key the key to remove */ public void removeFromArchiveTargetConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.remove_from_archive_target_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1063,9 +1062,9 @@ public class VMPP extends XenAPIObject { * @param key the key to remove */ public void removeFromArchiveSchedule(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.remove_from_archive_schedule"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1079,9 +1078,9 @@ public class VMPP extends XenAPIObject { * @param key the key to remove */ public void removeFromAlarmConfig(Connection c, String key) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.remove_from_alarm_config"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(key)}; @@ -1095,9 +1094,9 @@ public class VMPP extends XenAPIObject { * @param value the value to set */ public void setBackupLastRunTime(Connection c, Date value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_backup_last_run_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1111,9 +1110,9 @@ public class VMPP extends XenAPIObject { * @param value the value to set */ public void setArchiveLastRunTime(Connection c, Date value) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.set_archive_last_run_time"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref), Marshalling.toXMLRPC(value)}; @@ -1127,15 +1126,15 @@ public class VMPP extends XenAPIObject { * @return references to all objects */ public static Set getAll(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_all"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toSetOfVMPP(result); + return Types.toSetOfVMPP(result); } /** @@ -1144,15 +1143,15 @@ public class VMPP extends XenAPIObject { * @return records of all objects */ public static Map getAllRecords(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VMPP.get_all_records"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toMapOfVMPPVMPPRecord(result); + return Types.toMapOfVMPPVMPPRecord(result); } } \ No newline at end of file diff --git a/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java b/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java index 71736a01664..25c332081ef 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/VTPM.java @@ -28,7 +28,6 @@ * OF THE POSSIBILITY OF SUCH DAMAGE. */ - package com.xensource.xenapi; import com.xensource.xenapi.Types.BadServerResponse; @@ -61,14 +60,14 @@ public class VTPM extends XenAPIObject { * For internal use only. */ VTPM(String ref) { - this.ref = ref; + this.ref = ref; } /** * @return The XenAPI reference (OpaqueRef) to this object. */ public String toWireString() { - return this.ref; + return this.ref; } /** @@ -79,7 +78,7 @@ public class VTPM extends XenAPIObject { { if (obj != null && obj instanceof VTPM) { - VTPM other = (VTPM) obj; + VTPM other = (VTPM)obj; return other.ref.equals(this.ref); } else { @@ -109,8 +108,8 @@ public class VTPM extends XenAPIObject { /** * Convert a VTPM.Record to a Map */ - public Map toMap() { - Map map = new HashMap(); + public Map toMap() { + Map map = new HashMap(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("VM", this.VM == null ? new VM("OpaqueRef:NULL") : this.VM); map.put("backend", this.backend == null ? new VM("OpaqueRef:NULL") : this.backend); @@ -137,15 +136,15 @@ public class VTPM extends XenAPIObject { * @return all fields from the object */ public VTPM.Record getRecord(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.get_record"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVTPMRecord(result); + return Types.toVTPMRecord(result); } /** @@ -155,15 +154,15 @@ public class VTPM extends XenAPIObject { * @return reference to the object */ public static VTPM getByUuid(Connection c, String uuid) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.get_by_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(uuid)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVTPM(result); + return Types.toVTPM(result); } /** @@ -173,9 +172,9 @@ public class VTPM extends XenAPIObject { * @return Task */ public static Task createAsync(Connection c, VTPM.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VTPM.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); @@ -192,16 +191,16 @@ public class VTPM extends XenAPIObject { * @return reference to the newly created object */ public static VTPM create(Connection c, VTPM.Record record) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.create"; String session = c.getSessionReference(); Map record_map = record.toMap(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(record_map)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVTPM(result); + return Types.toVTPM(result); } /** @@ -210,9 +209,9 @@ public class VTPM extends XenAPIObject { * @return Task */ public Task destroyAsync(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "Async.VTPM.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -226,9 +225,9 @@ public class VTPM extends XenAPIObject { * */ public void destroy(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.destroy"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; @@ -242,15 +241,15 @@ public class VTPM extends XenAPIObject { * @return value of the field */ public String getUuid(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.get_uuid"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toString(result); + return Types.toString(result); } /** @@ -259,15 +258,15 @@ public class VTPM extends XenAPIObject { * @return value of the field */ public VM getVM(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.get_VM"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } /** @@ -276,15 +275,15 @@ public class VTPM extends XenAPIObject { * @return value of the field */ public VM getBackend(Connection c) throws - BadServerResponse, - XenAPIException, - XmlRpcException { + BadServerResponse, + XenAPIException, + XmlRpcException { String method_call = "VTPM.get_backend"; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(this.ref)}; Map response = c.dispatch(method_call, method_params); Object result = response.get("Value"); - return Types.toVM(result); + return Types.toVM(result); } } \ No newline at end of file diff --git a/engine/api/src/com/cloud/vm/VirtualMachineManager.java b/engine/api/src/com/cloud/vm/VirtualMachineManager.java index 7292d659f7e..80497b1dd5f 100644 --- a/engine/api/src/com/cloud/vm/VirtualMachineManager.java +++ b/engine/api/src/com/cloud/vm/VirtualMachineManager.java @@ -50,7 +50,7 @@ import com.cloud.utils.fsm.NoTransitionException; public interface VirtualMachineManager extends Manager { static final ConfigKey ExecuteInSequence = new ConfigKey("Advanced", Boolean.class, "execute.in.sequence.hypervisor.commands", "false", "If set to true, StartCommand, StopCommand, CopyCommand, MigrateCommand will be synchronized on the agent side." - + " If set to false, these commands become asynchronous. Default value is false.", true); + + " If set to false, these commands become asynchronous. Default value is false.", true); public interface Topics { public static final String VM_POWER_STATE = "vm.powerstate"; @@ -60,7 +60,7 @@ public interface VirtualMachineManager extends Manager { * Allocates a new virtual machine instance in the CloudStack DB. This * orchestrates the creation of all virtual resources needed in CloudStack * DB to bring up a VM. - * + * * @param vmInstanceName Instance name of the VM. This name uniquely * a VM in CloudStack's deploy environment. The caller gets to * define this VM but it must be unqiue for all of CloudStack. @@ -94,14 +94,14 @@ public interface VirtualMachineManager extends Manager { boolean stateTransitTo(VirtualMachine vm, VirtualMachine.Event e, Long hostId) throws NoTransitionException; void advanceStart(String vmUuid, Map params) throws InsufficientCapacityException, ResourceUnavailableException, - ConcurrentOperationException, OperationTimedoutException; + ConcurrentOperationException, OperationTimedoutException; void advanceStart(String vmUuid, Map params, DeploymentPlan planToDeploy) throws InsufficientCapacityException, - ResourceUnavailableException, ConcurrentOperationException, OperationTimedoutException; + ResourceUnavailableException, ConcurrentOperationException, OperationTimedoutException; void orchestrateStart(String vmUuid, Map params, DeploymentPlan planToDeploy) throws InsufficientCapacityException, - ResourceUnavailableException, ConcurrentOperationException, OperationTimedoutException; - + ResourceUnavailableException, ConcurrentOperationException, OperationTimedoutException; + void advanceStop(String vmUuid, boolean cleanupEvenIfUnableToStop) throws ResourceUnavailableException, OperationTimedoutException, ConcurrentOperationException; void orchestrateStop(String vmUuid, boolean cleanupEvenIfUnableToStop) throws ResourceUnavailableException, OperationTimedoutException, ConcurrentOperationException; @@ -113,34 +113,35 @@ public interface VirtualMachineManager extends Manager { void migrateAway(String vmUuid, long hostId) throws InsufficientServerCapacityException; void migrate(String vmUuid, long srcHostId, DeployDestination dest) throws ResourceUnavailableException, ConcurrentOperationException; - + void orchestrateMigrate(String vmUuid, long srcHostId, DeployDestination dest) throws ResourceUnavailableException, ConcurrentOperationException; void migrateWithStorage(String vmUuid, long srcId, long destId, Map volumeToPool) throws ResourceUnavailableException, ConcurrentOperationException; - - void orchestrateMigrateWithStorage(String vmUuid, long srcId, long destId, Map volumeToPool) throws ResourceUnavailableException, ConcurrentOperationException; - + + void orchestrateMigrateWithStorage(String vmUuid, long srcId, long destId, Map volumeToPool) throws ResourceUnavailableException, + ConcurrentOperationException; + void reboot(String vmUuid, Map params) throws InsufficientCapacityException, ResourceUnavailableException; void orchestrateReboot(String vmUuid, Map params) throws InsufficientCapacityException, ResourceUnavailableException; void advanceReboot(String vmUuid, Map params) throws InsufficientCapacityException, ResourceUnavailableException, - ConcurrentOperationException, OperationTimedoutException; + ConcurrentOperationException, OperationTimedoutException; /** * Check to see if a virtual machine can be upgraded to the given service offering - * + * * @param vm * @param offering * @return true if the host can handle the upgrade, false otherwise */ boolean isVirtualMachineUpgradable(final VirtualMachine vm, final ServiceOffering offering); - + VirtualMachine findById(long vmId); void storageMigration(String vmUuid, StoragePool storagePoolId); - + void orchestrateStorageMigration(String vmUuid, StoragePool storagePoolId); /** @@ -167,10 +168,9 @@ public interface VirtualMachineManager extends Manager { */ NicProfile addVmToNetwork(VirtualMachine vm, Network network, NicProfile requested) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException; - + NicProfile orchestrateAddVmToNetwork(VirtualMachine vm, Network network, NicProfile requested) throws ConcurrentOperationException, - ResourceUnavailableException, InsufficientCapacityException; - + ResourceUnavailableException, InsufficientCapacityException; /** * @param vm @@ -192,7 +192,7 @@ public interface VirtualMachineManager extends Manager { * @throws ConcurrentOperationException */ boolean removeVmFromNetwork(VirtualMachine vm, Network network, URI broadcastUri) throws ConcurrentOperationException, ResourceUnavailableException; - + boolean orchestrateRemoveVmFromNetwork(VirtualMachine vm, Network network, URI broadcastUri) throws ConcurrentOperationException, ResourceUnavailableException; /** @@ -210,14 +210,16 @@ public interface VirtualMachineManager extends Manager { VirtualMachineTO toVmTO(VirtualMachineProfile profile); VirtualMachine reConfigureVm(String vmUuid, ServiceOffering newServiceOffering, boolean sameHost) throws ResourceUnavailableException, ConcurrentOperationException; - - VirtualMachine orchestrateReConfigureVm(String vmUuid, ServiceOffering newServiceOffering, boolean sameHost) throws ResourceUnavailableException, ConcurrentOperationException; + + VirtualMachine orchestrateReConfigureVm(String vmUuid, ServiceOffering newServiceOffering, boolean sameHost) throws ResourceUnavailableException, + ConcurrentOperationException; void findHostAndMigrate(String vmUuid, Long newSvcOfferingId, DeploymentPlanner.ExcludeList excludeHostList) throws InsufficientCapacityException, - ConcurrentOperationException, ResourceUnavailableException; + ConcurrentOperationException, ResourceUnavailableException; void migrateForScale(String vmUuid, long srcHostId, DeployDestination dest, Long newSvcOfferingId) throws ResourceUnavailableException, ConcurrentOperationException; - - void orchestrateMigrateForScale(String vmUuid, long srcHostId, DeployDestination dest, Long newSvcOfferingId) throws ResourceUnavailableException, ConcurrentOperationException; + + void orchestrateMigrateForScale(String vmUuid, long srcHostId, DeployDestination dest, Long newSvcOfferingId) throws ResourceUnavailableException, + ConcurrentOperationException; } diff --git a/engine/components-api/src/com/cloud/alert/AlertManager.java b/engine/components-api/src/com/cloud/alert/AlertManager.java index 56a27df1b42..be29a5dc57b 100755 --- a/engine/components-api/src/com/cloud/alert/AlertManager.java +++ b/engine/components-api/src/com/cloud/alert/AlertManager.java @@ -21,8 +21,8 @@ import org.apache.cloudstack.framework.config.ConfigKey; import com.cloud.utils.component.Manager; -public interface AlertManager extends Manager, AlertService{ - +public interface AlertManager extends Manager, AlertService { + static final ConfigKey StorageCapacityThreshold = new ConfigKey(Double.class, "cluster.storage.capacity.notificationthreshold", "Alert", "0.75", "Percentage (as a value between 0 and 1) of storage utilization above which alerts will be sent about low storage available.", true, ConfigKey.Scope.Cluster, null); @@ -34,11 +34,11 @@ public interface AlertManager extends Manager, AlertService{ static final ConfigKey StorageAllocatedCapacityThreshold = new ConfigKey(Double.class, "cluster.storage.allocated.capacity.notificationthreshold", "Alert", "0.75", "Percentage (as a value between 0 and 1) of allocated storage utilization above which alerts will be sent about low storage available.", true, ConfigKey.Scope.Cluster, null); - + void clearAlert(AlertType alertType, long dataCenterId, long podId); void recalculateCapacity(); - + void sendAlert(AlertType alertType, long dataCenterId, Long podId, String subject, String body); } diff --git a/engine/components-api/src/com/cloud/event/UsageEventUtils.java b/engine/components-api/src/com/cloud/event/UsageEventUtils.java index 90a2f17f1b8..4f32cb32636 100644 --- a/engine/components-api/src/com/cloud/event/UsageEventUtils.java +++ b/engine/components-api/src/com/cloud/event/UsageEventUtils.java @@ -41,11 +41,11 @@ import com.cloud.utils.component.ComponentContext; public class UsageEventUtils { - private static UsageEventDao _usageEventDao; - private static AccountDao _accountDao; - private static DataCenterDao _dcDao; + private static UsageEventDao s_usageEventDao; + private static AccountDao s_accountDao; + private static DataCenterDao s_dcDao; private static final Logger s_logger = Logger.getLogger(UsageEventUtils.class); - protected static EventBus _eventBus = null; + protected static EventBus s_eventBus = null; @Inject UsageEventDao usageEventDao; @@ -59,9 +59,9 @@ public class UsageEventUtils { @PostConstruct void init() { - _usageEventDao = usageEventDao; - _accountDao = accountDao; - _dcDao = dcDao; + s_usageEventDao = usageEventDao; + s_accountDao = accountDao; + s_dcDao = dcDao; } public static void publishUsageEvent(String usageType, long accountId, long zoneId, long resourceId, String resourceName, Long offeringId, Long templateId, @@ -107,47 +107,47 @@ public class UsageEventUtils { private static void saveUsageEvent(String usageType, long accountId, long zoneId, long resourceId, String resourceName, Long offeringId, Long templateId, String resourceType, Map details) { UsageEventVO usageEvent = new UsageEventVO(usageType, accountId, zoneId, resourceId, resourceName, offeringId, templateId, resourceType); - _usageEventDao.persist(usageEvent); - _usageEventDao.saveDetails(usageEvent.getId(), details); + s_usageEventDao.persist(usageEvent); + s_usageEventDao.saveDetails(usageEvent.getId(), details); } public static void saveUsageEvent(String usageType, long accountId, long zoneId, long resourceId, String resourceName, Long offeringId, Long templateId, Long size) { - _usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, resourceId, resourceName, offeringId, templateId, size)); + s_usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, resourceId, resourceName, offeringId, templateId, size)); } public static void saveUsageEvent(String usageType, long accountId, long zoneId, long resourceId, String resourceName, Long offeringId, Long templateId, Long size, Long virtualSize) { - _usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, resourceId, resourceName, offeringId, templateId, size, virtualSize)); + s_usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, resourceId, resourceName, offeringId, templateId, size, virtualSize)); } public static void saveUsageEvent(String usageType, long accountId, long zoneId, long resourceId, String resourceName) { - _usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, resourceId, resourceName)); + s_usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, resourceId, resourceName)); } public static void saveUsageEvent(String usageType, long accountId, long zoneId, long ipAddressId, String ipAddress, boolean isSourceNat, String guestType, boolean isSystem) { - _usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, ipAddressId, ipAddress, isSourceNat, guestType, isSystem)); + s_usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, ipAddressId, ipAddress, isSourceNat, guestType, isSystem)); } public static void saveUsageEvent(String usageType, long accountId, long zoneId, long resourceId, String resourceName, Long offeringId, Long templateId, String resourceType) { - _usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, resourceId, resourceName, offeringId, templateId, resourceType)); + s_usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, resourceId, resourceName, offeringId, templateId, resourceType)); } public static void saveUsageEvent(String usageType, long accountId, long zoneId, long vmId, long securityGroupId) { - _usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, vmId, securityGroupId)); + s_usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, vmId, securityGroupId)); } private static void publishUsageEvent(String usageEventType, Long accountId, Long zoneId, String resourceType, String resourceUUID) { try { - _eventBus = ComponentContext.getComponent(EventBus.class); + s_eventBus = ComponentContext.getComponent(EventBus.class); } catch (NoSuchBeanDefinitionException nbe) { return; // no provider is configured to provide events bus, so just return } - Account account = _accountDao.findById(accountId); - DataCenterVO dc = _dcDao.findById(zoneId); + Account account = s_accountDao.findById(accountId); + DataCenterVO dc = s_dcDao.findById(zoneId); // if account has been deleted, this might be called during cleanup of resources and results in null pointer if (account == null) @@ -156,7 +156,7 @@ public class UsageEventUtils { // if an invalid zone is passed in, create event without zone UUID String zoneUuid = null; if (dc != null) - zoneUuid = dc.getUuid(); + zoneUuid = dc.getUuid(); Event event = new Event(Name, EventCategory.USAGE_EVENT.getName(), usageEventType, resourceType, resourceUUID); @@ -173,7 +173,7 @@ public class UsageEventUtils { event.setDescription(eventDescription); try { - _eventBus.publish(event); + s_eventBus.publish(event); } catch (EventBusException e) { s_logger.warn("Failed to publish usage event on the the event bus."); } diff --git a/engine/components-api/src/com/cloud/network/NetworkStateListener.java b/engine/components-api/src/com/cloud/network/NetworkStateListener.java index 12190613ce8..0a5e0332a9b 100644 --- a/engine/components-api/src/com/cloud/network/NetworkStateListener.java +++ b/engine/components-api/src/com/cloud/network/NetworkStateListener.java @@ -45,7 +45,7 @@ public class NetworkStateListener implements StateListener EnableLB = new ConfigKey(Boolean.class, "agent.lb.enabled", "Advanced", "false", - "Enable agent load balancing between management server nodes", true); + "Enable agent load balancing between management server nodes", true); protected final ConfigKey ConnectedAgentThreshold = new ConfigKey(Double.class, "agent.load.threshold", "Advanced", "0.7", - "What percentage of the agents can be held by one management server before load balancing happens", true); + "What percentage of the agents can be held by one management server before load balancing happens", true); protected final ConfigKey LoadSize = new ConfigKey(Integer.class, "direct.agent.load.size", "Advanced", "16", - "How many agents to connect to in each round", true); + "How many agents to connect to in each round", true); protected final ConfigKey ScanInterval = new ConfigKey(Integer.class, "direct.agent.scan.interval", "Advanced", "90", - "Interval between scans to load agents", false, ConfigKey.Scope.Global, 1000); + "Interval between scans to load agents", false, ConfigKey.Scope.Global, 1000); @Override public boolean configure(String name, Map xmlParams) throws ConfigurationException { @@ -334,7 +334,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust if (transferVO != null) { if (transferVO.getFutureOwner() == _nodeId && transferVO.getState() == HostTransferState.TransferStarted) { s_logger.debug("Not processing " + Event.AgentDisconnected + " event for the host id=" + hostId + " as the host is being connected to " + - _nodeId); + _nodeId); return true; } } @@ -344,7 +344,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust // but the host has already reconnected to the current management server if (!attache.forForward()) { s_logger.debug("Not processing " + Event.AgentDisconnected + " event for the host id=" + hostId + - " as the host is directly connected to the current management server " + _nodeId); + " as the host is directly connected to the current management server " + _nodeId); return true; } @@ -375,7 +375,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust public void notifyNodesInCluster(AgentAttache attache) { s_logger.debug("Notifying other nodes of to disconnect"); - Command[] cmds = new Command[] { new ChangeAgentCommand(attache.getId(), Event.AgentDisconnected) }; + Command[] cmds = new Command[] {new ChangeAgentCommand(attache.getId(), Event.AgentDisconnected)}; _clusterMgr.broadcast(attache.getId(), _gson.toJson(cmds)); } @@ -384,23 +384,23 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust if (s_logger.isDebugEnabled()) { s_logger.debug("Notifying other MS nodes to run host scan task"); } - Command[] cmds = new Command[] { new ScheduleHostScanTaskCommand() }; + Command[] cmds = new Command[] {new ScheduleHostScanTaskCommand()}; _clusterMgr.broadcast(0, _gson.toJson(cmds)); } protected static void logT(byte[] bytes, final String msg) { s_logger.trace("Seq " + Request.getAgentId(bytes) + "-" + Request.getSequence(bytes) + ": MgmtId " + Request.getManagementServerId(bytes) + ": " + - (Request.isRequest(bytes) ? "Req: " : "Resp: ") + msg); + (Request.isRequest(bytes) ? "Req: " : "Resp: ") + msg); } protected static void logD(byte[] bytes, final String msg) { s_logger.debug("Seq " + Request.getAgentId(bytes) + "-" + Request.getSequence(bytes) + ": MgmtId " + Request.getManagementServerId(bytes) + ": " + - (Request.isRequest(bytes) ? "Req: " : "Resp: ") + msg); + (Request.isRequest(bytes) ? "Req: " : "Resp: ") + msg); } protected static void logI(byte[] bytes, final String msg) { s_logger.info("Seq " + Request.getAgentId(bytes) + "-" + Request.getSequence(bytes) + ": MgmtId " + Request.getManagementServerId(bytes) + ": " + - (Request.isRequest(bytes) ? "Req: " : "Resp: ") + msg); + (Request.isRequest(bytes) ? "Req: " : "Resp: ") + msg); } public boolean routeToPeer(String peer, byte[] bytes) { @@ -425,7 +425,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust if (s_logger.isDebugEnabled()) { logD(bytes, "Routing to peer"); } - Link.write(ch, new ByteBuffer[] { ByteBuffer.wrap(bytes) }, sslEngine); + Link.write(ch, new ByteBuffer[] {ByteBuffer.wrap(bytes)}, sslEngine); return true; } catch (IOException e) { try { @@ -618,7 +618,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } Request req = Request.parse(data); Command[] cmds = req.getCommands(); - CancelCommand cancel = (CancelCommand) cmds[0]; + CancelCommand cancel = (CancelCommand)cmds[0]; if (s_logger.isDebugEnabled()) { logD(data, "Cancel request received"); } @@ -647,7 +647,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust return; } else { if (agent instanceof Routable) { - Routable cluster = (Routable) agent; + Routable cluster = (Routable)agent; cluster.routeToAgent(data); } else { agent.send(Request.parse(data)); @@ -664,7 +664,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust if (mgmtId != -1 && mgmtId != _nodeId) { routeToPeer(Long.toString(mgmtId), data); if (Request.requiresSequentialExecution(data)) { - AgentAttache attache = (AgentAttache) link.attachment(); + AgentAttache attache = (AgentAttache)link.attachment(); if (attache != null) { attache.sendNext(Request.getSequence(data)); } else if (s_logger.isDebugEnabled()) { @@ -726,7 +726,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust @Override public boolean executeRebalanceRequest(long agentId, long currentOwnerId, long futureOwnerId, Event event) throws AgentUnavailableException, - OperationTimedoutException { + OperationTimedoutException { boolean result = false; if (event == Event.RequestAgentRebalance) { return setToWaitForRebalance(agentId, currentOwnerId, futureOwnerId); @@ -793,7 +793,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } else { if (s_logger.isDebugEnabled()) { s_logger.debug("There are no hosts to rebalance in the system. Current number of active management server nodes in the system is " + allMS.size() + - "; number of managed agents is " + allManagedAgents.size()); + "; number of managed agents is " + allManagedAgents.size()); } return; } @@ -947,7 +947,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust // no need to do anything with the real attache as we haven't modified it yet Date cutTime = DateUtil.currentGMTTime(); HostTransferMapVO transferMap = - _hostTransferDao.findActiveHostTransferMapByHostId(hostId, new Date(cutTime.getTime() - rebalanceTimeOut)); + _hostTransferDao.findActiveHostTransferMapByHostId(hostId, new Date(cutTime.getTime() - rebalanceTimeOut)); if (transferMap == null) { s_logger.debug("Timed out waiting for the host id=" + hostId + " to be ready to transfer, skipping rebalance for the host"); @@ -966,7 +966,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust ManagementServerHostVO ms = _mshostDao.findByMsid(transferMap.getFutureOwner()); if (ms != null && ms.getState() != ManagementServerHost.State.Up) { s_logger.debug("Can't transfer host " + hostId + " as it's future owner is not in UP state: " + ms + - ", skipping rebalance for the host"); + ", skipping rebalance for the host"); iterator.remove(); _hostTransferDao.completeAgentTransfer(hostId); continue; @@ -983,7 +983,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } else { s_logger.debug("Agent " + hostId + " can't be transfered yet as its request queue size is " + attache.getQueueSize() + - " and listener queue size is " + attache.getNonRecurringListenersSize()); + " and listener queue size is " + attache.getNonRecurringListenersSize()); } } } else { @@ -1050,7 +1050,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust if (result) { if (s_logger.isDebugEnabled()) { s_logger.debug("Loading directly connected host " + host.getId() + "(" + host.getName() + ") to the management server " + _nodeId + - " as a part of rebalance process"); + " as a part of rebalance process"); } result = loadDirectlyConnectedHost(host, true); } else { @@ -1059,16 +1059,16 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } catch (Exception ex) { s_logger.warn("Failed to load directly connected host " + host.getId() + "(" + host.getName() + ") to the management server " + _nodeId + - " as a part of rebalance process due to:", ex); + " as a part of rebalance process due to:", ex); result = false; } if (result) { s_logger.debug("Successfully loaded directly connected host " + host.getId() + "(" + host.getName() + ") to the management server " + _nodeId + - " as a part of rebalance process"); + " as a part of rebalance process"); } else { s_logger.warn("Failed to load directly connected host " + host.getId() + "(" + host.getName() + ") to the management server " + _nodeId + - " as a part of rebalance process"); + " as a part of rebalance process"); } } @@ -1089,7 +1089,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust return; } - ClusteredAgentAttache forwardAttache = (ClusteredAgentAttache) attache; + ClusteredAgentAttache forwardAttache = (ClusteredAgentAttache)attache; if (success) { @@ -1100,7 +1100,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust Request requestToTransfer = forwardAttache.getRequestToTransfer(); while (requestToTransfer != null) { s_logger.debug("Forwarding request " + requestToTransfer.getSequence() + " held in transfer attache " + hostId + " from the management server " + - _nodeId + " to " + futureOwnerId); + _nodeId + " to " + futureOwnerId); boolean routeResult = routeToPeer(Long.toString(futureOwnerId), requestToTransfer.getBytes()); if (!routeResult) { logD(requestToTransfer.getBytes(), "Failed to route request to peer"); @@ -1138,10 +1138,10 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } synchronized (_agents) { - ClusteredDirectAgentAttache attache = (ClusteredDirectAgentAttache) _agents.get(hostId); + ClusteredDirectAgentAttache attache = (ClusteredDirectAgentAttache)_agents.get(hostId); if (attache != null && attache.getQueueSize() == 0 && attache.getNonRecurringListenersSize() == 0) { handleDisconnectWithoutInvestigation(attache, Event.StartAgentRebalance, true, true); - ClusteredAgentAttache forwardAttache = (ClusteredAgentAttache) createAttache(hostId); + ClusteredAgentAttache forwardAttache = (ClusteredAgentAttache)createAttache(hostId); if (forwardAttache == null) { s_logger.warn("Unable to create a forward attache for the host " + hostId + " as a part of rebalance process"); return false; @@ -1154,7 +1154,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust s_logger.warn("Attache for the agent " + hostId + " no longer exists on management server " + _nodeId + ", can't start host rebalancing"); } else { s_logger.warn("Attache for the agent " + hostId + " has request queue size= " + attache.getQueueSize() + " and listener queue size " + - attache.getNonRecurringListenersSize() + ", can't start host rebalancing"); + attache.getNonRecurringListenersSize() + ", can't start host rebalancing"); } return false; } @@ -1211,7 +1211,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust // Scheduling host scan task in peer MS is a best effort operation during host add, regular host scan // happens at fixed intervals anyways. So handling any exceptions that may be thrown s_logger.warn("Exception happened while trying to schedule host scan task on mgmt server " + _clusterMgr.getSelfPeerName() + - ", ignoring as regular host scan happens at fixed interval anyways", e); + ", ignoring as regular host scan happens at fixed interval anyways", e); return null; } @@ -1250,7 +1250,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust } if (cmds.length == 1 && cmds[0] instanceof ChangeAgentCommand) { // intercepted - ChangeAgentCommand cmd = (ChangeAgentCommand) cmds[0]; + ChangeAgentCommand cmd = (ChangeAgentCommand)cmds[0]; if (s_logger.isDebugEnabled()) { s_logger.debug("Intercepting command for agent change: agent " + cmd.getAgentId() + " event: " + cmd.getEvent()); @@ -1271,7 +1271,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust answers[0] = new ChangeAgentAnswer(cmd, result); return _gson.toJson(answers); } else if (cmds.length == 1 && cmds[0] instanceof TransferAgentCommand) { - TransferAgentCommand cmd = (TransferAgentCommand) cmds[0]; + TransferAgentCommand cmd = (TransferAgentCommand)cmds[0]; if (s_logger.isDebugEnabled()) { s_logger.debug("Intercepting command for agent rebalancing: agent " + cmd.getAgentId() + " event: " + cmd.getEvent()); @@ -1294,7 +1294,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust answers[0] = new Answer(cmd, result, null); return _gson.toJson(answers); } else if (cmds.length == 1 && cmds[0] instanceof PropagateResourceEventCommand) { - PropagateResourceEventCommand cmd = (PropagateResourceEventCommand) cmds[0]; + PropagateResourceEventCommand cmd = (PropagateResourceEventCommand)cmds[0]; s_logger.debug("Intercepting command to propagate event " + cmd.getEvent().name() + " for host " + cmd.getHostId()); @@ -1311,7 +1311,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust answers[0] = new Answer(cmd, result, null); return _gson.toJson(answers); } else if (cmds.length == 1 && cmds[0] instanceof ScheduleHostScanTaskCommand) { - ScheduleHostScanTaskCommand cmd = (ScheduleHostScanTaskCommand) cmds[0]; + ScheduleHostScanTaskCommand cmd = (ScheduleHostScanTaskCommand)cmds[0]; String response = handleScheduleHostScanTaskCommand(cmd); return response; } @@ -1328,14 +1328,14 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust if (s_logger.isDebugEnabled()) { s_logger.debug("Completed dispatching -> " + pdu.getAgentId() + ", json: " + pdu.getJsonPackage() + " in " + - (System.currentTimeMillis() - startTick) + " ms, return result: " + jsonReturn); + (System.currentTimeMillis() - startTick) + " ms, return result: " + jsonReturn); } return jsonReturn; } else { if (s_logger.isDebugEnabled()) { s_logger.debug("Completed dispatching -> " + pdu.getAgentId() + ", json: " + pdu.getJsonPackage() + " in " + - (System.currentTimeMillis() - startTick) + " ms, return null result"); + (System.currentTimeMillis() - startTick) + " ms, return null result"); } } } catch (AgentUnavailableException e) { @@ -1386,12 +1386,12 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust double load = managedHostsCount / allHostsCount; if (load >= ConnectedAgentThreshold.value()) { s_logger.debug("Scheduling agent rebalancing task as the average agent load " + load + " is more than the threshold " + - ConnectedAgentThreshold.value()); + ConnectedAgentThreshold.value()); scheduleRebalanceAgents(); _agentLbHappened = true; } else { s_logger.debug("Not scheduling agent rebalancing task as the averages load " + load + " is less than the threshold " + - ConnectedAgentThreshold.value()); + ConnectedAgentThreshold.value()); } } } diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java index a200aea2024..7201569b970 100755 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -273,14 +273,14 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac @Inject ConfigDepot _configDepot; - protected List _hostAllocators; + protected List hostAllocators; public List getHostAllocators() { - return _hostAllocators; + return hostAllocators; } - public void setHostAllocators(List _hostAllocators) { - this._hostAllocators = _hostAllocators; + public void setHostAllocators(List hostAllocators) { + this.hostAllocators = hostAllocators; } protected List _storagePoolAllocators; @@ -699,6 +699,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac @Override public void advanceStart(String vmUuid, Map params) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException { + advanceStart(vmUuid, params, null); } @@ -964,15 +965,15 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac s_logger.info("The guru did not like the answers so stopping " + vm); } - StopCommand cmd = new StopCommand(vm, ExecuteInSequence.value()); - StopAnswer answer = (StopAnswer) _agentMgr.easySend(destHostId, cmd); - if ( answer != null ) { + StopCommand cmd = new StopCommand(vm, ExecuteInSequence.value()); + StopAnswer answer = (StopAnswer)_agentMgr.easySend(destHostId, cmd); + if (answer != null) { if (vm.getType() == VirtualMachine.Type.User) { String platform = answer.getPlatform(); if (platform != null) { UserVmVO userVm = _userVmDao.findById(vm.getId()); _userVmDao.loadDetails(userVm); - userVm.setDetail("platform", platform); + userVm.setDetail("platform", platform); _userVmDao.saveDetails(userVm); } } @@ -1128,14 +1129,14 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac VirtualMachine vm = profile.getVirtualMachine(); StopCommand stop = new StopCommand(vm, ExecuteInSequence.value()); try { - StopAnswer answer = (StopAnswer) _agentMgr.send(vm.getHostId(), stop); - if ( answer != null ) { + StopAnswer answer = (StopAnswer)_agentMgr.send(vm.getHostId(), stop); + if (answer != null) { if (vm.getType() == VirtualMachine.Type.User) { String platform = answer.getPlatform(); if (platform != null) { UserVmVO userVm = _userVmDao.findById(vm.getId()); _userVmDao.loadDetails(userVm); - userVm.setDetail("platform", platform); + userVm.setDetail("platform", platform); _userVmDao.saveDetails(userVm); } } @@ -1368,13 +1369,13 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac StopAnswer answer = null; try { answer = (StopAnswer)_agentMgr.send(vm.getHostId(), stop); - if ( answer != null ) { + if (answer != null) { if (vm.getType() == VirtualMachine.Type.User) { String platform = answer.getPlatform(); - if ( platform != null) { + if (platform != null) { UserVmVO userVm = _userVmDao.findById(vm.getId()); _userVmDao.loadDetails(userVm); - userVm.setDetail("platform", platform); + userVm.setDetail("platform", platform); _userVmDao.saveDetails(userVm); } } @@ -1515,7 +1516,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac return true; } - + @Override public void storageMigration(String vmUuid, StoragePool destPool) { AsyncJobExecutionContext jobContext = AsyncJobExecutionContext.getCurrentExecutionContext(); @@ -2129,7 +2130,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac @Override public boolean isVirtualMachineUpgradable(VirtualMachine vm, ServiceOffering offering) { boolean isMachineUpgradable = true; - for (HostAllocator allocator : _hostAllocators) { + for (HostAllocator allocator : hostAllocators) { isMachineUpgradable = allocator.isVirtualMachineUpgradable(vm, offering); if (isMachineUpgradable) continue; @@ -2570,11 +2571,11 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac vm.getHostId() + "] stopped due to storage failure."); } // track platform info - if( info.platform != null && !info.platform.isEmpty() ) { + if (info.platform != null && !info.platform.isEmpty()) { if (vm.getType() == VirtualMachine.Type.User) { UserVmVO userVm = _userVmDao.findById(vm.getId()); _userVmDao.loadDetails(userVm); - userVm.setDetail("platform", info.platform); + userVm.setDetail("platform", info.platform); _userVmDao.saveDetails(userVm); } } @@ -2972,7 +2973,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac this.vm = vm; hostUuid = host; this.platform = platform; - + } public AgentVmInfo(String name, VMInstanceVO vm, State state, String host) { @@ -2986,7 +2987,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac public String getHostUuid() { return hostUuid; } - + public String getPlatform() { return platform; } @@ -3777,8 +3778,9 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac @Override public ConfigKey[] getConfigKeys() { - return new ConfigKey[] {ClusterDeltaSyncInterval, StartRetry, VmDestroyForcestop, VmOpCancelInterval, VmOpCleanupInterval, VmOpCleanupWait, VmOpLockStateRetry, - VmOpWaitInterval, ExecuteInSequence, VmJobCheckInterval, VmJobTimeout, VmJobStateReportInterval}; + return new ConfigKey[] {ClusterDeltaSyncInterval, StartRetry, VmDestroyForcestop, VmOpCancelInterval, VmOpCleanupInterval, VmOpCleanupWait, + VmOpLockStateRetry, + VmOpWaitInterval, ExecuteInSequence, VmJobCheckInterval, VmJobTimeout, VmJobStateReportInterval}; } public List getStoragePoolAllocators() { @@ -3832,10 +3834,10 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac private void handlePowerOnReportWithNoPendingJobsOnVM(VMInstanceVO vm) { // - // 1) handle left-over transitional VM states - // 2) handle out of band VM live migration - // 3) handle out of sync stationary states, marking VM from Stopped to Running with - // alert messages + // 1) handle left-over transitional VM states + // 2) handle out of band VM live migration + // 3) handle out of sync stationary states, marking VM from Stopped to Running with + // alert messages // switch (vm.getState()) { case Starting: @@ -3897,8 +3899,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac private void handlePowerOffReportWithNoPendingJobsOnVM(VMInstanceVO vm) { - // 1) handle left-over transitional VM states - // 2) handle out of sync stationary states, schedule force-stop to release resources + // 1) handle left-over transitional VM states + // 2) handle out of sync stationary states, schedule force-stop to release resources // switch (vm.getState()) { case Starting: @@ -3933,8 +3935,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac // VMs in expunging state (this need to be handled specially) // // checking condition - // 1) no pending VmWork job - // 2) on hostId host and host is UP + // 1) no pending VmWork job + // 2) on hostId host and host is UP // // When host is UP, soon or later we will get a report from the host about the VM, // however, if VM is missing from the host report (it may happen in out of band changes @@ -4136,65 +4138,65 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac } return null; } - + // // TODO build a common pattern to reduce code duplication in following methods // no time for this at current iteration // public Outcome startVmThroughJobQueue(final String vmUuid, - final Map params, - final DeploymentPlan planToDeploy) { - - final CallContext context = CallContext.current(); + final Map params, + final DeploymentPlan planToDeploy) { + + final CallContext context = CallContext.current(); final User callingUser = context.getCallingUser(); final Account callingAccount = context.getCallingAccount(); final VMInstanceVO vm = _vmDao.findByUuid(vmUuid); - Transaction.execute(new TransactionCallbackNoReturn () { - @Override + Transaction.execute(new TransactionCallbackNoReturn() { + @Override public void doInTransactionWithoutResult(TransactionStatus status) { - VmWorkJobVO workJob = null; - - _vmDao.lockRow(vm.getId(), true); - List pendingWorkJobs = _workJobDao.listPendingWorkJobs(VirtualMachine.Type.Instance, - vm.getId(), VmWorkStart.class.getName()); - - if (pendingWorkJobs.size() > 0) { - assert (pendingWorkJobs.size() == 1); - workJob = pendingWorkJobs.get(0); - } else { - workJob = new VmWorkJobVO(context.getContextId()); + VmWorkJobVO workJob = null; - workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkStart.class.getName()); + _vmDao.lockRow(vm.getId(), true); + List pendingWorkJobs = _workJobDao.listPendingWorkJobs(VirtualMachine.Type.Instance, + vm.getId(), VmWorkStart.class.getName()); - workJob.setAccountId(callingAccount.getId()); - workJob.setUserId(callingUser.getId()); - workJob.setStep(VmWorkJobVO.Step.Starting); - workJob.setVmType(vm.getType()); - workJob.setVmInstanceId(vm.getId()); + if (pendingWorkJobs.size() > 0) { + assert (pendingWorkJobs.size() == 1); + workJob = pendingWorkJobs.get(0); + } else { + workJob = new VmWorkJobVO(context.getContextId()); - // save work context info (there are some duplications) - VmWorkStart workInfo = new VmWorkStart(callingUser.getId(), callingAccount.getId(), vm.getId()); - workInfo.setPlan(planToDeploy); - workInfo.setParams(params); - workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); + workJob.setCmd(VmWorkStart.class.getName()); + + workJob.setAccountId(callingAccount.getId()); + workJob.setUserId(callingUser.getId()); + workJob.setStep(VmWorkJobVO.Step.Starting); + workJob.setVmType(vm.getType()); + workJob.setVmInstanceId(vm.getId()); + + // save work context info (there are some duplications) + VmWorkStart workInfo = new VmWorkStart(callingUser.getId(), callingAccount.getId(), vm.getId()); + workInfo.setPlan(planToDeploy); + workInfo.setParams(params); + workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + + _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); + } + + // Transaction syntax sugar has a cost here + context.putContextParameter("workJob", workJob); + context.putContextParameter("jobId", new Long(workJob.getId())); + } + }); + + final long jobId = (Long)context.getContextParameter("jobId"); + AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); - } - - // Transaction syntax sugar has a cost here - context.putContextParameter("workJob", workJob); - context.putContextParameter("jobId", new Long(workJob.getId())); - } - }); - - final long jobId = (Long)context.getContextParameter("jobId"); - AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - return new VmStateSyncOutcome((VmWorkJobVO)context.getContextParameter("workJob"), - VirtualMachine.PowerState.PowerOn, vm.getId(), null); + VirtualMachine.PowerState.PowerOn, vm.getId(), null); } public Outcome stopVmThroughJobQueue(final String vmUuid, final boolean cleanup) { @@ -4203,49 +4205,49 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final User user = context.getCallingUser(); final VMInstanceVO vm = _vmDao.findByUuid(vmUuid); - - Transaction.execute(new TransactionCallbackNoReturn () { - @Override - public void doInTransactionWithoutResult(TransactionStatus status) { - _vmDao.lockRow(vm.getId(), true); - - List pendingWorkJobs = _workJobDao.listPendingWorkJobs( - VirtualMachine.Type.Instance, vm.getId(), - VmWorkStop.class.getName()); - - VmWorkJobVO workJob = null; - if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { - assert (pendingWorkJobs.size() == 1); - workJob = pendingWorkJobs.get(0); - } else { - workJob = new VmWorkJobVO(context.getContextId()); - - workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkStop.class.getName()); - - workJob.setAccountId(account.getId()); - workJob.setUserId(user.getId()); - workJob.setStep(VmWorkJobVO.Step.Prepare); - workJob.setVmType(vm.getType()); - workJob.setVmInstanceId(vm.getId()); - - // save work context info (there are some duplications) - VmWorkStop workInfo = new VmWorkStop(user.getId(), account.getId(), vm.getId(), cleanup); - workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); - - _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); - } - - context.putContextParameter("workJob", workJob); - context.putContextParameter("jobId", new Long(workJob.getId())); - } - }); - final long jobId = (Long)context.getContextParameter("jobId"); - AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - + Transaction.execute(new TransactionCallbackNoReturn() { + @Override + public void doInTransactionWithoutResult(TransactionStatus status) { + _vmDao.lockRow(vm.getId(), true); + + List pendingWorkJobs = _workJobDao.listPendingWorkJobs( + VirtualMachine.Type.Instance, vm.getId(), + VmWorkStop.class.getName()); + + VmWorkJobVO workJob = null; + if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { + assert (pendingWorkJobs.size() == 1); + workJob = pendingWorkJobs.get(0); + } else { + workJob = new VmWorkJobVO(context.getContextId()); + + workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); + workJob.setCmd(VmWorkStop.class.getName()); + + workJob.setAccountId(account.getId()); + workJob.setUserId(user.getId()); + workJob.setStep(VmWorkJobVO.Step.Prepare); + workJob.setVmType(vm.getType()); + workJob.setVmInstanceId(vm.getId()); + + // save work context info (there are some duplications) + VmWorkStop workInfo = new VmWorkStop(user.getId(), account.getId(), vm.getId(), cleanup); + workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + + _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); + } + + context.putContextParameter("workJob", workJob); + context.putContextParameter("jobId", new Long(workJob.getId())); + } + }); + + final long jobId = (Long)context.getContextParameter("jobId"); + AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); + return new VmStateSyncOutcome((VmWorkJobVO)context.getContextParameter("workJob"), - VirtualMachine.PowerState.PowerOff, vm.getId(), null); + VirtualMachine.PowerState.PowerOff, vm.getId(), null); } public Outcome rebootVmThroughJobQueue(final String vmUuid, @@ -4256,49 +4258,49 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final User user = context.getCallingUser(); final VMInstanceVO vm = _vmDao.findByUuid(vmUuid); - - Transaction.execute(new TransactionCallbackNoReturn () { - @Override - public void doInTransactionWithoutResult(TransactionStatus status) { - _vmDao.lockRow(vm.getId(), true); - - List pendingWorkJobs = _workJobDao.listPendingWorkJobs( - VirtualMachine.Type.Instance, vm.getId(), - VmWorkReboot.class.getName()); - - VmWorkJobVO workJob = null; - if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { - assert (pendingWorkJobs.size() == 1); - workJob = pendingWorkJobs.get(0); - } else { - workJob = new VmWorkJobVO(context.getContextId()); - - workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkReboot.class.getName()); - - workJob.setAccountId(account.getId()); - workJob.setUserId(user.getId()); - workJob.setStep(VmWorkJobVO.Step.Prepare); - workJob.setVmType(vm.getType()); - workJob.setVmInstanceId(vm.getId()); - - // save work context info (there are some duplications) - VmWorkReboot workInfo = new VmWorkReboot(user.getId(), account.getId(), vm.getId(), params); - workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); - - _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); - } - - context.putContextParameter("workJob", workJob); - context.putContextParameter("jobId", new Long(workJob.getId())); - } - }); - final long jobId = (Long)context.getContextParameter("jobId"); - AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - + Transaction.execute(new TransactionCallbackNoReturn() { + @Override + public void doInTransactionWithoutResult(TransactionStatus status) { + _vmDao.lockRow(vm.getId(), true); + + List pendingWorkJobs = _workJobDao.listPendingWorkJobs( + VirtualMachine.Type.Instance, vm.getId(), + VmWorkReboot.class.getName()); + + VmWorkJobVO workJob = null; + if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { + assert (pendingWorkJobs.size() == 1); + workJob = pendingWorkJobs.get(0); + } else { + workJob = new VmWorkJobVO(context.getContextId()); + + workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); + workJob.setCmd(VmWorkReboot.class.getName()); + + workJob.setAccountId(account.getId()); + workJob.setUserId(user.getId()); + workJob.setStep(VmWorkJobVO.Step.Prepare); + workJob.setVmType(vm.getType()); + workJob.setVmInstanceId(vm.getId()); + + // save work context info (there are some duplications) + VmWorkReboot workInfo = new VmWorkReboot(user.getId(), account.getId(), vm.getId(), params); + workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + + _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); + } + + context.putContextParameter("workJob", workJob); + context.putContextParameter("jobId", new Long(workJob.getId())); + } + }); + + final long jobId = (Long)context.getContextParameter("jobId"); + AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); + return new VmJobSyncOutcome((VmWorkJobVO)context.getContextParameter("workJob"), - vm.getId()); + vm.getId()); } public Outcome migrateVmThroughJobQueue(final String vmUuid, final long srcHostId, final DeployDestination dest) { @@ -4308,48 +4310,48 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final VMInstanceVO vm = _vmDao.findByUuid(vmUuid); - Transaction.execute(new TransactionCallbackNoReturn () { - @Override + Transaction.execute(new TransactionCallbackNoReturn() { + @Override public void doInTransactionWithoutResult(TransactionStatus status) { - - _vmDao.lockRow(vm.getId(), true); - - List pendingWorkJobs = _workJobDao.listPendingWorkJobs( - VirtualMachine.Type.Instance, vm.getId(), - VmWorkMigrate.class.getName()); - - VmWorkJobVO workJob = null; - if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { - assert (pendingWorkJobs.size() == 1); - workJob = pendingWorkJobs.get(0); - } else { - - workJob = new VmWorkJobVO(context.getContextId()); - - workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkMigrate.class.getName()); - - workJob.setAccountId(account.getId()); - workJob.setUserId(user.getId()); - workJob.setVmType(vm.getType()); - workJob.setVmInstanceId(vm.getId()); - - // save work context info (there are some duplications) - VmWorkMigrate workInfo = new VmWorkMigrate(user.getId(), account.getId(), vm.getId(), srcHostId, dest); - workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); - - _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); - } - context.putContextParameter("workJob", workJob); - context.putContextParameter("jobId", new Long(workJob.getId())); - } - }); - - final long jobId = (Long)context.getContextParameter("jobId"); - AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - + + _vmDao.lockRow(vm.getId(), true); + + List pendingWorkJobs = _workJobDao.listPendingWorkJobs( + VirtualMachine.Type.Instance, vm.getId(), + VmWorkMigrate.class.getName()); + + VmWorkJobVO workJob = null; + if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { + assert (pendingWorkJobs.size() == 1); + workJob = pendingWorkJobs.get(0); + } else { + + workJob = new VmWorkJobVO(context.getContextId()); + + workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); + workJob.setCmd(VmWorkMigrate.class.getName()); + + workJob.setAccountId(account.getId()); + workJob.setUserId(user.getId()); + workJob.setVmType(vm.getType()); + workJob.setVmInstanceId(vm.getId()); + + // save work context info (there are some duplications) + VmWorkMigrate workInfo = new VmWorkMigrate(user.getId(), account.getId(), vm.getId(), srcHostId, dest); + workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + + _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); + } + context.putContextParameter("workJob", workJob); + context.putContextParameter("jobId", new Long(workJob.getId())); + } + }); + + final long jobId = (Long)context.getContextParameter("jobId"); + AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); + return new VmStateSyncOutcome((VmWorkJobVO)context.getContextParameter("workJob"), - VirtualMachine.PowerState.PowerOn, vm.getId(), vm.getPowerHostId()); + VirtualMachine.PowerState.PowerOn, vm.getId(), vm.getPowerHostId()); } public Outcome migrateVmWithStorageThroughJobQueue( @@ -4362,51 +4364,51 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final VMInstanceVO vm = _vmDao.findByUuid(vmUuid); - Transaction.execute(new TransactionCallbackNoReturn () { - @Override + Transaction.execute(new TransactionCallbackNoReturn() { + @Override public void doInTransactionWithoutResult(TransactionStatus status) { - - _vmDao.lockRow(vm.getId(), true); - - List pendingWorkJobs = _workJobDao.listPendingWorkJobs( - VirtualMachine.Type.Instance, vm.getId(), - VmWorkMigrateWithStorage.class.getName()); - - VmWorkJobVO workJob = null; - if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { - assert (pendingWorkJobs.size() == 1); - workJob = pendingWorkJobs.get(0); - } else { - - workJob = new VmWorkJobVO(context.getContextId()); - - workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkMigrate.class.getName()); - - workJob.setAccountId(account.getId()); - workJob.setUserId(user.getId()); - workJob.setVmType(vm.getType()); - workJob.setVmInstanceId(vm.getId()); - - // save work context info (there are some duplications) - VmWorkMigrateWithStorage workInfo = new VmWorkMigrateWithStorage(user.getId(), account.getId(), vm.getId(), - srcHostId, destHostId, volumeToPool); - workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); - - _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); - } - context.putContextParameter("workJob", workJob); - context.putContextParameter("jobId", new Long(workJob.getId())); - } - }); - - final long jobId = (Long)context.getContextParameter("jobId"); - AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - + + _vmDao.lockRow(vm.getId(), true); + + List pendingWorkJobs = _workJobDao.listPendingWorkJobs( + VirtualMachine.Type.Instance, vm.getId(), + VmWorkMigrateWithStorage.class.getName()); + + VmWorkJobVO workJob = null; + if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { + assert (pendingWorkJobs.size() == 1); + workJob = pendingWorkJobs.get(0); + } else { + + workJob = new VmWorkJobVO(context.getContextId()); + + workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); + workJob.setCmd(VmWorkMigrate.class.getName()); + + workJob.setAccountId(account.getId()); + workJob.setUserId(user.getId()); + workJob.setVmType(vm.getType()); + workJob.setVmInstanceId(vm.getId()); + + // save work context info (there are some duplications) + VmWorkMigrateWithStorage workInfo = new VmWorkMigrateWithStorage(user.getId(), account.getId(), vm.getId(), + srcHostId, destHostId, volumeToPool); + workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + + _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); + } + context.putContextParameter("workJob", workJob); + context.putContextParameter("jobId", new Long(workJob.getId())); + } + }); + + final long jobId = (Long)context.getContextParameter("jobId"); + AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); + return new VmStateSyncOutcome((VmWorkJobVO)context.getContextParameter("workJob"), - VirtualMachine.PowerState.PowerOn, vm.getId(), destHostId); + VirtualMachine.PowerState.PowerOn, vm.getId(), destHostId); } - + public Outcome migrateVmForScaleThroughJobQueue( final String vmUuid, final long srcHostId, final DeployDestination dest, final Long newSvcOfferingId) { @@ -4416,47 +4418,47 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final VMInstanceVO vm = _vmDao.findByUuid(vmUuid); - Transaction.execute(new TransactionCallbackNoReturn () { - @Override + Transaction.execute(new TransactionCallbackNoReturn() { + @Override public void doInTransactionWithoutResult(TransactionStatus status) { - - _vmDao.lockRow(vm.getId(), true); - - List pendingWorkJobs = _workJobDao.listPendingWorkJobs( - VirtualMachine.Type.Instance, vm.getId(), - VmWorkMigrateForScale.class.getName()); - - VmWorkJobVO workJob = null; - if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { - assert (pendingWorkJobs.size() == 1); - workJob = pendingWorkJobs.get(0); - } else { - - workJob = new VmWorkJobVO(context.getContextId()); - - workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkMigrate.class.getName()); - - workJob.setAccountId(account.getId()); - workJob.setUserId(user.getId()); - workJob.setVmType(vm.getType()); - workJob.setVmInstanceId(vm.getId()); - - // save work context info (there are some duplications) - VmWorkMigrateForScale workInfo = new VmWorkMigrateForScale(user.getId(), account.getId(), vm.getId(), - srcHostId, dest, newSvcOfferingId); - workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); - - _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); - } - context.putContextParameter("workJob", workJob); - context.putContextParameter("jobId", new Long(workJob.getId())); - } - }); - - final long jobId = (Long)context.getContextParameter("jobId"); - AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - + + _vmDao.lockRow(vm.getId(), true); + + List pendingWorkJobs = _workJobDao.listPendingWorkJobs( + VirtualMachine.Type.Instance, vm.getId(), + VmWorkMigrateForScale.class.getName()); + + VmWorkJobVO workJob = null; + if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { + assert (pendingWorkJobs.size() == 1); + workJob = pendingWorkJobs.get(0); + } else { + + workJob = new VmWorkJobVO(context.getContextId()); + + workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); + workJob.setCmd(VmWorkMigrate.class.getName()); + + workJob.setAccountId(account.getId()); + workJob.setUserId(user.getId()); + workJob.setVmType(vm.getType()); + workJob.setVmInstanceId(vm.getId()); + + // save work context info (there are some duplications) + VmWorkMigrateForScale workInfo = new VmWorkMigrateForScale(user.getId(), account.getId(), vm.getId(), + srcHostId, dest, newSvcOfferingId); + workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + + _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); + } + context.putContextParameter("workJob", workJob); + context.putContextParameter("jobId", new Long(workJob.getId())); + } + }); + + final long jobId = (Long)context.getContextParameter("jobId"); + AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); + return new VmJobSyncOutcome((VmWorkJobVO)context.getContextParameter("workJob"), vm.getId()); } @@ -4469,47 +4471,47 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final VMInstanceVO vm = _vmDao.findByUuid(vmUuid); - Transaction.execute(new TransactionCallbackNoReturn () { - @Override + Transaction.execute(new TransactionCallbackNoReturn() { + @Override public void doInTransactionWithoutResult(TransactionStatus status) { - - _vmDao.lockRow(vm.getId(), true); - - List pendingWorkJobs = _workJobDao.listPendingWorkJobs( - VirtualMachine.Type.Instance, vm.getId(), - VmWorkStorageMigration.class.getName()); - - VmWorkJobVO workJob = null; - if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { - assert (pendingWorkJobs.size() == 1); - workJob = pendingWorkJobs.get(0); - } else { - - workJob = new VmWorkJobVO(context.getContextId()); - - workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkStorageMigration.class.getName()); - - workJob.setAccountId(account.getId()); - workJob.setUserId(user.getId()); - workJob.setVmType(vm.getType()); - workJob.setVmInstanceId(vm.getId()); - - // save work context info (there are some duplications) - VmWorkStorageMigration workInfo = new VmWorkStorageMigration(user.getId(), account.getId(), vm.getId(), - destPool); - workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); - - _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); - } - context.putContextParameter("workJob", workJob); - context.putContextParameter("jobId", new Long(workJob.getId())); - } - }); - - final long jobId = (Long)context.getContextParameter("jobId"); - AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - + + _vmDao.lockRow(vm.getId(), true); + + List pendingWorkJobs = _workJobDao.listPendingWorkJobs( + VirtualMachine.Type.Instance, vm.getId(), + VmWorkStorageMigration.class.getName()); + + VmWorkJobVO workJob = null; + if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { + assert (pendingWorkJobs.size() == 1); + workJob = pendingWorkJobs.get(0); + } else { + + workJob = new VmWorkJobVO(context.getContextId()); + + workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); + workJob.setCmd(VmWorkStorageMigration.class.getName()); + + workJob.setAccountId(account.getId()); + workJob.setUserId(user.getId()); + workJob.setVmType(vm.getType()); + workJob.setVmInstanceId(vm.getId()); + + // save work context info (there are some duplications) + VmWorkStorageMigration workInfo = new VmWorkStorageMigration(user.getId(), account.getId(), vm.getId(), + destPool); + workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + + _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); + } + context.putContextParameter("workJob", workJob); + context.putContextParameter("jobId", new Long(workJob.getId())); + } + }); + + final long jobId = (Long)context.getContextParameter("jobId"); + AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); + return new VmJobSyncOutcome((VmWorkJobVO)context.getContextParameter("workJob"), vm.getId()); } @@ -4520,47 +4522,47 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final User user = context.getCallingUser(); final Account account = context.getCallingAccount(); - Transaction.execute(new TransactionCallbackNoReturn () { - @Override + Transaction.execute(new TransactionCallbackNoReturn() { + @Override public void doInTransactionWithoutResult(TransactionStatus status) { - - _vmDao.lockRow(vm.getId(), true); - - List pendingWorkJobs = _workJobDao.listPendingWorkJobs( - VirtualMachine.Type.Instance, vm.getId(), - VmWorkAddVmToNetwork.class.getName()); - - VmWorkJobVO workJob = null; - if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { - assert (pendingWorkJobs.size() == 1); - workJob = pendingWorkJobs.get(0); - } else { - - workJob = new VmWorkJobVO(context.getContextId()); - - workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkAddVmToNetwork.class.getName()); - - workJob.setAccountId(account.getId()); - workJob.setUserId(user.getId()); - workJob.setVmType(vm.getType()); - workJob.setVmInstanceId(vm.getId()); - - // save work context info (there are some duplications) - VmWorkAddVmToNetwork workInfo = new VmWorkAddVmToNetwork(user.getId(), account.getId(), vm.getId(), - network, requested); - workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); - - _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); - } - context.putContextParameter("workJob", workJob); - context.putContextParameter("jobId", new Long(workJob.getId())); - } - }); - - final long jobId = (Long)context.getContextParameter("jobId"); - AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - + + _vmDao.lockRow(vm.getId(), true); + + List pendingWorkJobs = _workJobDao.listPendingWorkJobs( + VirtualMachine.Type.Instance, vm.getId(), + VmWorkAddVmToNetwork.class.getName()); + + VmWorkJobVO workJob = null; + if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { + assert (pendingWorkJobs.size() == 1); + workJob = pendingWorkJobs.get(0); + } else { + + workJob = new VmWorkJobVO(context.getContextId()); + + workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); + workJob.setCmd(VmWorkAddVmToNetwork.class.getName()); + + workJob.setAccountId(account.getId()); + workJob.setUserId(user.getId()); + workJob.setVmType(vm.getType()); + workJob.setVmInstanceId(vm.getId()); + + // save work context info (there are some duplications) + VmWorkAddVmToNetwork workInfo = new VmWorkAddVmToNetwork(user.getId(), account.getId(), vm.getId(), + network, requested); + workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + + _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); + } + context.putContextParameter("workJob", workJob); + context.putContextParameter("jobId", new Long(workJob.getId())); + } + }); + + final long jobId = (Long)context.getContextParameter("jobId"); + AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); + return new VmJobSyncOutcome((VmWorkJobVO)context.getContextParameter("workJob"), vm.getId()); } @@ -4571,47 +4573,47 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final User user = context.getCallingUser(); final Account account = context.getCallingAccount(); - Transaction.execute(new TransactionCallbackNoReturn () { - @Override + Transaction.execute(new TransactionCallbackNoReturn() { + @Override public void doInTransactionWithoutResult(TransactionStatus status) { - - _vmDao.lockRow(vm.getId(), true); - - List pendingWorkJobs = _workJobDao.listPendingWorkJobs( - VirtualMachine.Type.Instance, vm.getId(), - VmWorkRemoveNicFromVm.class.getName()); - - VmWorkJobVO workJob = null; - if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { - assert (pendingWorkJobs.size() == 1); - workJob = pendingWorkJobs.get(0); - } else { - - workJob = new VmWorkJobVO(context.getContextId()); - - workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkRemoveNicFromVm.class.getName()); - - workJob.setAccountId(account.getId()); - workJob.setUserId(user.getId()); - workJob.setVmType(vm.getType()); - workJob.setVmInstanceId(vm.getId()); - - // save work context info (there are some duplications) - VmWorkRemoveNicFromVm workInfo = new VmWorkRemoveNicFromVm(user.getId(), account.getId(), vm.getId(), - nic); - workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); - - _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); - } - context.putContextParameter("workJob", workJob); - context.putContextParameter("jobId", new Long(workJob.getId())); - } - }); - - final long jobId = (Long)context.getContextParameter("jobId"); - AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - + + _vmDao.lockRow(vm.getId(), true); + + List pendingWorkJobs = _workJobDao.listPendingWorkJobs( + VirtualMachine.Type.Instance, vm.getId(), + VmWorkRemoveNicFromVm.class.getName()); + + VmWorkJobVO workJob = null; + if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { + assert (pendingWorkJobs.size() == 1); + workJob = pendingWorkJobs.get(0); + } else { + + workJob = new VmWorkJobVO(context.getContextId()); + + workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); + workJob.setCmd(VmWorkRemoveNicFromVm.class.getName()); + + workJob.setAccountId(account.getId()); + workJob.setUserId(user.getId()); + workJob.setVmType(vm.getType()); + workJob.setVmInstanceId(vm.getId()); + + // save work context info (there are some duplications) + VmWorkRemoveNicFromVm workInfo = new VmWorkRemoveNicFromVm(user.getId(), account.getId(), vm.getId(), + nic); + workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + + _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); + } + context.putContextParameter("workJob", workJob); + context.putContextParameter("jobId", new Long(workJob.getId())); + } + }); + + final long jobId = (Long)context.getContextParameter("jobId"); + AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); + return new VmJobSyncOutcome((VmWorkJobVO)context.getContextParameter("workJob"), vm.getId()); } @@ -4622,47 +4624,47 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final User user = context.getCallingUser(); final Account account = context.getCallingAccount(); - Transaction.execute(new TransactionCallbackNoReturn () { - @Override + Transaction.execute(new TransactionCallbackNoReturn() { + @Override public void doInTransactionWithoutResult(TransactionStatus status) { - - _vmDao.lockRow(vm.getId(), true); - - List pendingWorkJobs = _workJobDao.listPendingWorkJobs( - VirtualMachine.Type.Instance, vm.getId(), - VmWorkRemoveVmFromNetwork.class.getName()); - - VmWorkJobVO workJob = null; - if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { - assert (pendingWorkJobs.size() == 1); - workJob = pendingWorkJobs.get(0); - } else { - - workJob = new VmWorkJobVO(context.getContextId()); - - workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkRemoveVmFromNetwork.class.getName()); - - workJob.setAccountId(account.getId()); - workJob.setUserId(user.getId()); - workJob.setVmType(vm.getType()); - workJob.setVmInstanceId(vm.getId()); - - // save work context info (there are some duplications) - VmWorkRemoveVmFromNetwork workInfo = new VmWorkRemoveVmFromNetwork(user.getId(), account.getId(), vm.getId(), - network, broadcastUri); - workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); - - _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); - } - context.putContextParameter("workJob", workJob); - context.putContextParameter("jobId", new Long(workJob.getId())); - } - }); - - final long jobId = (Long)context.getContextParameter("jobId"); - AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - + + _vmDao.lockRow(vm.getId(), true); + + List pendingWorkJobs = _workJobDao.listPendingWorkJobs( + VirtualMachine.Type.Instance, vm.getId(), + VmWorkRemoveVmFromNetwork.class.getName()); + + VmWorkJobVO workJob = null; + if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { + assert (pendingWorkJobs.size() == 1); + workJob = pendingWorkJobs.get(0); + } else { + + workJob = new VmWorkJobVO(context.getContextId()); + + workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); + workJob.setCmd(VmWorkRemoveVmFromNetwork.class.getName()); + + workJob.setAccountId(account.getId()); + workJob.setUserId(user.getId()); + workJob.setVmType(vm.getType()); + workJob.setVmInstanceId(vm.getId()); + + // save work context info (there are some duplications) + VmWorkRemoveVmFromNetwork workInfo = new VmWorkRemoveVmFromNetwork(user.getId(), account.getId(), vm.getId(), + network, broadcastUri); + workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + + _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); + } + context.putContextParameter("workJob", workJob); + context.putContextParameter("jobId", new Long(workJob.getId())); + } + }); + + final long jobId = (Long)context.getContextParameter("jobId"); + AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); + return new VmJobSyncOutcome((VmWorkJobVO)context.getContextParameter("workJob"), vm.getId()); } @@ -4675,47 +4677,47 @@ public class VirtualMachineManagerImpl extends ManagerBase implements VirtualMac final VMInstanceVO vm = _vmDao.findByUuid(vmUuid); - Transaction.execute(new TransactionCallbackNoReturn () { - @Override + Transaction.execute(new TransactionCallbackNoReturn() { + @Override public void doInTransactionWithoutResult(TransactionStatus status) { - - _vmDao.lockRow(vm.getId(), true); - - List pendingWorkJobs = _workJobDao.listPendingWorkJobs( - VirtualMachine.Type.Instance, vm.getId(), - VmWorkReconfigure.class.getName()); - - VmWorkJobVO workJob = null; - if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { - assert (pendingWorkJobs.size() == 1); - workJob = pendingWorkJobs.get(0); - } else { - - workJob = new VmWorkJobVO(context.getContextId()); - - workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); - workJob.setCmd(VmWorkReconfigure.class.getName()); - - workJob.setAccountId(account.getId()); - workJob.setUserId(user.getId()); - workJob.setVmType(vm.getType()); - workJob.setVmInstanceId(vm.getId()); - - // save work context info (there are some duplications) - VmWorkReconfigure workInfo = new VmWorkReconfigure(user.getId(), account.getId(), vm.getId(), - oldServiceOffering, reconfiguringOnExistingHost); - workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); - - _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); - } - context.putContextParameter("workJob", workJob); - context.putContextParameter("jobId", new Long(workJob.getId())); - } - }); - - final long jobId = (Long)context.getContextParameter("jobId"); - AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); - + + _vmDao.lockRow(vm.getId(), true); + + List pendingWorkJobs = _workJobDao.listPendingWorkJobs( + VirtualMachine.Type.Instance, vm.getId(), + VmWorkReconfigure.class.getName()); + + VmWorkJobVO workJob = null; + if (pendingWorkJobs != null && pendingWorkJobs.size() > 0) { + assert (pendingWorkJobs.size() == 1); + workJob = pendingWorkJobs.get(0); + } else { + + workJob = new VmWorkJobVO(context.getContextId()); + + workJob.setDispatcher(VmWorkJobDispatcher.VM_WORK_JOB_DISPATCHER); + workJob.setCmd(VmWorkReconfigure.class.getName()); + + workJob.setAccountId(account.getId()); + workJob.setUserId(user.getId()); + workJob.setVmType(vm.getType()); + workJob.setVmInstanceId(vm.getId()); + + // save work context info (there are some duplications) + VmWorkReconfigure workInfo = new VmWorkReconfigure(user.getId(), account.getId(), vm.getId(), + oldServiceOffering, reconfiguringOnExistingHost); + workJob.setCmdInfo(VmWorkSerializer.serialize(workInfo)); + + _jobMgr.submitAsyncJob(workJob, VmWorkJobDispatcher.VM_WORK_QUEUE, vm.getId()); + } + context.putContextParameter("workJob", workJob); + context.putContextParameter("jobId", new Long(workJob.getId())); + } + }); + + final long jobId = (Long)context.getContextParameter("jobId"); + AsyncJobExecutionContext.getCurrentExecutionContext().joinJob(jobId); + return new VmJobSyncOutcome((VmWorkJobVO)context.getContextParameter("workJob"), vm.getId()); } diff --git a/engine/orchestration/src/com/cloud/vm/VirtualMachinePowerStateSync.java b/engine/orchestration/src/com/cloud/vm/VirtualMachinePowerStateSync.java index dacc8d09067..f84c7b72a93 100644 --- a/engine/orchestration/src/com/cloud/vm/VirtualMachinePowerStateSync.java +++ b/engine/orchestration/src/com/cloud/vm/VirtualMachinePowerStateSync.java @@ -5,7 +5,7 @@ // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, @@ -21,11 +21,11 @@ import java.util.Map; import com.cloud.agent.api.HostVmStateReportEntry; public interface VirtualMachinePowerStateSync { - - void resetHostSyncState(long hostId); - - void processHostVmStateReport(long hostId, Map report); - - // to adapt legacy ping report - void processHostVmStatePingReport(long hostId, Map report); + + void resetHostSyncState(long hostId); + + void processHostVmStateReport(long hostId, Map report); + + // to adapt legacy ping report + void processHostVmStatePingReport(long hostId, Map report); } diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkAddVmToNetwork.java b/engine/orchestration/src/com/cloud/vm/VmWorkAddVmToNetwork.java index 3590c0d21f3..97396f12693 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkAddVmToNetwork.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkAddVmToNetwork.java @@ -19,24 +19,24 @@ package com.cloud.vm; import com.cloud.network.Network; public class VmWorkAddVmToNetwork extends VmWork { - private static final long serialVersionUID = 8861516006586736813L; + private static final long serialVersionUID = 8861516006586736813L; - Network network; - NicProfile requstedNicProfile; - - public VmWorkAddVmToNetwork(long userId, long accountId, long vmId, - Network network, NicProfile requested) { - super(userId, accountId, vmId); - - this.network = network; - this.requstedNicProfile = requested; - } - - public Network getNetwork() { - return this.network; - } - - public NicProfile getRequestedNicProfile() { - return this.requstedNicProfile; - } + Network network; + NicProfile requstedNicProfile; + + public VmWorkAddVmToNetwork(long userId, long accountId, long vmId, + Network network, NicProfile requested) { + super(userId, accountId, vmId); + + this.network = network; + this.requstedNicProfile = requested; + } + + public Network getNetwork() { + return this.network; + } + + public NicProfile getRequestedNicProfile() { + return this.requstedNicProfile; + } } diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkJobDispatcher.java b/engine/orchestration/src/com/cloud/vm/VmWorkJobDispatcher.java index 7c36d8c28d5..7534363b921 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkJobDispatcher.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkJobDispatcher.java @@ -35,118 +35,121 @@ public class VmWorkJobDispatcher extends AdapterBase implements AsyncJobDispatch public static final String VM_WORK_QUEUE = "VmWorkJobQueue"; public static final String VM_WORK_JOB_DISPATCHER = "VmWorkJobDispatcher"; public static final String VM_WORK_JOB_WAKEUP_DISPATCHER = "VmWorkJobWakeupDispatcher"; - - @Inject private VirtualMachineManagerImpl _vmMgr; - @Inject private AsyncJobManager _asyncJobMgr; - @Inject private VMInstanceDao _instanceDao; - - @Override + + @Inject + private VirtualMachineManagerImpl _vmMgr; + @Inject + private AsyncJobManager _asyncJobMgr; + @Inject + private VMInstanceDao _instanceDao; + + @Override public void runJob(AsyncJob job) { VmWork work = null; try { - String cmd = job.getCmd(); - assert(cmd != null); - - if(s_logger.isDebugEnabled()) - s_logger.debug("Run VM work job: " + cmd); - - Class workClz = null; - try { - workClz = Class.forName(job.getCmd()); - } catch(ClassNotFoundException e) { - s_logger.error("VM work class " + cmd + " is not found", e); + String cmd = job.getCmd(); + assert (cmd != null); + + if (s_logger.isDebugEnabled()) + s_logger.debug("Run VM work job: " + cmd); + + Class workClz = null; + try { + workClz = Class.forName(job.getCmd()); + } catch (ClassNotFoundException e) { + s_logger.error("VM work class " + cmd + " is not found", e); _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.FAILED, 0, e.getMessage()); - return; - } - - work = VmWorkSerializer.deserialize(workClz, job.getCmdInfo()); - assert(work != null); - if(work == null) { - s_logger.error("Unable to deserialize VM work " + job.getCmd() + ", job info: " + job.getCmdInfo()); - _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.FAILED, 0, "Unable to deserialize VM work"); - return; + return; } - + + work = VmWorkSerializer.deserialize(workClz, job.getCmdInfo()); + assert (work != null); + if (work == null) { + s_logger.error("Unable to deserialize VM work " + job.getCmd() + ", job info: " + job.getCmdInfo()); + _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.FAILED, 0, "Unable to deserialize VM work"); + return; + } + CallContext.register(work.getUserId(), work.getAccountId(), job.getRelated()); VMInstanceVO vm = _instanceDao.findById(work.getVmId()); if (vm == null) { s_logger.info("Unable to find vm " + work.getVmId()); } - assert(vm != null); - if(work instanceof VmWorkStart) { - VmWorkStart workStart = (VmWorkStart)work; - _vmMgr.orchestrateStart(vm.getUuid(), workStart.getParams(), workStart.getPlan()); + assert (vm != null); + if (work instanceof VmWorkStart) { + VmWorkStart workStart = (VmWorkStart)work; + _vmMgr.orchestrateStart(vm.getUuid(), workStart.getParams(), workStart.getPlan()); _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, null); - } else if(work instanceof VmWorkStop) { - VmWorkStop workStop = (VmWorkStop)work; - _vmMgr.orchestrateStop(vm.getUuid(), workStop.isCleanup()); + } else if (work instanceof VmWorkStop) { + VmWorkStop workStop = (VmWorkStop)work; + _vmMgr.orchestrateStop(vm.getUuid(), workStop.isCleanup()); _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, null); - } else if(work instanceof VmWorkMigrate) { - VmWorkMigrate workMigrate = (VmWorkMigrate)work; - _vmMgr.orchestrateMigrate(vm.getUuid(), workMigrate.getSrcHostId(), workMigrate.getDeployDestination()); + } else if (work instanceof VmWorkMigrate) { + VmWorkMigrate workMigrate = (VmWorkMigrate)work; + _vmMgr.orchestrateMigrate(vm.getUuid(), workMigrate.getSrcHostId(), workMigrate.getDeployDestination()); _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, null); - } else if(work instanceof VmWorkMigrateWithStorage) { - VmWorkMigrateWithStorage workMigrateWithStorage = (VmWorkMigrateWithStorage)work; - _vmMgr.orchestrateMigrateWithStorage(vm.getUuid(), - workMigrateWithStorage.getSrcHostId(), - workMigrateWithStorage.getDestHostId(), - workMigrateWithStorage.getVolumeToPool()); + } else if (work instanceof VmWorkMigrateWithStorage) { + VmWorkMigrateWithStorage workMigrateWithStorage = (VmWorkMigrateWithStorage)work; + _vmMgr.orchestrateMigrateWithStorage(vm.getUuid(), + workMigrateWithStorage.getSrcHostId(), + workMigrateWithStorage.getDestHostId(), + workMigrateWithStorage.getVolumeToPool()); _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, null); - } else if(work instanceof VmWorkMigrateForScale) { - VmWorkMigrateForScale workMigrateForScale = (VmWorkMigrateForScale)work; - _vmMgr.orchestrateMigrateForScale(vm.getUuid(), - workMigrateForScale.getSrcHostId(), - workMigrateForScale.getDeployDestination(), - workMigrateForScale.getNewServiceOfferringId()); + } else if (work instanceof VmWorkMigrateForScale) { + VmWorkMigrateForScale workMigrateForScale = (VmWorkMigrateForScale)work; + _vmMgr.orchestrateMigrateForScale(vm.getUuid(), + workMigrateForScale.getSrcHostId(), + workMigrateForScale.getDeployDestination(), + workMigrateForScale.getNewServiceOfferringId()); _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, null); - } else if(work instanceof VmWorkReboot) { + } else if (work instanceof VmWorkReboot) { VmWorkReboot workReboot = (VmWorkReboot)work; _vmMgr.orchestrateReboot(vm.getUuid(), workReboot.getParams()); _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, null); - } else if(work instanceof VmWorkAddVmToNetwork) { + } else if (work instanceof VmWorkAddVmToNetwork) { VmWorkAddVmToNetwork workAddVmToNetwork = (VmWorkAddVmToNetwork)work; - NicProfile nic = _vmMgr.orchestrateAddVmToNetwork(vm, workAddVmToNetwork.getNetwork(), - workAddVmToNetwork.getRequestedNicProfile()); - _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, + NicProfile nic = _vmMgr.orchestrateAddVmToNetwork(vm, workAddVmToNetwork.getNetwork(), + workAddVmToNetwork.getRequestedNicProfile()); + _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, JobSerializerHelper.toObjectSerializedString(nic)); - } else if(work instanceof VmWorkRemoveNicFromVm) { + } else if (work instanceof VmWorkRemoveNicFromVm) { VmWorkRemoveNicFromVm workRemoveNicFromVm = (VmWorkRemoveNicFromVm)work; boolean result = _vmMgr.orchestrateRemoveNicFromVm(vm, workRemoveNicFromVm.getNic()); - _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, - JobSerializerHelper.toObjectSerializedString(new Boolean(result))); - } else if(work instanceof VmWorkRemoveVmFromNetwork) { + _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, + JobSerializerHelper.toObjectSerializedString(new Boolean(result))); + } else if (work instanceof VmWorkRemoveVmFromNetwork) { VmWorkRemoveVmFromNetwork workRemoveVmFromNetwork = (VmWorkRemoveVmFromNetwork)work; - boolean result = _vmMgr.orchestrateRemoveVmFromNetwork(vm, - workRemoveVmFromNetwork.getNetwork(), workRemoveVmFromNetwork.getBroadcastUri()); - _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, - JobSerializerHelper.toObjectSerializedString(new Boolean(result))); - } else if(work instanceof VmWorkReconfigure) { + boolean result = _vmMgr.orchestrateRemoveVmFromNetwork(vm, + workRemoveVmFromNetwork.getNetwork(), workRemoveVmFromNetwork.getBroadcastUri()); + _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, + JobSerializerHelper.toObjectSerializedString(new Boolean(result))); + } else if (work instanceof VmWorkReconfigure) { VmWorkReconfigure workReconfigure = (VmWorkReconfigure)work; - _vmMgr.reConfigureVm(vm.getUuid(), workReconfigure.getNewServiceOffering(), - workReconfigure.isSameHost()); + _vmMgr.reConfigureVm(vm.getUuid(), workReconfigure.getNewServiceOffering(), + workReconfigure.isSameHost()); _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, null); - } else if(work instanceof VmWorkStorageMigration) { + } else if (work instanceof VmWorkStorageMigration) { VmWorkStorageMigration workStorageMigration = (VmWorkStorageMigration)work; _vmMgr.orchestrateStorageMigration(vm.getUuid(), workStorageMigration.getDestStoragePool()); _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.SUCCEEDED, 0, null); } else { - assert(false); + assert (false); s_logger.error("Unhandled VM work command: " + job.getCmd()); - - RuntimeException e = new RuntimeException("Unsupported VM work command: " + job.getCmd()); + + RuntimeException e = new RuntimeException("Unsupported VM work command: " + job.getCmd()); String exceptionJson = JobSerializerHelper.toSerializedString(e); s_logger.error("Serialize exception object into json: " + exceptionJson); _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.FAILED, 0, exceptionJson); } - } catch(Throwable e) { + } catch (Throwable e) { s_logger.error("Unable to complete " + job, e); - + String exceptionJson = JobSerializerHelper.toSerializedString(e); s_logger.info("Serialize exception object into json: " + exceptionJson); _asyncJobMgr.completeAsyncJob(job.getId(), JobInfo.Status.FAILED, 0, exceptionJson); } finally { CallContext.unregister(); } - } + } } diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkMigrate.java b/engine/orchestration/src/com/cloud/vm/VmWorkMigrate.java index c313876b433..107f5fef3c1 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkMigrate.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkMigrate.java @@ -29,9 +29,9 @@ import com.cloud.storage.Volume; import com.cloud.utils.db.EntityManager; public class VmWorkMigrate extends VmWork { - private static final long serialVersionUID = 1689203333114836522L; + private static final long serialVersionUID = 1689203333114836522L; - Long zoneId; + Long zoneId; Long podId; Long clusterId; Long hostId; @@ -60,7 +60,7 @@ public class VmWorkMigrate extends VmWork { Pod pod = podId != null ? s_entityMgr.findById(Pod.class, podId) : null; Cluster cluster = clusterId != null ? s_entityMgr.findById(Cluster.class, clusterId) : null; Host host = hostId != null ? s_entityMgr.findById(Host.class, hostId) : null; - + Map vols = null; if (storage != null) { diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkMigrateForScale.java b/engine/orchestration/src/com/cloud/vm/VmWorkMigrateForScale.java index 8e71aa84050..399ea91c895 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkMigrateForScale.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkMigrateForScale.java @@ -19,30 +19,30 @@ package com.cloud.vm; import com.cloud.deploy.DeployDestination; public class VmWorkMigrateForScale extends VmWork { - private static final long serialVersionUID = 6854870395568389613L; + private static final long serialVersionUID = 6854870395568389613L; - long srcHostId; - DeployDestination deployDestination; - Long newSvcOfferingId; - - public VmWorkMigrateForScale(long userId, long accountId, long vmId, long srcHostId, - DeployDestination dest, Long newSvcOfferingId) { - - super(userId, accountId, vmId); - this.srcHostId = srcHostId; - this.deployDestination = dest; - this.newSvcOfferingId = newSvcOfferingId; + long srcHostId; + DeployDestination deployDestination; + Long newSvcOfferingId; + + public VmWorkMigrateForScale(long userId, long accountId, long vmId, long srcHostId, + DeployDestination dest, Long newSvcOfferingId) { + + super(userId, accountId, vmId); + this.srcHostId = srcHostId; + this.deployDestination = dest; + this.newSvcOfferingId = newSvcOfferingId; } - + public long getSrcHostId() { - return srcHostId; + return srcHostId; } - + public DeployDestination getDeployDestination() { - return this.deployDestination; + return this.deployDestination; } - + public Long getNewServiceOfferringId() { - return this.newSvcOfferingId; + return this.newSvcOfferingId; } } diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkMigrateWithStorage.java b/engine/orchestration/src/com/cloud/vm/VmWorkMigrateWithStorage.java index ae91231a35f..75024dba49c 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkMigrateWithStorage.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkMigrateWithStorage.java @@ -22,31 +22,31 @@ import com.cloud.storage.StoragePool; import com.cloud.storage.Volume; public class VmWorkMigrateWithStorage extends VmWork { - private static final long serialVersionUID = -5626053872453569165L; + private static final long serialVersionUID = -5626053872453569165L; - long srcHostId; - long destHostId; - Map volumeToPool; - - public VmWorkMigrateWithStorage(long userId, long accountId, long vmId, long srcHostId, - long destHostId, Map volumeToPool) { - - super(userId, accountId, vmId); - - this.srcHostId = srcHostId; - this.destHostId = destHostId; - this.volumeToPool = volumeToPool; + long srcHostId; + long destHostId; + Map volumeToPool; + + public VmWorkMigrateWithStorage(long userId, long accountId, long vmId, long srcHostId, + long destHostId, Map volumeToPool) { + + super(userId, accountId, vmId); + + this.srcHostId = srcHostId; + this.destHostId = destHostId; + this.volumeToPool = volumeToPool; } - + public long getSrcHostId() { - return this.srcHostId; + return this.srcHostId; } - + public long getDestHostId() { - return this.destHostId; + return this.destHostId; } - + public Map getVolumeToPool() { - return this.volumeToPool; + return this.volumeToPool; } } diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkReboot.java b/engine/orchestration/src/com/cloud/vm/VmWorkReboot.java index 8f50702358a..fecaaef1fb1 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkReboot.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkReboot.java @@ -23,46 +23,46 @@ import java.util.Map; import org.apache.cloudstack.framework.jobs.impl.JobSerializerHelper; public class VmWorkReboot extends VmWork { - private static final long serialVersionUID = 195907627459759933L; + private static final long serialVersionUID = 195907627459759933L; + + // use serialization friendly map + private Map rawParams; - // use serialization friendly map - private Map rawParams; - public VmWorkReboot(long userId, long accountId, long vmId, Map params) { - super(userId, accountId, vmId); - - setParams(params); - } - - public Map getRawParams() { - return rawParams; - } + super(userId, accountId, vmId); - public void setRawParams(Map params) { - rawParams = params; - } - - public Map getParams() { - Map map = new HashMap(); - - if(rawParams != null) { - for(Map.Entry entry : rawParams.entrySet()) { - VirtualMachineProfile.Param key = new VirtualMachineProfile.Param(entry.getKey()); - Object val = JobSerializerHelper.fromObjectSerializedString(entry.getValue()); - map.put(key, val); - } - } - - return map; - } - - public void setParams(Map params) { - if(params != null) { - rawParams = new HashMap(); - for(Map.Entry entry : params.entrySet()) { - rawParams.put(entry.getKey().getName(), JobSerializerHelper.toObjectSerializedString( - entry.getValue() instanceof Serializable ? (Serializable)entry.getValue() : entry.getValue().toString())); - } - } - } + setParams(params); + } + + public Map getRawParams() { + return rawParams; + } + + public void setRawParams(Map params) { + rawParams = params; + } + + public Map getParams() { + Map map = new HashMap(); + + if (rawParams != null) { + for (Map.Entry entry : rawParams.entrySet()) { + VirtualMachineProfile.Param key = new VirtualMachineProfile.Param(entry.getKey()); + Object val = JobSerializerHelper.fromObjectSerializedString(entry.getValue()); + map.put(key, val); + } + } + + return map; + } + + public void setParams(Map params) { + if (params != null) { + rawParams = new HashMap(); + for (Map.Entry entry : params.entrySet()) { + rawParams.put(entry.getKey().getName(), JobSerializerHelper.toObjectSerializedString( + entry.getValue() instanceof Serializable ? (Serializable)entry.getValue() : entry.getValue().toString())); + } + } + } } diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkReconfigure.java b/engine/orchestration/src/com/cloud/vm/VmWorkReconfigure.java index 48a9df35faa..6e2b6d8a2b0 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkReconfigure.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkReconfigure.java @@ -19,25 +19,25 @@ package com.cloud.vm; import com.cloud.offering.ServiceOffering; public class VmWorkReconfigure extends VmWork { - private static final long serialVersionUID = -4517030323758086615L; - - ServiceOffering newServiceOffering; - boolean sameHost; - - public VmWorkReconfigure(long userId, long accountId, long vmId, - ServiceOffering newServiceOffering, boolean sameHost) { - - super(userId, accountId, vmId); - - this.newServiceOffering = newServiceOffering; - this.sameHost = sameHost; + private static final long serialVersionUID = -4517030323758086615L; + + ServiceOffering newServiceOffering; + boolean sameHost; + + public VmWorkReconfigure(long userId, long accountId, long vmId, + ServiceOffering newServiceOffering, boolean sameHost) { + + super(userId, accountId, vmId); + + this.newServiceOffering = newServiceOffering; + this.sameHost = sameHost; } - + public ServiceOffering getNewServiceOffering() { - return this.newServiceOffering; + return this.newServiceOffering; } - + public boolean isSameHost() { - return this.sameHost; + return this.sameHost; } } diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkRemoveNicFromVm.java b/engine/orchestration/src/com/cloud/vm/VmWorkRemoveNicFromVm.java index b756ac35761..8efe77bdda5 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkRemoveNicFromVm.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkRemoveNicFromVm.java @@ -17,17 +17,17 @@ package com.cloud.vm; public class VmWorkRemoveNicFromVm extends VmWork { - private static final long serialVersionUID = -4265657031064437923L; + private static final long serialVersionUID = -4265657031064437923L; - Nic nic; - - public VmWorkRemoveNicFromVm(long userId, long accountId, long vmId, Nic nic) { - super(userId, accountId, vmId); - - this.nic = nic; + Nic nic; + + public VmWorkRemoveNicFromVm(long userId, long accountId, long vmId, Nic nic) { + super(userId, accountId, vmId); + + this.nic = nic; } - + public Nic getNic() { - return this.nic; + return this.nic; } } diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkRemoveVmFromNetwork.java b/engine/orchestration/src/com/cloud/vm/VmWorkRemoveVmFromNetwork.java index d4e0ae4ef7b..0e94c2f35f9 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkRemoveVmFromNetwork.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkRemoveVmFromNetwork.java @@ -21,23 +21,23 @@ import java.net.URI; import com.cloud.network.Network; public class VmWorkRemoveVmFromNetwork extends VmWork { - private static final long serialVersionUID = -5070392905642149925L; + private static final long serialVersionUID = -5070392905642149925L; - Network network; - URI broadcastUri; - - public VmWorkRemoveVmFromNetwork(long userId, long accountId, long vmId, Network network, URI broadcastUri) { - super(userId, accountId, vmId); - - this.network = network; - this.broadcastUri = broadcastUri; - } - - public Network getNetwork() { - return this.network; - } - - public URI getBroadcastUri() { - return this.broadcastUri; - } + Network network; + URI broadcastUri; + + public VmWorkRemoveVmFromNetwork(long userId, long accountId, long vmId, Network network, URI broadcastUri) { + super(userId, accountId, vmId); + + this.network = network; + this.broadcastUri = broadcastUri; + } + + public Network getNetwork() { + return this.network; + } + + public URI getBroadcastUri() { + return this.broadcastUri; + } } diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkSerializer.java b/engine/orchestration/src/com/cloud/vm/VmWorkSerializer.java index 9a1aaaced67..bd6b52d261f 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkSerializer.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkSerializer.java @@ -21,8 +21,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; -import org.apache.cloudstack.framework.jobs.impl.JobSerializerHelper; - import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonDeserializationContext; @@ -31,9 +29,11 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; +import org.apache.cloudstack.framework.jobs.impl.JobSerializerHelper; + public class VmWorkSerializer { static class StringMapTypeAdapter implements JsonDeserializer { - + @Override public Map deserialize(JsonElement src, Type srcType, JsonDeserializationContext context) throws JsonParseException { @@ -47,7 +47,7 @@ public class VmWorkSerializer { return obj; } } - + protected static Gson s_gson; static { GsonBuilder gBuilder = new GsonBuilder(); @@ -55,21 +55,20 @@ public class VmWorkSerializer { gBuilder.registerTypeAdapter(Map.class, new StringMapTypeAdapter()); s_gson = gBuilder.create(); } - + public static String serialize(VmWork work) { - // TODO: there are way many generics, too tedious to get serialization work under GSON - // use java binary serialization instead - // - return JobSerializerHelper.toObjectSerializedString(work); + // TODO: there are way many generics, too tedious to get serialization work under GSON + // use java binary serialization instead + // + return JobSerializerHelper.toObjectSerializedString(work); // return s_gson.toJson(work); } public static T deserialize(Class clazz, String workInJsonText) { - // TODO: there are way many generics, too tedious to get serialization work under GSON - // use java binary serialization instead - // + // TODO: there are way many generics, too tedious to get serialization work under GSON + // use java binary serialization instead + // return (T)JobSerializerHelper.fromObjectSerializedString(workInJsonText); - // return (T)s_gson.fromJson(workInJsonText, clazz); + // return (T)s_gson.fromJson(workInJsonText, clazz); } } - diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkStart.java b/engine/orchestration/src/com/cloud/vm/VmWorkStart.java index 7a7447f74a0..e023801445d 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkStart.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkStart.java @@ -32,94 +32,94 @@ import com.cloud.deploy.DeploymentPlanner.ExcludeList; import com.cloud.utils.Journal; public class VmWorkStart extends VmWork { - private static final long serialVersionUID = 9038937399817468894L; + private static final long serialVersionUID = 9038937399817468894L; - private static final Logger s_logger = Logger.getLogger(VmWorkStart.class); + private static final Logger s_logger = Logger.getLogger(VmWorkStart.class); - long dcId; - Long podId; - Long clusterId; - Long hostId; - Long poolId; - ExcludeList avoids; - Long physicalNetworkId; - - String reservationId; - String journalName; - - // use serialization friendly map - private Map rawParams; + long dcId; + Long podId; + Long clusterId; + Long hostId; + Long poolId; + ExcludeList avoids; + Long physicalNetworkId; + + String reservationId; + String journalName; + + // use serialization friendly map + private Map rawParams; public VmWorkStart(long userId, long accountId, long vmId) { super(userId, accountId, vmId); - } + } - public DeploymentPlan getPlan() { - - if(podId != null || clusterId != null || hostId != null || poolId != null || physicalNetworkId != null) { - // this is ugly, to work with legacy code, we need to re-construct the DeploymentPlan hard-codely - // this has to be refactored together with migrating legacy code into the new way - ReservationContext context = null; - if(reservationId != null) { - Journal journal = new Journal.LogJournal("VmWorkStart", s_logger); - context = new ReservationContextImpl(reservationId, journal, - CallContext.current().getCallingUser(), - CallContext.current().getCallingAccount()); - } - - DeploymentPlan plan = new DataCenterDeployment( - dcId, podId, clusterId, hostId, poolId, physicalNetworkId, - context); - return plan; - } - - return null; - } + public DeploymentPlan getPlan() { - public void setPlan(DeploymentPlan plan) { - if(plan != null) { - dcId = plan.getDataCenterId(); - podId = plan.getPodId(); - clusterId = plan.getClusterId(); - hostId = plan.getHostId(); - poolId = plan.getPoolId(); - physicalNetworkId = plan.getPhysicalNetworkId(); - avoids = plan.getAvoids(); - - if(plan.getReservationContext() != null) - reservationId = plan.getReservationContext().getReservationId(); - } - } + if (podId != null || clusterId != null || hostId != null || poolId != null || physicalNetworkId != null) { + // this is ugly, to work with legacy code, we need to re-construct the DeploymentPlan hard-codely + // this has to be refactored together with migrating legacy code into the new way + ReservationContext context = null; + if (reservationId != null) { + Journal journal = new Journal.LogJournal("VmWorkStart", s_logger); + context = new ReservationContextImpl(reservationId, journal, + CallContext.current().getCallingUser(), + CallContext.current().getCallingAccount()); + } - public Map getRawParams() { - return rawParams; - } + DeploymentPlan plan = new DataCenterDeployment( + dcId, podId, clusterId, hostId, poolId, physicalNetworkId, + context); + return plan; + } - public void setRawParams(Map params) { - rawParams = params; - } - - public Map getParams() { - Map map = new HashMap(); - - if(rawParams != null) { - for(Map.Entry entry : rawParams.entrySet()) { - VirtualMachineProfile.Param key = new VirtualMachineProfile.Param(entry.getKey()); - Object val = JobSerializerHelper.fromObjectSerializedString(entry.getValue()); - map.put(key, val); - } - } - - return map; - } - - public void setParams(Map params) { - if(params != null) { - rawParams = new HashMap(); - for(Map.Entry entry : params.entrySet()) { - rawParams.put(entry.getKey().getName(), JobSerializerHelper.toObjectSerializedString( - entry.getValue() instanceof Serializable ? (Serializable)entry.getValue() : entry.getValue().toString())); - } - } - } + return null; + } + + public void setPlan(DeploymentPlan plan) { + if (plan != null) { + dcId = plan.getDataCenterId(); + podId = plan.getPodId(); + clusterId = plan.getClusterId(); + hostId = plan.getHostId(); + poolId = plan.getPoolId(); + physicalNetworkId = plan.getPhysicalNetworkId(); + avoids = plan.getAvoids(); + + if (plan.getReservationContext() != null) + reservationId = plan.getReservationContext().getReservationId(); + } + } + + public Map getRawParams() { + return rawParams; + } + + public void setRawParams(Map params) { + rawParams = params; + } + + public Map getParams() { + Map map = new HashMap(); + + if (rawParams != null) { + for (Map.Entry entry : rawParams.entrySet()) { + VirtualMachineProfile.Param key = new VirtualMachineProfile.Param(entry.getKey()); + Object val = JobSerializerHelper.fromObjectSerializedString(entry.getValue()); + map.put(key, val); + } + } + + return map; + } + + public void setParams(Map params) { + if (params != null) { + rawParams = new HashMap(); + for (Map.Entry entry : params.entrySet()) { + rawParams.put(entry.getKey().getName(), JobSerializerHelper.toObjectSerializedString( + entry.getValue() instanceof Serializable ? (Serializable)entry.getValue() : entry.getValue().toString())); + } + } + } } diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkStop.java b/engine/orchestration/src/com/cloud/vm/VmWorkStop.java index 0a27057810b..f0bc88594e9 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkStop.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkStop.java @@ -17,16 +17,16 @@ package com.cloud.vm; public class VmWorkStop extends VmWork { - private static final long serialVersionUID = 202908740486785251L; - - private final boolean cleanup; - + private static final long serialVersionUID = 202908740486785251L; + + private final boolean cleanup; + public VmWorkStop(long userId, long accountId, long vmId, boolean cleanup) { super(userId, accountId, vmId); this.cleanup = cleanup; - } - - public boolean isCleanup() { - return cleanup; - } + } + + public boolean isCleanup() { + return cleanup; + } } diff --git a/engine/orchestration/src/com/cloud/vm/VmWorkStorageMigration.java b/engine/orchestration/src/com/cloud/vm/VmWorkStorageMigration.java index ba8330c9d9d..76a35b23cf0 100644 --- a/engine/orchestration/src/com/cloud/vm/VmWorkStorageMigration.java +++ b/engine/orchestration/src/com/cloud/vm/VmWorkStorageMigration.java @@ -19,17 +19,17 @@ package com.cloud.vm; import com.cloud.storage.StoragePool; public class VmWorkStorageMigration extends VmWork { - private static final long serialVersionUID = -8677979691741157474L; + private static final long serialVersionUID = -8677979691741157474L; + + StoragePool destPool; - StoragePool destPool; - public VmWorkStorageMigration(long userId, long accountId, long vmId, StoragePool destPool) { - super(userId, accountId, vmId); - - this.destPool = destPool; + super(userId, accountId, vmId); + + this.destPool = destPool; } - + public StoragePool getDestStoragePool() { - return this.destPool; + return this.destPool; } } diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java index 97ac5897d20..35d7bbced73 100644 --- a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java @@ -776,7 +776,7 @@ public class EngineHostDaoImpl extends GenericDaoBase implem @Override public List search( - SearchCriteria sc, Filter filter, boolean enable_query_cache) { + SearchCriteria sc, Filter filter, boolean enableQueryCache) { // TODO Auto-generated method stub return null; } @@ -789,7 +789,7 @@ public class EngineHostDaoImpl extends GenericDaoBase implem } @Override - public List searchIncludingRemoved(SearchCriteria sc, Filter filter, Boolean lock, boolean cache, boolean enable_query_cache) { + public List searchIncludingRemoved(SearchCriteria sc, Filter filter, Boolean lock, boolean cache, boolean enableQueryCache) { // TODO Auto-generated method stub return null; } diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index 4ad0cd7af8f..cbe02ff0941 100755 --- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -47,7 +47,6 @@ import org.apache.cloudstack.framework.config.Configurable; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.managed.context.ManagedContextRunnable; import org.apache.cloudstack.region.PortableIpDao; -import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.Listener; @@ -256,37 +255,37 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra @Inject protected IpAddressManager _ipAddrMgr; - List _networkGurus; + List networkGurus; public List getNetworkGurus() { - return _networkGurus; + return networkGurus; } - public void setNetworkGurus(List _networkGurus) { - this._networkGurus = _networkGurus; + public void setNetworkGurus(List networkGurus) { + this.networkGurus = networkGurus; } - List _networkElements; + List networkElements; public List getNetworkElements() { - return _networkElements; + return networkElements; } - public void setNetworkElements(List _networkElements) { - this._networkElements = _networkElements; + public void setNetworkElements(List networkElements) { + this.networkElements = networkElements; } @Inject NetworkDomainDao _networkDomainDao; - List _ipDeployers; + List ipDeployers; public List getIpDeployers() { - return _ipDeployers; + return ipDeployers; } - public void setIpDeployers(List _ipDeployers) { - this._ipDeployers = _ipDeployers; + public void setIpDeployers(List ipDeployers) { + this.ipDeployers = ipDeployers; } List _dhcpProviders; @@ -295,8 +294,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra return _dhcpProviders; } - public void setDhcpProviders(List _dhcpProviders) { - this._dhcpProviders = _dhcpProviders; + public void setDhcpProviders(List dhcpProviders) { + _dhcpProviders = dhcpProviders; } @Inject @@ -644,7 +643,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra long related = -1; - for (final NetworkGuru guru : _networkGurus) { + for (final NetworkGuru guru : networkGurus) { final Network network = guru.design(offering, plan, predefined, owner); if (network == null) { continue; @@ -776,7 +775,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra NetworkVO ntwkVO = _networksDao.findById(network.getId()); s_logger.debug("Allocating nic for vm " + vm.getVirtualMachine() + " in network " + network + " with requested profile " + requested); - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, ntwkVO.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, ntwkVO.getGuruName()); if (requested != null && requested.getMode() == null) { requested.setMode(network.getMode()); @@ -923,7 +922,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra Pair implemented = new Pair(null, null); NetworkVO network = _networksDao.findById(networkId); - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); if (isNetworkImplemented(network)) { s_logger.debug("Network id=" + networkId + " is already implemented"); implemented.set(guru, network); @@ -1051,7 +1050,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra } // get providers to implement List providersToImplement = getNetworkProviders(network.getId()); - for (NetworkElement element : _networkElements) { + for (NetworkElement element : networkElements) { if (providersToImplement.contains(element.getProvider())) { if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) { // The physicalNetworkId will not get translated into a uuid by the reponse serializer, @@ -1114,9 +1113,9 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra NetworkOfferingVO offering = _networkOfferingDao.findById(network.getNetworkOfferingId()); //there are no egress rules then apply the default egress rule DataCenter zone = _dcDao.findById(network.getDataCenterId()); - if ( _networkModel.areServicesSupportedInNetwork(network.getId(), Service.Firewall) && - _networkModel.areServicesSupportedInNetwork(network.getId(), Service.Firewall) && - (network.getGuestType() == Network.GuestType.Isolated || (network.getGuestType() == Network.GuestType.Shared && zone.getNetworkType() == NetworkType.Advanced))) { + if (_networkModel.areServicesSupportedInNetwork(network.getId(), Service.Firewall) && + _networkModel.areServicesSupportedInNetwork(network.getId(), Service.Firewall) && + (network.getGuestType() == Network.GuestType.Isolated || (network.getGuestType() == Network.GuestType.Shared && zone.getNetworkType() == NetworkType.Advanced))) { // add default egress rule to accept the traffic _firewallMgr.applyDefaultEgressFirewallRule(network.getId(), offering.getEgressDefaultPolicy(), true); } @@ -1125,7 +1124,6 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra success = false; } - // apply port forwarding rules if (!_rulesMgr.applyPortForwardingRulesForNetwork(networkId, false, caller)) { s_logger.warn("Failed to reapply port forwarding rule(s) as a part of network id=" + networkId + " restart"); @@ -1254,7 +1252,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra ResourceUnavailableException { Integer networkRate = _networkModel.getNetworkRate(network.getId(), vmProfile.getId()); - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); NicVO nic = _nicDao.findById(nicId); NicProfile profile = null; @@ -1271,7 +1269,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra profile = new NicProfile(nic, network, broadcastUri, isolationUri, - networkRate, _networkModel.isSecurityGroupSupportedInNetwork(network), _networkModel.getNetworkTag(vmProfile.getHypervisorType(), network)); + networkRate, _networkModel.isSecurityGroupSupportedInNetwork(network), _networkModel.getNetworkTag(vmProfile.getHypervisorType(), network)); guru.reserve(profile, network, vmProfile, dest, context); nic.setIp4Address(profile.getIp4Address()); nic.setAddressFormat(profile.getFormat()); @@ -1299,7 +1297,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra } List providersToImplement = getNetworkProviders(network.getId()); - for (NetworkElement element : _networkElements) { + for (NetworkElement element : networkElements) { if (providersToImplement.contains(element.getProvider())) { if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) { throw new CloudRuntimeException("Service provider " + element.getProvider().getName() + @@ -1328,7 +1326,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra NetworkVO network = _networksDao.findById(nic.getNetworkId()); Integer networkRate = _networkModel.getNetworkRate(network.getId(), vm.getId()); - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); NicProfile profile = new NicProfile(nic, network, nic.getBroadcastUri(), nic.getIsolationUri(), networkRate, _networkModel.isSecurityGroupSupportedInNetwork(network), _networkModel.getNetworkTag(vm.getHypervisorType(), network)); @@ -1338,7 +1336,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra } } List providersToImplement = getNetworkProviders(network.getId()); - for (NetworkElement element : _networkElements) { + for (NetworkElement element : networkElements) { if (providersToImplement.contains(element.getProvider())) { if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) { throw new CloudRuntimeException("Service provider " + element.getProvider().getName() + @@ -1369,7 +1367,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra public void commitNicForMigration(VirtualMachineProfile src, VirtualMachineProfile dst) { for (NicProfile nicSrc : src.getNics()) { NetworkVO network = _networksDao.findById(nicSrc.getNetworkId()); - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); NicProfile nicDst = findNicProfileById(dst, nicSrc.getId()); ReservationContext src_context = new ReservationContextImpl(nicSrc.getReservationId(), null, null); ReservationContext dst_context = new ReservationContextImpl(nicDst.getReservationId(), null, null); @@ -1378,7 +1376,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra ((NetworkMigrationResponder)guru).commitMigration(nicSrc, network, src, src_context, dst_context); } List providersToImplement = getNetworkProviders(network.getId()); - for (NetworkElement element : _networkElements) { + for (NetworkElement element : networkElements) { if (providersToImplement.contains(element.getProvider())) { if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) { throw new CloudRuntimeException("Service provider " + element.getProvider().getName() + @@ -1400,7 +1398,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra public void rollbackNicForMigration(VirtualMachineProfile src, VirtualMachineProfile dst) { for (NicProfile nicDst : dst.getNics()) { NetworkVO network = _networksDao.findById(nicDst.getNetworkId()); - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); NicProfile nicSrc = findNicProfileById(src, nicDst.getId()); ReservationContext src_context = new ReservationContextImpl(nicSrc.getReservationId(), null, null); ReservationContext dst_context = new ReservationContextImpl(nicDst.getReservationId(), null, null); @@ -1409,7 +1407,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra ((NetworkMigrationResponder)guru).rollbackMigration(nicDst, network, dst, src_context, dst_context); } List providersToImplement = getNetworkProviders(network.getId()); - for (NetworkElement element : _networkElements) { + for (NetworkElement element : networkElements) { if (providersToImplement.contains(element.getProvider())) { if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) { throw new CloudRuntimeException("Service provider " + element.getProvider().getName() + @@ -1453,7 +1451,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra if (originalState == Nic.State.Reserved || originalState == Nic.State.Reserving) { if (nic.getReservationStrategy() == Nic.ReservationStrategy.Start) { - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); nic.setState(Nic.State.Releasing); _nicDao.update(nic.getId(), nic); NicProfile profile = @@ -1484,7 +1482,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra Network network = networkToRelease.first(); NicProfile profile = networkToRelease.second(); List providersToImplement = getNetworkProviders(network.getId()); - for (NetworkElement element : _networkElements) { + for (NetworkElement element : networkElements) { if (providersToImplement.contains(element.getProvider())) { if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) { throw new CloudRuntimeException("Service provider " + element.getProvider().getName() + @@ -1532,7 +1530,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra */ if (nic.getReservationStrategy() == Nic.ReservationStrategy.Create) { List providersToImplement = getNetworkProviders(network.getId()); - for (NetworkElement element : _networkElements) { + for (NetworkElement element : networkElements) { if (providersToImplement.contains(element.getProvider())) { if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) { throw new CloudRuntimeException("Service provider " + element.getProvider().getName() + @@ -1557,7 +1555,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra network.getGuestType() == GuestType.Shared) { removeDhcpServiceInSubnet(nic); } - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); guru.deallocate(network, profile, vm); _nicDao.remove(nic.getId()); s_logger.debug("Removed nic id=" + nic.getId()); @@ -1989,7 +1987,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra if (s_logger.isDebugEnabled()) { s_logger.debug("Network id=" + networkId + " is shutdown successfully, cleaning up corresponding resources now."); } - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, networkFinal.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, networkFinal.getGuruName()); NetworkProfile profile = convertNetworkToNetworkProfile(networkFinal.getId()); guru.shutdown(profile, _networkOfferingDao.findById(networkFinal.getNetworkOfferingId())); @@ -2053,7 +2051,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra // get providers to shutdown List providersToShutdown = getNetworkProviders(network.getId()); boolean success = true; - for (NetworkElement element : _networkElements) { + for (NetworkElement element : networkElements) { if (providersToShutdown.contains(element.getProvider())) { try { if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) { @@ -2141,7 +2139,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra // get providers to destroy List providersToDestroy = getNetworkProviders(network.getId()); - for (NetworkElement element : _networkElements) { + for (NetworkElement element : networkElements) { if (providersToDestroy.contains(element.getProvider())) { try { if (!_networkModel.isProviderEnabledInPhysicalNetwork(_networkModel.getPhysicalNetworkId(network), element.getProvider().getName())) { @@ -2181,7 +2179,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra Transaction.execute(new TransactionCallbackNoReturn() { @Override public void doInTransactionWithoutResult(TransactionStatus status) { - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, networkFinal.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, networkFinal.getGuruName()); guru.trash(networkFinal, _networkOfferingDao.findById(networkFinal.getNetworkOfferingId())); @@ -2405,7 +2403,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra @Override public NetworkProfile convertNetworkToNetworkProfile(long networkId) { NetworkVO network = _networksDao.findById(networkId); - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); NetworkProfile profile = new NetworkProfile(network); guru.updateNetworkProfile(profile); @@ -2696,8 +2694,8 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra try { // delete default egress rule DataCenter zone = _dcDao.findById(network.getDataCenterId()); - if ( _networkModel.areServicesSupportedInNetwork(network.getId(), Service.Firewall) && - (network.getGuestType() == Network.GuestType.Isolated || (network.getGuestType() == Network.GuestType.Shared && zone.getNetworkType() == NetworkType.Advanced))) { + if (_networkModel.areServicesSupportedInNetwork(network.getId(), Service.Firewall) && + (network.getGuestType() == Network.GuestType.Isolated || (network.getGuestType() == Network.GuestType.Shared && zone.getNetworkType() == NetworkType.Advanced))) { // add default egress rule to accept the traffic _firewallMgr.applyDefaultEgressFirewallRule(network.getId(), _networkModel.getNetworkEgressDefaultPolicy(networkId), false); } @@ -2707,7 +2705,6 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra success = false; } - for (FirewallRuleVO firewallRule : firewallEgressRules) { s_logger.trace("Marking firewall egress rule " + firewallRule + " with Revoke state"); firewallRule.setState(FirewallRule.State.Revoke); @@ -3012,7 +3009,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra NetworkVO network = _networksDao.findById(nic.getNetworkId()); Integer networkRate = _networkModel.getNetworkRate(network.getId(), vm.getId()); - NetworkGuru guru = AdapterBase.getAdapterByName(_networkGurus, network.getGuruName()); + NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); NicProfile profile = new NicProfile(nic, network, nic.getBroadcastUri(), nic.getIsolationUri(), networkRate, _networkModel.isSecurityGroupSupportedInNetwork(network), _networkModel.getNetworkTag(vm.getHypervisorType(), network)); diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java index 7b0d968ab07..efaa288fc37 100644 --- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java +++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java @@ -149,8 +149,8 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati return _storagePoolAllocators; } - public void setStoragePoolAllocators(List _storagePoolAllocators) { - this._storagePoolAllocators = _storagePoolAllocators; + public void setStoragePoolAllocators(List storagePoolAllocators) { + this._storagePoolAllocators = storagePoolAllocators; } protected List _podAllocators; @@ -159,8 +159,8 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati return _podAllocators; } - public void setPodAllocators(List _podAllocators) { - this._podAllocators = _podAllocators; + public void setPodAllocators(List podAllocators) { + this._podAllocators = podAllocators; } protected VolumeOrchestrator() { @@ -254,7 +254,7 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati @DB @Override public VolumeInfo createVolumeFromSnapshot(Volume volume, Snapshot snapshot, UserVm vm) - throws StorageUnavailableException { + throws StorageUnavailableException { Account account = _entityMgr.findById(Account.class, volume.getAccountId()); final HashSet poolsToAvoid = new HashSet(); @@ -269,27 +269,28 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati String msg = "There are no available storage pools to store the volume in"; - if(vm != null){ + if (vm != null) { Pod podofVM = _entityMgr.findById(Pod.class, vm.getPodIdToDeployIn()); - if(podofVM != null){ + if (podofVM != null) { pod = new Pair(podofVM, podofVM.getId()); } } - if(vm != null && pod != null){ + if (vm != null && pod != null) { //if VM is running use the hostId to find the clusterID. If it is stopped, refer the cluster where the ROOT volume of the VM exists. Long hostId = null; Long clusterId = null; - if(vm.getState() == State.Running){ + if (vm.getState() == State.Running) { hostId = vm.getHostId(); - if(hostId != null){ + if (hostId != null) { Host vmHost = _entityMgr.findById(Host.class, hostId); clusterId = vmHost.getClusterId(); } - }else{ + } else { List rootVolumesOfVm = _volsDao.findByInstanceAndType(vm.getId(), Volume.Type.ROOT); if (rootVolumesOfVm.size() != 1) { - throw new CloudRuntimeException("The VM " + vm.getHostName() + " has more than one ROOT volume and is in an invalid state. Please contact Cloud Support."); + throw new CloudRuntimeException("The VM " + vm.getHostName() + + " has more than one ROOT volume and is in an invalid state. Please contact Cloud Support."); } else { VolumeVO rootVolumeOfVm = rootVolumesOfVm.get(0); StoragePoolVO rootDiskPool = _storagePoolDao.findById(rootVolumeOfVm.getPoolId()); @@ -303,15 +304,15 @@ public class VolumeOrchestrator extends ManagerBase implements VolumeOrchestrati if (pool == null) { //pool could not be found in the VM's pod/cluster. - if(s_logger.isDebugEnabled()){ - s_logger.debug("Could not find any storage pool to create Volume in the pod/cluster of the provided VM "+vm.getUuid()); + if (s_logger.isDebugEnabled()) { + s_logger.debug("Could not find any storage pool to create Volume in the pod/cluster of the provided VM " + vm.getUuid()); } StringBuilder addDetails = new StringBuilder(msg); addDetails.append(", Could not find any storage pool to create Volume in the pod/cluster of the VM "); addDetails.append(vm.getUuid()); msg = addDetails.toString(); } - }else{ + } else { // Determine what pod to store the volume in while ((pod = findPod(null, null, dc, account.getId(), podsToAvoid)) != null) { podsToAvoid.add(pod.first().getId()); diff --git a/engine/orchestration/test/com/cloud/vm/VirtualMachineManagerImplTest.java b/engine/orchestration/test/com/cloud/vm/VirtualMachineManagerImplTest.java index 2c308f0161f..997855d2b24 100644 --- a/engine/orchestration/test/com/cloud/vm/VirtualMachineManagerImplTest.java +++ b/engine/orchestration/test/com/cloud/vm/VirtualMachineManagerImplTest.java @@ -34,7 +34,6 @@ import org.junit.Before; import org.junit.Test; import org.mockito.Matchers; import org.mockito.Mock; -import org.mockito.Mockito; import org.mockito.MockitoAnnotations; import org.mockito.Spy; diff --git a/engine/schema/src/com/cloud/alert/AlertVO.java b/engine/schema/src/com/cloud/alert/AlertVO.java index ade505d2e3f..70ef469f52b 100755 --- a/engine/schema/src/com/cloud/alert/AlertVO.java +++ b/engine/schema/src/com/cloud/alert/AlertVO.java @@ -72,8 +72,8 @@ public class AlertVO implements Alert { @Column(name = "archived") private boolean archived; - - @Column(name="name") + + @Column(name = "name") private String name; public AlertVO() { @@ -188,7 +188,6 @@ public class AlertVO implements Alert { return name; } - public void setName(String name) { this.name = name; } diff --git a/engine/schema/src/com/cloud/alert/dao/AlertDao.java b/engine/schema/src/com/cloud/alert/dao/AlertDao.java index 89128b43748..e61092e4394 100755 --- a/engine/schema/src/com/cloud/alert/dao/AlertDao.java +++ b/engine/schema/src/com/cloud/alert/dao/AlertDao.java @@ -28,9 +28,9 @@ public interface AlertDao extends GenericDao { // This is for backward compatibility AlertVO getLastAlert(short type, long dataCenterId, Long podId); - public boolean deleteAlert(List Ids, String type, Date startDate, Date endDate, Long zoneId); + public boolean deleteAlert(List ids, String type, Date startDate, Date endDate, Long zoneId); - public boolean archiveAlert(List Ids, String type, Date startDate, Date endDate, Long zoneId); + public boolean archiveAlert(List ids, String type, Date startDate, Date endDate, Long zoneId); public List listOlderAlerts(Date oldTime); } diff --git a/engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java b/engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java index f8304038599..865b8d1898c 100755 --- a/engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java +++ b/engine/schema/src/com/cloud/alert/dao/AlertDaoImpl.java @@ -90,11 +90,11 @@ public class AlertDaoImpl extends GenericDaoBase implements Alert } @Override - public boolean archiveAlert(List Ids, String type, Date startDate, Date endDate, Long zoneId) { + public boolean archiveAlert(List ids, String type, Date startDate, Date endDate, Long zoneId) { SearchCriteria sc = AlertSearchByIdsAndType.create(); - if (Ids != null) { - sc.setParameters("id", Ids.toArray(new Object[Ids.size()])); + if (ids != null) { + sc.setParameters("id", ids.toArray(new Object[ids.size()])); } if (type != null) { sc.setParameters("type", type); @@ -112,7 +112,7 @@ public class AlertDaoImpl extends GenericDaoBase implements Alert boolean result = true; ; List alerts = listBy(sc); - if (Ids != null && alerts.size() < Ids.size()) { + if (ids != null && alerts.size() < ids.size()) { result = false; return result; } diff --git a/engine/schema/src/com/cloud/capacity/dao/CapacityDao.java b/engine/schema/src/com/cloud/capacity/dao/CapacityDao.java index 079d9a87649..a900e64c127 100755 --- a/engine/schema/src/com/cloud/capacity/dao/CapacityDao.java +++ b/engine/schema/src/com/cloud/capacity/dao/CapacityDao.java @@ -46,11 +46,14 @@ public interface CapacityDao extends GenericDao { Pair, Map> orderPodsByAggregateCapacity(long zoneId, short capacityType); List findCapacityBy(Integer capacityType, Long zoneId, - Long podId, Long clusterId, String resourceState); - List listCapacitiesGroupedByLevelAndType(Integer capacityType, Long zoneId, Long podId, Long clusterId, int level, Long limit); + Long podId, Long clusterId, String resourceState); + + List listCapacitiesGroupedByLevelAndType(Integer capacityType, Long zoneId, Long podId, Long clusterId, int level, Long limit); + void updateCapacityState(Long dcId, Long podId, Long clusterId, - Long hostId, String capacityState); - List listClustersCrossingThreshold(short capacityType, Long zoneId, String ConfigName, long computeRequested); + Long hostId, String capacityState); + + List listClustersCrossingThreshold(short capacityType, Long zoneId, String configName, long computeRequested); float findClusterConsumption(Long clusterId, short capacityType, long computeRequested); } diff --git a/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java b/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java index 7919ed5bcd4..b7784f22390 100755 --- a/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java +++ b/engine/schema/src/com/cloud/capacity/dao/CapacityDaoImpl.java @@ -27,9 +27,6 @@ import java.util.Map; import javax.ejb.Local; import javax.inject.Inject; -import com.cloud.dc.ClusterDetailsDao; -import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; -import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; @@ -165,23 +162,29 @@ public class CapacityDaoImpl extends GenericDaoBase implements * * */ - private static final String LIST_CLUSTERS_CROSSING_THRESHOLD = "SELECT clusterList.cluster_id " + - "FROM ( SELECT cluster.cluster_id cluster_id, ( (sum(cluster.used) + sum(cluster.reserved) + ?)/sum(cluster.total) ) ratio, cluster.configValue value " + - "FROM ( SELECT capacity.cluster_id cluster_id, capacity.used_capacity used, capacity.reserved_capacity reserved, capacity.total_capacity * overcommit.value total, " + - "CASE (SELECT count(*) FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ? ) " + - "WHEN 1 THEN ( CASE WHEN (SELECT details.value FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ?) is NULL " + - "THEN (SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = ?)" + - "ELSE (SELECT details.value FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ? ) END )" + - "ELSE ( SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = ?) " + - "END configValue " + - "FROM `cloud`.`op_host_capacity` capacity INNER JOIN `cloud`.`cluster_details` overcommit ON overcommit.cluster_id = capacity.cluster_id " + - "WHERE capacity.data_center_id = ? AND capacity.capacity_type = ? AND capacity.total_capacity > 0 AND overcommit.name = ?) cluster " + + private static final String LIST_CLUSTERS_CROSSING_THRESHOLD = "SELECT clusterList.cluster_id " + + + "FROM (SELECT cluster.cluster_id cluster_id, ( (sum(cluster.used) + sum(cluster.reserved) + ?)/sum(cluster.total) ) ratio, cluster.configValue value " + + + "FROM (SELECT capacity.cluster_id cluster_id, capacity.used_capacity used, capacity.reserved_capacity reserved, capacity.total_capacity * overcommit.value total, " + + + "CASE (SELECT count(*) FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ? ) " + + + "WHEN 1 THEN (CASE WHEN (SELECT details.value FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ?) is NULL " + + + "THEN (SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = ?)" + + "ELSE (SELECT details.value FROM `cloud`.`cluster_details` details WHERE details.cluster_id = capacity.cluster_id AND details.name = ? ) END )" + + "ELSE (SELECT config.value FROM `cloud`.`configuration` config WHERE config.name = ?) " + + "END configValue " + + "FROM `cloud`.`op_host_capacity` capacity INNER JOIN `cloud`.`cluster_details` overcommit ON overcommit.cluster_id = capacity.cluster_id " + + "WHERE capacity.data_center_id = ? AND capacity.capacity_type = ? AND capacity.total_capacity > 0 AND overcommit.name = ?) cluster " + - "GROUP BY cluster.cluster_id) clusterList " + - "WHERE clusterList.ratio > clusterList.value; "; + "GROUP BY cluster.cluster_id) clusterList " + + "WHERE clusterList.ratio > clusterList.value; "; - private static final String FIND_CLUSTER_CONSUMPTION_RATIO = "select ( (sum(capacity.used_capacity) + sum(capacity.reserved_capacity) + ?)/sum(capacity.total_capacity) ) " + - "from op_host_capacity capacity where cluster_id = ? and capacity_type = ?;"; + private static final String FIND_CLUSTER_CONSUMPTION_RATIO = "select ( (sum(capacity.used_capacity) + sum(capacity.reserved_capacity) + ?)/sum(capacity.total_capacity) ) " + + + "from op_host_capacity capacity where cluster_id = ? and capacity_type = ?;"; public CapacityDaoImpl() { _hostIdTypeSearch = createSearchBuilder(); @@ -206,7 +209,7 @@ public class CapacityDaoImpl extends GenericDaoBase implements } @Override - public List listClustersCrossingThreshold(short capacityType, Long zoneId, String configName, long compute_requested) { + public List listClustersCrossingThreshold(short capacityType, Long zoneId, String configName, long computeRequested) { TransactionLegacy txn = TransactionLegacy.currentTxn(); PreparedStatement pstmt = null; @@ -216,7 +219,7 @@ public class CapacityDaoImpl extends GenericDaoBase implements // we need to check with disabled thresholds of each cluster if not defined at cluster consider the global value try { pstmt = txn.prepareAutoCloseStatement(sql.toString()); - pstmt.setLong(1, compute_requested); + pstmt.setLong(1, computeRequested); pstmt.setString(2, configName); pstmt.setString(3, configName); pstmt.setString(4, configName); @@ -260,7 +263,7 @@ public class CapacityDaoImpl extends GenericDaoBase implements }*/ @Override - public List findCapacityBy(Integer capacityType, Long zoneId, Long podId, Long clusterId, String resource_state) { + public List findCapacityBy(Integer capacityType, Long zoneId, Long podId, Long clusterId, String resourceState) { TransactionLegacy txn = TransactionLegacy.currentTxn(); PreparedStatement pstmt = null; @@ -288,10 +291,10 @@ public class CapacityDaoImpl extends GenericDaoBase implements try { pstmt = txn.prepareAutoCloseStatement(sql.toString()); - pstmt.setString(1, resource_state); - pstmt.setString(2, resource_state); - pstmt.setString(3, resource_state); - pstmt.setString(4, resource_state); + pstmt.setString(1, resourceState); + pstmt.setString(2, resourceState); + pstmt.setString(3, resourceState); + pstmt.setString(4, resourceState); for (int i = 0; i < resourceIdList.size(); i++) { pstmt.setLong(5 + i, resourceIdList.get(i)); } @@ -893,7 +896,7 @@ public class CapacityDaoImpl extends GenericDaoBase implements } @Override - public float findClusterConsumption(Long clusterId, short capacityType, long computeRequested){ + public float findClusterConsumption(Long clusterId, short capacityType, long computeRequested) { TransactionLegacy txn = TransactionLegacy.currentTxn(); StringBuilder sql = new StringBuilder(FIND_CLUSTER_CONSUMPTION_RATIO); PreparedStatement pstmt = null; diff --git a/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java b/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java index 9c6b553a7a5..a355a9ca99f 100755 --- a/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java +++ b/engine/schema/src/com/cloud/dc/dao/DataCenterDaoImpl.java @@ -70,7 +70,7 @@ public class DataCenterDaoImpl extends GenericDaoBase implem @Inject protected DataCenterIpAddressDao _ipAllocDao = null; @Inject - protected DataCenterLinkLocalIpAddressDao _LinkLocalIpAllocDao = null; + protected DataCenterLinkLocalIpAddressDao _linkLocalIpAllocDao = null; @Inject protected DataCenterVnetDao _vnetAllocDao = null; @Inject @@ -179,12 +179,12 @@ public class DataCenterDaoImpl extends GenericDaoBase implem @Override public void releaseLinkLocalIpAddress(long nicId, String reservationId) { - _LinkLocalIpAllocDao.releaseIpAddress(nicId, reservationId); + _linkLocalIpAllocDao.releaseIpAddress(nicId, reservationId); } @Override public void releaseLinkLocalIpAddress(String ipAddress, long dcId, Long instanceId) { - _LinkLocalIpAllocDao.releaseIpAddress(ipAddress, dcId, instanceId); + _linkLocalIpAllocDao.releaseIpAddress(ipAddress, dcId, instanceId); } @Override @@ -194,7 +194,7 @@ public class DataCenterDaoImpl extends GenericDaoBase implem @Override public boolean deleteLinkLocalIpAddressByPod(long podId) { - return _LinkLocalIpAllocDao.deleteIpAddressByPod(podId); + return _linkLocalIpAllocDao.deleteIpAddressByPod(podId); } @Override @@ -265,7 +265,7 @@ public class DataCenterDaoImpl extends GenericDaoBase implem @Override public String allocateLinkLocalIpAddress(long dcId, long podId, long instanceId, String reservationId) { - DataCenterLinkLocalIpAddressVO vo = _LinkLocalIpAllocDao.takeIpAddress(dcId, podId, instanceId, reservationId); + DataCenterLinkLocalIpAddressVO vo = _linkLocalIpAllocDao.takeIpAddress(dcId, podId, instanceId, reservationId); if (vo == null) { return null; } @@ -294,7 +294,7 @@ public class DataCenterDaoImpl extends GenericDaoBase implem @Override public void addLinkLocalIpAddress(long dcId, long podId, String start, String end) { - _LinkLocalIpAllocDao.addIpRange(dcId, podId, start, end); + _linkLocalIpAllocDao.addIpRange(dcId, podId, start, end); } @Override diff --git a/engine/schema/src/com/cloud/event/dao/UsageEventDetailsDaoImpl.java b/engine/schema/src/com/cloud/event/dao/UsageEventDetailsDaoImpl.java index 2126fff45c6..e959d089552 100644 --- a/engine/schema/src/com/cloud/event/dao/UsageEventDetailsDaoImpl.java +++ b/engine/schema/src/com/cloud/event/dao/UsageEventDetailsDaoImpl.java @@ -98,7 +98,7 @@ public class UsageEventDetailsDaoImpl extends GenericDaoBase findByPolicyId(long id); + List findByPolicyId(long id); } diff --git a/engine/schema/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java b/engine/schema/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java index 557a6731af0..fd4bfd57175 100644 --- a/engine/schema/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java +++ b/engine/schema/src/com/cloud/network/as/dao/AutoScalePolicyConditionMapDaoImpl.java @@ -56,14 +56,14 @@ public class AutoScalePolicyConditionMapDaoImpl extends GenericDaoBase sc = createSearchCriteria(); sc.addAnd("policyId", SearchCriteria.Op.EQ, policyId); - return expunge(sc) > 0; - } + return expunge(sc) > 0; + } - @Override - public List findByPolicyId(long policyId) { - SearchCriteria sc = createSearchCriteria(); - sc.addAnd("policyId", SearchCriteria.Op.EQ, policyId); + @Override + public List findByPolicyId(long policyId) { + SearchCriteria sc = createSearchCriteria(); + sc.addAnd("policyId", SearchCriteria.Op.EQ, policyId); - return listBy(sc); - } + return listBy(sc); + } } diff --git a/engine/schema/src/com/cloud/network/as/dao/AutoScaleVmGroupVmMapDao.java b/engine/schema/src/com/cloud/network/as/dao/AutoScaleVmGroupVmMapDao.java index b7234e7a64c..1a8acf3c00a 100644 --- a/engine/schema/src/com/cloud/network/as/dao/AutoScaleVmGroupVmMapDao.java +++ b/engine/schema/src/com/cloud/network/as/dao/AutoScaleVmGroupVmMapDao.java @@ -22,10 +22,10 @@ import com.cloud.network.as.AutoScaleVmGroupVmMapVO; import com.cloud.utils.db.GenericDao; public interface AutoScaleVmGroupVmMapDao extends GenericDao { - public Integer countByGroup(long vmGroupId); + public Integer countByGroup(long vmGroupId); - public List listByGroup(long vmGroupId); + public List listByGroup(long vmGroupId); - public int remove(long vmGroupId, long vmId); + public int remove(long vmGroupId, long vmId); } diff --git a/engine/schema/src/com/cloud/network/as/dao/AutoScaleVmGroupVmMapDaoImpl.java b/engine/schema/src/com/cloud/network/as/dao/AutoScaleVmGroupVmMapDaoImpl.java index 494092d65d5..463477c74c6 100644 --- a/engine/schema/src/com/cloud/network/as/dao/AutoScaleVmGroupVmMapDaoImpl.java +++ b/engine/schema/src/com/cloud/network/as/dao/AutoScaleVmGroupVmMapDaoImpl.java @@ -27,30 +27,30 @@ import com.cloud.utils.db.GenericDaoBase; import com.cloud.utils.db.SearchCriteria; @Component -@Local(value={AutoScaleVmGroupVmMapDao.class}) +@Local(value = {AutoScaleVmGroupVmMapDao.class}) public class AutoScaleVmGroupVmMapDaoImpl extends GenericDaoBase implements AutoScaleVmGroupVmMapDao { - @Override - public Integer countByGroup(long vmGroupId) { + @Override + public Integer countByGroup(long vmGroupId) { - SearchCriteria sc = createSearchCriteria(); - sc.addAnd("vmGroupId", SearchCriteria.Op.EQ, vmGroupId); - return getCount(sc); - } + SearchCriteria sc = createSearchCriteria(); + sc.addAnd("vmGroupId", SearchCriteria.Op.EQ, vmGroupId); + return getCount(sc); + } - @Override - public List listByGroup(long vmGroupId) { - SearchCriteria sc = createSearchCriteria(); - sc.addAnd("vmGroupId", SearchCriteria.Op.EQ, vmGroupId); - return listBy(sc); - } + @Override + public List listByGroup(long vmGroupId) { + SearchCriteria sc = createSearchCriteria(); + sc.addAnd("vmGroupId", SearchCriteria.Op.EQ, vmGroupId); + return listBy(sc); + } - @Override - public int remove(long vmGroupId, long vmId) { - SearchCriteria sc = createSearchCriteria(); - sc.addAnd("vmGroupId", SearchCriteria.Op.EQ, vmGroupId); - sc.addAnd("instanceId", SearchCriteria.Op.EQ, vmId); - return remove(sc); - } + @Override + public int remove(long vmGroupId, long vmId) { + SearchCriteria sc = createSearchCriteria(); + sc.addAnd("vmGroupId", SearchCriteria.Op.EQ, vmGroupId); + sc.addAnd("instanceId", SearchCriteria.Op.EQ, vmId); + return remove(sc); + } } diff --git a/engine/schema/src/com/cloud/network/dao/ExternalFirewallDeviceDao.java b/engine/schema/src/com/cloud/network/dao/ExternalFirewallDeviceDao.java index bb3ebef0e75..b67130b72f0 100644 --- a/engine/schema/src/com/cloud/network/dao/ExternalFirewallDeviceDao.java +++ b/engine/schema/src/com/cloud/network/dao/ExternalFirewallDeviceDao.java @@ -34,25 +34,25 @@ public interface ExternalFirewallDeviceDao extends GenericDao listByPhysicalNetworkAndProvider(long physicalNetworkId, String provider_name); + List listByPhysicalNetworkAndProvider(long physicalNetworkId, String providerName); /** * list the firewall devices added in to this physical network by their allocation state * @param physicalNetworkId physical Network Id - * @param provider_name netwrok service provider name + * @param providerName netwrok service provider name * @param allocationState firewall device allocation state * @return list of ExternalFirewallDeviceVO for the devices in the physical network with a device allocation state */ - List listByProviderAndDeviceAllocationState(long physicalNetworkId, String provider_name, FirewallDeviceAllocationState allocationState); + List listByProviderAndDeviceAllocationState(long physicalNetworkId, String providerName, FirewallDeviceAllocationState allocationState); /** * list the load balancer devices added in to this physical network by the device status (enabled/disabled) * @param physicalNetworkId physical Network Id - * @param provider_name netwrok service provider name + * @param providerName netwrok service provider name * @param state firewall device status * @return list of ExternalFirewallDeviceVO for the devices in the physical network with a device state */ - List listByProviderAndDeviceStaus(long physicalNetworkId, String provider_name, FirewallDeviceState state); + List listByProviderAndDeviceStaus(long physicalNetworkId, String providerName, FirewallDeviceState state); } diff --git a/engine/schema/src/com/cloud/network/dao/ExternalFirewallDeviceVO.java b/engine/schema/src/com/cloud/network/dao/ExternalFirewallDeviceVO.java index 2e49ba83423..141eb530fd0 100644 --- a/engine/schema/src/com/cloud/network/dao/ExternalFirewallDeviceVO.java +++ b/engine/schema/src/com/cloud/network/dao/ExternalFirewallDeviceVO.java @@ -80,10 +80,10 @@ public class ExternalFirewallDeviceVO implements InternalIdentity, Identity { Free, Allocated } - public ExternalFirewallDeviceVO(long hostId, long physicalNetworkId, String provider_name, String device_name, long capacity, boolean dedicated) { + public ExternalFirewallDeviceVO(long hostId, long physicalNetworkId, String providerName, String deviceName, long capacity, boolean dedicated) { this.physicalNetworkId = physicalNetworkId; - this.providerName = provider_name; - this.deviceName = device_name; + this.providerName = providerName; + this.deviceName = deviceName; this.hostId = hostId; this.deviceState = FirewallDeviceState.Disabled; this.allocationState = FirewallDeviceAllocationState.Free; diff --git a/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceDao.java b/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceDao.java index b7555989f04..91254474e99 100644 --- a/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceDao.java +++ b/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceDao.java @@ -34,36 +34,36 @@ public interface ExternalLoadBalancerDeviceDao extends GenericDao listByPhysicalNetworkAndProvider(long physicalNetworkId, String provider_name); + List listByPhysicalNetworkAndProvider(long physicalNetworkId, String providerName); /** * list the load balancer devices added in to this physical network by their allocation state * @param physicalNetworkId physical Network Id - * @param provider_name netwrok service provider name + * @param providerName netwrok service provider name * @param allocationState load balancer device allocation state * @return list of ExternalLoadBalancerDeviceVO for the devices in the physical network with a device allocation state */ - List listByProviderAndDeviceAllocationState(long physicalNetworkId, String provider_name, LBDeviceAllocationState allocationState); + List listByProviderAndDeviceAllocationState(long physicalNetworkId, String providerName, LBDeviceAllocationState allocationState); /** * list the load balancer devices added in to this physical network by the device status (enabled/disabled) * @param physicalNetworkId physical Network Id - * @param provider_name netwrok service provider name + * @param providerName netwrok service provider name * @param state load balancer device status * @return list of ExternalLoadBalancerDeviceVO for the devices in the physical network with a device state */ - List listByProviderAndDeviceStaus(long physicalNetworkId, String provider_name, LBDeviceState state); + List listByProviderAndDeviceStaus(long physicalNetworkId, String providerName, LBDeviceState state); /** * list the load balancer devices added in to this physical network by the managed type (external/cloudstack managed) * @param physicalNetworkId physical Network Id - * @param provider_name netwrok service provider name + * @param providerName netwrok service provider name * @param managed managed type * @return list of ExternalLoadBalancerDeviceVO for the devices in to this physical network of a managed type */ - List listByProviderAndManagedType(long physicalNetworkId, String provider_name, boolean managed); + List listByProviderAndManagedType(long physicalNetworkId, String providerName, boolean managed); /** * Find the external load balancer device that is provisioned as GSLB service provider in the pyshical network diff --git a/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceDaoImpl.java b/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceDaoImpl.java index 432b4a2eb9d..da23bcfad05 100644 --- a/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceDaoImpl.java +++ b/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceDaoImpl.java @@ -87,18 +87,18 @@ public class ExternalLoadBalancerDeviceDaoImpl extends GenericDaoBase listByPhysicalNetworkAndProvider(long physicalNetworkId, String provider_name) { + public List listByPhysicalNetworkAndProvider(long physicalNetworkId, String providerName) { SearchCriteria sc = physicalNetworkServiceProviderSearch.create(); sc.setParameters("physicalNetworkId", physicalNetworkId); - sc.setParameters("providerName", provider_name); + sc.setParameters("providerName", providerName); return search(sc, null); } @Override - public List listByProviderAndDeviceAllocationState(long physicalNetworkId, String provider_name, LBDeviceAllocationState state) { + public List listByProviderAndDeviceAllocationState(long physicalNetworkId, String providerName, LBDeviceAllocationState state) { SearchCriteria sc = allocationStateSearch.create(); sc.setParameters("physicalNetworkId", physicalNetworkId); - sc.setParameters("providerName", provider_name); + sc.setParameters("providerName", providerName); sc.setParameters("allocationState", state); sc.setParameters("exclusiveGslbProvider", false); return search(sc, null); diff --git a/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceVO.java b/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceVO.java index d82d5370fe5..80bec1b8152 100644 --- a/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceVO.java +++ b/engine/schema/src/com/cloud/network/dao/ExternalLoadBalancerDeviceVO.java @@ -103,11 +103,11 @@ public class ExternalLoadBalancerDeviceVO implements InternalIdentity, Identity Provider // This state is set only for device that can dynamically provision LB appliances } - public ExternalLoadBalancerDeviceVO(long hostId, long physicalNetworkId, String provider_name, String device_name, long capacity, boolean dedicated, + public ExternalLoadBalancerDeviceVO(long hostId, long physicalNetworkId, String providerName, String deviceName, long capacity, boolean dedicated, boolean gslbProvider) { this.physicalNetworkId = physicalNetworkId; - this.providerName = provider_name; - this.deviceName = device_name; + this.providerName = providerName; + this.deviceName = deviceName; this.hostId = hostId; this.state = LBDeviceState.Disabled; this.allocationState = LBDeviceAllocationState.Free; @@ -119,14 +119,14 @@ public class ExternalLoadBalancerDeviceVO implements InternalIdentity, Identity this.gslbProvider = gslbProvider; this.gslbSitePublicIP = null; this.gslbSitePrivateIP = null; - if (device_name.equalsIgnoreCase(ExternalNetworkDeviceManager.NetworkDevice.NetscalerSDXLoadBalancer.getName())) { + if (deviceName.equalsIgnoreCase(ExternalNetworkDeviceManager.NetworkDevice.NetscalerSDXLoadBalancer.getName())) { this.allocationState = LBDeviceAllocationState.Provider; } } - public ExternalLoadBalancerDeviceVO(long hostId, long physicalNetworkId, String provider_name, String device_name, long capacity, boolean dedicated, boolean managed, + public ExternalLoadBalancerDeviceVO(long hostId, long physicalNetworkId, String providerName, String deviceName, long capacity, boolean dedicated, boolean managed, long parentHostId) { - this(hostId, physicalNetworkId, provider_name, device_name, capacity, dedicated, false); + this(hostId, physicalNetworkId, providerName, deviceName, capacity, dedicated, false); this.isManagedDevice = managed; this.parentHostId = parentHostId; } diff --git a/engine/schema/src/com/cloud/network/dao/LoadBalancerCertMapDaoImpl.java b/engine/schema/src/com/cloud/network/dao/LoadBalancerCertMapDaoImpl.java index c84b97dbc60..9986337218f 100644 --- a/engine/schema/src/com/cloud/network/dao/LoadBalancerCertMapDaoImpl.java +++ b/engine/schema/src/com/cloud/network/dao/LoadBalancerCertMapDaoImpl.java @@ -55,9 +55,9 @@ public class LoadBalancerCertMapDaoImpl extends GenericDaoBase sc = findByLbRuleId.create(); - sc.setParameters("loadBalancerId", LbId); + sc.setParameters("loadBalancerId", lbId); return findOneBy(sc); } diff --git a/engine/schema/src/com/cloud/network/dao/OvsProviderDao.java b/engine/schema/src/com/cloud/network/dao/OvsProviderDao.java index 2cd21c64c5b..692ec869a17 100644 --- a/engine/schema/src/com/cloud/network/dao/OvsProviderDao.java +++ b/engine/schema/src/com/cloud/network/dao/OvsProviderDao.java @@ -22,9 +22,9 @@ import com.cloud.network.element.OvsProviderVO; import com.cloud.utils.db.GenericDao; public interface OvsProviderDao extends GenericDao { - public OvsProviderVO findByNspId(long nspId); + public OvsProviderVO findByNspId(long nspId); - public List listByEnabled(boolean enabled); + public List listByEnabled(boolean enabled); - public OvsProviderVO findByIdAndEnabled(long id, boolean enabled); + public OvsProviderVO findByIdAndEnabled(long id, boolean enabled); } diff --git a/engine/schema/src/com/cloud/network/dao/OvsProviderDaoImpl.java b/engine/schema/src/com/cloud/network/dao/OvsProviderDaoImpl.java index ec20d4ccc6f..ee13197c0bc 100644 --- a/engine/schema/src/com/cloud/network/dao/OvsProviderDaoImpl.java +++ b/engine/schema/src/com/cloud/network/dao/OvsProviderDaoImpl.java @@ -32,42 +32,42 @@ import com.cloud.utils.db.SearchCriteria; @Local(value = OvsProviderDao.class) @DB() public class OvsProviderDaoImpl extends GenericDaoBase - implements OvsProviderDao { - final SearchBuilder AllFieldsSearch; + implements OvsProviderDao { + final SearchBuilder AllFieldsSearch; - public OvsProviderDaoImpl() { - super(); - AllFieldsSearch = createSearchBuilder(); - AllFieldsSearch.and("id", AllFieldsSearch.entity().getId(), - SearchCriteria.Op.EQ); - AllFieldsSearch.and("nsp_id", AllFieldsSearch.entity().getNspId(), - SearchCriteria.Op.EQ); - AllFieldsSearch.and("uuid", AllFieldsSearch.entity().getUuid(), - SearchCriteria.Op.EQ); - AllFieldsSearch.and("enabled", AllFieldsSearch.entity().isEnabled(), - SearchCriteria.Op.EQ); - AllFieldsSearch.done(); - } + public OvsProviderDaoImpl() { + super(); + AllFieldsSearch = createSearchBuilder(); + AllFieldsSearch.and("id", AllFieldsSearch.entity().getId(), + SearchCriteria.Op.EQ); + AllFieldsSearch.and("nsp_id", AllFieldsSearch.entity().getNspId(), + SearchCriteria.Op.EQ); + AllFieldsSearch.and("uuid", AllFieldsSearch.entity().getUuid(), + SearchCriteria.Op.EQ); + AllFieldsSearch.and("enabled", AllFieldsSearch.entity().isEnabled(), + SearchCriteria.Op.EQ); + AllFieldsSearch.done(); + } - @Override - public OvsProviderVO findByNspId(long nspId) { - SearchCriteria sc = AllFieldsSearch.create(); - sc.setParameters("nsp_id", nspId); - return findOneBy(sc); - } + @Override + public OvsProviderVO findByNspId(long nspId) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("nsp_id", nspId); + return findOneBy(sc); + } - @Override - public List listByEnabled(boolean enabled) { - SearchCriteria sc = AllFieldsSearch.create(); - sc.setParameters("enabled", enabled); - return listBy(sc); - } + @Override + public List listByEnabled(boolean enabled) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("enabled", enabled); + return listBy(sc); + } - @Override - public OvsProviderVO findByIdAndEnabled(long id, boolean enabled) { - SearchCriteria sc = AllFieldsSearch.create(); - sc.setParameters("id", id); - sc.setParameters("enabled", enabled); - return findOneBy(sc); - } + @Override + public OvsProviderVO findByIdAndEnabled(long id, boolean enabled) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("id", id); + sc.setParameters("enabled", enabled); + return findOneBy(sc); + } } diff --git a/engine/schema/src/com/cloud/network/dao/SslCertDaoImpl.java b/engine/schema/src/com/cloud/network/dao/SslCertDaoImpl.java index cab001bf922..99354c5dbc2 100644 --- a/engine/schema/src/com/cloud/network/dao/SslCertDaoImpl.java +++ b/engine/schema/src/com/cloud/network/dao/SslCertDaoImpl.java @@ -33,7 +33,7 @@ public class SslCertDaoImpl extends GenericDaoBase implements S listByAccountId = createSearchBuilder(); listByAccountId.and("accountId", listByAccountId.entity().getAccountId(), SearchCriteria.Op.EQ); listByAccountId.done(); - } + } @Override public List listByAccountId(Long accountId) { diff --git a/engine/schema/src/com/cloud/network/element/OvsProviderVO.java b/engine/schema/src/com/cloud/network/element/OvsProviderVO.java index ddcc9c3b7ec..09ea59d0440 100644 --- a/engine/schema/src/com/cloud/network/element/OvsProviderVO.java +++ b/engine/schema/src/com/cloud/network/element/OvsProviderVO.java @@ -32,68 +32,68 @@ import com.cloud.utils.db.GenericDao; @Entity @Table(name = ("ovs_providers")) public class OvsProviderVO implements OvsProvider { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") - long id; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + long id; - @Column(name = "nsp_id") - private long nspId; + @Column(name = "nsp_id") + private long nspId; - @Column(name = "uuid") - private String uuid; + @Column(name = "uuid") + private String uuid; - @Column(name = "enabled") - private boolean enabled; + @Column(name = "enabled") + private boolean enabled; - @Column(name = GenericDao.REMOVED_COLUMN) - Date removed; + @Column(name = GenericDao.REMOVED_COLUMN) + Date removed; - public OvsProviderVO() { - this.uuid = UUID.randomUUID().toString(); - } + public OvsProviderVO() { + this.uuid = UUID.randomUUID().toString(); + } - public OvsProviderVO(long nspId) { - this.nspId = nspId; - this.uuid = UUID.randomUUID().toString(); - } + public OvsProviderVO(long nspId) { + this.nspId = nspId; + this.uuid = UUID.randomUUID().toString(); + } - @Override - public long getNspId() { - return nspId; - } + @Override + public long getNspId() { + return nspId; + } - public String getUuid() { - return uuid; - } + public String getUuid() { + return uuid; + } - @Override - public long getId() { - return id; - } + @Override + public long getId() { + return id; + } - public Date getRemoved() { - return removed; - } + public Date getRemoved() { + return removed; + } - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } - @Override - public boolean isEnabled() { - return this.enabled; - } + @Override + public boolean isEnabled() { + return this.enabled; + } - public void setId(long id) { - this.id = id; - } + public void setId(long id) { + this.id = id; + } - public void setNspId(long nspId) { - this.nspId = nspId; - } + public void setNspId(long nspId) { + this.nspId = nspId; + } - public void setUuid(String uuid) { - this.uuid = uuid; - } + public void setUuid(String uuid) { + this.uuid = uuid; + } } diff --git a/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java b/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java index cfc3da5d970..c941055ef8d 100644 --- a/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java +++ b/engine/schema/src/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java @@ -41,7 +41,7 @@ import com.cloud.utils.db.TransactionLegacy; public class VmRulesetLogDaoImpl extends GenericDaoBase implements VmRulesetLogDao { protected static Logger s_logger = Logger.getLogger(VmRulesetLogDaoImpl.class); private SearchBuilder VmIdSearch; - private String INSERT_OR_UPDATE = "INSERT INTO op_vm_ruleset_log (instance_id, created, logsequence) " + private String InsertOrUpdateSQl = "INSERT INTO op_vm_ruleset_log (instance_id, created, logsequence) " + " VALUES(?, now(), 1) ON DUPLICATE KEY UPDATE logsequence=logsequence+1"; private static HashMap cachedPrepStmtStrings = new HashMap(); final static private int cacheStringSizes[] = {512, 256, 128, 64, 32, 16, 8, 4, 2, 1}; @@ -160,7 +160,7 @@ public class VmRulesetLogDaoImpl extends GenericDaoBase im int count = 0; boolean success = true; try { - stmtInsert = txn.prepareAutoCloseStatement(INSERT_OR_UPDATE); + stmtInsert = txn.prepareAutoCloseStatement(InsertOrUpdateSQl); txn.start(); for (Long vmId : workItems) { diff --git a/engine/schema/src/com/cloud/offerings/NetworkOfferingVO.java b/engine/schema/src/com/cloud/offerings/NetworkOfferingVO.java index a0234621deb..bf078074948 100755 --- a/engine/schema/src/com/cloud/offerings/NetworkOfferingVO.java +++ b/engine/schema/src/com/cloud/offerings/NetworkOfferingVO.java @@ -479,8 +479,8 @@ public class NetworkOfferingVO implements NetworkOffering { return this.concurrentConnections; } - public void setConcurrentConnections(Integer concurrent_connections) { - this.concurrentConnections = concurrent_connections; + public void setConcurrentConnections(Integer concurrentConnections) { + this.concurrentConnections = concurrentConnections; } public void setPublicLb(boolean publicLb) { diff --git a/engine/schema/src/com/cloud/service/ServiceOfferingVO.java b/engine/schema/src/com/cloud/service/ServiceOfferingVO.java index f1cc39b9326..b554a230278 100755 --- a/engine/schema/src/com/cloud/service/ServiceOfferingVO.java +++ b/engine/schema/src/com/cloud/service/ServiceOfferingVO.java @@ -62,10 +62,10 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering private String hostTag; @Column(name = "default_use") - private boolean default_use; + private boolean defaultUse; @Column(name = "vm_type") - private String vm_type; + private String vmType; @Column(name = "sort_key") int sortKey; @@ -89,7 +89,7 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering } public ServiceOfferingVO(String name, Integer cpu, Integer ramSize, Integer speed, Integer rateMbps, Integer multicastRateMbps, boolean offerHA, String displayText, - boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse, VirtualMachine.Type vm_type, boolean defaultUse) { + boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse, VirtualMachine.Type vmType, boolean defaultUse) { super(name, displayText, false, tags, recreatable, useLocalStorage, systemUse, true); this.cpu = cpu; this.ramSize = ramSize; @@ -99,12 +99,12 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering this.offerHA = offerHA; this.limitCpuUse = false; this.volatileVm = false; - this.default_use = defaultUse; - this.vm_type = vm_type == null ? null : vm_type.toString().toLowerCase(); + this.defaultUse = defaultUse; + this.vmType = vmType == null ? null : vmType.toString().toLowerCase(); } public ServiceOfferingVO(String name, Integer cpu, Integer ramSize, Integer speed, Integer rateMbps, Integer multicastRateMbps, boolean offerHA, boolean limitCpuUse, - boolean volatileVm, String displayText, boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse, VirtualMachine.Type vm_type, + boolean volatileVm, String displayText, boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse, VirtualMachine.Type vmType, Long domainId) { super(name, displayText, false, tags, recreatable, useLocalStorage, systemUse, true, domainId); this.cpu = cpu; @@ -115,12 +115,12 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering this.offerHA = offerHA; this.limitCpuUse = limitCpuUse; this.volatileVm = volatileVm; - this.vm_type = vm_type == null ? null : vm_type.toString().toLowerCase(); + this.vmType = vmType == null ? null : vmType.toString().toLowerCase(); } public ServiceOfferingVO(String name, Integer cpu, Integer ramSize, Integer speed, Integer rateMbps, Integer multicastRateMbps, boolean offerHA, boolean limitResourceUse, boolean volatileVm, String displayText, boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse, - VirtualMachine.Type vm_type, Long domainId, String hostTag) { + VirtualMachine.Type vmType, Long domainId, String hostTag) { this(name, cpu, ramSize, @@ -135,14 +135,14 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering recreatable, tags, systemUse, - vm_type, + vmType, domainId); this.hostTag = hostTag; } public ServiceOfferingVO(String name, Integer cpu, Integer ramSize, Integer speed, Integer rateMbps, Integer multicastRateMbps, boolean offerHA, boolean limitResourceUse, boolean volatileVm, String displayText, boolean useLocalStorage, boolean recreatable, String tags, boolean systemUse, - VirtualMachine.Type vm_type, Long domainId, String hostTag, String deploymentPlanner) { + VirtualMachine.Type vmType, Long domainId, String hostTag, String deploymentPlanner) { this(name, cpu, ramSize, @@ -157,14 +157,23 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering recreatable, tags, systemUse, - vm_type, + vmType, domainId, hostTag); this.deploymentPlanner = deploymentPlanner; } public ServiceOfferingVO(ServiceOfferingVO offering) { - super(offering.getId(), offering.getName(), offering.getDisplayText(), false, offering.getTags(), offering.isRecreatable(), offering.getUseLocalStorage(), offering.getSystemUse(), true, offering.getDomainId()); + super(offering.getId(), + offering.getName(), + offering.getDisplayText(), + false, + offering.getTags(), + offering.isRecreatable(), + offering.getUseLocalStorage(), + offering.getSystemUse(), + true, + offering.getDomainId()); this.cpu = offering.getCpu(); this.ramSize = offering.getRamSize(); this.speed = offering.getSpeed(); @@ -174,7 +183,7 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering this.limitCpuUse = offering.getLimitCpuUse(); this.volatileVm = offering.getVolatileVm(); this.hostTag = offering.getHostTag(); - this.vm_type = offering.getSystemVmType(); + this.vmType = offering.getSystemVmType(); } @Override @@ -197,7 +206,7 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering @Override public boolean getDefaultUse() { - return default_use; + return defaultUse; } @Override @@ -267,7 +276,7 @@ public class ServiceOfferingVO extends DiskOfferingVO implements ServiceOffering @Override public String getSystemVmType() { - return vm_type; + return vmType; } @Override diff --git a/engine/schema/src/com/cloud/service/dao/ServiceOfferingDao.java b/engine/schema/src/com/cloud/service/dao/ServiceOfferingDao.java index ecab8d2943c..ab818538d2a 100644 --- a/engine/schema/src/com/cloud/service/dao/ServiceOfferingDao.java +++ b/engine/schema/src/com/cloud/service/dao/ServiceOfferingDao.java @@ -34,7 +34,7 @@ public interface ServiceOfferingDao extends GenericDao List findServiceOfferingByDomainId(Long domainId); - List findSystemOffering(Long domainId, Boolean isSystem, String vm_type); + List findSystemOffering(Long domainId, Boolean isSystem, String vmType); ServiceOfferingVO persistDeafultServiceOffering(ServiceOfferingVO offering); diff --git a/engine/schema/src/com/cloud/service/dao/ServiceOfferingDaoImpl.java b/engine/schema/src/com/cloud/service/dao/ServiceOfferingDaoImpl.java index 5d423e0a1e7..1905d9e41f6 100644 --- a/engine/schema/src/com/cloud/service/dao/ServiceOfferingDaoImpl.java +++ b/engine/schema/src/com/cloud/service/dao/ServiceOfferingDaoImpl.java @@ -25,10 +25,10 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.persistence.EntityExistsException; -import com.cloud.event.UsageEventVO; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; +import com.cloud.event.UsageEventVO; import com.cloud.service.ServiceOfferingDetailsVO; import com.cloud.service.ServiceOfferingVO; import com.cloud.utils.db.DB; @@ -128,11 +128,11 @@ public class ServiceOfferingDaoImpl extends GenericDaoBase findSystemOffering(Long domainId, Boolean isSystem, String vm_type) { + public List findSystemOffering(Long domainId, Boolean isSystem, String vmType) { SearchCriteria sc = SystemServiceOffering.create(); sc.setParameters("domainId", domainId); sc.setParameters("system", isSystem); - sc.setParameters("vm_type", vm_type); + sc.setParameters("vm_type", vmType); return listBy(sc); } @@ -211,7 +211,7 @@ public class ServiceOfferingDaoImpl extends GenericDaoBase dynamicOffering = userVmDetailsDao.listDetailsKeyPairs(vmId); - return getcomputeOffering(offering, dynamicOffering); + return getcomputeOffering(offering, dynamicOffering); } return offering; } diff --git a/engine/schema/src/com/cloud/storage/DiskOfferingVO.java b/engine/schema/src/com/cloud/storage/DiskOfferingVO.java index 1ff62ab7f24..d1a48d20c91 100755 --- a/engine/schema/src/com/cloud/storage/DiskOfferingVO.java +++ b/engine/schema/src/com/cloud/storage/DiskOfferingVO.java @@ -207,7 +207,7 @@ public class DiskOfferingVO implements DiskOffering { } public DiskOfferingVO(long id, String name, String displayText, boolean mirrored, String tags, boolean recreatable, - boolean useLocalStorage, boolean systemUse, boolean customized, Long domainId) { + boolean useLocalStorage, boolean systemUse, boolean customized, Long domainId) { this.id = id; type = Type.Service; this.name = name; diff --git a/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java index 6cd614d0efc..3d067a2bead 100755 --- a/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java +++ b/engine/schema/src/com/cloud/storage/dao/VMTemplateHostDaoImpl.java @@ -64,8 +64,8 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase TemplateStatusSearch; protected final SearchBuilder TemplateStatesSearch; protected final SearchBuilder updateStateSearch; - protected SearchBuilder ZONE_TEMPLATE_SEARCH; - protected SearchBuilder LOCAL_SECONDARY_STORAGE_SEARCH; + protected SearchBuilder ZoneTemplateSearch; + protected SearchBuilder LocalSecondaryStorageSearch; protected static final String UPDATE_TEMPLATE_HOST_REF = "UPDATE template_host_ref SET download_state = ?, download_pct= ?, last_updated = ? " + ", error_str = ?, local_path = ?, job_id = ? " + "WHERE host_id = ? and type_id = ?"; @@ -131,25 +131,25 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase params) throws ConfigurationException { boolean result = super.configure(name, params); - ZONE_TEMPLATE_SEARCH = createSearchBuilder(); - ZONE_TEMPLATE_SEARCH.and("template_id", ZONE_TEMPLATE_SEARCH.entity().getTemplateId(), SearchCriteria.Op.EQ); - ZONE_TEMPLATE_SEARCH.and("state", ZONE_TEMPLATE_SEARCH.entity().getDownloadState(), SearchCriteria.Op.EQ); + ZoneTemplateSearch = createSearchBuilder(); + ZoneTemplateSearch.and("template_id", ZoneTemplateSearch.entity().getTemplateId(), SearchCriteria.Op.EQ); + ZoneTemplateSearch.and("state", ZoneTemplateSearch.entity().getDownloadState(), SearchCriteria.Op.EQ); SearchBuilder hostSearch = _hostDao.createSearchBuilder(); hostSearch.and("zone_id", hostSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); - ZONE_TEMPLATE_SEARCH.join("tmplHost", hostSearch, hostSearch.entity().getId(), ZONE_TEMPLATE_SEARCH.entity().getHostId(), JoinBuilder.JoinType.INNER); - ZONE_TEMPLATE_SEARCH.done(); + ZoneTemplateSearch.join("tmplHost", hostSearch, hostSearch.entity().getId(), ZoneTemplateSearch.entity().getHostId(), JoinBuilder.JoinType.INNER); + ZoneTemplateSearch.done(); - LOCAL_SECONDARY_STORAGE_SEARCH = createSearchBuilder(); - LOCAL_SECONDARY_STORAGE_SEARCH.and("template_id", LOCAL_SECONDARY_STORAGE_SEARCH.entity().getTemplateId(), SearchCriteria.Op.EQ); - LOCAL_SECONDARY_STORAGE_SEARCH.and("state", LOCAL_SECONDARY_STORAGE_SEARCH.entity().getDownloadState(), SearchCriteria.Op.EQ); + LocalSecondaryStorageSearch = createSearchBuilder(); + LocalSecondaryStorageSearch.and("template_id", LocalSecondaryStorageSearch.entity().getTemplateId(), SearchCriteria.Op.EQ); + LocalSecondaryStorageSearch.and("state", LocalSecondaryStorageSearch.entity().getDownloadState(), SearchCriteria.Op.EQ); SearchBuilder localSecondaryHost = _hostDao.createSearchBuilder(); localSecondaryHost.and("private_ip_address", localSecondaryHost.entity().getPrivateIpAddress(), SearchCriteria.Op.EQ); localSecondaryHost.and("state", localSecondaryHost.entity().getStatus(), SearchCriteria.Op.EQ); localSecondaryHost.and("data_center_id", localSecondaryHost.entity().getDataCenterId(), SearchCriteria.Op.EQ); localSecondaryHost.and("type", localSecondaryHost.entity().getType(), SearchCriteria.Op.EQ); - LOCAL_SECONDARY_STORAGE_SEARCH.join("host", localSecondaryHost, localSecondaryHost.entity().getId(), LOCAL_SECONDARY_STORAGE_SEARCH.entity().getHostId(), + LocalSecondaryStorageSearch.join("host", localSecondaryHost, localSecondaryHost.entity().getId(), LocalSecondaryStorageSearch.entity().getHostId(), JoinBuilder.JoinType.INNER); - LOCAL_SECONDARY_STORAGE_SEARCH.done(); + LocalSecondaryStorageSearch.done(); return result; } @@ -330,7 +330,7 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase listByZoneTemplate(long dcId, long templateId, boolean readyOnly) { - SearchCriteria sc = ZONE_TEMPLATE_SEARCH.create(); + SearchCriteria sc = ZoneTemplateSearch.create(); sc.setParameters("template_id", templateId); sc.setJoinParameters("tmplHost", "zone_id", dcId); if (readyOnly) { @@ -365,7 +365,7 @@ public class VMTemplateHostDaoImpl extends GenericDaoBase sc = LOCAL_SECONDARY_STORAGE_SEARCH.create(); + SearchCriteria sc = LocalSecondaryStorageSearch.create(); sc.setJoinParameters("host", "private_ip_address", computingHost.getPrivateIpAddress()); sc.setJoinParameters("host", "state", com.cloud.host.Status.Up); sc.setJoinParameters("host", "data_center_id", computingHost.getDataCenterId()); diff --git a/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java b/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java index c1120bd217f..c20a418313d 100755 --- a/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java +++ b/engine/schema/src/com/cloud/upgrade/DatabaseIntegrityChecker.java @@ -39,7 +39,7 @@ import com.cloud.utils.exception.CloudRuntimeException; @Component @Local(value = {SystemIntegrityChecker.class}) public class DatabaseIntegrityChecker extends AdapterBase implements SystemIntegrityChecker { - private final Logger s_logger = Logger.getLogger(DatabaseIntegrityChecker.class); + private static final Logger s_logger = Logger.getLogger(DatabaseIntegrityChecker.class); @Inject VersionDao _dao; diff --git a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java index c5eea10861a..0761c9fe61c 100755 --- a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java +++ b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java @@ -80,7 +80,7 @@ import com.cloud.utils.exception.CloudRuntimeException; @Local(value = {SystemIntegrityChecker.class}) public class DatabaseUpgradeChecker implements SystemIntegrityChecker { - private final Logger s_logger = Logger.getLogger(DatabaseUpgradeChecker.class); + private static final Logger s_logger = Logger.getLogger(DatabaseUpgradeChecker.class); protected HashMap _upgradeMap = new HashMap(); diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade218to22.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade218to22.java index 5aa4b5f341d..4f0671585d7 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade218to22.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade218to22.java @@ -72,10 +72,10 @@ public class Upgrade218to22 implements DbUpgrade { } protected long insertNetworkOffering(Connection conn, String name, String displayText, String trafficType, boolean systemOnly, boolean defaultNetworkOffering, - String availability, boolean dns_service, boolean gateway_service, boolean firewall_service, boolean lb_service, boolean userdata_service, boolean vpn_service, - boolean dhcp_service) { + String availability, boolean dnsService, boolean gatewayService, boolean firewallService, boolean lbService, boolean userdataService, boolean vpnService, + boolean dhcpService) { String insertSql = - "INSERT INTO network_offerings (name, display_text, nw_rate, mc_rate, concurrent_connections, traffic_type, tags, system_only, specify_vlan, service_offering_id, created, removed, `default`, availability, dns_service, gateway_service, firewall_service, lb_service, userdata_service, vpn_service, dhcp_service) " + "INSERT INTO network_offerings (name, display_text, nw_rate, mc_rate, concurrent_connections, traffic_type, tags, system_only, specify_vlan, service_offering_id, created, removed, `default`, availability, dnsService, gatewayService, firewallService, lbService, userdataService, vpnService, dhcpService) " + "VALUES (?, ?, NULL, NULL, NULL, ?, NULL, ?, 0, NULL, now(), NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; try { PreparedStatement pstmt = conn.prepareStatement(insertSql, Statement.RETURN_GENERATED_KEYS); @@ -86,13 +86,13 @@ public class Upgrade218to22 implements DbUpgrade { pstmt.setBoolean(i++, systemOnly); pstmt.setBoolean(i++, defaultNetworkOffering); pstmt.setString(i++, availability); - pstmt.setBoolean(i++, dns_service); - pstmt.setBoolean(i++, gateway_service); - pstmt.setBoolean(i++, firewall_service); - pstmt.setBoolean(i++, lb_service); - pstmt.setBoolean(i++, userdata_service); - pstmt.setBoolean(i++, vpn_service); - pstmt.setBoolean(i++, dhcp_service); + pstmt.setBoolean(i++, dnsService); + pstmt.setBoolean(i++, gatewayService); + pstmt.setBoolean(i++, firewallService); + pstmt.setBoolean(i++, lbService); + pstmt.setBoolean(i++, userdataService); + pstmt.setBoolean(i++, vpnService); + pstmt.setBoolean(i++, dhcpService); pstmt.executeUpdate(); ResultSet rs = pstmt.getGeneratedKeys(); rs.next(); diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade2213to2214.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade2213to2214.java index 3edefcb7d09..f3293ba5549 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade2213to2214.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade2213to2214.java @@ -301,10 +301,10 @@ public class Upgrade2213to2214 implements DbUpgrade { DbUpgradeUtils.dropKeysIfExist(conn, "cloud.user_ip_address", keys, false); try { PreparedStatement pstmt = conn.prepareStatement( - "ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__account_id` FOREIGN KEY (`account_id`) REFERENCES `account`(`id`)"); + "ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__account_id` FOREIGN KEY (`account_id`) REFERENCES `account`(`id`)"); pstmt.executeUpdate(); pstmt = conn.prepareStatement( - "ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__vlan_db_id` FOREIGN KEY (`vlan_db_id`) REFERENCES `vlan`(`id`) ON DELETE CASCADE"); + "ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__vlan_db_id` FOREIGN KEY (`vlan_db_id`) REFERENCES `vlan`(`id`) ON DELETE CASCADE"); pstmt.executeUpdate(); pstmt = conn.prepareStatement( "ALTER TABLE `cloud`.`user_ip_address` ADD CONSTRAINT `fk_user_ip_address__data_center_id`" + diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java index 80497d41259..a331b132abe 100755 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade410to420.java @@ -3161,28 +3161,28 @@ public class Upgrade410to420 implements DbUpgrade { } } - private static void upgradeResourceCountforAccount(Connection conn, Long account_id, Long domain_id, String type, Long resource_count) throws SQLException { + private static void upgradeResourceCountforAccount(Connection conn, Long accountId, Long domainId, String type, Long resourceCount) throws SQLException { //update or insert into resource_count table. PreparedStatement pstmt = null; pstmt = conn.prepareStatement("INSERT INTO `cloud`.`resource_count` (account_id, type, count) VALUES (?,?,?) ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id), count=?"); - pstmt.setLong(1, account_id); + pstmt.setLong(1, accountId); pstmt.setString(2, type); - pstmt.setLong(3, resource_count); - pstmt.setLong(4, resource_count); + pstmt.setLong(3, resourceCount); + pstmt.setLong(4, resourceCount); pstmt.executeUpdate(); pstmt.close(); } - private static void upgradeResourceCountforDomain(Connection conn, Long domain_id, String type, Long resource_count) throws SQLException { + private static void upgradeResourceCountforDomain(Connection conn, Long domainId, String type, Long resourceCount) throws SQLException { //update or insert into resource_count table. PreparedStatement pstmt = null; pstmt = conn.prepareStatement("INSERT INTO `cloud`.`resource_count` (domain_id, type, count) VALUES (?,?,?) ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id), count=?"); - pstmt.setLong(1, domain_id); + pstmt.setLong(1, domainId); pstmt.setString(2, type); - pstmt.setLong(3, resource_count); - pstmt.setLong(4, resource_count); + pstmt.setLong(3, resourceCount); + pstmt.setLong(4, resourceCount); pstmt.executeUpdate(); pstmt.close(); } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade420to421.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade420to421.java index 51fb0de8f55..c3a6b0688a7 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade420to421.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade420to421.java @@ -248,28 +248,28 @@ public class Upgrade420to421 implements DbUpgrade { } } - private static void upgradeResourceCountforAccount(Connection conn, Long account_id, Long domain_id, String type, Long resource_count) throws SQLException { + private static void upgradeResourceCountforAccount(Connection conn, Long accountId, Long domainId, String type, Long resourceCount) throws SQLException { //update or insert into resource_count table. PreparedStatement pstmt = null; pstmt = conn.prepareStatement("INSERT INTO `cloud`.`resource_count` (account_id, type, count) VALUES (?,?,?) ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id), count=?"); - pstmt.setLong(1, account_id); + pstmt.setLong(1, accountId); pstmt.setString(2, type); - pstmt.setLong(3, resource_count); - pstmt.setLong(4, resource_count); + pstmt.setLong(3, resourceCount); + pstmt.setLong(4, resourceCount); pstmt.executeUpdate(); pstmt.close(); } - private static void upgradeResourceCountforDomain(Connection conn, Long domain_id, String type, Long resource_count) throws SQLException { + private static void upgradeResourceCountforDomain(Connection conn, Long domainId, String type, Long resourceCount) throws SQLException { //update or insert into resource_count table. PreparedStatement pstmt = null; pstmt = conn.prepareStatement("INSERT INTO `cloud`.`resource_count` (domain_id, type, count) VALUES (?,?,?) ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id), count=?"); - pstmt.setLong(1, domain_id); + pstmt.setLong(1, domainId); pstmt.setString(2, type); - pstmt.setLong(3, resource_count); - pstmt.setLong(4, resource_count); + pstmt.setLong(3, resourceCount); + pstmt.setLong(4, resourceCount); pstmt.executeUpdate(); pstmt.close(); } diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java index 4fcb892822a..8ee1db7d39d 100644 --- a/engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java +++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade430to440.java @@ -50,7 +50,7 @@ public class Upgrade430to440 implements DbUpgrade { throw new CloudRuntimeException("Unable to find db/schema-4310to440.sql"); } - return new File[] { new File(script) }; + return new File[] {new File(script)}; } @Override @@ -64,6 +64,6 @@ public class Upgrade430to440 implements DbUpgrade { throw new CloudRuntimeException("Unable to find db/schema-430to440-cleanup.sql"); } - return new File[] { new File(script) }; + return new File[] {new File(script)}; } } diff --git a/engine/schema/src/com/cloud/usage/UsageVMInstanceVO.java b/engine/schema/src/com/cloud/usage/UsageVMInstanceVO.java index 8d9491f54a1..06d4876c1b3 100644 --- a/engine/schema/src/com/cloud/usage/UsageVMInstanceVO.java +++ b/engine/schema/src/com/cloud/usage/UsageVMInstanceVO.java @@ -46,14 +46,14 @@ public class UsageVMInstanceVO { @Column(name = "service_offering_id") private long serviceOfferingId; - @Column(name="cpu_cores") - private Long cpuCores; + @Column(name = "cpu_cores") + private Long cpuCores; - @Column(name="memory") - private Long memory; + @Column(name = "memory") + private Long memory; - @Column(name="cpu_speed") - private Long cpuSpeed; + @Column(name = "cpu_speed") + private Long cpuSpeed; @Column(name = "template_id") private long templateId; diff --git a/engine/schema/src/com/cloud/usage/dao/UsageStorageDao.java b/engine/schema/src/com/cloud/usage/dao/UsageStorageDao.java index 6d1cde3f50f..f5408d785ff 100644 --- a/engine/schema/src/com/cloud/usage/dao/UsageStorageDao.java +++ b/engine/schema/src/com/cloud/usage/dao/UsageStorageDao.java @@ -23,7 +23,7 @@ import com.cloud.usage.UsageStorageVO; import com.cloud.utils.db.GenericDao; public interface UsageStorageDao extends GenericDao { - public void removeBy(long userId, long id, int storage_type); + public void removeBy(long userId, long id, int storageType); public void update(UsageStorageVO usage); diff --git a/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java index 175bb88ea18..77fc56f9cd1 100644 --- a/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java +++ b/engine/schema/src/com/cloud/usage/dao/UsageStorageDaoImpl.java @@ -89,7 +89,7 @@ public class UsageStorageDaoImpl extends GenericDaoBase im } @Override - public void removeBy(long accountId, long volId, int storage_type) { + public void removeBy(long accountId, long volId, int storageType) { TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB); PreparedStatement pstmt = null; try { @@ -98,7 +98,7 @@ public class UsageStorageDaoImpl extends GenericDaoBase im pstmt = txn.prepareAutoCloseStatement(sql); pstmt.setLong(1, accountId); pstmt.setLong(2, volId); - pstmt.setInt(3, storage_type); + pstmt.setInt(3, storageType); pstmt.executeUpdate(); txn.commit(); } catch (Exception e) { diff --git a/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java b/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java index 792b3265975..4bc23ed3edd 100755 --- a/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java +++ b/engine/schema/src/com/cloud/user/dao/AccountDaoImpl.java @@ -45,7 +45,7 @@ import com.cloud.utils.db.TransactionLegacy; @Local(value = {AccountDao.class}) public class AccountDaoImpl extends GenericDaoBase implements AccountDao { private static final Logger s_logger = Logger.getLogger(AccountDaoImpl.class); - private final String FIND_USER_ACCOUNT_BY_API_KEY = "SELECT u.id, u.username, u.account_id, u.secret_key, u.state, " + private static final String FIND_USER_ACCOUNT_BY_API_KEY = "SELECT u.id, u.username, u.account_id, u.secret_key, u.state, " + "a.id, a.account_name, a.type, a.domain_id, a.state " + "FROM `cloud`.`user` u, `cloud`.`account` a " + "WHERE u.account_id = a.id AND u.api_key = ? and u.removed IS NULL"; diff --git a/engine/schema/src/com/cloud/vm/dao/NicIpAliasDao.java b/engine/schema/src/com/cloud/vm/dao/NicIpAliasDao.java index ff3a24b3db0..b1cd02b5e76 100644 --- a/engine/schema/src/com/cloud/vm/dao/NicIpAliasDao.java +++ b/engine/schema/src/com/cloud/vm/dao/NicIpAliasDao.java @@ -50,7 +50,7 @@ public interface NicIpAliasDao extends GenericDao { List getAliasIpAddressesForNic(long nicId); - Integer countAliasIps(long NicId); + Integer countAliasIps(long nicId); public NicIpAliasVO findByIp4AddressAndVmId(String ip4Address, long vmId); diff --git a/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java index b675fb61bc0..5ea4798cf3d 100755 --- a/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java +++ b/engine/schema/src/com/cloud/vm/dao/UserVmDaoImpl.java @@ -82,7 +82,7 @@ public class UserVmDaoImpl extends GenericDaoBase implements Use "SELECT pod_id FROM cloud.vm_instance WHERE data_center_id = ? AND account_id = ? AND pod_id IS NOT NULL AND (state = 'Running' OR state = 'Stopped') " + "GROUP BY pod_id HAVING count(id) > 0 ORDER BY count(id) DESC"; - private static String VM_DETAILS = "select vm_instance.id, " + private static final String VM_DETAILS = "select vm_instance.id, " + "account.id, account.account_name, account.type, domain.name, instance_group.id, instance_group.name," + "data_center.id, data_center.name, data_center.is_security_group_enabled, host.id, host.name, " + "vm_template.id, vm_template.name, vm_template.display_text, iso.id, iso.name, " @@ -223,7 +223,7 @@ public class UserVmDaoImpl extends GenericDaoBase implements Use vo.setUserData(userData); vo.setDisplayVm(displayVm); vo.setDynamicallyScalable(isDynamicallyScalable); - if (customId != null){ + if (customId != null) { vo.setUuid(customId); } diff --git a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java index f45042c8675..605ece33314 100644 --- a/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java +++ b/engine/schema/src/com/cloud/vm/dao/VMInstanceDaoImpl.java @@ -102,7 +102,7 @@ public class VMInstanceDaoImpl extends GenericDaoBase implem private static final String ORDER_PODS_NUMBER_OF_VMS_FOR_ACCOUNT = "SELECT pod.id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`" + "host_pod_ref` pod LEFT JOIN `cloud`.`vm_instance` vm ON pod.id = vm.pod_id WHERE pod.data_center_id = ? AND pod.removed is null " - + " GROUP BY pod.id ORDER BY 2 ASC "; + + " GROUP BY pod.id ORDER BY 2 ASC "; private static final String ORDER_HOSTS_NUMBER_OF_VMS_FOR_ACCOUNT = "SELECT host.id, SUM(IF(vm.state='Running' AND vm.account_id = ?, 1, 0)) FROM `cloud`.`host` host LEFT JOIN `cloud`.`vm_instance` vm ON host.id = vm.host_id " + diff --git a/engine/schema/src/com/cloud/vm/snapshot/dao/VMSnapshotDao.java b/engine/schema/src/com/cloud/vm/snapshot/dao/VMSnapshotDao.java index 792914b0cce..e714a6e30e9 100644 --- a/engine/schema/src/com/cloud/vm/snapshot/dao/VMSnapshotDao.java +++ b/engine/schema/src/com/cloud/vm/snapshot/dao/VMSnapshotDao.java @@ -35,5 +35,5 @@ public interface VMSnapshotDao extends GenericDao, StateDao< List listByParent(Long vmSnapshotId); - VMSnapshotVO findByName(Long vm_id, String name); + VMSnapshotVO findByName(Long vmId, String name); } diff --git a/engine/schema/src/com/cloud/vm/snapshot/dao/VMSnapshotDaoImpl.java b/engine/schema/src/com/cloud/vm/snapshot/dao/VMSnapshotDaoImpl.java index 4ea6abca209..dccd19fca94 100644 --- a/engine/schema/src/com/cloud/vm/snapshot/dao/VMSnapshotDaoImpl.java +++ b/engine/schema/src/com/cloud/vm/snapshot/dao/VMSnapshotDaoImpl.java @@ -114,9 +114,9 @@ public class VMSnapshotDaoImpl extends GenericDaoBase implem } @Override - public VMSnapshotVO findByName(Long vm_id, String name) { + public VMSnapshotVO findByName(Long vmId, String name) { SearchCriteria sc = AllFieldsSearch.create(); - sc.setParameters("vm_id", vm_id); + sc.setParameters("vm_id", vmId); sc.setParameters("display_name", name); return null; } diff --git a/engine/schema/src/org/apache/cloudstack/resourcedetail/NetworkACLItemDetailVO.java b/engine/schema/src/org/apache/cloudstack/resourcedetail/NetworkACLItemDetailVO.java index fb27d374a94..5abf59cc005 100644 --- a/engine/schema/src/org/apache/cloudstack/resourcedetail/NetworkACLItemDetailVO.java +++ b/engine/schema/src/org/apache/cloudstack/resourcedetail/NetworkACLItemDetailVO.java @@ -79,4 +79,3 @@ public class NetworkACLItemDetailVO implements ResourceDetail { return display; } } - diff --git a/engine/schema/src/org/apache/cloudstack/resourcedetail/NetworkACLListDetailVO.java b/engine/schema/src/org/apache/cloudstack/resourcedetail/NetworkACLListDetailVO.java index 71cf563478a..f60ba8c1270 100644 --- a/engine/schema/src/org/apache/cloudstack/resourcedetail/NetworkACLListDetailVO.java +++ b/engine/schema/src/org/apache/cloudstack/resourcedetail/NetworkACLListDetailVO.java @@ -79,4 +79,3 @@ public class NetworkACLListDetailVO implements ResourceDetail { return display; } } - diff --git a/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/NetworkACLItemDetailsDaoImpl.java b/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/NetworkACLItemDetailsDaoImpl.java index 930c77a4500..03d12820e32 100644 --- a/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/NetworkACLItemDetailsDaoImpl.java +++ b/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/NetworkACLItemDetailsDaoImpl.java @@ -5,7 +5,7 @@ // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, @@ -18,12 +18,13 @@ package org.apache.cloudstack.resourcedetail.dao; import javax.ejb.Local; -import org.apache.cloudstack.resourcedetail.NetworkACLItemDetailVO; -import org.apache.cloudstack.resourcedetail.ResourceDetailsDaoBase; import org.springframework.stereotype.Component; +import org.apache.cloudstack.resourcedetail.NetworkACLItemDetailVO; +import org.apache.cloudstack.resourcedetail.ResourceDetailsDaoBase; + @Component -@Local(value = { NetworkACLItemDetailsDao.class }) +@Local(value = {NetworkACLItemDetailsDao.class}) public class NetworkACLItemDetailsDaoImpl extends ResourceDetailsDaoBase implements NetworkACLItemDetailsDao { @Override diff --git a/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/NetworkACLListDetailsDaoImpl.java b/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/NetworkACLListDetailsDaoImpl.java index 0b7037f7975..e07110f3ab0 100644 --- a/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/NetworkACLListDetailsDaoImpl.java +++ b/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/NetworkACLListDetailsDaoImpl.java @@ -5,7 +5,7 @@ // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, @@ -18,12 +18,13 @@ package org.apache.cloudstack.resourcedetail.dao; import javax.ejb.Local; -import org.apache.cloudstack.resourcedetail.ResourceDetailsDaoBase; -import org.apache.cloudstack.resourcedetail.NetworkACLListDetailVO; import org.springframework.stereotype.Component; +import org.apache.cloudstack.resourcedetail.NetworkACLListDetailVO; +import org.apache.cloudstack.resourcedetail.ResourceDetailsDaoBase; + @Component -@Local(value = { NetworkACLListDetailsDao.class }) +@Local(value = {NetworkACLListDetailsDao.class}) public class NetworkACLListDetailsDaoImpl extends ResourceDetailsDaoBase implements NetworkACLListDetailsDao { @Override diff --git a/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcDetailsDaoImpl.java b/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcDetailsDaoImpl.java index 64597231009..fb22c7c18b2 100644 --- a/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcDetailsDaoImpl.java +++ b/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcDetailsDaoImpl.java @@ -5,7 +5,7 @@ // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, @@ -18,12 +18,13 @@ package org.apache.cloudstack.resourcedetail.dao; import javax.ejb.Local; -import org.apache.cloudstack.resourcedetail.ResourceDetailsDaoBase; -import org.apache.cloudstack.resourcedetail.VpcDetailVO; import org.springframework.stereotype.Component; +import org.apache.cloudstack.resourcedetail.ResourceDetailsDaoBase; +import org.apache.cloudstack.resourcedetail.VpcDetailVO; + @Component -@Local(value = { VpcDetailsDao.class }) +@Local(value = {VpcDetailsDao.class}) public class VpcDetailsDaoImpl extends ResourceDetailsDaoBase implements VpcDetailsDao { @Override diff --git a/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcGatewayDetailsDao.java b/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcGatewayDetailsDao.java index 4f1691926a8..a42d0cfcb70 100644 --- a/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcGatewayDetailsDao.java +++ b/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcGatewayDetailsDao.java @@ -24,4 +24,3 @@ import com.cloud.utils.db.GenericDao; public interface VpcGatewayDetailsDao extends GenericDao, ResourceDetailsDao { } - diff --git a/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcGatewayDetailsDaoImpl.java b/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcGatewayDetailsDaoImpl.java index 2b4c563a4cf..871c3631941 100644 --- a/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcGatewayDetailsDaoImpl.java +++ b/engine/schema/src/org/apache/cloudstack/resourcedetail/dao/VpcGatewayDetailsDaoImpl.java @@ -5,7 +5,7 @@ // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at -// +// // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, @@ -18,12 +18,13 @@ package org.apache.cloudstack.resourcedetail.dao; import javax.ejb.Local; -import org.apache.cloudstack.resourcedetail.ResourceDetailsDaoBase; -import org.apache.cloudstack.resourcedetail.VpcGatewayDetailVO; import org.springframework.stereotype.Component; +import org.apache.cloudstack.resourcedetail.ResourceDetailsDaoBase; +import org.apache.cloudstack.resourcedetail.VpcGatewayDetailVO; + @Component -@Local(value = { VpcGatewayDetailsDao.class }) +@Local(value = {VpcGatewayDetailsDao.class}) public class VpcGatewayDetailsDaoImpl extends ResourceDetailsDaoBase implements VpcGatewayDetailsDao { @Override diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AllTests.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AllTests.java index c475632e910..12943ffb79a 100644 --- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AllTests.java +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AllTests.java @@ -23,7 +23,7 @@ import org.junit.runners.Suite; import org.junit.runners.Suite.SuiteClasses; @RunWith(Suite.class) -@SuiteClasses({volumeServiceTest.class}) +@SuiteClasses({VolumeServiceTest.class}) public class AllTests { } diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java index 9a676f9201f..69d60c26943 100644 --- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java @@ -98,14 +98,14 @@ import com.cloud.vm.snapshot.dao.VMSnapshotDaoImpl; @Configuration @ComponentScan(basePackageClasses = {NicDaoImpl.class, VMInstanceDaoImpl.class, VMTemplateHostDaoImpl.class, VolumeHostDaoImpl.class, VolumeDaoImpl.class, - VMTemplatePoolDaoImpl.class, ResourceTagsDaoImpl.class, VMTemplateDaoImpl.class, MockStorageMotionStrategy.class, ConfigurationDaoImpl.class, - ClusterDaoImpl.class, HostPodDaoImpl.class, VMTemplateZoneDaoImpl.class, VMTemplateDetailsDaoImpl.class, HostDetailsDaoImpl.class, - HostTagsDaoImpl.class, HostTransferMapDaoImpl.class, DataCenterIpAddressDaoImpl.class, DataCenterLinkLocalIpAddressDaoImpl.class, - DataCenterVnetDaoImpl.class, PodVlanDaoImpl.class, DataCenterDetailsDaoImpl.class, DiskOfferingDaoImpl.class, StoragePoolHostDaoImpl.class, - UserVmDaoImpl.class, UserVmDetailsDaoImpl.class, ServiceOfferingDaoImpl.class, CapacityDaoImpl.class, SnapshotDaoImpl.class, VMSnapshotDaoImpl.class, - OCFS2ManagerImpl.class, ClusterDetailsDaoImpl.class, SecondaryStorageVmDaoImpl.class, ConsoleProxyDaoImpl.class, StoragePoolWorkDaoImpl.class, - StorageCacheManagerImpl.class, UserDaoImpl.class, DataCenterDaoImpl.class, StoragePoolDetailsDaoImpl.class, DomainDaoImpl.class, - DownloadMonitorImpl.class, AccountDaoImpl.class, ActionEventUtils.class, EventDaoImpl.class}, + VMTemplatePoolDaoImpl.class, ResourceTagsDaoImpl.class, VMTemplateDaoImpl.class, MockStorageMotionStrategy.class, ConfigurationDaoImpl.class, + ClusterDaoImpl.class, HostPodDaoImpl.class, VMTemplateZoneDaoImpl.class, VMTemplateDetailsDaoImpl.class, HostDetailsDaoImpl.class, + HostTagsDaoImpl.class, HostTransferMapDaoImpl.class, DataCenterIpAddressDaoImpl.class, DataCenterLinkLocalIpAddressDaoImpl.class, + DataCenterVnetDaoImpl.class, PodVlanDaoImpl.class, DataCenterDetailsDaoImpl.class, DiskOfferingDaoImpl.class, StoragePoolHostDaoImpl.class, + UserVmDaoImpl.class, UserVmDetailsDaoImpl.class, ServiceOfferingDaoImpl.class, CapacityDaoImpl.class, SnapshotDaoImpl.class, VMSnapshotDaoImpl.class, + OCFS2ManagerImpl.class, ClusterDetailsDaoImpl.class, SecondaryStorageVmDaoImpl.class, ConsoleProxyDaoImpl.class, StoragePoolWorkDaoImpl.class, + StorageCacheManagerImpl.class, UserDaoImpl.class, DataCenterDaoImpl.class, StoragePoolDetailsDaoImpl.class, DomainDaoImpl.class, + DownloadMonitorImpl.class, AccountDaoImpl.class, ActionEventUtils.class, EventDaoImpl.class}, includeFilters = {@Filter(value = Library.class, type = FilterType.CUSTOM)}, useDefaultFilters = false) public class ChildTestConfiguration extends TestConfiguration { diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java index 51e49431b85..7442f1d43f2 100644 --- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java @@ -74,7 +74,7 @@ public class CloudStackTestNGBase extends AbstractTestNGSpringContextTests { "primary-storage-want-to-add", "devcloud-secondary-storage", "s3-accesskey", "s3-secretkey", "s3-endpoint", "s3-template-bucket", "s3-usehttps", "image-install-path", "primary-storage-uuid-want-to-add", "script-path", "hypervisor"}) protected void setup(String hostuuid, String gateway, String cidr, String hostIp, String templateUrl, String localStorageUuid, String primaryStorage, - String secondaryStorage, String s3_accessKey, String s3_secretKey, String s3_endpoint, String s3_template_bucket, String s3_usehttps, String imageInstallPath, + String secondaryStorage, String s3AccessKey, String s3SecretKey, String s3Endpoint, String s3TemplateBucket, String s3Usehttps, String imageInstallPath, String primaryStorageUuid, String scriptPath, String hypervisor) { this.hostGuid = hostuuid; this.hostGateway = gateway; @@ -88,11 +88,11 @@ public class CloudStackTestNGBase extends AbstractTestNGSpringContextTests { this.hypervisor = HypervisorType.getType(hypervisor); this.setSecondaryStorage(secondaryStorage); // set S3 parameters - this.s3AccessKey = s3_accessKey; - this.s3SecretKey = s3_secretKey; - this.s3EndPoint = s3_endpoint; - this.s3TemplateBucket = s3_template_bucket; - this.s3UseHttps = Boolean.parseBoolean(s3_usehttps); + this.s3AccessKey = s3AccessKey; + this.s3SecretKey = s3SecretKey; + this.s3EndPoint = s3Endpoint; + this.s3TemplateBucket = s3TemplateBucket; + this.s3UseHttps = Boolean.parseBoolean(s3Usehttps); this.scriptPath = scriptPath; if (this.scriptPath != null) { System.setProperty("paths.script", this.getScriptPath()); diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/EndpointSelectorTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/EndpointSelectorTest.java index 9227c887813..b841bf2488a 100644 --- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/EndpointSelectorTest.java +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/EndpointSelectorTest.java @@ -34,7 +34,6 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Matchers; -import org.mockito.Mockito; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTestWithFakeData.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTestWithFakeData.java index 88fd54d4db8..fcac783223c 100644 --- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTestWithFakeData.java +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTestWithFakeData.java @@ -43,7 +43,6 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Matchers; -import org.mockito.Mockito; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @@ -208,7 +207,7 @@ public class SnapshotTestWithFakeData { Snapshot.Type snapshotType = Snapshot.Type.RECURRING; SnapshotVO snapshotVO = new SnapshotVO(dcId, 2, 1, 1L, 1L, UUID.randomUUID().toString(), (short)snapshotType.ordinal(), snapshotType.name(), 100, Hypervisor.HypervisorType.XenServer); - return this.snapshotDao.persist(snapshotVO); + return snapshotDao.persist(snapshotVO); } private SnapshotVO createSnapshotInDb(Long volumeId) { @@ -216,7 +215,7 @@ public class SnapshotTestWithFakeData { SnapshotVO snapshotVO = new SnapshotVO(dcId, 2, 1, volumeId, 1L, UUID.randomUUID().toString(), (short)snapshotType.ordinal(), snapshotType.name(), 100, Hypervisor.HypervisorType.XenServer); - return this.snapshotDao.persist(snapshotVO); + return snapshotDao.persist(snapshotVO); } private VolumeInfo createVolume(Long templateId, DataStore store) { @@ -246,8 +245,8 @@ public class SnapshotTestWithFakeData { pool.setPodId(podId); pool.setScope(ScopeType.CLUSTER); pool.setStorageProviderName(DataStoreProvider.DEFAULT_PRIMARY); - pool = this.primaryDataStoreDao.persist(pool); - DataStore store = this.dataStoreManager.getPrimaryDataStore(pool.getId()); + pool = primaryDataStoreDao.persist(pool); + DataStore store = dataStoreManager.getPrimaryDataStore(pool.getId()); return store; } diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeServiceTest.java similarity index 99% rename from engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java rename to engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeServiceTest.java index 167dd529ed1..2f5b18b861e 100644 --- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeServiceTest.java @@ -85,7 +85,7 @@ import com.cloud.storage.dao.VolumeDao; import com.cloud.utils.component.ComponentContext; @ContextConfiguration(locations = {"classpath:/storageContext.xml"}) -public class volumeServiceTest extends CloudStackTestNGBase { +public class VolumeServiceTest extends CloudStackTestNGBase { // @Inject // ImageDataStoreProviderManager imageProviderMgr; @Inject diff --git a/engine/storage/integration-test/test/resources/StorageAllocatorTestContext.xml b/engine/storage/integration-test/test/resources/StorageAllocatorTestContext.xml index 1f5aa585f67..72e5c84aff0 100644 --- a/engine/storage/integration-test/test/resources/StorageAllocatorTestContext.xml +++ b/engine/storage/integration-test/test/resources/StorageAllocatorTestContext.xml @@ -1,17 +1,16 @@ - + - + - + @@ -36,10 +35,11 @@ - + - + diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/vmsnapshot/DefaultVMSnapshotStrategy.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/vmsnapshot/DefaultVMSnapshotStrategy.java index 42bef7eb866..e86bd23b050 100644 --- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/vmsnapshot/DefaultVMSnapshotStrategy.java +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/vmsnapshot/DefaultVMSnapshotStrategy.java @@ -236,9 +236,9 @@ public class DefaultVMSnapshotStrategy extends ManagerBase implements VMSnapshot } } - protected void finalizeDelete(VMSnapshotVO vmSnapshot, List VolumeTOs) { + protected void finalizeDelete(VMSnapshotVO vmSnapshot, List volumeTOs) { // update volumes path - updateVolumePath(VolumeTOs); + updateVolumePath(volumeTOs); // update children's parent snapshots List children = vmSnapshotDao.listByParent(vmSnapshot.getId()); @@ -258,9 +258,9 @@ public class DefaultVMSnapshotStrategy extends ManagerBase implements VMSnapshot vmSnapshotDao.persist(vmSnapshot); } - protected void finalizeCreate(VMSnapshotVO vmSnapshot, List VolumeTOs) { + protected void finalizeCreate(VMSnapshotVO vmSnapshot, List volumeTOs) { // update volumes path - updateVolumePath(VolumeTOs); + updateVolumePath(volumeTOs); vmSnapshot.setCurrent(true); diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java index 37e5bb4557b..c9d7fabbaba 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java @@ -1204,7 +1204,8 @@ public class VolumeServiceImpl implements VolumeService { com.cloud.configuration.Resource.ResourceType.secondary_storage, volInfo.getSize() - volInfo.getPhysicalSize()); } catch (ResourceAllocationException e) { s_logger.warn(e.getMessage()); - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED, volume.getDataCenterId(), volume.getPodId(), e.getMessage(), + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED, volume.getDataCenterId(), volume.getPodId(), + e.getMessage(), e.getMessage()); } finally { _resourceLimitMgr.recalculateResourceCount(volume.getAccountId(), volume.getDomainId(), diff --git a/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java b/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java index 1058da3fedd..c7c371090b9 100644 --- a/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java +++ b/framework/cluster/src/com/cloud/cluster/ClusterManagerImpl.java @@ -255,15 +255,15 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C try { if (s_logger.isDebugEnabled()) { s_logger.debug("Cluster PDU " + getSelfPeerName() + " -> " + pdu.getDestPeer() + ". agent: " + pdu.getAgentId() + ", pdu seq: " + - pdu.getSequenceId() + ", pdu ack seq: " + pdu.getAckSequenceId() + ", json: " + pdu.getJsonPackage()); + pdu.getSequenceId() + ", pdu ack seq: " + pdu.getAckSequenceId() + ", json: " + pdu.getJsonPackage()); } long startTick = System.currentTimeMillis(); String strResult = peerService.execute(pdu); if (s_logger.isDebugEnabled()) { s_logger.debug("Cluster PDU " + getSelfPeerName() + " -> " + pdu.getDestPeer() + " completed. time: " + - (System.currentTimeMillis() - startTick) + "ms. agent: " + pdu.getAgentId() + ", pdu seq: " + pdu.getSequenceId() + - ", pdu ack seq: " + pdu.getAckSequenceId() + ", json: " + pdu.getJsonPackage()); + (System.currentTimeMillis() - startTick) + "ms. agent: " + pdu.getAgentId() + ", pdu seq: " + pdu.getSequenceId() + + ", pdu ack seq: " + pdu.getAckSequenceId() + ", json: " + pdu.getJsonPackage()); } if ("true".equals(strResult)) @@ -273,7 +273,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C invalidatePeerService(pdu.getDestPeer()); if (s_logger.isInfoEnabled()) { s_logger.info("Exception on remote execution, peer: " + pdu.getDestPeer() + ", iteration: " + i + ", exception message :" + - e.getMessage()); + e.getMessage()); } } } @@ -563,7 +563,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C if (profiler.getDuration() >= HeartbeatInterval.value()) { if (s_logger.isDebugEnabled()) s_logger.debug("Management server heartbeat takes too long to finish. profiler: " + profiler.toString() + ", profilerHeartbeatUpdate: " + - profilerHeartbeatUpdate.toString() + ", profilerPeerScan: " + profilerPeerScan.toString()); + profilerHeartbeatUpdate.toString() + ", profilerPeerScan: " + profilerPeerScan.toString()); } } @@ -721,7 +721,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C } } } - break; + break; case nodeRemoved: { List l = msg.getNodes(); @@ -731,7 +731,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C } } } - break; + break; default: break; @@ -772,7 +772,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C s_logger.info("Found " + inactiveList.size() + " inactive management server node based on timestamp"); for (ManagementServerHostVO host : inactiveList) s_logger.info("management server node msid: " + host.getMsid() + ", name: " + host.getName() + ", service ip: " + host.getServiceIP() + - ", version: " + host.getVersion()); + ", version: " + host.getVersion()); } List downHostList = new ArrayList(); @@ -810,7 +810,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C if (_mshostPeerDao.countStateSeenInPeers(_mshostId, _runId, ManagementServerHost.State.Down) > 0) { String msg = - "We have detected that at least one management server peer reports that this management server is down, perform active fencing to avoid split-brain situation"; + "We have detected that at least one management server peer reports that this management server is down, perform active fencing to avoid split-brain situation"; s_logger.error(msg); throw new ActiveFencingException(msg); } @@ -831,7 +831,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C if (entry.getKey().longValue() != _mshostId.longValue()) { if (s_logger.isDebugEnabled()) { s_logger.debug("Detected management node left because of invalidated session, id:" + entry.getKey() + ", nodeIP:" + - entry.getValue().getServiceIP()); + entry.getValue().getServiceIP()); } invalidatedNodeList.add(entry.getValue()); } @@ -918,8 +918,8 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C if (profiler.getDuration() >= HeartbeatInterval.value()) { if (s_logger.isDebugEnabled()) s_logger.debug("Peer scan takes too long to finish. profiler: " + profiler.toString() + ", profilerQueryActiveList: " + - profilerQueryActiveList.toString() + ", profilerSyncClusterInfo: " + profilerSyncClusterInfo.toString() + ", profilerInvalidatedNodeList: " + - profilerInvalidatedNodeList.toString() + ", profilerRemovedList: " + profilerRemovedList.toString()); + profilerQueryActiveList.toString() + ", profilerSyncClusterInfo: " + profilerSyncClusterInfo.toString() + ", profilerInvalidatedNodeList: " + + profilerInvalidatedNodeList.toString() + ", profilerRemovedList: " + profilerRemovedList.toString()); } } @@ -970,7 +970,7 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C } _mshostDao.update(mshost.getId(), getCurrentRunId(), NetUtils.getHostName(), version, _clusterNodeIP, _currentServiceAdapter.getServicePort(), - DateUtil.currentGMTTime()); + DateUtil.currentGMTTime()); } return mshost; @@ -1165,19 +1165,19 @@ public class ClusterManagerImpl extends ManagerBase implements ClusterManager, C throw new ConfigurationException(msg); } else { String msg = - "Detected another management node with localhost IP is considered as running in DB, however it is not pingable, we will continue cluster initialization with this management server node"; + "Detected another management node with localhost IP is considered as running in DB, however it is not pingable, we will continue cluster initialization with this management server node"; s_logger.info(msg); } } else { if (pingManagementNode(peer.getMsid())) { String msg = - "Detected that another management node with the same IP " + peer.getServiceIP() + + "Detected that another management node with the same IP " + peer.getServiceIP() + " is already running, please check your cluster configuration"; s_logger.error(msg); throw new ConfigurationException(msg); } else { String msg = - "Detected that another management node with the same IP " + peer.getServiceIP() + + "Detected that another management node with the same IP " + peer.getServiceIP() + " is considered as running in DB, however it is not pingable, we will continue cluster initialization with this management server node"; s_logger.info(msg); } diff --git a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java index 2287ca7c4d0..3d0c3f56309 100644 --- a/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java +++ b/framework/cluster/src/com/cloud/cluster/dao/ManagementServerHostDaoImpl.java @@ -44,48 +44,48 @@ import com.cloud.utils.exception.CloudRuntimeException; @Local(value = {ManagementServerHostDao.class}) public class ManagementServerHostDaoImpl extends GenericDaoBase implements ManagementServerHostDao { private static final Logger s_logger = Logger.getLogger(ManagementServerHostDaoImpl.class); - + private final SearchBuilder MsIdSearch; private final SearchBuilder ActiveSearch; private final SearchBuilder InactiveSearch; private final SearchBuilder StateSearch; - @Override + @Override public void invalidateRunSession(long id, long runid) { - TransactionLegacy txn = TransactionLegacy.currentTxn(); + TransactionLegacy txn = TransactionLegacy.currentTxn(); PreparedStatement pstmt = null; try { pstmt = txn.prepareAutoCloseStatement("update mshost set runid=0, state='Down' where id=? and runid=?"); pstmt.setLong(1, id); pstmt.setLong(2, runid); - + pstmt.executeUpdate(); } catch (SQLException e) { - throw new CloudRuntimeException("DB exception on " + pstmt.toString(), e); + throw new CloudRuntimeException("DB exception on " + pstmt.toString(), e); } - } - - @Override + } + + @Override public ManagementServerHostVO findByMsid(long msid) { SearchCriteria sc = MsIdSearch.create(); sc.setParameters("msid", msid); - - List l = listIncludingRemovedBy(sc); + + List l = listIncludingRemovedBy(sc); if (l != null && l.size() > 0) { return l.get(0); } - - return null; - } - - @Override + + return null; + } + + @Override @DB - public void update(long id, long runid, String name, String version, String serviceIP, int servicePort, Date lastUpdate) { + public void update(long id, long runid, String name, String version, String serviceIP, int servicePort, Date lastUpdate) { TransactionLegacy txn = TransactionLegacy.currentTxn(); PreparedStatement pstmt = null; try { txn.start(); - + pstmt = txn.prepareAutoCloseStatement("update mshost set name=?, version=?, service_ip=?, service_port=?, last_update=?, removed=null, alert_count=0, runid=?, state=? where id=?"); pstmt.setString(1, name); @@ -96,48 +96,48 @@ public class ManagementServerHostDaoImpl extends GenericDaoBase getActiveList(Date cutTime) { - SearchCriteria sc = ActiveSearch.create(); - sc.setParameters("lastUpdateTime", cutTime); - - return listIncludingRemovedBy(sc); - } + } - @Override + @Override + public List getActiveList(Date cutTime) { + SearchCriteria sc = ActiveSearch.create(); + sc.setParameters("lastUpdateTime", cutTime); + + return listIncludingRemovedBy(sc); + } + + @Override public List getInactiveList(Date cutTime) { - SearchCriteria sc = InactiveSearch.create(); - sc.setParameters("lastUpdateTime", cutTime); - - return listIncludingRemovedBy(sc); - } - - @Override + SearchCriteria sc = InactiveSearch.create(); + sc.setParameters("lastUpdateTime", cutTime); + + return listIncludingRemovedBy(sc); + } + + @Override @DB - public int increaseAlertCount(long id) { + public int increaseAlertCount(long id) { TransactionLegacy txn = TransactionLegacy.currentTxn(); PreparedStatement pstmt = null; int changedRows = 0; try { txn.start(); - + pstmt = txn.prepareAutoCloseStatement("update mshost set alert_count=alert_count+1 where id=? and alert_count=0"); pstmt.setLong(1, id); - + changedRows = pstmt.executeUpdate(); txn.commit(); } catch (Exception e) { s_logger.warn("Unexpected exception, ", e); throw new RuntimeException(e.getMessage(), e); } - - return changedRows; - } - - protected ManagementServerHostDaoImpl() { - MsIdSearch = createSearchBuilder(); - MsIdSearch.and("msid", MsIdSearch.entity().getMsid(), SearchCriteria.Op.EQ); - MsIdSearch.done(); - - ActiveSearch = createSearchBuilder(); - ActiveSearch.and("lastUpdateTime", ActiveSearch.entity().getLastUpdateTime(), SearchCriteria.Op.GT); - ActiveSearch.and("removed", ActiveSearch.entity().getRemoved(), SearchCriteria.Op.NULL); - ActiveSearch.done(); - InactiveSearch = createSearchBuilder(); - InactiveSearch.and("lastUpdateTime", InactiveSearch.entity().getLastUpdateTime(), SearchCriteria.Op.LTEQ); - InactiveSearch.and("removed", InactiveSearch.entity().getRemoved(), SearchCriteria.Op.NULL); - InactiveSearch.done(); - - StateSearch = createSearchBuilder(); - StateSearch.and("state", StateSearch.entity().getState(), SearchCriteria.Op.IN); - StateSearch.done(); - } - - @Override + return changedRows; + } + + protected ManagementServerHostDaoImpl() { + MsIdSearch = createSearchBuilder(); + MsIdSearch.and("msid", MsIdSearch.entity().getMsid(), SearchCriteria.Op.EQ); + MsIdSearch.done(); + + ActiveSearch = createSearchBuilder(); + ActiveSearch.and("lastUpdateTime", ActiveSearch.entity().getLastUpdateTime(), SearchCriteria.Op.GT); + ActiveSearch.and("removed", ActiveSearch.entity().getRemoved(), SearchCriteria.Op.NULL); + ActiveSearch.done(); + + InactiveSearch = createSearchBuilder(); + InactiveSearch.and("lastUpdateTime", InactiveSearch.entity().getLastUpdateTime(), SearchCriteria.Op.LTEQ); + InactiveSearch.and("removed", InactiveSearch.entity().getRemoved(), SearchCriteria.Op.NULL); + InactiveSearch.done(); + + StateSearch = createSearchBuilder(); + StateSearch.and("state", StateSearch.entity().getState(), SearchCriteria.Op.IN); + StateSearch.done(); + } + + @Override public void update(long id, long runId, State state, Date lastUpdate) { - TransactionLegacy txn = TransactionLegacy.currentTxn(); + TransactionLegacy txn = TransactionLegacy.currentTxn(); PreparedStatement pstmt = null; try { pstmt = txn.prepareAutoCloseStatement("update mshost set state=?, last_update=? where id=? and runid=?"); @@ -218,9 +218,9 @@ public class ManagementServerHostDaoImpl extends GenericDaoBase listBy(ManagementServerHost.State... states) { - SearchCriteria sc = StateSearch.create(); + SearchCriteria sc = StateSearch.create(); sc.setParameters("state", (Object[])states); - + return listBy(sc); - } - - @Override - public List listOrphanMsids() { - List orphanList = new ArrayList(); - - TransactionLegacy txn = TransactionLegacy.currentTxn(); + } + + @Override + public List listOrphanMsids() { + List orphanList = new ArrayList(); + + TransactionLegacy txn = TransactionLegacy.currentTxn(); PreparedStatement pstmt = null; try { pstmt = @@ -250,26 +250,26 @@ public class ManagementServerHostDaoImpl extends GenericDaoBase sc = StateSearch.create(); + return orphanList; + } + + @Override + public ManagementServerHostVO findOneInUpState(Filter filter) { + SearchCriteria sc = StateSearch.create(); sc.setParameters("state", ManagementServerHost.State.Up); - - List mshosts = listBy(sc, filter); + + List mshosts = listBy(sc, filter); if (mshosts != null && mshosts.size() > 0) { - return mshosts.get(0); + return mshosts.get(0); } return null; - } - + } + } diff --git a/framework/config/test/org/apache/cloudstack/framework/config/impl/ConfigDepotAdminTest.java b/framework/config/test/org/apache/cloudstack/framework/config/impl/ConfigDepotAdminTest.java index 245e9a6d49e..da76804eb77 100644 --- a/framework/config/test/org/apache/cloudstack/framework/config/impl/ConfigDepotAdminTest.java +++ b/framework/config/test/org/apache/cloudstack/framework/config/impl/ConfigDepotAdminTest.java @@ -39,8 +39,8 @@ import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import com.cloud.utils.db.EntityManager; public class ConfigDepotAdminTest extends TestCase { - private final ConfigKey DynamicIntCK = new ConfigKey(Integer.class, "dynIntKey", "Advance", "10", "Test Key", true); - private final ConfigKey StaticIntCK = new ConfigKey(Integer.class, "statIntKey", "Advance", "10", "Test Key", false); + private final static ConfigKey DynamicIntCK = new ConfigKey(Integer.class, "dynIntKey", "Advance", "10", "Test Key", true); + private final static ConfigKey StaticIntCK = new ConfigKey(Integer.class, "statIntKey", "Advance", "10", "Test Key", false); @Mock Configurable _configurable; diff --git a/framework/db/src/com/cloud/utils/db/GenericDao.java b/framework/db/src/com/cloud/utils/db/GenericDao.java index 14169ff9545..cb401cd7000 100755 --- a/framework/db/src/com/cloud/utils/db/GenericDao.java +++ b/framework/db/src/com/cloud/utils/db/GenericDao.java @@ -160,14 +160,14 @@ public interface GenericDao { * Search for the entity beans using the sql SQL_CACHE option * @param sc * @param filter - * @param enable_query_cache + * @param enableQueryCache * @return list of entity beans. */ - List search(SearchCriteria sc, Filter filter, final boolean enable_query_cache); + List search(SearchCriteria sc, Filter filter, final boolean enableQueryCache); List searchIncludingRemoved(SearchCriteria sc, final Filter filter, final Boolean lock, final boolean cache); - List searchIncludingRemoved(SearchCriteria sc, final Filter filter, final Boolean lock, final boolean cache, final boolean enable_query_cache); + List searchIncludingRemoved(SearchCriteria sc, final Filter filter, final Boolean lock, final boolean cache, final boolean enableQueryCache); /** * Customized search with SearchCritiria diff --git a/framework/db/src/com/cloud/utils/db/GenericDaoBase.java b/framework/db/src/com/cloud/utils/db/GenericDaoBase.java index 8e6f6a45b69..503d7591135 100755 --- a/framework/db/src/com/cloud/utils/db/GenericDaoBase.java +++ b/framework/db/src/com/cloud/utils/db/GenericDaoBase.java @@ -346,14 +346,14 @@ public abstract class GenericDaoBase extends Compone } @DB() - protected List search(SearchCriteria sc, final Filter filter, final Boolean lock, final boolean cache, final boolean enable_query_cache) { + protected List search(SearchCriteria sc, final Filter filter, final Boolean lock, final boolean cache, final boolean enableQueryCache) { if (_removed != null) { if (sc == null) { sc = createSearchCriteria(); } sc.addAnd(_removed.second().field.getName(), SearchCriteria.Op.NULL); } - return searchIncludingRemoved(sc, filter, lock, cache, enable_query_cache); + return searchIncludingRemoved(sc, filter, lock, cache, enableQueryCache); } @Override @@ -362,13 +362,13 @@ public abstract class GenericDaoBase extends Compone } @Override - public List searchIncludingRemoved(SearchCriteria sc, final Filter filter, final Boolean lock, final boolean cache, final boolean enable_query_cache) { + public List searchIncludingRemoved(SearchCriteria sc, final Filter filter, final Boolean lock, final boolean cache, final boolean enableQueryCache) { String clause = sc != null ? sc.getWhereClause() : null; if (clause != null && clause.length() == 0) { clause = null; } - final StringBuilder str = createPartialSelectSql(sc, clause != null, enable_query_cache); + final StringBuilder str = createPartialSelectSql(sc, clause != null, enableQueryCache); if (clause != null) { str.append(clause); } @@ -896,11 +896,11 @@ public abstract class GenericDaoBase extends Compone } @DB() - protected List listBy(final SearchCriteria sc, final Filter filter, final boolean enable_query_cache) { + protected List listBy(final SearchCriteria sc, final Filter filter, final boolean enableQueryCache) { if (_removed != null) { sc.addAnd(_removed.second().field.getName(), SearchCriteria.Op.NULL); } - return listIncludingRemovedBy(sc, filter, enable_query_cache); + return listIncludingRemovedBy(sc, filter, enableQueryCache); } @DB() @@ -909,8 +909,8 @@ public abstract class GenericDaoBase extends Compone } @DB() - protected List listIncludingRemovedBy(final SearchCriteria sc, final Filter filter, final boolean enable_query_cache) { - return searchIncludingRemoved(sc, filter, null, false, enable_query_cache); + protected List listIncludingRemovedBy(final SearchCriteria sc, final Filter filter, final boolean enableQueryCache) { + return searchIncludingRemoved(sc, filter, null, false, enableQueryCache); } @DB() @@ -1194,8 +1194,8 @@ public abstract class GenericDaoBase extends Compone } @DB() - protected StringBuilder createPartialSelectSql(SearchCriteria sc, final boolean whereClause, final boolean enable_query_cache) { - StringBuilder sql = new StringBuilder(enable_query_cache ? _partialQueryCacheSelectSql.first() : _partialSelectSql.first()); + protected StringBuilder createPartialSelectSql(SearchCriteria sc, final boolean whereClause, final boolean enableQueryCache) { + StringBuilder sql = new StringBuilder(enableQueryCache ? _partialQueryCacheSelectSql.first() : _partialSelectSql.first()); if (sc != null && !sc.isSelectAll()) { sql.delete(7, sql.indexOf(" FROM")); sc.getSelect(sql, 7); @@ -1281,8 +1281,8 @@ public abstract class GenericDaoBase extends Compone @Override @DB() - public List search(final SearchCriteria sc, final Filter filter, final boolean enable_query_cache) { - return search(sc, filter, null, false, enable_query_cache); + public List search(final SearchCriteria sc, final Filter filter, final boolean enableQueryCache) { + return search(sc, filter, null, false, enableQueryCache); } @Override diff --git a/framework/db/src/com/cloud/utils/db/Merovingian2.java b/framework/db/src/com/cloud/utils/db/Merovingian2.java index 59dff2dd383..6eeea9f3850 100644 --- a/framework/db/src/com/cloud/utils/db/Merovingian2.java +++ b/framework/db/src/com/cloud/utils/db/Merovingian2.java @@ -52,7 +52,7 @@ public class Merovingian2 extends StandardMBean implements MerovingianMBean { private static final String SELECT_THREAD_LOCKS_SQL = SELECT_SQL + " WHERE mac=? AND ip=?"; private static final String CLEANUP_THREAD_LOCKS_SQL = "DELETE FROM op_lock WHERE mac=? AND ip=? AND thread=?"; - TimeZone s_gmtTimeZone = TimeZone.getTimeZone("GMT"); + TimeZone _gmtTimeZone = TimeZone.getTimeZone("GMT"); private final long _msId; @@ -184,7 +184,7 @@ public class Merovingian2 extends StandardMBean implements MerovingianMBean { pstmt.setLong(2, _msId); pstmt.setString(3, threadName); pstmt.setInt(4, threadId); - pstmt.setString(5, DateUtil.getDateDisplayString(s_gmtTimeZone, new Date())); + pstmt.setString(5, DateUtil.getDateDisplayString(_gmtTimeZone, new Date())); try { int rows = pstmt.executeUpdate(); if (rows == 1) { diff --git a/framework/db/src/com/cloud/utils/db/SqlGenerator.java b/framework/db/src/com/cloud/utils/db/SqlGenerator.java index 2c24f62ced5..befe34b59e2 100755 --- a/framework/db/src/com/cloud/utils/db/SqlGenerator.java +++ b/framework/db/src/com/cloud/utils/db/SqlGenerator.java @@ -567,10 +567,10 @@ public class SqlGenerator { return sql.toString(); } - public Pair buildSelectSql(boolean enable_query_cache) { + public Pair buildSelectSql(boolean enableQueryCache) { StringBuilder sql = new StringBuilder("SELECT "); - sql.append(enable_query_cache ? "SQL_CACHE " : ""); + sql.append(enableQueryCache ? "SQL_CACHE " : ""); ArrayList attrs = new ArrayList(); diff --git a/framework/db/src/com/cloud/utils/db/TransactionLegacy.java b/framework/db/src/com/cloud/utils/db/TransactionLegacy.java index e5cece182d2..b36c02746a6 100755 --- a/framework/db/src/com/cloud/utils/db/TransactionLegacy.java +++ b/framework/db/src/com/cloud/utils/db/TransactionLegacy.java @@ -1203,7 +1203,7 @@ public class TransactionLegacy { final ConnectionFactory connectionFactory = new DriverManagerConnectionFactory("jdbc:mysql://localhost:3306/" + database, "cloud", "cloud"); final PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory, connectionPool, null, null, false, true); return new PoolingDataSource( - /* connectionPool */poolableConnectionFactory.getPool()); + /* connectionPool */poolableConnectionFactory.getPool()); } /** diff --git a/framework/db/test/com/cloud/utils/db/GlobalLockTest.java b/framework/db/test/com/cloud/utils/db/GlobalLockTest.java index 8b0720b5ee9..c26f2486018 100644 --- a/framework/db/test/com/cloud/utils/db/GlobalLockTest.java +++ b/framework/db/test/com/cloud/utils/db/GlobalLockTest.java @@ -28,7 +28,7 @@ import com.cloud.utils.Profiler; @ContextConfiguration(locations = "classpath:/testContext.xml") public class GlobalLockTest { public static final Logger s_logger = Logger.getLogger(GlobalLockTest.class); - private final static GlobalLock _workLock = GlobalLock.getInternLock("SecurityGroupWork"); + private final static GlobalLock WorkLock = GlobalLock.getInternLock("SecurityGroupWork"); public static class Worker implements Runnable { int id = 0; @@ -47,7 +47,7 @@ public class GlobalLockTest { try { Profiler p = new Profiler(); p.start(); - locked = _workLock.lock(timeoutSeconds); + locked = WorkLock.lock(timeoutSeconds); p.stop(); System.out.println("Thread " + id + " waited " + p.getDuration() + " ms, locked=" + locked); if (locked) { @@ -56,7 +56,7 @@ public class GlobalLockTest { } catch (InterruptedException e) { } finally { if (locked) { - boolean unlocked = _workLock.unlock(); + boolean unlocked = WorkLock.unlock(); System.out.println("Thread " + id + " unlocked=" + unlocked); } } diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java b/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java index 6eaff885609..31fd827caf6 100644 --- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java +++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJobExecutionContext.java @@ -29,132 +29,132 @@ import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.ResourceUnavailableException; -public class AsyncJobExecutionContext { +public class AsyncJobExecutionContext { private AsyncJob _job; - - static private AsyncJobManager _jobMgr; - static private AsyncJobJoinMapDao _joinMapDao; + + static private AsyncJobManager s_jobMgr; + static private AsyncJobJoinMapDao s_joinMapDao; public static void init(AsyncJobManager jobMgr, AsyncJobJoinMapDao joinMapDao) { - _jobMgr = jobMgr; - _joinMapDao = joinMapDao; + s_jobMgr = jobMgr; + s_joinMapDao = joinMapDao; } - - private static ManagedThreadLocal s_currentExectionContext = new ManagedThreadLocal(); - public AsyncJobExecutionContext() { - } - - public AsyncJobExecutionContext(AsyncJob job) { - _job = job; - } - - public SyncQueueItem getSyncSource() { - return _job.getSyncSource(); - } - - public void resetSyncSource() { - _job.setSyncSource(null); - } - - public AsyncJob getJob() { - return _job; - } - - public void setJob(AsyncJob job) { - _job = job; - } - - public boolean isJobDispatchedBy(String jobDispatcherName) { - assert(jobDispatcherName != null); - if(_job != null && _job.getDispatcher() != null && _job.getDispatcher().equals(jobDispatcherName)) - return true; - - return false; + private static ManagedThreadLocal s_currentExectionContext = new ManagedThreadLocal(); + + public AsyncJobExecutionContext() { } - + + public AsyncJobExecutionContext(AsyncJob job) { + _job = job; + } + + public SyncQueueItem getSyncSource() { + return _job.getSyncSource(); + } + + public void resetSyncSource() { + _job.setSyncSource(null); + } + + public AsyncJob getJob() { + return _job; + } + + public void setJob(AsyncJob job) { + _job = job; + } + + public boolean isJobDispatchedBy(String jobDispatcherName) { + assert (jobDispatcherName != null); + if (_job != null && _job.getDispatcher() != null && _job.getDispatcher().equals(jobDispatcherName)) + return true; + + return false; + } + public void completeAsyncJob(JobInfo.Status jobStatus, int resultCode, String resultObject) { assert (_job != null); - _jobMgr.completeAsyncJob(_job.getId(), jobStatus, resultCode, resultObject); + s_jobMgr.completeAsyncJob(_job.getId(), jobStatus, resultCode, resultObject); } - + public void updateAsyncJobStatus(int processStatus, String resultObject) { assert (_job != null); - _jobMgr.updateAsyncJobStatus(_job.getId(), processStatus, resultObject); + s_jobMgr.updateAsyncJobStatus(_job.getId(), processStatus, resultObject); } - + public void updateAsyncJobAttachment(String instanceType, Long instanceId) { assert (_job != null); - _jobMgr.updateAsyncJobAttachment(_job.getId(), instanceType, instanceId); + s_jobMgr.updateAsyncJobAttachment(_job.getId(), instanceType, instanceId); } - + public void logJobJournal(AsyncJob.JournalType journalType, String journalText, String journalObjJson) { assert (_job != null); - _jobMgr.logJobJournal(_job.getId(), journalType, journalText, journalObjJson); - } + s_jobMgr.logJobJournal(_job.getId(), journalType, journalText, journalObjJson); + } public void log(Logger logger, String journalText) { - _jobMgr.logJobJournal(_job.getId(), AsyncJob.JournalType.SUCCESS, journalText, null); + s_jobMgr.logJobJournal(_job.getId(), AsyncJob.JournalType.SUCCESS, journalText, null); logger.debug(journalText); } public void joinJob(long joinJobId) { assert (_job != null); - _jobMgr.joinJob(_job.getId(), joinJobId); + s_jobMgr.joinJob(_job.getId(), joinJobId); } - + public void joinJob(long joinJobId, String wakeupHandler, String wakeupDispatcher, String[] wakeupTopcisOnMessageBus, long wakeupIntervalInMilliSeconds, long timeoutInMilliSeconds) { assert (_job != null); - _jobMgr.joinJob(_job.getId(), joinJobId, wakeupHandler, wakeupDispatcher, wakeupTopcisOnMessageBus, wakeupIntervalInMilliSeconds, timeoutInMilliSeconds); - } - - // - // check failure exception before we disjoin the worker job - // TODO : it is ugly and this will become unnecessary after we switch to full-async mode - // - public void disjoinJob(long joinedJobId) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException { - assert (_job != null); - - AsyncJobJoinMapVO record = _joinMapDao.getJoinRecord(_job.getId(), joinedJobId); - if (record.getJoinStatus() == JobInfo.Status.FAILED && record.getJoinResult() != null) { - Object exception = JobSerializerHelper.fromObjectSerializedString(record.getJoinResult()); - if (exception != null && exception instanceof Exception) { - if (exception instanceof InsufficientCapacityException) - throw (InsufficientCapacityException)exception; - else if (exception instanceof ConcurrentOperationException) - throw (ConcurrentOperationException)exception; - else if (exception instanceof ResourceUnavailableException) - throw (ResourceUnavailableException)exception; - else - throw new RuntimeException((Exception)exception); - } - } - - _jobMgr.disjoinJob(_job.getId(), joinedJobId); - } - - public void completeJoin(JobInfo.Status joinStatus, String joinResult) { - assert (_job != null); - _jobMgr.completeJoin(_job.getId(), joinStatus, joinResult); - } - - public void completeJobAndJoin(JobInfo.Status joinStatus, String joinResult) { - assert (_job != null); - _jobMgr.completeJoin(_job.getId(), joinStatus, joinResult); - _jobMgr.completeAsyncJob(_job.getId(), joinStatus, 0, null); + s_jobMgr.joinJob(_job.getId(), joinJobId, wakeupHandler, wakeupDispatcher, wakeupTopcisOnMessageBus, wakeupIntervalInMilliSeconds, timeoutInMilliSeconds); + } + + // + // check failure exception before we disjoin the worker job + // TODO : it is ugly and this will become unnecessary after we switch to full-async mode + // + public void disjoinJob(long joinedJobId) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException { + assert (_job != null); + + AsyncJobJoinMapVO record = s_joinMapDao.getJoinRecord(_job.getId(), joinedJobId); + if (record.getJoinStatus() == JobInfo.Status.FAILED && record.getJoinResult() != null) { + Object exception = JobSerializerHelper.fromObjectSerializedString(record.getJoinResult()); + if (exception != null && exception instanceof Exception) { + if (exception instanceof InsufficientCapacityException) + throw (InsufficientCapacityException)exception; + else if (exception instanceof ConcurrentOperationException) + throw (ConcurrentOperationException)exception; + else if (exception instanceof ResourceUnavailableException) + throw (ResourceUnavailableException)exception; + else + throw new RuntimeException((Exception)exception); + } + } + + s_jobMgr.disjoinJob(_job.getId(), joinedJobId); + } + + public void completeJoin(JobInfo.Status joinStatus, String joinResult) { + assert (_job != null); + s_jobMgr.completeJoin(_job.getId(), joinStatus, joinResult); + } + + public void completeJobAndJoin(JobInfo.Status joinStatus, String joinResult) { + assert (_job != null); + s_jobMgr.completeJoin(_job.getId(), joinStatus, joinResult); + s_jobMgr.completeAsyncJob(_job.getId(), joinStatus, 0, null); + } + + public static AsyncJobExecutionContext getCurrentExecutionContext() { + AsyncJobExecutionContext context = s_currentExectionContext.get(); + return context; } - public static AsyncJobExecutionContext getCurrentExecutionContext() { - AsyncJobExecutionContext context = s_currentExectionContext.get(); - return context; - } - public static AsyncJobExecutionContext registerPseudoExecutionContext(long accountId, long userId) { AsyncJobExecutionContext context = s_currentExectionContext.get(); if (context == null) { context = new AsyncJobExecutionContext(); - context.setJob(_jobMgr.getPseudoJob(accountId, userId)); + context.setJob(s_jobMgr.getPseudoJob(accountId, userId)); setCurrentExecutionContext(context); } @@ -166,9 +166,9 @@ public class AsyncJobExecutionContext { setCurrentExecutionContext(null); return context; } - + // This is intended to be package level access for AsyncJobManagerImpl only. public static void setCurrentExecutionContext(AsyncJobExecutionContext currentContext) { - s_currentExectionContext.set(currentContext); - } + s_currentExectionContext.set(currentContext); + } } diff --git a/framework/managed-context/src/main/java/org/apache/cloudstack/managed/threadlocal/ManagedThreadLocal.java b/framework/managed-context/src/main/java/org/apache/cloudstack/managed/threadlocal/ManagedThreadLocal.java index 57377bcb0fd..2db3aafcf5c 100644 --- a/framework/managed-context/src/main/java/org/apache/cloudstack/managed/threadlocal/ManagedThreadLocal.java +++ b/framework/managed-context/src/main/java/org/apache/cloudstack/managed/threadlocal/ManagedThreadLocal.java @@ -35,7 +35,7 @@ public class ManagedThreadLocal extends ThreadLocal { } }; - private static boolean VALIDATE_CONTEXT = false; + private static boolean s_validateContext = false; private static final Logger log = LoggerFactory.getLogger(ManagedThreadLocal.class); @SuppressWarnings("unchecked") @@ -70,13 +70,13 @@ public class ManagedThreadLocal extends ThreadLocal { } private static void validateInContext(Object tl) { - if (VALIDATE_CONTEXT && !ManagedContextUtils.isInContext()) { + if (s_validateContext && !ManagedContextUtils.isInContext()) { String msg = "Using a managed thread local in a non managed context this WILL cause errors at runtime. TL [" + tl + "]"; log.error(msg, new IllegalStateException(msg)); } } public static void setValidateInContext(boolean validate) { - VALIDATE_CONTEXT = validate; + s_validateContext = validate; } } diff --git a/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java b/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java index de14007aaf1..1316a92ccb1 100644 --- a/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java +++ b/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java @@ -125,8 +125,8 @@ public class StaticRoleBasedAPIAccessChecker extends AdapterBase implements APIC } @Inject - public void setServices(List _services) { - this._services = _services; + public void setServices(List services) { + this._services = services; } } diff --git a/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java b/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java index 39d965d810c..cb691a9c8ed 100755 --- a/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java +++ b/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java @@ -262,8 +262,8 @@ public class ApiDiscoveryServiceImpl extends ComponentLifecycleBase implements A return _apiAccessCheckers; } - public void setApiAccessCheckers(List _apiAccessCheckers) { - this._apiAccessCheckers = _apiAccessCheckers; + public void setApiAccessCheckers(List apiAccessCheckers) { + this._apiAccessCheckers = apiAccessCheckers; } public List getServices() { @@ -271,7 +271,7 @@ public class ApiDiscoveryServiceImpl extends ComponentLifecycleBase implements A } @Inject - public void setServices(List _services) { - this._services = _services; + public void setServices(List services) { + this._services = services; } } diff --git a/plugins/api/discovery/test/org/apache/cloudstack/discovery/ApiDiscoveryTest.java b/plugins/api/discovery/test/org/apache/cloudstack/discovery/ApiDiscoveryTest.java index f861ae986b0..30cb0bc87ae 100644 --- a/plugins/api/discovery/test/org/apache/cloudstack/discovery/ApiDiscoveryTest.java +++ b/plugins/api/discovery/test/org/apache/cloudstack/discovery/ApiDiscoveryTest.java @@ -46,9 +46,9 @@ import com.cloud.user.UserVO; import com.cloud.utils.component.PluggableService; public class ApiDiscoveryTest { - private static APIChecker _apiChecker = mock(APIChecker.class); - private static PluggableService _pluggableService = mock(PluggableService.class); - private static ApiDiscoveryServiceImpl _discoveryService = new ApiDiscoveryServiceImpl(); + private static APIChecker s_apiChecker = mock(APIChecker.class); + private static PluggableService s_pluggableService = mock(PluggableService.class); + private static ApiDiscoveryServiceImpl s_discoveryService = new ApiDiscoveryServiceImpl(); private static Class testCmdClass = ListApisCmd.class; private static User testUser; @@ -65,23 +65,23 @@ public class ApiDiscoveryTest { testApiAsync = false; testUser = new UserVO(); - _discoveryService._apiAccessCheckers = mock(List.class); - _discoveryService._services = mock(List.class); + s_discoveryService._apiAccessCheckers = mock(List.class); + s_discoveryService._services = mock(List.class); - when(_apiChecker.checkAccess(any(User.class), anyString())).thenReturn(true); - when(_pluggableService.getCommands()).thenReturn(new ArrayList>()); - when(_discoveryService._apiAccessCheckers.iterator()).thenReturn(Arrays.asList(_apiChecker).iterator()); - when(_discoveryService._services.iterator()).thenReturn(Arrays.asList(_pluggableService).iterator()); + when(s_apiChecker.checkAccess(any(User.class), anyString())).thenReturn(true); + when(s_pluggableService.getCommands()).thenReturn(new ArrayList>()); + when(s_discoveryService._apiAccessCheckers.iterator()).thenReturn(Arrays.asList(s_apiChecker).iterator()); + when(s_discoveryService._services.iterator()).thenReturn(Arrays.asList(s_pluggableService).iterator()); Set> cmdClasses = new HashSet>(); cmdClasses.add(ListApisCmd.class); - _discoveryService.start(); - _discoveryService.cacheResponseMap(cmdClasses); + s_discoveryService.start(); + s_discoveryService.cacheResponseMap(cmdClasses); } @Test public void verifyListSingleApi() throws Exception { - ListResponse responses = (ListResponse)_discoveryService.listApis(testUser, testApiName); + ListResponse responses = (ListResponse)s_discoveryService.listApis(testUser, testApiName); ApiDiscoveryResponse response = responses.getResponses().get(0); assertTrue("No. of response items should be one", responses.getCount() == 1); assertEquals("Error in api name", testApiName, response.getName()); @@ -92,7 +92,7 @@ public class ApiDiscoveryTest { @Test public void verifyListApis() throws Exception { - ListResponse responses = (ListResponse)_discoveryService.listApis(testUser, null); + ListResponse responses = (ListResponse)s_discoveryService.listApis(testUser, null); assertTrue("No. of response items > 1", responses.getCount() == 1); for (ApiDiscoveryResponse response : responses.getResponses()) { assertFalse("API name is empty", response.getName().isEmpty()); diff --git a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java index c90704258e9..0091b15b10d 100644 --- a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java +++ b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java @@ -46,50 +46,50 @@ import com.cloud.user.UserVO; public class ApiRateLimitTest { - static ApiRateLimitServiceImpl _limitService = new ApiRateLimitServiceImpl(); - static AccountService _accountService = mock(AccountService.class); - static ConfigurationDao _configDao = mock(ConfigurationDao.class); - private static long acctIdSeq = 5L; - private static Account testAccount; + static ApiRateLimitServiceImpl s_limitService = new ApiRateLimitServiceImpl(); + static AccountService s_accountService = mock(AccountService.class); + static ConfigurationDao s_configDao = mock(ConfigurationDao.class); + private static long s_acctIdSeq = 5L; + private static Account s_testAccount; @BeforeClass public static void setUp() throws ConfigurationException { - when(_configDao.getValue(Config.ApiLimitInterval.key())).thenReturn(null); - when(_configDao.getValue(Config.ApiLimitMax.key())).thenReturn(null); - when(_configDao.getValue(Config.ApiLimitCacheSize.key())).thenReturn(null); - when(_configDao.getValue(Config.ApiLimitEnabled.key())).thenReturn("true"); // enable api rate limiting - _limitService._configDao = _configDao; + when(s_configDao.getValue(Config.ApiLimitInterval.key())).thenReturn(null); + when(s_configDao.getValue(Config.ApiLimitMax.key())).thenReturn(null); + when(s_configDao.getValue(Config.ApiLimitCacheSize.key())).thenReturn(null); + when(s_configDao.getValue(Config.ApiLimitEnabled.key())).thenReturn("true"); // enable api rate limiting + s_limitService._configDao = s_configDao; - _limitService.configure("ApiRateLimitTest", Collections. emptyMap()); + s_limitService.configure("ApiRateLimitTest", Collections. emptyMap()); - _limitService._accountService = _accountService; + s_limitService._accountService = s_accountService; // Standard responses - AccountVO acct = new AccountVO(acctIdSeq); + AccountVO acct = new AccountVO(s_acctIdSeq); acct.setType(Account.ACCOUNT_TYPE_NORMAL); acct.setAccountName("demo"); - testAccount = acct; + s_testAccount = acct; - when(_accountService.getAccount(5L)).thenReturn(testAccount); - when(_accountService.isRootAdmin(Account.ACCOUNT_TYPE_NORMAL)).thenReturn(false); + when(s_accountService.getAccount(5L)).thenReturn(s_testAccount); + when(s_accountService.isRootAdmin(Account.ACCOUNT_TYPE_NORMAL)).thenReturn(false); } @Before public void testSetUp() { // reset counter for each test - _limitService.resetApiLimit(null); + s_limitService.resetApiLimit(null); } private User createFakeUser() { UserVO user = new UserVO(); - user.setAccountId(acctIdSeq); + user.setAccountId(s_acctIdSeq); return user; } private boolean isUnderLimit(User key) { try { - _limitService.checkAccess(key, null); + s_limitService.checkAccess(key, null); return true; } catch (RequestLimitException ex) { return false; @@ -99,8 +99,8 @@ public class ApiRateLimitTest { @Test public void sequentialApiAccess() { int allowedRequests = 1; - _limitService.setMaxAllowed(allowedRequests); - _limitService.setTimeToLive(1); + s_limitService.setMaxAllowed(allowedRequests); + s_limitService.setTimeToLive(1); User key = createFakeUser(); assertTrue("Allow for the first request", isUnderLimit(key)); @@ -111,8 +111,8 @@ public class ApiRateLimitTest { @Test public void canDoReasonableNumberOfApiAccessPerSecond() throws Exception { int allowedRequests = 200; - _limitService.setMaxAllowed(allowedRequests); - _limitService.setTimeToLive(1); + s_limitService.setMaxAllowed(allowedRequests); + s_limitService.setTimeToLive(1); User key = createFakeUser(); @@ -126,8 +126,8 @@ public class ApiRateLimitTest { @Test public void multipleClientsCanAccessWithoutBlocking() throws Exception { int allowedRequests = 200; - _limitService.setMaxAllowed(allowedRequests); - _limitService.setTimeToLive(1); + s_limitService.setMaxAllowed(allowedRequests); + s_limitService.setTimeToLive(1); final User key = createFakeUser(); @@ -180,8 +180,8 @@ public class ApiRateLimitTest { @Test public void expiryOfCounterIsSupported() throws Exception { int allowedRequests = 1; - _limitService.setMaxAllowed(allowedRequests); - _limitService.setTimeToLive(1); + s_limitService.setMaxAllowed(allowedRequests); + s_limitService.setTimeToLive(1); User key = this.createFakeUser(); @@ -196,8 +196,8 @@ public class ApiRateLimitTest { @Test public void verifyResetCounters() throws Exception { int allowedRequests = 1; - _limitService.setMaxAllowed(allowedRequests); - _limitService.setTimeToLive(1); + s_limitService.setMaxAllowed(allowedRequests); + s_limitService.setTimeToLive(1); User key = this.createFakeUser(); @@ -205,7 +205,7 @@ public class ApiRateLimitTest { assertFalse("Another request should be blocked", isUnderLimit(key)); - _limitService.resetApiLimit(key.getAccountId()); + s_limitService.resetApiLimit(key.getAccountId()); assertTrue("Another request should be allowed after reset counter", isUnderLimit(key)); } @@ -213,8 +213,8 @@ public class ApiRateLimitTest { @Test public void verifySearchCounter() throws Exception { int allowedRequests = 10; - _limitService.setMaxAllowed(allowedRequests); - _limitService.setTimeToLive(1); + s_limitService.setMaxAllowed(allowedRequests); + s_limitService.setTimeToLive(1); User key = this.createFakeUser(); @@ -222,7 +222,7 @@ public class ApiRateLimitTest { assertTrue("Issued 5 requests", isUnderLimit(key)); } - ApiLimitResponse response = _limitService.searchApiLimit(testAccount); + ApiLimitResponse response = s_limitService.searchApiLimit(s_testAccount); assertEquals("apiIssued is incorrect", 5, response.getApiIssued()); assertEquals("apiAllowed is incorrect", 5, response.getApiAllowed()); // using <= to account for inaccurate System.currentTimeMillis() clock in Windows environment @@ -234,9 +234,9 @@ public class ApiRateLimitTest { public void disableApiLimit() throws Exception { try { int allowedRequests = 200; - _limitService.setMaxAllowed(allowedRequests); - _limitService.setTimeToLive(1); - _limitService.setEnabled(false); + s_limitService.setMaxAllowed(allowedRequests); + s_limitService.setTimeToLive(1); + s_limitService.setEnabled(false); User key = createFakeUser(); @@ -244,7 +244,7 @@ public class ApiRateLimitTest { assertTrue("We should allow more than " + allowedRequests + " requests per second when api throttling is disabled.", isUnderLimit(key)); } } finally { - _limitService.setEnabled(true); // enable api throttling to avoid + s_limitService.setEnabled(true); // enable api throttling to avoid // impacting other testcases } diff --git a/plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java b/plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java index 110fd7b4437..4182193a17f 100644 --- a/plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java +++ b/plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java @@ -59,7 +59,6 @@ import org.apache.cloudstack.test.utils.SpringUtils; import com.cloud.capacity.Capacity; import com.cloud.capacity.CapacityManager; -import com.cloud.capacity.CapacityVO; import com.cloud.capacity.dao.CapacityDao; import com.cloud.dc.ClusterDetailsDao; import com.cloud.dc.DataCenterVO; diff --git a/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java b/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java index c1a4ee2bb98..8ad7033400b 100644 --- a/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java +++ b/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java @@ -70,13 +70,13 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { private static Integer retryInterval; // hashmap to book keep the registered subscribers - private static ConcurrentHashMap> _subscribers; + private static ConcurrentHashMap> s_subscribers; // connection to AMQP server, - private static Connection _connection = null; + private static Connection s_connection = null; // AMQP server should consider messages acknowledged once delivered if _autoAck is true - private static boolean _autoAck = true; + private static boolean s_autoAck = true; private ExecutorService executorService; private static DisconnectHandler disconnectHandler; @@ -114,7 +114,7 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { throw new ConfigurationException("Invalid port number/retry interval"); } - _subscribers = new ConcurrentHashMap>(); + s_subscribers = new ConcurrentHashMap>(); executorService = Executors.newCachedThreadPool(); disconnectHandler = new DisconnectHandler(); @@ -173,7 +173,7 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { String bindingKey = createBindingKey(topic); // store the subscriber details before creating channel - _subscribers.put(queueName, new Ternary(bindingKey, null, subscriber)); + s_subscribers.put(queueName, new Ternary(bindingKey, null, subscriber)); // create a channel dedicated for this subscription Connection connection = getConnection(); @@ -185,10 +185,10 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { channel.queueBind(queueName, amqpExchangeName, bindingKey); // register a callback handler to receive the events that a subscriber subscribed to - channel.basicConsume(queueName, _autoAck, queueName, new DefaultConsumer(channel) { + channel.basicConsume(queueName, s_autoAck, queueName, new DefaultConsumer(channel) { @Override public void handleDelivery(String queueName, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException { - Ternary queueDetails = _subscribers.get(queueName); + Ternary queueDetails = s_subscribers.get(queueName); if (queueDetails != null) { EventSubscriber subscriber = queueDetails.third(); String routingKey = envelope.getRoutingKey(); @@ -207,9 +207,9 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { }); // update the channel details for the subscription - Ternary queueDetails = _subscribers.get(queueName); + Ternary queueDetails = s_subscribers.get(queueName); queueDetails.second(channel); - _subscribers.put(queueName, queueDetails); + s_subscribers.put(queueName, queueDetails); } catch (AlreadyClosedException closedException) { s_logger.warn("Connection to AMQP service is lost. Subscription:" + queueName + " will be active after reconnection"); @@ -227,10 +227,10 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { try { String classname = subscriber.getClass().getName(); String queueName = UUID.nameUUIDFromBytes(classname.getBytes()).toString(); - Ternary queueDetails = _subscribers.get(queueName); + Ternary queueDetails = s_subscribers.get(queueName); Channel channel = queueDetails.second(); channel.basicCancel(queueName); - _subscribers.remove(queueName, queueDetails); + s_subscribers.remove(queueName, queueDetails); } catch (Exception e) { throw new EventBusException("Failed to unsubscribe from event bus due to " + e.getMessage()); } @@ -330,7 +330,7 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { } private synchronized Connection getConnection() throws Exception { - if (_connection == null) { + if (s_connection == null) { try { return createConnection(); } catch (Exception e) { @@ -338,7 +338,7 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { throw e; } } else { - return _connection; + return s_connection; } } @@ -352,8 +352,8 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { factory.setPort(port); Connection connection = factory.newConnection(); connection.addShutdownListener(disconnectHandler); - _connection = connection; - return _connection; + s_connection = connection; + return s_connection; } catch (Exception e) { throw e; } @@ -361,25 +361,25 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { private synchronized void closeConnection() { try { - if (_connection != null) { - _connection.close(); + if (s_connection != null) { + s_connection.close(); } } catch (Exception e) { s_logger.warn("Failed to close connection to AMQP server due to " + e.getMessage()); } - _connection = null; + s_connection = null; } private synchronized void abortConnection() { - if (_connection == null) + if (s_connection == null) return; try { - _connection.abort(); + s_connection.abort(); } catch (Exception e) { s_logger.warn("Failed to abort connection due to " + e.getMessage()); } - _connection = null; + s_connection = null; } private String replaceNullWithWildcard(String key) { @@ -458,9 +458,9 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { @Override public boolean stop() { - if (_connection.isOpen()) { - for (String subscriberId : _subscribers.keySet()) { - Ternary subscriberDetails = _subscribers.get(subscriberId); + if (s_connection.isOpen()) { + for (String subscriberId : s_subscribers.keySet()) { + Ternary subscriberDetails = s_subscribers.get(subscriberId); Channel channel = subscriberDetails.second(); String queueName = subscriberId; try { @@ -483,10 +483,10 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { public void shutdownCompleted(ShutdownSignalException shutdownSignalException) { if (!shutdownSignalException.isInitiatedByApplication()) { - for (String subscriberId : _subscribers.keySet()) { - Ternary subscriberDetails = _subscribers.get(subscriberId); + for (String subscriberId : s_subscribers.keySet()) { + Ternary subscriberDetails = s_subscribers.get(subscriberId); subscriberDetails.second(null); - _subscribers.put(subscriberId, subscriberDetails); + s_subscribers.put(subscriberId, subscriberDetails); } abortConnection(); // disconnected to AMQP server, so abort the connection and channels @@ -524,8 +524,8 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { } // prepare consumer on AMQP server for each of subscriber - for (String subscriberId : _subscribers.keySet()) { - Ternary subscriberDetails = _subscribers.get(subscriberId); + for (String subscriberId : s_subscribers.keySet()) { + Ternary subscriberDetails = s_subscribers.get(subscriberId); String bindingKey = subscriberDetails.first(); EventSubscriber subscriber = subscriberDetails.third(); @@ -538,11 +538,11 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { channel.queueBind(subscriberId, amqpExchangeName, bindingKey); // register a callback handler to receive the events that a subscriber subscribed to - channel.basicConsume(subscriberId, _autoAck, subscriberId, new DefaultConsumer(channel) { + channel.basicConsume(subscriberId, s_autoAck, subscriberId, new DefaultConsumer(channel) { @Override public void handleDelivery(String queueName, Envelope envelope, AMQP.BasicProperties properties, byte[] body) throws IOException { - Ternary subscriberDetails = _subscribers.get(queueName); // queue name == subscriber ID + Ternary subscriberDetails = s_subscribers.get(queueName); // queue name == subscriber ID if (subscriberDetails != null) { EventSubscriber subscriber = subscriberDetails.third(); @@ -565,7 +565,7 @@ public class RabbitMQEventBus extends ManagerBase implements EventBus { // update the channel details for the subscription subscriberDetails.second(channel); - _subscribers.put(subscriberId, subscriberDetails); + s_subscribers.put(subscriberId, subscriberDetails); } } catch (Exception e) { s_logger.warn("Failed to recreate queues and binding for the subscribers due to " + e.getMessage()); diff --git a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappDefaultAllocatorImpl.java b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappDefaultAllocatorImpl.java index f42be33f27d..01418252ebf 100644 --- a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappDefaultAllocatorImpl.java +++ b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappDefaultAllocatorImpl.java @@ -16,18 +16,15 @@ // under the License. package com.cloud.netapp; -import java.io.IOException; import java.rmi.ServerException; import java.util.HashMap; import java.util.List; -import netapp.manage.NaException; - import org.apache.log4j.Logger; public class NetappDefaultAllocatorImpl implements NetappAllocator { - private static HashMap _poolNameToLastVolumeIdAllocated = new HashMap(); - private NetappManager _netappMgr; + private static HashMap s_poolNameToLastVolumeIdAllocated = new HashMap(); + private final NetappManager _netappMgr; public static final Logger s_logger = Logger.getLogger(NetappDefaultAllocatorImpl.class.getName()); public NetappDefaultAllocatorImpl(NetappManager netappMgr) { @@ -67,8 +64,6 @@ public class NetappDefaultAllocatorImpl implements NetappAllocator { * @param poolName * @param lunSizeGb * @return -- the selected volume to create the lun on - * @throws IOException - * @throws NaException */ @Override public synchronized NetappVolumeVO chooseVolumeFromPool(String poolName, long lunSizeGb) { @@ -81,14 +76,14 @@ public class NetappDefaultAllocatorImpl implements NetappAllocator { } //get the index of the record from the map - if (_poolNameToLastVolumeIdAllocated.get(poolName) == null) { + if (s_poolNameToLastVolumeIdAllocated.get(poolName) == null) { pos = 0; } else { - pos = _poolNameToLastVolumeIdAllocated.get(poolName); + pos = s_poolNameToLastVolumeIdAllocated.get(poolName); } //update for RR effect - _poolNameToLastVolumeIdAllocated.put(poolName, (pos + 1) % volumesOnPoolAscending.size()); + s_poolNameToLastVolumeIdAllocated.put(poolName, (pos + 1) % volumesOnPoolAscending.size()); //now iterate over the records Object[] volumesOnPoolAscendingArray = volumesOnPoolAscending.toArray(); diff --git a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java index 10a619c2f38..510e6c6b260 100644 --- a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java +++ b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java @@ -31,10 +31,8 @@ import javax.inject.Inject; import javax.naming.ConfigurationException; import netapp.manage.NaAPIFailedException; -import netapp.manage.NaAuthenticationException; import netapp.manage.NaElement; import netapp.manage.NaException; -import netapp.manage.NaProtocolException; import netapp.manage.NaServer; import org.apache.log4j.Logger; @@ -208,10 +206,7 @@ public class NetappManagerImpl extends ManagerBase implements NetappManager { * @param volName -- name of volume to destroy * @throws ResourceInUseException * @throws NaException - * @throws IOException - * @throws NaProtocolException * @throws NaAPIFailedException - * @throws NaAuthenticationException */ @Override @DB diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java index 8a87285bc3b..66bbb618e20 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java @@ -41,7 +41,7 @@ import com.cloud.agent.api.baremetal.IpmISetBootDevCommand; import com.cloud.agent.api.baremetal.IpmISetBootDevCommand.BootDev; import com.cloud.agent.api.baremetal.PreparePxeServerAnswer; import com.cloud.agent.api.baremetal.PreparePxeServerCommand; -import com.cloud.agent.api.baremetal.prepareCreateTemplateCommand; +import com.cloud.agent.api.baremetal.PrepareCreateTemplateCommand; import com.cloud.baremetal.database.BaremetalPxeDao; import com.cloud.baremetal.database.BaremetalPxeVO; import com.cloud.baremetal.networkservice.BaremetalPxeManager.BaremetalPxeType; @@ -148,7 +148,7 @@ public class BareMetalPingServiceImpl extends BareMetalPxeServiceBase implements } try { - prepareCreateTemplateCommand cmd = new prepareCreateTemplateCommand(ip, mac, mask, gateway, dns, templateUrl); + PrepareCreateTemplateCommand cmd = new PrepareCreateTemplateCommand(ip, mac, mask, gateway, dns, templateUrl); Answer ans = _agentMgr.send(pxeServerId, cmd); return ans.getResult(); } catch (Exception e) { diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartPxeResource.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartPxeResource.java index 6fc6a28ddbb..b677a63b03e 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartPxeResource.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartPxeResource.java @@ -42,7 +42,7 @@ import com.cloud.vm.VirtualMachine.State; public class BaremetalKickStartPxeResource extends BaremetalPxeResourceBase { private static final Logger s_logger = Logger.getLogger(BaremetalKickStartPxeResource.class); - private static final String _name = "BaremetalKickStartPxeResource"; + private static final String Name = "BaremetalKickStartPxeResource"; String _tftpDir; @Override diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java index ddad9b6dbb2..a7fd77ee43f 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java @@ -39,7 +39,7 @@ import com.cloud.agent.api.PingCommand; import com.cloud.agent.api.PingRoutingCommand; import com.cloud.agent.api.baremetal.PreparePxeServerAnswer; import com.cloud.agent.api.baremetal.PreparePxeServerCommand; -import com.cloud.agent.api.baremetal.prepareCreateTemplateCommand; +import com.cloud.agent.api.baremetal.PrepareCreateTemplateCommand; import com.cloud.agent.api.routing.VmDataCommand; import com.cloud.utils.script.Script; import com.cloud.utils.ssh.SSHCmdHelper; @@ -47,7 +47,7 @@ import com.cloud.vm.VirtualMachine.State; public class BaremetalPingPxeResource extends BaremetalPxeResourceBase { private static final Logger s_logger = Logger.getLogger(BaremetalPingPxeResource.class); - private static final String _name = "BaremetalPingPxeResource"; + private static final String Name = "BaremetalPingPxeResource"; String _storageServer; String _pingDir; String _share; @@ -175,7 +175,7 @@ public class BaremetalPingPxeResource extends BaremetalPxeResourceBase { } } - protected Answer execute(prepareCreateTemplateCommand cmd) { + protected Answer execute(PrepareCreateTemplateCommand cmd) { com.trilead.ssh2.Connection sshConnection = new com.trilead.ssh2.Connection(_ip, 22); try { sshConnection.connect(null, 60000, 60000); @@ -207,8 +207,8 @@ public class BaremetalPingPxeResource extends BaremetalPxeResourceBase { public Answer executeRequest(Command cmd) { if (cmd instanceof PreparePxeServerCommand) { return execute((PreparePxeServerCommand)cmd); - } else if (cmd instanceof prepareCreateTemplateCommand) { - return execute((prepareCreateTemplateCommand)cmd); + } else if (cmd instanceof PrepareCreateTemplateCommand) { + return execute((PrepareCreateTemplateCommand)cmd); } else if (cmd instanceof VmDataCommand) { return execute((VmDataCommand)cmd); } else { diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalUserdataElement.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalUserdataElement.java index b60a67bea55..4689fbc8f85 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalUserdataElement.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalUserdataElement.java @@ -85,7 +85,7 @@ public class BaremetalUserdataElement extends AdapterBase implements NetworkElem } @Override - public boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile vm, String SSHPublicKey) throws ResourceUnavailableException { + public boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile vm, String sshPublicKey) throws ResourceUnavailableException { // TODO Auto-generated method stub return false; } diff --git a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java index 2b81fa605d7..371a6187407 100644 --- a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java +++ b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/discoverer/HypervServerDiscoverer.java @@ -16,12 +16,8 @@ // under the License. package com.cloud.hypervisor.hyperv.discoverer; -import java.io.File; -import java.io.IOException; import java.net.InetAddress; import java.net.URI; -import java.net.URISyntaxException; -import java.net.URL; import java.net.UnknownHostException; import java.util.HashMap; import java.util.List; @@ -35,10 +31,6 @@ import javax.naming.ConfigurationException; import org.apache.log4j.Logger; -import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; -import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; -import org.apache.cloudstack.utils.identity.ManagementServerNode; - import com.cloud.agent.AgentManager; import com.cloud.agent.Listener; import com.cloud.agent.api.AgentControlAnswer; @@ -51,7 +43,6 @@ import com.cloud.agent.api.SetupCommand; import com.cloud.agent.api.StartupCommand; import com.cloud.agent.api.StartupRoutingCommand; import com.cloud.alert.AlertManager; -import com.cloud.configuration.Config; import com.cloud.dc.ClusterDetailsDao; import com.cloud.dc.ClusterVO; import com.cloud.dc.DataCenterVO; @@ -77,13 +68,7 @@ import com.cloud.resource.ResourceManager; import com.cloud.resource.ResourceStateAdapter; import com.cloud.resource.ServerResource; import com.cloud.resource.UnableDeleteHostException; -import com.cloud.storage.JavaStorageLayer; import com.cloud.storage.StorageLayer; -import com.cloud.utils.FileUtil; -import com.cloud.utils.NumbersUtil; -import com.cloud.utils.db.GlobalLock; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; /** * Methods to discover and managem a Hyper-V agent. Prepares a diff --git a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java index f21683d00be..27745c02a59 100644 --- a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java +++ b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/manager/HypervManagerImpl.java @@ -30,11 +30,12 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; +import org.apache.log4j.Logger; + import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.utils.identity.ManagementServerNode; -import org.apache.log4j.Logger; import com.cloud.configuration.Config; import com.cloud.storage.JavaStorageLayer; @@ -45,7 +46,7 @@ import com.cloud.utils.db.GlobalLock; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; -@Local(value = { HypervManager.class }) +@Local(value = {HypervManager.class}) public class HypervManagerImpl implements HypervManager { public static final Logger s_logger = Logger.getLogger(HypervManagerImpl.class); @@ -59,8 +60,10 @@ public class HypervManagerImpl implements HypervManager { Map _storageMounts = new HashMap(); StorageLayer _storage; - @Inject ConfigurationDao _configDao; - @Inject DataStoreManager _dataStoreMgr; + @Inject + ConfigurationDao _configDao; + @Inject + DataStoreManager _dataStoreMgr; @Override public boolean configure(String name, Map params) throws ConfigurationException { @@ -150,11 +153,11 @@ public class HypervManagerImpl implements HypervManager { GlobalLock lock = GlobalLock.getInternLock("prepare.systemvm"); try { - if(lock.lock(3600)) { + if (lock.lock(3600)) { try { File patchFolder = new File(mountPoint + "/systemvm"); - if(!patchFolder.exists()) { - if(!patchFolder.mkdirs()) { + if (!patchFolder.exists()) { + if (!patchFolder.mkdirs()) { String msg = "Unable to create systemvm folder on secondary storage. location: " + patchFolder.toString(); s_logger.error(msg); throw new CloudRuntimeException(msg); @@ -163,12 +166,12 @@ public class HypervManagerImpl implements HypervManager { File srcIso = getSystemVMPatchIsoFile(); File destIso = new File(mountPoint + "/systemvm/" + getSystemVMIsoFileNameOnDatastore()); - if(!destIso.exists()) { + if (!destIso.exists()) { s_logger.info("Copy System VM patch ISO file to secondary storage. source ISO: " + - srcIso.getAbsolutePath() + ", destination: " + destIso.getAbsolutePath()); + srcIso.getAbsolutePath() + ", destination: " + destIso.getAbsolutePath()); try { FileUtil.copyfile(srcIso, destIso); - } catch(IOException e) { + } catch (IOException e) { s_logger.error("Unexpected exception ", e); String msg = "Unable to copy systemvm ISO on secondary storage. src location: " + srcIso.toString() + ", dest location: " + destIso; @@ -176,7 +179,7 @@ public class HypervManagerImpl implements HypervManager { throw new CloudRuntimeException(msg); } } else { - if(s_logger.isTraceEnabled()) { + if (s_logger.isTraceEnabled()) { s_logger.trace("SystemVM ISO file " + destIso.getPath() + " already exists"); } } @@ -191,9 +194,9 @@ public class HypervManagerImpl implements HypervManager { private String getMountPoint(String storageUrl) { String mountPoint = null; - synchronized(_storageMounts) { + synchronized (_storageMounts) { mountPoint = _storageMounts.get(storageUrl); - if(mountPoint != null) { + if (mountPoint != null) { return mountPoint; } @@ -206,8 +209,8 @@ public class HypervManagerImpl implements HypervManager { } mountPoint = mount(File.separator + File.separator + uri.getHost() + uri.getPath(), getMountParent(), - uri.getScheme(), uri.getQuery()); - if(mountPoint == null) { + uri.getScheme(), uri.getQuery()); + if (mountPoint == null) { s_logger.error("Unable to create mount point for " + storageUrl); return "/mnt/sec"; } @@ -290,12 +293,12 @@ public class HypervManagerImpl implements HypervManager { isoFile = new File(url.getPath()); } - if(isoFile == null || !isoFile.exists()) { + if (isoFile == null || !isoFile.exists()) { isoFile = new File("/usr/share/cloudstack-common/vms/systemvm.iso"); } - assert(isoFile != null); - if(!isoFile.exists()) { + assert (isoFile != null); + if (!isoFile.exists()) { s_logger.error("Unable to locate systemvm.iso in your setup at " + isoFile.toString()); } return isoFile; @@ -326,8 +329,8 @@ public class HypervManagerImpl implements HypervManager { // cleanup left-over NFS mounts from previous session String[] mounts = _storage.listFiles(parent + File.separator + String.valueOf(mshostId) + ".*"); - if(mounts != null && mounts.length > 0) { - for(String mountPoint : mounts) { + if (mounts != null && mounts.length > 0) { + for (String mountPoint : mounts) { s_logger.info("umount NFS mount from previous session: " + mountPoint); String result = null; @@ -348,7 +351,7 @@ public class HypervManagerImpl implements HypervManager { private void shutdownCleanup() { s_logger.info("Cleanup mounted mount points used in current session"); - for(String mountPoint : _storageMounts.values()) { + for (String mountPoint : _storageMounts.values()) { s_logger.info("umount NFS mount: " + mountPoint); String result = null; diff --git a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java index 6c4babd009e..5de3d7012fd 100644 --- a/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java +++ b/plugins/hypervisors/hyperv/src/com/cloud/hypervisor/hyperv/resource/HypervDirectConnectResource.java @@ -112,7 +112,6 @@ import com.cloud.utils.net.NetUtils; import com.cloud.utils.ssh.SshHelper; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineName; -import com.google.gson.Gson; /** * Implementation of dummy resource to be returned from discoverer. @@ -128,12 +127,12 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S private String _clusterId; private String _guid; private String _agentIp; - private int _port = DEFAULT_AGENT_PORT; - protected final long _ops_timeout = 900000; // 15 minutes time out to time + private final int _port = DEFAULT_AGENT_PORT; + protected final long _opsTimeout = 900000; // 15 minutes time out to time protected final int _retry = 24; protected final int _sleep = 10000; - protected final int DEFAULT_DOMR_SSHPORT = 3922; + protected static final int DEFAULT_DOMR_SSHPORT = 3922; private String _clusterGuid; @@ -145,14 +144,14 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S private String _password; private static HypervManager s_hypervMgr; - @Inject HypervManager _hypervMgr; + @Inject + HypervManager _hypervMgr; @PostConstruct void init() { s_hypervMgr = _hypervMgr; } - @Override public final Type getType() { return Type.Routing; @@ -383,7 +382,7 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S } else if (clazz == CheckS2SVpnConnectionsCommand.class) { answer = execute((CheckS2SVpnConnectionsCommand)cmd); } else if (clazz == SetStaticRouteCommand.class) { - answer = execute((SetStaticRouteCommand) cmd); + answer = execute((SetStaticRouteCommand)cmd); } else { if (clazz == StartCommand.class) { VirtualMachineTO vmSpec = ((StartCommand)cmd).getVirtualMachine(); @@ -633,7 +632,7 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S if (s_logger.isDebugEnabled()) s_logger.debug("Run domr script " + cmd); Pair result2 = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", getSystemVMKeyFile(), null, - // TODO need to find the dev index inside router based on IP address + // TODO need to find the dev index inside router based on IP address cmd); if (s_logger.isDebugEnabled()) s_logger.debug("result: " + result2.first() + ", output: " + result2.second()); @@ -960,14 +959,16 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S String args = " -v " + vmIpAddress; if (s_logger.isDebugEnabled()) { - s_logger.debug("Run command on domain router " + controlIp + ", /opt/cloud/bin/savepassword.sh " + args + " -p " + StringUtils.getMaskedPasswordForDisplay(cmd.getPassword())); + s_logger.debug("Run command on domain router " + controlIp + ", /opt/cloud/bin/savepassword.sh " + args + " -p " + + StringUtils.getMaskedPasswordForDisplay(cmd.getPassword())); } args += " -p " + password; try { - Pair result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", getSystemVMKeyFile(), null, "/opt/cloud/bin/savepassword.sh " + args); + Pair result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", getSystemVMKeyFile(), null, "/opt/cloud/bin/savepassword.sh " + + args); if (!result.first()) { s_logger.error("savepassword command on domain router " + controlIp + " failed, message: " + result.second()); @@ -1608,17 +1609,17 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S /* todo: update, make consistent with the xen server equivalent. */ if (params != null) { - _guid = (String) params.get("guid"); - _zoneId = (String) params.get("zone"); - _podId = (String) params.get("pod"); - _clusterId = (String) params.get("cluster"); - _agentIp = (String) params.get("ipaddress"); // was agentIp + _guid = (String)params.get("guid"); + _zoneId = (String)params.get("zone"); + _podId = (String)params.get("pod"); + _clusterId = (String)params.get("cluster"); + _agentIp = (String)params.get("ipaddress"); // was agentIp _name = name; - - _clusterGuid = (String) params.get("cluster.guid"); - _username = (String) params.get("url"); - _password = (String) params.get("password"); - _username = (String) params.get("username"); + + _clusterGuid = (String)params.get("cluster.guid"); + _username = (String)params.get("url"); + _password = (String)params.get("password"); + _username = (String)params.get("username"); _configureCalled = true; } @@ -1659,7 +1660,7 @@ public class HypervDirectConnectResource extends ServerResourceBase implements S // at least have tried _retry times, this is to coordinate with system // VM patching/rebooting time that may need int retry = _retry; - while (System.currentTimeMillis() - startTick <= _ops_timeout || --retry > 0) { + while (System.currentTimeMillis() - startTick <= _opsTimeout || --retry > 0) { SocketChannel sch = null; try { s_logger.info("Trying to connect to " + ipAddress); diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java index 48c789dac51..b3bd3b3fcfd 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java @@ -42,7 +42,7 @@ public class BridgeVifDriver extends VifDriverBase { private static final Logger s_logger = Logger.getLogger(BridgeVifDriver.class); private int _timeout; - private static final Object _vnetBridgeMonitor = new Object(); + private final Object _vnetBridgeMonitor = new Object(); private String _modifyVlanPath; private String _modifyVxlanPath; private String bridgeNameSchema; diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java index 6f6fbc3d4ca..fdaaeb31c45 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java @@ -31,7 +31,7 @@ import com.cloud.utils.script.Script; public class KVMHABase { private static final Logger s_logger = Logger.getLogger(KVMHABase.class); private long _timeout = 60000; /* 1 minutes */ - protected static String _heartBeatPath; + protected static String s_heartBeatPath; protected long _heartBeatUpdateTimeout = 60000; protected long _heartBeatUpdateFreq = 60000; protected long _heartBeatUpdateMaxRetry = 3; diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAChecker.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAChecker.java index 02312ceeebd..c2af191cae6 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAChecker.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAChecker.java @@ -44,7 +44,7 @@ public class KVMHAChecker extends KVMHABase implements Callable { List results = new ArrayList(); for (NfsStoragePool pool : _pools) { - Script cmd = new Script(_heartBeatPath, _heartBeatCheckerTimeout, s_logger); + Script cmd = new Script(s_heartBeatPath, _heartBeatCheckerTimeout, s_logger); cmd.add("-i", pool._poolIp); cmd.add("-p", pool._poolMountSourcePath); cmd.add("-m", pool._mountDestPath); diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java index 58ba808372c..4628fae55df 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java @@ -42,7 +42,7 @@ public class KVMHAMonitor extends KVMHABase implements Runnable { this._storagePool.put(pool._poolUUID, pool); } this._hostIP = host; - KVMHABase._heartBeatPath = scriptPath; + KVMHABase.s_heartBeatPath = scriptPath; } public void addStoragePool(NfsStoragePool pool) { @@ -109,7 +109,7 @@ public class KVMHAMonitor extends KVMHABase implements Runnable { String result = null; for (int i = 0; i < 5; i++) { - Script cmd = new Script(_heartBeatPath, _heartBeatUpdateTimeout, s_logger); + Script cmd = new Script(s_heartBeatPath, _heartBeatUpdateTimeout, s_logger); cmd.add("-i", primaryStoragePool._poolIp); cmd.add("-p", primaryStoragePool._poolMountSourcePath); cmd.add("-m", primaryStoragePool._mountDestPath); @@ -124,7 +124,7 @@ public class KVMHAMonitor extends KVMHABase implements Runnable { if (result != null) { s_logger.warn("write heartbeat failed: " + result + "; reboot the host"); - Script cmd = new Script(_heartBeatPath, _heartBeatUpdateTimeout, s_logger); + Script cmd = new Script(s_heartBeatPath, _heartBeatUpdateTimeout, s_logger); cmd.add("-i", primaryStoragePool._poolIp); cmd.add("-p", primaryStoragePool._poolMountSourcePath); cmd.add("-m", primaryStoragePool._mountDestPath); diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtCapXMLParser.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtCapXMLParser.java index fe2fb5dcc1e..2f12d21eb24 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtCapXMLParser.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtCapXMLParser.java @@ -31,7 +31,7 @@ public class LibvirtCapXMLParser extends LibvirtXMLParser { private boolean _osType = false; private boolean _domainTypeKVM = false; private boolean _emulatorFlag = false; - private boolean _archTypex86_64 = false; + private boolean _archTypex8664 = false; private final StringBuffer _emulator = new StringBuffer(); private final StringBuffer _capXML = new StringBuffer(); private static final Logger s_logger = Logger.getLogger(LibvirtCapXMLParser.class); @@ -50,7 +50,7 @@ public class LibvirtCapXMLParser extends LibvirtXMLParser { } else if (qName.equalsIgnoreCase("emulator")) { _emulatorFlag = false; } else if (qName.equalsIgnoreCase("arch")) { - _archTypex86_64 = false; + _archTypex8664 = false; } else if (_host) { _capXML.append("<").append("/").append(qName).append(">"); } @@ -81,7 +81,7 @@ public class LibvirtCapXMLParser extends LibvirtXMLParser { } else if (qName.equalsIgnoreCase("arch")) { for (int i = 0; i < attributes.getLength(); i++) { if (attributes.getQName(i).equalsIgnoreCase("name") && attributes.getValue(i).equalsIgnoreCase("x86_64")) { - _archTypex86_64 = true; + _archTypex8664 = true; } } } else if (qName.equalsIgnoreCase("domain")) { @@ -90,7 +90,7 @@ public class LibvirtCapXMLParser extends LibvirtXMLParser { _domainTypeKVM = true; } } - } else if (qName.equalsIgnoreCase("emulator") && _domainTypeKVM && _archTypex86_64) { + } else if (qName.equalsIgnoreCase("emulator") && _domainTypeKVM && _archTypex8664) { _emulatorFlag = true; _emulator.delete(0, _emulator.length()); } else if (_host) { diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index 3596f8d3c71..7a02f3b5bdc 100755 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -301,7 +301,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv private String _ovsPvlanDhcpHostPath; private String _ovsPvlanVmPath; private String _routerProxyPath; - private String _ovsTunnelPath; + private String _ovsTunnelPath; private String _host; private String _dcId; private String _pod; @@ -311,9 +311,9 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv private long _hvVersion; private long _kernelVersion; private KVMHAMonitor _monitor; - private final String _SSHKEYSPATH = "/root/.ssh"; - private final String _SSHPRVKEYPATH = _SSHKEYSPATH + File.separator + "id_rsa.cloud"; - private final String _SSHPUBKEYPATH = _SSHKEYSPATH + File.separator + "id_rsa.pub.cloud"; + private static final String SSHKEYSPATH = "/root/.ssh"; + private static final String SSHPRVKEYPATH = SSHKEYSPATH + File.separator + "id_rsa.cloud"; + private static final String SSHPUBKEYPATH = SSHKEYSPATH + File.separator + "id_rsa.pub.cloud"; private String _mountPoint = "/mnt"; StorageLayer _storage; private KVMStoragePoolManager _storagePoolMgr; @@ -355,7 +355,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv return null; } - protected static MessageFormat SnapshotXML = new MessageFormat(" " + " {0}" + " " + protected static final MessageFormat SnapshotXML = new MessageFormat(" " + " {0}" + " " + " {1}" + " " + " "); protected HypervisorType _hypervisorType; @@ -374,13 +374,13 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv protected String _privateIp; protected String _pool; protected String _localGateway; - private boolean _can_bridge_firewall; + private boolean _canBridgeFirewall; protected String _localStoragePath; protected String _localStorageUUID; protected String _guestCpuMode; protected String _guestCpuModel; private final Map _pifs = new HashMap(); - private final Map _vmStats = new ConcurrentHashMap(); + private final Map _vmStats = new ConcurrentHashMap(); protected boolean _disconnected = true; protected int _timeout; @@ -607,10 +607,10 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv throw new ConfigurationException("Unable to find the security_group.py"); } - _ovsTunnelPath = Script.findScript(networkScriptsDir, "ovstunnel.py"); - if (_ovsTunnelPath == null) { - throw new ConfigurationException("Unable to find the ovstunnel.py"); - } + _ovsTunnelPath = Script.findScript(networkScriptsDir, "ovstunnel.py"); + if (_ovsTunnelPath == null) { + throw new ConfigurationException("Unable to find the ovstunnel.py"); + } _routerProxyPath = Script.findScript("scripts/network/domr/", "router_proxy.sh"); if (_routerProxyPath == null) { @@ -816,7 +816,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } s_logger.debug("Found pif: " + _pifs.get("private") + " on " + _privBridgeName + ", pif: " + _pifs.get("public") + " on " + _publicBridgeName); - _can_bridge_firewall = can_bridge_firewall(_pifs.get("public")); + _canBridgeFirewall = can_bridge_firewall(_pifs.get("public")); _localGateway = Script.runSimpleBashScript("ip route |grep default|awk '{print $3}'"); if (_localGateway == null) { @@ -1284,17 +1284,17 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv return execute((SetMonitorServiceCommand)cmd); } else if (cmd instanceof CheckOnHostCommand) { return execute((CheckOnHostCommand)cmd); - } else if (cmd instanceof OvsFetchInterfaceCommand) { - return execute((OvsFetchInterfaceCommand) cmd); - } else if (cmd instanceof OvsSetupBridgeCommand) { - return execute((OvsSetupBridgeCommand) cmd); - } else if (cmd instanceof OvsDestroyBridgeCommand) { - return execute((OvsDestroyBridgeCommand) cmd); - } else if (cmd instanceof OvsCreateTunnelCommand) { - return execute((OvsCreateTunnelCommand) cmd); - } else if (cmd instanceof OvsDestroyTunnelCommand) { - return execute((OvsDestroyTunnelCommand) cmd); - } else { + } else if (cmd instanceof OvsFetchInterfaceCommand) { + return execute((OvsFetchInterfaceCommand)cmd); + } else if (cmd instanceof OvsSetupBridgeCommand) { + return execute((OvsSetupBridgeCommand)cmd); + } else if (cmd instanceof OvsDestroyBridgeCommand) { + return execute((OvsDestroyBridgeCommand)cmd); + } else if (cmd instanceof OvsCreateTunnelCommand) { + return execute((OvsCreateTunnelCommand)cmd); + } else if (cmd instanceof OvsDestroyTunnelCommand) { + return execute((OvsDestroyTunnelCommand)cmd); + } else { s_logger.warn("Unsupported command "); return Answer.createUnsupportedCommandAnswer(cmd); } @@ -1304,173 +1304,173 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } private OvsFetchInterfaceAnswer execute(OvsFetchInterfaceCommand cmd) { - String label = cmd.getLabel(); - s_logger.debug("Will look for network with name-label:" + label); - try { - String ipadd = Script.runSimpleBashScript("ifconfig " + label + " | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'"); - String mask = Script.runSimpleBashScript("ifconfig " + label + " | grep 'inet addr:' | cut -d: -f4"); - String mac = Script.runSimpleBashScript("ifconfig " + label + " | grep HWaddr | awk -F \" \" '{print $5}'"); - return new OvsFetchInterfaceAnswer(cmd, true, "Interface " + label - + " retrieved successfully", ipadd, mask, mac); + String label = cmd.getLabel(); + s_logger.debug("Will look for network with name-label:" + label); + try { + String ipadd = Script.runSimpleBashScript("ifconfig " + label + " | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'"); + String mask = Script.runSimpleBashScript("ifconfig " + label + " | grep 'inet addr:' | cut -d: -f4"); + String mac = Script.runSimpleBashScript("ifconfig " + label + " | grep HWaddr | awk -F \" \" '{print $5}'"); + return new OvsFetchInterfaceAnswer(cmd, true, "Interface " + label + + " retrieved successfully", ipadd, mask, mac); - } catch (Exception e) { - s_logger.warn("Caught execption when fetching interface", e); - return new OvsFetchInterfaceAnswer(cmd, false, "EXCEPTION:" - + e.getMessage()); - } + } catch (Exception e) { + s_logger.warn("Caught execption when fetching interface", e); + return new OvsFetchInterfaceAnswer(cmd, false, "EXCEPTION:" + + e.getMessage()); + } } - private Answer execute(OvsSetupBridgeCommand cmd) { - findOrCreateTunnelNetwork(cmd.getKey()); - configureTunnelNetwork(cmd.getNetworkId(), cmd.getHostId(), - cmd.getKey()); - s_logger.debug("OVS Bridge configured"); - return new Answer(cmd, true, null); - } + private Answer execute(OvsSetupBridgeCommand cmd) { + findOrCreateTunnelNetwork(cmd.getKey()); + configureTunnelNetwork(cmd.getNetworkId(), cmd.getHostId(), + cmd.getKey()); + s_logger.debug("OVS Bridge configured"); + return new Answer(cmd, true, null); + } - private Answer execute(OvsDestroyBridgeCommand cmd) { - destroyTunnelNetwork(cmd.getKey()); - s_logger.debug("OVS Bridge destroyed"); - return new Answer(cmd, true, null); - } + private Answer execute(OvsDestroyBridgeCommand cmd) { + destroyTunnelNetwork(cmd.getKey()); + s_logger.debug("OVS Bridge destroyed"); + return new Answer(cmd, true, null); + } - private synchronized void destroyTunnelNetwork(int key) { - try { - findOrCreateTunnelNetwork(key); - String bridge = "OVSTunnel" + key; - Script cmd = new Script(_ovsTunnelPath, _timeout, s_logger); - cmd.add("destroy_ovs_bridge"); - cmd.add("--bridge", bridge); - String result = cmd.execute(); - if (result != null) { - // TODO: Should make this error not fatal? - // Can Concurrent VM shutdown/migration/reboot events can cause - // this method - // to be executed on a bridge which has already been removed? - throw new CloudRuntimeException("Unable to remove OVS bridge " + bridge); - } - return; - } catch (Exception e) { - s_logger.warn("destroyTunnelNetwork failed:", e); - return; - } - } + private synchronized void destroyTunnelNetwork(int key) { + try { + findOrCreateTunnelNetwork(key); + String bridge = "OVSTunnel" + key; + Script cmd = new Script(_ovsTunnelPath, _timeout, s_logger); + cmd.add("destroy_ovs_bridge"); + cmd.add("--bridge", bridge); + String result = cmd.execute(); + if (result != null) { + // TODO: Should make this error not fatal? + // Can Concurrent VM shutdown/migration/reboot events can cause + // this method + // to be executed on a bridge which has already been removed? + throw new CloudRuntimeException("Unable to remove OVS bridge " + bridge); + } + return; + } catch (Exception e) { + s_logger.warn("destroyTunnelNetwork failed:", e); + return; + } + } - private synchronized boolean findOrCreateTunnelNetwork(long key) { - try { - String nwName = "OVSTunnel" + key; - if (checkNetwork(nwName)) { - return true; - } - // if not found, create a new one - Map otherConfig = new HashMap(); - otherConfig.put("ovs-host-setup", ""); - Script.runSimpleBashScript("ovs-vsctl -- --may-exist add-br " - + nwName + " -- set bridge " + nwName - + " other_config:ovs_host_setup='-1'"); - s_logger.debug("### KVM network for tunnels created:" + nwName); - } catch (Exception e) { - s_logger.warn("createTunnelNetwork failed", e); - } - return true; - } + private synchronized boolean findOrCreateTunnelNetwork(long key) { + try { + String nwName = "OVSTunnel" + key; + if (checkNetwork(nwName)) { + return true; + } + // if not found, create a new one + Map otherConfig = new HashMap(); + otherConfig.put("ovs-host-setup", ""); + Script.runSimpleBashScript("ovs-vsctl -- --may-exist add-br " + + nwName + " -- set bridge " + nwName + + " other_config:ovs_host_setup='-1'"); + s_logger.debug("### KVM network for tunnels created:" + nwName); + } catch (Exception e) { + s_logger.warn("createTunnelNetwork failed", e); + } + return true; + } - private synchronized boolean configureTunnelNetwork(long networkId, - long hostId, int key) { - try { - findOrCreateTunnelNetwork(key); - String nwName = "OVSTunnel" + key; - String configuredHosts = Script - .runSimpleBashScript("ovs-vsctl get bridge " + nwName - + " other_config:ovs_host_setup"); - boolean configured = false; - if (configuredHosts != null) { - String hostIdsStr[] = configuredHosts.split(","); - for (String hostIdStr : hostIdsStr) { - if (hostIdStr.equals(((Long) hostId).toString())) { - configured = true; - break; - } - } - } - if (!configured) { - Script cmd = new Script(_ovsTunnelPath, _timeout, s_logger); - cmd.add("setup_ovs_bridge"); - cmd.add("--key", String.valueOf(key)); - cmd.add("--cs_host_id", ((Long) hostId).toString()); - cmd.add("--bridge", nwName); - String result = cmd.execute(); - if (result != null) { - throw new CloudRuntimeException( - "Unable to pre-configure OVS bridge " + nwName - + " for network ID:" + networkId); - } - } - } catch (Exception e) { - s_logger.warn("createandConfigureTunnelNetwork failed", e); - return false; - } - return true; - } + private synchronized boolean configureTunnelNetwork(long networkId, + long hostId, int key) { + try { + findOrCreateTunnelNetwork(key); + String nwName = "OVSTunnel" + key; + String configuredHosts = Script + .runSimpleBashScript("ovs-vsctl get bridge " + nwName + + " other_config:ovs_host_setup"); + boolean configured = false; + if (configuredHosts != null) { + String hostIdsStr[] = configuredHosts.split(","); + for (String hostIdStr : hostIdsStr) { + if (hostIdStr.equals(((Long)hostId).toString())) { + configured = true; + break; + } + } + } + if (!configured) { + Script cmd = new Script(_ovsTunnelPath, _timeout, s_logger); + cmd.add("setup_ovs_bridge"); + cmd.add("--key", String.valueOf(key)); + cmd.add("--cs_host_id", ((Long)hostId).toString()); + cmd.add("--bridge", nwName); + String result = cmd.execute(); + if (result != null) { + throw new CloudRuntimeException( + "Unable to pre-configure OVS bridge " + nwName + + " for network ID:" + networkId); + } + } + } catch (Exception e) { + s_logger.warn("createandConfigureTunnelNetwork failed", e); + return false; + } + return true; + } - private OvsCreateTunnelAnswer execute(OvsCreateTunnelCommand cmd) { - String bridge = "OVSTunnel" + cmd.getKey(); - try { - if (!findOrCreateTunnelNetwork(cmd.getKey())) { - s_logger.debug("Error during bridge setup"); - return new OvsCreateTunnelAnswer(cmd, false, - "Cannot create network", bridge); - } + private OvsCreateTunnelAnswer execute(OvsCreateTunnelCommand cmd) { + String bridge = "OVSTunnel" + cmd.getKey(); + try { + if (!findOrCreateTunnelNetwork(cmd.getKey())) { + s_logger.debug("Error during bridge setup"); + return new OvsCreateTunnelAnswer(cmd, false, + "Cannot create network", bridge); + } - configureTunnelNetwork(cmd.getNetworkId(), cmd.getFrom(), - cmd.getKey()); - Script command = new Script(_ovsTunnelPath, _timeout, s_logger); - command.add("create_tunnel"); - command.add("--bridge", bridge); - command.add("--remote_ip", cmd.getRemoteIp()); - command.add("--key", cmd.getKey().toString()); - command.add("--src_host", cmd.getFrom().toString()); - command.add("--dst_host", cmd.getTo().toString()); + configureTunnelNetwork(cmd.getNetworkId(), cmd.getFrom(), + cmd.getKey()); + Script command = new Script(_ovsTunnelPath, _timeout, s_logger); + command.add("create_tunnel"); + command.add("--bridge", bridge); + command.add("--remote_ip", cmd.getRemoteIp()); + command.add("--key", cmd.getKey().toString()); + command.add("--src_host", cmd.getFrom().toString()); + command.add("--dst_host", cmd.getTo().toString()); - String result = command.execute(); - if (result != null) { - return new OvsCreateTunnelAnswer(cmd, true, result, null, - bridge); - } else { - return new OvsCreateTunnelAnswer(cmd, false, result, bridge); - } - } catch (Exception e) { - s_logger.debug("Error during tunnel setup"); - s_logger.warn("Caught execption when creating ovs tunnel", e); - return new OvsCreateTunnelAnswer(cmd, false, e.getMessage(), bridge); - } - } + String result = command.execute(); + if (result != null) { + return new OvsCreateTunnelAnswer(cmd, true, result, null, + bridge); + } else { + return new OvsCreateTunnelAnswer(cmd, false, result, bridge); + } + } catch (Exception e) { + s_logger.debug("Error during tunnel setup"); + s_logger.warn("Caught execption when creating ovs tunnel", e); + return new OvsCreateTunnelAnswer(cmd, false, e.getMessage(), bridge); + } + } - private Answer execute(OvsDestroyTunnelCommand cmd) { - try { - if (!findOrCreateTunnelNetwork(cmd.getKey())) { - s_logger.warn("Unable to find tunnel network for GRE key:" - + cmd.getKey()); - return new Answer(cmd, false, "No network found"); - } + private Answer execute(OvsDestroyTunnelCommand cmd) { + try { + if (!findOrCreateTunnelNetwork(cmd.getKey())) { + s_logger.warn("Unable to find tunnel network for GRE key:" + + cmd.getKey()); + return new Answer(cmd, false, "No network found"); + } - String bridge = "OVSTunnel" + cmd.getKey(); - Script command = new Script(_ovsTunnelPath, _timeout, s_logger); - command.add("destroy_tunnel"); - command.add("--bridge", bridge); - command.add("--iface_name", cmd.getInPortName()); - String result = command.execute(); - if (result == null) { - return new Answer(cmd, true, result); - } else { - return new Answer(cmd, false, result); - } - } catch (Exception e) { - s_logger.warn("caught execption when destroy ovs tunnel", e); - return new Answer(cmd, false, e.getMessage()); - } - } + String bridge = "OVSTunnel" + cmd.getKey(); + Script command = new Script(_ovsTunnelPath, _timeout, s_logger); + command.add("destroy_tunnel"); + command.add("--bridge", bridge); + command.add("--iface_name", cmd.getInPortName()); + String result = command.execute(); + if (result == null) { + return new Answer(cmd, true, result); + } else { + return new Answer(cmd, false, result); + } + } catch (Exception e) { + s_logger.warn("caught execption when destroy ovs tunnel", e); + return new Answer(cmd, false, e.getMessage()); + } + } private CheckNetworkAnswer execute(CheckNetworkCommand cmd) { List phyNics = cmd.getPhysicalNetworkInfoList(); @@ -2342,7 +2342,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv * * These bindings will read the snapshot and write the contents to * the secondary storage directly - * + * * It will stop doing so if the amount of time spend is longer then * cmds.timeout */ @@ -3217,8 +3217,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } } - - private Answer execute(RebootCommand cmd) { + private Answer execute(RebootCommand cmd) { synchronized (_vms) { _vms.put(cmd.getVmName(), State.Starting); @@ -3299,8 +3298,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } } - - protected Answer execute(StopCommand cmd) { + protected Answer execute(StopCommand cmd) { final String vmName = cmd.getVmName(); State state = null; @@ -3345,21 +3343,21 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } protected Answer execute(ModifySshKeysCommand cmd) { - File sshKeysDir = new File(_SSHKEYSPATH); + File sshKeysDir = new File(SSHKEYSPATH); String result = null; if (!sshKeysDir.exists()) { // Change permissions for the 700 Script script = new Script("mkdir", _timeout, s_logger); script.add("-m", "700"); - script.add(_SSHKEYSPATH); + script.add(SSHKEYSPATH); script.execute(); if (!sshKeysDir.exists()) { - s_logger.debug("failed to create directory " + _SSHKEYSPATH); + s_logger.debug("failed to create directory " + SSHKEYSPATH); } } - File pubKeyFile = new File(_SSHPUBKEYPATH); + File pubKeyFile = new File(SSHPUBKEYPATH); if (!pubKeyFile.exists()) { try { pubKeyFile.createNewFile(); @@ -3376,15 +3374,15 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv pubkStream.write(pubKey.getBytes()); pubkStream.close(); } catch (FileNotFoundException e) { - result = "File" + _SSHPUBKEYPATH + "is not found:" + e.toString(); + result = "File" + SSHPUBKEYPATH + "is not found:" + e.toString(); s_logger.debug(result); } catch (IOException e) { - result = "Write file " + _SSHPUBKEYPATH + ":" + e.toString(); + result = "Write file " + SSHPUBKEYPATH + ":" + e.toString(); s_logger.debug(result); } } - File prvKeyFile = new File(_SSHPRVKEYPATH); + File prvKeyFile = new File(SSHPRVKEYPATH); if (!prvKeyFile.exists()) { try { prvKeyFile.createNewFile(); @@ -3401,15 +3399,15 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv prvKStream.write(prvKey.getBytes()); prvKStream.close(); } catch (FileNotFoundException e) { - result = "File" + _SSHPRVKEYPATH + "is not found:" + e.toString(); + result = "File" + SSHPRVKEYPATH + "is not found:" + e.toString(); s_logger.debug(result); } catch (IOException e) { - result = "Write file " + _SSHPRVKEYPATH + ":" + e.toString(); + result = "Write file " + SSHPRVKEYPATH + ":" + e.toString(); s_logger.debug(result); } Script script = new Script("chmod", _timeout, s_logger); - script.add("600", _SSHPRVKEYPATH); + script.add("600", SSHPRVKEYPATH); script.execute(); } @@ -3616,7 +3614,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } // pass cmdline info to system vms - if (vmSpec.getType() != VirtualMachine.Type.User) { + if (vmSpec.getType() != VirtualMachine.Type.User) { if ((conn.getVersion() < 1001000)) { // CLOUDSTACK-2823: try passCmdLine some times if kernel < 2.6.34 and qemu < 1.1.0 on hypervisor (for instance, CentOS 6.4) //wait for 5 minutes at most String controlIp = null; @@ -3962,7 +3960,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv public PingCommand getCurrentStatus(long id) { final HashMap newStates = sync(); - if (!_can_bridge_firewall) { + if (!_canBridgeFirewall) { return new PingRoutingCommand(com.cloud.host.Host.Type.Routing, id, newStates, this.getHostVmStateReport()); } else { HashMap> nwGrpStates = syncNetworkGroups(id); @@ -4821,14 +4819,14 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } } - private class vmStats { + private class VmStats { long _usedTime; long _tx; long _rx; - long _io_rd; - long _io_wr; - long _bytes_rd; - long _bytes_wr; + long _ioRead; + long _ioWrote; + long _bytesRead; + long _bytesWrote; Calendar _timestamp; } @@ -4843,7 +4841,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv stats.setEntityType("vm"); /* get cpu utilization */ - vmStats oldStats = null; + VmStats oldStats = null; Calendar now = Calendar.getInstance(); @@ -4896,29 +4894,29 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } if (oldStats != null) { - long deltaiord = io_rd - oldStats._io_rd; + long deltaiord = io_rd - oldStats._ioRead; if (deltaiord > 0) stats.setDiskReadIOs(deltaiord); - long deltaiowr = io_wr - oldStats._io_wr; + long deltaiowr = io_wr - oldStats._ioWrote; if (deltaiowr > 0) stats.setDiskWriteIOs(deltaiowr); - double deltabytesrd = bytes_rd - oldStats._bytes_rd; + double deltabytesrd = bytes_rd - oldStats._bytesRead; if (deltabytesrd > 0) stats.setDiskReadKBs(deltabytesrd / 1024); - double deltabyteswr = bytes_wr - oldStats._bytes_wr; + double deltabyteswr = bytes_wr - oldStats._bytesWrote; if (deltabyteswr > 0) stats.setDiskWriteKBs(deltabyteswr / 1024); } /* save to Hashmap */ - vmStats newStat = new vmStats(); + VmStats newStat = new VmStats(); newStat._usedTime = info.cpuTime; newStat._rx = rx; newStat._tx = tx; - newStat._io_rd = io_rd; - newStat._io_wr = io_wr; - newStat._bytes_rd = bytes_rd; - newStat._bytes_wr = bytes_wr; + newStat._ioRead = io_rd; + newStat._ioWrote = io_wr; + newStat._bytesRead = bytes_rd; + newStat._bytesWrote = bytes_wr; newStat._timestamp = now; _vmStats.put(vmName, newStat); return stats; @@ -4941,7 +4939,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } protected boolean destroy_network_rules_for_vm(Connect conn, String vmName) { - if (!_can_bridge_firewall) { + if (!_canBridgeFirewall) { return false; } String vif = null; @@ -4964,7 +4962,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } protected boolean default_network_rules(Connect conn, String vmName, NicTO nic, Long vmId, String secIpStr) { - if (!_can_bridge_firewall) { + if (!_canBridgeFirewall) { return false; } @@ -4996,7 +4994,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } protected boolean post_default_network_rules(Connect conn, String vmName, NicTO nic, Long vmId, InetAddress dhcpServerIp, String hostIp, String hostMacAddr) { - if (!_can_bridge_firewall) { + if (!_canBridgeFirewall) { return false; } @@ -5030,7 +5028,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } protected boolean default_network_rules_for_systemvm(Connect conn, String vmName) { - if (!_can_bridge_firewall) { + if (!_canBridgeFirewall) { return false; } @@ -5047,7 +5045,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv private boolean add_network_rules(String vmName, String vmId, String guestIP, String sig, String seq, String mac, String rules, String vif, String brname, String secIps) { - if (!_can_bridge_firewall) { + if (!_canBridgeFirewall) { return false; } @@ -5075,7 +5073,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv private boolean network_rules_vmSecondaryIp(Connect conn, String vmName, String secIp, String action) { - if (!_can_bridge_firewall) { + if (!_canBridgeFirewall) { return false; } @@ -5093,7 +5091,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } private boolean cleanup_rules() { - if (!_can_bridge_firewall) { + if (!_canBridgeFirewall) { return false; } Script cmd = new Script(_securityGroupPath, _timeout, s_logger); diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java index 6c8da8a0640..1ebf9363d31 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java @@ -28,28 +28,28 @@ import com.cloud.hypervisor.Hypervisor.HypervisorType; public class LibvirtConnection { private static final Logger s_logger = Logger.getLogger(LibvirtConnection.class); - static private Map _connections = new HashMap(); + static private Map s_connections = new HashMap(); - static private Connect _connection; - static private String _hypervisorURI; + static private Connect s_connection; + static private String s_hypervisorURI; static public Connect getConnection() throws LibvirtException { - return getConnection(_hypervisorURI); + return getConnection(s_hypervisorURI); } static public Connect getConnection(String hypervisorURI) throws LibvirtException { - Connect conn = _connections.get(hypervisorURI); + Connect conn = s_connections.get(hypervisorURI); if (conn == null) { conn = new Connect(hypervisorURI, false); - _connections.put(hypervisorURI, conn); + s_connections.put(hypervisorURI, conn); } else { try { conn.getVersion(); } catch (LibvirtException e) { s_logger.debug("Connection with libvirtd is broken, due to " + e.getMessage()); conn = new Connect(hypervisorURI, false); - _connections.put(hypervisorURI, conn); + s_connections.put(hypervisorURI, conn); } } @@ -80,7 +80,7 @@ public class LibvirtConnection { } static void initialize(String hypervisorURI) { - _hypervisorURI = hypervisorURI; + s_hypervisorURI = hypervisorURI; } static String getHypervisorURI(String hypervisorType) { diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtNetworkDef.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtNetworkDef.java index a069e08e675..f20bec418d4 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtNetworkDef.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtNetworkDef.java @@ -35,14 +35,14 @@ public class LibvirtNetworkDef { private String _brIPAddr; private String _brNetMask; private final List ipranges = new ArrayList(); - private final List dhcpMaps = new ArrayList(); + private final List dhcpMaps = new ArrayList(); - public static class dhcpMapping { + public static class DhcpMapping { String _mac; String _name; String _ip; - public dhcpMapping(String mac, String name, String ip) { + public DhcpMapping(String mac, String name, String ip) { _mac = mac; _name = name; _ip = ip; @@ -100,7 +100,7 @@ public class LibvirtNetworkDef { } public void adddhcpMapping(String mac, String host, String ip) { - dhcpMapping map = new dhcpMapping(mac, host, ip); + DhcpMapping map = new DhcpMapping(mac, host, ip); dhcpMaps.add(map); } @@ -153,7 +153,7 @@ public class LibvirtNetworkDef { for (IPRange ip : ipranges) { netBuilder.append("\n"); } - for (dhcpMapping map : dhcpMaps) { + for (DhcpMapping map : dhcpMaps) { netBuilder.append("\n"); } netBuilder.append("\n"); diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java index 9910877f2ea..3e44e941490 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java @@ -23,8 +23,8 @@ import java.util.Map; public class LibvirtVMDef { private String _hvsType; - private static long _libvirtVersion; - private static long _qemuVersion; + private static long s_libvirtVersion; + private static long s_qemuVersion; private String _domName; private String _domUUID; private String _desc; @@ -665,8 +665,8 @@ public class LibvirtVMDef { diskBuilder.append("/>\n"); if ((_deviceType != deviceType.CDROM) && - (_libvirtVersion >= 9008) && - (_qemuVersion >= 1001000) && + (s_libvirtVersion >= 9008) && + (s_qemuVersion >= 1001000) && (((_bytesReadRate != null) && (_bytesReadRate > 0)) || ((_bytesWriteRate != null) && (_bytesWriteRate > 0)) || ((_iopsReadRate != null) && (_iopsReadRate > 0)) || ((_iopsWriteRate != null) && (_iopsWriteRate > 0)))) { // not CDROM, from libvirt 0.9.8 and QEMU 1.1.0 diskBuilder.append("\n"); @@ -866,7 +866,7 @@ public class LibvirtVMDef { if (_model != null) { netBuilder.append("\n"); } - if ((_libvirtVersion >= 9004) && (_networkRateKBps > 0)) { // supported from libvirt 0.9.4 + if ((s_libvirtVersion >= 9004) && (_networkRateKBps > 0)) { // supported from libvirt 0.9.4 netBuilder.append("\n"); netBuilder.append("\n"); netBuilder.append("\n"); @@ -1113,11 +1113,11 @@ public class LibvirtVMDef { } public void setLibvirtVersion(long libvirtVersion) { - _libvirtVersion = libvirtVersion; + s_libvirtVersion = libvirtVersion; } public void setQemuVersion(long qemuVersion) { - _qemuVersion = qemuVersion; + s_qemuVersion = qemuVersion; } public void setDomainName(String domainName) { diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/iScsiAdmStorageAdaptor.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/IscsiAdmStorageAdaptor.java similarity index 96% rename from plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/iScsiAdmStorageAdaptor.java rename to plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/IscsiAdmStorageAdaptor.java index 3c500348dae..761bb377ee3 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/iScsiAdmStorageAdaptor.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/IscsiAdmStorageAdaptor.java @@ -31,28 +31,28 @@ import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.OutputInterpreter; import com.cloud.utils.script.Script; -public class iScsiAdmStorageAdaptor implements StorageAdaptor { - private static final Logger s_logger = Logger.getLogger(iScsiAdmStorageAdaptor.class); +public class IscsiAdmStorageAdaptor implements StorageAdaptor { + private static final Logger s_logger = Logger.getLogger(IscsiAdmStorageAdaptor.class); - private static final Map _mapStorageUuidToStoragePool = new HashMap(); + private static final Map MapStorageUuidToStoragePool = new HashMap(); @Override public KVMStoragePool createStoragePool(String uuid, String host, int port, String path, String userInfo, StoragePoolType storagePoolType) { - iScsiAdmStoragePool storagePool = new iScsiAdmStoragePool(uuid, host, port, storagePoolType, this); + IscsiAdmStoragePool storagePool = new IscsiAdmStoragePool(uuid, host, port, storagePoolType, this); - _mapStorageUuidToStoragePool.put(uuid, storagePool); + MapStorageUuidToStoragePool.put(uuid, storagePool); return storagePool; } @Override public KVMStoragePool getStoragePool(String uuid) { - return _mapStorageUuidToStoragePool.get(uuid); + return MapStorageUuidToStoragePool.get(uuid); } @Override public boolean deleteStoragePool(String uuid) { - return _mapStorageUuidToStoragePool.remove(uuid) != null; + return MapStorageUuidToStoragePool.remove(uuid) != null; } @Override diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/iScsiAdmStoragePool.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/IscsiAdmStoragePool.java similarity index 97% rename from plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/iScsiAdmStoragePool.java rename to plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/IscsiAdmStoragePool.java index 380881503ea..2cecfa3892b 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/iScsiAdmStoragePool.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/IscsiAdmStoragePool.java @@ -23,7 +23,7 @@ import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat; import com.cloud.storage.Storage.StoragePoolType; -public class iScsiAdmStoragePool implements KVMStoragePool { +public class IscsiAdmStoragePool implements KVMStoragePool { private String _uuid; private String _sourceHost; private int _sourcePort; @@ -34,7 +34,7 @@ public class iScsiAdmStoragePool implements KVMStoragePool { private String _sourceDir; private String _localPath; - public iScsiAdmStoragePool(String uuid, String host, int port, StoragePoolType storagePoolType, StorageAdaptor storageAdaptor) { + public IscsiAdmStoragePool(String uuid, String host, int port, StoragePoolType storagePoolType, StorageAdaptor storageAdaptor) { _uuid = uuid; _sourceHost = host; _sourcePort = port; diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java index 08286e408cc..fefb29cad61 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStoragePoolManager.java @@ -94,7 +94,7 @@ public class KVMStoragePoolManager { this._storageMapper.put("libvirt", new LibvirtStorageAdaptor(storagelayer)); // add other storage adaptors here // this._storageMapper.put("newadaptor", new NewStorageAdaptor(storagelayer)); - this._storageMapper.put(StoragePoolType.Iscsi.toString(), new iScsiAdmStorageAdaptor()); + this._storageMapper.put(StoragePoolType.Iscsi.toString(), new IscsiAdmStorageAdaptor()); } public boolean connectPhysicalDisk(StoragePoolType type, String poolUuid, String volPath, Map details) { diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java index db7706c2fd2..fda4d1b051e 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/KVMStorageProcessor.java @@ -102,8 +102,8 @@ import com.cloud.utils.script.Script; public class KVMStorageProcessor implements StorageProcessor { private static final Logger s_logger = Logger.getLogger(KVMStorageProcessor.class); - private KVMStoragePoolManager storagePoolMgr; - private LibvirtComputingResource resource; + private final KVMStoragePoolManager storagePoolMgr; + private final LibvirtComputingResource resource; private StorageLayer storageLayer; private String _createTmplPath; private String _manageSnapshotPath; @@ -460,7 +460,7 @@ public class KVMStorageProcessor implements StorageProcessor { KVMPhysicalDisk disk = storagePoolMgr.getPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), volume.getPath()); String tmpltPath = secondaryStorage.getLocalPath() + File.separator + templateFolder; - this.storageLayer.mkdirs(tmpltPath); + storageLayer.mkdirs(tmpltPath); String templateName = UUID.randomUUID().toString(); if (primary.getType() != StoragePoolType.RBD) { @@ -512,14 +512,14 @@ public class KVMStorageProcessor implements StorageProcessor { } Map params = new HashMap(); - params.put(StorageLayer.InstanceConfigKey, this.storageLayer); + params.put(StorageLayer.InstanceConfigKey, storageLayer); Processor qcow2Processor = new QCOW2Processor(); qcow2Processor.configure("QCOW2 Processor", params); FormatInfo info = qcow2Processor.process(tmpltPath, null, templateName); - TemplateLocation loc = new TemplateLocation(this.storageLayer, tmpltPath); + TemplateLocation loc = new TemplateLocation(storageLayer, tmpltPath); loc.create(1, true, templateName); loc.addFormat(info); loc.save(); @@ -738,7 +738,7 @@ public class KVMStorageProcessor implements StorageProcessor { Domain vm = null; if (vmName != null) { try { - vm = this.resource.getDomain(conn, vmName); + vm = resource.getDomain(conn, vmName); state = vm.getInfo().state; } catch (LibvirtException e) { s_logger.trace("Ignoring libvirt error.", e); @@ -754,7 +754,7 @@ public class KVMStorageProcessor implements StorageProcessor { * libvirt on RHEL6 doesn't handle resume event emitted from * qemu */ - vm = this.resource.getDomain(conn, vmName); + vm = resource.getDomain(conn, vmName); state = vm.getInfo().state; if (state == DomainInfo.DomainState.VIR_DOMAIN_PAUSED) { vm.resume(); @@ -808,12 +808,12 @@ public class KVMStorageProcessor implements StorageProcessor { isoXml = iso.toString(); } - List disks = this.resource.getDisks(conn, vmName); + List disks = resource.getDisks(conn, vmName); String result = attachOrDetachDevice(conn, true, vmName, isoXml); if (result == null && !isAttach) { for (DiskDef disk : disks) { if (disk.getDeviceType() == DiskDef.deviceType.CDROM) { - this.resource.cleanupDisk(disk); + resource.cleanupDisk(disk); } } @@ -1027,7 +1027,7 @@ public class KVMStorageProcessor implements StorageProcessor { } } - protected static MessageFormat SnapshotXML = new MessageFormat(" " + " {0}" + " " + protected static final MessageFormat SnapshotXML = new MessageFormat(" " + " {0}" + " " + " {1}" + " " + " "); @Override @@ -1043,7 +1043,7 @@ public class KVMStorageProcessor implements StorageProcessor { Domain vm = null; if (vmName != null) { try { - vm = this.resource.getDomain(conn, vmName); + vm = resource.getDomain(conn, vmName); state = vm.getInfo().state; } catch (LibvirtException e) { s_logger.trace("Ignoring libvirt error.", e); @@ -1064,7 +1064,7 @@ public class KVMStorageProcessor implements StorageProcessor { * libvirt on RHEL6 doesn't handle resume event emitted from * qemu */ - vm = this.resource.getDomain(conn, vmName); + vm = resource.getDomain(conn, vmName); state = vm.getInfo().state; if (state == DomainInfo.DomainState.VIR_DOMAIN_PAUSED) { vm.resume(); @@ -1105,7 +1105,7 @@ public class KVMStorageProcessor implements StorageProcessor { } } else { /* VM is not running, create a snapshot by ourself */ - final Script command = new Script(_manageSnapshotPath, this._cmdsTimeout, s_logger); + final Script command = new Script(_manageSnapshotPath, _cmdsTimeout, s_logger); command.add("-c", disk.getPath()); command.add("-n", snapshotName); String result = command.execute(); diff --git a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java index 7e812dbea6d..7b1eade7c47 100644 --- a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java +++ b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java @@ -250,14 +250,14 @@ public class LibvirtComputingResourceTest { Mockito.when(domain.interfaceStats(Matchers.anyString())).thenAnswer(new Answer() { // increment with less than a KB, so this should be less than 1 KB final static int increment = 1000; - int rx_bytes = 1000; - int tx_bytes = 1000; + int rxBytes = 1000; + int txBytes = 1000; @Override public DomainInterfaceStats answer(InvocationOnMock invocation) throws Throwable { DomainInterfaceStats domainInterfaceStats = new DomainInterfaceStats(); - domainInterfaceStats.rx_bytes = (this.rx_bytes += increment); - domainInterfaceStats.tx_bytes = (this.tx_bytes += increment); + domainInterfaceStats.rx_bytes = (rxBytes += increment); + domainInterfaceStats.tx_bytes = (txBytes += increment); return domainInterfaceStats; } @@ -268,15 +268,15 @@ public class LibvirtComputingResourceTest { // a little less than a KB final static int increment = 1000; - int rd_bytes = 0; - int wr_bytes = 1024; + int rdBytes = 0; + int wrBytes = 1024; @Override public DomainBlockStats answer(InvocationOnMock invocation) throws Throwable { DomainBlockStats domainBlockStats = new DomainBlockStats(); - domainBlockStats.rd_bytes = (rd_bytes += increment); - domainBlockStats.wr_bytes = (wr_bytes += increment); + domainBlockStats.rd_bytes = (rdBytes += increment); + domainBlockStats.wr_bytes = (wrBytes += increment); return domainBlockStats; } diff --git a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVifDriverTest.java b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVifDriverTest.java index 0b7fb914853..5d135364688 100644 --- a/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVifDriverTest.java +++ b/plugins/hypervisors/kvm/test/com/cloud/hypervisor/kvm/resource/LibvirtVifDriverTest.java @@ -42,9 +42,9 @@ public class LibvirtVifDriverTest { private Map assertions; - final String LIBVIRT_VIF_DRIVER = "libvirt.vif.driver"; - final String FAKE_VIF_DRIVER_CLASS_NAME = "com.cloud.hypervisor.kvm.resource.FakeVifDriver"; - final String NONEXISTENT_VIF_DRIVER_CLASS_NAME = "com.cloud.hypervisor.kvm.resource.NonExistentVifDriver"; + final String LibVirtVifDriver = "libvirt.vif.driver"; + final String FakeVifDriverClassName = "com.cloud.hypervisor.kvm.resource.FakeVifDriver"; + final String NonExistentVifDriverClassName = "com.cloud.hypervisor.kvm.resource.NonExistentVifDriver"; private VifDriver fakeVifDriver, bridgeVifDriver, ovsVifDriver; @@ -64,7 +64,7 @@ public class LibvirtVifDriverTest { doReturn(bridgeVifDriver).when(res).getVifDriverClass(eq(LibvirtComputingResource.DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME), anyMap()); doReturn(ovsVifDriver).when(res).getVifDriverClass(eq(LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME), anyMap()); - doReturn(fakeVifDriver).when(res).getVifDriverClass(eq(FAKE_VIF_DRIVER_CLASS_NAME), anyMap()); + doReturn(fakeVifDriver).when(res).getVifDriverClass(eq(FakeVifDriverClassName), anyMap()); } catch (final ConfigurationException ex) { fail("Unexpected ConfigurationException while configuring VIF drivers: " + ex.getMessage()); @@ -120,13 +120,13 @@ public class LibvirtVifDriverTest { Map params = new HashMap(); // Switch res' bridge type for test purposes - params.put(LIBVIRT_VIF_DRIVER, LibvirtComputingResource.DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME); + params.put(LibVirtVifDriver, LibvirtComputingResource.DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME); res._bridgeType = BridgeType.NATIVE; configure(params); checkAllSame(bridgeVifDriver); params.clear(); - params.put(LIBVIRT_VIF_DRIVER, LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME); + params.put(LibVirtVifDriver, LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME); res._bridgeType = BridgeType.OPENVSWITCH; configure(params); checkAllSame(ovsVifDriver); @@ -139,13 +139,13 @@ public class LibvirtVifDriverTest { Map params = new HashMap(); // Switch res' bridge type for test purposes - params.put(LIBVIRT_VIF_DRIVER, LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME); + params.put(LibVirtVifDriver, LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME); res._bridgeType = BridgeType.NATIVE; configure(params); checkAllSame(ovsVifDriver); params.clear(); - params.put(LIBVIRT_VIF_DRIVER, LibvirtComputingResource.DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME); + params.put(LibVirtVifDriver, LibvirtComputingResource.DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME); res._bridgeType = BridgeType.OPENVSWITCH; configure(params); checkAllSame(bridgeVifDriver); @@ -155,8 +155,8 @@ public class LibvirtVifDriverTest { public void testOverrideSomeTrafficTypes() throws ConfigurationException { Map params = new HashMap(); - params.put(LIBVIRT_VIF_DRIVER + "." + "Public", FAKE_VIF_DRIVER_CLASS_NAME); - params.put(LIBVIRT_VIF_DRIVER + "." + "Guest", LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME); + params.put(LibVirtVifDriver + "." + "Public", FakeVifDriverClassName); + params.put(LibVirtVifDriver + "." + "Guest", LibvirtComputingResource.DEFAULT_OVS_VIF_DRIVER_CLASS_NAME); res._bridgeType = BridgeType.NATIVE; configure(params); @@ -174,7 +174,7 @@ public class LibvirtVifDriverTest { @Test public void testBadTrafficType() throws ConfigurationException { Map params = new HashMap(); - params.put(LIBVIRT_VIF_DRIVER + "." + "NonExistentTrafficType", FAKE_VIF_DRIVER_CLASS_NAME); + params.put(LibVirtVifDriver + "." + "NonExistentTrafficType", FakeVifDriverClassName); res._bridgeType = BridgeType.NATIVE; configure(params); @@ -189,7 +189,7 @@ public class LibvirtVifDriverTest { @Test public void testEmptyTrafficType() throws ConfigurationException { Map params = new HashMap(); - params.put(LIBVIRT_VIF_DRIVER + ".", FAKE_VIF_DRIVER_CLASS_NAME); + params.put(LibVirtVifDriver + ".", FakeVifDriverClassName); res._bridgeType = BridgeType.NATIVE; configure(params); @@ -204,7 +204,7 @@ public class LibvirtVifDriverTest { @Test(expected = ConfigurationException.class) public void testBadVifDriverClassName() throws ConfigurationException { Map params = new HashMap(); - params.put(LIBVIRT_VIF_DRIVER + "." + "Public", NONEXISTENT_VIF_DRIVER_CLASS_NAME); + params.put(LibVirtVifDriver + "." + "Public", NonExistentVifDriverClassName); res._bridgeType = BridgeType.NATIVE; configure(params); } diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java index 225ab0dc8ac..2eb07360fec 100755 --- a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java +++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmHelper.java @@ -19,47 +19,47 @@ package com.cloud.ovm.hypervisor; import java.util.HashMap; public class OvmHelper { - private static final HashMap _ovmMap = new HashMap(); + private static final HashMap s_ovmMap = new HashMap(); public static final String ORACLE_LINUX = "Oracle Linux"; public static final String ORACLE_SOLARIS = "Oracle Solaris"; public static final String WINDOWS = "Windows"; static { - _ovmMap.put("Oracle Enterprise Linux 6.0 (32-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 6.0 (64-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.0 (32-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.0 (64-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.1 (32-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.1 (64-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.2 (32-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.2 (64-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.3 (32-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.3 (64-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.4 (32-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.4 (64-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.5 (32-bit)", ORACLE_LINUX); - _ovmMap.put("Oracle Enterprise Linux 5.5 (64-bit)", ORACLE_LINUX); - _ovmMap.put("Windows 7 (32-bit)", WINDOWS); - _ovmMap.put("Windows 7 (64-bit)", WINDOWS); - _ovmMap.put("Windows Server 2003 (32-bit)", WINDOWS); - _ovmMap.put("Windows Server 2003 (64-bit)", WINDOWS); - _ovmMap.put("Windows Server 2008 (32-bit)", WINDOWS); - _ovmMap.put("Windows Server 2008 (64-bit)", WINDOWS); - _ovmMap.put("Windows Server 2008 R2 (64-bit)", WINDOWS); - _ovmMap.put("Windows 2000 SP4 (32-bit)", WINDOWS); - _ovmMap.put("Windows Vista (32-bit)", WINDOWS); - _ovmMap.put("Windows XP SP2 (32-bit)", WINDOWS); - _ovmMap.put("Windows XP SP3 (32-bit)", WINDOWS); - _ovmMap.put("Sun Solaris 10(32-bit)", ORACLE_SOLARIS); - _ovmMap.put("Sun Solaris 10(64-bit)", ORACLE_SOLARIS); - _ovmMap.put("Sun Solaris 9(Experimental)", ORACLE_SOLARIS); - _ovmMap.put("Sun Solaris 8(Experimental)", ORACLE_SOLARIS); - _ovmMap.put("Sun Solaris 11 (32-bit)", ORACLE_SOLARIS); - _ovmMap.put("Sun Solaris 11 (64-bit)", ORACLE_SOLARIS); + s_ovmMap.put("Oracle Enterprise Linux 6.0 (32-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 6.0 (64-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.0 (32-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.0 (64-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.1 (32-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.1 (64-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.2 (32-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.2 (64-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.3 (32-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.3 (64-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.4 (32-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.4 (64-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.5 (32-bit)", ORACLE_LINUX); + s_ovmMap.put("Oracle Enterprise Linux 5.5 (64-bit)", ORACLE_LINUX); + s_ovmMap.put("Windows 7 (32-bit)", WINDOWS); + s_ovmMap.put("Windows 7 (64-bit)", WINDOWS); + s_ovmMap.put("Windows Server 2003 (32-bit)", WINDOWS); + s_ovmMap.put("Windows Server 2003 (64-bit)", WINDOWS); + s_ovmMap.put("Windows Server 2008 (32-bit)", WINDOWS); + s_ovmMap.put("Windows Server 2008 (64-bit)", WINDOWS); + s_ovmMap.put("Windows Server 2008 R2 (64-bit)", WINDOWS); + s_ovmMap.put("Windows 2000 SP4 (32-bit)", WINDOWS); + s_ovmMap.put("Windows Vista (32-bit)", WINDOWS); + s_ovmMap.put("Windows XP SP2 (32-bit)", WINDOWS); + s_ovmMap.put("Windows XP SP3 (32-bit)", WINDOWS); + s_ovmMap.put("Sun Solaris 10(32-bit)", ORACLE_SOLARIS); + s_ovmMap.put("Sun Solaris 10(64-bit)", ORACLE_SOLARIS); + s_ovmMap.put("Sun Solaris 9(Experimental)", ORACLE_SOLARIS); + s_ovmMap.put("Sun Solaris 8(Experimental)", ORACLE_SOLARIS); + s_ovmMap.put("Sun Solaris 11 (32-bit)", ORACLE_SOLARIS); + s_ovmMap.put("Sun Solaris 11 (64-bit)", ORACLE_SOLARIS); } public static String getOvmGuestType(String stdType) { - return _ovmMap.get(stdType); + return s_ovmMap.get(stdType); } } diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java index ed25fa88526..238ac518a92 100755 --- a/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java +++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/hypervisor/OvmResourceBase.java @@ -153,30 +153,30 @@ public class OvmResourceBase implements ServerResource, HypervisorResource { String _publicNetworkName; String _guestNetworkName; boolean _canBridgeFirewall; - static boolean _isHeartBeat = false; + static boolean s_isHeartBeat = false; List _bridges = null; private final Map> _vmNetworkStats = new ConcurrentHashMap>(); - private static String _ovsAgentPath = "/opt/ovs-agent-latest"; + private static String s_ovsAgentPath = "/opt/ovs-agent-latest"; // TODO vmsync { - static HashMap _stateMaps; + static HashMap s_stateMaps; protected HashMap _vms = new HashMap(50); static { - _stateMaps = new HashMap(); - _stateMaps.put("RUNNING", State.Running); - _stateMaps.put("DOWN", State.Stopped); - _stateMaps.put("ERROR", State.Error); - _stateMaps.put("SUSPEND", State.Stopped); + s_stateMaps = new HashMap(); + s_stateMaps.put("RUNNING", State.Running); + s_stateMaps.put("DOWN", State.Stopped); + s_stateMaps.put("ERROR", State.Error); + s_stateMaps.put("SUSPEND", State.Stopped); } // TODO vmsync } - static HashMap _powerStateMaps; + static HashMap s_powerStateMaps; static { - _powerStateMaps = new HashMap(); - _powerStateMaps.put("RUNNING", PowerState.PowerOn); - _powerStateMaps.put("DOWN", PowerState.PowerOff); - _powerStateMaps.put("ERROR", PowerState.PowerUnknown); - _powerStateMaps.put("SUSPEND", PowerState.PowerOff); + s_powerStateMaps = new HashMap(); + s_powerStateMaps.put("RUNNING", PowerState.PowerOn); + s_powerStateMaps.put("DOWN", PowerState.PowerOff); + s_powerStateMaps.put("ERROR", PowerState.PowerUnknown); + s_powerStateMaps.put("SUSPEND", PowerState.PowerOff); } @Override @@ -259,7 +259,7 @@ public class OvmResourceBase implements ServerResource, HypervisorResource { } /* set to false so each time ModifyStoragePoolCommand will re-setup heartbeat*/ - _isHeartBeat = false; + s_isHeartBeat = false; /* try { @@ -369,9 +369,9 @@ public class OvmResourceBase implements ServerResource, HypervisorResource { } if (s_logger.isDebugEnabled()) { - s_logger.debug("Copying " + script.getPath() + " to " + _ovsAgentPath + " on " + _ip + " with permission 0644"); + s_logger.debug("Copying " + script.getPath() + " to " + s_ovsAgentPath + " on " + _ip + " with permission 0644"); } - scp.put(script.getPath(), _ovsAgentPath, "0644"); + scp.put(script.getPath(), s_ovsAgentPath, "0644"); } sshConnection = SSHCmdHelper.acquireAuthorizedConnection(_ip, _username, _password); @@ -409,7 +409,7 @@ public class OvmResourceBase implements ServerResource, HypervisorResource { try { OvmHost.ping(_conn); HashMap newStates = sync(); - return new PingRoutingCommand(getType(), id, newStates, this.getHostVmStateReport()); + return new PingRoutingCommand(getType(), id, newStates, getHostVmStateReport()); } catch (XmlRpcException e) { s_logger.debug("Check agent status failed", e); return null; @@ -454,13 +454,13 @@ public class OvmResourceBase implements ServerResource, HypervisorResource { private void setupHeartBeat(String poolUuid) { try { - if (!_isHeartBeat) { + if (!s_isHeartBeat) { OvmHost.setupHeartBeat(_conn, poolUuid, _ip); - _isHeartBeat = true; + s_isHeartBeat = true; } } catch (Exception e) { s_logger.debug("setup heart beat for " + _ip + " failed", e); - _isHeartBeat = false; + s_isHeartBeat = false; } } @@ -786,7 +786,7 @@ public class OvmResourceBase implements ServerResource, HypervisorResource { } private State toState(String vmName, String s) { - State state = _stateMaps.get(s); + State state = s_stateMaps.get(s); if (state == null) { s_logger.debug("Unkown state " + s + " for " + vmName); state = State.Unknown; @@ -795,7 +795,7 @@ public class OvmResourceBase implements ServerResource, HypervisorResource { } private PowerState toPowerState(String vmName, String s) { - PowerState state = _powerStateMaps.get(s); + PowerState state = s_powerStateMaps.get(s); if (state == null) { s_logger.debug("Unkown state " + s + " for " + vmName); state = PowerState.PowerUnknown; diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/Coder.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/Coder.java index 9af4016da4e..9bb42ac388e 100755 --- a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/Coder.java +++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/Coder.java @@ -32,10 +32,10 @@ import com.google.gson.JsonParseException; import com.google.gson.reflect.TypeToken; public class Coder { - private static Gson _gson; - private static Gson _mapGson; + private static Gson s_gson; + private static Gson s_mapGson; - public static Object[] EMPTY_PARAMS = new Object[0]; + public static Object[] s_emptyParams = new Object[0]; private static class MapDecoder implements JsonDeserializer> { @Override @@ -59,26 +59,26 @@ public class Coder { static { GsonBuilder _builder = new GsonBuilder(); _builder.registerTypeAdapter(Map.class, new MapDecoder()); - _mapGson = _builder.create(); - _gson = new Gson(); + s_mapGson = _builder.create(); + s_gson = new Gson(); } public static String toJson(Object obj) { - return _gson.toJson(obj); + return s_gson.toJson(obj); } public static T fromJson(String str, Class clz) { - return _gson.fromJson(str, clz); + return s_gson.fromJson(str, clz); } @SuppressWarnings("unchecked") public static Map mapFromJson(String str) { - return _mapGson.fromJson(str, Map.class); + return s_mapGson.fromJson(str, Map.class); } public static List listFromJson(String str) { Type listType = new TypeToken>() { }.getType(); - return _gson.fromJson(str, listType); + return s_gson.fromJson(str, listType); } } diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmBridge.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmBridge.java index 19bbd854872..6d2867ea46e 100755 --- a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmBridge.java +++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmBridge.java @@ -42,7 +42,7 @@ public class OvmBridge extends OvmObject { } public static List getAllBridges(Connection c) throws XmlRpcException { - String res = (String)c.call("OvmNetwork.getAllBridges", Coder.EMPTY_PARAMS); + String res = (String)c.call("OvmNetwork.getAllBridges", Coder.s_emptyParams); return Coder.listFromJson(res); } diff --git a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmHost.java b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmHost.java index 32eab09e43e..ad1b2f6f2b7 100755 --- a/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmHost.java +++ b/plugins/hypervisors/ovm/src/com/cloud/ovm/object/OvmHost.java @@ -53,7 +53,7 @@ public class OvmHost extends OvmObject { } public static Details getDetails(Connection c) throws XmlRpcException { - String res = (String)c.call("OvmHost.getDetails", Coder.EMPTY_PARAMS); + String res = (String)c.call("OvmHost.getDetails", Coder.s_emptyParams); return Coder.fromJson(res, OvmHost.Details.class); } @@ -69,7 +69,7 @@ public class OvmHost extends OvmObject { } public static Map getAllVms(Connection c) throws XmlRpcException { - String res = (String)c.call("OvmHost.getAllVms", Coder.EMPTY_PARAMS); + String res = (String)c.call("OvmHost.getAllVms", Coder.s_emptyParams); return Coder.mapFromJson(res); } diff --git a/plugins/hypervisors/simulator/src/com/cloud/resource/AgentResourceBase.java b/plugins/hypervisors/simulator/src/com/cloud/resource/AgentResourceBase.java index dbfbba05d86..3cc91155b80 100644 --- a/plugins/hypervisors/simulator/src/com/cloud/resource/AgentResourceBase.java +++ b/plugins/hypervisors/simulator/src/com/cloud/resource/AgentResourceBase.java @@ -258,8 +258,8 @@ public class AgentResourceBase implements ServerResource { return _type; } - public void setType(Host.Type _type) { - this._type = _type; + public void setType(Host.Type type) { + this._type = type; } @Override diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java index f9da9de5639..b326c54d69b 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/guru/VMwareGuru.java @@ -96,7 +96,7 @@ import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.VmDetailConstants; import com.cloud.vm.dao.NicDao; -@Local(value=HypervisorGuru.class) +@Local(value = HypervisorGuru.class) public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Configurable { private static final Logger s_logger = Logger.getLogger(VMwareGuru.class); @@ -128,17 +128,20 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co VMInstanceDao _vmDao; @Inject ClusterDao _clusterDao; - @Inject ClusterManager _clusterMgr; + @Inject + ClusterManager _clusterMgr; protected VMwareGuru() { super(); } static final ConfigKey VmwareReserveCpu = new ConfigKey(Boolean.class, "vmware.reserve.cpu", "Advanced", "false", - "Specify whether or not to reserve CPU when not overprovisioning, In case of cpu overprovisioning we will always reserve cpu.", true, ConfigKey.Scope.Cluster, null); + "Specify whether or not to reserve CPU when not overprovisioning, In case of cpu overprovisioning we will always reserve cpu.", true, ConfigKey.Scope.Cluster, + null); static final ConfigKey VmwareReserveMemory = new ConfigKey(Boolean.class, "vmware.reserve.cpu", "Advanced", "false", - "Specify whether or not to reserve memory when not overprovisioning, In case of memory overprovisioning we will always reserve memory.", true, ConfigKey.Scope.Cluster, null); + "Specify whether or not to reserve memory when not overprovisioning, In case of memory overprovisioning we will always reserve memory.", true, + ConfigKey.Scope.Cluster, null); @Override public HypervisorType getHypervisorType() { @@ -200,7 +203,7 @@ public class VMwareGuru extends HypervisorGuruBase implements HypervisorGuru, Co break; } } - long clusterId = _hostDao.findById( _vmDao.findById(vm.getId()).getHostId()).getClusterId(); + long clusterId = _hostDao.findById(_vmDao.findById(vm.getId()).getHostId()).getClusterId(); details.put(Config.VmwareReserveCpu.key(), VmwareReserveCpu.valueIn(clusterId).toString()); details.put(Config.VmwareReserveMem.key(), VmwareReserveMemory.valueIn(clusterId).toString()); to.setDetails(details); diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java index e63999c15aa..96f411e9559 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java @@ -904,7 +904,7 @@ public class VmwareManagerImpl extends ManagerBase implements VmwareManager, Vmw } } - protected final int DEFAULT_DOMR_SSHPORT = 3922; + protected final static int DEFAULT_DOMR_SSHPORT = 3922; protected boolean shutdownRouterVM(DomainRouterVO router) { if (s_logger.isDebugEnabled()) { diff --git a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java index 71894a86e97..ade46d2876a 100755 --- a/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java +++ b/plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java @@ -45,9 +45,6 @@ import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.naming.ConfigurationException; -import com.cloud.configuration.Config; -import com.cloud.agent.api.routing.*; - import org.apache.log4j.Logger; import org.apache.log4j.NDC; @@ -264,6 +261,7 @@ import com.cloud.agent.api.to.StaticNatRuleTO; import com.cloud.agent.api.to.StorageFilerTO; import com.cloud.agent.api.to.VirtualMachineTO; import com.cloud.agent.api.to.VolumeTO; +import com.cloud.configuration.Config; import com.cloud.dc.DataCenter.NetworkType; import com.cloud.dc.Vlan; import com.cloud.exception.InternalErrorException; @@ -337,9 +335,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa protected String _name; - protected final long _ops_timeout = 900000; // 15 minutes time out to time + protected final long _opsTimeout = 900000; // 15 minutes time out to time - protected final int _shutdown_waitMs = 300000; // wait up to 5 minutes for shutdown + protected final int _shutdownWaitMs = 300000; // wait up to 5 minutes for shutdown @Inject protected VolumeOrchestrationService volMgr; @@ -347,8 +345,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa // out an operation protected final int _retry = 24; protected final int _sleep = 10000; - protected final int DEFAULT_DOMR_SSHPORT = 3922; - protected final int MAX_CMD_MBEAN = 100; + protected final int DefaultDomRSshPort = 3922; + protected final int MazCmdMBean = 100; protected String _url; protected String _dcId; @@ -365,8 +363,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa protected int _portsPerDvPortGroup; protected boolean _fullCloneFlag = false; protected boolean _instanceNameFlag = false; - protected boolean _reserveCpu; - protected boolean _reserveMem; + protected boolean _reserveCpu; + protected boolean _reserveMem; protected boolean _recycleHungWorker = false; protected DiskControllerType _rootDiskController = DiskControllerType.ide; @@ -602,7 +600,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa JmxUtil.registerMBean("VMware " + _morHyperHost.getValue(), "Command " + cmdSequence + "-" + cmd.getClass().getSimpleName(), mbean); _cmdMBeans.add(mbean); - if (_cmdMBeans.size() >= MAX_CMD_MBEAN) { + if (_cmdMBeans.size() >= MazCmdMBean) { PropertyMapDynamicBean mbeanToRemove = _cmdMBeans.get(0); _cmdMBeans.remove(0); @@ -725,7 +723,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); Pair result = - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_staticroute.sh " + args); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_staticroute.sh " + args); if (s_logger.isDebugEnabled()) s_logger.debug("Executing script on domain router " + controlIp + ": /opt/cloud/bin/vpc_staticroute.sh " + args); @@ -774,7 +772,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); Pair resultPair = - SshHelper.sshExecute(privateIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_netusage.sh " + args); + SshHelper.sshExecute(privateIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_netusage.sh " + args); if (!resultPair.first()) { throw new Exception(" vpc network usage plugin call failed "); @@ -821,7 +819,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); Pair result = - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/monitor_service.sh " + args); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/monitor_service.sh " + args); if (!result.first()) { String msg = "monitor_service.sh failed on domain router " + controlIp + " failed " + result.second(); @@ -858,7 +856,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); - Pair result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall.sh " + args); + Pair result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall.sh " + args); if (s_logger.isDebugEnabled()) s_logger.debug("Executing script on domain router " + controlIp + ": /root/firewall.sh " + args); @@ -916,9 +914,9 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa Pair result = null; if (trafficType == FirewallRule.TrafficType.Egress) { - result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/firewallRule_egress.sh " + args); + result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/firewallRule_egress.sh " + args); } else { - result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall_rule.sh " + args); + result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall_rule.sh " + args); } if (s_logger.isDebugEnabled()) { @@ -971,7 +969,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa // Invoke command on VPC VR. try { Pair result = - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_staticnat.sh " + args); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_staticnat.sh " + args); if (s_logger.isDebugEnabled()) s_logger.debug("Executing script on domain router " + controlIp + ": /opt/cloud/bin/vpc_staticnat.sh " + args); @@ -1023,7 +1021,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); String controlIp = getRouterSshControlIp(cmd); - Pair result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall.sh " + args); + Pair result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/firewall.sh " + args); if (s_logger.isDebugEnabled()) s_logger.debug("Executing script on domain router " + controlIp + ": /root/firewall.sh " + args); @@ -1064,7 +1062,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa } try { - SshHelper.scpTo(controlIp, DEFAULT_DOMR_SSHPORT, "root", keyFile, null, "/etc/haproxy/", tmpCfgFileContents.getBytes(), "haproxy.cfg.new", null); + SshHelper.scpTo(controlIp, DefaultDomRSshPort, "root", keyFile, null, "/etc/haproxy/", tmpCfgFileContents.getBytes(), "haproxy.cfg.new", null); try { String[][] rules = cfgtr.generateFwRules(cmd); @@ -1105,7 +1103,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa // Invoke the command Pair result = - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_loadbalancer.sh " + args); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_loadbalancer.sh " + args); if (!result.first()) { String msg = "LoadBalancerConfigCommand on domain router " + routerIp + " failed. message: " + result.second(); @@ -1118,7 +1116,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa s_logger.info("VPCLoadBalancerConfigCommand on domain router " + routerIp + " completed"); } } finally { - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "rm " + tmpCfgFilePath); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "rm " + tmpCfgFilePath); } return new Answer(cmd); } catch (Throwable e) { @@ -1153,7 +1151,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa } try { - SshHelper.scpTo(controlIp, DEFAULT_DOMR_SSHPORT, "root", keyFile, null, "/tmp/", tmpCfgFileContents.getBytes(), routerIp.replace('.', '_') + ".cfg", null); + SshHelper.scpTo(controlIp, DefaultDomRSshPort, "root", keyFile, null, "/tmp/", tmpCfgFileContents.getBytes(), routerIp.replace('.', '_') + ".cfg", null); try { String[] addRules = rules[LoadBalancerConfigurator.ADD]; @@ -1192,7 +1190,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa } Pair result = - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "scp " + tmpCfgFilePath + + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "scp " + tmpCfgFilePath + " /etc/haproxy/haproxy.cfg.new"); if (!result.first()) { @@ -1204,7 +1202,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa s_logger.debug("Run command on domain router " + routerIp + ", /root/loadbalancer.sh " + args); } - result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/loadbalancer.sh " + args); + result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/loadbalancer.sh " + args); if (!result.first()) { String msg = "LoadBalancerConfigCommand on domain router " + routerIp + " failed. message: " + result.second(); @@ -1217,7 +1215,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa s_logger.info("LoadBalancerConfigCommand on domain router " + routerIp + " completed"); } } finally { - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "rm " + tmpCfgFilePath); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "rm " + tmpCfgFilePath); } return new Answer(cmd); @@ -1234,7 +1232,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa private int allocRouterEthDeviceIndex(String domrName, String routerIp) throws Exception { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); - Pair result = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "ls /proc/sys/net/ipv4/conf"); + Pair result = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "ls /proc/sys/net/ipv4/conf"); if (result.first()) { String[] tokens = result.second().split("\\s+"); @@ -1275,7 +1273,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa s_logger.info("findRouterEthDeviceIndex. mac: " + mac); // TODO : this is a temporary very inefficient solution, will refactor it later - Pair result = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "ls /proc/sys/net/ipv4/conf"); + Pair result = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "ls /proc/sys/net/ipv4/conf"); // when we dynamically plug in a new NIC into virtual router, it may take time to show up in guest OS // we use a waiting loop here as a workaround to synchronize activities in systems @@ -1289,7 +1287,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa if (s_logger.isDebugEnabled()) s_logger.debug("Run domr script " + cmd); - Pair result2 = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, + Pair result2 = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, // TODO need to find the dev index inside router based on IP address cmd); if (s_logger.isDebugEnabled()) @@ -1368,7 +1366,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa } Pair result = - SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_guestnw.sh " + args); + SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_guestnw.sh " + args); if (!result.first()) { String msg = "SetupGuestNetworkCommand on domain router " + routerIp + " failed. message: " + result.second(); @@ -1435,7 +1433,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa args += "eth" + ethDeviceNum; Pair result = - SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_snat.sh " + args); + SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_snat.sh " + args); if (!result.first()) { String msg = "SetupGuestNetworkCommand on domain router " + routerIp + " failed. message: " + result.second(); @@ -1484,7 +1482,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa s_logger.debug("Private gateway configuration is set"); args += " -d " + "eth" + ethDeviceNum; args += " -a " + sb.toString(); - result = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_privategw_acl.sh " + args); + result = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_privategw_acl.sh " + args); if (!result.first()) { String msg = "SetNetworkACLAnswer on domain router " + routerIp + " failed. message: " + result.second(); @@ -1498,7 +1496,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa args += " -m " + Long.toString(NetUtils.getCidrSize(nic.getNetmask())); args += " -a " + sb.toString(); - result = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_acl.sh " + args); + result = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_acl.sh " + args); if (!result.first()) { String msg = "SetNetworkACLAnswer on domain router " + routerIp + " failed. message: " + result.second(); @@ -1540,7 +1538,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { Pair sshResult = - SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_portforwarding.sh " + args); + SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_portforwarding.sh " + args); if (!sshResult.first()) { results[i++] = "Failed"; @@ -1609,7 +1607,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa Pair result; try { - result = SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/ipsectunnel.sh " + args); + result = SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/ipsectunnel.sh " + args); if (!result.first()) { s_logger.error("Setup site2site VPN " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " + result.second()); @@ -1809,7 +1807,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa args += NetUtils.getSubNet(ip.getPublicIp(), ip.getVlanNetmask()); Pair result = - SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_ipassoc.sh " + args); + SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_ipassoc.sh " + args); if (!result.first()) { throw new InternalErrorException("Unable to assign public IP address"); @@ -1822,7 +1820,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa snatArgs += "eth" + ethDeviceNum; Pair result_gateway = - SshHelper.sshExecute(routerIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_privateGateway.sh " + snatArgs); + SshHelper.sshExecute(routerIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpc_privateGateway.sh " + snatArgs); if (!result_gateway.first()) { throw new InternalErrorException("Unable to configure source NAT for public IP address."); @@ -1914,7 +1912,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); Pair result = - SshHelper.sshExecute(privateIpAddress, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/ipassoc.sh " + args); + SshHelper.sshExecute(privateIpAddress, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/ipassoc.sh " + args); if (!result.first()) { s_logger.error("ipassoc command on domain router " + privateIpAddress + " failed. message: " + result.second()); @@ -1958,12 +1956,12 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa synchronized (vmMo.getRunningHost().getMor().getValue().intern()) { networkInfo = HypervisorHostHelper.prepareNetwork(_publicTrafficInfo.getVirtualSwitchName(), "cloud.public", vmMo.getRunningHost(), vlanId, null, null, - _ops_timeout, true, BroadcastDomainType.Vlan, null); + _opsTimeout, true, BroadcastDomainType.Vlan, null); } } else { networkInfo = HypervisorHostHelper.prepareNetwork(_publicTrafficInfo.getVirtualSwitchName(), "cloud.public", vmMo.getRunningHost(), vlanId, null, null, null, - _ops_timeout, vSwitchType, _portsPerDvPortGroup, null, false, BroadcastDomainType.Vlan); + _opsTimeout, vSwitchType, _portsPerDvPortGroup, null, false, BroadcastDomainType.Vlan); } int nicIndex = allocPublicNicIndex(vmMo); @@ -2099,7 +2097,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); Pair result = - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/savepassword.sh " + args); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/savepassword.sh " + args); if (!result.first()) { s_logger.error("savepassword command on domain router " + controlIp + " failed, message: " + result.second()); @@ -2160,7 +2158,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); String controlIp = getRouterSshControlIp(cmd); - Pair result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/edithosts.sh " + args); + Pair result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/edithosts.sh " + args); if (!result.first()) { s_logger.error("dhcp_entry command on domR " + controlIp + " failed, message: " + result.second()); @@ -2199,7 +2197,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); String controlIp = getRouterSshControlIp(cmd); Pair result = - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/createIpAlias.sh " + args); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/createIpAlias.sh " + args); if (!result.first()) { s_logger.error("CreateIpAlias command on domr " + controlIp + " failed, message: " + result.second()); @@ -2243,7 +2241,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); String controlIp = getRouterSshControlIp(cmd); Pair result = - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/deleteIpAlias.sh " + args); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/deleteIpAlias.sh " + args); if (!result.first()) { s_logger.error("deleteIpAlias command on domr " + controlIp + " failed, message: " + result.second()); @@ -2282,7 +2280,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa File keyFile = mgr.getSystemVMKeyFile(); try { - Pair result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/dnsmasq.sh " + args); + Pair result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/dnsmasq.sh " + args); if (s_logger.isDebugEnabled()) { s_logger.debug("Run command on domain router " + routerIp + ", /root/dnsmasq.sh"); } @@ -2319,7 +2317,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa cmdline += " " + ip; } - result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, cmdline); + result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, cmdline); if (!result.first()) { s_logger.error("check site-to-site vpn connections command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " + @@ -2349,7 +2347,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); String controlIp = getRouterSshControlIp(cmd); - result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/checkrouter.sh "); + result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/checkrouter.sh "); if (!result.first()) { s_logger.error("check router command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " + result.second()); @@ -2378,7 +2376,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); String controlIp = getRouterSshControlIp(cmd); - result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/get_template_version.sh "); + result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/get_template_version.sh "); if (!result.first()) { s_logger.error("GetDomRVersionCmd on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " + result.second()); @@ -2411,7 +2409,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); String controlIp = getRouterSshControlIp(cmd); - result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/bumpup_priority.sh "); + result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/bumpup_priority.sh "); if (!result.first()) { s_logger.error("BumpUpPriority command on domR " + cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP) + " failed, message: " + result.second()); @@ -2468,11 +2466,11 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); - SshHelper.scpTo(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/tmp", content.getBytes(), tmpFileName, null); + SshHelper.scpTo(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/tmp", content.getBytes(), tmpFileName, null); try { Pair result = - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/root/userdata.py " + tmpFileName); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/root/userdata.py " + tmpFileName); if (!result.first()) { s_logger.error("vm_data command on domain router " + controlIp + " failed. messge: " + result.second()); @@ -2480,7 +2478,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa } } finally { - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "rm /tmp/" + tmpFileName); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "rm /tmp/" + tmpFileName); } if (s_logger.isInfoEnabled()) { @@ -2669,7 +2667,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa if (vmMo != null) { s_logger.info("VM " + vmInternalCSName + " already exists, tear down devices for reconfiguration"); if (getVmPowerState(vmMo) != PowerState.PowerOff) - vmMo.safePowerOff(_shutdown_waitMs); + vmMo.safePowerOff(_shutdownWaitMs); // retrieve disk information before we tear down diskInfoBuilder = vmMo.getDiskInfoBuilder(); @@ -2692,7 +2690,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa takeVmFromOtherHyperHost(hyperHost, vmInternalCSName); if (getVmPowerState(vmMo) != PowerState.PowerOff) - vmMo.safePowerOff(_shutdown_waitMs); + vmMo.safePowerOff(_shutdownWaitMs); diskInfoBuilder = vmMo.getDiskInfoBuilder(); hasSnapshot = vmMo.hasSnapshot(); @@ -2719,8 +2717,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa } if (!hyperHost.createBlankVm(vmNameOnVcenter, vmInternalCSName, vmSpec.getCpus(), vmSpec.getMaxSpeed().intValue(), - getReservedCpuMHZ(vmSpec), vmSpec.getLimitCpuUse(),(int)(vmSpec.getMaxRam()/(1024*1024)), getReservedMemoryMb(vmSpec), - translateGuestOsIdentifier(vmSpec.getArch(), vmSpec.getOs()).value(), rootDiskDataStoreDetails.first(), false)) { + getReservedCpuMHZ(vmSpec), vmSpec.getLimitCpuUse(), (int)(vmSpec.getMaxRam() / (1024 * 1024)), getReservedMemoryMb(vmSpec), + translateGuestOsIdentifier(vmSpec.getArch(), vmSpec.getOs()).value(), rootDiskDataStoreDetails.first(), false)) { throw new Exception("Failed to create VM. vmName: " + vmInternalCSName); } } @@ -2747,8 +2745,8 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa String guestOsId = translateGuestOsIdentifier(vmSpec.getArch(), vmSpec.getOs()).value(); VmwareHelper.setBasicVmConfig(vmConfigSpec, vmSpec.getCpus(), vmSpec.getMaxSpeed(), - getReservedCpuMHZ(vmSpec),(int) (vmSpec.getMaxRam()/(1024*1024)), getReservedMemoryMb(vmSpec), - guestOsId, vmSpec.getLimitCpuUse()); + getReservedCpuMHZ(vmSpec), (int)(vmSpec.getMaxRam() / (1024 * 1024)), getReservedMemoryMb(vmSpec), + guestOsId, vmSpec.getLimitCpuUse()); // Check for hotadd settings vmConfigSpec.setMemoryHotAddEnabled(vmMo.isMemoryHotAddSupported(guestOsId)); @@ -3006,22 +3004,23 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa int getReservedMemoryMb(VirtualMachineTO vmSpec) { if (vmSpec.getDetails().get(Config.VmwareReserveMem.key()).equalsIgnoreCase("true")) { - return (int) (vmSpec.getMinRam() / (1024 * 1024)); - } else if (vmSpec.getMinRam() != vmSpec.getMaxRam()) { - s_logger.warn("memory overprovisioning factor is set to "+ (vmSpec.getMaxRam()/vmSpec.getMinRam())+" ignoring the flag vmware.reserve.mem"); - return (int) (vmSpec.getMinRam() / (1024 * 1024)); + return (int)(vmSpec.getMinRam() / (1024 * 1024)); + } else if (vmSpec.getMinRam() != vmSpec.getMaxRam()) { + s_logger.warn("memory overprovisioning factor is set to " + (vmSpec.getMaxRam() / vmSpec.getMinRam()) + " ignoring the flag vmware.reserve.mem"); + return (int)(vmSpec.getMinRam() / (1024 * 1024)); } return 0; } int getReservedCpuMHZ(VirtualMachineTO vmSpec) { - if (vmSpec.getDetails().get(Config.VmwareReserveCpu.key()).equalsIgnoreCase("true")) { - return vmSpec.getMinSpeed(); - }else if (vmSpec.getMinSpeed().intValue() != vmSpec.getMaxSpeed().intValue()) { - s_logger.warn("cpu overprovisioning factor is set to "+ (vmSpec.getMaxSpeed().intValue()/vmSpec.getMinSpeed().intValue())+" ignoring the flag vmware.reserve.cpu"); - return vmSpec.getMinSpeed(); - } - return 0; + if (vmSpec.getDetails().get(Config.VmwareReserveCpu.key()).equalsIgnoreCase("true")) { + return vmSpec.getMinSpeed(); + } else if (vmSpec.getMinSpeed().intValue() != vmSpec.getMaxSpeed().intValue()) { + s_logger.warn("cpu overprovisioning factor is set to " + (vmSpec.getMaxSpeed().intValue() / vmSpec.getMinSpeed().intValue()) + + " ignoring the flag vmware.reserve.cpu"); + return vmSpec.getMinSpeed(); + } + return 0; } // return the finalized disk chain for startup, from top to bottom @@ -3562,7 +3561,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa synchronized (hostMo.getMor().getValue().intern()) { networkInfo = HypervisorHostHelper.prepareNetwork(switchName.first(), namePrefix, hostMo, getVlanInfo(nicTo, switchName.second()), nicTo.getNetworkRateMbps(), - nicTo.getNetworkRateMulticastMbps(), _ops_timeout, !namePrefix.startsWith("cloud.private"), nicTo.getBroadcastType(), nicTo.getUuid()); + nicTo.getNetworkRateMulticastMbps(), _opsTimeout, !namePrefix.startsWith("cloud.private"), nicTo.getBroadcastType(), nicTo.getUuid()); } } else { String vlanId = getVlanInfo(nicTo, switchName.second()); @@ -3577,7 +3576,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa } networkInfo = HypervisorHostHelper.prepareNetwork(switchName.first(), namePrefix, hostMo, vlanId, svlanId, nicTo.getNetworkRateMbps(), - nicTo.getNetworkRateMulticastMbps(), _ops_timeout, switchType, _portsPerDvPortGroup, nicTo.getGateway(), configureVServiceInNexus, + nicTo.getNetworkRateMulticastMbps(), _opsTimeout, switchType, _portsPerDvPortGroup, nicTo.getGateway(), configureVServiceInNexus, nicTo.getBroadcastType()); } @@ -3663,7 +3662,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa } Pair result = - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpn_l2tp.sh " + argsBuf.toString()); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpn_l2tp.sh " + argsBuf.toString()); if (!result.first()) { s_logger.error("RemoteAccessVpnCfg command on domR failed, message: " + result.second()); @@ -3708,7 +3707,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa } Pair result = - SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpn_l2tp.sh " + argsBuf.toString()); + SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/vpn_l2tp.sh " + argsBuf.toString()); if (!result.first()) { s_logger.error("VpnUserCfg command on domR failed, message: " + result.second()); @@ -3920,7 +3919,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa vmMo.setCustomFieldValue(CustomFieldConstants.CLOUD_NIC_MASK, "0"); if (getVmPowerState(vmMo) != PowerState.PowerOff) { - if (vmMo.safePowerOff(_shutdown_waitMs)) { + if (vmMo.safePowerOff(_shutdownWaitMs)) { state = State.Stopped; return new StopAnswer(cmd, "Stop VM " + cmd.getVmName() + " Succeed", true); } else { @@ -5311,7 +5310,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa String args = " -c 1 -n -q " + cmd.getPrivateIp(); try { VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); - Pair result = SshHelper.sshExecute(controlIp, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/bin/ping" + args); + Pair result = SshHelper.sshExecute(controlIp, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/bin/ping" + args); if (result.first()) return new Answer(cmd); } catch (Exception e) { @@ -5516,7 +5515,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa // tear down all devices first before we destroy the VM to avoid accidently delete disk backing files if (getVmPowerState(vmMo) != PowerState.PowerOff) - vmMo.safePowerOff(_shutdown_waitMs); + vmMo.safePowerOff(_shutdownWaitMs); vmMo.tearDownDevices(new Class[] { /* VirtualDisk.class, */VirtualEthernetCard.class}); vmMo.destroy(); @@ -6583,7 +6582,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa VmwareManager mgr = getServiceContext().getStockObject(VmwareManager.CONTEXT_STOCK_NAME); Pair result = - SshHelper.sshExecute(privateIpAddress, DEFAULT_DOMR_SSHPORT, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/netusage.sh " + args); + SshHelper.sshExecute(privateIpAddress, DefaultDomRSshPort, "root", mgr.getSystemVMKeyFile(), null, "/opt/cloud/bin/netusage.sh " + args); if (!result.first()) { return null; @@ -6624,7 +6623,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa // at least have tried _retry times, this is to coordinate with system // VM patching/rebooting time that may need int retry = _retry; - while (System.currentTimeMillis() - startTick <= _ops_timeout || --retry > 0) { + while (System.currentTimeMillis() - startTick <= _opsTimeout || --retry > 0) { SocketChannel sch = null; try { s_logger.info("Trying to connect to " + ipAddress); @@ -6838,7 +6837,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa int timeout = NumbersUtil.parseInt(value, 1440) * 1000; VmwareManager mgr = context.getStockObject(VmwareManager.CONTEXT_STOCK_NAME); VmwareStorageProcessor storageProcessor = - new VmwareStorageProcessor((VmwareHostService)this, _fullCloneFlag, (VmwareStorageMount)mgr, timeout, this, _shutdown_waitMs, null); + new VmwareStorageProcessor((VmwareHostService)this, _fullCloneFlag, (VmwareStorageMount)mgr, timeout, this, _shutdownWaitMs, null); storageHandler = new VmwareStorageSubsystemCommandHandler(storageProcessor); return true; diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java index 747d5d6925e..7c3e73a0a85 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java +++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java @@ -92,7 +92,7 @@ public class VmwareStorageProcessor implements StorageProcessor { private VmwareStorageMount mountService; private VmwareResource resource; private Integer _timeout; - protected Integer _shutdown_waitMs; + protected Integer _shutdownWaitMs; private final Gson _gson; private final StorageLayer _storage = new JavaStorageLayer(); @@ -103,7 +103,7 @@ public class VmwareStorageProcessor implements StorageProcessor { this.mountService = mountService; _timeout = timeout; this.resource = resource; - _shutdown_waitMs = shutdownWaitMs; + _shutdownWaitMs = shutdownWaitMs; _gson = GsonHelper.getGsonLogger(); } @@ -1455,7 +1455,7 @@ public class VmwareStorageProcessor implements StorageProcessor { // tear down all devices first before we destroy the VM to avoid accidently delete disk backing files if (VmwareResource.getVmState(vmMo) != State.Stopped) { - vmMo.safePowerOff(_shutdown_waitMs); + vmMo.safePowerOff(_shutdownWaitMs); } // call this before calling detachAllDisksExcept diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java index 705aa4cd14b..ecdb82148ff 100755 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/discoverer/XcpServerDiscoverer.java @@ -748,10 +748,10 @@ public class XcpServerDiscoverer extends DiscovererBase implements Discoverer, L } @Override - protected HashMap buildConfigParams(HostVO host){ + protected HashMap buildConfigParams(HostVO host) { HashMap params = super.buildConfigParams(host); DataCenterVO zone = _dcDao.findById(host.getDataCenterId()); - if ( zone != null ) { + if (zone != null) { boolean securityGroupEnabled = zone.isSecurityGroupEnabled(); params.put("securitygroupenabled", Boolean.toString(securityGroupEnabled)); } diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java index 605a0606d7e..2524bc31635 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixHelper.java @@ -27,469 +27,469 @@ import org.apache.log4j.Logger; */ public class CitrixHelper { private static final Logger s_logger = Logger.getLogger(CitrixHelper.class); - private static final HashMap _xcp100GuestOsMap = new HashMap(70); - private static final HashMap _xcp160GuestOsMap = new HashMap(70); - private static final HashMap _xenServerGuestOsMap = new HashMap(70); - private static final HashMap _xenServer56FP1GuestOsMap = new HashMap(70); - private static final HashMap _xenServer56FP2GuestOsMap = new HashMap(70); - private static final HashMap _xenServer600GuestOsMap = new HashMap(70); - private static final HashMap _xenServer602GuestOsMap = new HashMap(70); - private static final HashMap _xenServer610GuestOsMap = new HashMap(70); - private static final HashMap _xenServer620GuestOsMap = new HashMap(70); - private static final HashMap _xenServer620GuestOsMemoryMap = new HashMap(70); - private static final HashMap _xenServer610GuestOsMemoryMap = new HashMap(70); - private static final HashMap _xenServer602GuestOsMemoryMap = new HashMap(70); - private static final HashMap _xenServer600GuestOsMemoryMap = new HashMap(70); - private static final HashMap _xenServer56SP2GuestOsMemoryMap = new HashMap(70); - private static final HashMap _xenServer56FP1GuestOsMemoryMap = new HashMap(70); - private static final ArrayList _guestOsList = new ArrayList(70); + private static final HashMap Xcp100GuestOsMap = new HashMap(70); + private static final HashMap Xcp160GuestOsMap = new HashMap(70); + private static final HashMap XenServerGuestOsMap = new HashMap(70); + private static final HashMap XenServer56FP1GuestOsMap = new HashMap(70); + private static final HashMap XenServer56FP2GuestOsMap = new HashMap(70); + private static final HashMap XenServer600GuestOsMap = new HashMap(70); + private static final HashMap XenServer602GuestOsMap = new HashMap(70); + private static final HashMap XenServer610GuestOsMap = new HashMap(70); + private static final HashMap XenServer620GuestOsMap = new HashMap(70); + private static final HashMap XenServer620GuestOsMemoryMap = new HashMap(70); + private static final HashMap XenServer610GuestOsMemoryMap = new HashMap(70); + private static final HashMap XenServer602GuestOsMemoryMap = new HashMap(70); + private static final HashMap XenServer600GuestOsMemoryMap = new HashMap(70); + private static final HashMap XenServer56SP2GuestOsMemoryMap = new HashMap(70); + private static final HashMap XenServer56FP1GuestOsMemoryMap = new HashMap(70); + private static final ArrayList GuestOsList = new ArrayList(70); static { - _xcp100GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); - _xcp100GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); - _xcp100GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); - _xcp100GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); - _xcp100GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); - _xcp100GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); - _xcp100GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); - _xcp100GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); - _xcp100GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); - _xcp100GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); - _xcp100GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); - _xcp100GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); - _xcp100GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); - _xcp100GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); - _xcp100GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); - _xcp100GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); - _xcp100GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); - _xcp100GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); - _xcp100GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); - _xcp100GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); - _xcp100GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xcp100GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xcp100GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4"); - _xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1"); - _xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 x64"); - _xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2"); - _xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 x64"); - _xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "Other install media"); - _xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11"); - _xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 x64"); - _xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); - _xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); - _xcp100GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); - _xcp100GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); - _xcp100GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); - _xcp100GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); - _xcp100GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xcp100GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xcp100GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xcp100GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xcp100GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xcp100GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xcp100GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); - _xcp100GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); - _xcp100GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); - _xcp100GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); - _xcp100GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); - _xcp100GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit) (experimental)"); - _xcp100GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit) (experimental)"); - _xcp100GuestOsMap.put("Other Linux (32-bit)", "Other install media"); - _xcp100GuestOsMap.put("Other Linux (64-bit)", "Other install media"); - _xcp100GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); - _xcp100GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); + Xcp100GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); + Xcp100GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); + Xcp100GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); + Xcp100GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); + Xcp100GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); + Xcp100GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); + Xcp100GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); + Xcp100GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); + Xcp100GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); + Xcp100GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); + Xcp100GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); + Xcp100GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); + Xcp100GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); + Xcp100GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); + Xcp100GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); + Xcp100GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); + Xcp100GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); + Xcp100GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); + Xcp100GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); + Xcp100GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); + Xcp100GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + Xcp100GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + Xcp100GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4"); + Xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1"); + Xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 x64"); + Xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2"); + Xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 x64"); + Xcp100GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "Other install media"); + Xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11"); + Xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 x64"); + Xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); + Xcp100GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); + Xcp100GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); + Xcp100GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); + Xcp100GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); + Xcp100GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); + Xcp100GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); + Xcp100GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); + Xcp100GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); + Xcp100GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); + Xcp100GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); + Xcp100GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); + Xcp100GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); + Xcp100GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); + Xcp100GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); + Xcp100GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); + Xcp100GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); + Xcp100GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit) (experimental)"); + Xcp100GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit) (experimental)"); + Xcp100GuestOsMap.put("Other Linux (32-bit)", "Other install media"); + Xcp100GuestOsMap.put("Other Linux (64-bit)", "Other install media"); + Xcp100GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); + Xcp100GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); } static { - _xcp160GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); - _xcp160GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); - _xcp160GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); - _xcp160GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); - _xcp160GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); - _xcp160GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); - _xcp160GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)"); - _xcp160GuestOsMap.put("CentOS 5.7 (32-bit)", "CentOS 5 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 5.7 (64-bit)", "CentOS 5 (64-bit)"); - _xcp160GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6 (64-bit)"); - _xcp160GuestOsMap.put("CentOS 6.1 (32-bit)", "CentOS 6 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 6.1 (64-bit)", "CentOS 6 (64-bit)"); - _xcp160GuestOsMap.put("CentOS 6.2 (32-bit)", "CentOS 6 (32-bit)"); - _xcp160GuestOsMap.put("CentOS 6.2 (64-bit)", "CentOS 6 (64-bit)"); - _xcp160GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); - _xcp160GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); - _xcp160GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)"); - _xcp160GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); - _xcp160GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.7 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 5.7 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 6.1 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 6.1 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 6.2 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); - _xcp160GuestOsMap.put("Oracle Enterprise Linux 6.2 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4"); - _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1"); - _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 x64"); - _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2"); - _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 x64"); - _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "Other install media"); - _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11"); - _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 x64"); - _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); - _xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); - _xcp160GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); - _xcp160GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); - _xcp160GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); - _xcp160GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); - _xcp160GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xcp160GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xcp160GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xcp160GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xcp160GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xcp160GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xcp160GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); - _xcp160GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); - _xcp160GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); - _xcp160GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); - _xcp160GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); - _xcp160GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)"); - _xcp160GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)"); - _xcp160GuestOsMap.put("Ubuntu 12.04 (32-bit)", "Ubuntu Precise Pangolin 12.04 (32-bit)"); - _xcp160GuestOsMap.put("Ubuntu 12.04 (64-bit)", "Ubuntu Precise Pangolin 12.04 (64-bit)"); - _xcp160GuestOsMap.put("Other Linux (32-bit)", "Other install media"); - _xcp160GuestOsMap.put("Other Linux (64-bit)", "Other install media"); - _xcp160GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); - _xcp160GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); + Xcp160GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); + Xcp160GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); + Xcp160GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); + Xcp160GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); + Xcp160GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); + Xcp160GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); + Xcp160GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)"); + Xcp160GuestOsMap.put("CentOS 5.7 (32-bit)", "CentOS 5 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 5.7 (64-bit)", "CentOS 5 (64-bit)"); + Xcp160GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6 (64-bit)"); + Xcp160GuestOsMap.put("CentOS 6.1 (32-bit)", "CentOS 6 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 6.1 (64-bit)", "CentOS 6 (64-bit)"); + Xcp160GuestOsMap.put("CentOS 6.2 (32-bit)", "CentOS 6 (32-bit)"); + Xcp160GuestOsMap.put("CentOS 6.2 (64-bit)", "CentOS 6 (64-bit)"); + Xcp160GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); + Xcp160GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); + Xcp160GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)"); + Xcp160GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); + Xcp160GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.7 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 5.7 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 6.1 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 6.1 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 6.2 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); + Xcp160GuestOsMap.put("Oracle Enterprise Linux 6.2 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + Xcp160GuestOsMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + Xcp160GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4"); + Xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1"); + Xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 x64"); + Xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2"); + Xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 x64"); + Xcp160GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "Other install media"); + Xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11"); + Xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 x64"); + Xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); + Xcp160GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); + Xcp160GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); + Xcp160GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); + Xcp160GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); + Xcp160GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); + Xcp160GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); + Xcp160GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); + Xcp160GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); + Xcp160GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); + Xcp160GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); + Xcp160GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); + Xcp160GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); + Xcp160GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); + Xcp160GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); + Xcp160GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); + Xcp160GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); + Xcp160GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)"); + Xcp160GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)"); + Xcp160GuestOsMap.put("Ubuntu 12.04 (32-bit)", "Ubuntu Precise Pangolin 12.04 (32-bit)"); + Xcp160GuestOsMap.put("Ubuntu 12.04 (64-bit)", "Ubuntu Precise Pangolin 12.04 (64-bit)"); + Xcp160GuestOsMap.put("Other Linux (32-bit)", "Other install media"); + Xcp160GuestOsMap.put("Other Linux (64-bit)", "Other install media"); + Xcp160GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); + Xcp160GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); } static { - _xenServerGuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); - _xenServerGuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); - _xenServerGuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); - _xenServerGuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); - _xenServerGuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5.0 (32-bit)"); - _xenServerGuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5.0 (64-bit)"); - _xenServerGuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5.1 (32-bit)"); - _xenServerGuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5.1 (64-bit)"); - _xenServerGuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5.2 (32-bit)"); - _xenServerGuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5.2 (64-bit)"); - _xenServerGuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5.3 (32-bit)"); - _xenServerGuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5.3 (64-bit)"); - _xenServerGuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5.4 (32-bit)"); - _xenServerGuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5.4 (64-bit)"); - _xenServerGuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); - _xenServerGuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Lenny 5.0 (32-bit)"); // This is to support Debian 6.0 in XS 5.6 - _xenServerGuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Lenny 5.0 (32-bit)"); // This is to support Debian 7.0 in XS 5.6 - _xenServerGuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5.0 (32-bit)"); - _xenServerGuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5.0 (64-bit)"); - _xenServerGuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5.1 (32-bit)"); - _xenServerGuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5.1 (64-bit)"); - _xenServerGuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5.2 (32-bit)"); - _xenServerGuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5.2 (64-bit)"); - _xenServerGuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5.3 (32-bit)"); - _xenServerGuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5.3 (64-bit)"); - _xenServerGuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5.4 (32-bit)"); - _xenServerGuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5.4 (64-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5.0 (32-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5.0 (64-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5.1 (32-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5.1 (64-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5.2 (32-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5.2 (64-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5.3 (32-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5.3 (64-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5.4 (32-bit)"); - _xenServerGuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5.4 (64-bit)"); - _xenServerGuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4 (32-bit)"); - _xenServerGuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); - _xenServerGuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); - _xenServerGuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); - _xenServerGuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); - _xenServerGuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); - _xenServerGuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); - _xenServerGuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); - _xenServerGuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); - _xenServerGuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); - _xenServerGuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); - _xenServerGuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); - _xenServerGuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServerGuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServerGuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServerGuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServerGuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); - _xenServerGuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); - _xenServerGuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); - _xenServerGuestOsMap.put("Windows 2000 SP4 (32-bit)", "Windows 2000 SP4 (32-bit)"); - _xenServerGuestOsMap.put("Windows 2000 Server SP4 (32-bit)", "Windows 2000 SP4 (32-bit)"); - _xenServerGuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); - _xenServerGuestOsMap.put("Windows XP SP2 (32-bit)", "Windows XP SP2 (32-bit)"); - _xenServerGuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); - _xenServerGuestOsMap.put("Other Linux (32-bit)", "Other install media"); - _xenServerGuestOsMap.put("Other Linux (64-bit)", "Other install media"); - _xenServerGuestOsMap.put("Other PV (32-bit)", "CentOS 5.4 (32-bit)"); - _xenServerGuestOsMap.put("Other PV (64-bit)", "CentOS 5.4 (64-bit)"); + XenServerGuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); + XenServerGuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); + XenServerGuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); + XenServerGuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); + XenServerGuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5.0 (32-bit)"); + XenServerGuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5.0 (64-bit)"); + XenServerGuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5.1 (32-bit)"); + XenServerGuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5.1 (64-bit)"); + XenServerGuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5.2 (32-bit)"); + XenServerGuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5.2 (64-bit)"); + XenServerGuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5.3 (32-bit)"); + XenServerGuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5.3 (64-bit)"); + XenServerGuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5.4 (32-bit)"); + XenServerGuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5.4 (64-bit)"); + XenServerGuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); + XenServerGuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Lenny 5.0 (32-bit)"); // This is to support Debian 6.0 in XS 5.6 + XenServerGuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Lenny 5.0 (32-bit)"); // This is to support Debian 7.0 in XS 5.6 + XenServerGuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5.0 (32-bit)"); + XenServerGuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5.0 (64-bit)"); + XenServerGuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5.1 (32-bit)"); + XenServerGuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5.1 (64-bit)"); + XenServerGuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5.2 (32-bit)"); + XenServerGuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5.2 (64-bit)"); + XenServerGuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5.3 (32-bit)"); + XenServerGuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5.3 (64-bit)"); + XenServerGuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5.4 (32-bit)"); + XenServerGuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5.4 (64-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5.0 (32-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5.0 (64-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5.1 (32-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5.1 (64-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5.2 (32-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5.2 (64-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5.3 (32-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5.3 (64-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5.4 (32-bit)"); + XenServerGuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5.4 (64-bit)"); + XenServerGuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4 (32-bit)"); + XenServerGuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); + XenServerGuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); + XenServerGuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); + XenServerGuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); + XenServerGuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); + XenServerGuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); + XenServerGuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); + XenServerGuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); + XenServerGuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); + XenServerGuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); + XenServerGuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); + XenServerGuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServerGuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServerGuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServerGuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServerGuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); + XenServerGuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); + XenServerGuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); + XenServerGuestOsMap.put("Windows 2000 SP4 (32-bit)", "Windows 2000 SP4 (32-bit)"); + XenServerGuestOsMap.put("Windows 2000 Server SP4 (32-bit)", "Windows 2000 SP4 (32-bit)"); + XenServerGuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); + XenServerGuestOsMap.put("Windows XP SP2 (32-bit)", "Windows XP SP2 (32-bit)"); + XenServerGuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); + XenServerGuestOsMap.put("Other Linux (32-bit)", "Other install media"); + XenServerGuestOsMap.put("Other Linux (64-bit)", "Other install media"); + XenServerGuestOsMap.put("Other PV (32-bit)", "CentOS 5.4 (32-bit)"); + XenServerGuestOsMap.put("Other PV (64-bit)", "CentOS 5.4 (64-bit)"); } static { - _xenServer56FP1GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); - _xenServer56FP1GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); // This is to support Debian 7.0 in XS 5.6FP1 - _xenServer56FP1GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit) (experimental)"); - _xenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit) (experimental)"); - _xenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4 (32-bit)"); - _xenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); - _xenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); - _xenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); - _xenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); - _xenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); - _xenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); - _xenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); - _xenServer56FP1GuestOsMap.put("Windows 2000 SP4 (32-bit)", "Windows 2000 SP4 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Windows 2000 Server SP4 (32-bit)", "Windows 2000 SP4 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); - _xenServer56FP1GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit) (experimental)"); - _xenServer56FP1GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit) (experimental)"); - _xenServer56FP1GuestOsMap.put("Other Linux (32-bit)", "Other install media"); - _xenServer56FP1GuestOsMap.put("Other Linux (64-bit)", "Other install media"); - _xenServer56FP1GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP1GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); + XenServer56FP1GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); + XenServer56FP1GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); + XenServer56FP1GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); // This is to support Debian 7.0 in XS 5.6FP1 + XenServer56FP1GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit) (experimental)"); + XenServer56FP1GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit) (experimental)"); + XenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4 (32-bit)"); + XenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); + XenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); + XenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); + XenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); + XenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); + XenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); + XenServer56FP1GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); + XenServer56FP1GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); + XenServer56FP1GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); + XenServer56FP1GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); + XenServer56FP1GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); + XenServer56FP1GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer56FP1GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer56FP1GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer56FP1GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer56FP1GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); + XenServer56FP1GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); + XenServer56FP1GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); + XenServer56FP1GuestOsMap.put("Windows 2000 SP4 (32-bit)", "Windows 2000 SP4 (32-bit)"); + XenServer56FP1GuestOsMap.put("Windows 2000 Server SP4 (32-bit)", "Windows 2000 SP4 (32-bit)"); + XenServer56FP1GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); + XenServer56FP1GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); + XenServer56FP1GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit) (experimental)"); + XenServer56FP1GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit) (experimental)"); + XenServer56FP1GuestOsMap.put("Other Linux (32-bit)", "Other install media"); + XenServer56FP1GuestOsMap.put("Other Linux (64-bit)", "Other install media"); + XenServer56FP1GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP1GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); } static { - _xenServer56FP1GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - // _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", new MemoryValues(512l, 16*1024l));// ?? - _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + // XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", new MemoryValues(512l, 16*1024l));// ?? + XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); //_xenServer56FP1GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", new MemoryValues(512l, 128*1024l)); //? //_xenServer56FP1GuestOsMemoryMap.put("Windows 7 (32-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer56FP1GuestOsMemoryMap.put("Windows 7 (64-bit)", new MemoryValues(512l, 16*1024l)); //? @@ -506,19 +506,19 @@ public class CitrixHelper { //_xenServer56FP1GuestOsMemoryMap.put("Windows Server 2003 Standard Edition(64-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer56FP1GuestOsMemoryMap.put("Windows Server 2008 (32-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer56FP1GuestOsMemoryMap.put("Windows Server 2008 (64-bit)", new MemoryValues(512l, 16*1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Windows Server 2012 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Windows Server 8 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Windows Vista (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); - _xenServer56FP1GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); - // _xenServer56FP1GuestOsMemoryMap.put("Ubuntu 10.10 (32-bit)", new MemoryValues(512l, 16*1024l));//? + XenServer56FP1GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Windows Server 2012 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Windows Server 8 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Windows Vista (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); + XenServer56FP1GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); + // XenServer56FP1GuestOsMemoryMap.put("Ubuntu 10.10 (32-bit)", new MemoryValues(512l, 16*1024l));//? //_xenServer56FP1GuestOsMemoryMap.put("Ubuntu 10.10 (64-bit)", new MemoryValues(512l, 16*1024l)); //? - _xenServer56FP1GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer56FP1GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); - // _xenServer56FP1GuestOsMemoryMap.put("Other Linux (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56FP1GuestOsMemoryMap.put("Other Linux (64-bit)", new MemoryValues(512l, 16*1024l)); + XenServer56FP1GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer56FP1GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); + // XenServer56FP1GuestOsMemoryMap.put("Other Linux (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56FP1GuestOsMemoryMap.put("Other Linux (64-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer56FP1GuestOsMemoryMap.put("Other (32-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer56FP1GuestOsMemoryMap.put("Other (64-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer56FP1GuestOsMemoryMap.put("Other CentOS (32-bit)", new MemoryValues(512l, 16*1024l)); @@ -532,179 +532,179 @@ public class CitrixHelper { } static { - _xenServer56FP2GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); - _xenServer56FP2GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); // This is to support Debian 7.0 in XS 5.6FP2 - _xenServer56FP2GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4 (32-bit)"); - _xenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); - _xenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); - _xenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); - _xenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); - _xenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); - _xenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); - _xenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); - _xenServer56FP2GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); - _xenServer56FP2GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit) (experimental)"); - _xenServer56FP2GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit) (experimental)"); - _xenServer56FP2GuestOsMap.put("Other Linux (32-bit)", "Other install media"); - _xenServer56FP2GuestOsMap.put("Other Linux (64-bit)", "Other install media"); - _xenServer56FP2GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); - _xenServer56FP2GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); + XenServer56FP2GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); + XenServer56FP2GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); + XenServer56FP2GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); // This is to support Debian 7.0 in XS 5.6FP2 + XenServer56FP2GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit) (experimental)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + XenServer56FP2GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + XenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4 (32-bit)"); + XenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); + XenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); + XenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); + XenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); + XenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); + XenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); + XenServer56FP2GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); + XenServer56FP2GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); + XenServer56FP2GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); + XenServer56FP2GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); + XenServer56FP2GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); + XenServer56FP2GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); + XenServer56FP2GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); + XenServer56FP2GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); + XenServer56FP2GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); + XenServer56FP2GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); + XenServer56FP2GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit) (experimental)"); + XenServer56FP2GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit) (experimental)"); + XenServer56FP2GuestOsMap.put("Other Linux (32-bit)", "Other install media"); + XenServer56FP2GuestOsMap.put("Other Linux (64-bit)", "Other install media"); + XenServer56FP2GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); + XenServer56FP2GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); } static { - _xenServer56SP2GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); //_xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", new MemoryValues(512l, 16*1024l));// ?? - _xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); //_xenServer56SP2GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", new MemoryValues(512l, 128*1024l)); //? //_xenServer56SP2GuestOsMemoryMap.put("Windows 7 (32-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer56SP2GuestOsMemoryMap.put("Windows 7 (64-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer56SP2GuestOsMemoryMap.put("Windows 8 (32-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer56SP2GuestOsMemoryMap.put("Windows 8 (64-bit)", new MemoryValues(512l, 16*1024l)); //? - // _xenServer56SP2GuestOsMemoryMap.put("Windows Server 2003 (32-bit)", new MemoryValues(256l, 64*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Windows Server 2003 (32-bit)", new MemoryValues(256l, 64*1024l)); //_xenServer56SP2GuestOsMemoryMap.put("Windows Server 2003 (64-bit)", new MemoryValues(256l, 128*1024l)); //_xenServer56SP2GuestOsMemoryMap.put("Windows Server 2003 PAE (32-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer56SP2GuestOsMemoryMap.put("Windows Server 2003 Enterprise Edition(32-bit)", new MemoryValues(512l, 16*1024l)); @@ -715,236 +715,236 @@ public class CitrixHelper { //_xenServer56SP2GuestOsMemoryMap.put("Windows Server 2003 Standard Edition(64-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer56SP2GuestOsMemoryMap.put("Windows Server 2008 (32-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer56SP2GuestOsMemoryMap.put("Windows Server 2008 (64-bit)", new MemoryValues(512l, 16*1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Windows Server 2012 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Windows Server 8 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Windows Vista (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); - _xenServer56SP2GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Windows Server 2012 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Windows Server 8 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Windows Vista (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); + XenServer56SP2GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); //_xenServer56SP2GuestOsMemoryMap.put("Ubuntu 10.10 (32-bit)", new MemoryValues(512l, 16*1024l));//? //_xenServer56SP2GuestOsMemoryMap.put("Ubuntu 10.10 (64-bit)", new MemoryValues(512l, 16*1024l)); //? - _xenServer56SP2GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer56SP2GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other Linux (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other Linux (64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other (64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other CentOS (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other CentOS (64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other Ubuntu (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other Ubuntu (64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other SUSE Linux(32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other SUSE Linux(64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other PV (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer56SP2GuestOsMemoryMap.put("Other PV (64-bit)", new MemoryValues(512l, 16*1024l)); + XenServer56SP2GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer56SP2GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other Linux (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other Linux (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other CentOS (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other CentOS (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other Ubuntu (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other Ubuntu (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other SUSE Linux(32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other SUSE Linux(64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other PV (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer56SP2GuestOsMemoryMap.put("Other PV (64-bit)", new MemoryValues(512l, 16*1024l)); } static { - _xenServer600GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); - _xenServer600GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); - _xenServer600GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); - _xenServer600GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer600GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer600GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6.0 (32-bit) (experimental)"); - _xenServer600GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6.0 (64-bit) (experimental)"); - _xenServer600GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); - _xenServer600GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); - _xenServer600GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)"); - _xenServer600GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); // This is to support Debian 7.0 in XS 6.0 - _xenServer600GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6.0 (32-bit)"); - _xenServer600GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6.0 (64-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6.0 (32-bit)"); - _xenServer600GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6.0 (64-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4 (32-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", "SUSE Linux Enterprise Server 10 SP3 (32-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP4 (32-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", "SUSE Linux Enterprise Server 10 SP4 (64-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); - _xenServer600GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); - _xenServer600GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); - _xenServer600GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); - _xenServer600GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer600GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer600GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer600GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer600GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer600GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer600GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer600GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer600GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); - _xenServer600GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); - _xenServer600GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); - _xenServer600GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); - _xenServer600GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); - _xenServer600GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)"); - _xenServer600GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)"); - _xenServer600GuestOsMap.put("Ubuntu 10.10 (32-bit)", "Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)"); - _xenServer600GuestOsMap.put("Ubuntu 10.10 (64-bit)", "Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)"); - _xenServer600GuestOsMap.put("Other Linux (32-bit)", "Other install media"); - _xenServer600GuestOsMap.put("Other Linux (64-bit)", "Other install media"); - _xenServer600GuestOsMap.put("Other (32-bit)", "Other install media"); - _xenServer600GuestOsMap.put("Other (64-bit)", "Other install media"); - _xenServer600GuestOsMap.put("Other CentOS (32-bit)", "Other install media"); - _xenServer600GuestOsMap.put("Other CentOS (64-bit)", "Other install media"); - _xenServer600GuestOsMap.put("Other Ubuntu (32-bit)", "Other install media"); - _xenServer600GuestOsMap.put("Other Ubuntu (64-bit)", "Other install media"); - _xenServer600GuestOsMap.put("Other SUSE Linux(32-bit)", "Other install media"); - _xenServer600GuestOsMap.put("Other SUSE Linux(64-bit)", "Other install media"); - _xenServer600GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); - _xenServer600GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); + XenServer600GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); + XenServer600GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); + XenServer600GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); + XenServer600GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); + XenServer600GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); + XenServer600GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); + XenServer600GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); + XenServer600GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); + XenServer600GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); + XenServer600GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); + XenServer600GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); + XenServer600GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); + XenServer600GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); + XenServer600GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); + XenServer600GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); + XenServer600GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); + XenServer600GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)"); + XenServer600GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)"); + XenServer600GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6.0 (32-bit) (experimental)"); + XenServer600GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6.0 (64-bit) (experimental)"); + XenServer600GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); + XenServer600GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); + XenServer600GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)"); + XenServer600GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); // This is to support Debian 7.0 in XS 6.0 + XenServer600GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6.0 (32-bit)"); + XenServer600GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6.0 (64-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6.0 (32-bit)"); + XenServer600GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6.0 (64-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 9 SP4 (32-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", "SUSE Linux Enterprise Server 10 SP3 (32-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP4 (32-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", "SUSE Linux Enterprise Server 10 SP4 (64-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); + XenServer600GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); + XenServer600GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); + XenServer600GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); + XenServer600GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); + XenServer600GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); + XenServer600GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer600GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer600GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer600GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer600GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer600GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer600GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); + XenServer600GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); + XenServer600GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); + XenServer600GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); + XenServer600GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); + XenServer600GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)"); + XenServer600GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)"); + XenServer600GuestOsMap.put("Ubuntu 10.10 (32-bit)", "Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)"); + XenServer600GuestOsMap.put("Ubuntu 10.10 (64-bit)", "Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)"); + XenServer600GuestOsMap.put("Other Linux (32-bit)", "Other install media"); + XenServer600GuestOsMap.put("Other Linux (64-bit)", "Other install media"); + XenServer600GuestOsMap.put("Other (32-bit)", "Other install media"); + XenServer600GuestOsMap.put("Other (64-bit)", "Other install media"); + XenServer600GuestOsMap.put("Other CentOS (32-bit)", "Other install media"); + XenServer600GuestOsMap.put("Other CentOS (64-bit)", "Other install media"); + XenServer600GuestOsMap.put("Other Ubuntu (32-bit)", "Other install media"); + XenServer600GuestOsMap.put("Other Ubuntu (64-bit)", "Other install media"); + XenServer600GuestOsMap.put("Other SUSE Linux(32-bit)", "Other install media"); + XenServer600GuestOsMap.put("Other SUSE Linux(64-bit)", "Other install media"); + XenServer600GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); + XenServer600GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); } static { - _xenServer600GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); //_xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", new MemoryValues(512l, 16*1024l));// ?? - _xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); //_xenServer600GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", new MemoryValues(512l, 128*1024l)); //? //_xenServer600GuestOsMemoryMap.put("Windows 7 (32-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer600GuestOsMemoryMap.put("Windows 7 (64-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer600GuestOsMemoryMap.put("Windows 8 (32-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer600GuestOsMemoryMap.put("Windows 8 (64-bit)", new MemoryValues(512l, 16*1024l)); //? - // _xenServer600GuestOsMemoryMap.put("Windows Server 2003 (32-bit)", new MemoryValues(256l, 64*1024l)); + // XenServer600GuestOsMemoryMap.put("Windows Server 2003 (32-bit)", new MemoryValues(256l, 64*1024l)); //_xenServer600GuestOsMemoryMap.put("Windows Server 2003 (64-bit)", new MemoryValues(256l, 128*1024l)); //_xenServer600GuestOsMemoryMap.put("Windows Server 2003 PAE (32-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer600GuestOsMemoryMap.put("Windows Server 2003 Enterprise Edition(32-bit)", new MemoryValues(512l, 16*1024l)); @@ -955,17 +955,17 @@ public class CitrixHelper { //_xenServer600GuestOsMemoryMap.put("Windows Server 2003 Standard Edition(64-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer600GuestOsMemoryMap.put("Windows Server 2008 (32-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer600GuestOsMemoryMap.put("Windows Server 2008 (64-bit)", new MemoryValues(512l, 16*1024l)); - _xenServer600GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Windows Server 2012 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Windows Server 8 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Windows Vista (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); - _xenServer600GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Windows Server 2012 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Windows Server 8 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Windows Vista (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer600GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); + XenServer600GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); //_xenServer600GuestOsMemoryMap.put("Ubuntu 10.10 (32-bit)", new MemoryValues(512l, 16*1024l));//? //_xenServer600GuestOsMemoryMap.put("Ubuntu 10.10 (64-bit)", new MemoryValues(512l, 16*1024l)); //? - _xenServer600GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer600GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); + XenServer600GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer600GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); //_xenServer600GuestOsMemoryMap.put("Other Linux (32-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer600GuestOsMemoryMap.put("Other Linux (64-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer600GuestOsMemoryMap.put("Other (32-bit)", new MemoryValues(512l, 16*1024l)); @@ -981,215 +981,215 @@ public class CitrixHelper { } static { - _xenServer602GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.7 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 5.7 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer602GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6.0 (32-bit)"); - _xenServer602GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6.0 (64-bit)"); - _xenServer602GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); - _xenServer602GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); - _xenServer602GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)"); - _xenServer602GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); // This is to support Debian 7.0 in XS 6.0.2 - _xenServer602GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.7 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 5.7 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6.0 (32-bit)"); - _xenServer602GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6.0 (64-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6.0 (32-bit)"); - _xenServer602GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6.0 (64-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", "SUSE Linux Enterprise Server 10 SP3 (32-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP4 (32-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", "SUSE Linux Enterprise Server 10 SP4 (64-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); - _xenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); - _xenServer602GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); - _xenServer602GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); - _xenServer602GuestOsMap.put("Windows 8 (32-bit)", "Windows 8 (32-bit) (experimental)"); - _xenServer602GuestOsMap.put("Windows 8 (64-bit)", "Windows 8 (64-bit) (experimental)"); - _xenServer602GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer602GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer602GuestOsMap.put("Windows Server 2003 PAE (32-bit)", "Windows Server 2003 PAE (32-bit)"); - _xenServer602GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer602GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer602GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer602GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer602GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer602GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer602GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); - _xenServer602GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); - _xenServer602GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); - _xenServer602GuestOsMap.put("Windows Server 8 (64-bit)", "Windows Server 8 (64-bit) (experimental)"); - _xenServer602GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); - _xenServer602GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); - _xenServer602GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)"); - _xenServer602GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)"); - _xenServer602GuestOsMap.put("Ubuntu 10.10 (32-bit)", "Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)"); - _xenServer602GuestOsMap.put("Ubuntu 10.10 (64-bit)", "Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)"); - _xenServer602GuestOsMap.put("Other Linux (32-bit)", "Other install media"); - _xenServer602GuestOsMap.put("Other Linux (64-bit)", "Other install media"); - _xenServer602GuestOsMap.put("Other (32-bit)", "Other install media"); - _xenServer602GuestOsMap.put("Other (64-bit)", "Other install media"); - _xenServer602GuestOsMap.put("Other CentOS (32-bit)", "Other install media"); - _xenServer602GuestOsMap.put("Other CentOS (64-bit)", "Other install media"); - _xenServer602GuestOsMap.put("Other Ubuntu (32-bit)", "Other install media"); - _xenServer602GuestOsMap.put("Other Ubuntu (64-bit)", "Other install media"); - _xenServer602GuestOsMap.put("Other SUSE Linux(32-bit)", "Other install media"); - _xenServer602GuestOsMap.put("Other SUSE Linux(64-bit)", "Other install media"); - _xenServer602GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); - _xenServer602GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); + XenServer602GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); + XenServer602GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); + XenServer602GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); + XenServer602GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); + XenServer602GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); + XenServer602GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); + XenServer602GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)"); + XenServer602GuestOsMap.put("CentOS 5.7 (32-bit)", "CentOS 5 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 5.7 (64-bit)", "CentOS 5 (64-bit)"); + XenServer602GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6.0 (32-bit)"); + XenServer602GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6.0 (64-bit)"); + XenServer602GuestOsMap.put("Debian GNU/Linux 5.0 (32-bit)", "Debian Lenny 5.0 (32-bit)"); + XenServer602GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); + XenServer602GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)"); + XenServer602GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); // This is to support Debian 7.0 in XS 6.0.2 + XenServer602GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.7 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 5.7 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6.0 (32-bit)"); + XenServer602GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6.0 (64-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6.0 (32-bit)"); + XenServer602GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6.0 (64-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", "SUSE Linux Enterprise Server 10 SP3 (32-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP4 (32-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", "SUSE Linux Enterprise Server 10 SP4 (64-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); + XenServer602GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); + XenServer602GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); + XenServer602GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); + XenServer602GuestOsMap.put("Windows 8 (32-bit)", "Windows 8 (32-bit) (experimental)"); + XenServer602GuestOsMap.put("Windows 8 (64-bit)", "Windows 8 (64-bit) (experimental)"); + XenServer602GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); + XenServer602GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); + XenServer602GuestOsMap.put("Windows Server 2003 PAE (32-bit)", "Windows Server 2003 PAE (32-bit)"); + XenServer602GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer602GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer602GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer602GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer602GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer602GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer602GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); + XenServer602GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); + XenServer602GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); + XenServer602GuestOsMap.put("Windows Server 8 (64-bit)", "Windows Server 8 (64-bit) (experimental)"); + XenServer602GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); + XenServer602GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); + XenServer602GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)"); + XenServer602GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)"); + XenServer602GuestOsMap.put("Ubuntu 10.10 (32-bit)", "Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)"); + XenServer602GuestOsMap.put("Ubuntu 10.10 (64-bit)", "Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)"); + XenServer602GuestOsMap.put("Other Linux (32-bit)", "Other install media"); + XenServer602GuestOsMap.put("Other Linux (64-bit)", "Other install media"); + XenServer602GuestOsMap.put("Other (32-bit)", "Other install media"); + XenServer602GuestOsMap.put("Other (64-bit)", "Other install media"); + XenServer602GuestOsMap.put("Other CentOS (32-bit)", "Other install media"); + XenServer602GuestOsMap.put("Other CentOS (64-bit)", "Other install media"); + XenServer602GuestOsMap.put("Other Ubuntu (32-bit)", "Other install media"); + XenServer602GuestOsMap.put("Other Ubuntu (64-bit)", "Other install media"); + XenServer602GuestOsMap.put("Other SUSE Linux(32-bit)", "Other install media"); + XenServer602GuestOsMap.put("Other SUSE Linux(64-bit)", "Other install media"); + XenServer602GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); + XenServer602GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); } static { - _xenServer602GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Debian GNU/Linux 5.0 (32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - // _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", new MemoryValues(512l, 16*1024l));// ?? - _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("Debian GNU/Linux 5.0 (32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + // XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", new MemoryValues(512l, 16*1024l));// ?? + XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); //_xenServer602GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", new MemoryValues(512l, 128*1024l)); //? //_xenServer602GuestOsMemoryMap.put("Windows 7 (32-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer602GuestOsMemoryMap.put("Windows 7 (64-bit)", new MemoryValues(512l, 16*1024l)); //? @@ -1206,326 +1206,326 @@ public class CitrixHelper { //_xenServer602GuestOsMemoryMap.put("Windows Server 2003 Standard Edition(64-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer602GuestOsMemoryMap.put("Windows Server 2008 (32-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer602GuestOsMemoryMap.put("Windows Server 2008 (64-bit)", new MemoryValues(512l, 16*1024l)); - _xenServer602GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Windows Server 2012 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Windows Server 8 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Windows Vista (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); - _xenServer602GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Windows Server 2012 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Windows Server 8 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Windows Vista (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer602GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); + XenServer602GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); //_xenServer602GuestOsMemoryMap.put("Ubuntu 10.10 (32-bit)", new MemoryValues(512l, 16*1024l));//? //_xenServer602GuestOsMemoryMap.put("Ubuntu 10.10 (64-bit)", new MemoryValues(512l, 16*1024l)); //? - _xenServer602GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer602GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); - // _xenServer602GuestOsMemoryMap.put("Other Linux (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer602GuestOsMemoryMap.put("Other Linux (64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer602GuestOsMemoryMap.put("Other (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer602GuestOsMemoryMap.put("Other (64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer602GuestOsMemoryMap.put("Other CentOS (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer602GuestOsMemoryMap.put("Other CentOS (64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer602GuestOsMemoryMap.put("Other Ubuntu (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer602GuestOsMemoryMap.put("Other Ubuntu (64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer602GuestOsMemoryMap.put("Other SUSE Linux(32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer602GuestOsMemoryMap.put("Other SUSE Linux(64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer602GuestOsMemoryMap.put("Other PV (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer602GuestOsMemoryMap.put("Other PV (64-bit)", new MemoryValues(512l, 16*1024l)); + XenServer602GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer602GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); + // XenServer602GuestOsMemoryMap.put("Other Linux (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer602GuestOsMemoryMap.put("Other Linux (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer602GuestOsMemoryMap.put("Other (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer602GuestOsMemoryMap.put("Other (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer602GuestOsMemoryMap.put("Other CentOS (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer602GuestOsMemoryMap.put("Other CentOS (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer602GuestOsMemoryMap.put("Other Ubuntu (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer602GuestOsMemoryMap.put("Other Ubuntu (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer602GuestOsMemoryMap.put("Other SUSE Linux(32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer602GuestOsMemoryMap.put("Other SUSE Linux(64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer602GuestOsMemoryMap.put("Other PV (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer602GuestOsMemoryMap.put("Other PV (64-bit)", new MemoryValues(512l, 16*1024l)); } static { - _xenServer610GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.7 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 5.7 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer610GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6 (64-bit)"); - _xenServer610GuestOsMap.put("CentOS 6.1 (32-bit)", "CentOS 6 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 6.1 (64-bit)", "CentOS 6 (64-bit)"); - _xenServer610GuestOsMap.put("CentOS 6.2 (32-bit)", "CentOS 6 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 6.2 (64-bit)", "CentOS 6 (64-bit)"); - _xenServer610GuestOsMap.put("CentOS 6.3 (32-bit)", "CentOS 6 (32-bit)"); - _xenServer610GuestOsMap.put("CentOS 6.3 (64-bit)", "CentOS 6 (64-bit)"); - _xenServer610GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); - _xenServer610GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)"); - _xenServer610GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); // This is to support Debian 7.0 in XS 6.1 - _xenServer610GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.7 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 5.7 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.1 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.1 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.2 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); - _xenServer610GuestOsMap.put("Oracle Enterprise Linux 6.2 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", "SUSE Linux Enterprise Server 10 SP3 (32-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP4 (32-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", "SUSE Linux Enterprise Server 10 SP4 (64-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); - _xenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); - _xenServer610GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); - _xenServer610GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); - _xenServer610GuestOsMap.put("Windows 8 (32-bit)", "Windows 8 (32-bit) (experimental)"); - _xenServer610GuestOsMap.put("Windows 8 (64-bit)", "Windows 8 (64-bit) (experimental)"); - _xenServer610GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2003 PAE (32-bit)", "Windows Server 2003 PAE (32-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); - _xenServer610GuestOsMap.put("Windows Server 2012 (64-bit)", "Windows Server 2012 (64-bit) (experimental)"); - _xenServer610GuestOsMap.put("Windows Server 8 (64-bit)", "Windows Server 2012 (64-bit) (experimental)"); - _xenServer610GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); - _xenServer610GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); - _xenServer610GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)"); - _xenServer610GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)"); - _xenServer610GuestOsMap.put("Ubuntu 10.10 (32-bit)", "Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)"); - _xenServer610GuestOsMap.put("Ubuntu 10.10 (64-bit)", "Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)"); - _xenServer610GuestOsMap.put("Ubuntu 12.04 (32-bit)", "Ubuntu Precise Pangolin 12.04 (32-bit)"); - _xenServer610GuestOsMap.put("Ubuntu 12.04 (64-bit)", "Ubuntu Precise Pangolin 12.04 (64-bit)"); - _xenServer610GuestOsMap.put("Ubuntu 11.04 (32-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Ubuntu 11.04 (64-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Other Linux (32-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Other Linux (64-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Other (32-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Other (64-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Other CentOS (32-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Other CentOS (64-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Other Ubuntu (32-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Other Ubuntu (64-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Other SUSE Linux(32-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Other SUSE Linux(64-bit)", "Other install media"); - _xenServer610GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); - _xenServer610GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 5.7 (32-bit)", "CentOS 5 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 5.7 (64-bit)", "CentOS 5 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 6.1 (32-bit)", "CentOS 6 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 6.1 (64-bit)", "CentOS 6 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 6.2 (32-bit)", "CentOS 6 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 6.2 (64-bit)", "CentOS 6 (64-bit)"); + XenServer610GuestOsMap.put("CentOS 6.3 (32-bit)", "CentOS 6 (32-bit)"); + XenServer610GuestOsMap.put("CentOS 6.3 (64-bit)", "CentOS 6 (64-bit)"); + XenServer610GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); + XenServer610GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)"); + XenServer610GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Squeeze 6.0 (32-bit)"); // This is to support Debian 7.0 in XS 6.1 + XenServer610GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Squeeze 6.0 (64-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.7 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 5.7 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 6.1 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 6.1 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 6.2 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); + XenServer610GuestOsMap.put("Oracle Enterprise Linux 6.2 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + XenServer610GuestOsMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", "SUSE Linux Enterprise Server 10 SP3 (32-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP4 (32-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", "SUSE Linux Enterprise Server 10 SP4 (64-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); + XenServer610GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); + XenServer610GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); + XenServer610GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); + XenServer610GuestOsMap.put("Windows 8 (32-bit)", "Windows 8 (32-bit) (experimental)"); + XenServer610GuestOsMap.put("Windows 8 (64-bit)", "Windows 8 (64-bit) (experimental)"); + XenServer610GuestOsMap.put("Windows Server 2003 (32-bit)", "Windows Server 2003 (32-bit)"); + XenServer610GuestOsMap.put("Windows Server 2003 (64-bit)", "Windows Server 2003 (64-bit)"); + XenServer610GuestOsMap.put("Windows Server 2003 PAE (32-bit)", "Windows Server 2003 PAE (32-bit)"); + XenServer610GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer610GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer610GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer610GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer610GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer610GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer610GuestOsMap.put("Windows Server 2008 (32-bit)", "Windows Server 2008 (32-bit)"); + XenServer610GuestOsMap.put("Windows Server 2008 (64-bit)", "Windows Server 2008 (64-bit)"); + XenServer610GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); + XenServer610GuestOsMap.put("Windows Server 2012 (64-bit)", "Windows Server 2012 (64-bit) (experimental)"); + XenServer610GuestOsMap.put("Windows Server 8 (64-bit)", "Windows Server 2012 (64-bit) (experimental)"); + XenServer610GuestOsMap.put("Windows Vista (32-bit)", "Windows Vista (32-bit)"); + XenServer610GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); + XenServer610GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)"); + XenServer610GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)"); + XenServer610GuestOsMap.put("Ubuntu 10.10 (32-bit)", "Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)"); + XenServer610GuestOsMap.put("Ubuntu 10.10 (64-bit)", "Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)"); + XenServer610GuestOsMap.put("Ubuntu 12.04 (32-bit)", "Ubuntu Precise Pangolin 12.04 (32-bit)"); + XenServer610GuestOsMap.put("Ubuntu 12.04 (64-bit)", "Ubuntu Precise Pangolin 12.04 (64-bit)"); + XenServer610GuestOsMap.put("Ubuntu 11.04 (32-bit)", "Other install media"); + XenServer610GuestOsMap.put("Ubuntu 11.04 (64-bit)", "Other install media"); + XenServer610GuestOsMap.put("Other Linux (32-bit)", "Other install media"); + XenServer610GuestOsMap.put("Other Linux (64-bit)", "Other install media"); + XenServer610GuestOsMap.put("Other (32-bit)", "Other install media"); + XenServer610GuestOsMap.put("Other (64-bit)", "Other install media"); + XenServer610GuestOsMap.put("Other CentOS (32-bit)", "Other install media"); + XenServer610GuestOsMap.put("Other CentOS (64-bit)", "Other install media"); + XenServer610GuestOsMap.put("Other Ubuntu (32-bit)", "Other install media"); + XenServer610GuestOsMap.put("Other Ubuntu (64-bit)", "Other install media"); + XenServer610GuestOsMap.put("Other SUSE Linux(32-bit)", "Other install media"); + XenServer610GuestOsMap.put("Other SUSE Linux(64-bit)", "Other install media"); + XenServer610GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); + XenServer610GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); } static { - _xenServer620GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.7 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.7 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.8 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.8 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.9 (32-bit)", "CentOS 5 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 5.9 (64-bit)", "CentOS 5 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 6.1 (32-bit)", "CentOS 6 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 6.1 (64-bit)", "CentOS 6 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 6.2 (32-bit)", "CentOS 6 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 6.2 (64-bit)", "CentOS 6 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 6.3 (32-bit)", "CentOS 6 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 6.3 (64-bit)", "CentOS 6 (64-bit)"); - _xenServer620GuestOsMap.put("CentOS 6.4 (32-bit)", "CentOS 6 (32-bit)"); - _xenServer620GuestOsMap.put("CentOS 6.4 (64-bit)", "CentOS 6 (64-bit)"); - _xenServer620GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); - _xenServer620GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)"); - _xenServer620GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Wheezy 7.0 (32-bit)"); - _xenServer620GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Wheezy 7.0 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.7 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.7 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.8 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.8 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.9 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 5.9 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 6.1 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 6.1 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 6.2 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 6.2 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 6.3 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 6.3 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 6.4 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); - _xenServer620GuestOsMap.put("Oracle Enterprise Linux 6.4 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.8 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.8 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.9 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.9 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.3 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.3 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.4 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); - _xenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.4 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", "SUSE Linux Enterprise Server 10 SP3 (32-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP4 (32-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", "SUSE Linux Enterprise Server 10 SP4 (64-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 SP2 (32-bit)", "SUSE Linux Enterprise Server 11 SP2 (32-bit)"); - _xenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 SP2 (64-bit)", "SUSE Linux Enterprise Server 11 SP2 (64-bit)"); - _xenServer620GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); - _xenServer620GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); - _xenServer620GuestOsMap.put("Windows 7 SP1 (32-bit)", "Windows 7 SP1 (32-bit)"); - _xenServer620GuestOsMap.put("Windows 7 SP1 (64-bit)", "Windows 7 SP1 (64-bit)"); - _xenServer620GuestOsMap.put("Windows 8 (32-bit)", "Windows 8 (32-bit)"); - _xenServer620GuestOsMap.put("Windows 8 (64-bit)", "Windows 8 (64-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2003 SP2 (32-bit)", "Windows Server 2003 SP2 (32-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2003 SP2 (64-bit)", "Windows Server 2003 SP2 (64-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2003 PAE (32-bit)", "Windows Server 2003 PAE (32-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2008 SP2 (32-bit)", "Windows Server 2008 SP2 (32-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2008 SP2 (64-bit)", "Windows Server 2008 SP2 (64-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2008 R2 SP1 (64-bit)", "Windows Server 2008 R2 SP1 (64-bit)"); - _xenServer620GuestOsMap.put("Windows Server 2012 (64-bit)", "Windows Server 2012 (64-bit)"); - _xenServer620GuestOsMap.put("Windows Vista SP2 (32-bit)", "Windows Vista (32-bit)"); - _xenServer620GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); - _xenServer620GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)"); - _xenServer620GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)"); - _xenServer620GuestOsMap.put("Ubuntu 10.10 (32-bit)", "Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)"); - _xenServer620GuestOsMap.put("Ubuntu 10.10 (64-bit)", "Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)"); - _xenServer620GuestOsMap.put("Ubuntu 12.04 (32-bit)", "Ubuntu Precise Pangolin 12.04 (32-bit)"); - _xenServer620GuestOsMap.put("Ubuntu 12.04 (64-bit)", "Ubuntu Precise Pangolin 12.04 (64-bit)"); - _xenServer620GuestOsMap.put("Ubuntu 11.04 (32-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Ubuntu 11.04 (64-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Other Linux (32-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Other Linux (64-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Other (32-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Other (64-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Other CentOS (32-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Other CentOS (64-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Other Ubuntu (32-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Other Ubuntu (64-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Other SUSE Linux(32-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Other SUSE Linux(64-bit)", "Other install media"); - _xenServer620GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); - _xenServer620GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 4.5 (32-bit)", "CentOS 4.5 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 4.6 (32-bit)", "CentOS 4.6 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 4.7 (32-bit)", "CentOS 4.7 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 4.8 (32-bit)", "CentOS 4.8 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 5.0 (32-bit)", "CentOS 5 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 5.0 (64-bit)", "CentOS 5 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 5.1 (32-bit)", "CentOS 5 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 5.1 (64-bit)", "CentOS 5 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 5.2 (32-bit)", "CentOS 5 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 5.2 (64-bit)", "CentOS 5 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 5.3 (32-bit)", "CentOS 5 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 5.3 (64-bit)", "CentOS 5 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 5.4 (32-bit)", "CentOS 5 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 5.4 (64-bit)", "CentOS 5 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 5.5 (32-bit)", "CentOS 5 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 5.5 (64-bit)", "CentOS 5 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 5.6 (32-bit)", "CentOS 5 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 5.6 (64-bit)", "CentOS 5 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 5.7 (32-bit)", "CentOS 5 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 5.7 (64-bit)", "CentOS 5 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 5.8 (32-bit)", "CentOS 5 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 5.8 (64-bit)", "CentOS 5 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 5.9 (32-bit)", "CentOS 5 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 5.9 (64-bit)", "CentOS 5 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 6.0 (32-bit)", "CentOS 6 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 6.0 (64-bit)", "CentOS 6 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 6.1 (32-bit)", "CentOS 6 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 6.1 (64-bit)", "CentOS 6 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 6.2 (32-bit)", "CentOS 6 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 6.2 (64-bit)", "CentOS 6 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 6.3 (32-bit)", "CentOS 6 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 6.3 (64-bit)", "CentOS 6 (64-bit)"); + XenServer620GuestOsMap.put("CentOS 6.4 (32-bit)", "CentOS 6 (32-bit)"); + XenServer620GuestOsMap.put("CentOS 6.4 (64-bit)", "CentOS 6 (64-bit)"); + XenServer620GuestOsMap.put("Debian GNU/Linux 6(32-bit)", "Debian Squeeze 6.0 (32-bit)"); + XenServer620GuestOsMap.put("Debian GNU/Linux 6(64-bit)", "Debian Squeeze 6.0 (64-bit)"); + XenServer620GuestOsMap.put("Debian GNU/Linux 7(32-bit)", "Debian Wheezy 7.0 (32-bit)"); + XenServer620GuestOsMap.put("Debian GNU/Linux 7(64-bit)", "Debian Wheezy 7.0 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.0 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.0 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.1 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.1 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.2 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.2 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.3 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.3 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.4 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.4 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.5 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.5 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.6 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.6 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.7 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.7 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.8 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.8 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.9 (32-bit)", "Oracle Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 5.9 (64-bit)", "Oracle Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 6.0 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 6.0 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 6.1 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 6.1 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 6.2 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 6.2 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 6.3 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 6.3 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 6.4 (32-bit)", "Oracle Enterprise Linux 6 (32-bit)"); + XenServer620GuestOsMap.put("Oracle Enterprise Linux 6.4 (64-bit)", "Oracle Enterprise Linux 6 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", "Red Hat Enterprise Linux 4.5 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", "Red Hat Enterprise Linux 4.6 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", "Red Hat Enterprise Linux 4.7 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", "Red Hat Enterprise Linux 4.8 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.8 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.8 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.9 (32-bit)", "Red Hat Enterprise Linux 5 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 5.9 (64-bit)", "Red Hat Enterprise Linux 5 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.3 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.3 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.4 (32-bit)", "Red Hat Enterprise Linux 6 (32-bit)"); + XenServer620GuestOsMap.put("Red Hat Enterprise Linux 6.4 (64-bit)", "Red Hat Enterprise Linux 6 (64-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", "SUSE Linux Enterprise Server 10 SP1 (32-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", "SUSE Linux Enterprise Server 10 SP1 (64-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", "SUSE Linux Enterprise Server 10 SP2 (32-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", "SUSE Linux Enterprise Server 10 SP2 (64-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", "SUSE Linux Enterprise Server 10 SP3 (32-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", "SUSE Linux Enterprise Server 10 SP3 (64-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", "SUSE Linux Enterprise Server 10 SP4 (32-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", "SUSE Linux Enterprise Server 10 SP4 (64-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 (32-bit)", "SUSE Linux Enterprise Server 11 (32-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 (64-bit)", "SUSE Linux Enterprise Server 11 (64-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", "SUSE Linux Enterprise Server 11 SP1 (32-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", "SUSE Linux Enterprise Server 11 SP1 (64-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 SP2 (32-bit)", "SUSE Linux Enterprise Server 11 SP2 (32-bit)"); + XenServer620GuestOsMap.put("SUSE Linux Enterprise Server 11 SP2 (64-bit)", "SUSE Linux Enterprise Server 11 SP2 (64-bit)"); + XenServer620GuestOsMap.put("Windows 7 (32-bit)", "Windows 7 (32-bit)"); + XenServer620GuestOsMap.put("Windows 7 (64-bit)", "Windows 7 (64-bit)"); + XenServer620GuestOsMap.put("Windows 7 SP1 (32-bit)", "Windows 7 SP1 (32-bit)"); + XenServer620GuestOsMap.put("Windows 7 SP1 (64-bit)", "Windows 7 SP1 (64-bit)"); + XenServer620GuestOsMap.put("Windows 8 (32-bit)", "Windows 8 (32-bit)"); + XenServer620GuestOsMap.put("Windows 8 (64-bit)", "Windows 8 (64-bit)"); + XenServer620GuestOsMap.put("Windows Server 2003 SP2 (32-bit)", "Windows Server 2003 SP2 (32-bit)"); + XenServer620GuestOsMap.put("Windows Server 2003 SP2 (64-bit)", "Windows Server 2003 SP2 (64-bit)"); + XenServer620GuestOsMap.put("Windows Server 2003 PAE (32-bit)", "Windows Server 2003 PAE (32-bit)"); + XenServer620GuestOsMap.put("Windows Server 2003 Enterprise Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer620GuestOsMap.put("Windows Server 2003 Enterprise Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer620GuestOsMap.put("Windows Server 2003 DataCenter Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer620GuestOsMap.put("Windows Server 2003 DataCenter Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer620GuestOsMap.put("Windows Server 2003 Standard Edition(32-bit)", "Windows Server 2003 (32-bit)"); + XenServer620GuestOsMap.put("Windows Server 2003 Standard Edition(64-bit)", "Windows Server 2003 (64-bit)"); + XenServer620GuestOsMap.put("Windows Server 2008 SP2 (32-bit)", "Windows Server 2008 SP2 (32-bit)"); + XenServer620GuestOsMap.put("Windows Server 2008 SP2 (64-bit)", "Windows Server 2008 SP2 (64-bit)"); + XenServer620GuestOsMap.put("Windows Server 2008 R2 (64-bit)", "Windows Server 2008 R2 (64-bit)"); + XenServer620GuestOsMap.put("Windows Server 2008 R2 SP1 (64-bit)", "Windows Server 2008 R2 SP1 (64-bit)"); + XenServer620GuestOsMap.put("Windows Server 2012 (64-bit)", "Windows Server 2012 (64-bit)"); + XenServer620GuestOsMap.put("Windows Vista SP2 (32-bit)", "Windows Vista (32-bit)"); + XenServer620GuestOsMap.put("Windows XP SP3 (32-bit)", "Windows XP SP3 (32-bit)"); + XenServer620GuestOsMap.put("Ubuntu 10.04 (32-bit)", "Ubuntu Lucid Lynx 10.04 (32-bit)"); + XenServer620GuestOsMap.put("Ubuntu 10.04 (64-bit)", "Ubuntu Lucid Lynx 10.04 (64-bit)"); + XenServer620GuestOsMap.put("Ubuntu 10.10 (32-bit)", "Ubuntu Maverick Meerkat 10.10 (32-bit) (experimental)"); + XenServer620GuestOsMap.put("Ubuntu 10.10 (64-bit)", "Ubuntu Maverick Meerkat 10.10 (64-bit) (experimental)"); + XenServer620GuestOsMap.put("Ubuntu 12.04 (32-bit)", "Ubuntu Precise Pangolin 12.04 (32-bit)"); + XenServer620GuestOsMap.put("Ubuntu 12.04 (64-bit)", "Ubuntu Precise Pangolin 12.04 (64-bit)"); + XenServer620GuestOsMap.put("Ubuntu 11.04 (32-bit)", "Other install media"); + XenServer620GuestOsMap.put("Ubuntu 11.04 (64-bit)", "Other install media"); + XenServer620GuestOsMap.put("Other Linux (32-bit)", "Other install media"); + XenServer620GuestOsMap.put("Other Linux (64-bit)", "Other install media"); + XenServer620GuestOsMap.put("Other (32-bit)", "Other install media"); + XenServer620GuestOsMap.put("Other (64-bit)", "Other install media"); + XenServer620GuestOsMap.put("Other CentOS (32-bit)", "Other install media"); + XenServer620GuestOsMap.put("Other CentOS (64-bit)", "Other install media"); + XenServer620GuestOsMap.put("Other Ubuntu (32-bit)", "Other install media"); + XenServer620GuestOsMap.put("Other Ubuntu (64-bit)", "Other install media"); + XenServer620GuestOsMap.put("Other SUSE Linux(32-bit)", "Other install media"); + XenServer620GuestOsMap.put("Other SUSE Linux(64-bit)", "Other install media"); + XenServer620GuestOsMap.put("Other PV (32-bit)", "CentOS 5 (32-bit)"); + XenServer620GuestOsMap.put("Other PV (64-bit)", "CentOS 5 (64-bit)"); } public static class MemoryValues { @@ -1547,99 +1547,99 @@ public class CitrixHelper { } static { - _xenServer610GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Windows 7 (32-bit)", new MemoryValues(1024l, 4 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Windows 7 (64-bit)", new MemoryValues(2 * 1024l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 9 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Windows 7 (32-bit)", new MemoryValues(1024l, 4 * 1024l)); + XenServer610GuestOsMemoryMap.put("Windows 7 (64-bit)", new MemoryValues(2 * 1024l, 128 * 1024l)); //_xenServer610GuestOsMemoryMap.put("Windows 8 (32-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer610GuestOsMemoryMap.put("Windows 8 (64-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer610GuestOsMemoryMap.put("Windows Server 2003 (32-bit)", new MemoryValues(256l, 64*1024l)); //? @@ -1653,174 +1653,174 @@ public class CitrixHelper { //_xenServer610GuestOsMemoryMap.put("Windows Server 2003 Standard Edition(64-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer610GuestOsMemoryMap.put("Windows Server 2008 (32-bit)", new MemoryValues(512l, 16*1024l)); //? //_xenServer610GuestOsMemoryMap.put("Windows Server 2008 (64-bit)", new MemoryValues(512l, 16*1024l)); //? - _xenServer610GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer610GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); //_xenServer610GuestOsMemoryMap.put("Windows Server 2012 (64-bit)", new MemoryValues(512l, 16*1024l)); //? - _xenServer610GuestOsMemoryMap.put("Windows Server 8 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Windows Vista (32-bit)", new MemoryValues(1024l, 4 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(256l, 4 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); - _xenServer610GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("Windows Server 8 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer610GuestOsMemoryMap.put("Windows Vista (32-bit)", new MemoryValues(1024l, 4 * 1024l)); + XenServer610GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(256l, 4 * 1024l)); + XenServer610GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); + XenServer610GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); //_xenServer610GuestOsMemoryMap.put("Ubuntu 10.10 (32-bit)", new MemoryValues(512l, 16*1024l));//? //_xenServer610GuestOsMemoryMap.put("Ubuntu 10.10 (64-bit)", new MemoryValues(512l, 16*1024l)); //? - _xenServer610GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer610GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); - // _xenServer610GuestOsMemoryMap.put("Other Linux (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer610GuestOsMemoryMap.put("Other Linux (64-bit)", new MemoryValues(512l, 16*1024l)); + XenServer610GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer610GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); + // XenServer610GuestOsMemoryMap.put("Other Linux (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer610GuestOsMemoryMap.put("Other Linux (64-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer610GuestOsMemoryMap.put("Other (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer610GuestOsMemoryMap.put("Other (64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer610GuestOsMemoryMap.put("Other CentOS (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer610GuestOsMemoryMap.put("Other CentOS (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer610GuestOsMemoryMap.put("Other (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer610GuestOsMemoryMap.put("Other CentOS (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer610GuestOsMemoryMap.put("Other CentOS (64-bit)", new MemoryValues(512l, 16*1024l)); //_xenServer610GuestOsMemoryMap.put("Other Ubuntu (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer610GuestOsMemoryMap.put("Other Ubuntu (64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer610GuestOsMemoryMap.put("Other SUSE Linux(32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer610GuestOsMemoryMap.put("Other SUSE Linux(64-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer610GuestOsMemoryMap.put("Other PV (32-bit)", new MemoryValues(512l, 16*1024l)); - // _xenServer610GuestOsMemoryMap.put("Other PV (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer610GuestOsMemoryMap.put("Other Ubuntu (64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer610GuestOsMemoryMap.put("Other SUSE Linux(32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer610GuestOsMemoryMap.put("Other SUSE Linux(64-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer610GuestOsMemoryMap.put("Other PV (32-bit)", new MemoryValues(512l, 16*1024l)); + // XenServer610GuestOsMemoryMap.put("Other PV (64-bit)", new MemoryValues(512l, 16*1024l)); } static { - _xenServer620GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.8 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.8 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.9 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 5.9 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 6.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 6.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 6.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("CentOS 6.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.8 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.8 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.9 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.9 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.8 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.8 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.9 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.9 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); - _xenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.8 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.8 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.9 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 5.9 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 6.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 6.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 6.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("CentOS 6.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Debian GNU/Linux 6(32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer620GuestOsMemoryMap.put("Debian GNU/Linux 6(64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer620GuestOsMemoryMap.put("Debian GNU/Linux 7(32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Debian GNU/Linux 7(64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.8 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.8 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.9 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 5.9 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Oracle Enterprise Linux 6.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.5 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.6 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.7 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 4.8 (32-bit)", new MemoryValues(256l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.0 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.1 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.2 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.3 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.4 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.5 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.6 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.7 (64-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.8 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.8 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.9 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 5.9 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.0 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (32-bit)", new MemoryValues(512l, 8 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.1 (64-bit)", new MemoryValues(512l, 32 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("Red Hat Enterprise Linux 6.4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP3 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 10 SP4 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP2 (32-bit)", new MemoryValues(512l, 16 * 1024l)); + XenServer620GuestOsMemoryMap.put("SUSE Linux Enterprise Server 11 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows 7 (32-bit)", new MemoryValues(1024l, 4 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows 7 (64-bit)", new MemoryValues(2 * 1024l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows 7 SP1 (32-bit)", new MemoryValues(1024l, 4 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows 7 SP1 (64-bit)", new MemoryValues(2 * 1024l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows 8 (32-bit)", new MemoryValues(1024l, 4 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows 8 (64-bit)", new MemoryValues(2 * 1024l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows Server 2003 SP2 (32-bit)", new MemoryValues(256l, 64 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows Server 2003 SP2 (64-bit)", new MemoryValues(256l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows Server 2008 SP2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows Server 2008 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows Server 2008 R2 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows Server 2012 (64-bit)", new MemoryValues(512l, 128 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows Vista SP2 (32-bit)", new MemoryValues(1024l, 4 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(256l, 4 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); - _xenServer620GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows 7 (32-bit)", new MemoryValues(1024l, 4 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows 7 (64-bit)", new MemoryValues(2 * 1024l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows 7 SP1 (32-bit)", new MemoryValues(1024l, 4 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows 7 SP1 (64-bit)", new MemoryValues(2 * 1024l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows 8 (32-bit)", new MemoryValues(1024l, 4 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows 8 (64-bit)", new MemoryValues(2 * 1024l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows Server 2003 SP2 (32-bit)", new MemoryValues(256l, 64 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows Server 2003 SP2 (64-bit)", new MemoryValues(256l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows Server 2008 SP2 (32-bit)", new MemoryValues(512l, 64 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows Server 2008 SP2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows Server 2008 R2 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows Server 2008 R2 SP1 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows Server 2012 (64-bit)", new MemoryValues(512l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows Vista SP2 (32-bit)", new MemoryValues(1024l, 4 * 1024l)); + XenServer620GuestOsMemoryMap.put("Windows XP SP3 (32-bit)", new MemoryValues(256l, 4 * 1024l)); + XenServer620GuestOsMemoryMap.put("Ubuntu 10.04 (32-bit)", new MemoryValues(128l, 512l)); + XenServer620GuestOsMemoryMap.put("Ubuntu 10.04 (64-bit)", new MemoryValues(128l, 32 * 1024l)); //_xenServer620GuestOsMemoryMap.put("Ubuntu 10.10 (32-bit)", new MemoryValues(512l, 16*1024l));//? //_xenServer620GuestOsMemoryMap.put("Ubuntu 10.10 (64-bit)", new MemoryValues(512l, 16*1024l)); //? - _xenServer620GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); - _xenServer620GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); + XenServer620GuestOsMemoryMap.put("Ubuntu 12.04 (32-bit)", new MemoryValues(128l, 32 * 1024l)); + XenServer620GuestOsMemoryMap.put("Ubuntu 12.04 (64-bit)", new MemoryValues(128l, 128 * 1024l)); } public static String getXcpGuestOsType(String stdType) { - String guestOS = _xcp100GuestOsMap.get(stdType); + String guestOS = Xcp100GuestOsMap.get(stdType); if (guestOS == null) { s_logger.debug("Can't find the guest os: " + stdType + " mapping into XCP's guestOS type, start it as HVM guest"); guestOS = "Other install media"; @@ -1829,7 +1829,7 @@ public class CitrixHelper { } public static String getXcp160GuestOsType(String stdType) { - String guestOS = _xcp160GuestOsMap.get(stdType); + String guestOS = Xcp160GuestOsMap.get(stdType); if (guestOS == null) { s_logger.debug("Can't find the guest os: " + stdType + " mapping into XCP's guestOS type, start it as HVM guest"); guestOS = "Other install media"; @@ -1838,7 +1838,7 @@ public class CitrixHelper { } public static String getXenServerGuestOsType(String stdType, boolean bootFromCD) { - String guestOS = _xenServerGuestOsMap.get(stdType); + String guestOS = XenServerGuestOsMap.get(stdType); if (guestOS == null) { if (!bootFromCD) { s_logger.debug("Can't find the guest os: " + stdType + " mapping into XenServer 5.6 guestOS type, start it as HVM guest"); @@ -1852,7 +1852,7 @@ public class CitrixHelper { } public static String getXenServer56FP1GuestOsType(String stdType, boolean bootFromCD) { - String guestOS = _xenServer56FP1GuestOsMap.get(stdType); + String guestOS = XenServer56FP1GuestOsMap.get(stdType); if (guestOS == null) { if (!bootFromCD) { s_logger.debug("Can't find the guest os: " + stdType + " mapping into XenServer 5.6 FP1 guestOS type, start it as HVM guest"); @@ -1866,7 +1866,7 @@ public class CitrixHelper { } public static long getXenServer56FP1StaticMax(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer56FP1GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer56FP1GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } @@ -1874,7 +1874,7 @@ public class CitrixHelper { } public static long getXenServer56FP1StaticMin(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer56FP1GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer56FP1GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } @@ -1882,7 +1882,7 @@ public class CitrixHelper { } public static String getXenServer56SP2GuestOsType(String stdType, boolean bootFromCD) { - String guestOS = _xenServer56FP2GuestOsMap.get(stdType); + String guestOS = XenServer56FP2GuestOsMap.get(stdType); if (guestOS == null) { if (!bootFromCD) { s_logger.debug("Can't find the guest os: " + stdType + " mapping into XenServer 5.6 SP2 guestOS type, start it as HVM guest"); @@ -1896,7 +1896,7 @@ public class CitrixHelper { } public static long getXenServer56SP2StaticMax(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer56SP2GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer56SP2GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } @@ -1904,7 +1904,7 @@ public class CitrixHelper { } public static long getXenServer56SP2StaticMin(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer56SP2GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer56SP2GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } @@ -1912,7 +1912,7 @@ public class CitrixHelper { } public static String getXenServer600GuestOsType(String stdType, boolean bootFromCD) { - String guestOS = _xenServer600GuestOsMap.get(stdType); + String guestOS = XenServer600GuestOsMap.get(stdType); if (guestOS == null) { if (!bootFromCD) { s_logger.debug("Can't find the guest os: " + stdType + " mapping into XenServer 6.0.2 guestOS type, start it as HVM guest"); @@ -1927,7 +1927,7 @@ public class CitrixHelper { } public static long getXenServer600StaticMax(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer600GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer600GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } @@ -1935,7 +1935,7 @@ public class CitrixHelper { } public static long getXenServer600StaticMin(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer600GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer600GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } @@ -1943,7 +1943,7 @@ public class CitrixHelper { } public static String getXenServer602GuestOsType(String stdType, boolean bootFromCD) { - String guestOS = _xenServer602GuestOsMap.get(stdType); + String guestOS = XenServer602GuestOsMap.get(stdType); if (guestOS == null) { if (!bootFromCD) { s_logger.debug("Can't find the guest os: " + stdType + " mapping into XenServer 6.0.2 guestOS type, start it as HVM guest"); @@ -1958,7 +1958,7 @@ public class CitrixHelper { } public static long getXenServer602StaticMax(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer602GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer602GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } @@ -1966,7 +1966,7 @@ public class CitrixHelper { } public static long getXenServer602StaticMin(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer602GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer602GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } @@ -1974,7 +1974,7 @@ public class CitrixHelper { } public static String getXenServer610GuestOsType(String stdType, boolean bootFromCD) { - String guestOS = _xenServer610GuestOsMap.get(stdType); + String guestOS = XenServer610GuestOsMap.get(stdType); if (guestOS == null) { if (!bootFromCD) { s_logger.debug("Can't find the guest os: " + stdType + " mapping into XenServer 6.1.0 guestOS type, start it as HVM guest"); @@ -1988,7 +1988,7 @@ public class CitrixHelper { } public static long getXenServer610StaticMax(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer610GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer610GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } @@ -1996,7 +1996,7 @@ public class CitrixHelper { } public static long getXenServer610StaticMin(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer610GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer610GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } @@ -2004,7 +2004,7 @@ public class CitrixHelper { } public static String getXenServer620GuestOsType(String stdType, boolean bootFromCD) { - String guestOS = _xenServer620GuestOsMap.get(stdType); + String guestOS = XenServer620GuestOsMap.get(stdType); if (guestOS == null) { if (!bootFromCD) { s_logger.debug("Can't find the guest os: " + stdType + " mapping into XenServer 6.2.0 guestOS type, start it as HVM guest"); @@ -2018,7 +2018,7 @@ public class CitrixHelper { } public static long getXenServer620StaticMax(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer620GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer620GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } @@ -2026,7 +2026,7 @@ public class CitrixHelper { } public static long getXenServer620StaticMin(String stdType, boolean bootFromCD) { - MemoryValues recommendedMaxMinMemory = _xenServer620GuestOsMemoryMap.get(stdType); + MemoryValues recommendedMaxMinMemory = XenServer620GuestOsMemoryMap.get(stdType); if (recommendedMaxMinMemory == null) { return 0l; } diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 67b119bce7f..f38bb3cd8c5 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -156,21 +156,20 @@ import com.cloud.agent.api.ModifyStoragePoolAnswer; import com.cloud.agent.api.ModifyStoragePoolCommand; import com.cloud.agent.api.NetworkRulesSystemVmCommand; import com.cloud.agent.api.NetworkRulesVmSecondaryIpCommand; -import com.cloud.agent.api.OvsCreateGreTunnelCommand; import com.cloud.agent.api.OvsCreateGreTunnelAnswer; -import com.cloud.agent.api.OvsCreateTunnelCommand; -import com.cloud.agent.api.OvsDestroyTunnelCommand; -import com.cloud.agent.api.OvsSetupBridgeCommand; -import com.cloud.agent.api.OvsDestroyBridgeCommand; +import com.cloud.agent.api.OvsCreateGreTunnelCommand; import com.cloud.agent.api.OvsCreateTunnelAnswer; +import com.cloud.agent.api.OvsCreateTunnelCommand; import com.cloud.agent.api.OvsDeleteFlowCommand; -import com.cloud.agent.api.OvsSetTagAndFlowAnswer; +import com.cloud.agent.api.OvsDestroyBridgeCommand; +import com.cloud.agent.api.OvsDestroyTunnelCommand; import com.cloud.agent.api.OvsFetchInterfaceAnswer; -import com.cloud.agent.api.OvsSetTagAndFlowCommand; import com.cloud.agent.api.OvsFetchInterfaceCommand; +import com.cloud.agent.api.OvsSetTagAndFlowAnswer; +import com.cloud.agent.api.OvsSetTagAndFlowCommand; +import com.cloud.agent.api.OvsSetupBridgeCommand; import com.cloud.agent.api.PerformanceMonitorAnswer; import com.cloud.agent.api.PerformanceMonitorCommand; - import com.cloud.agent.api.PingCommand; import com.cloud.agent.api.PingRoutingCommand; import com.cloud.agent.api.PingRoutingWithNwGroupsCommand; @@ -298,15 +297,13 @@ import com.cloud.utils.StringUtils; import com.cloud.utils.Ternary; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.net.NetUtils; -import com.cloud.utils.StringUtils; +import com.cloud.utils.ssh.SSHCmdHelper; import com.cloud.vm.DiskProfile; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachine.PowerState; import com.cloud.vm.VirtualMachine.State; import com.cloud.vm.snapshot.VMSnapshot; -import com.cloud.utils.ssh.SSHCmdHelper; - /** * CitrixResourceBase encapsulates the calls to the XenServer Xapi process * to perform the required functionalities for CloudStack. @@ -322,7 +319,7 @@ import com.cloud.utils.ssh.SSHCmdHelper; @Local(value = ServerResource.class) public abstract class CitrixResourceBase implements ServerResource, HypervisorResource { private static final Logger s_logger = Logger.getLogger(CitrixResourceBase.class); - protected static final XenServerConnectionPool _connPool = XenServerConnectionPool.getInstance(); + protected static final XenServerConnectionPool ConnPool = XenServerConnectionPool.getInstance(); protected String _name; protected String _username; protected Queue _password = new LinkedList(); @@ -341,7 +338,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe protected int _wait; protected int _migratewait; protected String _instance; //instance name (default is usually "VM") - static final Random _rand = new Random(System.currentTimeMillis()); + static final Random Rand = new Random(System.currentTimeMillis()); protected boolean _securityGroupEnabled; protected IAgentControl _agentControl; @@ -355,8 +352,8 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe protected int _pollingIntervalInSeconds = 60; //Hypervisor specific params with generic value, may need to be overridden for specific versions - long _xs_memory_used = 128 * 1024 * 1024L; // xen hypervisor used 128 M - double _xs_virtualization_factor = 63.0 / 64.0; // 1 - virtualization overhead + long _xsMemoryUsed = 128 * 1024 * 1024L; // xen hypervisor used 128 M + double _xsVirtualizationFactor = 63.0 / 64.0; // 1 - virtualization overhead //static min values for guests on xen private static final long mem_128m = 134217728L; @@ -461,9 +458,9 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe Connection slaveConn = null; try { URL slaveUrl = null; - slaveUrl = _connPool.getURL(_host.ip); + slaveUrl = ConnPool.getURL(_host.ip); slaveConn = new Connection(slaveUrl, 10); - slaveSession = _connPool.slaveLocalLoginWithPassword(slaveConn, _username, _password); + slaveSession = ConnPool.slaveLocalLoginWithPassword(slaveConn, _username, _password); return true; } catch (Exception e) { } finally { @@ -659,87 +656,87 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe return execute((PvlanSetupCommand)cmd); } else if (clazz == SetMonitorServiceCommand.class) { return execute((SetMonitorServiceCommand)cmd); - } else if (clazz == PerformanceMonitorCommand.class) { - return execute((PerformanceMonitorCommand) cmd); + } else if (clazz == PerformanceMonitorCommand.class) { + return execute((PerformanceMonitorCommand)cmd); } else { return Answer.createUnsupportedCommandAnswer(cmd); } } - private Answer execute(PerformanceMonitorCommand cmd) { - Connection conn = getConnection(); - String perfMon = getPerfMon(conn, cmd.getParams(), cmd.getWait()); - if (perfMon == null) { - return new PerformanceMonitorAnswer(cmd, false, perfMon); - } else - return new PerformanceMonitorAnswer(cmd, true, perfMon); - } + private Answer execute(PerformanceMonitorCommand cmd) { + Connection conn = getConnection(); + String perfMon = getPerfMon(conn, cmd.getParams(), cmd.getWait()); + if (perfMon == null) { + return new PerformanceMonitorAnswer(cmd, false, perfMon); + } else + return new PerformanceMonitorAnswer(cmd, true, perfMon); + } - private String getPerfMon(Connection conn, Map params, - int wait) { - String result = null; - try { - result = callHostPluginAsync(conn, "vmopspremium", "asmonitor", 60, - params); - if (result != null) - return result; - } catch (Exception e) { - s_logger.error("Can not get performance monitor for AS due to ", e); - } - return null; - } + private String getPerfMon(Connection conn, Map params, + int wait) { + String result = null; + try { + result = callHostPluginAsync(conn, "vmopspremium", "asmonitor", 60, + params); + if (result != null) + return result; + } catch (Exception e) { + s_logger.error("Can not get performance monitor for AS due to ", e); + } + return null; + } - protected String callHostPluginAsync(Connection conn, String plugin, - String cmd, int wait, Map params) { - int timeout = wait * 1000; - Map args = new HashMap(); - Task task = null; - try { - for (String key : params.keySet()) { - args.put(key, params.get(key)); - } - if (s_logger.isTraceEnabled()) { - s_logger.trace("callHostPlugin executing for command " + cmd - + " with " + getArgsString(args)); - } - Host host = Host.getByUuid(conn, _host.uuid); - task = host.callPluginAsync(conn, plugin, cmd, args); - // poll every 1 seconds - waitForTask(conn, task, 1000, timeout); - checkForSuccess(conn, task); - String result = task.getResult(conn); - if (s_logger.isTraceEnabled()) { - s_logger.trace("callHostPlugin Result: " + result); - } - return result.replace("", "").replace("", "") - .replace("\n", ""); - } catch (Types.HandleInvalid e) { - s_logger.warn("callHostPlugin failed for cmd: " + cmd - + " with args " + getArgsString(args) - + " due to HandleInvalid clazz:" + e.clazz + ", handle:" - + e.handle); - } catch (XenAPIException e) { - s_logger.warn( - "callHostPlugin failed for cmd: " + cmd + " with args " - + getArgsString(args) + " due to " + e.toString(), - e); - } catch (XmlRpcException e) { - s_logger.warn( - "callHostPlugin failed for cmd: " + cmd + " with args " - + getArgsString(args) + " due to " + e.getMessage(), - e); - } finally { - if (task != null) { - try { - task.destroy(conn); - } catch (Exception e1) { - s_logger.warn("unable to destroy task(" + task.toString() - + ") on host(" + _host.uuid + ") due to ", e1); - } - } - } - return null; - } + protected String callHostPluginAsync(Connection conn, String plugin, + String cmd, int wait, Map params) { + int timeout = wait * 1000; + Map args = new HashMap(); + Task task = null; + try { + for (String key : params.keySet()) { + args.put(key, params.get(key)); + } + if (s_logger.isTraceEnabled()) { + s_logger.trace("callHostPlugin executing for command " + cmd + + " with " + getArgsString(args)); + } + Host host = Host.getByUuid(conn, _host.uuid); + task = host.callPluginAsync(conn, plugin, cmd, args); + // poll every 1 seconds + waitForTask(conn, task, 1000, timeout); + checkForSuccess(conn, task); + String result = task.getResult(conn); + if (s_logger.isTraceEnabled()) { + s_logger.trace("callHostPlugin Result: " + result); + } + return result.replace("", "").replace("", "") + .replace("\n", ""); + } catch (Types.HandleInvalid e) { + s_logger.warn("callHostPlugin failed for cmd: " + cmd + + " with args " + getArgsString(args) + + " due to HandleInvalid clazz:" + e.clazz + ", handle:" + + e.handle); + } catch (XenAPIException e) { + s_logger.warn( + "callHostPlugin failed for cmd: " + cmd + " with args " + + getArgsString(args) + " due to " + e.toString(), + e); + } catch (XmlRpcException e) { + s_logger.warn( + "callHostPlugin failed for cmd: " + cmd + " with args " + + getArgsString(args) + " due to " + e.getMessage(), + e); + } finally { + if (task != null) { + try { + task.destroy(conn); + } catch (Exception e1) { + s_logger.warn("unable to destroy task(" + task.toString() + + ") on host(" + _host.uuid + ") due to ", e1); + } + } + } + return null; + } protected void scaleVM(Connection conn, VM vm, VirtualMachineTO vmSpec, Host host) throws XenAPIException, XmlRpcException { @@ -769,7 +766,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe if (vmSpec.getLimitCpuUse()) { long utilization = 0; // max CPU cap, default is unlimited - utilization = (int) ((vmSpec.getMaxSpeed() * 0.99 * vmSpec.getCpus()) / _host.speed * 100); + utilization = (int)((vmSpec.getMaxSpeed() * 0.99 * vmSpec.getCpus()) / _host.speed * 100); //vm.addToVCPUsParamsLive(conn, "cap", Long.toString(utilization)); currently xenserver doesnot support Xapi to add VCPUs params live. callHostPlugin(conn, "vmops", "add_to_VCPUs_params_live", "key", "cap", "value", Long.toString(utilization), "vmname", vmSpec.getName()); } @@ -1016,7 +1013,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe vswitchNw = networks.iterator().next(); } if (!is_xcp()) - enableXenServerNetwork(conn, vswitchNw, "vswitch", "vswitch network"); + enableXenServerNetwork(conn, vswitchNw, "vswitch", "vswitch network"); _host.vswitchNetwork = vswitchNw; } return _host.vswitchNetwork; @@ -1051,7 +1048,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe nw = Network.create(conn, rec); // Plug dom0 vif only when creating network if (!is_xcp()) - enableXenServerNetwork(conn, nw, nwName, "tunnel network for account " + key); + enableXenServerNetwork(conn, nw, nwName, "tunnel network for account " + key); s_logger.debug("### Xen Server network for tunnels created:" + nwName); } else { nw = networks.iterator().next(); @@ -1087,12 +1084,12 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe } if (!configured) { // Plug dom0 vif only if not done before for network and host - if (!is_xcp()) - enableXenServerNetwork(conn, nw, nwName, "tunnel network for account " + key); + if (!is_xcp()) + enableXenServerNetwork(conn, nw, nwName, "tunnel network for account " + key); String result = callHostPlugin(conn, "ovstunnel", "setup_ovs_bridge", "bridge", bridge, - "key", String.valueOf(key), - "xs_nw_uuid", nw.getUuid(conn), - "cs_host_id", ((Long)hostId).toString()); + "key", String.valueOf(key), + "xs_nw_uuid", nw.getUuid(conn), + "cs_host_id", ((Long)hostId).toString()); //Note down the fact that the ovs bridge has been setup String[] res = result.split(":"); if (res.length != 2 || !res[0].equalsIgnoreCase("SUCCESS")) { @@ -1427,7 +1424,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe if (vmSpec.getLimitCpuUse()) { // CPU cap is per VM, so need to assign cap based on the number of vcpus - utilization = (int) ((vmSpec.getMaxSpeed() * 0.99 * vmSpec.getCpus()) / _host.speed * 100); + utilization = (int)((vmSpec.getMaxSpeed() * 0.99 * vmSpec.getCpus()) / _host.speed * 100); } vcpuParams.put("weight", Integer.toString(cpuWeight)); @@ -1488,9 +1485,9 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe protected void finalizeVmMetaData(VM vm, Connection conn, VirtualMachineTO vmSpec) throws Exception { Map details = vmSpec.getDetails(); - if ( details != null ) { + if (details != null) { String platformstring = details.get("platform"); - if (platformstring != null && !platformstring.isEmpty() ) { + if (platformstring != null && !platformstring.isEmpty()) { Map platform = StringUtils.stringToMap(platformstring); vm.setPlatform(conn, platform); } else { @@ -1508,11 +1505,11 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe } String xentoolsversion = details.get("hypervisortoolsversion"); - if ( xentoolsversion == null || !xentoolsversion.equalsIgnoreCase("xenserver61") ) { - Map platform = vm.getPlatform(conn); - platform.remove("device_id"); - vm.setPlatform(conn, platform); - } + if (xentoolsversion == null || !xentoolsversion.equalsIgnoreCase("xenserver61")) { + Map platform = vm.getPlatform(conn); + platform.remove("device_id"); + vm.setPlatform(conn, platform); + } } } @@ -4263,7 +4260,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe // network might be destroyed by other host } } - return new StopAnswer(cmd, "Stop VM " + vmName + " Succeed", platformstring ,true); + return new StopAnswer(cmd, "Stop VM " + vmName + " Succeed", platformstring, true); } } catch (Exception e) { String msg = "VM destroy failed in Stop " + vmName + " Command due to " + e.getMessage(); @@ -4640,7 +4637,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe } protected String generateTimeStamp() { - return new StringBuilder("CsCreateTime-").append(System.currentTimeMillis()).append("-").append(_rand.nextInt()).toString(); + return new StringBuilder("CsCreateTime-").append(System.currentTimeMillis()).append("-").append(Rand.nextInt()).toString(); } protected Pair parseTimestamp(String timeStampStr) { @@ -4957,11 +4954,11 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe break; } Host.Record hr = myself.getRecord(conn); - _host.product_version = hr.softwareVersion.get("product_version"); - if (_host.product_version == null) { - _host.product_version = hr.softwareVersion.get("platform_version"); + _host.productVersion = hr.softwareVersion.get("product_version"); + if (_host.productVersion == null) { + _host.productVersion = hr.softwareVersion.get("platform_version"); } else { - _host.product_version = _host.product_version.trim(); + _host.productVersion = _host.productVersion.trim(); } XsLocalNetwork privateNic = getManagementNetwork(conn); @@ -5154,7 +5151,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe cmd.setHypervisorType(HypervisorType.XenServer); cmd.setCluster(_cluster); cmd.setPoolSync(false); - cmd.setHostVmStateReport(this.getHostVmStateReport(conn)); + cmd.setHostVmStateReport(getHostVmStateReport(conn)); Pool pool; try { @@ -5948,7 +5945,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe String label = cmd.getLabel(); //FIXME: this is a tricky to pass the network checking in XCP. I temporary get default label from Host. if (is_xcp()) { - label = getLabel(); + label = getLabel(); } s_logger.debug("Will look for network with name-label:" + label + " on host " + _host.ip); Connection conn = getConnection(); @@ -6044,7 +6041,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe } public Connection getConnection() { - return _connPool.connect(_host.uuid, _host.pool, _host.ip, _username, _password, _wait); + return ConnPool.connect(_host.uuid, _host.pool, _host.ip, _username, _password, _wait); } protected void fillHostInfo(Connection conn, StartupRoutingCommand cmd) { @@ -6064,13 +6061,13 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe productBrand = hr.softwareVersion.get("platform_name"); } details.put("product_brand", productBrand); - details.put("product_version", _host.product_version); + details.put("product_version", _host.productVersion); if (hr.softwareVersion.get("product_version_text_short") != null) { details.put("product_version_text_short", hr.softwareVersion.get("product_version_text_short")); cmd.setHypervisorVersion(hr.softwareVersion.get("product_version_text_short")); - cmd.setHypervisorVersion(_host.product_version); + cmd.setHypervisorVersion(_host.productVersion); } if (_privateNetworkName != null) { details.put("private.network.device", _privateNetworkName); @@ -6108,7 +6105,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe } } - ram = (long)((ram - dom0Ram - _xs_memory_used) * _xs_virtualization_factor); + ram = (long)((ram - dom0Ram - _xsMemoryUsed) * _xsVirtualizationFactor); cmd.setMemory(ram); cmd.setDom0MinMemory(dom0Ram); @@ -6248,7 +6245,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe } private void CheckXenHostInfo() throws ConfigurationException { - Connection conn = _connPool.slaveConnect(_host.ip, _username, _password); + Connection conn = ConnPool.slaveConnect(_host.ip, _username, _password); if (conn == null) { throw new ConfigurationException("Can not create slave connection to " + _host.ip); } @@ -8020,7 +8017,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe newMasterRecord = entry.getValue(); s_logger.debug("New master for the XenPool is " + newMasterRecord.uuid + " : " + newMasterRecord.address); try { - _connPool.switchMaster(_host.ip, _host.pool, conn, newMaster, _username, _password, _wait); + ConnPool.switchMaster(_host.ip, _host.pool, conn, newMaster, _username, _password, _wait); mastermigrated = true; break; } catch (Exception e) { @@ -8160,7 +8157,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe public int speed; public Integer cpuSockets; public int cpus; - public String product_version; + public String productVersion; public String localSRuuid; @Override @@ -8342,10 +8339,10 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe State newState = entry.getValue().second(); String host_uuid = entry.getValue().first(); final Ternary oldState = oldStates.remove(vm); - + // check if platform changed - if (platform != null && oldState != null){ - if (!platform.equals(oldState.third()) && newState != State.Stopped && newState != State.Stopping){ + if (platform != null && oldState != null) { + if (!platform.equals(oldState.third()) && newState != State.Stopped && newState != State.Stopping) { s_logger.warn("Detecting a change in platform for " + vm); changes.put(vm, new Ternary(host_uuid, newState, platform)); @@ -8821,17 +8818,17 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe public void setRunLevel(int level) { } - private boolean is_xcp() { - Connection conn = getConnection(); - String result = callHostPlugin(conn, "ovstunnel", "is_xcp"); - if (result.equals("XCP")) - return true; - return false; - } + private boolean is_xcp() { + Connection conn = getConnection(); + String result = callHostPlugin(conn, "ovstunnel", "is_xcp"); + if (result.equals("XCP")) + return true; + return false; + } - private String getLabel() { - Connection conn = getConnection(); - String result = callHostPlugin(conn, "ovstunnel", "getLabel"); - return result; - } + private String getLabel() { + Connection conn = getConnection(); + String result = callHostPlugin(conn, "ovstunnel", "getLabel"); + return result; + } } diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56SP2Resource.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56SP2Resource.java index 89adf55a958..9e7d5dd09d0 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56SP2Resource.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56SP2Resource.java @@ -34,8 +34,8 @@ public class XenServer56SP2Resource extends XenServer56FP1Resource { public XenServer56SP2Resource() { super(); - _xs_memory_used = 128 * 1024 * 1024L; - _xs_virtualization_factor = 62.0 / 64.0; + _xsMemoryUsed = 128 * 1024 * 1024L; + _xsVirtualizationFactor = 62.0 / 64.0; } @Override diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java index 90c6003a7f9..e797449b0cb 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerConnectionPool.java @@ -840,16 +840,16 @@ public class XenServerConnectionPool { } @Override - protected Map dispatch(String method_call, Object[] method_params) throws XmlRpcException, XenAPIException { - if (method_call.equals("session.local_logout") || method_call.equals("session.slave_local_login_with_password") || method_call.equals("session.logout")) { - return super.dispatch(method_call, method_params); + protected Map dispatch(String methodCall, Object[] methodParams) throws XmlRpcException, XenAPIException { + if (methodCall.equals("session.local_logout") || methodCall.equals("session.slave_local_login_with_password") || methodCall.equals("session.logout")) { + return super.dispatch(methodCall, methodParams); } - if (method_call.equals("session.login_with_password")) { + if (methodCall.equals("session.login_with_password")) { int retries = 0; while (retries++ < _retries) { try { - return super.dispatch(method_call, method_params); + return super.dispatch(methodCall, methodParams); } catch (XmlRpcException e) { Throwable cause = e.getCause(); if (cause == null || !(cause instanceof SocketException)) { @@ -870,21 +870,21 @@ public class XenServerConnectionPool { int retries = 0; while (retries++ < _retries) { try { - return super.dispatch(method_call, method_params); + return super.dispatch(methodCall, methodParams); } catch (Types.SessionInvalid e) { - s_logger.debug("Session is invalid for method: " + method_call + " due to " + e.getMessage() + ". Reconnecting...retry=" + retries); + s_logger.debug("Session is invalid for method: " + methodCall + " due to " + e.getMessage() + ". Reconnecting...retry=" + retries); if (retries >= _retries) { removeConnect(_poolUuid); throw e; } loginWithPassword(this, _username, _password, APIVersion.latest().toString()); - method_params[0] = getSessionReference(); + methodParams[0] = getSessionReference(); } catch (XmlRpcClientException e) { - s_logger.debug("XmlRpcClientException for method: " + method_call + " due to " + e.getMessage()); + s_logger.debug("XmlRpcClientException for method: " + methodCall + " due to " + e.getMessage()); removeConnect(_poolUuid); throw e; } catch (XmlRpcException e) { - s_logger.debug("XmlRpcException for method: " + method_call + " due to " + e.getMessage() + ". Reconnecting...retry=" + retries); + s_logger.debug("XmlRpcException for method: " + methodCall + " due to " + e.getMessage() + ". Reconnecting...retry=" + retries); if (retries >= _retries) { removeConnect(_poolUuid); throw e; @@ -895,7 +895,7 @@ public class XenServerConnectionPool { throw e; } } catch (Types.HostIsSlave e) { - s_logger.debug("HostIsSlave Exception for method: " + method_call + " due to " + e.getMessage() + ". Reconnecting...retry=" + retries); + s_logger.debug("HostIsSlave Exception for method: " + methodCall + " due to " + e.getMessage() + ". Reconnecting...retry=" + retries); removeConnect(_poolUuid); throw e; } diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerPoolVms.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerPoolVms.java index 71c0e394dc4..d685c3f4321 100644 --- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerPoolVms.java +++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerPoolVms.java @@ -27,14 +27,14 @@ import com.cloud.vm.VirtualMachine.State; public class XenServerPoolVms { private static final Logger s_logger = Logger.getLogger(XenServerPoolVms.class); - private final Map>> _cluster_vms = + private final Map>> _clusterVms = new ConcurrentHashMap>>(); public HashMap> getClusterVmState(String clusterId) { - HashMap> _vms = _cluster_vms.get(clusterId); + HashMap> _vms = _clusterVms.get(clusterId); if (_vms == null) { HashMap> vmStates = new HashMap>(); - _cluster_vms.put(clusterId, vmStates); + _clusterVms.put(clusterId, vmStates); return vmStates; } else return _vms; @@ -51,8 +51,8 @@ public class XenServerPoolVms { return pv == null ? State.Stopped : pv.second(); // if a VM is absent on the cluster, it is effectively in stopped state. } - public void put(String clusterId, String hostUuid, String name, State state, String platform){ - HashMap> vms= getClusterVmState(clusterId); + public void put(String clusterId, String hostUuid, String name, State state, String platform) { + HashMap> vms = getClusterVmState(clusterId); vms.put(name, new Ternary(hostUuid, state, platform)); } @@ -66,9 +66,9 @@ public class XenServerPoolVms { vms.remove(name); } - public void putAll(String clusterId, HashMap> new_vms) { + public void putAll(String clusterId, HashMap> newVms) { HashMap> vms = getClusterVmState(clusterId); - vms.putAll(new_vms); + vms.putAll(newVms); } public int size(String clusterId) { @@ -79,7 +79,7 @@ public class XenServerPoolVms { @Override public String toString() { StringBuilder sbuf = new StringBuilder("PoolVms="); - for (HashMap> clusterVM : _cluster_vms.values()) { + for (HashMap> clusterVM : _clusterVms.values()) { for (String vmname : clusterVM.keySet()) { sbuf.append(vmname).append("-").append(clusterVM.get(vmname).second()).append(","); } diff --git a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/BigSwitchVnsApi.java b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/BigSwitchVnsApi.java index a2e1b969bb0..44445992858 100644 --- a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/BigSwitchVnsApi.java +++ b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/BigSwitchVnsApi.java @@ -47,8 +47,8 @@ import com.google.gson.reflect.TypeToken; public class BigSwitchVnsApi { private static final Logger s_logger = Logger.getLogger(BigSwitchVnsApi.class); - private final static String _protocol = "http"; - private final static String _nsBaseUri = "/networkService/v1.1"; + private final static String s_protocol = "http"; + private final static String s_nsBaseUri = "/networkService/v1.1"; private final static String CONTENT_TYPE = "Content-Type"; private final static String ACCEPT = "Accept"; private final static String CONTENT_JSON = "application/json"; @@ -70,7 +70,7 @@ public class BigSwitchVnsApi { protected HttpMethod createMethod(String type, String uri, int port) throws BigSwitchVnsApiException { String url; try { - url = new URL(_protocol, _host, port, uri).toString(); + url = new URL(s_protocol, _host, port, uri).toString(); } catch (MalformedURLException e) { s_logger.error("Unable to build BigSwitch API URL", e); throw new BigSwitchVnsApiException("Unable to build v API URL", e); @@ -109,44 +109,44 @@ public class BigSwitchVnsApi { } public void createNetwork(NetworkData network) throws BigSwitchVnsApiException { - String uri = _nsBaseUri + "/tenants/" + network.getNetwork().getTenant_id() + "/networks"; + String uri = s_nsBaseUri + "/tenants/" + network.getNetwork().getTenantId() + "/networks"; executeCreateObject(network, new TypeToken() { }.getType(), uri, Collections. emptyMap()); } public void deleteNetwork(String tenantId, String networkId) throws BigSwitchVnsApiException { - String uri = _nsBaseUri + "/tenants/" + tenantId + "/networks/" + networkId; + String uri = s_nsBaseUri + "/tenants/" + tenantId + "/networks/" + networkId; executeDeleteObject(uri); } public void createPort(String networkUuid, PortData port) throws BigSwitchVnsApiException { - String uri = _nsBaseUri + "/tenants/" + port.getPort().getTenant_id() + "/networks/" + networkUuid + "/ports"; + String uri = s_nsBaseUri + "/tenants/" + port.getPort().getTenantId() + "/networks/" + networkUuid + "/ports"; executeCreateObject(port, new TypeToken() { }.getType(), uri, Collections. emptyMap()); } public void modifyPort(String networkId, PortData port) throws BigSwitchVnsApiException { - String uri = _nsBaseUri + "/tenants/" + port.getPort().getTenant_id() + "/networks/" + networkId + "/ports"; + String uri = s_nsBaseUri + "/tenants/" + port.getPort().getTenantId() + "/networks/" + networkId + "/ports"; executeUpdateObject(port, uri, Collections. emptyMap()); } public void deletePort(String tenantId, String networkId, String portId) throws BigSwitchVnsApiException { - String uri = _nsBaseUri + "/tenants/" + tenantId + "/networks/" + networkId + "/ports/" + portId; + String uri = s_nsBaseUri + "/tenants/" + tenantId + "/networks/" + networkId + "/ports/" + portId; executeDeleteObject(uri); } public void modifyPortAttachment(String tenantId, String networkId, String portId, AttachmentData attachment) throws BigSwitchVnsApiException { - String uri = _nsBaseUri + "/tenants/" + tenantId + "/networks/" + networkId + "/ports/" + portId + "/attachment"; + String uri = s_nsBaseUri + "/tenants/" + tenantId + "/networks/" + networkId + "/ports/" + portId + "/attachment"; executeUpdateObject(attachment, uri, Collections. emptyMap()); } public void deletePortAttachment(String tenantId, String networkId, String portId) throws BigSwitchVnsApiException { - String uri = _nsBaseUri + "/tenants/" + tenantId + "/networks/" + networkId + "/ports/" + portId + "/attachment"; + String uri = s_nsBaseUri + "/tenants/" + tenantId + "/networks/" + networkId + "/ports/" + portId + "/attachment"; executeDeleteObject(uri); } public ControlClusterStatus getControlClusterStatus() throws BigSwitchVnsApiException { - String uri = _nsBaseUri + "/health"; + String uri = s_nsBaseUri + "/health"; ControlClusterStatus ccs = executeRetrieveObject(new TypeToken() { }.getType(), uri, 80, null); ccs.setStatus(true); diff --git a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/NetworkData.java b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/NetworkData.java index d4e97ac5428..e44c0f4f7df 100644 --- a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/NetworkData.java +++ b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/NetworkData.java @@ -17,20 +17,20 @@ package com.cloud.network.bigswitch; public class NetworkData { - private Network network; + private final Network network; public Network getNetwork() { - return this.network; + return network; } public NetworkData() { - this.network = new Network(); + network = new Network(); } public class Network { private String id; private String name; - private String tenant_id; + private String tenantId; private int vlan; private String gateway; private String state; @@ -43,20 +43,20 @@ public class NetworkData { this.id = id; } - public String getDisplay_name() { + public String getDisplayName() { return name; } - public void setDisplay_name(String display_name) { - this.name = display_name; + public void setDisplay_name(String displayName) { + name = displayName; } - public String getTenant_id() { - return tenant_id; + public String getTenantId() { + return tenantId; } - public void setTenant_id(String tenant_id) { - this.tenant_id = tenant_id; + public void setTenantId(String tenantId) { + this.tenantId = tenantId; } public int getVlan() { diff --git a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/PortData.java b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/PortData.java index 3c746c5b8e8..d228d37caac 100644 --- a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/PortData.java +++ b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/bigswitch/PortData.java @@ -30,7 +30,7 @@ public class PortData { public class Port { private String id; private String name; - private String tenant_id; + private String tenantId; private String state; public String getId() { @@ -49,12 +49,12 @@ public class PortData { this.name = name; } - public String getTenant_id() { - return tenant_id; + public String getTenantId() { + return tenantId; } - public void setTenant_id(String tenant_id) { - this.tenant_id = tenant_id; + public void setTenantId(String tenantId) { + this.tenantId = tenantId; } public String getState() { diff --git a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/resource/BigSwitchVnsResource.java b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/resource/BigSwitchVnsResource.java index bee3f00c5f1..223972e2edc 100644 --- a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/resource/BigSwitchVnsResource.java +++ b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/resource/BigSwitchVnsResource.java @@ -187,7 +187,7 @@ public class BigSwitchVnsResource extends ManagerBase implements ServerResource private Answer executeRequest(CreateVnsNetworkCommand cmd, int numRetries) { NetworkData network = new NetworkData(); - network.getNetwork().setTenant_id(cmd.getTenantUuid()); + network.getNetwork().setTenantId(cmd.getTenantUuid()); network.getNetwork().setUuid(cmd.getNetworkUuid()); network.getNetwork().setDisplay_name(truncate("vns-cloudstack-" + cmd.getName(), 64)); network.getNetwork().setVlan(cmd.getVlan()); @@ -222,7 +222,7 @@ public class BigSwitchVnsResource extends ManagerBase implements ServerResource PortData port = new PortData(); port.getPort().setId(cmd.getPortUuid()); port.getPort().setName(cmd.getPortName()); - port.getPort().setTenant_id(cmd.getTenantUuid()); + port.getPort().setTenantId(cmd.getTenantUuid()); try { _bigswitchVnsApi.createPort(cmd.getNetworkUuid(), port); @@ -270,7 +270,7 @@ public class BigSwitchVnsResource extends ManagerBase implements ServerResource PortData port = new PortData(); port.getPort().setId(cmd.getPortUuid()); port.getPort().setName(cmd.getPortName()); - port.getPort().setTenant_id(cmd.getTenantUuid()); + port.getPort().setTenantId(cmd.getTenantUuid()); try { _bigswitchVnsApi.modifyPort(cmd.getNetworkUuid(), port); diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/ConfigureNexusVsmForAsaCommand.java b/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/ConfigureNexusVsmForAsaCommand.java index 2994982534b..fba9942cda9 100755 --- a/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/ConfigureNexusVsmForAsaCommand.java +++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/ConfigureNexusVsmForAsaCommand.java @@ -51,47 +51,47 @@ public class ConfigureNexusVsmForAsaCommand extends Command { return _vlanId; } - public void setVlanId(long _vlanId) { - this._vlanId = _vlanId; + public void setVlanId(long vlanId) { + this._vlanId = vlanId; } public String getIpAddress() { return _ipAddress; } - public void setIpAddress(String _ipAddress) { - this._ipAddress = _ipAddress; + public void setIpAddress(String ipAddress) { + this._ipAddress = ipAddress; } public String getVsmUsername() { return _vsmUsername; } - public void setVsmUsername(String _vsmUsername) { - this._vsmUsername = _vsmUsername; + public void setVsmUsername(String vsmUsername) { + this._vsmUsername = vsmUsername; } public String getVsmPassword() { return _vsmPassword; } - public void setVsmPassword(String _vsmPassword) { - this._vsmPassword = _vsmPassword; + public void setVsmPassword(String vsmPassword) { + this._vsmPassword = vsmPassword; } public String getVsmIp() { return _vsmIp; } - public void setVsmIp(String _vsmIp) { - this._vsmIp = _vsmIp; + public void setVsmIp(String vsmIp) { + this._vsmIp = vsmIp; } public String getAsaInPortProfile() { return _asaInPortProfile; } - public void setAsaInPortProfile(String _asaInPortProfile) { - this._asaInPortProfile = _asaInPortProfile; + public void setAsaInPortProfile(String asaInPortProfile) { + this._asaInPortProfile = asaInPortProfile; } } diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/CreateLogicalEdgeFirewallCommand.java b/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/CreateLogicalEdgeFirewallCommand.java index 166323d7f60..89e411bddaa 100755 --- a/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/CreateLogicalEdgeFirewallCommand.java +++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/agent/api/CreateLogicalEdgeFirewallCommand.java @@ -27,7 +27,7 @@ public class CreateLogicalEdgeFirewallCommand extends Command { private String _publicIp; private String _internalIp; private String _publicSubnet; - private String _internalSubnet; + private String internalSubnet; private List _publicGateways; public CreateLogicalEdgeFirewallCommand(long vlanId, String publicIp, String internalIp, String publicSubnet, String internalSubnet) { @@ -78,11 +78,11 @@ public class CreateLogicalEdgeFirewallCommand extends Command { } public String getInternalSubnet() { - return _internalSubnet; + return internalSubnet; } - public void setInternalSubnet(String _internalSubnet) { - this._internalSubnet = _internalSubnet; + public void setInternalSubnet(String internalSubnet) { + this.internalSubnet = internalSubnet; } public List getPublicGateways() { diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/cisco/CiscoVnmcConnectionImpl.java b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/cisco/CiscoVnmcConnectionImpl.java index abdf00ea014..cb34b7293dd 100644 --- a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/cisco/CiscoVnmcConnectionImpl.java +++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/cisco/CiscoVnmcConnectionImpl.java @@ -41,12 +41,12 @@ import com.cloud.utils.script.Script; public class CiscoVnmcConnectionImpl implements CiscoVnmcConnection { - private String _ip; - private String _username; - private String _password; + private final String _ip; + private final String _username; + private final String _password; private String _cookie; - private final Logger s_logger = Logger.getLogger(CiscoVnmcConnectionImpl.class); + private static final Logger s_logger = Logger.getLogger(CiscoVnmcConnectionImpl.class); private enum VnmcXml { LOGIN("login.xml", "mgmt-controller"), @@ -108,13 +108,12 @@ public class CiscoVnmcConnectionImpl implements CiscoVnmcConnection { ASSIGN_ASA1000V("assoc-asa1000v.xml", "resource-mgr"), UNASSIGN_ASA1000V("disassoc-asa1000v.xml", "resource-mgr"); - private String scriptsDir = "scripts/network/cisco"; + private final String scriptsDir = "scripts/network/cisco"; private String xml; private String service; - private final Logger s_logger = Logger.getLogger(CiscoVnmcConnectionImpl.class); private VnmcXml(String filename, String service) { - this.xml = getXml(filename); + xml = getXml(filename); this.service = service; } @@ -153,9 +152,9 @@ public class CiscoVnmcConnectionImpl implements CiscoVnmcConnection { } public CiscoVnmcConnectionImpl(String hostIp, String userName, String password) { - this._ip = hostIp; - this._username = userName; - this._password = password; + _ip = hostIp; + _username = userName; + _password = password; } diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElementService.java b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElementService.java index 12f3ea55ad1..8388bb89bb5 100644 --- a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElementService.java +++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/element/CiscoVnmcElementService.java @@ -32,7 +32,7 @@ public interface CiscoVnmcElementService extends PluggableService { public CiscoVnmcController addCiscoVnmcResource(AddCiscoVnmcResourceCmd cmd); - public CiscoVnmcResourceResponse createCiscoVnmcResourceResponse(CiscoVnmcController CiscoVnmcResourceVO); + public CiscoVnmcResourceResponse createCiscoVnmcResourceResponse(CiscoVnmcController ciscoVnmcResourceVO); boolean deleteCiscoVnmcResource(DeleteCiscoVnmcResourceCmd cmd); diff --git a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/CiscoVnmcResource.java b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/CiscoVnmcResource.java index aad9c90e524..ed75871965a 100644 --- a/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/CiscoVnmcResource.java +++ b/plugins/network-elements/cisco-vnmc/src/com/cloud/network/resource/CiscoVnmcResource.java @@ -78,10 +78,10 @@ public class CiscoVnmcResource implements ServerResource { private CiscoVnmcConnectionImpl _connection; public void setConnection(CiscoVnmcConnectionImpl connection) { - this._connection = connection; + _connection = connection; } - private final Logger s_logger = Logger.getLogger(CiscoVnmcResource.class); + private static final Logger s_logger = Logger.getLogger(CiscoVnmcResource.class); @Override public Answer executeRequest(Command cmd) { diff --git a/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java b/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java index 15333304b1e..56900feeaeb 100644 --- a/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java +++ b/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java @@ -205,8 +205,8 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast NicDao _nicDao; String _instance; - static final private String _elbVmNamePrefix = "l"; - static final private String _systemVmType = "elbvm"; + static final private String ElbVmNamePrefix = "l"; + static final private String SystemVmType = "elbvm"; boolean _enabled; TrafficType _frontendTrafficType = TrafficType.Guest; @@ -496,7 +496,7 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast } elbVm = - new DomainRouterVO(id, _elasticLbVmOffering.getId(), vrProvider.getId(), VirtualMachineName.getSystemVmName(id, _instance, _elbVmNamePrefix), + new DomainRouterVO(id, _elasticLbVmOffering.getId(), vrProvider.getId(), VirtualMachineName.getSystemVmName(id, _instance, ElbVmNamePrefix), template.getId(), template.getHypervisorType(), template.getGuestOSId(), owner.getDomainId(), owner.getId(), false, 0, false, RedundantState.UNKNOWN, _elasticLbVmOffering.getOfferHA(), false, VirtualMachine.Type.ElasticLoadBalancerVm, null); elbVm.setRole(Role.LB); @@ -779,7 +779,7 @@ public class ElasticLoadBalancerManagerImpl extends ManagerBase implements Elast DataCenter dc = dest.getDataCenter(); StringBuilder buf = profile.getBootArgsBuilder(); - buf.append(" template=domP type=" + _systemVmType); + buf.append(" template=domP type=" + SystemVmType); buf.append(" name=").append(profile.getHostName()); NicProfile controlNic = null; String defaultDns1 = null; diff --git a/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java index 1a591e1da57..1cd6851b582 100644 --- a/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java +++ b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java @@ -322,7 +322,7 @@ public class F5ExternalLoadBalancerElement extends ExternalLoadBalancerDeviceMan String deviceType = NetworkDevice.F5BigIpLoadBalancer.getName(); lbDeviceVO = addExternalLoadBalancer(pNetwork.getId(), cmd.getUrl(), cmd.getUsername(), cmd.getPassword(), - deviceType, new F5BigIpResource(), false, false, null, null); + deviceType, new F5BigIpResource(), false, false, null, null); if (lbDeviceVO != null) { lbHost = _hostDao.findById(lbDeviceVO.getHostId()); @@ -376,7 +376,7 @@ public class F5ExternalLoadBalancerElement extends ExternalLoadBalancerDeviceMan } return addExternalLoadBalancer(cmd.getPhysicalNetworkId(), cmd.getUrl(), cmd.getUsername(), cmd.getPassword(), - deviceName, new F5BigIpResource(), false, false, null, + deviceName, new F5BigIpResource(), false, false, null, null); } diff --git a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java index 4ceb810525b..b2030a93f60 100644 --- a/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java +++ b/plugins/network-elements/internal-loadbalancer/src/org/apache/cloudstack/network/lb/InternalLoadBalancerVMManagerImpl.java @@ -118,7 +118,7 @@ import com.cloud.vm.dao.NicDao; @Local(value = {InternalLoadBalancerVMManager.class, InternalLoadBalancerVMService.class}) public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements InternalLoadBalancerVMManager, InternalLoadBalancerVMService, VirtualMachineGuru { private static final Logger s_logger = Logger.getLogger(InternalLoadBalancerVMManagerImpl.class); - static final private String _internalLbVmNamePrefix = "b"; + static final private String InternalLbVmNamePrefix = "b"; private String _instance; private String _mgmtHost; @@ -759,7 +759,7 @@ public class InternalLoadBalancerVMManagerImpl extends ManagerBase implements In } internalLbVm = - new DomainRouterVO(id, routerOffering.getId(), internalLbProviderId, VirtualMachineName.getSystemVmName(id, _instance, _internalLbVmNamePrefix), + new DomainRouterVO(id, routerOffering.getId(), internalLbProviderId, VirtualMachineName.getSystemVmName(id, _instance, InternalLbVmNamePrefix), template.getId(), template.getHypervisorType(), template.getGuestOSId(), owner.getDomainId(), owner.getId(), false, 0, false, RedundantState.UNKNOWN, false, false, VirtualMachine.Type.InternalLoadBalancerVm, vpcId); internalLbVm.setRole(Role.INTERNAL_LB_VM); diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java index e6a06969ecf..5adbacdbbe4 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailElementImpl.java @@ -65,7 +65,7 @@ import com.cloud.vm.dao.NicDao; @Local(value = {ContrailElement.class, StaticNatServiceProvider.class}) public class ContrailElementImpl extends AdapterBase implements ContrailElement, IpDeployer, StaticNatServiceProvider { - private static final Map> _capabilities = InitCapabilities(); + private final Map> _capabilities = InitCapabilities(); @Inject ContrailManager _manager; diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java index ea52be9d912..079035b9864 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailGuru.java @@ -70,7 +70,7 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru { NicDao _nicDao; private static final Logger s_logger = Logger.getLogger(ContrailGuru.class); - private static final TrafficType[] _trafficTypes = {TrafficType.Guest}; + private static final TrafficType[] TrafficTypes = {TrafficType.Guest}; private boolean canHandle(NetworkOffering offering) { return (offering.getName().equals(ContrailManager.offeringName)); @@ -303,12 +303,12 @@ public class ContrailGuru extends AdapterBase implements NetworkGuru { @Override public TrafficType[] getSupportedTrafficType() { - return _trafficTypes; + return TrafficTypes; } @Override public boolean isMyTrafficType(TrafficType type) { - for (TrafficType t : _trafficTypes) { + for (TrafficType t : TrafficTypes) { if (t == type) { return true; } diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManager.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManager.java index 98b02b8f96c..335299e1776 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManager.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManager.java @@ -61,7 +61,7 @@ public interface ContrailManager { public void findInfrastructureNetworks(PhysicalNetworkVO phys, List dbList); - public String getPhysicalNetworkName(PhysicalNetworkVO phys_net); + public String getPhysicalNetworkName(PhysicalNetworkVO physNet); public String getCanonicalName(Network net); @@ -93,9 +93,9 @@ public interface ContrailManager { public boolean isSystemDefaultNetwork(NetworkVO dbNet); - public String getVifNameByVmName(String vm_name, Integer device_id); + public String getVifNameByVmName(String vmName, Integer deviceId); - public String getVifNameByVmUuid(String vm_uuid, Integer device_id); + public String getVifNameByVmUuid(String vmUuid, Integer deviceId); public ApiConnector getApiConnector(); diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManagerImpl.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManagerImpl.java index abf2dd09b24..ed5859494f6 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManagerImpl.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ContrailManagerImpl.java @@ -248,8 +248,8 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager } @Override - public String getPhysicalNetworkName(PhysicalNetworkVO phys_net) { - String physname = phys_net.getName(); + public String getPhysicalNetworkName(PhysicalNetworkVO physNet) { + String physname = physNet.getName(); physname = physname.replaceAll("\\s", "").replace("_", ""); return physname; } @@ -358,7 +358,7 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager final TrafficType[] ttypes = {TrafficType.Control, // maps to __link_local__ TrafficType.Management, // maps to ip-fabric TrafficType.Public, TrafficType.Storage // maps to ip-fabric - }; + }; for (int i = 0; i < ttypes.length; i++) { List phys_nets; @@ -619,16 +619,16 @@ public class ContrailManagerImpl extends ManagerBase implements ContrailManager } @Override - public String getVifNameByVmName(String vm_name, Integer device_id) { - String vif_name = vm_name + "-" + device_id.toString(); + public String getVifNameByVmName(String vmName, Integer deviceId) { + String vif_name = vmName + "-" + deviceId.toString(); return vif_name; } @Override - public String getVifNameByVmUuid(String vm_uuid, Integer device_id) { - VMInstanceVO vm = _vmInstanceDao.findByUuid(vm_uuid); + public String getVifNameByVmUuid(String vmUuid, Integer deviceId) { + VMInstanceVO vm = _vmInstanceDao.findByUuid(vmUuid); if (vm != null) { - return vm.getInstanceName() + "-" + device_id.toString(); + return vm.getInstanceName() + "-" + deviceId.toString(); } return null; } diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/EventUtils.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/EventUtils.java index a06b0b35746..29b58fb7d78 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/EventUtils.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/EventUtils.java @@ -33,7 +33,6 @@ import com.cloud.event.ActionEvent; import com.cloud.event.Event; import com.cloud.event.EventCategory; import com.cloud.event.EventTypes; -import com.cloud.server.ManagementServer; import com.cloud.server.ManagementService; import com.cloud.utils.component.ComponentContext; import com.cloud.utils.component.ComponentMethodInterceptor; @@ -42,7 +41,7 @@ import com.cloud.utils.component.ComponentMethodInterceptor; public class EventUtils { private static final Logger s_logger = Logger.getLogger(EventUtils.class); - protected static MessageBus _messageBus = null; + protected static MessageBus s_messageBus = null; public EventUtils() { } @@ -54,7 +53,7 @@ public class EventUtils { } try { - _messageBus = ComponentContext.getComponent(MessageBusBase.class); + s_messageBus = ComponentContext.getComponent(MessageBusBase.class); } catch (NoSuchBeanDefinitionException nbe) { return; // no provider is configured to provide events bus, so just return } @@ -68,7 +67,7 @@ public class EventUtils { eventDescription.put("details", details); event.setDescription(eventDescription); try { - _messageBus.publish(EventTypes.getEntityForEvent(eventType), eventType, null, event); + s_messageBus.publish(EventTypes.getEntityForEvent(eventType), eventType, null, event); } catch (Exception e) { s_logger.warn("Failed to publish action event on the the event bus."); } diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java index d3d9366ce4b..cfc6fb62a11 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ManagementNetworkGuru.java @@ -48,11 +48,11 @@ import com.cloud.utils.PropertiesUtil; @Component public class ManagementNetworkGuru extends ContrailGuru { private static final Logger s_logger = Logger.getLogger(ManagementNetworkGuru.class); - private static final TrafficType[] _trafficTypes = {TrafficType.Management}; + private static final TrafficType[] TrafficTypes = {TrafficType.Management}; private final String configuration = "contrail.properties"; - private String _mgmt_cidr; - private String _mgmt_gateway; + private String _mgmtCidr; + private String _mgmtGateway; @Override public String getName() { @@ -86,20 +86,20 @@ public class ManagementNetworkGuru extends ContrailGuru { } catch (IOException e) { } } - _mgmt_cidr = configProps.getProperty("management.cidr"); - _mgmt_gateway = configProps.getProperty("management.gateway"); - s_logger.info("Management network " + _mgmt_cidr + " gateway: " + _mgmt_gateway); + _mgmtCidr = configProps.getProperty("management.cidr"); + _mgmtGateway = configProps.getProperty("management.gateway"); + s_logger.info("Management network " + _mgmtCidr + " gateway: " + _mgmtGateway); return true; } @Override public TrafficType[] getSupportedTrafficType() { - return _trafficTypes; + return TrafficTypes; } @Override public boolean isMyTrafficType(TrafficType type) { - for (TrafficType t : _trafficTypes) { + for (TrafficType t : TrafficTypes) { if (t == type) { return true; } @@ -119,11 +119,11 @@ public class ManagementNetworkGuru extends ContrailGuru { return null; } NetworkVO network = - new NetworkVO(offering.getTrafficType(), Mode.Dhcp, BroadcastDomainType.Lswitch, offering.getId(), Network.State.Allocated, plan.getDataCenterId(), - plan.getPhysicalNetworkId()); - if (_mgmt_cidr != null) { - network.setCidr(_mgmt_cidr); - network.setGateway(_mgmt_gateway); + new NetworkVO(offering.getTrafficType(), Mode.Dhcp, BroadcastDomainType.Lswitch, offering.getId(), Network.State.Allocated, plan.getDataCenterId(), + plan.getPhysicalNetworkId()); + if (_mgmtCidr != null) { + network.setCidr(_mgmtCidr); + network.setGateway(_mgmtGateway); } s_logger.debug("Allocated network " + userSpecified.getName() + (network.getCidr() == null ? "" : " subnet: " + network.getCidr())); return network; diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServerDBSyncImpl.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServerDBSyncImpl.java index 22543dd542f..52fe31e5693 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServerDBSyncImpl.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServerDBSyncImpl.java @@ -93,7 +93,7 @@ public class ServerDBSyncImpl implements ServerDBSync { DBSyncGeneric _dbSync; Class[] _vncClasses; // Read-Write (true) or Read-Only mode. - boolean _rw_mode; + boolean _rwMode; private final ReentrantLock _lockSyncMode = new ReentrantLock(); ServerDBSyncImpl() { @@ -122,7 +122,7 @@ public class ServerDBSyncImpl implements ServerDBSync { /* lock the sync mode*/ _lockSyncMode.lock(); - _rw_mode = syncMode == DBSyncGeneric.SYNC_MODE_UPDATE; + _rwMode = syncMode == DBSyncGeneric.SYNC_MODE_UPDATE; _dbSync.setSyncMode(syncMode); if (_dbSync.getSyncMode() == DBSyncGeneric.SYNC_MODE_CHECK) { @@ -501,7 +501,7 @@ public class ServerDBSyncImpl implements ServerDBSync { VirtualNetworkModel vnModel = new VirtualNetworkModel(dbNet, dbNet.getUuid(), _manager.getCanonicalName(dbNet), dbNet.getTrafficType()); vnModel.build(_manager.getModelController(), dbNet); - if (_rw_mode) { + if (_rwMode) { try { if (!vnModel.verify(_manager.getModelController())) { vnModel.update(_manager.getModelController()); @@ -571,7 +571,7 @@ public class ServerDBSyncImpl implements ServerDBSync { VirtualNetworkModel vnModel = new VirtualNetworkModel(dbn, vnet.getUuid(), _manager.getCanonicalName(dbn), dbn.getTrafficType()); vnModel.build(_manager.getModelController(), dbn); - if (_rw_mode) { + if (_rwMode) { if (current != null) { FloatingIpPoolModel fipPoolModel = current.getFipPoolModel(); if (fipPoolModel != null) { @@ -643,7 +643,7 @@ public class ServerDBSyncImpl implements ServerDBSync { vmModel.build(_manager.getModelController(), dbVm); buildNicResources(vmModel, dbVm, syncLogMesg); - if (_rw_mode) { + if (_rwMode) { try { vmModel.update(_manager.getModelController()); } catch (InternalErrorException ex) { @@ -695,7 +695,7 @@ public class ServerDBSyncImpl implements ServerDBSync { public void deleteVirtualMachine(VirtualMachine vncVm, StringBuffer syncLogMesg) { final ApiConnector api = _manager.getApiConnector(); syncLogMesg.append("VM# DB:none; VNC: " + vncVm.getName() + "/" + vncVm.getUuid() + "; action: delete\n"); - if (!_rw_mode) { + if (!_rwMode) { return; } try { @@ -758,7 +758,7 @@ public class ServerDBSyncImpl implements ServerDBSync { } VirtualMachineModel current = _manager.getDatabase().lookupVirtualMachine(vncVm.getUuid()); - if (_rw_mode) { + if (_rwMode) { if (current != null) { _manager.getDatabase().getVirtualMachines().remove(current); } @@ -903,7 +903,7 @@ public class ServerDBSyncImpl implements ServerDBSync { public void deleteServiceInstance(ServiceInstance siObj, StringBuffer logMsg) { final ApiConnector api = _manager.getApiConnector(); s_logger.debug("delete " + siObj.getQualifiedName()); - if (!_rw_mode) { + if (!_rwMode) { return; } try { @@ -946,7 +946,7 @@ public class ServerDBSyncImpl implements ServerDBSync { List siList = (List)api.list(ServiceInstance.class, null); java.util.Collections.sort(siList, new ServiceInstanceComparator()); DBSyncGeneric.SyncStats stats = new DBSyncGeneric.SyncStats(); - _dbSync.syncCollections(ServiceInstance.class, _manager.getDatabase().getServiceInstances(), siList, _rw_mode, stats); + _dbSync.syncCollections(ServiceInstance.class, _manager.getDatabase().getServiceInstances(), siList, _rwMode, stats); inSync = stats.create == 0 && stats.delete == 0; } catch (Exception ex) { s_logger.warn("synchronize service-instances", ex); diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceManagerImpl.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceManagerImpl.java index e15e2ce8ff6..98be2889aeb 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceManagerImpl.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/management/ServiceManagerImpl.java @@ -96,7 +96,7 @@ public class ServiceManagerImpl implements ServiceManager { */ @ActionEvent(eventType = EventTypes.EVENT_VM_CREATE, eventDescription = "createServiceInstance", create = true) private ServiceVirtualMachine createServiceVM(DataCenter zone, Account owner, VirtualMachineTemplate template, ServiceOffering serviceOffering, String name, - ServiceInstance siObj, Network left, Network right) { + ServiceInstance siObj, Network left, Network right) { long id = _vmDao.getNextInSequence(Long.class, "id"); DataCenterDeployment plan = new DataCenterDeployment(zone.getId()); @@ -109,8 +109,8 @@ public class ServiceManagerImpl implements ServiceManager { String instanceName = VirtualMachineName.getVmName(id, owner.getId(), "SRV"); ServiceVirtualMachine svm = - new ServiceVirtualMachine(id, instanceName, name, template.getId(), serviceOffering.getId(), template.getHypervisorType(), template.getGuestOSId(), - zone.getId(), owner.getDomainId(), owner.getAccountId(), false); + new ServiceVirtualMachine(id, instanceName, name, template.getId(), serviceOffering.getId(), template.getHypervisorType(), template.getGuestOSId(), + zone.getId(), owner.getDomainId(), owner.getAccountId(), false); // database synchronization code must be able to distinguish service instance VMs. Map kvmap = new HashMap(); @@ -130,7 +130,7 @@ public class ServiceManagerImpl implements ServiceManager { @Override public ServiceVirtualMachine createServiceInstance(DataCenter zone, Account owner, VirtualMachineTemplate template, ServiceOffering serviceOffering, String name, - Network left, Network right) { + Network left, Network right) { s_logger.debug("createServiceInstance by " + owner.getAccountName()); // TODO: permission model. // service instances need to be able to access the public network. diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/ServiceInstanceModel.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/ServiceInstanceModel.java index d0664238a79..a9bc5c153c8 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/ServiceInstanceModel.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/ServiceInstanceModel.java @@ -47,7 +47,7 @@ public class ServiceInstanceModel extends ModelObjectBase { private static final Logger s_logger = Logger.getLogger(ServiceInstanceModel.class); private String _uuid; - private String _fq_name; + private String _fqName; private String _projectId; private String _mgmtName; private String _leftName; @@ -79,7 +79,7 @@ public class ServiceInstanceModel extends ModelObjectBase { } else { parent_name = ContrailManager.VNC_ROOT_DOMAIN + ":" + ContrailManager.VNC_DEFAULT_PROJECT; } - _fq_name = parent_name + ":" + name; + _fqName = parent_name + ":" + name; _mgmtName = ContrailManager.VNC_ROOT_DOMAIN + ":" + ContrailManager.VNC_DEFAULT_PROJECT + ":" + ContrailManager.managementNetworkName; _left = left; @@ -103,11 +103,11 @@ public class ServiceInstanceModel extends ModelObjectBase { } public String getQualifiedName() { - return _fq_name; + return _fqName; } public String getName() { - return _fq_name.substring(_fq_name.lastIndexOf(':') + 1); + return _fqName.substring(_fqName.lastIndexOf(':') + 1); } private void applyNetworkPolicy(ModelController controller, NetworkPolicy policy, VirtualNetwork left, VirtualNetwork right) { @@ -139,7 +139,7 @@ public class ServiceInstanceModel extends ModelObjectBase { public void build(ModelController controller, ServiceInstance siObj) { ApiConnector api = controller.getApiAccessor(); _serviceInstance = siObj; - _fq_name = StringUtils.join(siObj.getQualifiedName(), ':'); + _fqName = StringUtils.join(siObj.getQualifiedName(), ':'); ServiceInstanceType props = siObj.getProperties(); // TODO: read management network names and cache network objects. ObjectReference ref = siObj.getServiceTemplate().get(0); @@ -174,7 +174,7 @@ public class ServiceInstanceModel extends ModelObjectBase { String clsname = o.getClass().getName(); return ServiceInstanceModel.class.getName().compareTo(clsname); } - return _fq_name.compareTo(other._fq_name); + return _fqName.compareTo(other._fqName); } private ServiceInstance createServiceInstance(ModelController controller) { diff --git a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VirtualMachineModel.java b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VirtualMachineModel.java index 96cea95250d..f571f895a5f 100644 --- a/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VirtualMachineModel.java +++ b/plugins/network-elements/juniper-contrail/src/org/apache/cloudstack/network/contrail/model/VirtualMachineModel.java @@ -199,21 +199,21 @@ public class VirtualMachineModel extends ModelObjectBase { boolean isActiveInstance(VMInstanceVO instance) { switch (instance.getState()) { - case Migrating: - case Starting: - case Running: - case Shutdowned: - case Stopped: - case Stopping: - return true; + case Migrating: + case Starting: + case Running: + case Shutdowned: + case Stopped: + case Stopping: + return true; - case Destroyed: - case Error: - case Expunging: - return false; + case Destroyed: + case Error: + case Expunging: + return false; - default: - s_logger.warn("Unknown VMInstance state " + instance.getState().getDescription()); + default: + s_logger.warn("Unknown VMInstance state " + instance.getState().getDescription()); } return true; } @@ -257,17 +257,17 @@ public class VirtualMachineModel extends ModelObjectBase { String tag; switch (nic.getDeviceId()) { - case 0: - tag = "management"; - break; - case 1: - tag = "left"; - break; - case 2: - tag = "right"; - break; - default: - tag = null; + case 0: + tag = "management"; + break; + case 1: + tag = "left"; + break; + case 2: + tag = "right"; + break; + default: + tag = null; } VMInterfaceModel vmiModel = getVMInterface(nic.getUuid()); diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/IntegrationTestConfiguration.java b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/IntegrationTestConfiguration.java index 8b14a42219f..2a2babc67aa 100644 --- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/IntegrationTestConfiguration.java +++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/IntegrationTestConfiguration.java @@ -255,11 +255,9 @@ import com.cloud.template.TemplateApiService; import com.cloud.template.TemplateManager; import com.cloud.user.Account; import com.cloud.user.AccountDetailsDaoImpl; -import com.cloud.user.AccountVO; import com.cloud.user.DomainManagerImpl; import com.cloud.user.ResourceLimitService; import com.cloud.user.User; -import com.cloud.user.UserVO; import com.cloud.user.dao.AccountDao; import com.cloud.user.dao.AccountDaoImpl; import com.cloud.user.dao.SSHKeyPairDaoImpl; diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/ManagementServerMock.java b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/ManagementServerMock.java index c449b8a6c0a..806dd21a07f 100644 --- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/ManagementServerMock.java +++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/ManagementServerMock.java @@ -116,10 +116,10 @@ public class ManagementServerMock { private DataCenterVO _zone; private PhysicalNetwork _znet; - private long _host_id = -1L; + private long _hostId = -1L; // TODO: Use the name parameter to retrieve the @Parameter annotation. - static void setParameter(BaseCmd cmd, String name, BaseCmd.CommandType field_type, Object value) { + static void setParameter(BaseCmd cmd, String name, BaseCmd.CommandType fieldType, Object value) { Class cls = cmd.getClass(); Field field; try { @@ -129,7 +129,7 @@ public class ManagementServerMock { return; } field.setAccessible(true); - switch (field_type) { + switch (fieldType) { case STRING: try { field.set(cmd, value); @@ -169,11 +169,11 @@ public class ManagementServerMock { private void createHost() { HostVO host = - new HostVO(_host_id, "aa01", Type.BaremetalDhcp, "192.168.1.1", "255.255.255.0", null, null, null, null, null, null, null, null, null, null, + new HostVO(_hostId, "aa01", Type.BaremetalDhcp, "192.168.1.1", "255.255.255.0", null, null, null, null, null, null, null, null, null, null, UUID.randomUUID().toString(), Status.Up, "1.0", null, null, _zone.getId(), null, 0, 0, "aa", 0, StoragePoolType.NetworkFilesystem); host.setResourceState(ResourceState.Enabled); _hostDao.persist(host); - _host_id = host.getId(); + _hostId = host.getId(); } private void createPublicVlanIpRange() { @@ -241,7 +241,7 @@ public class ManagementServerMock { new UserVmVO(id, name, name, tmpl.getId(), HypervisorType.XenServer, tmpl.getGuestOSId(), false, false, _zone.getDomainId(), Account.ACCOUNT_ID_SYSTEM, small.getId(), null, name, null); vm.setState(com.cloud.vm.VirtualMachine.State.Running); - vm.setHostId(_host_id); + vm.setHostId(_hostId); vm.setDataCenterId(network.getDataCenterId()); _userVmDao.persist(vm); @@ -256,7 +256,7 @@ public class ManagementServerMock { } private void deleteHost() { - _hostDao.remove(_host_id); + _hostDao.remove(_hostId); } diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/NetworkProviderTest.java b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/NetworkProviderTest.java index 7c5e3c0aec7..fff4e5a1395 100644 --- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/NetworkProviderTest.java +++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/NetworkProviderTest.java @@ -115,27 +115,27 @@ public class NetworkProviderTest extends TestCase { private ManagementServerMock _server; private ApiConnector _api; - private static int _mysql_server_port; - private static long _msId; - private static Merovingian2 _lockMaster; - public static boolean _initDone = false; + private static int s_mysqlSrverPort; + private static long s_msId; + private static Merovingian2 s_lockMaster; + public static boolean s_initDone = false; @BeforeClass public static void globalSetUp() throws Exception { ApiConnectorFactory.setImplementation(ApiConnectorMock.class); s_logger.info("mysql server is getting launched "); - _mysql_server_port = TestDbSetup.init(null); - s_logger.info("mysql server launched on port " + _mysql_server_port); + s_mysqlSrverPort = TestDbSetup.init(null); + s_logger.info("mysql server launched on port " + s_mysqlSrverPort); - _msId = ManagementServerNode.getManagementServerId(); - _lockMaster = Merovingian2.createLockMaster(_msId); + s_msId = ManagementServerNode.getManagementServerId(); + s_lockMaster = Merovingian2.createLockMaster(s_msId); } @AfterClass public static void globalTearDown() throws Exception { - _lockMaster.cleanupForServer(_msId); + s_lockMaster.cleanupForServer(s_msId); JmxUtil.unregisterMBean("Locks", "Locks"); - _lockMaster = null; + s_lockMaster = null; AbstractApplicationContext ctx = (AbstractApplicationContext)ComponentContext.getApplicationContext(); Map lifecycleComponents = ctx.getBeansOfType(ComponentLifecycle.class); @@ -144,8 +144,8 @@ public class NetworkProviderTest extends TestCase { } ctx.close(); - s_logger.info("destroying mysql server instance running at port <" + _mysql_server_port + ">"); - TestDbSetup.destroy(_mysql_server_port, null); + s_logger.info("destroying mysql server instance running at port <" + s_mysqlSrverPort + ">"); + TestDbSetup.destroy(s_mysqlSrverPort, null); } @Override @@ -162,8 +162,8 @@ public class NetworkProviderTest extends TestCase { CallContext.register(user, system); _server = ComponentContext.inject(new ManagementServerMock()); - _server.initialize(!_initDone); - _initDone = false; + _server.initialize(!s_initDone); + s_initDone = false; _api = _contrailMgr.getApiConnector(); } diff --git a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/PublicNetworkTest.java b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/PublicNetworkTest.java index 9901241c6f5..c85bc659e31 100644 --- a/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/PublicNetworkTest.java +++ b/plugins/network-elements/juniper-contrail/test/org/apache/cloudstack/network/contrail/management/PublicNetworkTest.java @@ -67,10 +67,10 @@ public class PublicNetworkTest extends TestCase { @Inject public NetworkDao _networksDao; - private static boolean _initDone = false; - private static int _mysql_server_port; - private static long _msId; - private static Merovingian2 _lockMaster; + private static boolean s_initDone = false; + private static int s_mysqlServerPort; + private static long s_msId; + private static Merovingian2 s_lockMaster; private ManagementServerMock _server; private ApiConnector _spy; @@ -78,17 +78,17 @@ public class PublicNetworkTest extends TestCase { public static void globalSetUp() throws Exception { ApiConnectorFactory.setImplementation(ApiConnectorMockito.class); s_logger.info("mysql server is getting launched "); - _mysql_server_port = TestDbSetup.init(null); - s_logger.info("mysql server launched on port " + _mysql_server_port); - _msId = ManagementServerNode.getManagementServerId(); - _lockMaster = Merovingian2.createLockMaster(_msId); + s_mysqlServerPort = TestDbSetup.init(null); + s_logger.info("mysql server launched on port " + s_mysqlServerPort); + s_msId = ManagementServerNode.getManagementServerId(); + s_lockMaster = Merovingian2.createLockMaster(s_msId); } @AfterClass public static void globalTearDown() throws Exception { - _lockMaster.cleanupForServer(_msId); + s_lockMaster.cleanupForServer(s_msId); JmxUtil.unregisterMBean("Locks", "Locks"); - _lockMaster = null; + s_lockMaster = null; AbstractApplicationContext ctx = (AbstractApplicationContext)ComponentContext.getApplicationContext(); Map lifecycleComponents = ctx.getBeansOfType(ComponentLifecycle.class); @@ -97,8 +97,8 @@ public class PublicNetworkTest extends TestCase { } ctx.close(); - s_logger.info("destroying mysql server instance running at port <" + _mysql_server_port + ">"); - TestDbSetup.destroy(_mysql_server_port, null); + s_logger.info("destroying mysql server instance running at port <" + s_mysqlServerPort + ">"); + TestDbSetup.destroy(s_mysqlServerPort, null); } @Override @@ -112,8 +112,8 @@ public class PublicNetworkTest extends TestCase { } _server = ComponentContext.inject(new ManagementServerMock()); - _server.initialize(!_initDone); - _initDone = false; + _server.initialize(!s_initDone); + s_initDone = false; _spy = ((ApiConnectorMockito)_contrailMgr.getApiConnector()).getSpy(); } diff --git a/plugins/network-elements/juniper-contrail/test/resources/commonContext.xml b/plugins/network-elements/juniper-contrail/test/resources/commonContext.xml index c57751328f9..eef908ff15b 100644 --- a/plugins/network-elements/juniper-contrail/test/resources/commonContext.xml +++ b/plugins/network-elements/juniper-contrail/test/resources/commonContext.xml @@ -1,16 +1,15 @@ - + - - + + - - - + + + - + - + - + - + - + + class="org.apache.cloudstack.network.contrail.management.IntegrationTestConfiguration" /> - + - + - + - + - + - + - + - + - + - + - - - - + + + + - + - - + - - - - --> - - - - - + + class="org.apache.cloudstack.network.contrail.management.ContrailElementImpl" /> - + - - - - - + + + + + @@ -150,11 +120,11 @@ - - - - - + + + + + @@ -164,7 +134,7 @@ - + diff --git a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java index 82f701b4a06..cb31ea440a1 100644 --- a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java +++ b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java @@ -218,14 +218,13 @@ public class JuniperSRXExternalFirewallElement extends ExternalFirewallDeviceMan return false; } - if (rules != null && rules.size() == 1 ) { + if (rules != null && rules.size() == 1) { // for SRX no need to add default egress rule to DENY traffic if (rules.get(0).getTrafficType() == FirewallRule.TrafficType.Egress && rules.get(0).getType() == FirewallRule.FirewallRuleType.System && - ! _networkManager.getNetworkEgressDefaultPolicy(config.getId())) + !_networkManager.getNetworkEgressDefaultPolicy(config.getId())) return true; } - return applyFirewallRules(config, rules); } diff --git a/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java b/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java index b828ab66db6..eaade0107b7 100644 --- a/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java +++ b/plugins/network-elements/juniper-srx/src/com/cloud/network/resource/JuniperSrxResource.java @@ -104,7 +104,7 @@ public class JuniperSrxResource implements ServerResource { private UsageFilter _usageFilterVlanOutput; private UsageFilter _usageFilterIPInput; private UsageFilter _usageFilterIPOutput; - private final Logger s_logger = Logger.getLogger(JuniperSrxResource.class); + private static final Logger s_logger = Logger.getLogger(JuniperSrxResource.class); private enum SrxXml { LOGIN("login.xml"), @@ -173,7 +173,7 @@ public class JuniperSrxResource implements ServerResource { private final String scriptsDir = "scripts/network/juniper"; private final String xml; - private final Logger s_logger = Logger.getLogger(JuniperSrxResource.class); + private static final Logger s_logger = Logger.getLogger(JuniperSrxResource.class); private SrxXml(String filename) { xml = getXml(filename); @@ -854,9 +854,9 @@ public class JuniperSrxResource implements ServerResource { addEgressSecurityPolicyAndApplications(SecurityPolicyType.SECURITYPOLICY_EGRESS, guestVlan, extractApplications(activeRulesForGuestNw), extractCidrs(activeRulesForGuestNw), defaultEgressPolicy); - /* Adding default policy rules are required because the order of rules is important. - * Depending on the rules order the traffic accept/drop is performed - */ + /* Adding default policy rules are required because the order of rules is important. + * Depending on the rules order the traffic accept/drop is performed + */ removeEgressSecurityPolicyAndApplications(SecurityPolicyType.SECURITYPOLICY_EGRESS_DEFAULT, guestVlan, cidrs, defaultEgressPolicy); addEgressSecurityPolicyAndApplications(SecurityPolicyType.SECURITYPOLICY_EGRESS_DEFAULT, guestVlan, applications, cidrs, defaultEgressPolicy); } diff --git a/plugins/network-elements/netscaler/src/com/cloud/api/commands/AddNetscalerLoadBalancerCmd.java b/plugins/network-elements/netscaler/src/com/cloud/api/commands/AddNetscalerLoadBalancerCmd.java index 1237e7f7104..b744fffdcb1 100644 --- a/plugins/network-elements/netscaler/src/com/cloud/api/commands/AddNetscalerLoadBalancerCmd.java +++ b/plugins/network-elements/netscaler/src/com/cloud/api/commands/AddNetscalerLoadBalancerCmd.java @@ -86,9 +86,9 @@ public class AddNetscalerLoadBalancerCmd extends BaseAsyncCmd { private String gslbSitePrivateIp; @Parameter(name = ApiConstants.EXCLUSIVE_GSLB_PROVIDER, - type = CommandType.BOOLEAN, - required = false, - description = "true if NetScaler device being added is for providing GSLB service exclusively and can not be used for LB") + type = CommandType.BOOLEAN, + required = false, + description = "true if NetScaler device being added is for providing GSLB service exclusively and can not be used for LB") private Boolean isExclusiveGslbProvider; ///////////////////////////////////////////////////// diff --git a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java index a2bda9042d9..5199f602eb3 100644 --- a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java +++ b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java @@ -383,7 +383,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl if (cmd.isExclusiveGslbProvider() && !cmd.isGslbProvider()) { throw new InvalidParameterValueException("NetScaler can be provisioned to be exclusive GSLB service provider" + - " only if its being configured as GSLB service provider also."); + " only if its being configured as GSLB service provider also."); } ExternalLoadBalancerDeviceVO lbDeviceVO = diff --git a/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java b/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java index e8272986c99..54e5d50f2ba 100644 --- a/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java +++ b/plugins/network-elements/netscaler/src/com/cloud/network/resource/NetscalerResource.java @@ -16,7 +16,6 @@ // under the License. package com.cloud.network.resource; -import java.io.PrintWriter; import java.io.StringWriter; import java.security.cert.Certificate; import java.util.ArrayList; @@ -28,16 +27,9 @@ import java.util.Map; import javax.naming.ConfigurationException; -import com.citrix.netscaler.nitro.resource.config.ssl.sslcertkey; -import com.citrix.netscaler.nitro.resource.config.ssl.sslcertkey_sslvserver_binding; -import com.citrix.netscaler.nitro.resource.config.ssl.sslcertlink; -import com.citrix.netscaler.nitro.resource.config.ssl.sslvserver_sslcertkey_binding; -import com.cloud.network.lb.LoadBalancingRule.LbSslCert; -import com.cloud.utils.security.CertificateHelper; -import com.cloud.utils.ssh.SshHelper; -import com.google.common.collect.Lists; import org.apache.commons.io.output.ByteArrayOutputStream; import org.apache.log4j.Logger; +import org.bouncycastle.openssl.PEMWriter; import com.citrix.netscaler.nitro.exception.nitro_exception; import com.citrix.netscaler.nitro.resource.base.base_response; @@ -73,6 +65,10 @@ import com.citrix.netscaler.nitro.resource.config.ns.nshardware; import com.citrix.netscaler.nitro.resource.config.ns.nsip; import com.citrix.netscaler.nitro.resource.config.ns.nstimer; import com.citrix.netscaler.nitro.resource.config.ns.nstimer_autoscalepolicy_binding; +import com.citrix.netscaler.nitro.resource.config.ssl.sslcertkey; +import com.citrix.netscaler.nitro.resource.config.ssl.sslcertkey_sslvserver_binding; +import com.citrix.netscaler.nitro.resource.config.ssl.sslcertlink; +import com.citrix.netscaler.nitro.resource.config.ssl.sslvserver_sslcertkey_binding; import com.citrix.netscaler.nitro.resource.stat.lb.lbvserver_stats; import com.citrix.netscaler.nitro.service.nitro_service; import com.citrix.netscaler.nitro.util.filtervalue; @@ -80,6 +76,7 @@ import com.citrix.sdx.nitro.resource.config.device_profile; import com.citrix.sdx.nitro.resource.config.mps; import com.citrix.sdx.nitro.resource.config.ns; import com.citrix.sdx.nitro.resource.config.xen_vpx_image; +import com.google.common.collect.Lists; import com.google.gson.Gson; import org.apache.cloudstack.api.ApiConstants; @@ -121,6 +118,7 @@ import com.cloud.agent.api.to.LoadBalancerTO.StickinessPolicyTO; import com.cloud.agent.api.to.StaticNatRuleTO; import com.cloud.host.Host; import com.cloud.host.Host.Type; +import com.cloud.network.lb.LoadBalancingRule.LbSslCert; import com.cloud.network.rules.LbStickinessMethod.StickinessMethodType; import com.cloud.resource.ServerResource; import com.cloud.serializer.GsonHelper; @@ -128,7 +126,8 @@ import com.cloud.utils.NumbersUtil; import com.cloud.utils.Pair; import com.cloud.utils.exception.ExecutionException; import com.cloud.utils.net.NetUtils; -import org.bouncycastle.openssl.PEMWriter; +import com.cloud.utils.security.CertificateHelper; +import com.cloud.utils.ssh.SshHelper; class NitroError { static final int NS_RESOURCE_EXISTS = 273; @@ -683,17 +682,17 @@ public class NetscalerResource implements ServerResource { String previousCertKeyName = null; - if ( sslCert.getChain() != null ) { + if (sslCert.getChain() != null) { List chainList = CertificateHelper.parseChain(sslCert.getChain()); // go from ROOT to intermediate CAs - for ( Certificate intermediateCert : Lists.reverse(chainList)){ + for (Certificate intermediateCert : Lists.reverse(chainList)) { - String fingerPrint=CertificateHelper.generateFingerPrint(intermediateCert); + String fingerPrint = CertificateHelper.generateFingerPrint(intermediateCert); String intermediateCertKeyName = generateSslCertKeyName(fingerPrint); String intermediateCertFileName = intermediateCertKeyName + ".pem"; - if (! SSL.isSslCertKeyPresent(_netscalerService, intermediateCertKeyName)) { - byte[] certData= intermediateCert.getEncoded(); + if (!SSL.isSslCertKeyPresent(_netscalerService, intermediateCertKeyName)) { + byte[] certData = intermediateCert.getEncoded(); StringWriter textWriter = new StringWriter(); PEMWriter pemWriter = new PEMWriter(textWriter); pemWriter.writeObject(intermediateCert); @@ -703,7 +702,7 @@ public class NetscalerResource implements ServerResource { SSL.createSslCertKey(_netscalerService, intermediateCertFileName, null, intermediateCertKeyName, null); } - if ( previousCertKeyName != null && ! SSL.certLinkExists(_netscalerService, intermediateCertKeyName, previousCertKeyName)){ + if (previousCertKeyName != null && !SSL.certLinkExists(_netscalerService, intermediateCertKeyName, previousCertKeyName)) { SSL.linkCerts(_netscalerService, intermediateCertKeyName, previousCertKeyName); } @@ -715,17 +714,17 @@ public class NetscalerResource implements ServerResource { String keyFilename = generateSslKeyName(sslCert.getFingerprint()) + ".pem"; //netscaler uses ".pem" format for "bundle" files String certKeyName = generateSslCertKeyName(sslCert.getFingerprint()); - ByteArrayOutputStream certDataStream = new ByteArrayOutputStream( ); + ByteArrayOutputStream certDataStream = new ByteArrayOutputStream(); certDataStream.write(sslCert.getCert().getBytes()); - if (! SSL.isSslCertKeyPresent(_netscalerService, certKeyName)) { + if (!SSL.isSslCertKeyPresent(_netscalerService, certKeyName)) { SSL.uploadCert(_ip, _username, _password, certFilename, certDataStream.toByteArray()); SSL.uploadKey(_ip, _username, _password, keyFilename, sslCert.getKey().getBytes()); SSL.createSslCertKey(_netscalerService, certFilename, keyFilename, certKeyName, sslCert.getPassword()); } - if (previousCertKeyName != null && ! SSL.certLinkExists(_netscalerService, certKeyName, previousCertKeyName)){ + if (previousCertKeyName != null && !SSL.certLinkExists(_netscalerService, certKeyName, previousCertKeyName)) { SSL.linkCerts(_netscalerService, certKeyName, previousCertKeyName); } @@ -831,8 +830,8 @@ public class NetscalerResource implements ServerResource { // unbind before deleting if (nsVirtualServerExists(nsVirtualServerName) && - SSL.isSslCertKeyPresent(_netscalerService, certKeyName) && - SSL.isBoundToVserver(_netscalerService, certKeyName, nsVirtualServerName)) { + SSL.isSslCertKeyPresent(_netscalerService, certKeyName) && + SSL.isBoundToVserver(_netscalerService, certKeyName, nsVirtualServerName)) { SSL.unbindCertKeyFromVserver(_netscalerService, certKeyName, nsVirtualServerName); } @@ -843,27 +842,26 @@ public class NetscalerResource implements ServerResource { SSL.deleteKeyFile(_ip, _username, _password, keyFilename); } - /* * Check and delete intermediate certs: * we can delete an intermediate cert if no other * cert references it as the athority */ - if ( sslCert.getChain() != null ) { + if (sslCert.getChain() != null) { List chainList = CertificateHelper.parseChain(sslCert.getChain()); //go from intermediate CAs to ROOT - for ( Certificate intermediateCert : chainList){ + for (Certificate intermediateCert : chainList) { - String fingerPrint=CertificateHelper.generateFingerPrint(intermediateCert); + String fingerPrint = CertificateHelper.generateFingerPrint(intermediateCert); String intermediateCertKeyName = generateSslCertKeyName(fingerPrint); String intermediateCertFileName = intermediateCertKeyName + ".pem"; if (SSL.isSslCertKeyPresent(_netscalerService, intermediateCertKeyName) && - ! SSL.isCaforCerts(_netscalerService, intermediateCertKeyName)) { + !SSL.isCaforCerts(_netscalerService, intermediateCertKeyName)) { SSL.deleteSslCertKey(_netscalerService, intermediateCertKeyName); SSL.deleteCertFile(_ip, _username, _password, intermediateCertFileName); - }else { + } else { break;// if this cert has another certificate as a child then stop at this point because we need the whole chain } @@ -1797,7 +1795,7 @@ public class NetscalerResource implements ServerResource { return false; } - private static void deleteSslCertKey(nitro_service ns, String certKeyName) throws ExecutionException { + private static void deleteSslCertKey(nitro_service ns, String certKeyName) throws ExecutionException { try { sslcertkey certkey = new sslcertkey(); @@ -1813,7 +1811,7 @@ public class NetscalerResource implements ServerResource { } private static void deleteCertFile(String nsIp, String username, String password, String certFilename) throws Exception { - SshHelper.sshExecute(nsIp,SSH_PORT,username,null,password,"shell rm " + SSL_CERT_PATH + certFilename); + SshHelper.sshExecute(nsIp, SSH_PORT, username, null, password, "shell rm " + SSL_CERT_PATH + certFilename); } private static void deleteKeyFile(String nsIp, String username, String password, String keyFilename) throws Exception { @@ -1827,7 +1825,7 @@ public class NetscalerResource implements ServerResource { certkey.set_certkey(certKeyName); certkey.set_cert(SSL_CERT_PATH + certFilename); - if ( keyFilename != null ) + if (keyFilename != null) certkey.set_key(SSL_CERT_PATH + keyFilename); if (password != null) { @@ -1896,8 +1894,8 @@ public class NetscalerResource implements ServerResource { private static void uploadCert(String nsIp, String user, String password, String certFilename, byte[] certData) throws ExecutionException { try { - SshHelper.scpTo(nsIp,SSH_PORT,user,null,password, SSL_CERT_PATH, certData, certFilename, null); - } catch (Exception e){ + SshHelper.scpTo(nsIp, SSH_PORT, user, null, password, SSL_CERT_PATH, certData, certFilename, null); + } catch (Exception e) { throw new ExecutionException("Failed to copy private key to device " + e.getMessage()); } } @@ -1912,7 +1910,7 @@ public class NetscalerResource implements ServerResource { private static void enableSslFeature(nitro_service ns) throws ExecutionException { try { - base_response result = ns.enable_features(new String[]{"SSL"}); + base_response result = ns.enable_features(new String[] {"SSL"}); if (result.errorcode != 0) throw new ExecutionException("Unable to enable SSL on LB"); } catch (nitro_exception e) { @@ -1944,7 +1942,7 @@ public class NetscalerResource implements ServerResource { try { // check if there is a link from userCertName to caCertName - sslcertkey userCert = sslcertkey.get(ns,userCertName); + sslcertkey userCert = sslcertkey.get(ns, userCertName); String nsCaCert = userCert.get_linkcertkeyname(); if (nsCaCert != null && nsCaCert.equals(caCertName)) @@ -1984,8 +1982,8 @@ public class NetscalerResource implements ServerResource { public static boolean isCaforCerts(nitro_service ns, String caCertName) throws ExecutionException { // check if this certificate serves as a CA for other certificates try { - sslcertlink[] childLinks = sslcertlink.get_filtered(ns,"linkcertkeyname:" + caCertName); - if(childLinks != null && childLinks.length > 0){ + sslcertlink[] childLinks = sslcertlink.get_filtered(ns, "linkcertkeyname:" + caCertName); + if (childLinks != null && childLinks.length > 0) { return true; } @@ -2002,7 +2000,7 @@ public class NetscalerResource implements ServerResource { try { sslcertkey_sslvserver_binding[] cert_vs_binding = sslcertkey_sslvserver_binding.get_filtered(ns, certKeyName, "vservername:" + nsVirtualServerName); - if(cert_vs_binding != null && cert_vs_binding.length > 0){ + if (cert_vs_binding != null && cert_vs_binding.length > 0) { return true; } @@ -2016,73 +2014,73 @@ public class NetscalerResource implements ServerResource { } } - private void enableVPXInterfaces(String publicIf, String privateIf, ns ns_obj) { + private void enableVPXInterfaces(String publicIf, String privateIf, ns nsObj) { // enable VPX to use 10 gigabit Ethernet interfaces if public/private interface // on SDX is a 10Gig interface if (publicIf.equals("10/1") || privateIf.equals("10/1")) { - ns_obj.set_if_10_1(new Boolean(true)); + nsObj.set_if_10_1(new Boolean(true)); } if (publicIf.equals("10/2") || privateIf.equals("10/2")) { - ns_obj.set_if_10_2(new Boolean(true)); + nsObj.set_if_10_2(new Boolean(true)); } if (publicIf.equals("10/3") || privateIf.equals("10/3")) { - ns_obj.set_if_10_3(new Boolean(true)); + nsObj.set_if_10_3(new Boolean(true)); } if (publicIf.equals("10/4") || privateIf.equals("10/4")) { - ns_obj.set_if_10_4(new Boolean(true)); + nsObj.set_if_10_4(new Boolean(true)); } if (publicIf.equals("10/5") || privateIf.equals("10/5")) { - ns_obj.set_if_10_5(new Boolean(true)); + nsObj.set_if_10_5(new Boolean(true)); } if (publicIf.equals("10/6") || privateIf.equals("10/6")) { - ns_obj.set_if_10_6(new Boolean(true)); + nsObj.set_if_10_6(new Boolean(true)); } if (publicIf.equals("10/7") || privateIf.equals("10/7")) { - ns_obj.set_if_10_7(new Boolean(true)); + nsObj.set_if_10_7(new Boolean(true)); } if (publicIf.equals("10/8") || privateIf.equals("10/8")) { - ns_obj.set_if_10_8(new Boolean(true)); + nsObj.set_if_10_8(new Boolean(true)); } // enable VPX to use 1 gigabit Ethernet interfaces if public/private interface // on SDX is a 1Gig interface if (publicIf.equals("1/1") || privateIf.equals("1/1")) { - ns_obj.set_if_1_1(new Boolean(true)); + nsObj.set_if_1_1(new Boolean(true)); } if (publicIf.equals("1/2") || privateIf.equals("1/2")) { - ns_obj.set_if_1_2(new Boolean(true)); + nsObj.set_if_1_2(new Boolean(true)); } if (publicIf.equals("1/3") || privateIf.equals("1/3")) { - ns_obj.set_if_1_3(new Boolean(true)); + nsObj.set_if_1_3(new Boolean(true)); } if (publicIf.equals("1/4") || privateIf.equals("1/4")) { - ns_obj.set_if_1_4(new Boolean(true)); + nsObj.set_if_1_4(new Boolean(true)); } if (publicIf.equals("1/5") || privateIf.equals("1/5")) { - ns_obj.set_if_1_5(new Boolean(true)); + nsObj.set_if_1_5(new Boolean(true)); } if (publicIf.equals("1/6") || privateIf.equals("1/6")) { - ns_obj.set_if_1_6(new Boolean(true)); + nsObj.set_if_1_6(new Boolean(true)); } if (publicIf.equals("1/7") || privateIf.equals("1/7")) { - ns_obj.set_if_1_7(new Boolean(true)); + nsObj.set_if_1_7(new Boolean(true)); } if (publicIf.equals("1/8") || privateIf.equals("1/8")) { - ns_obj.set_if_1_8(new Boolean(true)); + nsObj.set_if_1_8(new Boolean(true)); } } @@ -3746,18 +3744,18 @@ public class NetscalerResource implements ServerResource { private String generateSslCertName(String fingerPrint) { // maximum length supported by NS is 31 // the first 20 characters of the SHA-1 checksum are the unique id - String uniqueId = fingerPrint.replace(":","").substring(0,20); + String uniqueId = fingerPrint.replace(":", "").substring(0, 20); return genObjectName("Cloud-Cert", uniqueId); } private String generateSslKeyName(String fingerPrint) { - String uniqueId = fingerPrint.replace(":","").substring(0,20); + String uniqueId = fingerPrint.replace(":", "").substring(0, 20); return genObjectName("Cloud-Key", uniqueId); } - private String generateSslCertKeyName(String fingerPrint){ - String uniqueId = fingerPrint.replace(":","").substring(0,20); + private String generateSslCertKeyName(String fingerPrint) { + String uniqueId = fingerPrint.replace(":", "").substring(0, 20); return genObjectName("Cloud-Cert", uniqueId); } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateGreTunnelAnswer.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateGreTunnelAnswer.java index 7913cc845de..e9e34557c70 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateGreTunnelAnswer.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateGreTunnelAnswer.java @@ -16,66 +16,64 @@ // under the License. package com.cloud.agent.api; -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; public class OvsCreateGreTunnelAnswer extends Answer { - String hostIp; - String remoteIp; - String bridge; - String key; - long from; - long to; - int port; + String hostIp; + String remoteIp; + String bridge; + String key; + long from; + long to; + int port; - public OvsCreateGreTunnelAnswer(Command cmd, boolean success, String details) { - super(cmd, success, details); - } + public OvsCreateGreTunnelAnswer(Command cmd, boolean success, String details) { + super(cmd, success, details); + } - public OvsCreateGreTunnelAnswer(Command cmd, boolean success, - String details, String hostIp, String bridge) { - super(cmd, success, details); - OvsCreateGreTunnelCommand c = (OvsCreateGreTunnelCommand) cmd; - this.hostIp = hostIp; - this.bridge = bridge; - this.remoteIp = c.getRemoteIp(); - this.key = c.getKey(); - this.port = -1; - this.from = c.getFrom(); - this.to = c.getTo(); - } + public OvsCreateGreTunnelAnswer(Command cmd, boolean success, + String details, String hostIp, String bridge) { + super(cmd, success, details); + OvsCreateGreTunnelCommand c = (OvsCreateGreTunnelCommand)cmd; + this.hostIp = hostIp; + this.bridge = bridge; + this.remoteIp = c.getRemoteIp(); + this.key = c.getKey(); + this.port = -1; + this.from = c.getFrom(); + this.to = c.getTo(); + } - public OvsCreateGreTunnelAnswer(Command cmd, boolean success, - String details, String hostIp, String bridge, int port) { - this(cmd, success, details, hostIp, bridge); - this.port = port; - } + public OvsCreateGreTunnelAnswer(Command cmd, boolean success, + String details, String hostIp, String bridge, int port) { + this(cmd, success, details, hostIp, bridge); + this.port = port; + } - public String getHostIp() { - return hostIp; - } + public String getHostIp() { + return hostIp; + } - public String getRemoteIp() { - return remoteIp; - } + public String getRemoteIp() { + return remoteIp; + } - public String getBridge() { - return bridge; - } + public String getBridge() { + return bridge; + } - public String getKey() { - return key; - } + public String getKey() { + return key; + } - public long getFrom() { - return from; - } + public long getFrom() { + return from; + } - public long getTo() { - return to; - } + public long getTo() { + return to; + } - public int getPort() { - return port; - } + public int getPort() { + return port; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateGreTunnelCommand.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateGreTunnelCommand.java index 588ff519006..9a3d4172151 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateGreTunnelCommand.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateGreTunnelCommand.java @@ -16,40 +16,39 @@ // under the License. package com.cloud.agent.api; -import com.cloud.agent.api.Command; public class OvsCreateGreTunnelCommand extends Command { - String remoteIp; - String key; - long from; - long to; + String remoteIp; + String key; + long from; + long to; - @Override - public boolean executeInSequence() { - return true; - } + @Override + public boolean executeInSequence() { + return true; + } - public OvsCreateGreTunnelCommand(String remoteIp, String key, long from, - long to) { - this.remoteIp = remoteIp; - this.key = key; - this.from = from; - this.to = to; - } + public OvsCreateGreTunnelCommand(String remoteIp, String key, long from, + long to) { + this.remoteIp = remoteIp; + this.key = key; + this.from = from; + this.to = to; + } - public String getRemoteIp() { - return remoteIp; - } + public String getRemoteIp() { + return remoteIp; + } - public String getKey() { - return key; - } + public String getKey() { + return key; + } - public long getFrom() { - return from; - } + public long getFrom() { + return from; + } - public long getTo() { - return to; - } + public long getTo() { + return to; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateTunnelAnswer.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateTunnelAnswer.java index f921042ca62..96acab7435c 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateTunnelAnswer.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateTunnelAnswer.java @@ -16,70 +16,68 @@ // under the License. package com.cloud.agent.api; -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; public class OvsCreateTunnelAnswer extends Answer { - Long from; - Long to; - long networkId; - String inPortName; + Long from; + Long to; + long networkId; + String inPortName; - // for debug info - String fromIp; - String toIp; - int key; - String bridge; + // for debug info + String fromIp; + String toIp; + int key; + String bridge; - public OvsCreateTunnelAnswer(Command cmd, boolean success, String details, - String bridge) { - super(cmd, success, details); - OvsCreateTunnelCommand c = (OvsCreateTunnelCommand) cmd; - from = c.getFrom(); - to = c.getTo(); - networkId = c.getNetworkId(); - inPortName = "[]"; - fromIp = c.getFromIp(); - toIp = c.getRemoteIp(); - key = c.getKey(); - this.bridge = bridge; - } + public OvsCreateTunnelAnswer(Command cmd, boolean success, String details, + String bridge) { + super(cmd, success, details); + OvsCreateTunnelCommand c = (OvsCreateTunnelCommand)cmd; + from = c.getFrom(); + to = c.getTo(); + networkId = c.getNetworkId(); + inPortName = "[]"; + fromIp = c.getFromIp(); + toIp = c.getRemoteIp(); + key = c.getKey(); + this.bridge = bridge; + } - public OvsCreateTunnelAnswer(Command cmd, boolean success, String details, - String inPortName, String bridge) { - this(cmd, success, details, bridge); - this.inPortName = inPortName; - } + public OvsCreateTunnelAnswer(Command cmd, boolean success, String details, + String inPortName, String bridge) { + this(cmd, success, details, bridge); + this.inPortName = inPortName; + } - public Long getFrom() { - return from; - } + public Long getFrom() { + return from; + } - public Long getTo() { - return to; - } + public Long getTo() { + return to; + } - public long getNetworkId() { - return networkId; - } + public long getNetworkId() { + return networkId; + } - public String getInPortName() { - return inPortName; - } + public String getInPortName() { + return inPortName; + } - public String getFromIp() { - return fromIp; - } + public String getFromIp() { + return fromIp; + } - public String getToIp() { - return toIp; - } + public String getToIp() { + return toIp; + } - public int getKey() { - return key; - } + public int getKey() { + return key; + } - public String getBridge() { - return bridge; - } + public String getBridge() { + return bridge; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateTunnelCommand.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateTunnelCommand.java index 1dc4d8296d3..7f151fbb680 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateTunnelCommand.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsCreateTunnelCommand.java @@ -16,55 +16,54 @@ // under the License. package com.cloud.agent.api; -import com.cloud.agent.api.Command; public class OvsCreateTunnelCommand extends Command { - Integer key; - String remoteIp; - Long from; - Long to; - long networkId; + Integer key; + String remoteIp; + Long from; + Long to; + long networkId; - // for debug info - String fromIp; + // for debug info + String fromIp; - @Override - public boolean executeInSequence() { - return true; - } + @Override + public boolean executeInSequence() { + return true; + } - public OvsCreateTunnelCommand(String remoteIp, Integer key, Long from, - Long to, long networkId, String fromIp) { - this.remoteIp = remoteIp; - this.key = key; - this.from = from; - this.to = to; - this.networkId = networkId; - this.fromIp = fromIp; - } + public OvsCreateTunnelCommand(String remoteIp, Integer key, Long from, + Long to, long networkId, String fromIp) { + this.remoteIp = remoteIp; + this.key = key; + this.from = from; + this.to = to; + this.networkId = networkId; + this.fromIp = fromIp; + } - public Integer getKey() { - return key; - } + public Integer getKey() { + return key; + } - public String getRemoteIp() { - return remoteIp; - } + public String getRemoteIp() { + return remoteIp; + } - public Long getFrom() { - return from; - } + public Long getFrom() { + return from; + } - public Long getTo() { - return to; - } + public Long getTo() { + return to; + } - public long getNetworkId() { - return networkId; - } + public long getNetworkId() { + return networkId; + } - public String getFromIp() { - return fromIp; - } + public String getFromIp() { + return fromIp; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDeleteFlowCommand.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDeleteFlowCommand.java index 3b5e1c23370..4d2df9ff171 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDeleteFlowCommand.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDeleteFlowCommand.java @@ -16,21 +16,20 @@ // under the License. package com.cloud.agent.api; -import com.cloud.agent.api.Command; public class OvsDeleteFlowCommand extends Command { - String vmName; + String vmName; - @Override - public boolean executeInSequence() { - return true; - } + @Override + public boolean executeInSequence() { + return true; + } - public String getVmName() { - return vmName; - } + public String getVmName() { + return vmName; + } - public OvsDeleteFlowCommand(String vmName) { - this.vmName = vmName; - } + public OvsDeleteFlowCommand(String vmName) { + this.vmName = vmName; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDestroyBridgeCommand.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDestroyBridgeCommand.java index 21b89af2043..59b50beb9a7 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDestroyBridgeCommand.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDestroyBridgeCommand.java @@ -17,28 +17,27 @@ package com.cloud.agent.api; -import com.cloud.agent.api.Command; public class OvsDestroyBridgeCommand extends Command { - Long networkId; - Integer key; + Long networkId; + Integer key; - public OvsDestroyBridgeCommand(Long networkId, Integer key) { - this.networkId = networkId; - this.key = key; - } + public OvsDestroyBridgeCommand(Long networkId, Integer key) { + this.networkId = networkId; + this.key = key; + } - public Long getNetworkId() { - return networkId; - } + public Long getNetworkId() { + return networkId; + } - public Integer getKey() { - return key; - } + public Integer getKey() { + return key; + } - @Override - public boolean executeInSequence() { - return true; - } + @Override + public boolean executeInSequence() { + return true; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDestroyTunnelCommand.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDestroyTunnelCommand.java index d06acf52df4..4776a07eddd 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDestroyTunnelCommand.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsDestroyTunnelCommand.java @@ -16,35 +16,34 @@ // under the License. package com.cloud.agent.api; -import com.cloud.agent.api.Command; public class OvsDestroyTunnelCommand extends Command { - Long networkId; - Integer key; - String inPortName; + Long networkId; + Integer key; + String inPortName; - public OvsDestroyTunnelCommand(Long networkId, Integer key, - String inPortName) { - this.networkId = networkId; - this.inPortName = inPortName; - this.key = key; - } + public OvsDestroyTunnelCommand(Long networkId, Integer key, + String inPortName) { + this.networkId = networkId; + this.inPortName = inPortName; + this.key = key; + } - public Long getNetworkId() { - return networkId; - } + public Long getNetworkId() { + return networkId; + } - public String getInPortName() { - return inPortName; - } + public String getInPortName() { + return inPortName; + } - public Integer getKey() { - return key; - } + public Integer getKey() { + return key; + } - @Override - public boolean executeInSequence() { - return true; - } + @Override + public boolean executeInSequence() { + return true; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsFetchInterfaceAnswer.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsFetchInterfaceAnswer.java index 6c7deaaf957..237d21a010f 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsFetchInterfaceAnswer.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsFetchInterfaceAnswer.java @@ -17,42 +17,40 @@ package com.cloud.agent.api; -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; public class OvsFetchInterfaceAnswer extends Answer { - String ip; - String netmask; - String mac; - String label; + String ip; + String netmask; + String mac; + String label; - public OvsFetchInterfaceAnswer(Command cmd, boolean success, String details) { - super(cmd, success, details); - this.label = ((OvsFetchInterfaceCommand) cmd).getLabel(); - } + public OvsFetchInterfaceAnswer(Command cmd, boolean success, String details) { + super(cmd, success, details); + this.label = ((OvsFetchInterfaceCommand)cmd).getLabel(); + } - public OvsFetchInterfaceAnswer(Command cmd, boolean success, - String details, String ip, String netmask, String mac) { - super(cmd, success, details); - this.ip = ip; - this.netmask = netmask; - this.mac = mac; - this.label = ((OvsFetchInterfaceCommand) cmd).getLabel(); - } + public OvsFetchInterfaceAnswer(Command cmd, boolean success, + String details, String ip, String netmask, String mac) { + super(cmd, success, details); + this.ip = ip; + this.netmask = netmask; + this.mac = mac; + this.label = ((OvsFetchInterfaceCommand)cmd).getLabel(); + } - public String getIp() { - return ip; - } + public String getIp() { + return ip; + } - public String getNetmask() { - return netmask; - } + public String getNetmask() { + return netmask; + } - public String getMac() { - return mac; - } + public String getMac() { + return mac; + } - public String getLabel() { - return label; - } + public String getLabel() { + return label; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsFetchInterfaceCommand.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsFetchInterfaceCommand.java index a305d5bb587..79a7e5c2074 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsFetchInterfaceCommand.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsFetchInterfaceCommand.java @@ -17,22 +17,21 @@ package com.cloud.agent.api; -import com.cloud.agent.api.Command; public class OvsFetchInterfaceCommand extends Command { - String label; + String label; - @Override - public boolean executeInSequence() { - return true; - } + @Override + public boolean executeInSequence() { + return true; + } - public OvsFetchInterfaceCommand(String label) { - this.label = label; - } + public OvsFetchInterfaceCommand(String label) { + this.label = label; + } - public String getLabel() { - return label; - } + public String getLabel() { + return label; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetTagAndFlowAnswer.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetTagAndFlowAnswer.java index ee1fe42e6ae..be5be450166 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetTagAndFlowAnswer.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetTagAndFlowAnswer.java @@ -16,25 +16,23 @@ // under the License. package com.cloud.agent.api; -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.Command; public class OvsSetTagAndFlowAnswer extends Answer { - Long vmId; - Long seqno; + Long vmId; + Long seqno; - public OvsSetTagAndFlowAnswer(Command cmd, boolean success, String details) { - super(cmd, success, details); - OvsSetTagAndFlowCommand c = (OvsSetTagAndFlowCommand) cmd; - this.vmId = c.getVmId(); - this.seqno = Long.parseLong(c.getSeqNo()); - } + public OvsSetTagAndFlowAnswer(Command cmd, boolean success, String details) { + super(cmd, success, details); + OvsSetTagAndFlowCommand c = (OvsSetTagAndFlowCommand)cmd; + this.vmId = c.getVmId(); + this.seqno = Long.parseLong(c.getSeqNo()); + } - public Long getVmId() { - return vmId; - } + public Long getVmId() { + return vmId; + } - public Long getSeqNo() { - return seqno; - } + public Long getSeqNo() { + return seqno; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetTagAndFlowCommand.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetTagAndFlowCommand.java index 28a936a3e06..078528b37ce 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetTagAndFlowCommand.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetTagAndFlowCommand.java @@ -16,46 +16,45 @@ // under the License. package com.cloud.agent.api; -import com.cloud.agent.api.Command; public class OvsSetTagAndFlowCommand extends Command { - String vlans; - String vmName; - String seqno; - String tag; - Long vmId; + String vlans; + String vmName; + String seqno; + String tag; + Long vmId; - @Override - public boolean executeInSequence() { - return true; - } + @Override + public boolean executeInSequence() { + return true; + } - public String getSeqNo() { - return seqno; - } + public String getSeqNo() { + return seqno; + } - public String getVlans() { - return vlans; - } + public String getVlans() { + return vlans; + } - public String getVmName() { - return vmName; - } + public String getVmName() { + return vmName; + } - public Long getVmId() { - return vmId; - } + public Long getVmId() { + return vmId; + } - public String getTag() { - return tag; - } + public String getTag() { + return tag; + } - public OvsSetTagAndFlowCommand(String vmName, String tag, String vlans, - String seqno, Long vmId) { - this.vmName = vmName; - this.tag = tag; - this.vlans = vlans; - this.seqno = seqno; - this.vmId = vmId; - } + public OvsSetTagAndFlowCommand(String vmName, String tag, String vlans, + String seqno, Long vmId) { + this.vmName = vmName; + this.tag = tag; + this.vlans = vlans; + this.seqno = seqno; + this.vmId = vmId; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetupBridgeCommand.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetupBridgeCommand.java index 6968a4c890f..e3390f3c6f7 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetupBridgeCommand.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/OvsSetupBridgeCommand.java @@ -17,33 +17,32 @@ package com.cloud.agent.api; -import com.cloud.agent.api.Command; public class OvsSetupBridgeCommand extends Command { - Integer key; - Long hostId; - Long networkId; + Integer key; + Long hostId; + Long networkId; - @Override - public boolean executeInSequence() { - return true; - } + @Override + public boolean executeInSequence() { + return true; + } - public OvsSetupBridgeCommand(Integer key, Long hostId, Long networkId) { - this.key = key; - this.hostId = hostId; - this.networkId = networkId; - } + public OvsSetupBridgeCommand(Integer key, Long hostId, Long networkId) { + this.key = key; + this.hostId = hostId; + this.networkId = networkId; + } - public Integer getKey() { - return key; - } + public Integer getKey() { + return key; + } - public Long getHostId() { - return hostId; - } + public Long getHostId() { + return hostId; + } - public Long getNetworkId() { - return networkId; - } + public Long getNetworkId() { + return networkId; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/agent/api/StartupOvsCommand.java b/plugins/network-elements/ovs/src/com/cloud/agent/api/StartupOvsCommand.java index 766aec28e58..17204029970 100644 --- a/plugins/network-elements/ovs/src/com/cloud/agent/api/StartupOvsCommand.java +++ b/plugins/network-elements/ovs/src/com/cloud/agent/api/StartupOvsCommand.java @@ -16,12 +16,11 @@ // under the License. package com.cloud.agent.api; -import com.cloud.agent.api.StartupCommand; import com.cloud.host.Host; public class StartupOvsCommand extends StartupCommand { - public StartupOvsCommand() { - super(Host.Type.L2Networking); - } + public StartupOvsCommand() { + super(Host.Type.L2Networking); + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/network/element/OvsElement.java b/plugins/network-elements/ovs/src/com/cloud/network/element/OvsElement.java index 2641d5488e9..ea46f93b1e2 100644 --- a/plugins/network-elements/ovs/src/com/cloud/network/element/OvsElement.java +++ b/plugins/network-elements/ovs/src/com/cloud/network/element/OvsElement.java @@ -28,6 +28,8 @@ import javax.naming.ConfigurationException; import org.apache.log4j.Logger; +import com.google.gson.Gson; + import com.cloud.agent.api.StartupCommand; import com.cloud.agent.api.StartupOvsCommand; import com.cloud.agent.api.to.LoadBalancerTO; @@ -71,189 +73,188 @@ import com.cloud.vm.NicProfile; import com.cloud.vm.ReservationContext; import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.dao.DomainRouterDao; -import com.google.gson.Gson; -@Local(value = { NetworkElement.class, ConnectivityProvider.class, - SourceNatServiceProvider.class, StaticNatServiceProvider.class, - PortForwardingServiceProvider.class, IpDeployer.class }) +@Local(value = {NetworkElement.class, ConnectivityProvider.class, + SourceNatServiceProvider.class, StaticNatServiceProvider.class, + PortForwardingServiceProvider.class, IpDeployer.class}) public class OvsElement extends AdapterBase implements NetworkElement, - OvsElementService, ConnectivityProvider, ResourceStateAdapter, - PortForwardingServiceProvider, LoadBalancingServiceProvider, - StaticNatServiceProvider, IpDeployer { - @Inject - OvsTunnelManager _ovsTunnelMgr; - @Inject - NetworkModel _networkModel; - @Inject - NetworkServiceMapDao _ntwkSrvcDao; - @Inject - ResourceManager _resourceMgr; - @Inject - DomainRouterDao _routerDao; - @Inject - VpcVirtualNetworkApplianceManager _routerMgr; + OvsElementService, ConnectivityProvider, ResourceStateAdapter, + PortForwardingServiceProvider, LoadBalancingServiceProvider, + StaticNatServiceProvider, IpDeployer { + @Inject + OvsTunnelManager _ovsTunnelMgr; + @Inject + NetworkModel _networkModel; + @Inject + NetworkServiceMapDao _ntwkSrvcDao; + @Inject + ResourceManager _resourceMgr; + @Inject + DomainRouterDao _routerDao; + @Inject + VpcVirtualNetworkApplianceManager _routerMgr; - private static final Logger s_logger = Logger.getLogger(OvsElement.class); - private static final Map> capabilities = setCapabilities(); + private static final Logger s_logger = Logger.getLogger(OvsElement.class); + private static final Map> capabilities = setCapabilities(); - @Override - public Map> getCapabilities() { - return capabilities; - } + @Override + public Map> getCapabilities() { + return capabilities; + } - @Override - public Provider getProvider() { - return Provider.Ovs; - } + @Override + public Provider getProvider() { + return Provider.Ovs; + } - protected boolean canHandle(Network network, Service service) { - s_logger.debug("Checking if OvsElement can handle service " - + service.getName() + " on network " + network.getDisplayText()); - if (network.getBroadcastDomainType() != BroadcastDomainType.Vswitch) { - return false; - } + protected boolean canHandle(Network network, Service service) { + s_logger.debug("Checking if OvsElement can handle service " + + service.getName() + " on network " + network.getDisplayText()); + if (network.getBroadcastDomainType() != BroadcastDomainType.Vswitch) { + return false; + } - if (!_networkModel.isProviderForNetwork(getProvider(), network.getId())) { - s_logger.debug("OvsElement is not a provider for network " - + network.getDisplayText()); - return false; - } + if (!_networkModel.isProviderForNetwork(getProvider(), network.getId())) { + s_logger.debug("OvsElement is not a provider for network " + + network.getDisplayText()); + return false; + } - if (!_ntwkSrvcDao.canProviderSupportServiceInNetwork(network.getId(), - service, Network.Provider.Ovs)) { - s_logger.debug("OvsElement can't provide the " + service.getName() - + " service on network " + network.getDisplayText()); - return false; - } + if (!_ntwkSrvcDao.canProviderSupportServiceInNetwork(network.getId(), + service, Network.Provider.Ovs)) { + s_logger.debug("OvsElement can't provide the " + service.getName() + + " service on network " + network.getDisplayText()); + return false; + } - return true; - } + return true; + } - @Override - public boolean configure(String name, Map params) - throws ConfigurationException { - super.configure(name, params); - _resourceMgr.registerResourceStateAdapter(name, this); - return true; - } + @Override + public boolean configure(String name, Map params) + throws ConfigurationException { + super.configure(name, params); + _resourceMgr.registerResourceStateAdapter(name, this); + return true; + } - @Override - public boolean implement(Network network, NetworkOffering offering, - DeployDestination dest, ReservationContext context) - throws ConcurrentOperationException, ResourceUnavailableException, - InsufficientCapacityException { - s_logger.debug("entering OvsElement implement function for network " - + network.getDisplayText() + " (state " + network.getState() - + ")"); + @Override + public boolean implement(Network network, NetworkOffering offering, + DeployDestination dest, ReservationContext context) + throws ConcurrentOperationException, ResourceUnavailableException, + InsufficientCapacityException { + s_logger.debug("entering OvsElement implement function for network " + + network.getDisplayText() + " (state " + network.getState() + + ")"); - if (!canHandle(network, Service.Connectivity)) { - return false; - } - return true; - } + if (!canHandle(network, Service.Connectivity)) { + return false; + } + return true; + } - @Override - public boolean prepare(Network network, NicProfile nic, - VirtualMachineProfile vm, - DeployDestination dest, ReservationContext context) - throws ConcurrentOperationException, ResourceUnavailableException, - InsufficientCapacityException { - if (!canHandle(network, Service.Connectivity)) { - return false; - } + @Override + public boolean prepare(Network network, NicProfile nic, + VirtualMachineProfile vm, + DeployDestination dest, ReservationContext context) + throws ConcurrentOperationException, ResourceUnavailableException, + InsufficientCapacityException { + if (!canHandle(network, Service.Connectivity)) { + return false; + } - if (nic.getBroadcastType() != Networks.BroadcastDomainType.Vswitch) { - return false; - } + if (nic.getBroadcastType() != Networks.BroadcastDomainType.Vswitch) { + return false; + } - if (nic.getTrafficType() != Networks.TrafficType.Guest) { - return false; - } + if (nic.getTrafficType() != Networks.TrafficType.Guest) { + return false; + } - _ovsTunnelMgr.VmCheckAndCreateTunnel(vm, network, dest); + _ovsTunnelMgr.VmCheckAndCreateTunnel(vm, network, dest); - return true; - } + return true; + } - @Override - public boolean release(Network network, NicProfile nic, - VirtualMachineProfile vm, - ReservationContext context) throws ConcurrentOperationException, - ResourceUnavailableException { - if (!canHandle(network, Service.Connectivity)) { - return false; - } - if (nic.getBroadcastType() != Networks.BroadcastDomainType.Vswitch) { - return false; - } + @Override + public boolean release(Network network, NicProfile nic, + VirtualMachineProfile vm, + ReservationContext context) throws ConcurrentOperationException, + ResourceUnavailableException { + if (!canHandle(network, Service.Connectivity)) { + return false; + } + if (nic.getBroadcastType() != Networks.BroadcastDomainType.Vswitch) { + return false; + } - if (nic.getTrafficType() != Networks.TrafficType.Guest) { - return false; - } + if (nic.getTrafficType() != Networks.TrafficType.Guest) { + return false; + } - _ovsTunnelMgr.CheckAndDestroyTunnel(vm.getVirtualMachine(), network); - return true; - } + _ovsTunnelMgr.CheckAndDestroyTunnel(vm.getVirtualMachine(), network); + return true; + } - @Override - public boolean shutdown(Network network, ReservationContext context, - boolean cleanup) throws ConcurrentOperationException, - ResourceUnavailableException { - if (!canHandle(network, Service.Connectivity)) { - return false; - } - return true; - } + @Override + public boolean shutdown(Network network, ReservationContext context, + boolean cleanup) throws ConcurrentOperationException, + ResourceUnavailableException { + if (!canHandle(network, Service.Connectivity)) { + return false; + } + return true; + } - @Override - public boolean destroy(Network network, ReservationContext context) - throws ConcurrentOperationException, ResourceUnavailableException { - if (!canHandle(network, Service.Connectivity)) { - return false; - } - return true; - } + @Override + public boolean destroy(Network network, ReservationContext context) + throws ConcurrentOperationException, ResourceUnavailableException { + if (!canHandle(network, Service.Connectivity)) { + return false; + } + return true; + } - @Override - public boolean isReady(PhysicalNetworkServiceProvider provider) { - return true; - } + @Override + public boolean isReady(PhysicalNetworkServiceProvider provider) { + return true; + } - @Override - public boolean shutdownProviderInstances( - PhysicalNetworkServiceProvider provider, ReservationContext context) - throws ConcurrentOperationException, ResourceUnavailableException { - return true; - } + @Override + public boolean shutdownProviderInstances( + PhysicalNetworkServiceProvider provider, ReservationContext context) + throws ConcurrentOperationException, ResourceUnavailableException { + return true; + } - @Override - public boolean canEnableIndividualServices() { - return true; - } + @Override + public boolean canEnableIndividualServices() { + return true; + } - @Override - public boolean verifyServicesCombination(Set services) { - if (!services.contains(Service.Connectivity)) { - s_logger.warn("Unable to provide services without Connectivity service enabled for this element"); - return false; - } + @Override + public boolean verifyServicesCombination(Set services) { + if (!services.contains(Service.Connectivity)) { + s_logger.warn("Unable to provide services without Connectivity service enabled for this element"); + return false; + } - return true; - } + return true; + } - private static Map> setCapabilities() { - Map> capabilities = new HashMap>(); + private static Map> setCapabilities() { + Map> capabilities = new HashMap>(); - // L2 Support : SDN provisioning - capabilities.put(Service.Connectivity, null); + // L2 Support : SDN provisioning + capabilities.put(Service.Connectivity, null); - // L3 Support : Port Forwarding - capabilities.put(Service.PortForwarding, null); + // L3 Support : Port Forwarding + capabilities.put(Service.PortForwarding, null); - // L3 support : StaticNat - capabilities.put(Service.StaticNat, null); + // L3 support : StaticNat + capabilities.put(Service.StaticNat, null); - // L3 support : Load Balancer + // L3 support : Load Balancer // Set capabilities for LB service Map lbCapabilities = new HashMap(); lbCapabilities.put(Capability.SupportedLBAlgorithms, "roundrobin,leastconn,source"); @@ -264,9 +265,9 @@ public class OvsElement extends AdapterBase implements NetworkElement, capabilities.put(Service.Lb, lbCapabilities); - return capabilities; - } - + return capabilities; + } + public static String getHAProxyStickinessCapability() { LbStickinessMethod method; List methodList = new ArrayList(1); @@ -274,89 +275,90 @@ public class OvsElement extends AdapterBase implements NetworkElement, method = new LbStickinessMethod(StickinessMethodType.LBCookieBased, "This is loadbalancer cookie based stickiness method."); method.addParam("cookie-name", false, "Cookie name passed in http header by the LB to the client.", false); method.addParam("mode", false, - "Valid values: insert, rewrite, prefix. Default value: insert. In the insert mode cookie will be created" + + "Valid values: insert, rewrite, prefix. Default value: insert. In the insert mode cookie will be created" + " by the LB. In other modes, cookie will be created by the server and LB modifies it.", false); method.addParam( - "nocache", - false, - "This option is recommended in conjunction with the insert mode when there is a cache between the client" + + "nocache", + false, + "This option is recommended in conjunction with the insert mode when there is a cache between the client" + " and HAProxy, as it ensures that a cacheable response will be tagged non-cacheable if a cookie needs " + "to be inserted. This is important because if all persistence cookies are added on a cacheable home page" + " for instance, then all customers will then fetch the page from an outer cache and will all share the " + "same persistence cookie, leading to one server receiving much more traffic than others. See also the " + "insert and postonly options. ", - true); + true); method.addParam( - "indirect", - false, - "When this option is specified in insert mode, cookies will only be added when the server was not reached" + + "indirect", + false, + "When this option is specified in insert mode, cookies will only be added when the server was not reached" + " after a direct access, which means that only when a server is elected after applying a load-balancing algorithm," + " or after a redispatch, then the cookie will be inserted. If the client has all the required information" + " to connect to the same server next time, no further cookie will be inserted. In all cases, when the " + "indirect option is used in insert mode, the cookie is always removed from the requests transmitted to " + "the server. The persistence mechanism then becomes totally transparent from the application point of view.", - true); + true); method.addParam( - "postonly", - false, - "This option ensures that cookie insertion will only be performed on responses to POST requests. It is an" + + "postonly", + false, + "This option ensures that cookie insertion will only be performed on responses to POST requests. It is an" + " alternative to the nocache option, because POST responses are not cacheable, so this ensures that the " + "persistence cookie will never get cached.Since most sites do not need any sort of persistence before the" + " first POST which generally is a login request, this is a very efficient method to optimize caching " + "without risking to find a persistence cookie in the cache. See also the insert and nocache options.", - true); + true); method.addParam( - "domain", - false, - "This option allows to specify the domain at which a cookie is inserted. It requires exactly one parameter:" + + "domain", + false, + "This option allows to specify the domain at which a cookie is inserted. It requires exactly one parameter:" + " a valid domain name. If the domain begins with a dot, the browser is allowed to use it for any host " + "ending with that name. It is also possible to specify several domain names by invoking this option multiple" + " times. Some browsers might have small limits on the number of domains, so be careful when doing that. " + "For the record, sending 10 domains to MSIE 6 or Firefox 2 works as expected.", - false); + false); methodList.add(method); method = new LbStickinessMethod(StickinessMethodType.AppCookieBased, - "This is App session based sticky method. Define session stickiness on an existing application cookie. " + + "This is App session based sticky method. Define session stickiness on an existing application cookie. " + "It can be used only for a specific http traffic"); method.addParam("cookie-name", false, "This is the name of the cookie used by the application and which LB will " + - "have to learn for each new session. Default value: Auto geneared based on ip", false); + "have to learn for each new session. Default value: Auto geneared based on ip", false); method.addParam("length", false, "This is the max number of characters that will be memorized and checked in " + - "each cookie value. Default value:52", false); + "each cookie value. Default value:52", false); method.addParam( - "holdtime", - false, - "This is the time after which the cookie will be removed from memory if unused. The value should be in " + + "holdtime", + false, + "This is the time after which the cookie will be removed from memory if unused. The value should be in " + "the format Example : 20s or 30m or 4h or 5d . only seconds(s), minutes(m) hours(h) and days(d) are valid," + " cannot use th combinations like 20h30m. Default value:3h ", - false); + false); method.addParam( - "request-learn", - false, - "If this option is specified, then haproxy will be able to learn the cookie found in the request in case the server does not specify any in response. This is typically what happens with PHPSESSID cookies, or when haproxy's session expires before the application's session and the correct server is selected. It is recommended to specify this option to improve reliability", - true); + "request-learn", + false, + "If this option is specified, then haproxy will be able to learn the cookie found in the request in case the server does not specify any in response. This is typically what happens with PHPSESSID cookies, or when haproxy's session expires before the application's session and the correct server is selected. It is recommended to specify this option to improve reliability", + true); method.addParam( - "prefix", - false, - "When this option is specified, haproxy will match on the cookie prefix (or URL parameter prefix). " + + "prefix", + false, + "When this option is specified, haproxy will match on the cookie prefix (or URL parameter prefix). " + + "The appsession value is the data following this prefix. Example : appsession ASPSESSIONID len 64 timeout 3h prefix This will match the cookie ASPSESSIONIDXXXX=XXXXX, the appsession value will be XXXX=XXXXX.", - true); + true); method.addParam( - "mode", - false, - "This option allows to change the URL parser mode. 2 modes are currently supported : - path-parameters " + + "mode", + false, + "This option allows to change the URL parser mode. 2 modes are currently supported : - path-parameters " + ": The parser looks for the appsession in the path parameters part (each parameter is separated by a semi-colon), " + "which is convenient for JSESSIONID for example.This is the default mode if the option is not set. - query-string :" + " In this mode, the parser will look for the appsession in the query string.", - false); + false); methodList.add(method); method = new LbStickinessMethod(StickinessMethodType.SourceBased, "This is source based Stickiness method, " + - "it can be used for any type of protocol."); + "it can be used for any type of protocol."); method.addParam("tablesize", false, "Size of table to store source ip addresses. example: tablesize=200k or 300m" + - " or 400g. Default value:200k", false); + " or 400g. Default value:200k", false); method.addParam("expire", false, "Entry in source ip table will expire after expire duration. units can be s,m,h,d ." + - " example: expire=30m 20s 50h 4d. Default value:3h", false); + " example: expire=30m 20s 50h 4d. Default value:3h", false); methodList.add(method); Gson gson = new Gson(); @@ -364,287 +366,287 @@ public class OvsElement extends AdapterBase implements NetworkElement, return capability; } - @Override - public List> getCommands() { - List> cmdList = new ArrayList>(); - return cmdList; - } + @Override + public List> getCommands() { + List> cmdList = new ArrayList>(); + return cmdList; + } - @Override - public HostVO createHostVOForConnectedAgent(HostVO host, - StartupCommand[] cmd) { - return null; - } + @Override + public HostVO createHostVOForConnectedAgent(HostVO host, + StartupCommand[] cmd) { + return null; + } - @Override - public HostVO createHostVOForDirectConnectAgent(HostVO host, - StartupCommand[] startup, ServerResource resource, - Map details, List hostTags) { - if (!(startup[0] instanceof StartupOvsCommand)) { - return null; - } - host.setType(Host.Type.L2Networking); - return host; - } + @Override + public HostVO createHostVOForDirectConnectAgent(HostVO host, + StartupCommand[] startup, ServerResource resource, + Map details, List hostTags) { + if (!(startup[0] instanceof StartupOvsCommand)) { + return null; + } + host.setType(Host.Type.L2Networking); + return host; + } - @Override - public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, - boolean isForceDeleteStorage) throws UnableDeleteHostException { - if (!(host.getType() == Host.Type.L2Networking)) { - return null; - } - return new DeleteHostAnswer(true); - } + @Override + public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, + boolean isForceDeleteStorage) throws UnableDeleteHostException { + if (!(host.getType() == Host.Type.L2Networking)) { + return null; + } + return new DeleteHostAnswer(true); + } - @Override - public IpDeployer getIpDeployer(Network network) { - return this; - } + @Override + public IpDeployer getIpDeployer(Network network) { + return this; + } - @Override - public boolean applyIps(Network network, - List ipAddress, Set services) - throws ResourceUnavailableException { - boolean canHandle = true; - for (Service service : services) { - // check if Ovs can handle services except SourceNat & Firewall - if (!canHandle(network, service) && service != Service.SourceNat && service != Service.Firewall) { - canHandle = false; - break; - } - } - if (canHandle) { - List routers = _routerDao.listByNetworkAndRole( - network.getId(), Role.VIRTUAL_ROUTER); - if (routers == null || routers.isEmpty()) { - s_logger.debug("Virtual router element doesn't need to associate ip addresses on the backend; virtual " - + "router doesn't exist in the network " - + network.getId()); - return true; - } + @Override + public boolean applyIps(Network network, + List ipAddress, Set services) + throws ResourceUnavailableException { + boolean canHandle = true; + for (Service service : services) { + // check if Ovs can handle services except SourceNat & Firewall + if (!canHandle(network, service) && service != Service.SourceNat && service != Service.Firewall) { + canHandle = false; + break; + } + } + if (canHandle) { + List routers = _routerDao.listByNetworkAndRole( + network.getId(), Role.VIRTUAL_ROUTER); + if (routers == null || routers.isEmpty()) { + s_logger.debug("Virtual router element doesn't need to associate ip addresses on the backend; virtual " + + "router doesn't exist in the network " + + network.getId()); + return true; + } - return _routerMgr.associatePublicIP(network, ipAddress, routers); - } else { - return false; - } - } + return _routerMgr.associatePublicIP(network, ipAddress, routers); + } else { + return false; + } + } - @Override - public boolean applyStaticNats(Network network, List rules) - throws ResourceUnavailableException { - if (!canHandle(network, Service.StaticNat)) { - return false; - } - List routers = _routerDao.listByNetworkAndRole( - network.getId(), Role.VIRTUAL_ROUTER); - if (routers == null || routers.isEmpty()) { - s_logger.debug("Ovs element doesn't need to apply static nat on the backend; virtual " - + "router doesn't exist in the network " + network.getId()); - return true; - } + @Override + public boolean applyStaticNats(Network network, List rules) + throws ResourceUnavailableException { + if (!canHandle(network, Service.StaticNat)) { + return false; + } + List routers = _routerDao.listByNetworkAndRole( + network.getId(), Role.VIRTUAL_ROUTER); + if (routers == null || routers.isEmpty()) { + s_logger.debug("Ovs element doesn't need to apply static nat on the backend; virtual " + + "router doesn't exist in the network " + network.getId()); + return true; + } - return _routerMgr.applyStaticNats(network, rules, routers); - } + return _routerMgr.applyStaticNats(network, rules, routers); + } - @Override - public boolean applyPFRules(Network network, List rules) - throws ResourceUnavailableException { - if (!canHandle(network, Service.PortForwarding)) { - return false; - } - List routers = _routerDao.listByNetworkAndRole( - network.getId(), Role.VIRTUAL_ROUTER); - if (routers == null || routers.isEmpty()) { - s_logger.debug("Ovs element doesn't need to apply firewall rules on the backend; virtual " - + "router doesn't exist in the network " + network.getId()); - return true; - } + @Override + public boolean applyPFRules(Network network, List rules) + throws ResourceUnavailableException { + if (!canHandle(network, Service.PortForwarding)) { + return false; + } + List routers = _routerDao.listByNetworkAndRole( + network.getId(), Role.VIRTUAL_ROUTER); + if (routers == null || routers.isEmpty()) { + s_logger.debug("Ovs element doesn't need to apply firewall rules on the backend; virtual " + + "router doesn't exist in the network " + network.getId()); + return true; + } - return _routerMgr.applyFirewallRules(network, rules, routers); - } + return _routerMgr.applyFirewallRules(network, rules, routers); + } - @Override - public boolean applyLBRules(Network network, List rules) - throws ResourceUnavailableException { - if (canHandle(network, Service.Lb)) { - if (!canHandleLbRules(rules)) { - return false; - } + @Override + public boolean applyLBRules(Network network, List rules) + throws ResourceUnavailableException { + if (canHandle(network, Service.Lb)) { + if (!canHandleLbRules(rules)) { + return false; + } - List routers = _routerDao.listByNetworkAndRole( - network.getId(), Role.VIRTUAL_ROUTER); - if (routers == null || routers.isEmpty()) { - s_logger.debug("Virtual router elemnt doesn't need to apply firewall rules on the backend; virtual " - + "router doesn't exist in the network " - + network.getId()); - return true; - } + List routers = _routerDao.listByNetworkAndRole( + network.getId(), Role.VIRTUAL_ROUTER); + if (routers == null || routers.isEmpty()) { + s_logger.debug("Virtual router elemnt doesn't need to apply firewall rules on the backend; virtual " + + "router doesn't exist in the network " + + network.getId()); + return true; + } - if (!_routerMgr.applyLoadBalancingRules(network, rules, routers)) { - throw new CloudRuntimeException( - "Failed to apply load balancing rules in network " - + network.getId()); - } else { - return true; - } - } else { - return false; - } - } + if (!_routerMgr.applyLoadBalancingRules(network, rules, routers)) { + throw new CloudRuntimeException( + "Failed to apply load balancing rules in network " + + network.getId()); + } else { + return true; + } + } else { + return false; + } + } - @Override - public boolean validateLBRule(Network network, LoadBalancingRule rule) { - List rules = new ArrayList(); - rules.add(rule); - if (canHandle(network, Service.Lb) && canHandleLbRules(rules)) { - List routers = _routerDao.listByNetworkAndRole( - network.getId(), Role.VIRTUAL_ROUTER); - if (routers == null || routers.isEmpty()) { - return true; - } - return validateHAProxyLBRule(rule); - } - return true; - } + @Override + public boolean validateLBRule(Network network, LoadBalancingRule rule) { + List rules = new ArrayList(); + rules.add(rule); + if (canHandle(network, Service.Lb) && canHandleLbRules(rules)) { + List routers = _routerDao.listByNetworkAndRole( + network.getId(), Role.VIRTUAL_ROUTER); + if (routers == null || routers.isEmpty()) { + return true; + } + return validateHAProxyLBRule(rule); + } + return true; + } - @Override - public List updateHealthChecks(Network network, - List lbrules) { - // TODO Auto-generated method stub - return null; - } + @Override + public List updateHealthChecks(Network network, + List lbrules) { + // TODO Auto-generated method stub + return null; + } - private boolean canHandleLbRules(List rules) { - Map lbCaps = this.getCapabilities().get(Service.Lb); - if (!lbCaps.isEmpty()) { - String schemeCaps = lbCaps.get(Capability.LbSchemes); - if (schemeCaps != null) { - for (LoadBalancingRule rule : rules) { - if (!schemeCaps.contains(rule.getScheme().toString())) { - s_logger.debug("Scheme " + rules.get(0).getScheme() - + " is not supported by the provider " - + this.getName()); - return false; - } - } - } - } - return true; - } + private boolean canHandleLbRules(List rules) { + Map lbCaps = this.getCapabilities().get(Service.Lb); + if (!lbCaps.isEmpty()) { + String schemeCaps = lbCaps.get(Capability.LbSchemes); + if (schemeCaps != null) { + for (LoadBalancingRule rule : rules) { + if (!schemeCaps.contains(rule.getScheme().toString())) { + s_logger.debug("Scheme " + rules.get(0).getScheme() + + " is not supported by the provider " + + this.getName()); + return false; + } + } + } + } + return true; + } - public static boolean validateHAProxyLBRule(LoadBalancingRule rule) { - String timeEndChar = "dhms"; + public static boolean validateHAProxyLBRule(LoadBalancingRule rule) { + String timeEndChar = "dhms"; - for (LbStickinessPolicy stickinessPolicy : rule.getStickinessPolicies()) { - List> paramsList = stickinessPolicy - .getParams(); + for (LbStickinessPolicy stickinessPolicy : rule.getStickinessPolicies()) { + List> paramsList = stickinessPolicy + .getParams(); - if (StickinessMethodType.LBCookieBased.getName().equalsIgnoreCase( - stickinessPolicy.getMethodName())) { + if (StickinessMethodType.LBCookieBased.getName().equalsIgnoreCase( + stickinessPolicy.getMethodName())) { - } else if (StickinessMethodType.SourceBased.getName() - .equalsIgnoreCase(stickinessPolicy.getMethodName())) { - String tablesize = "200k"; // optional - String expire = "30m"; // optional + } else if (StickinessMethodType.SourceBased.getName() + .equalsIgnoreCase(stickinessPolicy.getMethodName())) { + String tablesize = "200k"; // optional + String expire = "30m"; // optional - /* overwrite default values with the stick parameters */ - for (Pair paramKV : paramsList) { - String key = paramKV.first(); - String value = paramKV.second(); - if ("tablesize".equalsIgnoreCase(key)) - tablesize = value; - if ("expire".equalsIgnoreCase(key)) - expire = value; - } - if ((expire != null) - && !containsOnlyNumbers(expire, timeEndChar)) { - throw new InvalidParameterValueException( - "Failed LB in validation rule id: " + rule.getId() - + " Cause: expire is not in timeformat: " - + expire); - } - if ((tablesize != null) - && !containsOnlyNumbers(tablesize, "kmg")) { - throw new InvalidParameterValueException( - "Failed LB in validation rule id: " - + rule.getId() - + " Cause: tablesize is not in size format: " - + tablesize); + /* overwrite default values with the stick parameters */ + for (Pair paramKV : paramsList) { + String key = paramKV.first(); + String value = paramKV.second(); + if ("tablesize".equalsIgnoreCase(key)) + tablesize = value; + if ("expire".equalsIgnoreCase(key)) + expire = value; + } + if ((expire != null) + && !containsOnlyNumbers(expire, timeEndChar)) { + throw new InvalidParameterValueException( + "Failed LB in validation rule id: " + rule.getId() + + " Cause: expire is not in timeformat: " + + expire); + } + if ((tablesize != null) + && !containsOnlyNumbers(tablesize, "kmg")) { + throw new InvalidParameterValueException( + "Failed LB in validation rule id: " + + rule.getId() + + " Cause: tablesize is not in size format: " + + tablesize); - } - } else if (StickinessMethodType.AppCookieBased.getName() - .equalsIgnoreCase(stickinessPolicy.getMethodName())) { - /* - * FORMAT : appsession len timeout - * [request-learn] [prefix] [mode - * ] - */ - /* example: appsession JSESSIONID len 52 timeout 3h */ - String cookieName = null; // optional - String length = null; // optional - String holdTime = null; // optional + } + } else if (StickinessMethodType.AppCookieBased.getName() + .equalsIgnoreCase(stickinessPolicy.getMethodName())) { + /* + * FORMAT : appsession len timeout + * [request-learn] [prefix] [mode + * ] + */ + /* example: appsession JSESSIONID len 52 timeout 3h */ + String cookieName = null; // optional + String length = null; // optional + String holdTime = null; // optional - for (Pair paramKV : paramsList) { - String key = paramKV.first(); - String value = paramKV.second(); - if ("cookie-name".equalsIgnoreCase(key)) - cookieName = value; - if ("length".equalsIgnoreCase(key)) - length = value; - if ("holdtime".equalsIgnoreCase(key)) - holdTime = value; - } + for (Pair paramKV : paramsList) { + String key = paramKV.first(); + String value = paramKV.second(); + if ("cookie-name".equalsIgnoreCase(key)) + cookieName = value; + if ("length".equalsIgnoreCase(key)) + length = value; + if ("holdtime".equalsIgnoreCase(key)) + holdTime = value; + } - if ((length != null) && (!containsOnlyNumbers(length, null))) { - throw new InvalidParameterValueException( - "Failed LB in validation rule id: " + rule.getId() - + " Cause: length is not a number: " - + length); - } - if ((holdTime != null) - && (!containsOnlyNumbers(holdTime, timeEndChar) && !containsOnlyNumbers( - holdTime, null))) { - throw new InvalidParameterValueException( - "Failed LB in validation rule id: " + rule.getId() - + " Cause: holdtime is not in timeformat: " - + holdTime); - } - } - } - return true; - } + if ((length != null) && (!containsOnlyNumbers(length, null))) { + throw new InvalidParameterValueException( + "Failed LB in validation rule id: " + rule.getId() + + " Cause: length is not a number: " + + length); + } + if ((holdTime != null) + && (!containsOnlyNumbers(holdTime, timeEndChar) && !containsOnlyNumbers( + holdTime, null))) { + throw new InvalidParameterValueException( + "Failed LB in validation rule id: " + rule.getId() + + " Cause: holdtime is not in timeformat: " + + holdTime); + } + } + } + return true; + } - /* - * This function detects numbers like 12 ,32h ,42m .. etc,. 1) plain number - * like 12 2) time or tablesize like 12h, 34m, 45k, 54m , here last - * character is non-digit but from known characters . - */ - private static boolean containsOnlyNumbers(String str, String endChar) { - if (str == null) - return false; + /* + * This function detects numbers like 12 ,32h ,42m .. etc,. 1) plain number + * like 12 2) time or tablesize like 12h, 34m, 45k, 54m , here last + * character is non-digit but from known characters . + */ + private static boolean containsOnlyNumbers(String str, String endChar) { + if (str == null) + return false; - String number = str; - if (endChar != null) { - boolean matchedEndChar = false; - if (str.length() < 2) - return false; // atleast one numeric and one char. example: - // 3h - char strEnd = str.toCharArray()[str.length() - 1]; - for (char c : endChar.toCharArray()) { - if (strEnd == c) { - number = str.substring(0, str.length() - 1); - matchedEndChar = true; - break; - } - } - if (!matchedEndChar) - return false; - } - try { - int i = Integer.parseInt(number); - } catch (NumberFormatException e) { - return false; - } - return true; - } + String number = str; + if (endChar != null) { + boolean matchedEndChar = false; + if (str.length() < 2) + return false; // atleast one numeric and one char. example: + // 3h + char strEnd = str.toCharArray()[str.length() - 1]; + for (char c : endChar.toCharArray()) { + if (strEnd == c) { + number = str.substring(0, str.length() - 1); + matchedEndChar = true; + break; + } + } + if (!matchedEndChar) + return false; + } + try { + int i = Integer.parseInt(number); + } catch (NumberFormatException e) { + return false; + } + return true; + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java b/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java index 7a671a0359f..6aacbb21c62 100644 --- a/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java +++ b/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java @@ -20,9 +20,10 @@ import javax.ejb.Local; import javax.inject.Inject; import org.apache.log4j.Logger; -import org.apache.cloudstack.context.CallContext; import org.springframework.stereotype.Component; +import org.apache.cloudstack.context.CallContext; + import com.cloud.dc.DataCenter; import com.cloud.dc.DataCenter.NetworkType; import com.cloud.deploy.DeployDestination; @@ -48,175 +49,174 @@ import com.cloud.offerings.dao.NetworkOfferingServiceMapDao; import com.cloud.user.Account; import com.cloud.vm.NicProfile; import com.cloud.vm.ReservationContext; -import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; @Component @Local(value = NetworkGuru.class) public class OvsGuestNetworkGuru extends GuestNetworkGuru { - private static final Logger s_logger = Logger - .getLogger(OvsGuestNetworkGuru.class); + private static final Logger s_logger = Logger + .getLogger(OvsGuestNetworkGuru.class); - @Inject - OvsTunnelManager _ovsTunnelMgr; - @Inject - NetworkOfferingServiceMapDao _ntwkOfferingSrvcDao; + @Inject + OvsTunnelManager _ovsTunnelMgr; + @Inject + NetworkOfferingServiceMapDao _ntwkOfferingSrvcDao; - OvsGuestNetworkGuru() { - super(); - _isolationMethods = new IsolationMethod[] { IsolationMethod.GRE, - IsolationMethod.L3, IsolationMethod.VLAN }; - } + OvsGuestNetworkGuru() { + super(); + _isolationMethods = new IsolationMethod[] {IsolationMethod.GRE, + IsolationMethod.L3, IsolationMethod.VLAN}; + } - @Override - protected boolean canHandle(NetworkOffering offering, - final NetworkType networkType, final PhysicalNetwork physicalNetwork) { - // This guru handles only Guest Isolated network that supports Source - // nat service - if (networkType == NetworkType.Advanced - && isMyTrafficType(offering.getTrafficType()) - && offering.getGuestType() == Network.GuestType.Isolated - && isMyIsolationMethod(physicalNetwork) - && _ntwkOfferingSrvcDao.areServicesSupportedByNetworkOffering( - offering.getId(), Service.Connectivity)) { - return true; - } else { - s_logger.trace("We only take care of Guest networks of type " - + GuestType.Isolated + " in zone of type " - + NetworkType.Advanced); - return false; - } - } + @Override + protected boolean canHandle(NetworkOffering offering, + final NetworkType networkType, final PhysicalNetwork physicalNetwork) { + // This guru handles only Guest Isolated network that supports Source + // nat service + if (networkType == NetworkType.Advanced + && isMyTrafficType(offering.getTrafficType()) + && offering.getGuestType() == Network.GuestType.Isolated + && isMyIsolationMethod(physicalNetwork) + && _ntwkOfferingSrvcDao.areServicesSupportedByNetworkOffering( + offering.getId(), Service.Connectivity)) { + return true; + } else { + s_logger.trace("We only take care of Guest networks of type " + + GuestType.Isolated + " in zone of type " + + NetworkType.Advanced); + return false; + } + } - @Override - public Network design(NetworkOffering offering, DeploymentPlan plan, - Network userSpecified, Account owner) { + @Override + public Network design(NetworkOffering offering, DeploymentPlan plan, + Network userSpecified, Account owner) { - PhysicalNetworkVO physnet = _physicalNetworkDao.findById(plan - .getPhysicalNetworkId()); - DataCenter dc = _dcDao.findById(plan.getDataCenterId()); - if (!canHandle(offering, dc.getNetworkType(), physnet)) { - s_logger.debug("Refusing to design this network"); - return null; - } - NetworkVO config = (NetworkVO) super.design(offering, plan, - userSpecified, owner); - if (config == null) { - return null; - } + PhysicalNetworkVO physnet = _physicalNetworkDao.findById(plan + .getPhysicalNetworkId()); + DataCenter dc = _dcDao.findById(plan.getDataCenterId()); + if (!canHandle(offering, dc.getNetworkType(), physnet)) { + s_logger.debug("Refusing to design this network"); + return null; + } + NetworkVO config = (NetworkVO)super.design(offering, plan, + userSpecified, owner); + if (config == null) { + return null; + } - config.setBroadcastDomainType(BroadcastDomainType.Vswitch); + config.setBroadcastDomainType(BroadcastDomainType.Vswitch); - return config; - } + return config; + } - @Override - public Network implement(Network network, NetworkOffering offering, - DeployDestination dest, ReservationContext context) - throws InsufficientVirtualNetworkCapcityException { - assert (network.getState() == State.Implementing) : "Why are we implementing " - + network; + @Override + public Network implement(Network network, NetworkOffering offering, + DeployDestination dest, ReservationContext context) + throws InsufficientVirtualNetworkCapcityException { + assert (network.getState() == State.Implementing) : "Why are we implementing " + + network; - long dcId = dest.getDataCenter().getId(); - NetworkType nwType = dest.getDataCenter().getNetworkType(); - // get physical network id - Long physicalNetworkId = network.getPhysicalNetworkId(); - // physical network id can be null in Guest Network in Basic zone, so - // locate the physical network - if (physicalNetworkId == null) { - physicalNetworkId = _networkModel.findPhysicalNetworkId(dcId, - offering.getTags(), offering.getTrafficType()); - } - PhysicalNetworkVO physnet = _physicalNetworkDao - .findById(physicalNetworkId); + long dcId = dest.getDataCenter().getId(); + NetworkType nwType = dest.getDataCenter().getNetworkType(); + // get physical network id + Long physicalNetworkId = network.getPhysicalNetworkId(); + // physical network id can be null in Guest Network in Basic zone, so + // locate the physical network + if (physicalNetworkId == null) { + physicalNetworkId = _networkModel.findPhysicalNetworkId(dcId, + offering.getTags(), offering.getTrafficType()); + } + PhysicalNetworkVO physnet = _physicalNetworkDao + .findById(physicalNetworkId); - if (!canHandle(offering, nwType, physnet)) { - s_logger.debug("Refusing to design this network"); - return null; - } - NetworkVO implemented = (NetworkVO) super.implement(network, offering, - dest, context); + if (!canHandle(offering, nwType, physnet)) { + s_logger.debug("Refusing to design this network"); + return null; + } + NetworkVO implemented = (NetworkVO)super.implement(network, offering, + dest, context); - if (network.getGateway() != null) { - implemented.setGateway(network.getGateway()); - } + if (network.getGateway() != null) { + implemented.setGateway(network.getGateway()); + } - if (network.getCidr() != null) { - implemented.setCidr(network.getCidr()); - } - String name = network.getName(); - if (name == null || name.isEmpty()) { - name = ((NetworkVO) network).getUuid(); - } + if (network.getCidr() != null) { + implemented.setCidr(network.getCidr()); + } + String name = network.getName(); + if (name == null || name.isEmpty()) { + name = ((NetworkVO)network).getUuid(); + } - // do we need to create switch right now? + // do we need to create switch right now? - implemented.setBroadcastDomainType(BroadcastDomainType.Vswitch); + implemented.setBroadcastDomainType(BroadcastDomainType.Vswitch); - return implemented; - } + return implemented; + } - @Override - public void reserve(NicProfile nic, Network network, - VirtualMachineProfile vm, - DeployDestination dest, ReservationContext context) - throws InsufficientVirtualNetworkCapcityException, - InsufficientAddressCapacityException { - // TODO Auto-generated method stub - super.reserve(nic, network, vm, dest, context); - } + @Override + public void reserve(NicProfile nic, Network network, + VirtualMachineProfile vm, + DeployDestination dest, ReservationContext context) + throws InsufficientVirtualNetworkCapcityException, + InsufficientAddressCapacityException { + // TODO Auto-generated method stub + super.reserve(nic, network, vm, dest, context); + } - @Override - public boolean release(NicProfile nic, - VirtualMachineProfile vm, - String reservationId) { - // TODO Auto-generated method stub - return super.release(nic, vm, reservationId); - } + @Override + public boolean release(NicProfile nic, + VirtualMachineProfile vm, + String reservationId) { + // TODO Auto-generated method stub + return super.release(nic, vm, reservationId); + } - @Override - public void shutdown(NetworkProfile profile, NetworkOffering offering) { - NetworkVO networkObject = _networkDao.findById(profile.getId()); - if (networkObject.getBroadcastDomainType() != BroadcastDomainType.Vswitch - || networkObject.getBroadcastUri() == null) { - s_logger.warn("BroadcastUri is empty or incorrect for guestnetwork " - + networkObject.getDisplayText()); - return; - } + @Override + public void shutdown(NetworkProfile profile, NetworkOffering offering) { + NetworkVO networkObject = _networkDao.findById(profile.getId()); + if (networkObject.getBroadcastDomainType() != BroadcastDomainType.Vswitch + || networkObject.getBroadcastUri() == null) { + s_logger.warn("BroadcastUri is empty or incorrect for guestnetwork " + + networkObject.getDisplayText()); + return; + } - super.shutdown(profile, offering); - } + super.shutdown(profile, offering); + } - @Override - public boolean trash(Network network, NetworkOffering offering) { - return super.trash(network, offering); - } + @Override + public boolean trash(Network network, NetworkOffering offering) { + return super.trash(network, offering); + } - @Override - protected void allocateVnet(Network network, NetworkVO implemented, - long dcId, long physicalNetworkId, String reservationId) - throws InsufficientVirtualNetworkCapcityException { - if (network.getBroadcastUri() == null) { - String vnet = _dcDao.allocateVnet(dcId, physicalNetworkId, - network.getAccountId(), reservationId, - UseSystemGuestVlans.valueIn(network.getAccountId())); - if (vnet == null) { - throw new InsufficientVirtualNetworkCapcityException( - "Unable to allocate vnet as a part of network " - + network + " implement ", DataCenter.class, - dcId); - } - implemented - .setBroadcastUri(BroadcastDomainType.Vswitch.toUri(vnet)); - ActionEventUtils.onCompletedActionEvent( - CallContext.current().getCallingUserId(), - network.getAccountId(), - EventVO.LEVEL_INFO, - EventTypes.EVENT_ZONE_VLAN_ASSIGN, - "Assigned Zone Vlan: " + vnet + " Network Id: " - + network.getId(), 0); - } else { - implemented.setBroadcastUri(network.getBroadcastUri()); - } - } + @Override + protected void allocateVnet(Network network, NetworkVO implemented, + long dcId, long physicalNetworkId, String reservationId) + throws InsufficientVirtualNetworkCapcityException { + if (network.getBroadcastUri() == null) { + String vnet = _dcDao.allocateVnet(dcId, physicalNetworkId, + network.getAccountId(), reservationId, + UseSystemGuestVlans.valueIn(network.getAccountId())); + if (vnet == null) { + throw new InsufficientVirtualNetworkCapcityException( + "Unable to allocate vnet as a part of network " + + network + " implement ", DataCenter.class, + dcId); + } + implemented + .setBroadcastUri(BroadcastDomainType.Vswitch.toUri(vnet)); + ActionEventUtils.onCompletedActionEvent( + CallContext.current().getCallingUserId(), + network.getAccountId(), + EventVO.LEVEL_INFO, + EventTypes.EVENT_ZONE_VLAN_ASSIGN, + "Assigned Zone Vlan: " + vnet + " Network Id: " + + network.getId(), 0); + } else { + implemented.setBroadcastUri(network.getBroadcastUri()); + } + } } diff --git a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java index 553d645bd0d..aa0f42e617e 100644 --- a/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java +++ b/plugins/network-elements/ovs/src/com/cloud/network/ovs/OvsTunnelManagerImpl.java @@ -29,6 +29,7 @@ import javax.persistence.EntityExistsException; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; + import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import com.cloud.agent.AgentManager; @@ -78,74 +79,74 @@ import com.cloud.vm.dao.UserVmDao; public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManager { public static final Logger s_logger = Logger.getLogger(OvsTunnelManagerImpl.class.getName()); - // boolean _isEnabled; - ScheduledExecutorService _executorPool; - ScheduledExecutorService _cleanupExecutor; + // boolean _isEnabled; + ScheduledExecutorService _executorPool; + ScheduledExecutorService _cleanupExecutor; - @Inject - ConfigurationDao _configDao; - @Inject - NicDao _nicDao; - @Inject - HostDao _hostDao; - @Inject - PhysicalNetworkTrafficTypeDao _physNetTTDao; - @Inject - UserVmDao _userVmDao; - @Inject - DomainRouterDao _routerDao; - @Inject - OvsTunnelNetworkDao _tunnelNetworkDao; - @Inject - OvsTunnelInterfaceDao _tunnelInterfaceDao; - @Inject - AgentManager _agentMgr; + @Inject + ConfigurationDao _configDao; + @Inject + NicDao _nicDao; + @Inject + HostDao _hostDao; + @Inject + PhysicalNetworkTrafficTypeDao _physNetTTDao; + @Inject + UserVmDao _userVmDao; + @Inject + DomainRouterDao _routerDao; + @Inject + OvsTunnelNetworkDao _tunnelNetworkDao; + @Inject + OvsTunnelInterfaceDao _tunnelInterfaceDao; + @Inject + AgentManager _agentMgr; - @Override - public boolean configure(String name, Map params) - throws ConfigurationException { + @Override + public boolean configure(String name, Map params) + throws ConfigurationException { _executorPool = Executors.newScheduledThreadPool(10, new NamedThreadFactory("OVS")); _cleanupExecutor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("OVS-Cleanup")); return true; } - @DB - protected OvsTunnelInterfaceVO createInterfaceRecord(String ip, - String netmask, String mac, long hostId, String label) { - OvsTunnelInterfaceVO ti = null; - try { - ti = new OvsTunnelInterfaceVO(ip, netmask, mac, hostId, label); - // TODO: Is locking really necessary here? - OvsTunnelInterfaceVO lock = _tunnelInterfaceDao - .acquireInLockTable(Long.valueOf(1)); - if (lock == null) { - s_logger.warn("Cannot lock table ovs_tunnel_account"); - return null; - } - _tunnelInterfaceDao.persist(ti); - _tunnelInterfaceDao.releaseFromLockTable(lock.getId()); - } catch (EntityExistsException e) { - s_logger.debug("A record for the interface for network " + label - + " on host id " + hostId + " already exists"); - } - return ti; - } + @DB + protected OvsTunnelInterfaceVO createInterfaceRecord(String ip, + String netmask, String mac, long hostId, String label) { + OvsTunnelInterfaceVO ti = null; + try { + ti = new OvsTunnelInterfaceVO(ip, netmask, mac, hostId, label); + // TODO: Is locking really necessary here? + OvsTunnelInterfaceVO lock = _tunnelInterfaceDao + .acquireInLockTable(Long.valueOf(1)); + if (lock == null) { + s_logger.warn("Cannot lock table ovs_tunnel_account"); + return null; + } + _tunnelInterfaceDao.persist(ti); + _tunnelInterfaceDao.releaseFromLockTable(lock.getId()); + } catch (EntityExistsException e) { + s_logger.debug("A record for the interface for network " + label + + " on host id " + hostId + " already exists"); + } + return ti; + } - private String handleFetchInterfaceAnswer(Answer[] answers, Long hostId) { - OvsFetchInterfaceAnswer ans = (OvsFetchInterfaceAnswer) answers[0]; - if (ans.getResult()) { - if (ans.getIp() != null && !("".equals(ans.getIp()))) { - OvsTunnelInterfaceVO ti = createInterfaceRecord(ans.getIp(), - ans.getNetmask(), ans.getMac(), hostId, ans.getLabel()); - return ti.getIp(); - } - } - // Fetch interface failed! - s_logger.warn("Unable to fetch the IP address for the GRE tunnel endpoint" - + ans.getDetails()); - return null; - } + private String handleFetchInterfaceAnswer(Answer[] answers, Long hostId) { + OvsFetchInterfaceAnswer ans = (OvsFetchInterfaceAnswer)answers[0]; + if (ans.getResult()) { + if (ans.getIp() != null && !("".equals(ans.getIp()))) { + OvsTunnelInterfaceVO ti = createInterfaceRecord(ans.getIp(), + ans.getNetmask(), ans.getMac(), hostId, ans.getLabel()); + return ti.getIp(); + } + } + // Fetch interface failed! + s_logger.warn("Unable to fetch the IP address for the GRE tunnel endpoint" + + ans.getDetails()); + return null; + } @DB protected OvsTunnelNetworkVO createTunnelRecord(long from, long to, long networkId, int key) { @@ -165,7 +166,6 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage return ta; } - private void handleCreateTunnelAnswer(Answer[] answers) { OvsCreateTunnelAnswer r = (OvsCreateTunnelAnswer)answers[0]; String s = @@ -177,66 +177,66 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage OvsTunnelNetworkVO tunnel = _tunnelNetworkDao.getByFromToNetwork(from, to, networkId); if (tunnel == null) { throw new CloudRuntimeException( - String.format("Unable find tunnelNetwork record" + - "(from=%1$s,to=%2$s, account=%3$s", - from, to, networkId)); - } - if (!r.getResult()) { - tunnel.setState("FAILED"); - s_logger.warn("Create GRE tunnel failed due to " + r.getDetails() - + s); - } else { - tunnel.setState("SUCCESS"); - tunnel.setPortName(r.getInPortName()); - s_logger.warn("Create GRE tunnel " + r.getDetails() + s); - } - _tunnelNetworkDao.update(tunnel.getId(), tunnel); - } + String.format("Unable find tunnelNetwork record" + + "(from=%1$s,to=%2$s, account=%3$s", + from, to, networkId)); + } + if (!r.getResult()) { + tunnel.setState("FAILED"); + s_logger.warn("Create GRE tunnel failed due to " + r.getDetails() + + s); + } else { + tunnel.setState("SUCCESS"); + tunnel.setPortName(r.getInPortName()); + s_logger.warn("Create GRE tunnel " + r.getDetails() + s); + } + _tunnelNetworkDao.update(tunnel.getId(), tunnel); + } - private String getGreEndpointIP(Host host, Network nw) - throws AgentUnavailableException, OperationTimedoutException { - String endpointIp = null; - // Fetch fefault name for network label from configuration - String physNetLabel = _configDao.getValue(Config.OvsTunnelNetworkDefaultLabel.key()); + private String getGreEndpointIP(Host host, Network nw) + throws AgentUnavailableException, OperationTimedoutException { + String endpointIp = null; + // Fetch fefault name for network label from configuration + String physNetLabel = _configDao.getValue(Config.OvsTunnelNetworkDefaultLabel.key()); Long physNetId = nw.getPhysicalNetworkId(); PhysicalNetworkTrafficType physNetTT = - _physNetTTDao.findBy(physNetId, TrafficType.Guest); + _physNetTTDao.findBy(physNetId, TrafficType.Guest); HypervisorType hvType = host.getHypervisorType(); String label = null; switch (hvType) { - case XenServer: - label = physNetTT.getXenNetworkLabel(); - if ((label!=null) && (!label.equals(""))) { - physNetLabel = label; - } - break; - case KVM: - label = physNetTT.getKvmNetworkLabel(); - if ((label != null) && (!label.equals(""))) { - physNetLabel = label; - } - break; - default: - throw new CloudRuntimeException("Hypervisor " + - hvType.toString() + - " unsupported by OVS Tunnel Manager"); + case XenServer: + label = physNetTT.getXenNetworkLabel(); + if ((label != null) && (!label.equals(""))) { + physNetLabel = label; + } + break; + case KVM: + label = physNetTT.getKvmNetworkLabel(); + if ((label != null) && (!label.equals(""))) { + physNetLabel = label; + } + break; + default: + throw new CloudRuntimeException("Hypervisor " + + hvType.toString() + + " unsupported by OVS Tunnel Manager"); } // Try to fetch GRE endpoint IP address for cloud db // If not found, then find it on the hypervisor OvsTunnelInterfaceVO tunnelIface = - _tunnelInterfaceDao.getByHostAndLabel(host.getId(), - physNetLabel); + _tunnelInterfaceDao.getByHostAndLabel(host.getId(), + physNetLabel); if (tunnelIface == null) { //Now find and fetch configuration for physical interface - //for network with label on target host - Commands fetchIfaceCmds = - new Commands(new OvsFetchInterfaceCommand(physNetLabel)); - s_logger.debug("Ask host " + host.getId() + - " to retrieve interface for phy net with label:" + - physNetLabel); - Answer[] fetchIfaceAnswers = _agentMgr.send(host.getId(), fetchIfaceCmds); + //for network with label on target host + Commands fetchIfaceCmds = + new Commands(new OvsFetchInterfaceCommand(physNetLabel)); + s_logger.debug("Ask host " + host.getId() + + " to retrieve interface for phy net with label:" + + physNetLabel); + Answer[] fetchIfaceAnswers = _agentMgr.send(host.getId(), fetchIfaceCmds); //And finally save it for future use endpointIp = handleFetchInterfaceAnswer(fetchIfaceAnswers, host.getId()); } else { @@ -245,56 +245,56 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage return endpointIp; } - private int getGreKey(Network network) { - int key = 0; - try { - //The GRE key is actually in the host part of the URI + private int getGreKey(Network network) { + int key = 0; + try { + //The GRE key is actually in the host part of the URI // this is not true for lswitch/NiciraNvp! String keyStr = BroadcastDomainType.getValue(network.getBroadcastUri()); // The key is most certainly and int if network is a vlan. // !! not in the case of lswitch/pvlan/(possibly)vswitch // So we now feel quite safe in converting it into a string // by calling the appropriate BroadcastDomainType method - key = Integer.valueOf(keyStr); - return key; - } catch (NumberFormatException e) { - s_logger.debug("Well well, how did '" + key - + "' end up in the broadcast URI for the network?"); - throw new CloudRuntimeException(String.format( - "Invalid GRE key parsed from" - + "network broadcast URI (%s)", network - .getBroadcastUri().toString())); - } - } + key = Integer.valueOf(keyStr); + return key; + } catch (NumberFormatException e) { + s_logger.debug("Well well, how did '" + key + + "' end up in the broadcast URI for the network?"); + throw new CloudRuntimeException(String.format( + "Invalid GRE key parsed from" + + "network broadcast URI (%s)", network + .getBroadcastUri().toString())); + } + } - @DB + @DB protected void CheckAndCreateTunnel(VirtualMachine instance, Network nw, DeployDestination dest) { - s_logger.debug("Creating tunnels with OVS tunnel manager"); - if (instance.getType() != VirtualMachine.Type.User - && instance.getType() != VirtualMachine.Type.DomainRouter) { - s_logger.debug("Will not work if you're not" - + "an instance or a virtual router"); - return; - } + s_logger.debug("Creating tunnels with OVS tunnel manager"); + if (instance.getType() != VirtualMachine.Type.User + && instance.getType() != VirtualMachine.Type.DomainRouter) { + s_logger.debug("Will not work if you're not" + + "an instance or a virtual router"); + return; + } - long hostId = dest.getHost().getId(); - int key = getGreKey(nw); - // Find active VMs with a NIC on the target network - List vms = _userVmDao.listByNetworkIdAndStates(nw.getId(), - State.Running, State.Starting, State.Stopping, State.Unknown, - State.Migrating); - // Find routers for the network - List routers = _routerDao.findByNetwork(nw.getId()); - List ins = new ArrayList(); - if (vms != null) { - ins.addAll(vms); - } - if (routers.size() != 0) { - ins.addAll(routers); - } - List toHostIds = new ArrayList(); - List fromHostIds = new ArrayList(); + long hostId = dest.getHost().getId(); + int key = getGreKey(nw); + // Find active VMs with a NIC on the target network + List vms = _userVmDao.listByNetworkIdAndStates(nw.getId(), + State.Running, State.Starting, State.Stopping, State.Unknown, + State.Migrating); + // Find routers for the network + List routers = _routerDao.findByNetwork(nw.getId()); + List ins = new ArrayList(); + if (vms != null) { + ins.addAll(vms); + } + if (routers.size() != 0) { + ins.addAll(routers); + } + List toHostIds = new ArrayList(); + List fromHostIds = new ArrayList(); for (VMInstanceVO v : ins) { Long rh = v.getHostId(); if (rh == null || rh.longValue() == hostId) { @@ -305,7 +305,7 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage if (ta == null || ta.getState().equals("FAILED")) { s_logger.debug("Attempting to create tunnel from:" + hostId + " to:" + rh.longValue()); if (ta == null) { - this.createTunnelRecord(hostId, rh.longValue(), nw.getId(), key); + createTunnelRecord(hostId, rh.longValue(), nw.getId(), key); } if (!toHostIds.contains(rh)) { toHostIds.add(rh); @@ -313,15 +313,15 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage } ta = _tunnelNetworkDao.getByFromToNetwork(rh.longValue(), - hostId, nw.getId()); + hostId, nw.getId()); // Try and create the tunnel even if a previous attempt failed if (ta == null || ta.getState().equals("FAILED")) { - s_logger.debug("Attempting to create tunnel from:" + - rh.longValue() + " to:" + hostId); - if (ta == null) { - this.createTunnelRecord(rh.longValue(), hostId, - nw.getId(), key); - } + s_logger.debug("Attempting to create tunnel from:" + + rh.longValue() + " to:" + hostId); + if (ta == null) { + createTunnelRecord(rh.longValue(), hostId, + nw.getId(), key); + } if (!fromHostIds.contains(rh)) { fromHostIds.add(rh); } @@ -333,89 +333,88 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage if (myIp == null) throw new GreTunnelException("Unable to retrieve the source " + "endpoint for the GRE tunnel." + "Failure is on host:" + dest.getHost().getId()); boolean noHost = true; - for (Long i : toHostIds) { - HostVO rHost = _hostDao.findById(i); - String otherIp = getGreEndpointIP(rHost, nw); - if (otherIp == null) - throw new GreTunnelException( - "Unable to retrieve the remote " - + "endpoint for the GRE tunnel." - + "Failure is on host:" + rHost.getId()); - Commands cmds = new Commands( - new OvsCreateTunnelCommand(otherIp, key, - Long.valueOf(hostId), i, nw.getId(), myIp)); - s_logger.debug("Ask host " + hostId - + " to create gre tunnel to " + i); - Answer[] answers = _agentMgr.send(hostId, cmds); - handleCreateTunnelAnswer(answers); - noHost = false; - } + for (Long i : toHostIds) { + HostVO rHost = _hostDao.findById(i); + String otherIp = getGreEndpointIP(rHost, nw); + if (otherIp == null) + throw new GreTunnelException( + "Unable to retrieve the remote " + + "endpoint for the GRE tunnel." + + "Failure is on host:" + rHost.getId()); + Commands cmds = new Commands( + new OvsCreateTunnelCommand(otherIp, key, + Long.valueOf(hostId), i, nw.getId(), myIp)); + s_logger.debug("Ask host " + hostId + + " to create gre tunnel to " + i); + Answer[] answers = _agentMgr.send(hostId, cmds); + handleCreateTunnelAnswer(answers); + noHost = false; + } - for (Long i : fromHostIds) { - HostVO rHost = _hostDao.findById(i); - String otherIp = getGreEndpointIP(rHost, nw); - Commands cmds = new Commands(new OvsCreateTunnelCommand(myIp, - key, i, Long.valueOf(hostId), nw.getId(), otherIp)); - s_logger.debug("Ask host " + i + " to create gre tunnel to " - + hostId); - Answer[] answers = _agentMgr.send(i, cmds); - handleCreateTunnelAnswer(answers); - noHost = false; - } - // If no tunnels have been configured, perform the bridge setup - // anyway - // This will ensure VIF rules will be triggered - if (noHost) { - Commands cmds = new Commands(new OvsSetupBridgeCommand(key, - hostId, nw.getId())); - s_logger.debug("Ask host " + hostId - + " to configure bridge for network:" + nw.getId()); - Answer[] answers = _agentMgr.send(hostId, cmds); - handleSetupBridgeAnswer(answers); - } - } catch (Exception e) { - // I really thing we should do a better handling of these exceptions - s_logger.warn("Ovs Tunnel network created tunnel failed", e); - } - } + for (Long i : fromHostIds) { + HostVO rHost = _hostDao.findById(i); + String otherIp = getGreEndpointIP(rHost, nw); + Commands cmds = new Commands(new OvsCreateTunnelCommand(myIp, + key, i, Long.valueOf(hostId), nw.getId(), otherIp)); + s_logger.debug("Ask host " + i + " to create gre tunnel to " + + hostId); + Answer[] answers = _agentMgr.send(i, cmds); + handleCreateTunnelAnswer(answers); + noHost = false; + } + // If no tunnels have been configured, perform the bridge setup + // anyway + // This will ensure VIF rules will be triggered + if (noHost) { + Commands cmds = new Commands(new OvsSetupBridgeCommand(key, + hostId, nw.getId())); + s_logger.debug("Ask host " + hostId + + " to configure bridge for network:" + nw.getId()); + Answer[] answers = _agentMgr.send(hostId, cmds); + handleSetupBridgeAnswer(answers); + } + } catch (Exception e) { + // I really thing we should do a better handling of these exceptions + s_logger.warn("Ovs Tunnel network created tunnel failed", e); + } + } - @Override - public boolean isOvsTunnelEnabled() { - return true; - } + @Override + public boolean isOvsTunnelEnabled() { + return true; + } @Override public void VmCheckAndCreateTunnel(VirtualMachineProfile vm, - Network nw, DeployDestination dest) { + Network nw, DeployDestination dest) { CheckAndCreateTunnel(vm.getVirtualMachine(), nw, dest); } @DB - private void handleDestroyTunnelAnswer(Answer ans, long from, long to, long network_id) { + private void handleDestroyTunnelAnswer(Answer ans, long from, long to, long networkId) { if (ans.getResult()) { OvsTunnelNetworkVO lock = _tunnelNetworkDao.acquireInLockTable(Long.valueOf(1)); if (lock == null) { s_logger.warn(String.format("failed to lock" + - "ovs_tunnel_account, remove record of " + - "tunnel(from=%1$s, to=%2$s account=%3$s) failed", - from, to, network_id)); + "ovs_tunnel_account, remove record of " + + "tunnel(from=%1$s, to=%2$s account=%3$s) failed", + from, to, networkId)); return; } - _tunnelNetworkDao.removeByFromToNetwork(from, to, network_id); + _tunnelNetworkDao.removeByFromToNetwork(from, to, networkId); _tunnelNetworkDao.releaseFromLockTable(lock.getId()); s_logger.debug(String.format("Destroy tunnel(account:%1$s," + - "from:%2$s, to:%3$s) successful", - network_id, from, to)); + "from:%2$s, to:%3$s) successful", + networkId, from, to)); } else { - s_logger.debug(String.format("Destroy tunnel(account:%1$s," + "from:%2$s, to:%3$s) failed", network_id, from, to)); + s_logger.debug(String.format("Destroy tunnel(account:%1$s," + "from:%2$s, to:%3$s) failed", networkId, from, to)); } } @DB - private void handleDestroyBridgeAnswer(Answer ans, - long host_id, long network_id) { + private void handleDestroyBridgeAnswer(Answer ans, long hostId, long networkId) { if (ans.getResult()) { OvsTunnelNetworkVO lock = _tunnelNetworkDao.acquireInLockTable(Long.valueOf(1)); @@ -424,14 +423,14 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage return; } - _tunnelNetworkDao.removeByFromNetwork(host_id, network_id); + _tunnelNetworkDao.removeByFromNetwork(hostId, networkId); _tunnelNetworkDao.releaseFromLockTable(lock.getId()); s_logger.debug(String.format("Destroy bridge for" + - "network %1$s successful", network_id)); + "network %1$s successful", networkId)); } else { - s_logger.debug(String.format("Destroy bridge for" + - "network %1$s failed", network_id)); + s_logger.debug(String.format("Destroy bridge for" + + "network %1$s failed", networkId)); } } @@ -442,9 +441,9 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage @Override public void CheckAndDestroyTunnel(VirtualMachine vm, Network nw) { - // if (!_isEnabled) { - // return; - // } + // if (!_isEnabled) { + // return; + // } List userVms = _userVmDao.listByAccountIdAndHostId(vm.getAccountId(), vm.getHostId()); if (vm.getType() == VirtualMachine.Type.User) { @@ -472,19 +471,19 @@ public class OvsTunnelManagerImpl extends ManagerBase implements OvsTunnelManage /* Then ask hosts have peer tunnel with me to destroy them */ List peers = - _tunnelNetworkDao.listByToNetwork(vm.getHostId(), - nw.getId()); + _tunnelNetworkDao.listByToNetwork(vm.getHostId(), + nw.getId()); for (OvsTunnelNetworkVO p : peers) { - // If the tunnel was not successfully created don't bother to remove it - if (p.getState().equals("SUCCESS")) { - cmd = new OvsDestroyTunnelCommand(p.getNetworkId(), key, - p.getPortName()); - s_logger.debug("Destroying tunnel to " + vm.getHostId() + - " from " + p.getFrom()); - ans = _agentMgr.send(p.getFrom(), cmd); - handleDestroyTunnelAnswer(ans, p.getFrom(), - p.getTo(), p.getNetworkId()); - } + // If the tunnel was not successfully created don't bother to remove it + if (p.getState().equals("SUCCESS")) { + cmd = new OvsDestroyTunnelCommand(p.getNetworkId(), key, + p.getPortName()); + s_logger.debug("Destroying tunnel to " + vm.getHostId() + + " from " + p.getFrom()); + ans = _agentMgr.send(p.getFrom(), cmd); + handleDestroyTunnelAnswer(ans, p.getFrom(), + p.getTo(), p.getNetworkId()); + } } } catch (Exception e) { s_logger.warn(String.format("Destroy tunnel(account:%1$s," + "hostId:%2$s) failed", vm.getAccountId(), vm.getHostId()), e); diff --git a/plugins/network-elements/palo-alto/src/com/cloud/network/element/PaloAltoExternalFirewallElement.java b/plugins/network-elements/palo-alto/src/com/cloud/network/element/PaloAltoExternalFirewallElement.java index be9a0b880fe..cfb64b8bde4 100644 --- a/plugins/network-elements/palo-alto/src/com/cloud/network/element/PaloAltoExternalFirewallElement.java +++ b/plugins/network-elements/palo-alto/src/com/cloud/network/element/PaloAltoExternalFirewallElement.java @@ -27,7 +27,6 @@ import javax.inject.Inject; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.response.ExternalFirewallResponse; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.network.ExternalNetworkDeviceManager.NetworkDevice; @@ -42,7 +41,6 @@ import com.cloud.configuration.Config; import com.cloud.configuration.ConfigurationManager; import com.cloud.dc.DataCenter; import com.cloud.dc.DataCenter.NetworkType; -import com.cloud.dc.DataCenterVO; import com.cloud.dc.dao.DataCenterDao; import com.cloud.deploy.DeployDestination; import com.cloud.exception.ConcurrentOperationException; @@ -51,7 +49,6 @@ import com.cloud.exception.InsufficientNetworkCapacityException; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.host.Host; -import com.cloud.host.HostVO; import com.cloud.host.dao.HostDao; import com.cloud.host.dao.HostDetailsDao; import com.cloud.network.ExternalFirewallDeviceManagerImpl; diff --git a/plugins/network-elements/palo-alto/src/com/cloud/network/element/PaloAltoFirewallElementService.java b/plugins/network-elements/palo-alto/src/com/cloud/network/element/PaloAltoFirewallElementService.java index 12f04077215..d30baca4804 100644 --- a/plugins/network-elements/palo-alto/src/com/cloud/network/element/PaloAltoFirewallElementService.java +++ b/plugins/network-elements/palo-alto/src/com/cloud/network/element/PaloAltoFirewallElementService.java @@ -18,15 +18,12 @@ package com.cloud.network.element; import java.util.List; -import org.apache.cloudstack.api.response.ExternalFirewallResponse; - import com.cloud.api.commands.AddPaloAltoFirewallCmd; import com.cloud.api.commands.ConfigurePaloAltoFirewallCmd; import com.cloud.api.commands.DeletePaloAltoFirewallCmd; import com.cloud.api.commands.ListPaloAltoFirewallNetworksCmd; import com.cloud.api.commands.ListPaloAltoFirewallsCmd; import com.cloud.api.response.PaloAltoFirewallResponse; -import com.cloud.host.Host; import com.cloud.network.Network; import com.cloud.network.dao.ExternalFirewallDeviceVO; import com.cloud.utils.component.PluggableService; diff --git a/plugins/network-elements/palo-alto/src/com/cloud/network/resource/PaloAltoResource.java b/plugins/network-elements/palo-alto/src/com/cloud/network/resource/PaloAltoResource.java index 1b05a116f33..2952b931d42 100644 --- a/plugins/network-elements/palo-alto/src/com/cloud/network/resource/PaloAltoResource.java +++ b/plugins/network-elements/palo-alto/src/com/cloud/network/resource/PaloAltoResource.java @@ -29,11 +29,11 @@ import java.util.Map; import javax.naming.ConfigurationException; import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.transform.dom.DOMSource; import javax.xml.transform.OutputKeys; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; // for prettyFormat() import javax.xml.transform.stream.StreamSource; @@ -111,10 +111,10 @@ public class PaloAltoResource implements ServerResource { private String _threatProfile; private String _logProfile; private String _pingManagementProfile; - private final Logger s_logger = Logger.getLogger(PaloAltoResource.class); + private static final Logger s_logger = Logger.getLogger(PaloAltoResource.class); - private static String _apiUri = "/api"; - private static HttpClient _httpclient; + private static String s_apiUri = "/api"; + private static HttpClient s_httpclient; protected enum PaloAltoMethod { GET, POST; @@ -127,7 +127,7 @@ public class PaloAltoResource implements ServerResource { private enum InterfaceType { AGGREGATE("aggregate-ethernet"), ETHERNET("ethernet"); - private String type; + private final String type; private InterfaceType(String type) { this.type = type; @@ -142,7 +142,7 @@ public class PaloAltoResource implements ServerResource { private enum Protocol { TCP("tcp"), UDP("udp"), ICMP("icmp"), ALL("all"); - private String protocol; + private final String protocol; private Protocol(String protocol) { this.protocol = protocol; @@ -365,14 +365,14 @@ public class PaloAltoResource implements ServerResource { * Login */ private void openHttpConnection() { - _httpclient = new DefaultHttpClient(); + s_httpclient = new DefaultHttpClient(); // Allows you to connect via SSL using unverified certs - _httpclient = HttpClientWrapper.wrapClient(_httpclient); + s_httpclient = HttpClientWrapper.wrapClient(s_httpclient); } private boolean refreshPaloAltoConnection() { - if (_httpclient == null) { + if (s_httpclient == null) { openHttpConnection(); } @@ -1191,8 +1191,9 @@ public class PaloAltoResource implements ServerResource { private String genFirewallRuleName(long id) { // ingress return "policy_" + Long.toString(id); } + private String genFirewallRuleName(long id, String vlan) { // egress - return "policy_"+Long.toString(id)+"_"+vlan; + return "policy_" + Long.toString(id) + "_" + vlan; } public boolean manageFirewallRule(ArrayList cmdList, PaloAltoPrimative prim, FirewallRuleTO rule) throws ExecutionException { @@ -1311,7 +1312,7 @@ public class PaloAltoResource implements ServerResource { xml += "" + dstAddressXML + ""; xml += "" + appXML + ""; xml += "" + serviceXML + ""; - xml += ""+action+""; + xml += "" + action + ""; xml += "no"; xml += "no"; if (_threatProfile != null && action.equals("allow")) { // add the threat profile if it exists @@ -1328,34 +1329,35 @@ public class PaloAltoResource implements ServerResource { Map e_params = new HashMap(); e_params.put("type", "config"); e_params.put("action", "get"); - e_params.put("xpath", "/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='policy_0_"+rule.getSrcVlanTag()+"']"); + e_params.put("xpath", "/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='policy_0_" + rule.getSrcVlanTag() + "']"); String e_response = request(PaloAltoMethod.GET, e_params); has_default = (validResponse(e_response) && responseNotEmpty(e_response)); - + // there is an existing default rule, so we need to remove it and add it back after the new rule is added. if (has_default) { - s_logger.debug("Moving the default egress rule after the new rule: "+ruleName); + s_logger.debug("Moving the default egress rule after the new rule: " + ruleName); NodeList response_body; Document doc = getDocument(e_response); XPath xpath = XPathFactory.newInstance().newXPath(); try { XPathExpression expr = xpath.compile("/response[@status='success']/result/entry/node()"); - response_body = (NodeList) expr.evaluate(doc, XPathConstants.NODESET); + response_body = (NodeList)expr.evaluate(doc, XPathConstants.NODESET); } catch (XPathExpressionException e) { throw new ExecutionException(e.getCause().getMessage()); } - for (int i=0; i dd_params = new HashMap(); dd_params.put("type", "config"); dd_params.put("action", "delete"); - dd_params.put("xpath", "/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='policy_0_"+rule.getSrcVlanTag()+"']"); + dd_params.put("xpath", "/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='policy_0_" + rule.getSrcVlanTag() + + "']"); cmdList.add(new DefaultPaloAltoCommand(PaloAltoMethod.POST, dd_params)); } } - + // add the new rule... Map a_params = new HashMap(); a_params.put("type", "config"); @@ -1369,10 +1371,10 @@ public class PaloAltoResource implements ServerResource { Map da_params = new HashMap(); da_params.put("type", "config"); da_params.put("action", "set"); - da_params.put("xpath", "/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='policy_0_"+rule.getSrcVlanTag()+"']"); + da_params.put("xpath", "/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='policy_0_" + rule.getSrcVlanTag() + "']"); da_params.put("element", defaultEgressRule); cmdList.add(new DefaultPaloAltoCommand(PaloAltoMethod.POST, da_params)); - s_logger.debug("Completed move of the default egress rule after rule: "+ruleName); + s_logger.debug("Completed move of the default egress rule after rule: " + ruleName); } return true; @@ -1401,7 +1403,8 @@ public class PaloAltoResource implements ServerResource { Map params = new HashMap(); params.put("type", "config"); params.put("action", "get"); - params.put("xpath", "/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[contains(@name, 'policy') and contains(@name, '"+Long.toString(vlan)+"')]"); + params.put("xpath", + "/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[contains(@name, 'policy') and contains(@name, '" + Long.toString(vlan) + "')]"); String response = request(PaloAltoMethod.GET, params); boolean has_orphans = (validResponse(response) && responseNotEmpty(response)); @@ -1409,12 +1412,13 @@ public class PaloAltoResource implements ServerResource { Map d_params = new HashMap(); d_params.put("type", "config"); d_params.put("action", "delete"); - d_params.put("xpath", "/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[contains(@name, 'policy') and contains(@name, '"+Long.toString(vlan)+"')]"); + d_params.put("xpath", + "/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[contains(@name, 'policy') and contains(@name, '" + Long.toString(vlan) + + "')]"); cmdList.add(new DefaultPaloAltoCommand(PaloAltoMethod.POST, d_params)); } } - /* * Usage */ @@ -1664,15 +1668,15 @@ public class PaloAltoResource implements ServerResource { } try { - debug_msg = debug_msg + "GET request: https://" + _ip + _apiUri + URLDecoder.decode(queryString, "UTF-8") + "\n"; + debug_msg = debug_msg + "GET request: https://" + _ip + s_apiUri + URLDecoder.decode(queryString, "UTF-8") + "\n"; } catch (UnsupportedEncodingException e) { - debug_msg = debug_msg + "GET request: https://" + _ip + _apiUri + queryString + "\n"; + debug_msg = debug_msg + "GET request: https://" + _ip + s_apiUri + queryString + "\n"; } - HttpGet get_request = new HttpGet("https://" + _ip + _apiUri + queryString); + HttpGet get_request = new HttpGet("https://" + _ip + s_apiUri + queryString); ResponseHandler responseHandler = new BasicResponseHandler(); try { - responseBody = _httpclient.execute(get_request, responseHandler); + responseBody = s_httpclient.execute(get_request, responseHandler); } catch (IOException e) { throw new ExecutionException(e.getMessage()); } @@ -1688,12 +1692,12 @@ public class PaloAltoResource implements ServerResource { nvps.add(new BasicNameValuePair("key", _key)); } - debug_msg = debug_msg + "POST request: https://" + _ip + _apiUri + "\n"; + debug_msg = debug_msg + "POST request: https://" + _ip + s_apiUri + "\n"; for (NameValuePair nvp : nvps) { debug_msg = debug_msg + "param: " + nvp.getName() + ", " + nvp.getValue() + "\n"; } - HttpPost post_request = new HttpPost("https://" + _ip + _apiUri); + HttpPost post_request = new HttpPost("https://" + _ip + s_apiUri); try { post_request.setEntity(new UrlEncodedFormEntity(nvps, HTTP.UTF_8)); } catch (UnsupportedEncodingException e) { @@ -1701,7 +1705,7 @@ public class PaloAltoResource implements ServerResource { } ResponseHandler responseHandler = new BasicResponseHandler(); try { - responseBody = _httpclient.execute(post_request, responseHandler); + responseBody = s_httpclient.execute(post_request, responseHandler); } catch (IOException e) { throw new ExecutionException(e.getMessage()); } @@ -1965,13 +1969,13 @@ public class PaloAltoResource implements ServerResource { } /* Get the type of interface from the PA device. */ - private String getInterfaceType(String interface_name) throws ExecutionException { + private String getInterfaceType(String interfaceName) throws ExecutionException { String[] types = {InterfaceType.ETHERNET.toString(), InterfaceType.AGGREGATE.toString()}; for (String type : types) { Map params = new HashMap(); params.put("type", "config"); params.put("action", "get"); - params.put("xpath", "/config/devices/entry/network/interface/" + type + "/entry[@name='" + interface_name + "']"); + params.put("xpath", "/config/devices/entry/network/interface/" + type + "/entry[@name='" + interfaceName + "']"); String ethernet_response = request(PaloAltoMethod.GET, params); if (validResponse(ethernet_response) && responseNotEmpty(ethernet_response)) { return type; @@ -2081,7 +2085,7 @@ public class PaloAltoResource implements ServerResource { t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); t.transform(new DOMSource(node), new StreamResult(sw)); } catch (Throwable t) { - throw new ExecutionException("XML convert error when modifying PA config: "+t.getMessage()); + throw new ExecutionException("XML convert error when modifying PA config: " + t.getMessage()); } return sw.toString(); } diff --git a/plugins/network-elements/palo-alto/test/com/cloud/network/resource/MockablePaloAltoResource.java b/plugins/network-elements/palo-alto/test/com/cloud/network/resource/MockablePaloAltoResource.java index 44cc65bfcd8..6657ee3170d 100755 --- a/plugins/network-elements/palo-alto/test/com/cloud/network/resource/MockablePaloAltoResource.java +++ b/plugins/network-elements/palo-alto/test/com/cloud/network/resource/MockablePaloAltoResource.java @@ -54,7 +54,31 @@ public class MockablePaloAltoResource extends PaloAltoResource { if (context.containsKey("public_using_ethernet") && context.get("public_using_ethernet").equals("true")) { context.put("public_interface_type", "ethernet"); response = - "no20060064unspecifiedunspecified1800nononounspecifiedno3011noEUI-64nono20060064unspecifiedunspecified1800nononounspecifiedno3011noEUI-64no3033autoautoauto"; + "no" + + + "20060064unspecified" + + + "unspecified1800no" + + + "nonounspecified" + + + "no3011"+ + "noEUI-64no" + + + "" + + + "no200600" + + + "64unspecifiedunspecified" + + + "1800nonono" + + "unspecifiedno30" + + "11noEUI-64" + + "no" + + "3033autoautoauto" + + ""; } else { response = ""; } @@ -164,7 +188,7 @@ public class MockablePaloAltoResource extends PaloAltoResource { // get egress firewall rule | has_egress_fw_rule | policy_0_3954 if (params.get("xpath").equals("/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[@name='policy_0_3954']")) { if (context.containsKey("has_egress_fw_rule") && context.get("has_egress_fw_rule").equals("true")) { - response = + response = "" + "" + "trustuntrust10.3.96.1/20" @@ -191,7 +215,8 @@ public class MockablePaloAltoResource extends PaloAltoResource { } // get default egress rule | policy_0_3954 - if (params.get("xpath").equals("/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[contains(@name, 'policy') and contains(@name, '3954')]")) { + if (params.get("xpath").equals( + "/config/devices/entry/vsys/entry[@name='vsys1']/rulebase/security/rules/entry[contains(@name, 'policy') and contains(@name, '3954')]")) { response = ""; } diff --git a/plugins/network-elements/palo-alto/test/com/cloud/network/resource/PaloAltoResourceTest.java b/plugins/network-elements/palo-alto/test/com/cloud/network/resource/PaloAltoResourceTest.java index 4ef8ecc338d..931e6ccaed0 100755 --- a/plugins/network-elements/palo-alto/test/com/cloud/network/resource/PaloAltoResourceTest.java +++ b/plugins/network-elements/palo-alto/test/com/cloud/network/resource/PaloAltoResourceTest.java @@ -52,48 +52,48 @@ import com.cloud.utils.exception.ExecutionException; public class PaloAltoResourceTest { // configuration data - private String _test_name = "PaloAltoTestDevice"; - private String _test_zoneId = "TestZone"; - private String _test_ip = "192.168.80.2"; - private String _test_username = "admin"; - private String _test_password = "admin"; - private String _test_publicInterface = "ethernet1/1"; - private String _test_privateInterface = "ethernet1/2"; - private String _test_publicZone = "untrust"; - private String _test_privateZone = "trust"; - private String _test_virtualRouter = "default"; + private String _testName = "PaloAltoTestDevice"; + private String _testZoneId = "TestZone"; + private String _testIp = "192.168.80.2"; + private String _testUsername = "admin"; + private String _testPassword = "admin"; + private String _testPublicInterface = "ethernet1/1"; + private String _testPrivateInterface = "ethernet1/2"; + private String _testPublicZone = "untrust"; + private String _testPrivateZone = "trust"; + private String _testVirtualRouter = "default"; MockablePaloAltoResource _resource; - Map _resource_params; + Map _resourceParams; HashMap _context; @Before public void setUp() { _resource = new MockablePaloAltoResource(); - _resource_params = new HashMap(); // params to be passed to configure() - _resource_params.put("name", _test_name); - _resource_params.put("zoneId", _test_zoneId); - _resource_params.put("ip", _test_ip); - _resource_params.put("username", _test_username); - _resource_params.put("password", _test_password); - _resource_params.put("publicinterface", _test_publicInterface); - _resource_params.put("privateinterface", _test_privateInterface); - _resource_params.put("publicnetwork", _test_publicZone); - _resource_params.put("privatenetwork", _test_privateZone); - _resource_params.put("pavr", _test_virtualRouter); - _resource_params.put("guid", "aaaaa-bbbbb-ccccc"); + _resourceParams = new HashMap(); // params to be passed to configure() + _resourceParams.put("name", _testName); + _resourceParams.put("zoneId", _testZoneId); + _resourceParams.put("ip", _testIp); + _resourceParams.put("username", _testUsername); + _resourceParams.put("password", _testPassword); + _resourceParams.put("publicinterface", _testPublicInterface); + _resourceParams.put("privateinterface", _testPrivateInterface); + _resourceParams.put("publicnetwork", _testPublicZone); + _resourceParams.put("privatenetwork", _testPrivateZone); + _resourceParams.put("pavr", _testVirtualRouter); + _resourceParams.put("guid", "aaaaa-bbbbb-ccccc"); _context = new HashMap(); // global context - _context.put("name", _test_name); - _context.put("zone_id", _test_zoneId); - _context.put("ip", _test_ip); - _context.put("username", _test_username); - _context.put("password", _test_password); - _context.put("public_interface", _test_publicInterface); - _context.put("private_interface", _test_privateInterface); - _context.put("public_zone", _test_publicZone); - _context.put("private_zone", _test_privateZone); - _context.put("pa_vr", _test_virtualRouter); + _context.put("name", _testName); + _context.put("zone_id", _testZoneId); + _context.put("ip", _testIp); + _context.put("username", _testUsername); + _context.put("password", _testPassword); + _context.put("public_interface", _testPublicInterface); + _context.put("private_interface", _testPrivateInterface); + _context.put("public_zone", _testPublicZone); + _context.put("private_zone", _testPrivateZone); + _context.put("pa_vr", _testVirtualRouter); // -- _context.put("public_using_ethernet", "true"); _context.put("private_using_ethernet", "true"); @@ -115,7 +115,7 @@ public class PaloAltoResourceTest { } _context.remove("has_management_profile"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); } @Test @@ -124,7 +124,7 @@ public class PaloAltoResourceTest { System.out.println("\nTEST: resourceConfigureWithManagementProfile"); System.out.println("---------------------------------------------------"); } - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); } @Test(expected = ConfigurationException.class) @@ -136,7 +136,7 @@ public class PaloAltoResourceTest { _context.put("firewall_has_pending_changes", "true"); _context.remove("has_management_profile"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); } @Test(expected = ConfigurationException.class) @@ -148,7 +148,7 @@ public class PaloAltoResourceTest { _context.put("simulate_commit_failure", "true"); _context.remove("has_management_profile"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); } @Test @@ -157,7 +157,7 @@ public class PaloAltoResourceTest { System.out.println("\nTEST: testInitialization"); System.out.println("---------------------------------------------------"); } - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); StartupCommand[] sc = _resource.initialize(); assertTrue(sc.length == 1); @@ -174,7 +174,7 @@ public class PaloAltoResourceTest { System.out.println("\nTEST: implementGuestNetwork"); System.out.println("---------------------------------------------------"); } - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); IpAddressTO ip = new IpAddressTO(Long.valueOf("1"), "192.168.80.102", true, false, true, "untagged", null, null, null, 100, false); IpAddressTO[] ips = new IpAddressTO[1]; @@ -201,7 +201,7 @@ public class PaloAltoResourceTest { _context.put("has_src_nat_rule", "true"); _context.put("has_isolation_fw_rule", "true"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); IpAddressTO ip = new IpAddressTO(Long.valueOf("1"), "192.168.80.102", false, false, true, "untagged", null, null, null, 100, false); IpAddressTO[] ips = new IpAddressTO[1]; @@ -227,7 +227,7 @@ public class PaloAltoResourceTest { _context.put("has_isolation_fw_rule", "true"); _context.put("has_service_tcp_80", "true"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); long vlanId = 3954; List rules = new ArrayList(); @@ -257,7 +257,7 @@ public class PaloAltoResourceTest { _context.put("has_service_tcp_80", "true"); _context.put("has_ingress_fw_rule", "true"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); long vlanId = 3954; List rules = new ArrayList(); @@ -284,7 +284,7 @@ public class PaloAltoResourceTest { _context.put("has_isolation_fw_rule", "true"); _context.put("has_service_tcp_80", "true"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); long vlanId = 3954; List rules = new ArrayList(); @@ -315,7 +315,7 @@ public class PaloAltoResourceTest { _context.put("has_service_tcp_80", "true"); _context.put("has_egress_fw_rule", "true"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); long vlanId = 3954; List rules = new ArrayList(); @@ -344,7 +344,7 @@ public class PaloAltoResourceTest { _context.put("has_isolation_fw_rule", "true"); _context.put("has_service_tcp_80", "true"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); long vlanId = 3954; List rules = new ArrayList(); @@ -372,7 +372,7 @@ public class PaloAltoResourceTest { _context.put("has_service_tcp_80", "true"); _context.put("has_stc_nat_rule", "true"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); long vlanId = 3954; List rules = new ArrayList(); @@ -399,7 +399,7 @@ public class PaloAltoResourceTest { _context.put("has_isolation_fw_rule", "true"); _context.put("has_service_tcp_80", "true"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); long vlanId = 3954; List rules = new ArrayList(); @@ -427,7 +427,7 @@ public class PaloAltoResourceTest { _context.put("has_service_tcp_80", "true"); _context.put("has_dst_nat_rule", "true"); _resource.setMockContext(_context); - _resource.configure("PaloAltoResource", _resource_params); + _resource.configure("PaloAltoResource", _resourceParams); long vlanId = 3954; List rules = new ArrayList(); diff --git a/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/element/SspElement.java b/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/element/SspElement.java index 50bacf30005..173d6f0de9e 100644 --- a/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/element/SspElement.java +++ b/plugins/network-elements/stratosphere-ssp/src/org/apache/cloudstack/network/element/SspElement.java @@ -145,12 +145,12 @@ public class SspElement extends AdapterBase implements ConnectivityProvider, Ssp return provider; } - private List fetchSspClients(Long physicalNetworkId, Long dataCenterId, boolean enabled_only) { + private List fetchSspClients(Long physicalNetworkId, Long dataCenterId, boolean enabledOnly) { ArrayList clients = new ArrayList(); boolean provider_found = false; PhysicalNetworkServiceProviderVO provider = _physicalNetworkServiceProviderDao.findByServiceProvider(physicalNetworkId, s_SSP_NAME); - if (enabled_only) { + if (enabledOnly) { if (provider != null && provider.getState() == State.Enabled) { provider_found = true; } diff --git a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java index 1db10e2eb32..d6e1a01b49c 100644 --- a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java +++ b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java @@ -95,7 +95,7 @@ public class CloudStackImageStoreDriverImpl extends BaseImageStoreDriverImpl { } if (_sslCopy) { hostname = ipAddress.replace(".", "-"); - if(_ssvmUrlDomain != null && _ssvmUrlDomain.length() > 0){ + if (_ssvmUrlDomain != null && _ssvmUrlDomain.length() > 0) { hostname = hostname + "." + _ssvmUrlDomain; } else { hostname = hostname + ".realhostip.com"; diff --git a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackImageStoreLifeCycleImpl.java b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackImageStoreLifeCycleImpl.java index 95c90349a03..13bd5d8b74c 100644 --- a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackImageStoreLifeCycleImpl.java +++ b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/lifecycle/CloudStackImageStoreLifeCycleImpl.java @@ -65,8 +65,8 @@ public class CloudStackImageStoreLifeCycleImpl implements ImageStoreLifeCycle { return _discoverers; } - public void setDiscoverers(List _discoverers) { - this._discoverers = _discoverers; + public void setDiscoverers(List discoverers) { + this._discoverers = discoverers; } public CloudStackImageStoreLifeCycleImpl() { diff --git a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/lifecycle/S3ImageStoreLifeCycleImpl.java b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/lifecycle/S3ImageStoreLifeCycleImpl.java index ff0930642a5..718c591b7fb 100644 --- a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/lifecycle/S3ImageStoreLifeCycleImpl.java +++ b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/lifecycle/S3ImageStoreLifeCycleImpl.java @@ -60,8 +60,8 @@ public class S3ImageStoreLifeCycleImpl implements ImageStoreLifeCycle { return _discoverers; } - public void setDiscoverers(List _discoverers) { - this._discoverers = _discoverers; + public void setDiscoverers(List discoverers) { + this._discoverers = discoverers; } public S3ImageStoreLifeCycleImpl() { diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LDAPConfigCmd.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LDAPConfigCmd.java index 3faf8b768b2..5e424dee9b4 100644 --- a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LDAPConfigCmd.java +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LDAPConfigCmd.java @@ -21,7 +21,14 @@ import java.util.List; import javax.inject.Inject; -import org.apache.cloudstack.api.*; +import org.apache.commons.lang.StringEscapeUtils; +import org.apache.log4j.Logger; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.LDAPConfigResponse; import org.apache.cloudstack.api.response.LdapConfigurationResponse; import org.apache.cloudstack.api.response.ListResponse; @@ -30,10 +37,12 @@ import org.apache.cloudstack.framework.config.impl.ConfigurationVO; import org.apache.cloudstack.ldap.LdapConfiguration; import org.apache.cloudstack.ldap.LdapConfigurationVO; import org.apache.cloudstack.ldap.LdapManager; -import org.apache.commons.lang.StringEscapeUtils; -import org.apache.log4j.Logger; -import com.cloud.exception.*; +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.exception.ResourceUnavailableException; import com.cloud.user.Account; import com.cloud.utils.Pair; @@ -71,13 +80,19 @@ public class LDAPConfigCmd extends BaseCmd { @Parameter(name = ApiConstants.USE_SSL, type = CommandType.BOOLEAN, description = "Check Use SSL if the external LDAP server is configured for LDAP over SSL.") private Boolean useSSL; - @Parameter(name = ApiConstants.SEARCH_BASE, type = CommandType.STRING, description = "The search base defines the starting point for the search in the directory tree Example: dc=cloud,dc=com.") + @Parameter(name = ApiConstants.SEARCH_BASE, + type = CommandType.STRING, + description = "The search base defines the starting point for the search in the directory tree Example: dc=cloud,dc=com.") private String searchBase; - @Parameter(name = ApiConstants.QUERY_FILTER, type = CommandType.STRING, description = "You specify a query filter here, which narrows down the users, who can be part of this domain.") + @Parameter(name = ApiConstants.QUERY_FILTER, + type = CommandType.STRING, + description = "You specify a query filter here, which narrows down the users, who can be part of this domain.") private String queryFilter; - @Parameter(name = ApiConstants.BIND_DN, type = CommandType.STRING, description = "Specify the distinguished name of a user with the search permission on the directory.") + @Parameter(name = ApiConstants.BIND_DN, + type = CommandType.STRING, + description = "Specify the distinguished name of a user with the search permission on the directory.") private String bindDN; @Parameter(name = ApiConstants.BIND_PASSWORD, type = CommandType.STRING, description = "Enter the password.") @@ -102,7 +117,7 @@ public class LDAPConfigCmd extends BaseCmd { } public void setBindDN(String bdn) { - this.bindDN = bdn; + bindDN = bdn; } public String getQueryFilter() { @@ -162,7 +177,8 @@ public class LDAPConfigCmd extends BaseCmd { ///////////////////////////////////////////////////// @Override - public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { + public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, + ResourceAllocationException { if (getListAll()) { // return the existing conf @@ -176,21 +192,21 @@ public class LDAPConfigCmd extends BaseCmd { String searchBaseConfig = _ldapConfiguration.getBaseDn(); String bindDnConfig = _ldapConfiguration.getBindPrincipal(); for (LdapConfigurationVO ldapConfigurationVO : result.first()) { - responses.add(this.createLDAPConfigResponse(ldapConfigurationVO.getHostname(), ldapConfigurationVO.getPort(), useSSlConfig, null, searchBaseConfig, - bindDnConfig)); + responses.add(createLDAPConfigResponse(ldapConfigurationVO.getHostname(), ldapConfigurationVO.getPort(), useSSlConfig, null, searchBaseConfig, + bindDnConfig)); } } response.setResponses(responses); response.setResponseName(getCommandName()); - this.setResponseObject(response); + setResponseObject(response); } else if (getHostname() == null || getPort() == null) { throw new InvalidParameterValueException("You need to provide hostname, port to configure your LDAP server"); } else { - boolean result = this.updateLDAP(); + boolean result = updateLDAP(); if (result) { - LDAPConfigResponse lr = this.createLDAPConfigResponse(getHostname(), getPort(), getUseSSL(), getQueryFilter(), getSearchBase(), getBindDN()); + LDAPConfigResponse lr = createLDAPConfigResponse(getHostname(), getPort(), getUseSSL(), getQueryFilter(), getSearchBase(), getBindDN()); lr.setResponseName(getCommandName()); - this.setResponseObject(lr); + setResponseObject(lr); } } @@ -221,7 +237,7 @@ public class LDAPConfigCmd extends BaseCmd { _configDao.update(cvo.getName(), cvo.getCategory(), getSearchBase()); /** - * There is no ssl now. it is derived from the presence of trust store and password + * There is no ssl now. it is derived from the presence of trust store and password */ // cvo = _configDao.findByName(LDAPParams.usessl.toString()); // _configDao.update(cvo.getName(),cvo.getCategory(),getUseSSL().toString()); diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LdapImportUsersCmd.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LdapImportUsersCmd.java index d817c334de8..89cec6555b1 100644 --- a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LdapImportUsersCmd.java +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/api/command/LdapImportUsersCmd.java @@ -59,29 +59,29 @@ public class LdapImportUsersCmd extends BaseListCmd { private static final String s_name = "ldapuserresponse"; @Parameter(name = ApiConstants.TIMEZONE, - type = CommandType.STRING, - description = "Specifies a timezone for this command. For more information on the timezone parameter, see Time Zone Format.") + type = CommandType.STRING, + description = "Specifies a timezone for this command. For more information on the timezone parameter, see Time Zone Format.") private String timezone; @Parameter(name = ApiConstants.ACCOUNT_TYPE, - type = CommandType.SHORT, - required = true, - description = "Type of the account. Specify 0 for user, 1 for root admin, and 2 for domain admin") + type = CommandType.SHORT, + required = true, + description = "Type of the account. Specify 0 for user, 1 for root admin, and 2 for domain admin") private Short accountType; @Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "details for account used to store specific parameters") private Map details; @Parameter(name = ApiConstants.DOMAIN_ID, - type = CommandType.UUID, - entityType = DomainResponse.class, - description = "Specifies the domain to which the ldap users are to be " - + "imported. If no domain is specified, a domain will created using group parameter. If the group is also not specified, a domain name based on the OU information will be " - + "created. If no OU hierarchy exists, will be defaulted to ROOT domain") + type = CommandType.UUID, + entityType = DomainResponse.class, + description = "Specifies the domain to which the ldap users are to be " + + "imported. If no domain is specified, a domain will created using group parameter. If the group is also not specified, a domain name based on the OU information will be " + + "created. If no OU hierarchy exists, will be defaulted to ROOT domain") private Long domainId; @Parameter(name = ApiConstants.GROUP, type = CommandType.STRING, description = "Specifies the group name from which the ldap users are to be imported. " - + "If no group is specified, all the users will be imported.") + + "If no group is specified, all the users will be imported.") private String groupName; private Domain _domain; @@ -102,7 +102,7 @@ public class LdapImportUsersCmd extends BaseListCmd { @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, - ResourceAllocationException, NetworkRuleConflictException { + ResourceAllocationException, NetworkRuleConflictException { List users; try { @@ -122,7 +122,7 @@ public class LdapImportUsersCmd extends BaseListCmd { Domain domain = getDomain(user); try { _accountService.createUserAccount(user.getUsername(), generatePassword(), user.getFirstname(), user.getLastname(), user.getEmail(), timezone, - user.getUsername(), accountType, domain.getId(), domain.getNetworkDomain(), details, UUID.randomUUID().toString(), UUID.randomUUID().toString()); + user.getUsername(), accountType, domain.getId(), domain.getNetworkDomain(), details, UUID.randomUUID().toString(), UUID.randomUUID().toString()); addedUsers.add(user); } catch (InvalidParameterValueException ex) { s_logger.error("Failed to create user with username: " + user.getUsername() + " ::: " + ex.getMessage()); diff --git a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java index 578ebce7f77..6d71f4f17dd 100644 --- a/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java +++ b/plugins/user-authenticators/ldap/src/org/apache/cloudstack/ldap/LdapManagerImpl.java @@ -24,13 +24,22 @@ import javax.inject.Inject; import javax.naming.NamingException; import javax.naming.directory.DirContext; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + import org.apache.cloudstack.api.LdapValidator; -import org.apache.cloudstack.api.command.*; +import org.apache.cloudstack.api.command.LDAPConfigCmd; +import org.apache.cloudstack.api.command.LDAPRemoveCmd; +import org.apache.cloudstack.api.command.LdapAddConfigurationCmd; +import org.apache.cloudstack.api.command.LdapCreateAccountCmd; +import org.apache.cloudstack.api.command.LdapDeleteConfigurationCmd; +import org.apache.cloudstack.api.command.LdapImportUsersCmd; +import org.apache.cloudstack.api.command.LdapListConfigurationCmd; +import org.apache.cloudstack.api.command.LdapListUsersCmd; +import org.apache.cloudstack.api.command.LdapUserSearchCmd; import org.apache.cloudstack.api.response.LdapConfigurationResponse; import org.apache.cloudstack.api.response.LdapUserResponse; import org.apache.cloudstack.ldap.dao.LdapConfigurationDao; -import org.apache.log4j.Logger; -import org.springframework.stereotype.Component; import com.cloud.exception.InvalidParameterValueException; import com.cloud.utils.Pair; diff --git a/pom.xml b/pom.xml index d256b97cc19..59f3a6ad284 100644 --- a/pom.xml +++ b/pom.xml @@ -470,7 +470,7 @@ true ${project.basedir} **\/*.java - **\/deps\/,**\/test\/,**\/target\/,**\/bin\/,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat + **\/deps\/,**\/test\/,**\/target\/,**\/bin\/,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/awsapi\/,**\/xapi\/,**\/apidoc\/ diff --git a/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java b/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java index 0bfe1926d1d..b77f8acce4d 100755 --- a/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java +++ b/server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java @@ -296,7 +296,7 @@ public class FirstFitAllocator extends AdapterBase implements HostAllocator { boolean hostHasCpuCapability = _capacityMgr.checkIfHostHasCpuCapability(host.getId(), offering.getCpu(), offering.getSpeed()); boolean hostHasCapacity = _capacityMgr.checkIfHostHasCapacity(host.getId(), cpu_requested, ram_requested, false, cpuOvercommitRatio, memoryOvercommitRatio, - considerReservedCapacity); + considerReservedCapacity); if (hostHasCpuCapability && hostHasCapacity) { if (s_logger.isDebugEnabled()) { @@ -305,7 +305,7 @@ public class FirstFitAllocator extends AdapterBase implements HostAllocator { suitableHosts.add(host); } else { if (s_logger.isDebugEnabled()) { - s_logger.debug("Not using host " + host.getId() + "; host has cpu capability? " + hostHasCpuCapability + ", host has capacity?" + hostHasCapacity); + s_logger.debug("Not using host " + host.getId() + "; host has cpu capability? " + hostHasCpuCapability + ", host has capacity?" + hostHasCapacity); } avoid.addHost(host.getId()); } diff --git a/server/src/com/cloud/alert/AlertManagerImpl.java b/server/src/com/cloud/alert/AlertManagerImpl.java index c742813e17e..2a343d5c4b3 100755 --- a/server/src/com/cloud/alert/AlertManagerImpl.java +++ b/server/src/com/cloud/alert/AlertManagerImpl.java @@ -40,7 +40,12 @@ import javax.mail.URLName; import javax.mail.internet.InternetAddress; import javax.naming.ConfigurationException; -import org.apache.cloudstack.alert.AlertService.AlertType; +import org.apache.log4j.Logger; + +import com.sun.mail.smtp.SMTPMessage; +import com.sun.mail.smtp.SMTPSSLTransport; +import com.sun.mail.smtp.SMTPTransport; + import org.apache.cloudstack.framework.config.ConfigDepot; import org.apache.cloudstack.framework.config.ConfigKey; import org.apache.cloudstack.framework.config.Configurable; @@ -48,7 +53,6 @@ import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.managed.context.ManagedContextTimerTask; import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; -import org.apache.log4j.Logger; import com.cloud.alert.dao.AlertDao; import com.cloud.api.ApiDBUtils; @@ -81,11 +85,7 @@ import com.cloud.storage.StorageManager; import com.cloud.utils.NumbersUtil; import com.cloud.utils.component.ManagerBase; import com.cloud.utils.concurrency.NamedThreadFactory; -import com.cloud.utils.db.DB; import com.cloud.utils.db.SearchCriteria; -import com.sun.mail.smtp.SMTPMessage; -import com.sun.mail.smtp.SMTPSSLTransport; -import com.sun.mail.smtp.SMTPTransport; @Local(value = {AlertManager.class}) public class AlertManagerImpl extends ManagerBase implements AlertManager, Configurable { @@ -94,8 +94,8 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi private static final long INITIAL_CAPACITY_CHECK_DELAY = 30L * 1000L; // thirty seconds expressed in milliseconds - private static final DecimalFormat _dfPct = new DecimalFormat("###.##"); - private static final DecimalFormat _dfWhole = new DecimalFormat("########"); + private static final DecimalFormat DfPct = new DecimalFormat("###.##"); + private static final DecimalFormat DfWhole = new DecimalFormat("########"); private EmailAlert _emailAlert; @Inject @@ -259,6 +259,7 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi } } + @Override public void recalculateCapacity() { // FIXME: the right way to do this is to register a listener (see RouterStatsListener, VMSyncListener) // for the vm sync state. The listener model has connects/disconnects to keep things in sync much better @@ -542,7 +543,7 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi String msgContent = null; String totalStr; String usedStr; - String pctStr = formatPercent(usedCapacity/totalCapacity); + String pctStr = formatPercent(usedCapacity / totalCapacity); AlertType alertType = null; Long podId = pod == null ? null : pod.getId(); Long clusterId = cluster == null ? null : cluster.getId(); @@ -559,8 +560,8 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi break; case Capacity.CAPACITY_TYPE_CPU: msgSubject = "System Alert: Low Unallocated CPU in cluster " + cluster.getName() + " pod " + pod.getName() + " of availability zone " + dc.getName(); - totalStr = _dfWhole.format(totalCapacity); - usedStr = _dfWhole.format(usedCapacity); + totalStr = DfWhole.format(totalCapacity); + usedStr = DfWhole.format(usedCapacity); msgContent = "Unallocated CPU is low, total: " + totalStr + " Mhz, used: " + usedStr + " Mhz (" + pctStr + "%)"; alertType = AlertManager.AlertType.ALERT_TYPE_CPU; break; @@ -684,7 +685,8 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi private int _smtpTimeout; private int _smtpConnectionTimeout; - public EmailAlert(String[] recipientList, String smtpHost, int smtpPort, int smtpConnectionTimeout, int smtpTimeout, boolean smtpUseAuth, final String smtpUsername, + public EmailAlert(String[] recipientList, String smtpHost, int smtpPort, int smtpConnectionTimeout, int smtpTimeout, boolean smtpUseAuth, + final String smtpUsername, final String smtpPassword, String emailSender, boolean smtpDebug) { if (recipientList != null) { _recipientList = new InternetAddress[recipientList.length]; @@ -710,7 +712,7 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi Properties smtpProps = new Properties(); smtpProps.put("mail.smtp.host", smtpHost); smtpProps.put("mail.smtp.port", smtpPort); - smtpProps.put("mail.smtp.auth", ""+smtpUseAuth); + smtpProps.put("mail.smtp.auth", "" + smtpUseAuth); smtpProps.put("mail.smtp.timeout", _smtpTimeout); smtpProps.put("mail.smtp.connectiontimeout", _smtpConnectionTimeout); @@ -720,7 +722,7 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi smtpProps.put("mail.smtps.host", smtpHost); smtpProps.put("mail.smtps.port", smtpPort); - smtpProps.put("mail.smtps.auth", ""+smtpUseAuth); + smtpProps.put("mail.smtps.auth", "" + smtpUseAuth); smtpProps.put("mail.smtps.timeout", _smtpTimeout); smtpProps.put("mail.smtps.connectiontimeout", _smtpConnectionTimeout); @@ -745,18 +747,19 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi } // TODO: make sure this handles SSL transport (useAuth is true) and regular - public void sendAlert(AlertType alertType, long dataCenterId, Long podId, Long clusterId, String subject, String content) throws MessagingException, UnsupportedEncodingException { + public void sendAlert(AlertType alertType, long dataCenterId, Long podId, Long clusterId, String subject, String content) throws MessagingException, + UnsupportedEncodingException { s_alertsLogger.warn(" alertType:: " + alertType + " // dataCenterId:: " + dataCenterId + " // podId:: " + podId + " // clusterId:: " + null + " // message:: " + subject); AlertVO alert = null; if ((alertType != AlertManager.AlertType.ALERT_TYPE_HOST) && - (alertType != AlertManager.AlertType.ALERT_TYPE_USERVM) && - (alertType != AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER) && - (alertType != AlertManager.AlertType.ALERT_TYPE_CONSOLE_PROXY) && - (alertType != AlertManager.AlertType.ALERT_TYPE_SSVM) && - (alertType != AlertManager.AlertType.ALERT_TYPE_STORAGE_MISC) && - (alertType != AlertManager.AlertType.ALERT_TYPE_MANAGMENT_NODE) && - (alertType != AlertManager.AlertType.ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED)) { + (alertType != AlertManager.AlertType.ALERT_TYPE_USERVM) && + (alertType != AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER) && + (alertType != AlertManager.AlertType.ALERT_TYPE_CONSOLE_PROXY) && + (alertType != AlertManager.AlertType.ALERT_TYPE_SSVM) && + (alertType != AlertManager.AlertType.ALERT_TYPE_STORAGE_MISC) && + (alertType != AlertManager.AlertType.ALERT_TYPE_MANAGMENT_NODE) && + (alertType != AlertManager.AlertType.ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED)) { alert = _alertDao.getLastAlert(alertType.getType(), dataCenterId, podId, clusterId); } @@ -816,7 +819,7 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi } } }); - } + } public void clearAlert(short alertType, long dataCenterId, Long podId) { if (alertType != -1) { @@ -831,12 +834,12 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi } private static String formatPercent(double percentage) { - return _dfPct.format(percentage * 100); + return DfPct.format(percentage * 100); } private static String formatBytesToMegabytes(double bytes) { double megaBytes = (bytes / (1024 * 1024)); - return _dfWhole.format(megaBytes); + return DfWhole.format(megaBytes); } @Override @@ -850,7 +853,7 @@ public class AlertManagerImpl extends ManagerBase implements AlertManager, Confi } @Override - @ActionEvent(eventType = EventTypes.ALERT_GENERATE, eventDescription = "generating alert", async=true) + @ActionEvent(eventType = EventTypes.ALERT_GENERATE, eventDescription = "generating alert", async = true) public boolean generateAlert(AlertType alertType, long dataCenterId, Long podId, String msg) { try { sendAlert(alertType, dataCenterId, podId, msg, msg); diff --git a/server/src/com/cloud/alert/ClusterAlertAdapter.java b/server/src/com/cloud/alert/ClusterAlertAdapter.java index 568fc0fb5c6..ccb10746c86 100644 --- a/server/src/com/cloud/alert/ClusterAlertAdapter.java +++ b/server/src/com/cloud/alert/ClusterAlertAdapter.java @@ -92,7 +92,8 @@ public class ClusterAlertAdapter extends AdapterBase implements AlertAdapter { if (s_logger.isDebugEnabled()) { s_logger.debug("Detected management server node " + mshost.getServiceIP() + " is down, send alert"); } - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_MANAGMENT_NODE, 0, new Long(0), "Management server node " + mshost.getServiceIP() + " is down", ""); + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_MANAGMENT_NODE, 0, new Long(0), "Management server node " + mshost.getServiceIP() + " is down", + ""); } else { if (s_logger.isDebugEnabled()) { s_logger.debug("Detected management server node " + mshost.getServiceIP() + " is down, but alert has already been set"); diff --git a/server/src/com/cloud/alert/ConsoleProxyAlertAdapter.java b/server/src/com/cloud/alert/ConsoleProxyAlertAdapter.java index 86f7fc1e101..df4f5ba953e 100644 --- a/server/src/com/cloud/alert/ConsoleProxyAlertAdapter.java +++ b/server/src/com/cloud/alert/ConsoleProxyAlertAdapter.java @@ -68,9 +68,10 @@ public class ConsoleProxyAlertAdapter extends AdapterBase implements AlertAdapte s_logger.debug("Console proxy is up, zone: " + dc.getName() + ", proxy: " + proxy.getHostName() + ", public IP: " + proxy.getPublicIpAddress() + ", private IP: " + proxy.getPrivateIpAddress()); - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_CONSOLE_PROXY, args.getZoneId(), proxy.getPodIdToDeployIn(), "Console proxy up in zone: " + dc.getName() + - ", proxy: " + proxy.getHostName() + ", public IP: " + proxy.getPublicIpAddress() + ", private IP: " + - (proxy.getPrivateIpAddress() == null ? "N/A" : proxy.getPrivateIpAddress()), "Console proxy up (zone " + dc.getName() + ")"); + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_CONSOLE_PROXY, args.getZoneId(), proxy.getPodIdToDeployIn(), + "Console proxy up in zone: " + dc.getName() + + ", proxy: " + proxy.getHostName() + ", public IP: " + proxy.getPublicIpAddress() + ", private IP: " + + (proxy.getPrivateIpAddress() == null ? "N/A" : proxy.getPrivateIpAddress()), "Console proxy up (zone " + dc.getName() + ")"); break; case ConsoleProxyAlertEventArgs.PROXY_DOWN: @@ -78,9 +79,10 @@ public class ConsoleProxyAlertAdapter extends AdapterBase implements AlertAdapte s_logger.debug("Console proxy is down, zone: " + dc.getName() + ", proxy: " + proxy.getHostName() + ", public IP: " + proxy.getPublicIpAddress() + ", private IP: " + (proxy.getPrivateIpAddress() == null ? "N/A" : proxy.getPrivateIpAddress())); - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_CONSOLE_PROXY, args.getZoneId(), proxy.getPodIdToDeployIn(), "Console proxy down in zone: " + dc.getName() + - ", proxy: " + proxy.getHostName() + ", public IP: " + proxy.getPublicIpAddress() + ", private IP: " + - (proxy.getPrivateIpAddress() == null ? "N/A" : proxy.getPrivateIpAddress()), "Console proxy down (zone " + dc.getName() + ")"); + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_CONSOLE_PROXY, args.getZoneId(), proxy.getPodIdToDeployIn(), + "Console proxy down in zone: " + dc.getName() + + ", proxy: " + proxy.getHostName() + ", public IP: " + proxy.getPublicIpAddress() + ", private IP: " + + (proxy.getPrivateIpAddress() == null ? "N/A" : proxy.getPrivateIpAddress()), "Console proxy down (zone " + dc.getName() + ")"); break; case ConsoleProxyAlertEventArgs.PROXY_REBOOTED: diff --git a/server/src/com/cloud/alert/SecondaryStorageVmAlertAdapter.java b/server/src/com/cloud/alert/SecondaryStorageVmAlertAdapter.java index 9d4de55f579..b7834bb0341 100644 --- a/server/src/com/cloud/alert/SecondaryStorageVmAlertAdapter.java +++ b/server/src/com/cloud/alert/SecondaryStorageVmAlertAdapter.java @@ -106,9 +106,10 @@ public class SecondaryStorageVmAlertAdapter extends AdapterBase implements Alert s_logger.debug("Secondary Storage Vm creation failure, zone: " + dc.getName() + ", secStorageVm: " + secStorageVm.getHostName() + ", public IP: " + secStorageVm.getPublicIpAddress() + ", private IP: " + (secStorageVm.getPrivateIpAddress() == null ? "N/A" : secStorageVm.getPrivateIpAddress())); - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_SSVM, args.getZoneId(), secStorageVm.getPodIdToDeployIn(), "Secondary Storage Vm creation failure. zone: " + - dc.getName() + ", secStorageVm: " + secStorageVm.getHostName() + ", public IP: " + secStorageVm.getPublicIpAddress() + ", private IP: " + - (secStorageVm.getPrivateIpAddress() == null ? "N/A" : secStorageVm.getPrivateIpAddress()) + ", error details: " + args.getMessage(), + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_SSVM, args.getZoneId(), secStorageVm.getPodIdToDeployIn(), + "Secondary Storage Vm creation failure. zone: " + + dc.getName() + ", secStorageVm: " + secStorageVm.getHostName() + ", public IP: " + secStorageVm.getPublicIpAddress() + ", private IP: " + + (secStorageVm.getPrivateIpAddress() == null ? "N/A" : secStorageVm.getPrivateIpAddress()) + ", error details: " + args.getMessage(), "Secondary Storage Vm creation failure (zone " + dc.getName() + ")"); break; @@ -117,9 +118,10 @@ public class SecondaryStorageVmAlertAdapter extends AdapterBase implements Alert s_logger.debug("Secondary Storage Vm startup failure, zone: " + dc.getName() + ", secStorageVm: " + secStorageVm.getHostName() + ", public IP: " + secStorageVm.getPublicIpAddress() + ", private IP: " + (secStorageVm.getPrivateIpAddress() == null ? "N/A" : secStorageVm.getPrivateIpAddress())); - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_SSVM, args.getZoneId(), secStorageVm.getPodIdToDeployIn(), "Secondary Storage Vm startup failure. zone: " + - dc.getName() + ", secStorageVm: " + secStorageVm.getHostName() + ", public IP: " + secStorageVm.getPublicIpAddress() + ", private IP: " + - (secStorageVm.getPrivateIpAddress() == null ? "N/A" : secStorageVm.getPrivateIpAddress()) + ", error details: " + args.getMessage(), + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_SSVM, args.getZoneId(), secStorageVm.getPodIdToDeployIn(), + "Secondary Storage Vm startup failure. zone: " + + dc.getName() + ", secStorageVm: " + secStorageVm.getHostName() + ", public IP: " + secStorageVm.getPublicIpAddress() + ", private IP: " + + (secStorageVm.getPrivateIpAddress() == null ? "N/A" : secStorageVm.getPrivateIpAddress()) + ", error details: " + args.getMessage(), "Secondary Storage Vm startup failure (zone " + dc.getName() + ")"); break; diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java index 097c2aec660..8c59ce65370 100755 --- a/server/src/com/cloud/api/ApiDBUtils.java +++ b/server/src/com/cloud/api/ApiDBUtils.java @@ -59,7 +59,6 @@ import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.framework.jobs.AsyncJob; import org.apache.cloudstack.framework.jobs.AsyncJobManager; import org.apache.cloudstack.framework.jobs.dao.AsyncJobDao; -import org.apache.cloudstack.lb.dao.ApplicationLoadBalancerRuleDao; import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; @@ -124,7 +123,6 @@ import com.cloud.dc.VlanVO; import com.cloud.dc.dao.AccountVlanMapDao; import com.cloud.dc.dao.ClusterDao; import com.cloud.dc.dao.DataCenterDao; -import com.cloud.dc.dao.DataCenterDetailsDao; import com.cloud.dc.dao.HostPodDao; import com.cloud.dc.dao.VlanDao; import com.cloud.domain.DomainVO; @@ -225,7 +223,6 @@ import com.cloud.server.StatsCollector; import com.cloud.server.TaggedResourceService; import com.cloud.service.ServiceOfferingVO; import com.cloud.service.dao.ServiceOfferingDao; -import com.cloud.service.dao.ServiceOfferingDetailsDao; import com.cloud.storage.DiskOfferingVO; import com.cloud.storage.GuestOS; import com.cloud.storage.GuestOSCategoryVO; @@ -293,116 +290,116 @@ import com.cloud.vm.snapshot.VMSnapshot; import com.cloud.vm.snapshot.dao.VMSnapshotDao; public class ApiDBUtils { - private static ManagementServer _ms; - static AsyncJobManager _asyncMgr; - static SecurityGroupManager _securityGroupMgr; - static StorageManager _storageMgr; - static VolumeOrchestrationService _volumeMgr; - static UserVmManager _userVmMgr; - static NetworkModel _networkModel; - static NetworkOrchestrationService _networkMgr; - static TemplateManager _templateMgr; - static ConfigurationManager _configMgr; + private static ManagementServer s_ms; + static AsyncJobManager s_asyncMgr; + static SecurityGroupManager s_securityGroupMgr; + static StorageManager s_storageMgr; + static VolumeOrchestrationService s_volumeMgr; + static UserVmManager s_userVmMgr; + static NetworkModel s_networkModel; + static NetworkOrchestrationService s_networkMgr; + static TemplateManager s_templateMgr; + static ConfigurationManager s_configMgr; - static StatsCollector _statsCollector; + static StatsCollector s_statsCollector; - static AccountDao _accountDao; - static AccountVlanMapDao _accountVlanMapDao; - static ClusterDao _clusterDao; - static CapacityDao _capacityDao; - static DiskOfferingDao _diskOfferingDao; - static DiskOfferingJoinDao _diskOfferingJoinDao; - static DataCenterJoinDao _dcJoinDao; - static DomainDao _domainDao; - static DomainRouterDao _domainRouterDao; - static DomainRouterJoinDao _domainRouterJoinDao; - static GuestOSDao _guestOSDao; - static GuestOSCategoryDao _guestOSCategoryDao; - static HostDao _hostDao; - static AccountGuestVlanMapDao _accountGuestVlanMapDao; - static IPAddressDao _ipAddressDao; - static LoadBalancerDao _loadBalancerDao; - static SecurityGroupDao _securityGroupDao; - static SecurityGroupJoinDao _securityGroupJoinDao; - static ServiceOfferingJoinDao _serviceOfferingJoinDao; - static NetworkRuleConfigDao _networkRuleConfigDao; - static HostPodDao _podDao; - static ServiceOfferingDao _serviceOfferingDao; - static SnapshotDao _snapshotDao; - static PrimaryDataStoreDao _storagePoolDao; - static VMTemplateDao _templateDao; - static VMTemplateDetailsDao _templateDetailsDao; - static UploadDao _uploadDao; - static UserDao _userDao; - static UserStatisticsDao _userStatsDao; - static UserVmDao _userVmDao; - static UserVmJoinDao _userVmJoinDao; - static VlanDao _vlanDao; - static VolumeDao _volumeDao; - static Site2SiteVpnGatewayDao _site2SiteVpnGatewayDao; - static Site2SiteCustomerGatewayDao _site2SiteCustomerGatewayDao; - static DataCenterDao _zoneDao; - static NetworkOfferingDao _networkOfferingDao; - static NetworkDao _networkDao; - static PhysicalNetworkDao _physicalNetworkDao; - static ConfigurationService _configSvc; - static ConfigurationDao _configDao; - static ConsoleProxyDao _consoleProxyDao; - static FirewallRulesCidrsDao _firewallCidrsDao; - static VMInstanceDao _vmDao; - static ResourceLimitService _resourceLimitMgr; - static ProjectService _projectMgr; - static ResourceManager _resourceMgr; - static AccountDetailsDao _accountDetailsDao; - static NetworkDomainDao _networkDomainDao; - static HighAvailabilityManager _haMgr; - static VpcManager _vpcMgr; - static TaggedResourceService _taggedResourceService; - static UserVmDetailsDao _userVmDetailsDao; - static SSHKeyPairDao _sshKeyPairDao; + static AccountDao s_accountDao; + static AccountVlanMapDao s_accountVlanMapDao; + static ClusterDao s_clusterDao; + static CapacityDao s_capacityDao; + static DiskOfferingDao s_diskOfferingDao; + static DiskOfferingJoinDao s_diskOfferingJoinDao; + static DataCenterJoinDao s_dcJoinDao; + static DomainDao s_domainDao; + static DomainRouterDao s_domainRouterDao; + static DomainRouterJoinDao s_domainRouterJoinDao; + static GuestOSDao s_guestOSDao; + static GuestOSCategoryDao s_guestOSCategoryDao; + static HostDao s_hostDao; + static AccountGuestVlanMapDao s_accountGuestVlanMapDao; + static IPAddressDao s_ipAddressDao; + static LoadBalancerDao s_loadBalancerDao; + static SecurityGroupDao s_securityGroupDao; + static SecurityGroupJoinDao s_securityGroupJoinDao; + static ServiceOfferingJoinDao s_serviceOfferingJoinDao; + static NetworkRuleConfigDao s_networkRuleConfigDao; + static HostPodDao s_podDao; + static ServiceOfferingDao s_serviceOfferingDao; + static SnapshotDao s_snapshotDao; + static PrimaryDataStoreDao s_storagePoolDao; + static VMTemplateDao s_templateDao; + static VMTemplateDetailsDao s_templateDetailsDao; + static UploadDao s_uploadDao; + static UserDao s_userDao; + static UserStatisticsDao s_userStatsDao; + static UserVmDao s_userVmDao; + static UserVmJoinDao s_userVmJoinDao; + static VlanDao s_vlanDao; + static VolumeDao s_volumeDao; + static Site2SiteVpnGatewayDao s_site2SiteVpnGatewayDao; + static Site2SiteCustomerGatewayDao s_site2SiteCustomerGatewayDao; + static DataCenterDao s_zoneDao; + static NetworkOfferingDao s_networkOfferingDao; + static NetworkDao s_networkDao; + static PhysicalNetworkDao s_physicalNetworkDao; + static ConfigurationService s_configSvc; + static ConfigurationDao s_configDao; + static ConsoleProxyDao s_consoleProxyDao; + static FirewallRulesCidrsDao s_firewallCidrsDao; + static VMInstanceDao s_vmDao; + static ResourceLimitService s_resourceLimitMgr; + static ProjectService s_projectMgr; + static ResourceManager s_resourceMgr; + static AccountDetailsDao s_accountDetailsDao; + static NetworkDomainDao s_networkDomainDao; + static HighAvailabilityManager s_haMgr; + static VpcManager s_vpcMgr; + static TaggedResourceService s_taggedResourceService; + static UserVmDetailsDao s_userVmDetailsDao; + static SSHKeyPairDao s_sshKeyPairDao; - static ConditionDao _asConditionDao; - static AutoScalePolicyConditionMapDao _asPolicyConditionMapDao; - static AutoScaleVmGroupPolicyMapDao _asVmGroupPolicyMapDao; - static AutoScalePolicyDao _asPolicyDao; - static AutoScaleVmProfileDao _asVmProfileDao; - static AutoScaleVmGroupDao _asVmGroupDao; - static CounterDao _counterDao; - static ResourceTagJoinDao _tagJoinDao; - static EventJoinDao _eventJoinDao; - static InstanceGroupJoinDao _vmGroupJoinDao; - static UserAccountJoinDao _userAccountJoinDao; - static ProjectJoinDao _projectJoinDao; - static ProjectAccountJoinDao _projectAccountJoinDao; - static ProjectInvitationJoinDao _projectInvitationJoinDao; - static HostJoinDao _hostJoinDao; - static VolumeJoinDao _volJoinDao; - static StoragePoolJoinDao _poolJoinDao; - static ImageStoreJoinDao _imageStoreJoinDao; - static AccountJoinDao _accountJoinDao; - static AsyncJobJoinDao _jobJoinDao; - static TemplateJoinDao _templateJoinDao; + static ConditionDao s_asConditionDao; + static AutoScalePolicyConditionMapDao s_asPolicyConditionMapDao; + static AutoScaleVmGroupPolicyMapDao s_asVmGroupPolicyMapDao; + static AutoScalePolicyDao s_asPolicyDao; + static AutoScaleVmProfileDao s_asVmProfileDao; + static AutoScaleVmGroupDao s_asVmGroupDao; + static CounterDao s_counterDao; + static ResourceTagJoinDao s_tagJoinDao; + static EventJoinDao s_eventJoinDao; + static InstanceGroupJoinDao s_vmGroupJoinDao; + static UserAccountJoinDao s_userAccountJoinDao; + static ProjectJoinDao s_projectJoinDao; + static ProjectAccountJoinDao s_projectAccountJoinDao; + static ProjectInvitationJoinDao s_projectInvitationJoinDao; + static HostJoinDao s_hostJoinDao; + static VolumeJoinDao s_volJoinDao; + static StoragePoolJoinDao s_poolJoinDao; + static ImageStoreJoinDao s_imageStoreJoinDao; + static AccountJoinDao s_accountJoinDao; + static AsyncJobJoinDao s_jobJoinDao; + static TemplateJoinDao s_templateJoinDao; - static PhysicalNetworkTrafficTypeDao _physicalNetworkTrafficTypeDao; - static PhysicalNetworkServiceProviderDao _physicalNetworkServiceProviderDao; - static FirewallRulesDao _firewallRuleDao; - static StaticRouteDao _staticRouteDao; - static VpcGatewayDao _vpcGatewayDao; - static VpcDao _vpcDao; - static VpcOfferingDao _vpcOfferingDao; - static SnapshotPolicyDao _snapshotPolicyDao; - static AsyncJobDao _asyncJobDao; - static HostDetailsDao _hostDetailsDao; - static VMSnapshotDao _vmSnapshotDao; - static ClusterDetailsDao _clusterDetailsDao; - static NicSecondaryIpDao _nicSecondaryIpDao; - static VpcProvisioningService _vpcProvSvc; - static AffinityGroupDao _affinityGroupDao; - static AffinityGroupJoinDao _affinityGroupJoinDao; - static GlobalLoadBalancingRulesService _gslbService; - static NetworkACLDao _networkACLDao; - static AccountService _accountService; - static ResourceMetaDataService _resourceDetailsService; + static PhysicalNetworkTrafficTypeDao s_physicalNetworkTrafficTypeDao; + static PhysicalNetworkServiceProviderDao s_physicalNetworkServiceProviderDao; + static FirewallRulesDao s_firewallRuleDao; + static StaticRouteDao s_staticRouteDao; + static VpcGatewayDao s_vpcGatewayDao; + static VpcDao s_vpcDao; + static VpcOfferingDao s_vpcOfferingDao; + static SnapshotPolicyDao s_snapshotPolicyDao; + static AsyncJobDao s_asyncJobDao; + static HostDetailsDao s_hostDetailsDao; + static VMSnapshotDao s_vmSnapshotDao; + static ClusterDetailsDao s_clusterDetailsDao; + static NicSecondaryIpDao s_nicSecondaryIpDao; + static VpcProvisioningService s_vpcProvSvc; + static AffinityGroupDao s_affinityGroupDao; + static AffinityGroupJoinDao s_affinityGroupJoinDao; + static GlobalLoadBalancingRulesService s_gslbService; + static NetworkACLDao s_networkACLDao; + static AccountService s_accountService; + static ResourceMetaDataService s_resourceDetailsService; @Inject private ManagementServer ms; @@ -606,8 +603,6 @@ public class ApiDBUtils { @Inject private VpcProvisioningService vpcProvSvc; @Inject - private ApplicationLoadBalancerRuleDao _appLbDao; - @Inject private AffinityGroupDao affinityGroupDao; @Inject private AffinityGroupJoinDao affinityGroupJoinDao; @@ -616,126 +611,122 @@ public class ApiDBUtils { @Inject private NetworkACLDao networkACLDao; @Inject - private ServiceOfferingDetailsDao serviceOfferingDetailsDao; - @Inject private AccountService accountService; @Inject private ConfigurationManager configMgr; @Inject - private DataCenterDetailsDao zoneDetailsDao; - @Inject private ResourceMetaDataService resourceDetailsService; @PostConstruct void init() { - _ms = ms; - _configMgr = configMgr; - _asyncMgr = asyncMgr; - _securityGroupMgr = securityGroupMgr; - _storageMgr = storageMgr; - _userVmMgr = userVmMgr; - _networkModel = networkModel; - _networkMgr = networkMgr; - _configSvc = configSvc; - _templateMgr = templateMgr; + s_ms = ms; + s_configMgr = configMgr; + s_asyncMgr = asyncMgr; + s_securityGroupMgr = securityGroupMgr; + s_storageMgr = storageMgr; + s_userVmMgr = userVmMgr; + s_networkModel = networkModel; + s_networkMgr = networkMgr; + s_configSvc = configSvc; + s_templateMgr = templateMgr; - _accountDao = accountDao; - _accountGuestVlanMapDao = accountGuestVlanMapDao; - _accountVlanMapDao = accountVlanMapDao; - _clusterDao = clusterDao; - _capacityDao = capacityDao; - _dcJoinDao = dcJoinDao; - _diskOfferingDao = diskOfferingDao; - _diskOfferingJoinDao = diskOfferingJoinDao; - _domainDao = domainDao; - _domainRouterDao = domainRouterDao; - _domainRouterJoinDao = domainRouterJoinDao; - _guestOSDao = guestOSDao; - _guestOSCategoryDao = guestOSCategoryDao; - _hostDao = hostDao; - _ipAddressDao = ipAddressDao; - _loadBalancerDao = loadBalancerDao; - _networkRuleConfigDao = networkRuleConfigDao; - _podDao = podDao; - _serviceOfferingDao = serviceOfferingDao; - _serviceOfferingJoinDao = serviceOfferingJoinDao; - _snapshotDao = snapshotDao; - _storagePoolDao = storagePoolDao; - _templateDao = templateDao; - _templateDetailsDao = templateDetailsDao; - _uploadDao = uploadDao; - _userDao = userDao; - _userStatsDao = userStatsDao; - _userVmDao = userVmDao; - _userVmJoinDao = userVmJoinDao; - _vlanDao = vlanDao; - _volumeDao = volumeDao; - _site2SiteVpnGatewayDao = site2SiteVpnGatewayDao; - _site2SiteCustomerGatewayDao = site2SiteCustomerGatewayDao; - _zoneDao = zoneDao; - _securityGroupDao = securityGroupDao; - _securityGroupJoinDao = securityGroupJoinDao; - _networkOfferingDao = networkOfferingDao; - _networkDao = networkDao; - _physicalNetworkDao = physicalNetworkDao; - _configDao = configDao; - _consoleProxyDao = consoleProxyDao; - _firewallCidrsDao = firewallCidrsDao; - _vmDao = vmDao; - _resourceLimitMgr = resourceLimitMgr; - _projectMgr = projectMgr; - _resourceMgr = resourceMgr; - _accountDetailsDao = accountDetailsDao; - _networkDomainDao = networkDomainDao; - _haMgr = haMgr; - _vpcMgr = vpcMgr; - _taggedResourceService = taggedResourceService; - _sshKeyPairDao = sshKeyPairDao; - _userVmDetailsDao = userVmDetailsDao; - _asConditionDao = asConditionDao; - _asPolicyDao = asPolicyDao; - _asPolicyConditionMapDao = asPolicyConditionMapDao; - _counterDao = counterDao; - _asVmGroupPolicyMapDao = asVmGroupPolicyMapDao; - _tagJoinDao = tagJoinDao; - _vmGroupJoinDao = vmGroupJoinDao; - _eventJoinDao = eventJoinDao; - _userAccountJoinDao = userAccountJoinDao; - _projectJoinDao = projectJoinDao; - _projectAccountJoinDao = projectAccountJoinDao; - _projectInvitationJoinDao = projectInvitationJoinDao; - _hostJoinDao = hostJoinDao; - _volJoinDao = volJoinDao; - _poolJoinDao = poolJoinDao; - _imageStoreJoinDao = imageStoreJoinDao; - _accountJoinDao = accountJoinDao; - _jobJoinDao = jobJoinDao; - _templateJoinDao = templateJoinDao; + s_accountDao = accountDao; + s_accountGuestVlanMapDao = accountGuestVlanMapDao; + s_accountVlanMapDao = accountVlanMapDao; + s_clusterDao = clusterDao; + s_capacityDao = capacityDao; + s_dcJoinDao = dcJoinDao; + s_diskOfferingDao = diskOfferingDao; + s_diskOfferingJoinDao = diskOfferingJoinDao; + s_domainDao = domainDao; + s_domainRouterDao = domainRouterDao; + s_domainRouterJoinDao = domainRouterJoinDao; + s_guestOSDao = guestOSDao; + s_guestOSCategoryDao = guestOSCategoryDao; + s_hostDao = hostDao; + s_ipAddressDao = ipAddressDao; + s_loadBalancerDao = loadBalancerDao; + s_networkRuleConfigDao = networkRuleConfigDao; + s_podDao = podDao; + s_serviceOfferingDao = serviceOfferingDao; + s_serviceOfferingJoinDao = serviceOfferingJoinDao; + s_snapshotDao = snapshotDao; + s_storagePoolDao = storagePoolDao; + s_templateDao = templateDao; + s_templateDetailsDao = templateDetailsDao; + s_uploadDao = uploadDao; + s_userDao = userDao; + s_userStatsDao = userStatsDao; + s_userVmDao = userVmDao; + s_userVmJoinDao = userVmJoinDao; + s_vlanDao = vlanDao; + s_volumeDao = volumeDao; + s_site2SiteVpnGatewayDao = site2SiteVpnGatewayDao; + s_site2SiteCustomerGatewayDao = site2SiteCustomerGatewayDao; + s_zoneDao = zoneDao; + s_securityGroupDao = securityGroupDao; + s_securityGroupJoinDao = securityGroupJoinDao; + s_networkOfferingDao = networkOfferingDao; + s_networkDao = networkDao; + s_physicalNetworkDao = physicalNetworkDao; + s_configDao = configDao; + s_consoleProxyDao = consoleProxyDao; + s_firewallCidrsDao = firewallCidrsDao; + s_vmDao = vmDao; + s_resourceLimitMgr = resourceLimitMgr; + s_projectMgr = projectMgr; + s_resourceMgr = resourceMgr; + s_accountDetailsDao = accountDetailsDao; + s_networkDomainDao = networkDomainDao; + s_haMgr = haMgr; + s_vpcMgr = vpcMgr; + s_taggedResourceService = taggedResourceService; + s_sshKeyPairDao = sshKeyPairDao; + s_userVmDetailsDao = userVmDetailsDao; + s_asConditionDao = asConditionDao; + s_asPolicyDao = asPolicyDao; + s_asPolicyConditionMapDao = asPolicyConditionMapDao; + s_counterDao = counterDao; + s_asVmGroupPolicyMapDao = asVmGroupPolicyMapDao; + s_tagJoinDao = tagJoinDao; + s_vmGroupJoinDao = vmGroupJoinDao; + s_eventJoinDao = eventJoinDao; + s_userAccountJoinDao = userAccountJoinDao; + s_projectJoinDao = projectJoinDao; + s_projectAccountJoinDao = projectAccountJoinDao; + s_projectInvitationJoinDao = projectInvitationJoinDao; + s_hostJoinDao = hostJoinDao; + s_volJoinDao = volJoinDao; + s_poolJoinDao = poolJoinDao; + s_imageStoreJoinDao = imageStoreJoinDao; + s_accountJoinDao = accountJoinDao; + s_jobJoinDao = jobJoinDao; + s_templateJoinDao = templateJoinDao; - _physicalNetworkTrafficTypeDao = physicalNetworkTrafficTypeDao; - _physicalNetworkServiceProviderDao = physicalNetworkServiceProviderDao; - _firewallRuleDao = firewallRuleDao; - _staticRouteDao = staticRouteDao; - _vpcGatewayDao = vpcGatewayDao; - _asVmProfileDao = asVmProfileDao; - _asVmGroupDao = asVmGroupDao; - _vpcDao = vpcDao; - _vpcOfferingDao = vpcOfferingDao; - _snapshotPolicyDao = snapshotPolicyDao; - _asyncJobDao = asyncJobDao; - _hostDetailsDao = hostDetailsDao; - _clusterDetailsDao = clusterDetailsDao; - _vmSnapshotDao = vmSnapshotDao; - _nicSecondaryIpDao = nicSecondaryIpDao; - _vpcProvSvc = vpcProvSvc; - _affinityGroupDao = affinityGroupDao; - _affinityGroupJoinDao = affinityGroupJoinDao; - _gslbService = gslbService; + s_physicalNetworkTrafficTypeDao = physicalNetworkTrafficTypeDao; + s_physicalNetworkServiceProviderDao = physicalNetworkServiceProviderDao; + s_firewallRuleDao = firewallRuleDao; + s_staticRouteDao = staticRouteDao; + s_vpcGatewayDao = vpcGatewayDao; + s_asVmProfileDao = asVmProfileDao; + s_asVmGroupDao = asVmGroupDao; + s_vpcDao = vpcDao; + s_vpcOfferingDao = vpcOfferingDao; + s_snapshotPolicyDao = snapshotPolicyDao; + s_asyncJobDao = asyncJobDao; + s_hostDetailsDao = hostDetailsDao; + s_clusterDetailsDao = clusterDetailsDao; + s_vmSnapshotDao = vmSnapshotDao; + s_nicSecondaryIpDao = nicSecondaryIpDao; + s_vpcProvSvc = vpcProvSvc; + s_affinityGroupDao = affinityGroupDao; + s_affinityGroupJoinDao = affinityGroupJoinDao; + s_gslbService = gslbService; // Note: stats collector should already have been initialized by this time, otherwise a null instance is returned - _statsCollector = StatsCollector.getInstance(); - _networkACLDao = networkACLDao; - _accountService = accountService; - _resourceDetailsService = resourceDetailsService; + s_statsCollector = StatsCollector.getInstance(); + s_networkACLDao = networkACLDao; + s_accountService = accountService; + s_resourceDetailsService = resourceDetailsService; } @@ -744,7 +735,7 @@ public class ApiDBUtils { // /////////////////////////////////////////////////////////// public static VMInstanceVO findVMInstanceById(long vmId) { - return _vmDao.findById(vmId); + return s_vmDao.findById(vmId); } public static long getMemoryOrCpuCapacitybyHost(Long hostId, short capacityType) { @@ -752,7 +743,7 @@ public class ApiDBUtils { // so if this Utils class can have some kind of config rather than a static initializer (maybe from // management server instantiation?) then maybe the management server method can be moved entirely // into this utils class. - return _ms.getMemoryOrCpuCapacityByHost(hostId, capacityType); + return s_ms.getMemoryOrCpuCapacityByHost(hostId, capacityType); } public static long getStorageCapacitybyPool(Long poolId, short capacityType) { @@ -760,15 +751,15 @@ public class ApiDBUtils { // so if this Utils class can have some kind of config rather than a static initializer (maybe from // management server instantiation?) then maybe the management server method can be moved entirely // into this utils class. - return _ms.getMemoryOrCpuCapacityByHost(poolId, capacityType); + return s_ms.getMemoryOrCpuCapacityByHost(poolId, capacityType); } public static List getCapacityByClusterPodZone(Long zoneId, Long podId, Long clusterId) { - return _capacityDao.findByClusterPodZone(zoneId, podId, clusterId); + return s_capacityDao.findByClusterPodZone(zoneId, podId, clusterId); } public static List findNonSharedStorageForClusterPodZone(Long zoneId, Long podId, Long clusterId) { - return _capacityDao.findNonSharedStorageForClusterPodZone(zoneId, podId, clusterId); + return s_capacityDao.findNonSharedStorageForClusterPodZone(zoneId, podId, clusterId); } public static List getCapacityByPod() { @@ -777,19 +768,19 @@ public class ApiDBUtils { } public static Long getPodIdForVlan(long vlanDbId) { - return _networkModel.getPodIdForVlan(vlanDbId); + return s_networkModel.getPodIdForVlan(vlanDbId); } public static String getVersion() { - return _ms.getVersion(); + return s_ms.getVersion(); } public static List searchForUserVMs(Criteria c, List permittedAccounts) { - return _userVmMgr.searchForUserVMs(c, _accountDao.findById(Account.ACCOUNT_ID_SYSTEM), null, false, permittedAccounts, false, null, null).first(); + return s_userVmMgr.searchForUserVMs(c, s_accountDao.findById(Account.ACCOUNT_ID_SYSTEM), null, false, permittedAccounts, false, null, null).first(); } public static List searchForStoragePools(Criteria c) { - return _ms.searchForStoragePools(c).first(); + return s_ms.searchForStoragePools(c).first(); } // /////////////////////////////////////////////////////////// @@ -797,52 +788,52 @@ public class ApiDBUtils { // /////////////////////////////////////////////////////////// public static long findCorrectResourceLimit(ResourceType type, long accountId) { - AccountVO account = _accountDao.findById(accountId); + AccountVO account = s_accountDao.findById(accountId); if (account == null) { return -1; } - return _resourceLimitMgr.findCorrectResourceLimitForAccount(account, type); + return s_resourceLimitMgr.findCorrectResourceLimitForAccount(account, type); } public static long findCorrectResourceLimit(Long limit, short accountType, ResourceType type) { - return _resourceLimitMgr.findCorrectResourceLimitForAccount(accountType, limit, type); + return s_resourceLimitMgr.findCorrectResourceLimitForAccount(accountType, limit, type); } public static long getResourceCount(ResourceType type, long accountId) { - AccountVO account = _accountDao.findById(accountId); + AccountVO account = s_accountDao.findById(accountId); if (account == null) { return -1; } - return _resourceLimitMgr.getResourceCount(account, type); + return s_resourceLimitMgr.getResourceCount(account, type); } public static String getSecurityGroupsNamesForVm(long vmId) { - return _securityGroupMgr.getSecurityGroupsNamesForVm(vmId); + return s_securityGroupMgr.getSecurityGroupsNamesForVm(vmId); } public static List getSecurityGroupsForVm(long vmId) { - return _securityGroupMgr.getSecurityGroupsForVm(vmId); + return s_securityGroupMgr.getSecurityGroupsForVm(vmId); } public static String getSnapshotIntervalTypes(long snapshotId) { - SnapshotVO snapshot = _snapshotDao.findById(snapshotId); + SnapshotVO snapshot = s_snapshotDao.findById(snapshotId); return snapshot.getRecurringType().name(); } public static String getStoragePoolTags(long poolId) { - return _storageMgr.getStoragePoolTags(poolId); + return s_storageMgr.getStoragePoolTags(poolId); } public static boolean isLocalStorageActiveOnHost(Long hostId) { - return _storageMgr.isLocalStorageActiveOnHost(hostId); + return s_storageMgr.isLocalStorageActiveOnHost(hostId); } public static InstanceGroupVO findInstanceGroupForVM(long vmId) { - return _userVmMgr.getGroupForVm(vmId); + return s_userVmMgr.getGroupForVm(vmId); } // /////////////////////////////////////////////////////////// @@ -850,27 +841,27 @@ public class ApiDBUtils { // /////////////////////////////////////////////////////////// public static HostStats getHostStatistics(long hostId) { - return _statsCollector.getHostStats(hostId); + return s_statsCollector.getHostStats(hostId); } public static StorageStats getStoragePoolStatistics(long id) { - return _statsCollector.getStoragePoolStats(id); + return s_statsCollector.getStoragePoolStats(id); } public static VmStats getVmStatistics(long hostId) { - return _statsCollector.getVmStats(hostId); + return s_statsCollector.getVmStats(hostId); } public static StorageStats getSecondaryStorageStatistics(long id) { - return _statsCollector.getStorageStats(id); + return s_statsCollector.getStorageStats(id); } public static CapacityVO getStoragePoolUsedStats(Long poolId, Long clusterId, Long podId, Long zoneId) { - return _storageMgr.getStoragePoolUsedStats(poolId, clusterId, podId, zoneId); + return s_storageMgr.getStoragePoolUsedStats(poolId, clusterId, podId, zoneId); } public static CapacityVO getSecondaryStorageUsedStats(Long hostId, Long zoneId) { - return _storageMgr.getSecondaryStorageUsedStats(hostId, zoneId); + return s_storageMgr.getSecondaryStorageUsedStats(hostId, zoneId); } // /////////////////////////////////////////////////////////// @@ -878,23 +869,23 @@ public class ApiDBUtils { // /////////////////////////////////////////////////////////// public static Account findAccountById(Long accountId) { - return _accountDao.findByIdIncludingRemoved(accountId); + return s_accountDao.findByIdIncludingRemoved(accountId); } public static Account findAccountByIdIncludingRemoved(Long accountId) { - return _accountDao.findByIdIncludingRemoved(accountId); + return s_accountDao.findByIdIncludingRemoved(accountId); } public static Account findAccountByNameDomain(String accountName, Long domainId) { - return _accountDao.findActiveAccount(accountName, domainId); + return s_accountDao.findActiveAccount(accountName, domainId); } public static ClusterVO findClusterById(long clusterId) { - return _clusterDao.findById(clusterId); + return s_clusterDao.findById(clusterId); } public static String findClusterDetails(long clusterId, String name) { - ClusterDetailsVO detailsVO = _clusterDetailsDao.findDetail(clusterId, name); + ClusterDetailsVO detailsVO = s_clusterDetailsDao.findDetail(clusterId, name); if (detailsVO != null) { return detailsVO.getValue(); } @@ -903,73 +894,73 @@ public class ApiDBUtils { } public static DiskOfferingVO findDiskOfferingById(Long diskOfferingId) { - return _diskOfferingDao.findByIdIncludingRemoved(diskOfferingId); + return s_diskOfferingDao.findByIdIncludingRemoved(diskOfferingId); } public static DomainVO findDomainById(Long domainId) { - return _domainDao.findByIdIncludingRemoved(domainId); + return s_domainDao.findByIdIncludingRemoved(domainId); } public static DomainVO findDomainByIdIncludingRemoved(Long domainId) { - return _domainDao.findByIdIncludingRemoved(domainId); + return s_domainDao.findByIdIncludingRemoved(domainId); } public static boolean isChildDomain(long parentId, long childId) { - return _domainDao.isChildDomain(parentId, childId); + return s_domainDao.isChildDomain(parentId, childId); } public static DomainRouterVO findDomainRouterById(Long routerId) { - return _domainRouterDao.findByIdIncludingRemoved(routerId); + return s_domainRouterDao.findByIdIncludingRemoved(routerId); } public static GuestOS findGuestOSById(Long id) { - return _guestOSDao.findByIdIncludingRemoved(id); + return s_guestOSDao.findByIdIncludingRemoved(id); } public static GuestOS findGuestOSByDisplayName(String displayName) { - return _guestOSDao.listByDisplayName(displayName); + return s_guestOSDao.listByDisplayName(displayName); } public static HostVO findHostById(Long hostId) { - return _hostDao.findByIdIncludingRemoved(hostId); + return s_hostDao.findByIdIncludingRemoved(hostId); } public static IPAddressVO findIpAddressById(long addressId) { - return _ipAddressDao.findById(addressId); + return s_ipAddressDao.findById(addressId); } public static GuestOSCategoryVO getHostGuestOSCategory(long hostId) { - Long guestOSCategoryID = _resourceMgr.getGuestOSCategoryId(hostId); + Long guestOSCategoryID = s_resourceMgr.getGuestOSCategoryId(hostId); if (guestOSCategoryID != null) { - return _guestOSCategoryDao.findById(guestOSCategoryID); + return s_guestOSCategoryDao.findById(guestOSCategoryID); } else { return null; } } public static String getHostTags(long hostId) { - return _resourceMgr.getHostTags(hostId); + return s_resourceMgr.getHostTags(hostId); } public static LoadBalancerVO findLoadBalancerById(Long loadBalancerId) { - return _loadBalancerDao.findById(loadBalancerId); + return s_loadBalancerDao.findById(loadBalancerId); } public static NetworkRuleConfigVO findNetworkRuleById(Long ruleId) { - return _networkRuleConfigDao.findById(ruleId); + return s_networkRuleConfigDao.findById(ruleId); } public static SecurityGroup findSecurityGroupById(Long groupId) { - return _securityGroupDao.findById(groupId); + return s_securityGroupDao.findById(groupId); } public static HostPodVO findPodById(Long podId) { - return _podDao.findById(podId); + return s_podDao.findById(podId); } public static VolumeVO findRootVolume(long vmId) { - List volumes = _volumeDao.findByInstanceAndType(vmId, Type.ROOT); + List volumes = s_volumeDao.findByInstanceAndType(vmId, Type.ROOT); if (volumes != null && volumes.size() == 1) { return volumes.get(0); } else { @@ -978,11 +969,11 @@ public class ApiDBUtils { } public static ServiceOffering findServiceOfferingById(Long serviceOfferingId) { - return _serviceOfferingDao.findByIdIncludingRemoved(serviceOfferingId); + return s_serviceOfferingDao.findByIdIncludingRemoved(serviceOfferingId); } public static Snapshot findSnapshotById(long snapshotId) { - SnapshotVO snapshot = _snapshotDao.findById(snapshotId); + SnapshotVO snapshot = s_snapshotDao.findById(snapshotId); if (snapshot != null && snapshot.getRemoved() == null && snapshot.getState() == Snapshot.State.BackedUp) { return snapshot; } else { @@ -991,13 +982,13 @@ public class ApiDBUtils { } public static StoragePoolVO findStoragePoolById(Long storagePoolId) { - return _storagePoolDao.findByIdIncludingRemoved(storagePoolId); + return s_storagePoolDao.findByIdIncludingRemoved(storagePoolId); } public static VMTemplateVO findTemplateById(Long templateId) { - VMTemplateVO template = _templateDao.findByIdIncludingRemoved(templateId); + VMTemplateVO template = s_templateDao.findByIdIncludingRemoved(templateId); if (template != null) { - Map details = _templateDetailsDao.listDetailsKeyPairs(templateId); + Map details = s_templateDetailsDao.listDetailsKeyPairs(templateId); if (details != null && !details.isEmpty()) { template.setDetails(details); } @@ -1006,43 +997,43 @@ public class ApiDBUtils { } public static UploadVO findUploadById(Long id) { - return _uploadDao.findById(id); + return s_uploadDao.findById(id); } public static User findUserById(Long userId) { - return _userDao.findById(userId); + return s_userDao.findById(userId); } public static UserVm findUserVmById(Long vmId) { - return _userVmDao.findById(vmId); + return s_userVmDao.findById(vmId); } public static VlanVO findVlanById(long vlanDbId) { - return _vlanDao.findById(vlanDbId); + return s_vlanDao.findById(vlanDbId); } public static VolumeVO findVolumeById(Long volumeId) { - return _volumeDao.findByIdIncludingRemoved(volumeId); + return s_volumeDao.findByIdIncludingRemoved(volumeId); } public static Site2SiteVpnGatewayVO findVpnGatewayById(Long vpnGatewayId) { - return _site2SiteVpnGatewayDao.findById(vpnGatewayId); + return s_site2SiteVpnGatewayDao.findById(vpnGatewayId); } public static Site2SiteCustomerGatewayVO findCustomerGatewayById(Long customerGatewayId) { - return _site2SiteCustomerGatewayDao.findById(customerGatewayId); + return s_site2SiteCustomerGatewayDao.findById(customerGatewayId); } public static List listUsersByAccount(long accountId) { - return _userDao.listByAccount(accountId); + return s_userDao.listByAccount(accountId); } public static DataCenterVO findZoneById(Long zoneId) { - return _zoneDao.findById(zoneId); + return s_zoneDao.findById(zoneId); } public static Long getAccountIdForVlan(long vlanDbId) { - List accountVlanMaps = _accountVlanMapDao.listAccountVlanMapsByVlan(vlanDbId); + List accountVlanMaps = s_accountVlanMapDao.listAccountVlanMapsByVlan(vlanDbId); if (accountVlanMaps.isEmpty()) { return null; } else { @@ -1051,7 +1042,7 @@ public class ApiDBUtils { } public static Long getAccountIdForGuestVlan(long vlanDbId) { - List accountGuestVlanMaps = _accountGuestVlanMapDao.listAccountGuestVlanMapsByVlan(vlanDbId); + List accountGuestVlanMaps = s_accountGuestVlanMapDao.listAccountGuestVlanMapsByVlan(vlanDbId); if (accountGuestVlanMaps.isEmpty()) { return null; } else { @@ -1060,73 +1051,73 @@ public class ApiDBUtils { } public static HypervisorType getVolumeHyperType(long volumeId) { - return _volumeDao.getHypervisorType(volumeId); + return s_volumeDao.getHypervisorType(volumeId); } public static HypervisorType getHypervisorTypeFromFormat(ImageFormat format) { - return _storageMgr.getHypervisorTypeFromFormat(format); + return s_storageMgr.getHypervisorTypeFromFormat(format); } public static List listUserStatsBy(Long accountId) { - return _userStatsDao.listBy(accountId); + return s_userStatsDao.listBy(accountId); } public static List listUserVMsByHostId(long hostId) { - return _userVmDao.listByHostId(hostId); + return s_userVmDao.listByHostId(hostId); } public static List listZones() { - return _zoneDao.listAll(); + return s_zoneDao.listAll(); } public static boolean volumeIsOnSharedStorage(long volumeId) { // Check that the volume is valid - VolumeVO volume = _volumeDao.findById(volumeId); + VolumeVO volume = s_volumeDao.findById(volumeId); if (volume == null) { throw new InvalidParameterValueException("Please specify a valid volume ID."); } - return _volumeMgr.volumeOnSharedStoragePool(volume); + return s_volumeMgr.volumeOnSharedStoragePool(volume); } public static List getNics(VirtualMachine vm) { - return _networkMgr.getNicProfiles(vm); + return s_networkMgr.getNicProfiles(vm); } public static NetworkProfile getNetworkProfile(long networkId) { - return _networkMgr.convertNetworkToNetworkProfile(networkId); + return s_networkMgr.convertNetworkToNetworkProfile(networkId); } public static NetworkOfferingVO findNetworkOfferingById(long networkOfferingId) { - return _networkOfferingDao.findByIdIncludingRemoved(networkOfferingId); + return s_networkOfferingDao.findByIdIncludingRemoved(networkOfferingId); } public static List listVlanByNetworkId(long networkId) { - return _vlanDao.listVlansByNetworkId(networkId); + return s_vlanDao.listVlansByNetworkId(networkId); } public static PhysicalNetworkVO findPhysicalNetworkById(long id) { - return _physicalNetworkDao.findById(id); + return s_physicalNetworkDao.findById(id); } public static PhysicalNetworkTrafficTypeVO findPhysicalNetworkTrafficTypeById(long id) { - return _physicalNetworkTrafficTypeDao.findById(id); + return s_physicalNetworkTrafficTypeDao.findById(id); } public static NetworkVO findNetworkById(long id) { - return _networkDao.findById(id); + return s_networkDao.findById(id); } public static Map> getNetworkCapabilities(long networkId, long zoneId) { - return _networkModel.getNetworkCapabilities(networkId); + return s_networkModel.getNetworkCapabilities(networkId); } public static long getPublicNetworkIdByZone(long zoneId) { - return _networkModel.getSystemNetworkByZoneAndTrafficType(zoneId, TrafficType.Public).getId(); + return s_networkModel.getSystemNetworkByZoneAndTrafficType(zoneId, TrafficType.Public).getId(); } public static Long getVlanNetworkId(long vlanId) { - VlanVO vlan = _vlanDao.findById(vlanId); + VlanVO vlan = s_vlanDao.findById(vlanId); if (vlan != null) { return vlan.getNetworkId(); } else { @@ -1135,15 +1126,15 @@ public class ApiDBUtils { } public static Integer getNetworkRate(long networkOfferingId) { - return _configMgr.getNetworkOfferingNetworkRate(networkOfferingId, null); + return s_configMgr.getNetworkOfferingNetworkRate(networkOfferingId, null); } public static Account getVlanAccount(long vlanId) { - return _configSvc.getVlanAccount(vlanId); + return s_configSvc.getVlanAccount(vlanId); } public static boolean isSecurityGroupEnabledInZone(long zoneId) { - DataCenterVO dc = _zoneDao.findById(zoneId); + DataCenterVO dc = s_zoneDao.findById(zoneId); if (dc == null) { return false; } else { @@ -1152,138 +1143,138 @@ public class ApiDBUtils { } public static Long getDedicatedNetworkDomain(long networkId) { - return _networkModel.getDedicatedNetworkDomain(networkId); + return s_networkModel.getDedicatedNetworkDomain(networkId); } public static float getCpuOverprovisioningFactor() { - String opFactor = _configDao.getValue(CapacityManager.CpuOverprovisioningFactorCK); + String opFactor = s_configDao.getValue(CapacityManager.CpuOverprovisioningFactorCK); float cpuOverprovisioningFactor = NumbersUtil.parseFloat(opFactor, 1); return cpuOverprovisioningFactor; } public static boolean isExtractionDisabled() { - String disableExtractionString = _configDao.getValue(Config.DisableExtraction.toString()); + String disableExtractionString = s_configDao.getValue(Config.DisableExtraction.toString()); boolean disableExtraction = (disableExtractionString == null) ? false : Boolean.parseBoolean(disableExtractionString); return disableExtraction; } public static SecurityGroup getSecurityGroup(String groupName, long ownerId) { - return _securityGroupMgr.getSecurityGroup(groupName, ownerId); + return s_securityGroupMgr.getSecurityGroup(groupName, ownerId); } public static ConsoleProxyVO findConsoleProxy(long id) { - return _consoleProxyDao.findById(id); + return s_consoleProxyDao.findById(id); } public static List findFirewallSourceCidrs(long id) { - return _firewallCidrsDao.getSourceCidrs(id); + return s_firewallCidrsDao.getSourceCidrs(id); } public static Account getProjectOwner(long projectId) { - return _projectMgr.getProjectOwner(projectId); + return s_projectMgr.getProjectOwner(projectId); } public static Project findProjectByProjectAccountId(long projectAccountId) { - return _projectMgr.findByProjectAccountId(projectAccountId); + return s_projectMgr.findByProjectAccountId(projectAccountId); } public static Project findProjectByProjectAccountIdIncludingRemoved(long projectAccountId) { - return _projectMgr.findByProjectAccountIdIncludingRemoved(projectAccountId); + return s_projectMgr.findByProjectAccountIdIncludingRemoved(projectAccountId); } public static Project findProjectById(long projectId) { - return _projectMgr.getProject(projectId); + return s_projectMgr.getProject(projectId); } public static long getProjectOwnwerId(long projectId) { - return _projectMgr.getProjectOwner(projectId).getId(); + return s_projectMgr.getProjectOwner(projectId).getId(); } public static Map getAccountDetails(long accountId) { - Map details = _accountDetailsDao.findDetails(accountId); + Map details = s_accountDetailsDao.findDetails(accountId); return details.isEmpty() ? null : details; } public static Map> listNetworkOfferingServices(long networkOfferingId) { - return _networkModel.getNetworkOfferingServiceProvidersMap(networkOfferingId); + return s_networkModel.getNetworkOfferingServiceProvidersMap(networkOfferingId); } public static List getElementServices(Provider provider) { - return _networkModel.getElementServices(provider); + return s_networkModel.getElementServices(provider); } public static List getProvidersForService(Service service) { - return _networkModel.listSupportedNetworkServiceProviders(service.getName()); + return s_networkModel.listSupportedNetworkServiceProviders(service.getName()); } public static boolean canElementEnableIndividualServices(Provider serviceProvider) { - return _networkModel.canElementEnableIndividualServices(serviceProvider); + return s_networkModel.canElementEnableIndividualServices(serviceProvider); } public static Pair getDomainNetworkDetails(long networkId) { - NetworkDomainVO map = _networkDomainDao.getDomainNetworkMapByNetworkId(networkId); + NetworkDomainVO map = s_networkDomainDao.getDomainNetworkMapByNetworkId(networkId); - boolean subdomainAccess = (map.isSubdomainAccess() != null) ? map.isSubdomainAccess() : _networkModel.getAllowSubdomainAccessGlobal(); + boolean subdomainAccess = (map.isSubdomainAccess() != null) ? map.isSubdomainAccess() : s_networkModel.getAllowSubdomainAccessGlobal(); return new Pair(map.getDomainId(), subdomainAccess); } public static long countFreePublicIps() { - return _ipAddressDao.countFreePublicIPs(); + return s_ipAddressDao.countFreePublicIPs(); } public static long findDefaultRouterServiceOffering() { - ServiceOfferingVO serviceOffering = _serviceOfferingDao.findByName(ServiceOffering.routerDefaultOffUniqueName); + ServiceOfferingVO serviceOffering = s_serviceOfferingDao.findByName(ServiceOffering.routerDefaultOffUniqueName); return serviceOffering.getId(); } public static IpAddress findIpByAssociatedVmId(long vmId) { - return _ipAddressDao.findByAssociatedVmId(vmId); + return s_ipAddressDao.findByAssociatedVmId(vmId); } public static String getHaTag() { - return _haMgr.getHaTag(); + return s_haMgr.getHaTag(); } public static Map> listVpcOffServices(long vpcOffId) { - return _vpcMgr.getVpcOffSvcProvidersMap(vpcOffId); + return s_vpcMgr.getVpcOffSvcProvidersMap(vpcOffId); } public static List listVpcNetworks(long vpcId) { - return _networkModel.listNetworksByVpc(vpcId); + return s_networkModel.listNetworksByVpc(vpcId); } public static boolean canUseForDeploy(Network network) { - return _networkModel.canUseForDeploy(network); + return s_networkModel.canUseForDeploy(network); } public static VMSnapshot getVMSnapshotById(Long vmSnapshotId) { - VMSnapshot vmSnapshot = _vmSnapshotDao.findById(vmSnapshotId); + VMSnapshot vmSnapshot = s_vmSnapshotDao.findById(vmSnapshotId); return vmSnapshot; } public static String getUuid(String resourceId, ResourceObjectType resourceType) { - return _taggedResourceService.getUuid(resourceId, resourceType); + return s_taggedResourceService.getUuid(resourceId, resourceType); } public static List listByResourceTypeAndId(ResourceObjectType type, long resourceId) { - return _taggedResourceService.listByResourceTypeAndId(type, resourceId); + return s_taggedResourceService.listByResourceTypeAndId(type, resourceId); } public static List getAutoScalePolicyConditions(long policyId) { - List vos = _asPolicyConditionMapDao.listByAll(policyId, null); + List vos = s_asPolicyConditionMapDao.listByAll(policyId, null); ArrayList conditions = new ArrayList(vos.size()); for (AutoScalePolicyConditionMapVO vo : vos) { - conditions.add(_asConditionDao.findById(vo.getConditionId())); + conditions.add(s_asConditionDao.findById(vo.getConditionId())); } return conditions; } public static void getAutoScaleVmGroupPolicyIds(long vmGroupId, List scaleUpPolicyIds, List scaleDownPolicyIds) { - List vos = _asVmGroupPolicyMapDao.listByVmGroupId(vmGroupId); + List vos = s_asVmGroupPolicyMapDao.listByVmGroupId(vmGroupId); for (AutoScaleVmGroupPolicyMapVO vo : vos) { - AutoScalePolicy autoScalePolicy = _asPolicyDao.findById(vo.getPolicyId()); + AutoScalePolicy autoScalePolicy = s_asPolicyDao.findById(vo.getPolicyId()); if (autoScalePolicy.getAction().equals("scaleup")) { scaleUpPolicyIds.add(autoScalePolicy.getId()); } else { @@ -1293,7 +1284,7 @@ public class ApiDBUtils { } public static String getKeyPairName(String sshPublicKey) { - SSHKeyPairVO sshKeyPair = _sshKeyPairDao.findByPublicKey(sshPublicKey); + SSHKeyPairVO sshKeyPair = s_sshKeyPairDao.findByPublicKey(sshPublicKey); //key might be removed prior to this point if (sshKeyPair != null) { return sshKeyPair.getName(); @@ -1302,13 +1293,13 @@ public class ApiDBUtils { } public static UserVmDetailVO findPublicKeyByVmId(long vmId) { - return _userVmDetailsDao.findDetail(vmId, "SSH.PublicKey"); + return s_userVmDetailsDao.findDetail(vmId, "SSH.PublicKey"); } public static void getAutoScaleVmGroupPolicies(long vmGroupId, List scaleUpPolicies, List scaleDownPolicies) { - List vos = _asVmGroupPolicyMapDao.listByVmGroupId(vmGroupId); + List vos = s_asVmGroupPolicyMapDao.listByVmGroupId(vmGroupId); for (AutoScaleVmGroupPolicyMapVO vo : vos) { - AutoScalePolicy autoScalePolicy = _asPolicyDao.findById(vo.getPolicyId()); + AutoScalePolicy autoScalePolicy = s_asPolicyDao.findById(vo.getPolicyId()); if (autoScalePolicy.getAction().equals("scaleup")) { scaleUpPolicies.add(autoScalePolicy); } else { @@ -1318,63 +1309,63 @@ public class ApiDBUtils { } public static CounterVO getCounter(long counterId) { - return _counterDao.findById(counterId); + return s_counterDao.findById(counterId); } public static ConditionVO findConditionById(long conditionId) { - return _asConditionDao.findById(conditionId); + return s_asConditionDao.findById(conditionId); } public static PhysicalNetworkServiceProviderVO findPhysicalNetworkServiceProviderById(long providerId) { - return _physicalNetworkServiceProviderDao.findById(providerId); + return s_physicalNetworkServiceProviderDao.findById(providerId); } public static FirewallRuleVO findFirewallRuleById(long ruleId) { - return _firewallRuleDao.findById(ruleId); + return s_firewallRuleDao.findById(ruleId); } public static StaticRouteVO findStaticRouteById(long routeId) { - return _staticRouteDao.findById(routeId); + return s_staticRouteDao.findById(routeId); } public static VpcGatewayVO findVpcGatewayById(long gatewayId) { - return _vpcGatewayDao.findById(gatewayId); + return s_vpcGatewayDao.findById(gatewayId); } public static AutoScalePolicyVO findAutoScalePolicyById(long policyId) { - return _asPolicyDao.findById(policyId); + return s_asPolicyDao.findById(policyId); } public static AutoScaleVmProfileVO findAutoScaleVmProfileById(long profileId) { - return _asVmProfileDao.findById(profileId); + return s_asVmProfileDao.findById(profileId); } public static AutoScaleVmGroupVO findAutoScaleVmGroupById(long groupId) { - return _asVmGroupDao.findById(groupId); + return s_asVmGroupDao.findById(groupId); } public static GuestOSCategoryVO findGuestOsCategoryById(long catId) { - return _guestOSCategoryDao.findById(catId); + return s_guestOSCategoryDao.findById(catId); } public static VpcVO findVpcById(long vpcId) { - return _vpcDao.findById(vpcId); + return s_vpcDao.findById(vpcId); } public static SnapshotPolicy findSnapshotPolicyById(long policyId) { - return _snapshotPolicyDao.findById(policyId); + return s_snapshotPolicyDao.findById(policyId); } public static VpcOffering findVpcOfferingById(long offeringId) { - return _vpcOfferingDao.findById(offeringId); + return s_vpcOfferingDao.findById(offeringId); } public static NetworkACL findByNetworkACLId(long aclId) { - return _networkACLDao.findById(aclId); + return s_networkACLDao.findById(aclId); } public static AsyncJob findAsyncJobById(long jobId) { - return _asyncJobDao.findById(jobId); + return s_asyncJobDao.findById(jobId); } public static String findJobInstanceUuid(AsyncJob job) { @@ -1503,55 +1494,55 @@ public class ApiDBUtils { /////////////////////////////////////////////////////////////////////// public static DomainRouterResponse newDomainRouterResponse(DomainRouterJoinVO vr, Account caller) { - return _domainRouterJoinDao.newDomainRouterResponse(vr, caller); + return s_domainRouterJoinDao.newDomainRouterResponse(vr, caller); } public static DomainRouterResponse fillRouterDetails(DomainRouterResponse vrData, DomainRouterJoinVO vr) { - return _domainRouterJoinDao.setDomainRouterResponse(vrData, vr); + return s_domainRouterJoinDao.setDomainRouterResponse(vrData, vr); } public static List newDomainRouterView(VirtualRouter vr) { - return _domainRouterJoinDao.newDomainRouterView(vr); + return s_domainRouterJoinDao.newDomainRouterView(vr); } public static UserVmResponse newUserVmResponse(String objectName, UserVmJoinVO userVm, EnumSet details, Account caller) { - return _userVmJoinDao.newUserVmResponse(objectName, userVm, details, caller); + return s_userVmJoinDao.newUserVmResponse(objectName, userVm, details, caller); } public static UserVmResponse fillVmDetails(UserVmResponse vmData, UserVmJoinVO vm) { - return _userVmJoinDao.setUserVmResponse(vmData, vm); + return s_userVmJoinDao.setUserVmResponse(vmData, vm); } public static List newUserVmView(UserVm... userVms) { - return _userVmJoinDao.newUserVmView(userVms); + return s_userVmJoinDao.newUserVmView(userVms); } public static SecurityGroupResponse newSecurityGroupResponse(SecurityGroupJoinVO vsg, Account caller) { - return _securityGroupJoinDao.newSecurityGroupResponse(vsg, caller); + return s_securityGroupJoinDao.newSecurityGroupResponse(vsg, caller); } public static SecurityGroupResponse fillSecurityGroupDetails(SecurityGroupResponse vsgData, SecurityGroupJoinVO sg) { - return _securityGroupJoinDao.setSecurityGroupResponse(vsgData, sg); + return s_securityGroupJoinDao.setSecurityGroupResponse(vsgData, sg); } public static List newSecurityGroupView(SecurityGroup sg) { - return _securityGroupJoinDao.newSecurityGroupView(sg); + return s_securityGroupJoinDao.newSecurityGroupView(sg); } public static List findSecurityGroupViewById(Long sgId) { - return _securityGroupJoinDao.searchByIds(sgId); + return s_securityGroupJoinDao.searchByIds(sgId); } public static ResourceTagResponse newResourceTagResponse(ResourceTagJoinVO vsg, boolean keyValueOnly) { - return _tagJoinDao.newResourceTagResponse(vsg, keyValueOnly); + return s_tagJoinDao.newResourceTagResponse(vsg, keyValueOnly); } public static ResourceTagJoinVO newResourceTagView(ResourceTag sg) { - return _tagJoinDao.newResourceTagView(sg); + return s_tagJoinDao.newResourceTagView(sg); } public static ResourceTagJoinVO findResourceTagViewById(Long tagId) { - List tags = _tagJoinDao.searchByIds(tagId); + List tags = s_tagJoinDao.searchByIds(tagId); if (tags != null && tags.size() > 0) { return tags.get(0); } else { @@ -1560,19 +1551,19 @@ public class ApiDBUtils { } public static EventResponse newEventResponse(EventJoinVO ve) { - return _eventJoinDao.newEventResponse(ve); + return s_eventJoinDao.newEventResponse(ve); } public static EventJoinVO newEventView(Event e) { - return _eventJoinDao.newEventView(e); + return s_eventJoinDao.newEventView(e); } public static InstanceGroupResponse newInstanceGroupResponse(InstanceGroupJoinVO ve) { - return _vmGroupJoinDao.newInstanceGroupResponse(ve); + return s_vmGroupJoinDao.newInstanceGroupResponse(ve); } public static InstanceGroupJoinVO newInstanceGroupView(InstanceGroup e) { - return _vmGroupJoinDao.newInstanceGroupView(e); + return s_vmGroupJoinDao.newInstanceGroupView(e); } public static UserResponse newUserResponse(UserAccountJoinVO usr) { @@ -1580,7 +1571,7 @@ public class ApiDBUtils { } public static UserResponse newUserResponse(UserAccountJoinVO usr, Long domainId) { - UserResponse response = _userAccountJoinDao.newUserResponse(usr); + UserResponse response = s_userAccountJoinDao.newUserResponse(usr); if (domainId != null && usr.getDomainId() != domainId) response.setIsCallerChildDomain(true); else @@ -1589,221 +1580,221 @@ public class ApiDBUtils { } public static UserAccountJoinVO newUserView(User usr) { - return _userAccountJoinDao.newUserView(usr); + return s_userAccountJoinDao.newUserView(usr); } public static UserAccountJoinVO newUserView(UserAccount usr) { - return _userAccountJoinDao.newUserView(usr); + return s_userAccountJoinDao.newUserView(usr); } public static ProjectResponse newProjectResponse(ProjectJoinVO proj) { - return _projectJoinDao.newProjectResponse(proj); + return s_projectJoinDao.newProjectResponse(proj); } public static ProjectResponse fillProjectDetails(ProjectResponse rsp, ProjectJoinVO proj) { - return _projectJoinDao.setProjectResponse(rsp, proj); + return s_projectJoinDao.setProjectResponse(rsp, proj); } public static List newProjectView(Project proj) { - return _projectJoinDao.newProjectView(proj); + return s_projectJoinDao.newProjectView(proj); } public static List findUserViewByAccountId(Long accountId) { - return _userAccountJoinDao.searchByAccountId(accountId); + return s_userAccountJoinDao.searchByAccountId(accountId); } public static ProjectAccountResponse newProjectAccountResponse(ProjectAccountJoinVO proj) { - return _projectAccountJoinDao.newProjectAccountResponse(proj); + return s_projectAccountJoinDao.newProjectAccountResponse(proj); } public static ProjectAccountJoinVO newProjectAccountView(ProjectAccount proj) { - return _projectAccountJoinDao.newProjectAccountView(proj); + return s_projectAccountJoinDao.newProjectAccountView(proj); } public static ProjectInvitationResponse newProjectInvitationResponse(ProjectInvitationJoinVO proj) { - return _projectInvitationJoinDao.newProjectInvitationResponse(proj); + return s_projectInvitationJoinDao.newProjectInvitationResponse(proj); } public static ProjectInvitationJoinVO newProjectInvitationView(ProjectInvitation proj) { - return _projectInvitationJoinDao.newProjectInvitationView(proj); + return s_projectInvitationJoinDao.newProjectInvitationView(proj); } public static HostResponse newHostResponse(HostJoinVO vr, EnumSet details) { - return _hostJoinDao.newHostResponse(vr, details); + return s_hostJoinDao.newHostResponse(vr, details); } public static HostResponse fillHostDetails(HostResponse vrData, HostJoinVO vr) { - return _hostJoinDao.setHostResponse(vrData, vr); + return s_hostJoinDao.setHostResponse(vrData, vr); } public static HostForMigrationResponse newHostForMigrationResponse(HostJoinVO vr, EnumSet details) { - return _hostJoinDao.newHostForMigrationResponse(vr, details); + return s_hostJoinDao.newHostForMigrationResponse(vr, details); } public static HostForMigrationResponse fillHostForMigrationDetails(HostForMigrationResponse vrData, HostJoinVO vr) { - return _hostJoinDao.setHostForMigrationResponse(vrData, vr); + return s_hostJoinDao.setHostForMigrationResponse(vrData, vr); } public static List newHostView(Host vr) { - return _hostJoinDao.newHostView(vr); + return s_hostJoinDao.newHostView(vr); } public static VolumeResponse newVolumeResponse(VolumeJoinVO vr) { - return _volJoinDao.newVolumeResponse(vr); + return s_volJoinDao.newVolumeResponse(vr); } public static VolumeResponse fillVolumeDetails(VolumeResponse vrData, VolumeJoinVO vr) { - return _volJoinDao.setVolumeResponse(vrData, vr); + return s_volJoinDao.setVolumeResponse(vrData, vr); } public static List newVolumeView(Volume vr) { - return _volJoinDao.newVolumeView(vr); + return s_volJoinDao.newVolumeView(vr); } public static StoragePoolResponse newStoragePoolResponse(StoragePoolJoinVO vr) { - return _poolJoinDao.newStoragePoolResponse(vr); + return s_poolJoinDao.newStoragePoolResponse(vr); } public static StoragePoolResponse fillStoragePoolDetails(StoragePoolResponse vrData, StoragePoolJoinVO vr) { - return _poolJoinDao.setStoragePoolResponse(vrData, vr); + return s_poolJoinDao.setStoragePoolResponse(vrData, vr); } public static StoragePoolResponse newStoragePoolForMigrationResponse(StoragePoolJoinVO vr) { - return _poolJoinDao.newStoragePoolForMigrationResponse(vr); + return s_poolJoinDao.newStoragePoolForMigrationResponse(vr); } public static StoragePoolResponse fillStoragePoolForMigrationDetails(StoragePoolResponse vrData, StoragePoolJoinVO vr) { - return _poolJoinDao.setStoragePoolForMigrationResponse(vrData, vr); + return s_poolJoinDao.setStoragePoolForMigrationResponse(vrData, vr); } public static List newStoragePoolView(StoragePool vr) { - return _poolJoinDao.newStoragePoolView(vr); + return s_poolJoinDao.newStoragePoolView(vr); } public static ImageStoreResponse newImageStoreResponse(ImageStoreJoinVO vr) { - return _imageStoreJoinDao.newImageStoreResponse(vr); + return s_imageStoreJoinDao.newImageStoreResponse(vr); } public static ImageStoreResponse fillImageStoreDetails(ImageStoreResponse vrData, ImageStoreJoinVO vr) { - return _imageStoreJoinDao.setImageStoreResponse(vrData, vr); + return s_imageStoreJoinDao.setImageStoreResponse(vrData, vr); } public static List newImageStoreView(ImageStore vr) { - return _imageStoreJoinDao.newImageStoreView(vr); + return s_imageStoreJoinDao.newImageStoreView(vr); } public static AccountResponse newAccountResponse(AccountJoinVO ve) { - return _accountJoinDao.newAccountResponse(ve); + return s_accountJoinDao.newAccountResponse(ve); } public static AccountJoinVO newAccountView(Account e) { - return _accountJoinDao.newAccountView(e); + return s_accountJoinDao.newAccountView(e); } public static AccountJoinVO findAccountViewById(Long accountId) { - return _accountJoinDao.findByIdIncludingRemoved(accountId); + return s_accountJoinDao.findByIdIncludingRemoved(accountId); } public static AsyncJobResponse newAsyncJobResponse(AsyncJobJoinVO ve) { - return _jobJoinDao.newAsyncJobResponse(ve); + return s_jobJoinDao.newAsyncJobResponse(ve); } public static AsyncJobJoinVO newAsyncJobView(AsyncJob e) { - return _jobJoinDao.newAsyncJobView(e); + return s_jobJoinDao.newAsyncJobView(e); } public static DiskOfferingResponse newDiskOfferingResponse(DiskOfferingJoinVO offering) { - return _diskOfferingJoinDao.newDiskOfferingResponse(offering); + return s_diskOfferingJoinDao.newDiskOfferingResponse(offering); } public static DiskOfferingJoinVO newDiskOfferingView(DiskOffering offering) { - return _diskOfferingJoinDao.newDiskOfferingView(offering); + return s_diskOfferingJoinDao.newDiskOfferingView(offering); } public static ServiceOfferingResponse newServiceOfferingResponse(ServiceOfferingJoinVO offering) { - return _serviceOfferingJoinDao.newServiceOfferingResponse(offering); + return s_serviceOfferingJoinDao.newServiceOfferingResponse(offering); } public static ServiceOfferingJoinVO newServiceOfferingView(ServiceOffering offering) { - return _serviceOfferingJoinDao.newServiceOfferingView(offering); + return s_serviceOfferingJoinDao.newServiceOfferingView(offering); } public static ZoneResponse newDataCenterResponse(DataCenterJoinVO dc, Boolean showCapacities) { - return _dcJoinDao.newDataCenterResponse(dc, showCapacities); + return s_dcJoinDao.newDataCenterResponse(dc, showCapacities); } public static DataCenterJoinVO newDataCenterView(DataCenter dc) { - return _dcJoinDao.newDataCenterView(dc); + return s_dcJoinDao.newDataCenterView(dc); } public static Map findHostDetailsById(long hostId) { - return _hostDetailsDao.findDetails(hostId); + return s_hostDetailsDao.findDetails(hostId); } public static List findNicSecondaryIps(long nicId) { - return _nicSecondaryIpDao.listByNicId(nicId); + return s_nicSecondaryIpDao.listByNicId(nicId); } public static TemplateResponse newTemplateUpdateResponse(TemplateJoinVO vr) { - return _templateJoinDao.newUpdateResponse(vr); + return s_templateJoinDao.newUpdateResponse(vr); } public static TemplateResponse newTemplateResponse(TemplateJoinVO vr) { - return _templateJoinDao.newTemplateResponse(vr); + return s_templateJoinDao.newTemplateResponse(vr); } public static TemplateResponse newIsoResponse(TemplateJoinVO vr) { - return _templateJoinDao.newIsoResponse(vr); + return s_templateJoinDao.newIsoResponse(vr); } public static TemplateResponse fillTemplateDetails(TemplateResponse vrData, TemplateJoinVO vr) { - return _templateJoinDao.setTemplateResponse(vrData, vr); + return s_templateJoinDao.setTemplateResponse(vrData, vr); } public static List newTemplateView(VirtualMachineTemplate vr) { - return _templateJoinDao.newTemplateView(vr); + return s_templateJoinDao.newTemplateView(vr); } public static List newTemplateView(VirtualMachineTemplate vr, long zoneId, boolean readyOnly) { - return _templateJoinDao.newTemplateView(vr, zoneId, readyOnly); + return s_templateJoinDao.newTemplateView(vr, zoneId, readyOnly); } public static AffinityGroup getAffinityGroup(String groupName, long accountId) { - return _affinityGroupDao.findByAccountAndName(accountId, groupName); + return s_affinityGroupDao.findByAccountAndName(accountId, groupName); } public static AffinityGroupResponse newAffinityGroupResponse(AffinityGroupJoinVO group) { - return _affinityGroupJoinDao.newAffinityGroupResponse(group); + return s_affinityGroupJoinDao.newAffinityGroupResponse(group); } public static AffinityGroupResponse fillAffinityGroupDetails(AffinityGroupResponse resp, AffinityGroupJoinVO group) { - return _affinityGroupJoinDao.setAffinityGroupResponse(resp, group); + return s_affinityGroupJoinDao.setAffinityGroupResponse(resp, group); } public static List listSiteLoadBalancers(long gslbRuleId) { - return _gslbService.listSiteLoadBalancers(gslbRuleId); + return s_gslbService.listSiteLoadBalancers(gslbRuleId); } public static String getDnsNameConfiguredForGslb() { - String providerDnsName = _configDao.getValue(Config.CloudDnsName.key()); + String providerDnsName = s_configDao.getValue(Config.CloudDnsName.key()); return providerDnsName; } public static Map getResourceDetails(long resourceId, ResourceObjectType resourceType) { Map details = null; if (isAdmin(CallContext.current().getCallingAccount())) { - details = _resourceDetailsService.getDetailsMap(resourceId, resourceType, null); + details = s_resourceDetailsService.getDetailsMap(resourceId, resourceType, null); } else { - details = _resourceDetailsService.getDetailsMap(resourceId, resourceType, true); + details = s_resourceDetailsService.getDetailsMap(resourceId, resourceType, true); } return details.isEmpty() ? null : details; } public static boolean isAdmin(Account account) { - return _accountService.isAdmin(account.getType()); + return s_accountService.isAdmin(account.getType()); } public static List listResourceTagViewByResourceUUID(String resourceUUID, ResourceObjectType resourceType) { - return _tagJoinDao.listBy(resourceUUID, resourceType); + return s_tagJoinDao.listBy(resourceUUID, resourceType); } } diff --git a/server/src/com/cloud/api/ApiDispatcher.java b/server/src/com/cloud/api/ApiDispatcher.java index 225cbdc43b6..9f4f766fc45 100755 --- a/server/src/com/cloud/api/ApiDispatcher.java +++ b/server/src/com/cloud/api/ApiDispatcher.java @@ -173,7 +173,7 @@ public class ApiDispatcher { pageSize = Long.valueOf((String)pageSizeObj); } - if ((unpackedParams.get(ApiConstants.PAGE) == null) && (pageSize != null && !pageSize.equals(BaseListCmd.PAGESIZE_UNLIMITED))) { + if ((unpackedParams.get(ApiConstants.PAGE) == null) && (pageSize != null && !pageSize.equals(BaseListCmd.s_pageSizeUnlimited))) { ServerApiException ex = new ServerApiException(ApiErrorCode.PARAM_ERROR, "\"page\" parameter is required when \"pagesize\" is specified"); ex.setCSErrorCode(CSExceptionErrorCode.getCSErrCode(ex.getClass().getName())); throw ex; diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index 6a99fa630e7..a5eaf232155 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -1015,7 +1015,7 @@ public class ApiResponseHelper implements ResponseGenerator { response.setPublicEndPort(Integer.toString(fwRule.getSourcePortEnd())); List cidrs = ApiDBUtils.findFirewallSourceCidrs(fwRule.getId()); response.setCidrList(StringUtils.join(cidrs, ",")); - + Network guestNtwk = ApiDBUtils.findNetworkById(fwRule.getNetworkId()); response.setNetworkId(guestNtwk.getUuid()); @@ -2380,10 +2380,10 @@ public class ApiResponseHelper implements ResponseGenerator { response.setPublicIpAddressId(ip.getUuid()); response.setPublicIpAddress(ip.getAddress().addr()); } - + Network network = ApiDBUtils.findNetworkById(fwRule.getNetworkId()); response.setNetworkId(network.getUuid()); - + FirewallRule.State state = fwRule.getState(); String stateToSet = state.toString(); if (state.equals(FirewallRule.State.Revoke)) { @@ -2728,21 +2728,21 @@ public class ApiResponseHelper implements ResponseGenerator { return response; } - @Override - public OvsProviderResponse createOvsProviderResponse(OvsProvider result) { + @Override + public OvsProviderResponse createOvsProviderResponse(OvsProvider result) { - OvsProviderResponse response = new OvsProviderResponse(); - response.setId(result.getUuid()); - PhysicalNetworkServiceProvider nsp = ApiDBUtils - .findPhysicalNetworkServiceProviderById(result.getNspId()); - if (nsp != null) { - response.setNspId(nsp.getUuid()); - } - response.setEnabled(result.isEnabled()); + OvsProviderResponse response = new OvsProviderResponse(); + response.setId(result.getUuid()); + PhysicalNetworkServiceProvider nsp = ApiDBUtils + .findPhysicalNetworkServiceProviderById(result.getNspId()); + if (nsp != null) { + response.setNspId(nsp.getUuid()); + } + response.setEnabled(result.isEnabled()); - response.setObjectName("ovselement"); - return response; - } + response.setObjectName("ovselement"); + return response; + } @Override public LBStickinessResponse createLBStickinessPolicyResponse(StickinessPolicy stickinessPolicy, LoadBalancer lb) { @@ -3013,7 +3013,7 @@ public class ApiResponseHelper implements ResponseGenerator { response.setState(result.getState().toString()); response.setSourceNat(result.getSourceNat()); - NetworkACL acl = ApiDBUtils.findByNetworkACLId(result.getNetworkACLId()); + NetworkACL acl = ApiDBUtils.findByNetworkACLId(result.getNetworkACLId()); if (acl != null) { response.setAclId(acl.getUuid()); } @@ -3736,7 +3736,7 @@ public class ApiResponseHelper implements ResponseGenerator { public PortableIpResponse createPortableIPResponse(PortableIp portableIp) { PortableIpResponse response = new PortableIpResponse(); response.setAddress(portableIp.getAddress()); - Long accountId = portableIp.getAllocatedInDomainId(); + Long accountId = portableIp.getAllocatedInDomainId(); if (accountId != null) { Account account = ApiDBUtils.findAccountById(accountId); response.setAllocatedToAccountId(account.getAccountName()); diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java index a75218026ee..03361a4a999 100755 --- a/server/src/com/cloud/api/ApiServer.java +++ b/server/src/com/cloud/api/ApiServer.java @@ -181,11 +181,11 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer @Inject protected ApiAsyncJobDispatcher _asyncDispatcher; - private static int _workerCount = 0; - private static final DateFormat _dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); - private static Map> _apiNameCmdClassMap = new HashMap>(); + private static int s_workerCount = 0; + private static final DateFormat DateFormatToUse = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); + private static Map> s_apiNameCmdClassMap = new HashMap>(); - private static ExecutorService _executor = new ThreadPoolExecutor(10, 150, 60, TimeUnit.SECONDS, new LinkedBlockingQueue(), new NamedThreadFactory( + private static ExecutorService s_executor = new ThreadPoolExecutor(10, 150, 60, TimeUnit.SECONDS, new LinkedBlockingQueue(), new NamedThreadFactory( "ApiServer")); public ApiServer() { @@ -234,11 +234,11 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer throw new CloudRuntimeException(String.format("%s is claimed as a API command, but it doesn't have @APICommand annotation", cmdClass.getName())); } String apiName = at.name(); - if (_apiNameCmdClassMap.containsKey(apiName)) { + if (s_apiNameCmdClassMap.containsKey(apiName)) { s_logger.error("API Cmd class " + cmdClass.getName() + " has non-unique apiname" + apiName); continue; } - _apiNameCmdClassMap.put(apiName, cmdClass); + s_apiNameCmdClassMap.put(apiName, cmdClass); } encodeApiResponse = Boolean.valueOf(_configDao.getValue(Config.EncodeApiResponse.key())); @@ -630,7 +630,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer return true; } else { // check against every available command to see if the command exists or not - if (!_apiNameCmdClassMap.containsKey(commandName) && !commandName.equals("login") && !commandName.equals("logout")) { + if (!s_apiNameCmdClassMap.containsKey(commandName) && !commandName.equals("login") && !commandName.equals("logout")) { s_logger.debug("The given command:" + commandName + " does not exist or it is not available for user with id:" + userId); throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, "The given command does not exist or it is not available for user"); } @@ -686,9 +686,9 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer s_logger.debug("Missing Expires parameter -- ignoring request. Signature: " + signature + ", apiKey: " + apiKey); return false; } - synchronized (_dateFormat) { + synchronized (DateFormatToUse) { try { - expiresTS = _dateFormat.parse(expires); + expiresTS = DateFormatToUse.parse(expires); } catch (ParseException pe) { s_logger.debug("Incorrect date format for Expires parameter", pe); return false; @@ -872,7 +872,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer } private Class getCmdClass(String cmdName) { - return _apiNameCmdClassMap.get(cmdName); + return s_apiNameCmdClassMap.get(cmdName); } // FIXME: rather than isError, we might was to pass in the status code to give more flexibility @@ -957,7 +957,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer conn.bind(socket, _params); // Execute a new worker task to handle the request - _executor.execute(new WorkerTask(_httpService, conn, _workerCount++)); + s_executor.execute(new WorkerTask(_httpService, conn, s_workerCount++)); } catch (InterruptedIOException ex) { break; } catch (IOException e) { @@ -1094,8 +1094,8 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer } @Inject - public void setPluggableServices(List _pluggableServices) { - this._pluggableServices = _pluggableServices; + public void setPluggableServices(List pluggableServices) { + this._pluggableServices = pluggableServices; } public List getApiAccessCheckers() { @@ -1103,7 +1103,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer } @Inject - public void setApiAccessCheckers(List _apiAccessCheckers) { - this._apiAccessCheckers = _apiAccessCheckers; + public void setApiAccessCheckers(List apiAccessCheckers) { + this._apiAccessCheckers = apiAccessCheckers; } } diff --git a/server/src/com/cloud/api/doc/ApiXmlDocWriter.java b/server/src/com/cloud/api/doc/ApiXmlDocWriter.java index d3a8ade7176..c19f7af8c35 100644 --- a/server/src/com/cloud/api/doc/ApiXmlDocWriter.java +++ b/server/src/com/cloud/api/doc/ApiXmlDocWriter.java @@ -41,6 +41,11 @@ import java.util.TreeMap; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; +import org.apache.log4j.Logger; + +import com.google.gson.annotations.SerializedName; +import com.thoughtworks.xstream.XStream; + import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.BaseAsyncCmd; import org.apache.cloudstack.api.BaseAsyncCreateCmd; @@ -56,29 +61,26 @@ import org.apache.cloudstack.api.response.StoragePoolResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.api.response.VolumeResponse; -import org.apache.log4j.Logger; import com.cloud.alert.AlertManager; import com.cloud.serializer.Param; import com.cloud.utils.IteratorUtil; import com.cloud.utils.ReflectUtil; -import com.google.gson.annotations.SerializedName; -import com.thoughtworks.xstream.XStream; public class ApiXmlDocWriter { public static final Logger s_logger = Logger.getLogger(ApiXmlDocWriter.class.getName()); private static final short DOMAIN_ADMIN_COMMAND = 4; private static final short USER_COMMAND = 8; - private static Map> _apiNameCmdClassMap = new HashMap>(); - private static LinkedHashMap all_api_commands = new LinkedHashMap(); - private static LinkedHashMap domain_admin_api_commands = new LinkedHashMap(); - private static LinkedHashMap regular_user_api_commands = new LinkedHashMap(); - private static TreeMap all_api_commands_sorted = new TreeMap(); - private static TreeMap domain_admin_api_commands_sorted = new TreeMap(); - private static TreeMap regular_user_api_commands_sorted = new TreeMap(); - private static String dirName = ""; - private static final List _asyncResponses = setAsyncResponses(); + private static Map> s_apiNameCmdClassMap = new HashMap>(); + private static LinkedHashMap s_allApiCommands = new LinkedHashMap(); + private static LinkedHashMap s_domainAdminApiCommands = new LinkedHashMap(); + private static LinkedHashMap s_regularUserApiCommands = new LinkedHashMap(); + private static TreeMap s_allApiCommandsSorted = new TreeMap(); + private static TreeMap s_domainAdminApiCommandsSorted = new TreeMap(); + private static TreeMap s_regularUserApiCommandsSorted = new TreeMap(); + private static String s_dirName = ""; + private static final List AsyncResponses = setAsyncResponses(); private static List setAsyncResponses() { List asyncResponses = new ArrayList(); @@ -102,11 +104,11 @@ public class ApiXmlDocWriter { for (Class cmdClass : cmdClasses) { String apiName = cmdClass.getAnnotation(APICommand.class).name(); - if (_apiNameCmdClassMap.containsKey(apiName)) { + if (s_apiNameCmdClassMap.containsKey(apiName)) { System.out.println("Warning, API Cmd class " + cmdClass.getName() + " has non-unique apiname" + apiName); continue; } - _apiNameCmdClassMap.put(apiName, cmdClass); + s_apiNameCmdClassMap.put(apiName, cmdClass); } LinkedProperties preProcessedCommands = new LinkedProperties(); @@ -121,7 +123,7 @@ public class ApiXmlDocWriter { fileNames = iter.next().split(","); } if (arg.equals("-d")) { - dirName = iter.next(); + s_dirName = iter.next(); } } @@ -151,13 +153,13 @@ public class ApiXmlDocWriter { String preProcessedCommand = preProcessedCommands.getProperty(key); int splitIndex = preProcessedCommand.lastIndexOf(";"); String commandRoleMask = preProcessedCommand.substring(splitIndex + 1); - Class cmdClass = _apiNameCmdClassMap.get(key); + Class cmdClass = s_apiNameCmdClassMap.get(key); if (cmdClass == null) { System.out.println("Check, is this api part of another build profile? Null value for key: " + key + " preProcessedCommand=" + preProcessedCommand); continue; } String commandName = cmdClass.getName(); - all_api_commands.put(key, commandName); + s_allApiCommands.put(key, commandName); short cmdPermissions = 1; if (commandRoleMask != null) { @@ -165,32 +167,32 @@ public class ApiXmlDocWriter { } if ((cmdPermissions & DOMAIN_ADMIN_COMMAND) != 0) { - domain_admin_api_commands.put(key, commandName); + s_domainAdminApiCommands.put(key, commandName); } if ((cmdPermissions & USER_COMMAND) != 0) { - regular_user_api_commands.put(key, commandName); + s_regularUserApiCommands.put(key, commandName); } } // Login and logout commands are hardcoded - all_api_commands.put("login", "login"); - domain_admin_api_commands.put("login", "login"); - regular_user_api_commands.put("login", "login"); + s_allApiCommands.put("login", "login"); + s_domainAdminApiCommands.put("login", "login"); + s_regularUserApiCommands.put("login", "login"); - all_api_commands.put("logout", "logout"); - domain_admin_api_commands.put("logout", "logout"); - regular_user_api_commands.put("logout", "logout"); + s_allApiCommands.put("logout", "logout"); + s_domainAdminApiCommands.put("logout", "logout"); + s_regularUserApiCommands.put("logout", "logout"); - all_api_commands_sorted.putAll(all_api_commands); - domain_admin_api_commands_sorted.putAll(domain_admin_api_commands); - regular_user_api_commands_sorted.putAll(regular_user_api_commands); + s_allApiCommandsSorted.putAll(s_allApiCommands); + s_domainAdminApiCommandsSorted.putAll(s_domainAdminApiCommands); + s_regularUserApiCommandsSorted.putAll(s_regularUserApiCommands); try { // Create object writer XStream xs = new XStream(); xs.alias("command", Command.class); xs.alias("arg", Argument.class); - String xmlDocDir = dirName + "/xmldoc"; + String xmlDocDir = s_dirName + "/xmldoc"; String rootAdminDirName = xmlDocDir + "/root_admin"; String domainAdminDirName = xmlDocDir + "/domain_admin"; String regularUserDirName = xmlDocDir + "/regular_user"; @@ -198,7 +200,7 @@ public class ApiXmlDocWriter { (new File(domainAdminDirName)).mkdirs(); (new File(regularUserDirName)).mkdirs(); - ObjectOutputStream out = xs.createObjectOutputStream(new FileWriter(dirName + "/commands.xml"), "commands"); + ObjectOutputStream out = xs.createObjectOutputStream(new FileWriter(s_dirName + "/commands.xml"), "commands"); ObjectOutputStream rootAdmin = xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "/" + "rootAdminSummary.xml"), "commands"); ObjectOutputStream rootAdminSorted = xs.createObjectOutputStream(new FileWriter(rootAdminDirName + "/" + "rootAdminSummarySorted.xml"), "commands"); ObjectOutputStream domainAdmin = xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "/" + "domainAdminSummary.xml"), "commands"); @@ -207,7 +209,7 @@ public class ApiXmlDocWriter { ObjectOutputStream regularUserSorted = xs.createObjectOutputStream(new FileWriter(regularUserDirName + "/regularUserSummarySorted.xml"), "commands"); // Write commands in the order they are represented in commands.properties.in file - Iterator it = all_api_commands.keySet().iterator(); + Iterator it = s_allApiCommands.keySet().iterator(); while (it.hasNext()) { String key = (String)it.next(); @@ -259,14 +261,14 @@ public class ApiXmlDocWriter { singleRootAdminCommandOs.close(); } - if (domain_admin_api_commands.containsKey(key)) { + if (s_domainAdminApiCommands.containsKey(key)) { writeCommand(domainAdmin, key); ObjectOutputStream singleDomainAdminCommandOs = xs.createObjectOutputStream(new FileWriter(domainAdminDirName + "/" + key + ".xml"), "command"); writeCommand(singleDomainAdminCommandOs, key); singleDomainAdminCommandOs.close(); } - if (regular_user_api_commands.containsKey(key)) { + if (s_regularUserApiCommands.containsKey(key)) { writeCommand(regularUser, key); ObjectOutputStream singleRegularUserCommandOs = xs.createObjectOutputStream(new FileWriter(regularUserDirName + "/" + key + ".xml"), "command"); writeCommand(singleRegularUserCommandOs, key); @@ -276,7 +278,7 @@ public class ApiXmlDocWriter { } // Write sorted commands - it = all_api_commands_sorted.keySet().iterator(); + it = s_allApiCommandsSorted.keySet().iterator(); while (it.hasNext()) { String key = (String)it.next(); @@ -291,11 +293,11 @@ public class ApiXmlDocWriter { } else { writeCommand(rootAdminSorted, key); - if (domain_admin_api_commands.containsKey(key)) { + if (s_domainAdminApiCommands.containsKey(key)) { writeCommand(outDomainAdminSorted, key); } - if (regular_user_api_commands.containsKey(key)) { + if (s_regularUserApiCommands.containsKey(key)) { writeCommand(regularUserSorted, key); } } @@ -325,7 +327,7 @@ public class ApiXmlDocWriter { } private static void writeCommand(ObjectOutputStream out, String command) throws ClassNotFoundException, IOException { - Class clas = Class.forName(all_api_commands.get(command)); + Class clas = Class.forName(s_allApiCommands.get(command)); ArrayList request = new ArrayList(); ArrayList response = new ArrayList(); @@ -394,13 +396,13 @@ public class ApiXmlDocWriter { // Generate request request.add(new Argument("username", "Username", true)); request.add(new Argument( - "password", - "Hashed password (Default is MD5). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter See Docs section.", - true)); + "password", + "Hashed password (Default is MD5). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter See Docs section.", + true)); request.add(new Argument("domain", - "path of the domain that the user belongs to. Example: domain=/com/cloud/internal. If no domain is passed in, the ROOT domain is assumed.", false)); + "path of the domain that the user belongs to. Example: domain=/com/cloud/internal. If no domain is passed in, the ROOT domain is assumed.", false)); request.add(new Argument("domainId", - "id of the domain that the user belongs to. If both domain and domainId are passed in, \"domainId\" parameter takes precendence", false)); + "id of the domain that the user belongs to. If both domain and domainId are passed in, \"domainId\" parameter takes precendence", false)); apiCommand.setRequest(request); // Generate response @@ -551,7 +553,7 @@ public class ApiXmlDocWriter { if (responseClas.getName().equalsIgnoreCase(AsyncJobResponse.class.getName())) { Argument jobIdArg = new Argument("jobid", "the ID of the async job"); arguments.add(jobIdArg); - } else if (_asyncResponses.contains(responseClas.getName())) { + } else if (AsyncResponses.contains(responseClas.getName())) { Argument jobIdArg = new Argument("jobid", "the ID of the latest async job acting on this object"); Argument jobStatusArg = new Argument("jobstatus", "the current status of the latest async job acting on this object"); arguments.add(jobIdArg); @@ -571,7 +573,7 @@ public class ApiXmlDocWriter { static void addDir(File dirObj, ZipOutputStream out) throws IOException { File[] files = dirObj.listFiles(); byte[] tmpBuf = new byte[1024]; - String pathToDir = dirName; + String pathToDir = s_dirName; for (int i = 0; i < files.length; i++) { if (files[i].isDirectory()) { diff --git a/server/src/com/cloud/api/query/dao/DiskOfferingJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DiskOfferingJoinDaoImpl.java index b61822d9ea2..d15371215c5 100644 --- a/server/src/com/cloud/api/query/dao/DiskOfferingJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/DiskOfferingJoinDaoImpl.java @@ -41,7 +41,7 @@ public class DiskOfferingJoinDaoImpl extends GenericDaoBase dofIdSearch; private final Attribute _typeAttr; - protected DiskOfferingJoinDaoImpl() { + protected DiskOfferingJoinDaoImpl() { dofIdSearch = createSearchBuilder(); dofIdSearch.and("id", dofIdSearch.entity().getId(), SearchCriteria.Op.EQ); diff --git a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java index c1fd4d8e1d9..ae661501ce9 100644 --- a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java @@ -80,7 +80,7 @@ public class DomainRouterJoinDaoImpl extends GenericDaoBase, Listener, ResourceListener, @@ -356,29 +354,31 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager, } } - public boolean checkIfHostHasCpuCapability(long hostId, Integer cpuNum, Integer cpuSpeed){ + @Override + public boolean checkIfHostHasCpuCapability(long hostId, Integer cpuNum, Integer cpuSpeed) { // Check host can support the Cpu Number and Speed. Host host = _hostDao.findById(hostId); boolean isCpuNumGood = host.getCpus().intValue() >= cpuNum; boolean isCpuSpeedGood = host.getSpeed().intValue() >= cpuSpeed; - if(isCpuNumGood && isCpuSpeedGood){ + if (isCpuNumGood && isCpuSpeedGood) { if (s_logger.isDebugEnabled()) { - s_logger.debug("Host: " + hostId + " has cpu capability (cpu:" +host.getCpus()+ ", speed:" + host.getSpeed() + - ") to support requested CPU: " + cpuNum + " and requested speed: " + cpuSpeed); + s_logger.debug("Host: " + hostId + " has cpu capability (cpu:" + host.getCpus() + ", speed:" + host.getSpeed() + + ") to support requested CPU: " + cpuNum + " and requested speed: " + cpuSpeed); } return true; - }else{ + } else { if (s_logger.isDebugEnabled()) { - s_logger.debug("Host: " + hostId + " doesn't have cpu capability (cpu:" +host.getCpus()+ ", speed:" + host.getSpeed() + - ") to support requested CPU: " + cpuNum + " and requested speed: " + cpuSpeed); + s_logger.debug("Host: " + hostId + " doesn't have cpu capability (cpu:" + host.getCpus() + ", speed:" + host.getSpeed() + + ") to support requested CPU: " + cpuNum + " and requested speed: " + cpuSpeed); } return false; } } @Override - public boolean checkIfHostHasCapacity(long hostId, Integer cpu, long ram, boolean checkFromReservedCapacity, float cpuOvercommitRatio, float memoryOvercommitRatio, boolean considerReservedCapacity) { + public boolean checkIfHostHasCapacity(long hostId, Integer cpu, long ram, boolean checkFromReservedCapacity, float cpuOvercommitRatio, float memoryOvercommitRatio, + boolean considerReservedCapacity) { boolean hasCapacity = false; if (s_logger.isDebugEnabled()) { @@ -857,14 +857,14 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager, } @Override - public float getClusterOverProvisioningFactor(Long clusterId, short capacityType){ + public float getClusterOverProvisioningFactor(Long clusterId, short capacityType) { String capacityOverProvisioningName = ""; - if(capacityType == Capacity.CAPACITY_TYPE_CPU){ + if (capacityType == Capacity.CAPACITY_TYPE_CPU) { capacityOverProvisioningName = "cpuOvercommitRatio"; - }else if(capacityType == Capacity.CAPACITY_TYPE_MEMORY){ + } else if (capacityType == Capacity.CAPACITY_TYPE_MEMORY) { capacityOverProvisioningName = "memoryOvercommitRatio"; - }else{ + } else { throw new CloudRuntimeException("Invalid capacityType - " + capacityType); } @@ -875,7 +875,7 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager, } @Override - public boolean checkIfClusterCrossesThreshold(Long clusterId, Integer cpuRequested, long ramRequested){ + public boolean checkIfClusterCrossesThreshold(Long clusterId, Integer cpuRequested, long ramRequested) { Float clusterCpuOverProvisioning = getClusterOverProvisioningFactor(clusterId, Capacity.CAPACITY_TYPE_CPU); Float clusterMemoryOverProvisioning = getClusterOverProvisioningFactor(clusterId, Capacity.CAPACITY_TYPE_MEMORY); @@ -883,16 +883,16 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager, Float clusterMemoryCapacityDisableThreshold = DeploymentClusterPlanner.ClusterMemoryCapacityDisableThreshold.valueIn(clusterId); float cpuConsumption = _capacityDao.findClusterConsumption(clusterId, Capacity.CAPACITY_TYPE_CPU, cpuRequested); - if(cpuConsumption/clusterCpuOverProvisioning > clusterCpuCapacityDisableThreshold){ - s_logger.debug("Cluster: " +clusterId + " cpu consumption " + cpuConsumption/clusterCpuOverProvisioning - + " crosses disable threshold " + clusterCpuCapacityDisableThreshold); + if (cpuConsumption / clusterCpuOverProvisioning > clusterCpuCapacityDisableThreshold) { + s_logger.debug("Cluster: " + clusterId + " cpu consumption " + cpuConsumption / clusterCpuOverProvisioning + + " crosses disable threshold " + clusterCpuCapacityDisableThreshold); return true; } float memoryConsumption = _capacityDao.findClusterConsumption(clusterId, Capacity.CAPACITY_TYPE_MEMORY, ramRequested); - if(memoryConsumption/clusterMemoryOverProvisioning > clusterMemoryCapacityDisableThreshold){ - s_logger.debug("Cluster: " +clusterId + " memory consumption " + memoryConsumption/clusterMemoryOverProvisioning - + " crosses disable threshold " + clusterMemoryCapacityDisableThreshold); + if (memoryConsumption / clusterMemoryOverProvisioning > clusterMemoryCapacityDisableThreshold) { + s_logger.debug("Cluster: " + clusterId + " memory consumption " + memoryConsumption / clusterMemoryOverProvisioning + + " crosses disable threshold " + clusterMemoryCapacityDisableThreshold); return true; } diff --git a/server/src/com/cloud/capacity/ComputeCapacityListener.java b/server/src/com/cloud/capacity/ComputeCapacityListener.java index 75bfe65bcf2..dc8cb0bb70b 100755 --- a/server/src/com/cloud/capacity/ComputeCapacityListener.java +++ b/server/src/com/cloud/capacity/ComputeCapacityListener.java @@ -36,10 +36,10 @@ public class ComputeCapacityListener implements Listener { CapacityManager _capacityMgr; float _cpuOverProvisioningFactor = 1.0f; - public ComputeCapacityListener(CapacityDao _capacityDao, CapacityManager _capacityMgr) { + public ComputeCapacityListener(CapacityDao capacityDao, CapacityManager capacityMgr) { super(); - this._capacityDao = _capacityDao; - this._capacityMgr = _capacityMgr; + this._capacityDao = capacityDao; + this._capacityMgr = capacityMgr; } @Override diff --git a/server/src/com/cloud/configuration/Config.java b/server/src/com/cloud/configuration/Config.java index f08ca2445ae..3893c2f9ef2 100755 --- a/server/src/com/cloud/configuration/Config.java +++ b/server/src/com/cloud/configuration/Config.java @@ -41,7 +41,6 @@ import com.cloud.vm.snapshot.VMSnapshotManager; public enum Config { - // Alert AlertEmailAddresses( @@ -65,7 +64,14 @@ public enum Config { AlertSMTPPort("Alert", ManagementServer.class, Integer.class, "alert.smtp.port", "465", "Port the SMTP server is listening on.", null), AlertSMTPConnectionTimeout("Alert", ManagementServer.class, Integer.class, "alert.smtp.connectiontimeout", "30000", "Socket connection timeout value in milliseconds. -1 for infinite timeout.", null), - AlertSMTPTimeout("Alert", ManagementServer.class, Integer.class, "alert.smtp.timeout", "30000", "Socket I/O timeout value in milliseconds. -1 for infinite timeout.", null), + AlertSMTPTimeout( + "Alert", + ManagementServer.class, + Integer.class, + "alert.smtp.timeout", + "30000", + "Socket I/O timeout value in milliseconds. -1 for infinite timeout.", + null), AlertSMTPUseAuth("Alert", ManagementServer.class, String.class, "alert.smtp.useAuth", null, "If true, use SMTP authentication when sending emails.", null), AlertSMTPUsername( "Alert", @@ -1892,49 +1898,49 @@ public enum Config { private final String _range; private final String _scope; // Parameter can be at different levels (Zone/cluster/pool/account), by default every parameter is at global - private static final HashMap> _scopeLevelConfigsMap = new HashMap>(); + private static final HashMap> s_scopeLevelConfigsMap = new HashMap>(); static { - _scopeLevelConfigsMap.put(ConfigKey.Scope.Zone.toString(), new ArrayList()); - _scopeLevelConfigsMap.put(ConfigKey.Scope.Cluster.toString(), new ArrayList()); - _scopeLevelConfigsMap.put(ConfigKey.Scope.StoragePool.toString(), new ArrayList()); - _scopeLevelConfigsMap.put(ConfigKey.Scope.Account.toString(), new ArrayList()); - _scopeLevelConfigsMap.put(ConfigKey.Scope.Global.toString(), new ArrayList()); + s_scopeLevelConfigsMap.put(ConfigKey.Scope.Zone.toString(), new ArrayList()); + s_scopeLevelConfigsMap.put(ConfigKey.Scope.Cluster.toString(), new ArrayList()); + s_scopeLevelConfigsMap.put(ConfigKey.Scope.StoragePool.toString(), new ArrayList()); + s_scopeLevelConfigsMap.put(ConfigKey.Scope.Account.toString(), new ArrayList()); + s_scopeLevelConfigsMap.put(ConfigKey.Scope.Global.toString(), new ArrayList()); for (Config c : Config.values()) { //Creating group of parameters per each level (zone/cluster/pool/account) StringTokenizer tokens = new StringTokenizer(c.getScope(), ","); while (tokens.hasMoreTokens()) { String scope = tokens.nextToken().trim(); - List currentConfigs = _scopeLevelConfigsMap.get(scope); + List currentConfigs = s_scopeLevelConfigsMap.get(scope); currentConfigs.add(c); - _scopeLevelConfigsMap.put(scope, currentConfigs); + s_scopeLevelConfigsMap.put(scope, currentConfigs); } } } - private static final HashMap> _configs = new HashMap>(); + private static final HashMap> Configs = new HashMap>(); static { // Add categories - _configs.put("Alert", new ArrayList()); - _configs.put("Storage", new ArrayList()); - _configs.put("Snapshots", new ArrayList()); - _configs.put("Network", new ArrayList()); - _configs.put("Usage", new ArrayList()); - _configs.put("Console Proxy", new ArrayList()); - _configs.put("Advanced", new ArrayList()); - _configs.put("Usage", new ArrayList()); - _configs.put("Developer", new ArrayList()); - _configs.put("Hidden", new ArrayList()); - _configs.put("Account Defaults", new ArrayList()); - _configs.put("Project Defaults", new ArrayList()); - _configs.put("Secure", new ArrayList()); + Configs.put("Alert", new ArrayList()); + Configs.put("Storage", new ArrayList()); + Configs.put("Snapshots", new ArrayList()); + Configs.put("Network", new ArrayList()); + Configs.put("Usage", new ArrayList()); + Configs.put("Console Proxy", new ArrayList()); + Configs.put("Advanced", new ArrayList()); + Configs.put("Usage", new ArrayList()); + Configs.put("Developer", new ArrayList()); + Configs.put("Hidden", new ArrayList()); + Configs.put("Account Defaults", new ArrayList()); + Configs.put("Project Defaults", new ArrayList()); + Configs.put("Secure", new ArrayList()); // Add values into HashMap for (Config c : Config.values()) { String category = c.getCategory(); - List currentConfigs = _configs.get(category); + List currentConfigs = Configs.get(category); currentConfigs.add(c); - _configs.put(category, currentConfigs); + Configs.put(category, currentConfigs); } } @@ -2026,7 +2032,7 @@ public enum Config { } public static List getConfigs(String category) { - return _configs.get(category); + return Configs.get(category); } public static Config getConfig(String name) { @@ -2044,7 +2050,7 @@ public enum Config { } public static List getCategories() { - Object[] keys = _configs.keySet().toArray(); + Object[] keys = Configs.keySet().toArray(); List categories = new ArrayList(); for (Object key : keys) { categories.add((String)key); @@ -2053,6 +2059,6 @@ public enum Config { } public static List getConfigListByScope(String scope) { - return _scopeLevelConfigsMap.get(scope); + return s_scopeLevelConfigsMap.get(scope); } } diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index c345795fe37..2f5704bb7a8 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -315,7 +315,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati // FIXME - why don't we have interface for DataCenterLinkLocalIpAddressDao? @Inject - protected DataCenterLinkLocalIpAddressDao _LinkLocalIpAllocDao; + protected DataCenterLinkLocalIpAddressDao _linkLocalIpAllocDao; private int _maxVolumeSizeInGb = Integer.parseInt(Config.MaxVolumeSize.getDefaultValue()); private long _defaultPageSize = Long.parseLong(Config.DefaultPageSize.getDefaultValue()); @@ -403,8 +403,9 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati if (localCidrs.length > 0) { s_logger.warn("Management network CIDR is not configured originally. Set it default to " + localCidrs[0]); - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_MANAGMENT_NODE, 0, new Long(0), "Management network CIDR is not configured originally. Set it default to " + - localCidrs[0], ""); + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_MANAGMENT_NODE, 0, new Long(0), + "Management network CIDR is not configured originally. Set it default to " + + localCidrs[0], ""); _configDao.update(Config.ManagementNetwork.key(), Config.ManagementNetwork.getCategory(), localCidrs[0]); } else { s_logger.warn("Management network CIDR is not properly configured and we are not able to find a default setting"); @@ -979,9 +980,9 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati } // Delete link local ip addresses for the pod - List localIps = _LinkLocalIpAllocDao.listByPodIdDcId(podId, pod.getDataCenterId()); + List localIps = _linkLocalIpAllocDao.listByPodIdDcId(podId, pod.getDataCenterId()); if (!localIps.isEmpty()) { - if (!(_LinkLocalIpAllocDao.deleteIpAddressByPod(podId))) { + if (!(_linkLocalIpAllocDao.deleteIpAddressByPod(podId))) { throw new CloudRuntimeException("Failed to cleanup private ip addresses for pod " + podId); } } @@ -1936,7 +1937,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati //restricting the createserviceoffering to allow setting all or none of the dynamic parameters to null if (cpuNumber == null || cpuSpeed == null || memory == null) { - if (cpuNumber !=null || cpuSpeed !=null || memory !=null) { + if (cpuNumber != null || cpuSpeed != null || memory != null) { throw new InvalidParameterValueException("For creating a custom compute offering cpu, cpu speed and memory all should be null"); } } @@ -2013,14 +2014,14 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati cmd.getDetails(), cmd.getBytesReadRate(), cmd.getBytesWriteRate(), cmd.getIopsReadRate(), cmd.getIopsWriteRate()); } - protected ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, VirtualMachine.Type vm_type, String name, Integer cpu, Integer ramSize, + protected ServiceOfferingVO createServiceOffering(long userId, boolean isSystem, VirtualMachine.Type vmType, String name, Integer cpu, Integer ramSize, Integer speed, String displayText, boolean localStorageRequired, boolean offerHA, boolean limitResourceUse, boolean volatileVm, String tags, Long domainId, String hostTag, Integer networkRate, String deploymentPlanner, Map details, Long bytesReadRate, Long bytesWriteRate, Long iopsReadRate, Long iopsWriteRate) { tags = StringUtils.cleanupTags(tags); ServiceOfferingVO offering = new ServiceOfferingVO(name, cpu, ramSize, speed, networkRate, null, offerHA, limitResourceUse, volatileVm, displayText, localStorageRequired, false, tags, - isSystem, vm_type, domainId, hostTag, deploymentPlanner); + isSystem, vmType, domainId, hostTag, deploymentPlanner); if ((bytesReadRate != null) && (bytesReadRate > 0)) offering.setBytesReadRate(bytesReadRate); if ((bytesWriteRate != null) && (bytesWriteRate > 0)) @@ -3718,7 +3719,8 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati Set firewallProviderSet = new HashSet(); firewallProviderSet.add(firewallProvider); serviceProviderMap.put(Service.Firewall, firewallProviderSet); - if (!(firewallProvider.getName().equals(Provider.JuniperSRX.getName()) || firewallProvider.getName().equals(Provider.PaloAlto.getName()) || firewallProvider.getName().equals(Provider.VirtualRouter.getName())) && + if (!(firewallProvider.getName().equals(Provider.JuniperSRX.getName()) || firewallProvider.getName().equals(Provider.PaloAlto.getName()) || firewallProvider.getName() + .equals(Provider.VirtualRouter.getName())) && egressDefaultPolicy == false) { throw new InvalidParameterValueException("Firewall egress with default policy " + egressDefaultPolicy + " is not supported by the provider " + firewallProvider.getName()); diff --git a/server/src/com/cloud/configuration/ZoneConfig.java b/server/src/com/cloud/configuration/ZoneConfig.java index 3756e5985f2..62bf57eaffd 100644 --- a/server/src/com/cloud/configuration/ZoneConfig.java +++ b/server/src/com/cloud/configuration/ZoneConfig.java @@ -35,13 +35,13 @@ public enum ZoneConfig { private final String _description; private final String _range; - private static final List _zoneConfigKeys = new ArrayList(); + private static final List ZoneConfigKeys = new ArrayList(); static { // Add keys into List for (ZoneConfig c : ZoneConfig.values()) { String key = c.key(); - _zoneConfigKeys.add(key); + ZoneConfigKeys.add(key); } } @@ -79,7 +79,7 @@ public enum ZoneConfig { } public static boolean doesKeyExist(String key) { - return _zoneConfigKeys.contains(key); + return ZoneConfigKeys.contains(key); } } diff --git a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java index f6e742f8eb1..4b35b0e578d 100755 --- a/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java +++ b/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java @@ -165,7 +165,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy private int _consoleProxyPort = ConsoleProxyManager.DEFAULT_PROXY_VNC_PORT; - private int _mgmt_port = 8250; + private int _mgmtPort = 8250; private List _consoleProxyAllocators; @@ -241,9 +241,9 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy private int _capacityPerProxy = ConsoleProxyManager.DEFAULT_PROXY_CAPACITY; private int _standbyCapacity = ConsoleProxyManager.DEFAULT_STANDBY_CAPACITY; - private boolean _use_lvm; - private boolean _use_storage_vm; - private boolean _disable_rp_filter = false; + private boolean _useLvm; + private boolean _useStorageVm; + private boolean _disableRpFilter = false; private String _instance; private int _proxySessionTimeoutValue = DEFAULT_PROXY_SESSION_TIMEOUT; @@ -959,7 +959,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy TemplateDataStoreVO templateHostRef = _vmTemplateStoreDao.findByTemplateZoneDownloadStatus(template.getId(), dataCenterId, Status.DOWNLOADED); if (templateHostRef != null) { - List> l = _consoleProxyDao.getDatacenterStoragePoolHostInfo(dataCenterId, _use_lvm); + List> l = _consoleProxyDao.getDatacenterStoragePoolHostInfo(dataCenterId, _useLvm); if (l != null && l.size() > 0 && l.get(0).second().intValue() > 0) { return true; } else { @@ -982,7 +982,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy private boolean isZoneHostReady(ZoneHostInfo zoneHostInfo) { int expectedFlags = 0; - if (_use_storage_vm) { + if (_useStorageVm) { expectedFlags = RunningHostInfoAgregator.ZoneHostInfo.ROUTING_HOST_MASK; } else { expectedFlags = RunningHostInfoAgregator.ZoneHostInfo.ALL_HOST_MASK; @@ -1232,17 +1232,17 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy value = configs.get(Config.ConsoleProxyDisableRpFilter.key()); if (value != null && value.equalsIgnoreCase("true")) { - _disable_rp_filter = true; + _disableRpFilter = true; } value = configs.get(Config.SystemVMUseLocalStorage.key()); if (value != null && value.equalsIgnoreCase("true")) { - _use_lvm = true; + _useLvm = true; } value = configs.get("secondary.storage.vm"); if (value != null && value.equalsIgnoreCase("true")) { - _use_storage_vm = true; + _useStorageVm = true; } if (s_logger.isInfoEnabled()) { @@ -1260,7 +1260,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy Map agentMgrConfigs = _configDao.getConfiguration("AgentManager", params); value = agentMgrConfigs.get("port"); - _mgmt_port = NumbersUtil.parseInt(value, 8250); + _mgmtPort = NumbersUtil.parseInt(value, 8250); _listener = new ConsoleProxyListener(new VmBasedAgentHook(_instanceDao, _hostDao, _configDao, _ksMgr, _agentMgr, _ms)); _agentMgr.registerForHostEvents(_listener, true, true, false); @@ -1328,7 +1328,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy StringBuilder buf = profile.getBootArgsBuilder(); buf.append(" template=domP type=consoleproxy"); buf.append(" host=").append(ClusterManager.ManagementHostIPAdr.value()); - buf.append(" port=").append(_mgmt_port); + buf.append(" port=").append(_mgmtPort); buf.append(" name=").append(profile.getVirtualMachine().getHostName()); if (_sslEnabled) { buf.append(" premium=true"); @@ -1337,7 +1337,7 @@ public class ConsoleProxyManagerImpl extends ManagerBase implements ConsoleProxy buf.append(" pod=").append(dest.getPod().getId()); buf.append(" guid=Proxy.").append(profile.getId()); buf.append(" proxy_vm=").append(profile.getId()); - if (_disable_rp_filter) { + if (_disableRpFilter) { buf.append(" disable_rp_filter=true"); } diff --git a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java index 69230e08050..d2699eb3693 100644 --- a/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java +++ b/server/src/com/cloud/deploy/DeploymentPlanningManagerImpl.java @@ -162,8 +162,8 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy return _storagePoolAllocators; } - public void setStoragePoolAllocators(List _storagePoolAllocators) { - this._storagePoolAllocators = _storagePoolAllocators; + public void setStoragePoolAllocators(List storagePoolAllocators) { + this._storagePoolAllocators = storagePoolAllocators; } protected List _hostAllocators; @@ -172,8 +172,8 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy return _hostAllocators; } - public void setHostAllocators(List _hostAllocators) { - this._hostAllocators = _hostAllocators; + public void setHostAllocators(List hostAllocators) { + this._hostAllocators = hostAllocators; } @Inject @@ -218,8 +218,8 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy return _planners; } - public void setPlanners(List _planners) { - this._planners = _planners; + public void setPlanners(List planners) { + this._planners = planners; } protected List _affinityProcessors; @@ -325,8 +325,8 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy List suitableHosts = new ArrayList(); suitableHosts.add(host); Pair> potentialResources = findPotentialDeploymentResources( - suitableHosts, suitableVolumeStoragePools, avoids, - getPlannerUsage(planner, vmProfile, plan, avoids), readyAndReusedVolumes); + suitableHosts, suitableVolumeStoragePools, avoids, + getPlannerUsage(planner, vmProfile, plan, avoids), readyAndReusedVolumes); if (potentialResources != null) { Pod pod = _podDao.findById(host.getPodId()); Cluster cluster = _clusterDao.findById(host.getClusterId()); @@ -365,7 +365,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy Float cpuOvercommitRatio = Float.parseFloat(cluster_detail_cpu.getValue()); Float memoryOvercommitRatio = Float.parseFloat(cluster_detail_ram.getValue()); if (_capacityMgr.checkIfHostHasCapacity(host.getId(), cpu_requested, ram_requested, true, cpuOvercommitRatio, memoryOvercommitRatio, true) - && _capacityMgr.checkIfHostHasCpuCapability(host.getId(), offering.getCpu(), offering.getSpeed())) { + && _capacityMgr.checkIfHostHasCpuCapability(host.getId(), offering.getCpu(), offering.getSpeed())) { s_logger.debug("The last host of this VM is UP and has enough capacity"); s_logger.debug("Now checking for suitable pools under zone: " + host.getDataCenterId() + ", pod: " + host.getPodId() + ", cluster: " + host.getClusterId()); @@ -383,8 +383,8 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy List suitableHosts = new ArrayList(); suitableHosts.add(host); Pair> potentialResources = findPotentialDeploymentResources( - suitableHosts, suitableVolumeStoragePools, avoids, - getPlannerUsage(planner, vmProfile, plan, avoids), readyAndReusedVolumes); + suitableHosts, suitableVolumeStoragePools, avoids, + getPlannerUsage(planner, vmProfile, plan, avoids), readyAndReusedVolumes); if (potentialResources != null) { Pod pod = _podDao.findById(host.getPodId()); Cluster cluster = _clusterDao.findById(host.getClusterId()); @@ -845,7 +845,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy // /refactoring planner methods private DeployDestination checkClustersforDestination(List clusterList, VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, DataCenter dc, - DeploymentPlanner.PlannerResourceUsage resourceUsageRequired, ExcludeList PlannerAvoidOutput) { + DeploymentPlanner.PlannerResourceUsage resourceUsageRequired, ExcludeList plannerAvoidOutput) { if (s_logger.isTraceEnabled()) { s_logger.trace("ClusterId List to consider: " + clusterList); @@ -886,8 +886,8 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy // choose the potential host and pool for the VM if (!suitableVolumeStoragePools.isEmpty()) { Pair> potentialResources = findPotentialDeploymentResources( - suitableHosts, suitableVolumeStoragePools, avoid, resourceUsageRequired, - readyAndReusedVolumes); + suitableHosts, suitableVolumeStoragePools, avoid, resourceUsageRequired, + readyAndReusedVolumes); if (potentialResources != null) { Pod pod = _podDao.findById(clusterVO.getPodId()); @@ -909,7 +909,7 @@ public class DeploymentPlanningManagerImpl extends ManagerBase implements Deploy s_logger.debug("No suitable hosts found under this Cluster: " + clusterId); } - if (canAvoidCluster(clusterVO, avoid, PlannerAvoidOutput, vmProfile)) { + if (canAvoidCluster(clusterVO, avoid, plannerAvoidOutput, vmProfile)) { avoid.addCluster(clusterVO.getId()); } } diff --git a/server/src/com/cloud/deploy/FirstFitPlanner.java b/server/src/com/cloud/deploy/FirstFitPlanner.java index ec817c1871a..b59fceff36b 100755 --- a/server/src/com/cloud/deploy/FirstFitPlanner.java +++ b/server/src/com/cloud/deploy/FirstFitPlanner.java @@ -35,7 +35,6 @@ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import com.cloud.capacity.Capacity; import com.cloud.capacity.CapacityManager; -import com.cloud.capacity.CapacityVO; import com.cloud.capacity.dao.CapacityDao; import com.cloud.configuration.Config; import com.cloud.dc.ClusterDetailsDao; @@ -482,11 +481,11 @@ public class FirstFitPlanner extends PlannerBase implements DeploymentClusterPla ServiceOffering offering = vm.getServiceOffering(); if (vm.getHypervisorType() != HypervisorType.BareMetal) { if (offering != null && offering.getDeploymentPlanner() != null) { - if (offering.getDeploymentPlanner().equals(this.getName())) { + if (offering.getDeploymentPlanner().equals(getName())) { return true; } } else { - if (_globalDeploymentPlanner != null && _globalDeploymentPlanner.equals(this._name)) { + if (_globalDeploymentPlanner != null && _globalDeploymentPlanner.equals(_name)) { return true; } } diff --git a/server/src/com/cloud/event/ActionEventUtils.java b/server/src/com/cloud/event/ActionEventUtils.java index 3fa68e5fbbf..0363a0d81dd 100755 --- a/server/src/com/cloud/event/ActionEventUtils.java +++ b/server/src/com/cloud/event/ActionEventUtils.java @@ -25,7 +25,6 @@ import java.util.Map; import javax.annotation.PostConstruct; import javax.inject.Inject; -import com.cloud.domain.Domain; import org.apache.log4j.Logger; import org.springframework.beans.factory.NoSuchBeanDefinitionException; @@ -33,8 +32,8 @@ import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.framework.events.EventBus; import org.apache.cloudstack.framework.events.EventBusException; +import com.cloud.domain.Domain; import com.cloud.event.dao.EventDao; -import com.cloud.server.ManagementServer; import com.cloud.server.ManagementService; import com.cloud.user.Account; import com.cloud.user.AccountVO; @@ -46,10 +45,10 @@ import com.cloud.utils.component.ComponentContext; public class ActionEventUtils { private static final Logger s_logger = Logger.getLogger(ActionEventUtils.class); - private static EventDao _eventDao; - private static AccountDao _accountDao; - protected static UserDao _userDao; - protected static EventBus _eventBus = null; + private static EventDao s_eventDao; + private static AccountDao s_accountDao; + protected static UserDao s_userDao; + protected static EventBus s_eventBus = null; public static final String EventDetails = "event_details"; public static final String EventId = "event_id"; @@ -69,9 +68,9 @@ public class ActionEventUtils { @PostConstruct void init() { - _eventDao = eventDao; - _accountDao = accountDao; - _userDao = userDao; + s_eventDao = eventDao; + s_accountDao = accountDao; + s_userDao = userDao; } public static Long onActionEvent(Long userId, Long accountId, Long domainId, String type, String description) { @@ -158,13 +157,13 @@ public class ActionEventUtils { if (startEventId != null) { event.setStartId(startEventId); } - event = _eventDao.persist(event); + event = s_eventDao.persist(event); return event; } private static void publishOnEventBus(long userId, long accountId, String eventCategory, String eventType, Event.State state, String description) { try { - _eventBus = ComponentContext.getComponent(EventBus.class); + s_eventBus = ComponentContext.getComponent(EventBus.class); } catch (NoSuchBeanDefinitionException nbe) { return; // no provider is configured to provide events bus, so just return } @@ -177,15 +176,16 @@ public class ActionEventUtils { { CallContext context = CallContext.current(); entityUuid = (String)context.getContextParameter(entityKey); - if (entityUuid != null) entityType = entityKey.getName(); + if (entityUuid != null) + entityType = entityKey.getName(); } org.apache.cloudstack.framework.events.Event event = new org.apache.cloudstack.framework.events.Event(ManagementService.Name, eventCategory, eventType, EventTypes.getEntityForEvent(eventType), null); Map eventDescription = new HashMap(); - Account account = _accountDao.findById(accountId); - User user = _userDao.findById(userId); + Account account = s_accountDao.findById(accountId); + User user = s_userDao.findById(userId); // if account has been deleted, this might be called during cleanup of resources and results in null pointer if (account == null) return; @@ -205,14 +205,14 @@ public class ActionEventUtils { event.setDescription(eventDescription); try { - _eventBus.publish(event); + s_eventBus.publish(event); } catch (EventBusException e) { s_logger.warn("Failed to publish action event on the the event bus."); } } private static long getDomainId(long accountId) { - AccountVO account = _accountDao.findByIdIncludingRemoved(accountId); + AccountVO account = s_accountDao.findByIdIncludingRemoved(accountId); if (account == null) { s_logger.error("Failed to find account(including removed ones) by id '" + accountId + "'"); return 0; diff --git a/server/src/com/cloud/event/AlertGenerator.java b/server/src/com/cloud/event/AlertGenerator.java index 2103a1488ba..5982eea351e 100644 --- a/server/src/com/cloud/event/AlertGenerator.java +++ b/server/src/com/cloud/event/AlertGenerator.java @@ -36,7 +36,6 @@ import com.cloud.dc.DataCenterVO; import com.cloud.dc.HostPodVO; import com.cloud.dc.dao.DataCenterDao; import com.cloud.dc.dao.HostPodDao; -import com.cloud.server.ManagementServer; import com.cloud.server.ManagementService; import com.cloud.utils.component.ComponentContext; @@ -44,9 +43,9 @@ import com.cloud.utils.component.ComponentContext; public class AlertGenerator { private static final Logger s_logger = Logger.getLogger(AlertGenerator.class); - private static DataCenterDao _dcDao; - private static HostPodDao _podDao; - protected static EventBus _eventBus = null; + private static DataCenterDao s_dcDao; + private static HostPodDao s_podDao; + protected static EventBus s_eventBus = null; @Inject DataCenterDao dcDao; @@ -58,13 +57,13 @@ public class AlertGenerator { @PostConstruct void init() { - _dcDao = dcDao; - _podDao = podDao; + s_dcDao = dcDao; + s_podDao = podDao; } public static void publishAlertOnEventBus(String alertType, long dataCenterId, Long podId, String subject, String body) { try { - _eventBus = ComponentContext.getComponent(EventBus.class); + s_eventBus = ComponentContext.getComponent(EventBus.class); } catch (NoSuchBeanDefinitionException nbe) { return; // no provider is configured to provide events bus, so just return } @@ -73,8 +72,8 @@ public class AlertGenerator { new org.apache.cloudstack.framework.events.Event(ManagementService.Name, EventCategory.ALERT_EVENT.getName(), alertType, null, null); Map eventDescription = new HashMap(); - DataCenterVO dc = _dcDao.findById(dataCenterId); - HostPodVO pod = _podDao.findById(podId); + DataCenterVO dc = s_dcDao.findById(dataCenterId); + HostPodVO pod = s_podDao.findById(podId); eventDescription.put("event", alertType); if (dc != null) { @@ -96,7 +95,7 @@ public class AlertGenerator { event.setDescription(eventDescription); try { - _eventBus.publish(event); + s_eventBus.publish(event); } catch (EventBusException e) { s_logger.warn("Failed to publish alert on the the event bus."); } diff --git a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java index aec1b8dd2b7..8e86bbcd24f 100755 --- a/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java +++ b/server/src/com/cloud/ha/HighAvailabilityManagerImpl.java @@ -36,8 +36,6 @@ import org.apache.cloudstack.engine.orchestration.service.VolumeOrchestrationSer import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.managed.context.ManagedContext; import org.apache.cloudstack.managed.context.ManagedContextRunnable; -import org.apache.log4j.Logger; -import org.apache.log4j.NDC; import com.cloud.agent.AgentManager; import com.cloud.alert.AlertManager; @@ -123,24 +121,24 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai @Inject ManagedContext _managedContext; - List _investigators; + List investigators; public List getInvestigators() { - return _investigators; + return investigators; } - public void setInvestigators(List _investigators) { - this._investigators = _investigators; + public void setInvestigators(List investigators) { + this.investigators = investigators; } - List _fenceBuilders; + List fenceBuilders; public List getFenceBuilders() { - return _fenceBuilders; + return fenceBuilders; } - public void setFenceBuilders(List _fenceBuilders) { - this._fenceBuilders = _fenceBuilders; + public void setFenceBuilders(List fenceBuilders) { + this.fenceBuilders = fenceBuilders; } @Inject @@ -190,7 +188,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai } Status hostState = null; - for (Investigator investigator : _investigators) { + for (Investigator investigator : investigators) { hostState = investigator.isAgentAlive(host); if (hostState != null) { if (s_logger.isDebugEnabled()) { @@ -245,7 +243,8 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai HostPodVO podVO = _podDao.findById(host.getPodId()); String hostDesc = "name: " + host.getName() + " (id:" + host.getId() + "), availability zone: " + dcVO.getName() + ", pod: " + podVO.getName(); - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host is down, " + hostDesc, "Host [" + hostDesc + "] is down." + + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_HOST, host.getDataCenterId(), host.getPodId(), "Host is down, " + hostDesc, "Host [" + hostDesc + + "] is down." + ((sb != null) ? sb.toString() : "")); for (final VMInstanceVO vm : vms) { @@ -449,7 +448,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai } Investigator investigator = null; - for (Investigator it : _investigators) { + for (Investigator it : investigators) { investigator = it; alive = investigator.isVmAlive(vm, host); s_logger.info(investigator.getName() + " found " + vm + "to be alive? " + alive); @@ -461,7 +460,7 @@ public class HighAvailabilityManagerImpl extends ManagerBase implements HighAvai boolean fenced = false; if (alive == null) { s_logger.debug("Fencing off VM that we don't know the state of"); - for (FenceBuilder fb : _fenceBuilders) { + for (FenceBuilder fb : fenceBuilders) { Boolean result = fb.fenceOff(vm, host); s_logger.info("Fencer " + fb.getName() + " returned " + result); if (result != null && result) { diff --git a/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java b/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java index 104de3a426b..d6b96028b10 100644 --- a/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java +++ b/server/src/com/cloud/metadata/ResourceMetaDataManagerImpl.java @@ -30,8 +30,6 @@ import org.apache.cloudstack.resourcedetail.dao.FirewallRuleDetailsDao; import org.apache.cloudstack.resourcedetail.dao.NetworkACLItemDetailsDao; import org.apache.cloudstack.resourcedetail.dao.NetworkACLListDetailsDao; import org.apache.cloudstack.resourcedetail.dao.RemoteAccessVpnDetailsDao; -import org.apache.cloudstack.resourcedetail.dao.Site2SiteCustomerGatewayDetailsDao; -import org.apache.cloudstack.resourcedetail.dao.Site2SiteVpnGatewayDetailsDao; import org.apache.cloudstack.resourcedetail.dao.UserIpAddressDetailsDao; import org.apache.cloudstack.resourcedetail.dao.VpcDetailsDao; import org.apache.cloudstack.resourcedetail.dao.VpcGatewayDetailsDao; @@ -94,36 +92,29 @@ public class ResourceMetaDataManagerImpl extends ManagerBase implements Resource NetworkACLListDetailsDao _networkACLListDetailsDao; @Inject NetworkACLItemDetailsDao _networkACLDetailsDao; - @Inject - Site2SiteVpnGatewayDetailsDao _vpnGatewayDetailsDao; - @Inject - Site2SiteCustomerGatewayDetailsDao _customerGatewayDetailsDao; - - private static Map> _daoMap = - new HashMap>(); + private static Map> s_daoMap = + new HashMap>(); @Override public boolean configure(String name, Map params) throws ConfigurationException { - _daoMap.put(ResourceObjectType.UserVm, _userVmDetailDao); - _daoMap.put(ResourceObjectType.Volume, _volumeDetailDao); - _daoMap.put(ResourceObjectType.Template, _templateDetailsDao); - _daoMap.put(ResourceObjectType.Network, _networkDetailsDao); - _daoMap.put(ResourceObjectType.Nic, _nicDetailDao); - _daoMap.put(ResourceObjectType.ServiceOffering, _serviceOfferingDetailsDao); - _daoMap.put(ResourceObjectType.Zone, _dcDetailsDao); - _daoMap.put(ResourceObjectType.Storage, _storageDetailsDao); - _daoMap.put(ResourceObjectType.FirewallRule, _firewallRuleDetailsDao); - _daoMap.put(ResourceObjectType.PublicIpAddress, _userIpAddressDetailsDao); - _daoMap.put(ResourceObjectType.PortForwardingRule, _firewallRuleDetailsDao); - _daoMap.put(ResourceObjectType.LoadBalancer, _firewallRuleDetailsDao); - _daoMap.put(ResourceObjectType.RemoteAccessVpn, _vpnDetailsDao); - _daoMap.put(ResourceObjectType.Vpc, _vpcDetailsDao); - _daoMap.put(ResourceObjectType.PrivateGateway, _vpcGatewayDetailsDao); - _daoMap.put(ResourceObjectType.NetworkACLList, _networkACLListDetailsDao); - _daoMap.put(ResourceObjectType.NetworkACL, _networkACLDetailsDao); - _daoMap.put(ResourceObjectType.VpnGateway, _vpnGatewayDetailsDao); - _daoMap.put(ResourceObjectType.CustomerGateway, _customerGatewayDetailsDao); + s_daoMap.put(ResourceObjectType.UserVm, _userVmDetailDao); + s_daoMap.put(ResourceObjectType.Volume, _volumeDetailDao); + s_daoMap.put(ResourceObjectType.Template, _templateDetailsDao); + s_daoMap.put(ResourceObjectType.Network, _networkDetailsDao); + s_daoMap.put(ResourceObjectType.Nic, _nicDetailDao); + s_daoMap.put(ResourceObjectType.ServiceOffering, _serviceOfferingDetailsDao); + s_daoMap.put(ResourceObjectType.Zone, _dcDetailsDao); + s_daoMap.put(ResourceObjectType.Storage, _storageDetailsDao); + s_daoMap.put(ResourceObjectType.FirewallRule, _firewallRuleDetailsDao); + s_daoMap.put(ResourceObjectType.PublicIpAddress, _userIpAddressDetailsDao); + s_daoMap.put(ResourceObjectType.PortForwardingRule, _firewallRuleDetailsDao); + s_daoMap.put(ResourceObjectType.LoadBalancer, _firewallRuleDetailsDao); + s_daoMap.put(ResourceObjectType.RemoteAccessVpn, _vpnDetailsDao); + s_daoMap.put(ResourceObjectType.Vpc, _vpcDetailsDao); + s_daoMap.put(ResourceObjectType.PrivateGateway, _vpcGatewayDetailsDao); + s_daoMap.put(ResourceObjectType.NetworkACLList, _networkACLListDetailsDao); + s_daoMap.put(ResourceObjectType.NetworkACL, _networkACLDetailsDao); return true; } @@ -182,11 +173,11 @@ public class ResourceMetaDataManagerImpl extends ManagerBase implements Resource throw new UnsupportedOperationException("ResourceType " + resourceType + " doesn't support metadata"); } this.resourceType = resourceType; - ResourceDetailsDao dao = _daoMap.get(resourceType); + ResourceDetailsDao dao = s_daoMap.get(resourceType); if (dao == null) { throw new UnsupportedOperationException("ResourceType " + resourceType + " doesn't support metadata"); } - this.dao = (ResourceDetailsDao) _daoMap.get(resourceType); + this.dao = (ResourceDetailsDao)s_daoMap.get(resourceType); } private void removeDetail(long resourceId, String key) { diff --git a/server/src/com/cloud/network/IpAddrAllocator.java b/server/src/com/cloud/network/IpAddrAllocator.java index 0f87cd1b3a2..5a23a0e1111 100644 --- a/server/src/com/cloud/network/IpAddrAllocator.java +++ b/server/src/com/cloud/network/IpAddrAllocator.java @@ -37,14 +37,14 @@ public interface IpAddrAllocator extends Adapter { } } - public class networkInfo { + public class NetworkInfo { public String _ipAddr; public String _netMask; public String _gateWay; public Long _vlanDbId; public String _vlanid; - public networkInfo(String ip, String netMask, String gateway, Long vlanDbId, String vlanId) { + public NetworkInfo(String ip, String netMask, String gateway, Long vlanDbId, String vlanId) { _ipAddr = ip; _netMask = netMask; _gateWay = gateway; diff --git a/server/src/com/cloud/network/IpAddressManagerImpl.java b/server/src/com/cloud/network/IpAddressManagerImpl.java index 230f19db902..26cf15a5bd4 100644 --- a/server/src/com/cloud/network/IpAddressManagerImpl.java +++ b/server/src/com/cloud/network/IpAddressManagerImpl.java @@ -1644,7 +1644,7 @@ public class IpAddressManagerImpl extends ManagerBase implements IpAddressManage Set availableIps = _networkModel.getAvailableIps(network, requestedIp); if (availableIps == null || availableIps.isEmpty()) { - s_logger.debug("There are no free ips in the network " + network ); + s_logger.debug("There are no free ips in the network " + network); return null; } diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java index 71fbbf5c149..746faa8b6b0 100755 --- a/server/src/com/cloud/network/NetworkModelImpl.java +++ b/server/src/com/cloud/network/NetworkModelImpl.java @@ -154,14 +154,14 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { @Inject ConfigurationServer _configServer; - List _networkElements; + List networkElements; public List getNetworkElements() { - return _networkElements; + return networkElements; } - public void setNetworkElements(List _networkElements) { - this._networkElements = _networkElements; + public void setNetworkElements(List networkElements) { + this.networkElements = networkElements; } @Inject @@ -200,7 +200,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { NetworkOfferingDetailsDao _ntwkOffDetailsDao; private final HashMap _systemNetworks = new HashMap(5); - static Long _privateOfferingId = null; + static Long s_privateOfferingId = null; SearchBuilder IpAddressSearch; SearchBuilder NicForTrafficTypeSearch; @@ -226,7 +226,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { @Override public NetworkElement getElementImplementingProvider(String providerName) { String elementName = s_providerToNetworkElementMap.get(providerName); - NetworkElement element = AdapterBase.getAdapterByName(_networkElements, elementName); + NetworkElement element = AdapterBase.getAdapterByName(networkElements, elementName); return element; } @@ -296,7 +296,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { ex.addProxyObject(ipAddrUuid, "networkId"); throw ex; } - } + } ipToServices.put(ip, services); // if IP in allocating state then it will not have any rules attached so skip IPAssoc to network service @@ -433,9 +433,9 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { NetworkElement oldElement = getElementImplementingProvider(oldProvider.getName()); NetworkElement newElement = getElementImplementingProvider(newProvider.getName()); if (oldElement instanceof IpDeployingRequester && newElement instanceof IpDeployingRequester) { - IpDeployer oldIpDeployer = ((IpDeployingRequester)oldElement).getIpDeployer(network); - IpDeployer newIpDeployer = ((IpDeployingRequester)newElement).getIpDeployer(network); - // FIXME: I ignored this check + IpDeployer oldIpDeployer = ((IpDeployingRequester)oldElement).getIpDeployer(network); + IpDeployer newIpDeployer = ((IpDeployingRequester)newElement).getIpDeployer(network); + // FIXME: I ignored this check } else { throw new InvalidParameterException("Ip cannot be applied for new provider!"); } @@ -1654,7 +1654,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { @Override public boolean isPrivateGateway(Nic guestNic) { Network network = getNetwork(guestNic.getNetworkId()); - if (network.getTrafficType() != TrafficType.Guest || network.getNetworkOfferingId() != _privateOfferingId.longValue()) { + if (network.getTrafficType() != TrafficType.Guest || network.getNetworkOfferingId() != s_privateOfferingId.longValue()) { return false; } return true; @@ -1929,7 +1929,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { NetworkOfferingVO privateGatewayNetworkOffering = new NetworkOfferingVO(NetworkOffering.SystemPrivateGatewayNetworkOffering, GuestType.Isolated); privateGatewayNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(privateGatewayNetworkOffering); _systemNetworks.put(NetworkOffering.SystemPrivateGatewayNetworkOffering, privateGatewayNetworkOffering); - _privateOfferingId = privateGatewayNetworkOffering.getId(); + s_privateOfferingId = privateGatewayNetworkOffering.getId(); IpAddressSearch = _ipAddressDao.createSearchBuilder(); IpAddressSearch.and("accountId", IpAddressSearch.entity().getAllocatedToAccountId(), Op.EQ); @@ -1958,7 +1958,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { public boolean start() { // populate s_serviceToImplementedProvidersMap & s_providerToNetworkElementMap with current _networkElements // Need to do this in start() since _networkElements are not completely configured until then. - for (NetworkElement element : _networkElements) { + for (NetworkElement element : networkElements) { Map> capabilities = element.getCapabilities(); Provider implementedProvider = element.getProvider(); if (implementedProvider != null) { @@ -2185,7 +2185,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel { } @Override - public boolean getNetworkEgressDefaultPolicy (Long networkId) { + public boolean getNetworkEgressDefaultPolicy(Long networkId) { NetworkVO network = _networksDao.findById(networkId); if (network != null) { diff --git a/server/src/com/cloud/network/NetworkServiceImpl.java b/server/src/com/cloud/network/NetworkServiceImpl.java index cf4a1c50bf2..b7ffe269533 100755 --- a/server/src/com/cloud/network/NetworkServiceImpl.java +++ b/server/src/com/cloud/network/NetworkServiceImpl.java @@ -294,19 +294,19 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { @Inject InternalLoadBalancerElementService _internalLbElementSvc; @Inject - DataCenterVnetDao _datacneter_vnet; + DataCenterVnetDao _datacneterVnet; @Inject AccountGuestVlanMapDao _accountGuestVlanMapDao; @Inject VpcDao _vpcDao; @Inject NetworkACLDao _networkACLDao; - @Inject - OvsProviderDao _ovsProviderDao; - @Inject - IpAddressManager _ipAddrMgr; - @Inject - EntityManager _entityMgr; + @Inject + OvsProviderDao _ovsProviderDao; + @Inject + IpAddressManager _ipAddrMgr; + @Inject + EntityManager _entityMgr; int _cidrLimit; boolean _allowSubdomainNetworkAccess; @@ -1599,11 +1599,11 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { //Most likely pageSize will never exceed int value, and we need integer to partition the listToReturn boolean notNull = cmd.getStartIndex() != null && cmd.getPageSizeVal() != null; if (notNull && cmd.getStartIndex() <= Integer.MAX_VALUE && cmd.getStartIndex() >= Integer.MIN_VALUE && - cmd.getPageSizeVal() <= Integer.MAX_VALUE && cmd.getPageSizeVal() >= Integer.MIN_VALUE) { + cmd.getPageSizeVal() <= Integer.MAX_VALUE && cmd.getPageSizeVal() >= Integer.MIN_VALUE) { int startIndex = cmd.getStartIndex().intValue() == 0 ? 0 : cmd.getStartIndex().intValue() - 1; List wPagination = new ArrayList(); List> partitions = partitionNetworks(networksToReturn, cmd.getPageSizeVal().intValue()); - if (startIndex< partitions.size()) { + if (startIndex < partitions.size()) { wPagination = partitions.get(startIndex); } return wPagination; @@ -1613,15 +1613,15 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { } private static List> partitionNetworks(List originalList, - int chunkSize) { + int chunkSize) { List> listOfChunks = new ArrayList>(); for (int i = 0; i < originalList.size() / chunkSize; i++) { listOfChunks.add(originalList.subList(i * chunkSize, i * chunkSize - + chunkSize)); + + chunkSize)); } if (originalList.size() % chunkSize != 0) { listOfChunks.add(originalList.subList(originalList.size() - - originalList.size() % chunkSize, originalList.size())); + - originalList.size() % chunkSize, originalList.size())); } return listOfChunks; } @@ -2540,7 +2540,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { } } - @Override + @Override public Pair, Integer> searchPhysicalNetworks(Long id, Long zoneId, String keyword, Long startIndex, Long pageSize, String name) { Filter searchFilter = new Filter(PhysicalNetworkVO.class, "id", Boolean.TRUE, startIndex, pageSize); SearchCriteria sc = _physicalNetworkDao.createSearchCriteria(); @@ -2639,7 +2639,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { removeVnets = getVnetsToremove(network, vnetranges); //computing vnets to add - vnetsInDb.addAll(_datacneter_vnet.listVnetsByPhysicalNetworkAndDataCenter(network.getDataCenterId(), network.getId())); + vnetsInDb.addAll(_datacneterVnet.listVnetsByPhysicalNetworkAndDataCenter(network.getDataCenterId(), network.getId())); tempVnets.addAll(vnetsInDb); for (Pair vlan : vnetranges) { for (i = vlan.first(); i <= vlan.second(); i++) { @@ -2681,7 +2681,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { s_logger.debug("removing vnet range " + removeVnetsFinal.toString() + " for the physicalNetwork id= " + network.getId() + " and zone id=" + network.getDataCenterId() + " as a part of updatePhysicalNetwork call"); //deleteVnets takes a list of strings to be removed. each string is a vnet. - _datacneter_vnet.deleteVnets(TransactionLegacy.currentTxn(), network.getDataCenterId(), network.getId(), removeVnetsFinal); + _datacneterVnet.deleteVnets(TransactionLegacy.currentTxn(), network.getDataCenterId(), network.getId(), removeVnetsFinal); } _physicalNetworkDao.update(network.getId(), network); } @@ -2717,7 +2717,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { // since adding a range adds each VNI to the database, need only check min/max for (String vnet : VnetRange) { s_logger.debug("Looking to see if VNI " + vnet + " already exists on another network in zone " + network.getDataCenterId()); - List vnis = _datacneter_vnet.findVnet(network.getDataCenterId(), vnet); + List vnis = _datacneterVnet.findVnet(network.getDataCenterId(), vnet); if (vnis != null && !vnis.isEmpty()) { for (DataCenterVnetVO vni : vnis) { if (vni.getPhysicalNetworkId() != network.getId()) { @@ -2791,13 +2791,13 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { int i; List removeVnets = new ArrayList(); HashSet vnetsInDb = new HashSet(); - vnetsInDb.addAll(_datacneter_vnet.listVnetsByPhysicalNetworkAndDataCenter(network.getDataCenterId(), network.getId())); + vnetsInDb.addAll(_datacneterVnet.listVnetsByPhysicalNetworkAndDataCenter(network.getDataCenterId(), network.getId())); //remove all the vnets from vnets in db to check if there are any vnets that are not there in given list. //remove all the vnets not in the list of vnets passed by the user. if (vnetRanges.size() == 0) { //this implies remove all vlans. removeVnets.addAll(vnetsInDb); - int allocated_vnets = _datacneter_vnet.countAllocatedVnets(network.getId()); + int allocated_vnets = _datacneterVnet.countAllocatedVnets(network.getId()); if (allocated_vnets > 0) { throw new InvalidParameterValueException("physicalnetwork " + network.getId() + " has " + allocated_vnets + " vnets in use"); } @@ -2820,8 +2820,8 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { String[] range = vnet.split("-"); Integer start = Integer.parseInt(range[0]); Integer end = Integer.parseInt(range[1]); - _datacneter_vnet.lockRange(network.getDataCenterId(), network.getId(), start, end); - List result = _datacneter_vnet.listAllocatedVnetsInRange(network.getDataCenterId(), network.getId(), start, end); + _datacneterVnet.lockRange(network.getDataCenterId(), network.getId(), start, end); + List result = _datacneterVnet.listAllocatedVnetsInRange(network.getDataCenterId(), network.getId(), start, end); if (!result.isEmpty()) { throw new InvalidParameterValueException("physicalnetwork " + network.getId() + " has allocated vnets in the range " + start + "-" + end); @@ -3048,7 +3048,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { // Verify guest vlans in the range don't belong to a network of a different account for (int i = startVlan; i <= endVlan; i++) { List allocatedVlans = - _datacneter_vnet.listAllocatedVnetsInRange(physicalNetwork.getDataCenterId(), physicalNetwork.getId(), startVlan, endVlan); + _datacneterVnet.listAllocatedVnetsInRange(physicalNetwork.getDataCenterId(), physicalNetwork.getId(), startVlan, endVlan); if (allocatedVlans != null && !allocatedVlans.isEmpty()) { for (DataCenterVnetVO allocatedVlan : allocatedVlans) { if (allocatedVlan.getAccountId() != vlanOwner.getAccountId()) { @@ -3098,7 +3098,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { List vlanTokens2 = getVlanFromRange(guestVlanMaps.get(i + 1).getGuestVlanRange()); // Range extends 2 vlan ranges, both to the right and left if (endVlan == (vlanTokens2.get(0).intValue() - 1) & guestVlanMaps.get(i + 1).getAccountId() == vlanOwnerId) { - _datacneter_vnet.releaseDedicatedGuestVlans(guestVlanMaps.get(i + 1).getId()); + _datacneterVnet.releaseDedicatedGuestVlans(guestVlanMaps.get(i + 1).getId()); _accountGuestVlanMapDao.remove(guestVlanMaps.get(i + 1).getId()); updatedVlanRange = vlanTokens1.get(0).intValue() + "-" + vlanTokens2.get(1).intValue(); break; @@ -3122,9 +3122,9 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { // For every guest vlan set the corresponding account guest vlan map id List finaVlanTokens = getVlanFromRange(accountGuestVlanMapVO.getGuestVlanRange()); for (int i = finaVlanTokens.get(0).intValue(); i <= finaVlanTokens.get(1).intValue(); i++) { - List dataCenterVnet = _datacneter_vnet.findVnet(physicalNetwork.getDataCenterId(), physicalNetworkId, ((Integer)i).toString()); + List dataCenterVnet = _datacneterVnet.findVnet(physicalNetwork.getDataCenterId(), physicalNetworkId, ((Integer)i).toString()); dataCenterVnet.get(0).setAccountGuestVlanMapId(accountGuestVlanMapVO.getId()); - _datacneter_vnet.update(dataCenterVnet.get(0).getId(), dataCenterVnet.get(0)); + _datacneterVnet.update(dataCenterVnet.get(0).getId(), dataCenterVnet.get(0)); } return accountGuestVlanMapVO; } @@ -3236,7 +3236,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { } // Remove dedication for the guest vlan - _datacneter_vnet.releaseDedicatedGuestVlans(dedicatedGuestVlan.getId()); + _datacneterVnet.releaseDedicatedGuestVlans(dedicatedGuestVlan.getId()); if (_accountGuestVlanMapDao.remove(dedicatedGuestVlanRangeId)) { return true; } else { @@ -3764,22 +3764,22 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService { return nsp; } - private PhysicalNetworkServiceProvider addDefaultOvsToPhysicalNetwork(long physicalNetworkId) { - PhysicalNetworkServiceProvider nsp = addProviderToPhysicalNetwork(physicalNetworkId, Network.Provider.Ovs.getName(), null, null); - NetworkElement networkElement = _networkModel.getElementImplementingProvider(Network.Provider.Ovs.getName()); - if (networkElement == null) { + private PhysicalNetworkServiceProvider addDefaultOvsToPhysicalNetwork(long physicalNetworkId) { + PhysicalNetworkServiceProvider nsp = addProviderToPhysicalNetwork(physicalNetworkId, Network.Provider.Ovs.getName(), null, null); + NetworkElement networkElement = _networkModel.getElementImplementingProvider(Network.Provider.Ovs.getName()); + if (networkElement == null) { throw new CloudRuntimeException("Unable to find the Network Element implementing the Ovs Provider"); } - OvsProviderVO element = _ovsProviderDao.findByNspId(nsp.getId()); - if (element != null) { - s_logger.debug("There is already a Ovs element with service provider id " - + nsp.getId()); - return nsp; - } - element = new OvsProviderVO(nsp.getId()); - _ovsProviderDao.persist(element); - return nsp; - } + OvsProviderVO element = _ovsProviderDao.findByNspId(nsp.getId()); + if (element != null) { + s_logger.debug("There is already a Ovs element with service provider id " + + nsp.getId()); + return nsp; + } + element = new OvsProviderVO(nsp.getId()); + _ovsProviderDao.persist(element); + return nsp; + } protected PhysicalNetworkServiceProvider addDefaultVpcVirtualRouterToPhysicalNetwork(long physicalNetworkId) { diff --git a/server/src/com/cloud/network/NetworkUsageManagerImpl.java b/server/src/com/cloud/network/NetworkUsageManagerImpl.java index 021ae7f46e7..e9b039369aa 100755 --- a/server/src/com/cloud/network/NetworkUsageManagerImpl.java +++ b/server/src/com/cloud/network/NetworkUsageManagerImpl.java @@ -75,7 +75,6 @@ import com.cloud.resource.UnableDeleteHostException; import com.cloud.usage.UsageIPAddressVO; import com.cloud.user.Account; import com.cloud.user.AccountManager; -import com.cloud.user.AccountVO; import com.cloud.user.UserStatisticsVO; import com.cloud.user.dao.UserStatisticsDao; import com.cloud.utils.NumbersUtil; @@ -256,7 +255,7 @@ public class NetworkUsageManagerImpl extends ManagerBase implements NetworkUsage private int _interval; - private long mgmtSrvrId = MacAddress.getMacAddress().toLong(); + private final long mgmtSrvrId = MacAddress.getMacAddress().toLong(); protected DirectNetworkStatsListener(int interval) { _interval = interval; diff --git a/server/src/com/cloud/network/as/AutoScaleManager.java b/server/src/com/cloud/network/as/AutoScaleManager.java index 9c841d451be..410fb8f923e 100644 --- a/server/src/com/cloud/network/as/AutoScaleManager.java +++ b/server/src/com/cloud/network/as/AutoScaleManager.java @@ -20,7 +20,7 @@ public interface AutoScaleManager extends AutoScaleService { void cleanUpAutoScaleResources(Long accountId); - void doScaleUp(long groupId, Integer numVm); + void doScaleUp(long groupId, Integer numVm); - void doScaleDown(long groupId); + void doScaleDown(long groupId); } diff --git a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java index fd415b1fe90..0751b69343d 100644 --- a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java +++ b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java @@ -174,10 +174,10 @@ public class AutoScaleManagerImpl extends ManagerBase implements AutoScale UserVmService _userVmService; @Inject UserVmManager _userVmManager; - @Inject - LoadBalancerVMMapDao _LbVmMapDao; - @Inject - LoadBalancingRulesService _LoadBalancingRulesService; + @Inject + LoadBalancerVMMapDao _lbVmMapDao; + @Inject + LoadBalancingRulesService _loadBalancingRulesService; public List getSupportedAutoScaleCounters(long networkid) { String capability = _lbRulesMgr.getLBCapability(networkid, Capability.AutoScaleCounters.getName()); @@ -739,7 +739,7 @@ public class AutoScaleManagerImpl extends ManagerBase implements AutoScale } AutoScaleVmGroupVO vmGroupVO = new AutoScaleVmGroupVO(cmd.getLbRuleId(), zoneId, loadBalancer.getDomainId(), loadBalancer.getAccountId(), minMembers, maxMembers, - loadBalancer.getDefaultPortStart(), interval, null, cmd.getProfileId(), AutoScaleVmGroup.State_New); + loadBalancer.getDefaultPortStart(), interval, null, cmd.getProfileId(), AutoScaleVmGroup.State_New); vmGroupVO = checkValidityAndPersist(vmGroupVO, cmd.getScaleUpPolicyIds(), cmd.getScaleDownPolicyIds()); s_logger.info("Successfully created Autoscale Vm Group with Id: " + vmGroupVO.getId()); @@ -1202,36 +1202,36 @@ public class AutoScaleManagerImpl extends ManagerBase implements AutoScale } } - private boolean checkConditionUp(AutoScaleVmGroupVO asGroup, Integer numVm) { - // check maximum - Integer currentVM = _autoScaleVmGroupVmMapDao.countByGroup(asGroup.getId()); - Integer maxVm = asGroup.getMaxMembers(); - if (currentVM + numVm > maxVm) { - s_logger.warn("number of VM will greater than the maximum in this group if scaling up, so do nothing more"); - return false; - } - return true; + private boolean checkConditionUp(AutoScaleVmGroupVO asGroup, Integer numVm) { + // check maximum + Integer currentVM = _autoScaleVmGroupVmMapDao.countByGroup(asGroup.getId()); + Integer maxVm = asGroup.getMaxMembers(); + if (currentVM + numVm > maxVm) { + s_logger.warn("number of VM will greater than the maximum in this group if scaling up, so do nothing more"); + return false; + } + return true; } - - private boolean checkConditionDown(AutoScaleVmGroupVO asGroup) { - Integer currentVM = _autoScaleVmGroupVmMapDao.countByGroup(asGroup.getId()); - Integer minVm = asGroup.getMinMembers(); - if (currentVM - 1 < minVm) { - s_logger.warn("number of VM will less than the minimum in this group if scaling down, so do nothing more"); - return false; - } - return true; - } - - private long createNewVM(AutoScaleVmGroupVO asGroup) { - AutoScaleVmProfileVO profileVo = _autoScaleVmProfileDao.findById(asGroup.getProfileId()); - long templateId = profileVo.getTemplateId(); - long serviceOfferingId = profileVo.getServiceOfferingId(); - if (templateId == -1) { - return -1; - } - // create new VM into DB - try { + + private boolean checkConditionDown(AutoScaleVmGroupVO asGroup) { + Integer currentVM = _autoScaleVmGroupVmMapDao.countByGroup(asGroup.getId()); + Integer minVm = asGroup.getMinMembers(); + if (currentVM - 1 < minVm) { + s_logger.warn("number of VM will less than the minimum in this group if scaling down, so do nothing more"); + return false; + } + return true; + } + + private long createNewVM(AutoScaleVmGroupVO asGroup) { + AutoScaleVmProfileVO profileVo = _autoScaleVmProfileDao.findById(asGroup.getProfileId()); + long templateId = profileVo.getTemplateId(); + long serviceOfferingId = profileVo.getServiceOfferingId(); + if (templateId == -1) { + return -1; + } + // create new VM into DB + try { //Verify that all objects exist before passing them to the service Account owner = _accountService.getActiveAccountById(profileVo.getAccountId()); @@ -1258,26 +1258,31 @@ public class AutoScaleManagerImpl extends ManagerBase implements AutoScale } UserVm vm = null; - IpAddresses addrs = new IpAddresses(null, null); - if (zone.getNetworkType() == NetworkType.Basic) { - vm = _userVmService.createBasicSecurityGroupVirtualMachine(zone, serviceOffering, template, null, owner, "autoScaleVm-" + asGroup.getId() + "-" + getCurrentTimeStampString(), - "autoScaleVm-" + asGroup.getId() + "-" + getCurrentTimeStampString(), null, null, null, HypervisorType.XenServer, HTTPMethod.GET, null, null, null, null, true, null, null, null, null); + IpAddresses addrs = new IpAddresses(null, null); + if (zone.getNetworkType() == NetworkType.Basic) { + vm = _userVmService.createBasicSecurityGroupVirtualMachine(zone, serviceOffering, template, null, owner, "autoScaleVm-" + asGroup.getId() + "-" + + getCurrentTimeStampString(), + "autoScaleVm-" + asGroup.getId() + "-" + getCurrentTimeStampString(), null, null, null, HypervisorType.XenServer, HTTPMethod.GET, null, null, null, + null, true, null, null, null, null); } else { - if (zone.isSecurityGroupEnabled()) { + if (zone.isSecurityGroupEnabled()) { vm = _userVmService.createAdvancedSecurityGroupVirtualMachine(zone, serviceOffering, template, null, null, - owner, "autoScaleVm-" + asGroup.getId() + "-" + getCurrentTimeStampString(), "autoScaleVm-" + asGroup.getId() + "-" + getCurrentTimeStampString(), null, null, null, HypervisorType.XenServer, HTTPMethod.GET, null, null, null, null, true, null, null, null, null); + owner, "autoScaleVm-" + asGroup.getId() + "-" + getCurrentTimeStampString(), + "autoScaleVm-" + asGroup.getId() + "-" + getCurrentTimeStampString(), null, null, null, HypervisorType.XenServer, HTTPMethod.GET, null, null, + null, null, true, null, null, null, null); } else { - vm = _userVmService.createAdvancedVirtualMachine(zone, serviceOffering, template, null, owner, "autoScaleVm-" + asGroup.getId() + "-" + getCurrentTimeStampString(), "autoScaleVm-" + asGroup.getId() + "-" + getCurrentTimeStampString(), - null, null, null, HypervisorType.XenServer, HTTPMethod.GET, null, null, null, addrs, true, null, null, null, null); + vm = _userVmService.createAdvancedVirtualMachine(zone, serviceOffering, template, null, owner, "autoScaleVm-" + asGroup.getId() + "-" + + getCurrentTimeStampString(), "autoScaleVm-" + asGroup.getId() + "-" + getCurrentTimeStampString(), + null, null, null, HypervisorType.XenServer, HTTPMethod.GET, null, null, null, addrs, true, null, null, null, null); } } if (vm != null) { - return vm.getId(); + return vm.getId(); } else { - return -1; + return -1; } } catch (InsufficientCapacityException ex) { s_logger.info(ex); @@ -1286,26 +1291,26 @@ public class AutoScaleManagerImpl extends ManagerBase implements AutoScale } catch (ResourceUnavailableException ex) { s_logger.warn("Exception: ", ex); throw new ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage()); - } catch (ConcurrentOperationException ex) { + } catch (ConcurrentOperationException ex) { s_logger.warn("Exception: ", ex); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage()); } catch (ResourceAllocationException ex) { s_logger.warn("Exception: ", ex); throw new ServerApiException(ApiErrorCode.RESOURCE_ALLOCATION_ERROR, ex.getMessage()); } - } - - private String getCurrentTimeStampString(){ - Date current = new Date(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); - - return sdf.format(current); - } + } - private boolean startNewVM(long vmId) { - try { - CallContext.current().setEventDetails("Vm Id: "+vmId); - _userVmManager.startVirtualMachine(vmId, null, null); + private String getCurrentTimeStampString() { + Date current = new Date(); + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); + + return sdf.format(current); + } + + private boolean startNewVM(long vmId) { + try { + CallContext.current().setEventDetails("Vm Id: " + vmId); + _userVmManager.startVirtualMachine(vmId, null, null); } catch (ResourceUnavailableException ex) { s_logger.warn("Exception: ", ex); throw new ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage()); @@ -1315,7 +1320,7 @@ public class AutoScaleManagerImpl extends ManagerBase implements AutoScale } catch (InsufficientCapacityException ex) { StringBuilder message = new StringBuilder(ex.getMessage()); if (ex instanceof InsufficientServerCapacityException) { - if(((InsufficientServerCapacityException)ex).isAffinityApplied()){ + if (((InsufficientServerCapacityException)ex).isAffinityApplied()) { message.append(", Please check the affinity groups provided, there may not be sufficient capacity to follow them"); } } @@ -1323,144 +1328,143 @@ public class AutoScaleManagerImpl extends ManagerBase implements AutoScale s_logger.info(message.toString(), ex); throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, message.toString()); } - return true; - } - - private boolean assignLBruleToNewVm(long vmId, AutoScaleVmGroupVO asGroup) { - List lstVmId = new ArrayList(); - long lbId = asGroup.getLoadBalancerId(); - - List LbVmMapVos = _LbVmMapDao.listByLoadBalancerId(lbId); - if ((LbVmMapVos != null) && (LbVmMapVos.size() > 0)) { - for (LoadBalancerVMMapVO LbVmMapVo : LbVmMapVos) { - long instanceId = LbVmMapVo.getInstanceId(); - if (instanceId == vmId) { - s_logger.warn("the new VM is already mapped to LB rule. What's wrong?"); - return true; - } - } - } - lstVmId.add(new Long(vmId)); - return _LoadBalancingRulesService.assignToLoadBalancer(lbId, lstVmId); + return true; + } - } + private boolean assignLBruleToNewVm(long vmId, AutoScaleVmGroupVO asGroup) { + List lstVmId = new ArrayList(); + long lbId = asGroup.getLoadBalancerId(); - private long removeLBrule(AutoScaleVmGroupVO asGroup) { - long lbId = asGroup.getLoadBalancerId(); - long instanceId = -1; - List LbVmMapVos = _LbVmMapDao.listByLoadBalancerId(lbId); - if ((LbVmMapVos != null) && (LbVmMapVos.size() > 0)) { - for (LoadBalancerVMMapVO LbVmMapVo : LbVmMapVos) { - instanceId = LbVmMapVo.getInstanceId(); - } - } - // take last VM out of the list - List lstVmId = new ArrayList(); - if (instanceId != -1) - lstVmId.add(instanceId); - if (_LoadBalancingRulesService.removeFromLoadBalancer(lbId, lstVmId)) - return instanceId; - else - return -1; - } + List LbVmMapVos = _lbVmMapDao.listByLoadBalancerId(lbId); + if ((LbVmMapVos != null) && (LbVmMapVos.size() > 0)) { + for (LoadBalancerVMMapVO LbVmMapVo : LbVmMapVos) { + long instanceId = LbVmMapVo.getInstanceId(); + if (instanceId == vmId) { + s_logger.warn("the new VM is already mapped to LB rule. What's wrong?"); + return true; + } + } + } + lstVmId.add(new Long(vmId)); + return _loadBalancingRulesService.assignToLoadBalancer(lbId, lstVmId); - @Override - public void doScaleUp(long groupId, Integer numVm) { - AutoScaleVmGroupVO asGroup = _autoScaleVmGroupDao.findById(groupId); - if (asGroup == null) { - s_logger.error("Can not find the groupid " + groupId + " for scaling up"); - return; - } - if (!checkConditionUp(asGroup, numVm)) { - return; - } - for (int i = 0; i < numVm; i++) { - long vmId = createNewVM(asGroup); - if (vmId == -1) { - s_logger.error("Can not deploy new VM for scaling up in the group " - + asGroup.getId() + ". Waiting for next round"); - break; - } - if (startNewVM(vmId)) { - if (assignLBruleToNewVm(vmId, asGroup)) { - // persist to DB - AutoScaleVmGroupVmMapVO GroupVmVO = new AutoScaleVmGroupVmMapVO( - asGroup.getId(), vmId); - _autoScaleVmGroupVmMapDao.persist(GroupVmVO); - // update last_quiettime - List GroupPolicyVOs = _autoScaleVmGroupPolicyMapDao - .listByVmGroupId(groupId); - for (AutoScaleVmGroupPolicyMapVO GroupPolicyVO : GroupPolicyVOs) { - AutoScalePolicyVO vo = _autoScalePolicyDao - .findById(GroupPolicyVO.getPolicyId()); - if (vo.getAction().equals("scaleup")) { - vo.setLastQuiteTime(new Date()); - _autoScalePolicyDao.persist(vo); - break; - } - } - } else { - s_logger.error("Can not assign LB rule for this new VM"); - break; - } - } else { - s_logger.error("Can not deploy new VM for scaling up in the group " - + asGroup.getId() + ". Waiting for next round"); - break; - } - } - } + } - @Override - public void doScaleDown(final long groupId) { - AutoScaleVmGroupVO asGroup = _autoScaleVmGroupDao.findById(groupId); - if (asGroup == null) { - s_logger.error("Can not find the groupid " + groupId + " for scaling up"); - return; - } - if (!checkConditionDown(asGroup)) { - return; - } - final long vmId = removeLBrule(asGroup); - if (vmId != -1) { - long profileId = asGroup.getProfileId(); + private long removeLBrule(AutoScaleVmGroupVO asGroup) { + long lbId = asGroup.getLoadBalancerId(); + long instanceId = -1; + List LbVmMapVos = _lbVmMapDao.listByLoadBalancerId(lbId); + if ((LbVmMapVos != null) && (LbVmMapVos.size() > 0)) { + for (LoadBalancerVMMapVO LbVmMapVo : LbVmMapVos) { + instanceId = LbVmMapVo.getInstanceId(); + } + } + // take last VM out of the list + List lstVmId = new ArrayList(); + if (instanceId != -1) + lstVmId.add(instanceId); + if (_loadBalancingRulesService.removeFromLoadBalancer(lbId, lstVmId)) + return instanceId; + else + return -1; + } - // update group-vm mapping - _autoScaleVmGroupVmMapDao.remove(groupId, vmId); - // update last_quiettime - List GroupPolicyVOs = _autoScaleVmGroupPolicyMapDao.listByVmGroupId(groupId); - for (AutoScaleVmGroupPolicyMapVO GroupPolicyVO : GroupPolicyVOs) { - AutoScalePolicyVO vo = _autoScalePolicyDao.findById(GroupPolicyVO.getPolicyId()); - if (vo.getAction().equals("scaledown")) { - vo.setLastQuiteTime(new Date()); - _autoScalePolicyDao.persist(vo); - break; - } - } + @Override + public void doScaleUp(long groupId, Integer numVm) { + AutoScaleVmGroupVO asGroup = _autoScaleVmGroupDao.findById(groupId); + if (asGroup == null) { + s_logger.error("Can not find the groupid " + groupId + " for scaling up"); + return; + } + if (!checkConditionUp(asGroup, numVm)) { + return; + } + for (int i = 0; i < numVm; i++) { + long vmId = createNewVM(asGroup); + if (vmId == -1) { + s_logger.error("Can not deploy new VM for scaling up in the group " + + asGroup.getId() + ". Waiting for next round"); + break; + } + if (startNewVM(vmId)) { + if (assignLBruleToNewVm(vmId, asGroup)) { + // persist to DB + AutoScaleVmGroupVmMapVO GroupVmVO = new AutoScaleVmGroupVmMapVO( + asGroup.getId(), vmId); + _autoScaleVmGroupVmMapDao.persist(GroupVmVO); + // update last_quiettime + List GroupPolicyVOs = _autoScaleVmGroupPolicyMapDao + .listByVmGroupId(groupId); + for (AutoScaleVmGroupPolicyMapVO GroupPolicyVO : GroupPolicyVOs) { + AutoScalePolicyVO vo = _autoScalePolicyDao + .findById(GroupPolicyVO.getPolicyId()); + if (vo.getAction().equals("scaleup")) { + vo.setLastQuiteTime(new Date()); + _autoScalePolicyDao.persist(vo); + break; + } + } + } else { + s_logger.error("Can not assign LB rule for this new VM"); + break; + } + } else { + s_logger.error("Can not deploy new VM for scaling up in the group " + + asGroup.getId() + ". Waiting for next round"); + break; + } + } + } - // get destroyvmgrace param - AutoScaleVmProfileVO asProfile = _autoScaleVmProfileDao.findById(profileId); - Integer destroyVmGracePeriod = asProfile.getDestroyVmGraceperiod(); - if (destroyVmGracePeriod >= 0) { - _executor.schedule(new Runnable() { - @Override - public void run() { - try { + @Override + public void doScaleDown(final long groupId) { + AutoScaleVmGroupVO asGroup = _autoScaleVmGroupDao.findById(groupId); + if (asGroup == null) { + s_logger.error("Can not find the groupid " + groupId + " for scaling up"); + return; + } + if (!checkConditionDown(asGroup)) { + return; + } + final long vmId = removeLBrule(asGroup); + if (vmId != -1) { + long profileId = asGroup.getProfileId(); - _userVmManager.destroyVm(vmId); + // update group-vm mapping + _autoScaleVmGroupVmMapDao.remove(groupId, vmId); + // update last_quiettime + List GroupPolicyVOs = _autoScaleVmGroupPolicyMapDao.listByVmGroupId(groupId); + for (AutoScaleVmGroupPolicyMapVO GroupPolicyVO : GroupPolicyVOs) { + AutoScalePolicyVO vo = _autoScalePolicyDao.findById(GroupPolicyVO.getPolicyId()); + if (vo.getAction().equals("scaledown")) { + vo.setLastQuiteTime(new Date()); + _autoScalePolicyDao.persist(vo); + break; + } + } - } catch (ResourceUnavailableException e) { - e.printStackTrace(); - } catch (ConcurrentOperationException e) { - e.printStackTrace(); - } - } - }, destroyVmGracePeriod, TimeUnit.SECONDS); - } - } else { - s_logger.error("Can not remove LB rule for the VM being destroyed. Do nothing more."); - } - } - + // get destroyvmgrace param + AutoScaleVmProfileVO asProfile = _autoScaleVmProfileDao.findById(profileId); + Integer destroyVmGracePeriod = asProfile.getDestroyVmGraceperiod(); + if (destroyVmGracePeriod >= 0) { + _executor.schedule(new Runnable() { + @Override + public void run() { + try { + + _userVmManager.destroyVm(vmId); + + } catch (ResourceUnavailableException e) { + e.printStackTrace(); + } catch (ConcurrentOperationException e) { + e.printStackTrace(); + } + } + }, destroyVmGracePeriod, TimeUnit.SECONDS); + } + } else { + s_logger.error("Can not remove LB rule for the VM being destroyed. Do nothing more."); + } + } } diff --git a/server/src/com/cloud/network/element/CloudZonesNetworkElement.java b/server/src/com/cloud/network/element/CloudZonesNetworkElement.java index 3b3646aecfb..55cd5fa5cad 100644 --- a/server/src/com/cloud/network/element/CloudZonesNetworkElement.java +++ b/server/src/com/cloud/network/element/CloudZonesNetworkElement.java @@ -250,7 +250,7 @@ public class CloudZonesNetworkElement extends AdapterBase implements NetworkElem } @Override - public boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile vm, String SSHPublicKey) throws ResourceUnavailableException { + public boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile vm, String sshPublicKey) throws ResourceUnavailableException { // TODO Auto-generated method stub return false; } diff --git a/server/src/com/cloud/network/element/VirtualRouterElement.java b/server/src/com/cloud/network/element/VirtualRouterElement.java index 7833d241d6d..455e75ff91b 100755 --- a/server/src/com/cloud/network/element/VirtualRouterElement.java +++ b/server/src/com/cloud/network/element/VirtualRouterElement.java @@ -30,13 +30,11 @@ import org.apache.log4j.Logger; import com.google.gson.Gson; import org.apache.cloudstack.api.command.admin.router.ConfigureOvsElementCmd; - import org.apache.cloudstack.api.command.admin.router.ConfigureVirtualRouterElementCmd; import org.apache.cloudstack.api.command.admin.router.CreateVirtualRouterElementCmd; import org.apache.cloudstack.api.command.admin.router.ListOvsElementsCmd; import org.apache.cloudstack.api.command.admin.router.ListVirtualRouterElementsCmd; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; -import org.apache.log4j.Logger; import com.cloud.agent.api.to.LoadBalancerTO; import com.cloud.configuration.ConfigurationManager; @@ -103,23 +101,20 @@ import com.cloud.vm.VirtualMachine.State; import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.dao.DomainRouterDao; import com.cloud.vm.dao.UserVmDao; -import com.google.gson.Gson; - -import com.google.gson.Gson; @Local(value = {NetworkElement.class, FirewallServiceProvider.class, - DhcpServiceProvider.class, UserDataServiceProvider.class, - StaticNatServiceProvider.class, LoadBalancingServiceProvider.class, - PortForwardingServiceProvider.class, IpDeployer.class, - RemoteAccessVPNServiceProvider.class, NetworkMigrationResponder.class} ) + DhcpServiceProvider.class, UserDataServiceProvider.class, + StaticNatServiceProvider.class, LoadBalancingServiceProvider.class, + PortForwardingServiceProvider.class, IpDeployer.class, + RemoteAccessVPNServiceProvider.class, NetworkMigrationResponder.class}) public class VirtualRouterElement extends AdapterBase implements VirtualRouterElementService, DhcpServiceProvider, - UserDataServiceProvider, SourceNatServiceProvider, StaticNatServiceProvider, FirewallServiceProvider, + UserDataServiceProvider, SourceNatServiceProvider, StaticNatServiceProvider, FirewallServiceProvider, LoadBalancingServiceProvider, PortForwardingServiceProvider, RemoteAccessVPNServiceProvider, IpDeployer, NetworkMigrationResponder { private static final Logger s_logger = Logger.getLogger(VirtualRouterElement.class); - public static final AutoScaleCounterType AutoScaleCounterCpu = new AutoScaleCounterType("cpu"); - public static final AutoScaleCounterType AutoScaleCounterMemory = new AutoScaleCounterType("memory"); - protected static final Map> capabilities = setCapabilities(); + public static final AutoScaleCounterType AutoScaleCounterCpu = new AutoScaleCounterType("cpu"); + public static final AutoScaleCounterType AutoScaleCounterMemory = new AutoScaleCounterType("memory"); + protected static final Map> capabilities = setCapabilities(); @Inject NetworkDao _networksDao; @@ -153,8 +148,8 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl @Inject VirtualRouterProviderDao _vrProviderDao; @Inject - OvsProviderDao _ovsProviderDao; - @Inject + OvsProviderDao _ovsProviderDao; + @Inject IPAddressDao _ipAddressDao; protected boolean canHandle(Network network, Service service) { @@ -246,10 +241,10 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl return true; } - if (rules != null && rules.size() == 1 ) { + if (rules != null && rules.size() == 1) { // for VR no need to add default egress rule to DENY traffic if (rules.get(0).getTrafficType() == FirewallRule.TrafficType.Egress && rules.get(0).getType() == FirewallRule.FirewallRuleType.System && - ! _networkMgr.getNetworkEgressDefaultPolicy(config.getId())) + !_networkMgr.getNetworkEgressDefaultPolicy(config.getId())) return true; } @@ -568,13 +563,13 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl lbCapabilities.put(Capability.SupportedProtocols, "tcp, udp"); lbCapabilities.put(Capability.SupportedStickinessMethods, getHAProxyStickinessCapability()); lbCapabilities.put(Capability.LbSchemes, LoadBalancerContainer.Scheme.Public.toString()); - + //specifies that LB rules can support autoscaling and the list of counters it supports AutoScaleCounter counter; List counterList = new ArrayList(); - counter = new AutoScaleCounter(AutoScaleCounterCpu); + counter = new AutoScaleCounter(AutoScaleCounterCpu); counterList.add(counter); - counter = new AutoScaleCounter(AutoScaleCounterMemory); + counter = new AutoScaleCounter(AutoScaleCounterMemory); counterList.add(counter); Gson gson = new Gson(); String autoScaleCounterList = gson.toJson(counterList); @@ -691,7 +686,7 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl } @Override - public boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile vm, String SSHPublicKey) throws ResourceUnavailableException { + public boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile vm, String sshPublicKey) throws ResourceUnavailableException { if (!canHandle(network, null)) { return false; } @@ -704,7 +699,7 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl @SuppressWarnings("unchecked") VirtualMachineProfile uservm = vm; - return _routerMgr.saveSSHPublicKeyToRouter(network, nic, uservm, routers, SSHPublicKey); + return _routerMgr.saveSSHPublicKeyToRouter(network, nic, uservm, routers, sshPublicKey); } @Override @@ -747,20 +742,20 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl return element; } - @Override - public OvsProvider configure(ConfigureOvsElementCmd cmd) { - OvsProviderVO element = _ovsProviderDao.findById(cmd.getId()); - if (element == null) { - s_logger.debug("Can't find Ovs element with network service provider id " - + cmd.getId()); - return null; - } + @Override + public OvsProvider configure(ConfigureOvsElementCmd cmd) { + OvsProviderVO element = _ovsProviderDao.findById(cmd.getId()); + if (element == null) { + s_logger.debug("Can't find Ovs element with network service provider id " + + cmd.getId()); + return null; + } - element.setEnabled(cmd.getEnabled()); - _ovsProviderDao.persist(element); + element.setEnabled(cmd.getEnabled()); + _ovsProviderDao.persist(element); - return element; - } + return element; + } @Override public VirtualRouterProvider addElement(Long nspId, Type providerType) { @@ -992,25 +987,25 @@ public class VirtualRouterElement extends AdapterBase implements VirtualRouterEl return sc.list(); } - @Override - public List searchForOvsElement(ListOvsElementsCmd cmd) { - Long id = cmd.getId(); - Long nspId = cmd.getNspId(); - Boolean enabled = cmd.getEnabled(); - QueryBuilder sc = QueryBuilder.create(OvsProviderVO.class); + @Override + public List searchForOvsElement(ListOvsElementsCmd cmd) { + Long id = cmd.getId(); + Long nspId = cmd.getNspId(); + Boolean enabled = cmd.getEnabled(); + QueryBuilder sc = QueryBuilder.create(OvsProviderVO.class); - if (id != null) { - sc.and(sc.entity().getId(), Op.EQ, id); - } - if (nspId != null) { - sc.and(sc.entity().getNspId(), Op.EQ, nspId); - } - if (enabled != null) { - sc.and(sc.entity().isEnabled(), Op.EQ, enabled); - } + if (id != null) { + sc.and(sc.entity().getId(), Op.EQ, id); + } + if (nspId != null) { + sc.and(sc.entity().getNspId(), Op.EQ, nspId); + } + if (enabled != null) { + sc.and(sc.entity().isEnabled(), Op.EQ, enabled); + } - return sc.list(); - } + return sc.list(); + } @Override public boolean verifyServicesCombination(Set services) { diff --git a/server/src/com/cloud/network/guru/ControlNetworkGuru.java b/server/src/com/cloud/network/guru/ControlNetworkGuru.java index 08cc3e6fd30..1de12b7ea19 100755 --- a/server/src/com/cloud/network/guru/ControlNetworkGuru.java +++ b/server/src/com/cloud/network/guru/ControlNetworkGuru.java @@ -66,11 +66,11 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu String _cidr; String _gateway; - private static final TrafficType[] _trafficTypes = {TrafficType.Control}; + private static final TrafficType[] TrafficTypes = {TrafficType.Control}; @Override public boolean isMyTrafficType(TrafficType type) { - for (TrafficType t : _trafficTypes) { + for (TrafficType t : TrafficTypes) { if (t == type) { return true; } @@ -80,7 +80,7 @@ public class ControlNetworkGuru extends PodBasedNetworkGuru implements NetworkGu @Override public TrafficType[] getSupportedTrafficType() { - return _trafficTypes; + return TrafficTypes; } protected boolean canHandle(NetworkOffering offering) { diff --git a/server/src/com/cloud/network/guru/DirectNetworkGuru.java b/server/src/com/cloud/network/guru/DirectNetworkGuru.java index 0fec81f7093..e570dddfb9a 100755 --- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java +++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java @@ -98,11 +98,11 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru { @Inject IpAddressManager _ipAddrMgr; - private static final TrafficType[] _trafficTypes = {TrafficType.Guest}; + private static final TrafficType[] TrafficTypes = {TrafficType.Guest}; @Override public boolean isMyTrafficType(TrafficType type) { - for (TrafficType t : _trafficTypes) { + for (TrafficType t : TrafficTypes) { if (t == type) { return true; } @@ -112,7 +112,7 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru { @Override public TrafficType[] getSupportedTrafficType() { - return _trafficTypes; + return TrafficTypes; } protected boolean canHandle(NetworkOffering offering, DataCenter dc) { diff --git a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java index bea94285456..ec02a30ae41 100644 --- a/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java +++ b/server/src/com/cloud/network/guru/ExternalGuestNetworkGuru.java @@ -26,7 +26,6 @@ import org.apache.log4j.Logger; import org.apache.cloudstack.context.CallContext; import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationService; -import com.cloud.configuration.Config; import com.cloud.dc.DataCenter; import com.cloud.dc.DataCenter.NetworkType; import com.cloud.dc.dao.DataCenterDao; diff --git a/server/src/com/cloud/network/guru/GuestNetworkGuru.java b/server/src/com/cloud/network/guru/GuestNetworkGuru.java index 1fd3e7fb397..a759951b85e 100755 --- a/server/src/com/cloud/network/guru/GuestNetworkGuru.java +++ b/server/src/com/cloud/network/guru/GuestNetworkGuru.java @@ -117,7 +117,7 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur "If true, when account has dedicated guest vlan range(s), once the vlans dedicated to the account have been consumed vlans will be allocated from the system pool", false, ConfigKey.Scope.Account); - private static final TrafficType[] _trafficTypes = {TrafficType.Guest}; + private static final TrafficType[] TrafficTypes = {TrafficType.Guest}; // Currently set to anything except STT for the Nicira integration. protected IsolationMethod[] _isolationMethods; @@ -132,7 +132,7 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur @Override public boolean isMyTrafficType(TrafficType type) { - for (TrafficType t : _trafficTypes) { + for (TrafficType t : TrafficTypes) { if (t == type) { return true; } @@ -142,7 +142,7 @@ public abstract class GuestNetworkGuru extends AdapterBase implements NetworkGur @Override public TrafficType[] getSupportedTrafficType() { - return _trafficTypes; + return TrafficTypes; } public boolean isMyIsolationMethod(PhysicalNetwork physicalNetwork) { diff --git a/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java b/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java index 66b80c9e6b5..84c79d0e3a4 100755 --- a/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java +++ b/server/src/com/cloud/network/guru/PodBasedNetworkGuru.java @@ -57,11 +57,11 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru { StorageNetworkManager _sNwMgr; Random _rand = new Random(System.currentTimeMillis()); - private static final TrafficType[] _trafficTypes = {TrafficType.Management}; + private static final TrafficType[] TrafficTypes = {TrafficType.Management}; @Override public boolean isMyTrafficType(TrafficType type) { - for (TrafficType t : _trafficTypes) { + for (TrafficType t : TrafficTypes) { if (t == type) { return true; } @@ -71,7 +71,7 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru { @Override public TrafficType[] getSupportedTrafficType() { - return _trafficTypes; + return TrafficTypes; } @Override diff --git a/server/src/com/cloud/network/guru/PrivateNetworkGuru.java b/server/src/com/cloud/network/guru/PrivateNetworkGuru.java index 1710c4db470..35b7b5c5061 100644 --- a/server/src/com/cloud/network/guru/PrivateNetworkGuru.java +++ b/server/src/com/cloud/network/guru/PrivateNetworkGuru.java @@ -66,7 +66,7 @@ public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru { @Inject EntityManager _entityMgr; - private static final TrafficType[] _trafficTypes = {TrafficType.Guest}; + private static final TrafficType[] TrafficTypes = {TrafficType.Guest}; protected PrivateNetworkGuru() { super(); @@ -74,7 +74,7 @@ public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru { @Override public boolean isMyTrafficType(TrafficType type) { - for (TrafficType t : _trafficTypes) { + for (TrafficType t : TrafficTypes) { if (t == type) { return true; } @@ -84,7 +84,7 @@ public class PrivateNetworkGuru extends AdapterBase implements NetworkGuru { @Override public TrafficType[] getSupportedTrafficType() { - return _trafficTypes; + return TrafficTypes; } protected boolean canHandle(NetworkOffering offering, DataCenter dc) { diff --git a/server/src/com/cloud/network/guru/PublicNetworkGuru.java b/server/src/com/cloud/network/guru/PublicNetworkGuru.java index 58816af87b6..34e97d34423 100755 --- a/server/src/com/cloud/network/guru/PublicNetworkGuru.java +++ b/server/src/com/cloud/network/guru/PublicNetworkGuru.java @@ -74,11 +74,11 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru { @Inject IpAddressManager _ipAddrMgr; - private static final TrafficType[] _trafficTypes = {TrafficType.Public}; + private static final TrafficType[] TrafficTypes = {TrafficType.Public}; @Override public boolean isMyTrafficType(TrafficType type) { - for (TrafficType t : _trafficTypes) { + for (TrafficType t : TrafficTypes) { if (t == type) { return true; } @@ -88,7 +88,7 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru { @Override public TrafficType[] getSupportedTrafficType() { - return _trafficTypes; + return TrafficTypes; } protected boolean canHandle(NetworkOffering offering) { diff --git a/server/src/com/cloud/network/guru/StorageNetworkGuru.java b/server/src/com/cloud/network/guru/StorageNetworkGuru.java index 2c2bd9096da..33a5569d03d 100755 --- a/server/src/com/cloud/network/guru/StorageNetworkGuru.java +++ b/server/src/com/cloud/network/guru/StorageNetworkGuru.java @@ -56,11 +56,11 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGu super(); } - private static final TrafficType[] _trafficTypes = {TrafficType.Storage}; + private static final TrafficType[] TrafficTypes = {TrafficType.Storage}; @Override public boolean isMyTrafficType(TrafficType type) { - for (TrafficType t : _trafficTypes) { + for (TrafficType t : TrafficTypes) { if (t == type) { return true; } @@ -70,7 +70,7 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGu @Override public TrafficType[] getSupportedTrafficType() { - return _trafficTypes; + return TrafficTypes; } protected boolean canHandle(NetworkOffering offering) { diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java index aab4c6ba273..821427425c3 100755 --- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java +++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java @@ -915,8 +915,8 @@ public class LoadBalancingRulesManagerImpl extends ManagerBase implements if (provider == null || provider.size() == 0) { return false; } - if (provider.get(0) == Provider.Netscaler || provider.get(0) == Provider.F5BigIp || - provider.get(0) == Provider.VirtualRouter) { + if (provider.get(0) == Provider.Netscaler || provider.get(0) == Provider.F5BigIp || + provider.get(0) == Provider.VirtualRouter) { return true; } return false; diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java index 86145fac6b5..e838530f844 100644 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManager.java @@ -83,7 +83,7 @@ public interface VirtualNetworkApplianceManager extends Manager, VirtualNetworkA boolean savePasswordToRouter(Network network, NicProfile nic, VirtualMachineProfile profile, List routers) throws ResourceUnavailableException; - boolean saveSSHPublicKeyToRouter(Network network, NicProfile nic, VirtualMachineProfile profile, List routers, String SSHPublicKey) + boolean saveSSHPublicKeyToRouter(Network network, NicProfile nic, VirtualMachineProfile profile, List routers, String sshPublicKey) throws ResourceUnavailableException; boolean saveUserDataToRouter(Network network, NicProfile nic, VirtualMachineProfile profile, List routers) diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java index 9ea36386bf5..c2902b1c7f8 100755 --- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java +++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java @@ -201,8 +201,8 @@ import com.cloud.network.router.VirtualRouter.RedundantState; import com.cloud.network.router.VirtualRouter.Role; import com.cloud.network.rules.FirewallRule; import com.cloud.network.rules.FirewallRule.Purpose; -import com.cloud.network.rules.LoadBalancerContainer.Scheme; import com.cloud.network.rules.FirewallRuleVO; +import com.cloud.network.rules.LoadBalancerContainer.Scheme; import com.cloud.network.rules.PortForwardingRule; import com.cloud.network.rules.RulesManager; import com.cloud.network.rules.StaticNat; @@ -400,7 +400,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V int _routerCpuMHz; int _retry = 2; String _instance; - String _mgmt_cidr; + String _mgmtCidr; int _routerStatsInterval = 300; int _routerCheckInterval = 30; @@ -409,7 +409,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V private String _dnsBasicZoneUpdates = "all"; private final Set _guestOSNeedGatewayOnNonDefaultNetwork = new HashSet(); - private boolean _disable_rp_filter = false; + private boolean _disableRpFilter = false; int _routerExtraPublicNics = 2; private int _usageAggregationRange = 1440; private String _usageTimeZone = "GMT"; @@ -533,7 +533,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V @Override public boolean saveSSHPublicKeyToRouter(Network network, final NicProfile nic, VirtualMachineProfile profile, List routers, - final String SSHPublicKey) throws ResourceUnavailableException { + final String sshPublicKey) throws ResourceUnavailableException { final UserVmVO vm = _userVmDao.findById(profile.getVirtualMachine().getId()); _userVmDao.loadDetails(vm); @@ -549,7 +549,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V if (template != null && template.getEnablePassword()) { createPasswordCommand(router, updatedProfile, nicVo, cmds); } - createVmDataCommand(router, vm, nicVo, SSHPublicKey, cmds); + createVmDataCommand(router, vm, nicVo, sshPublicKey, cmds); return sendCommandsToRouter(router, cmds); } }); @@ -714,7 +714,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V String rpValue = configs.get("network.disable.rpfilter"); if (rpValue != null && rpValue.equalsIgnoreCase("true")) { - _disable_rp_filter = true; + _disableRpFilter = true; } _dnsBasicZoneUpdates = String.valueOf(_configDao.getValue(Config.DnsBasicZoneUpdates.key())); @@ -1278,7 +1278,8 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V "Virtual router (name: " + router.getHostName() + ", id: " + router.getId() + " and router (name: " + dupRouter.getHostName() + ", id: " + router.getId() + ") are both in MASTER state! If the problem persist, restart both of routers. "; _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER, router.getDataCenterId(), router.getPodIdToDeployIn(), title, context); - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER, dupRouter.getDataCenterId(), dupRouter.getPodIdToDeployIn(), title, context); + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER, dupRouter.getDataCenterId(), dupRouter.getPodIdToDeployIn(), title, + context); s_logger.warn(context); } else { networkRouterMaps.put(routerGuestNtwkId, router); @@ -1356,8 +1357,8 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V } } - private final int DEFAULT_PRIORITY = 100; - private final int DEFAULT_DELTA = 2; + private final static int DEFAULT_PRIORITY = 100; + private final static int DEFAULT_DELTA = 2; protected int getUpdatedPriority(Network guestNetwork, List routers, DomainRouterVO exclude) throws InsufficientVirtualNetworkCapcityException { int priority; @@ -2053,9 +2054,9 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V // always add management explicit route, for basic networking setup, DomR may have two interfaces while both // are on the same subnet - _mgmt_cidr = _configDao.getValue(Config.ManagementNetwork.key()); - if (NetUtils.isValidCIDR(_mgmt_cidr)) { - buf.append(" mgmtcidr=").append(_mgmt_cidr); + _mgmtCidr = _configDao.getValue(Config.ManagementNetwork.key()); + if (NetUtils.isValidCIDR(_mgmtCidr)) { + buf.append(" mgmtcidr=").append(_mgmtCidr); buf.append(" localgw=").append(dest.getPod().getGateway()); } @@ -2081,28 +2082,28 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V String rpValue = _configDao.getValue(Config.NetworkRouterRpFilter.key()); if (rpValue != null && rpValue.equalsIgnoreCase("true")) { - _disable_rp_filter = true; + _disableRpFilter = true; } else { - _disable_rp_filter = false; + _disableRpFilter = false; } String rpFilter = " "; String type = null; if (router.getVpcId() != null) { type = "vpcrouter"; - if (_disable_rp_filter) { + if (_disableRpFilter) { rpFilter = " disable_rp_filter=true"; } } else if (!publicNetwork) { type = "dhcpsrvr"; } else { type = "router"; - if (_disable_rp_filter) { + if (_disableRpFilter) { rpFilter = " disable_rp_filter=true"; } } - if (_disable_rp_filter) { + if (_disableRpFilter) { rpFilter = " disable_rp_filter=true"; } @@ -3571,7 +3572,8 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V String context = "Virtual router (name: " + disconnectedRouter.getInstanceName() + ", id: " + disconnectedRouter.getId() + ") would be stopped after connecting back, due to: " + reason; - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER, disconnectedRouter.getDataCenterId(), disconnectedRouter.getPodIdToDeployIn(), title, context); + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER, disconnectedRouter.getDataCenterId(), disconnectedRouter.getPodIdToDeployIn(), title, + context); disconnectedRouter.setStopPending(true); disconnectedRouter = _routerDao.persist(disconnectedRouter); @@ -4138,7 +4140,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase implements V // Compares MS version and router version private boolean checkRouterVersion(VirtualRouter router) { String trimmedVersion = Version.trimRouterVersion(router.getTemplateVersion()); - return (Version.compare(trimmedVersion, _minVRVersion) >= 0); + return (Version.compare(trimmedVersion, MinVRVersion) >= 0); } private List rebootRouters(List routers) { diff --git a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java index 1c560c42177..fbcd461b759 100644 --- a/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java +++ b/server/src/com/cloud/network/vpc/NetworkACLServiceImpl.java @@ -123,7 +123,7 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ Account caller = CallContext.current().getCallingAccount(); - if(networkId != null){ + if (networkId != null) { SearchBuilder network = _networkDao.createSearchBuilder(); network.and("networkId", network.entity().getId(), Op.EQ); sb.join("networkJoin", network, sb.entity().getId(), network.entity().getNetworkACLId(), JoinBuilder.JoinType.INNER); @@ -138,9 +138,9 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ sc.setParameters("name", name); } - if(vpcId != null){ + if (vpcId != null) { Vpc vpc = _entityMgr.findById(Vpc.class, vpcId); - if(vpc == null){ + if (vpc == null) { throw new InvalidParameterValueException("Unable to find VPC"); } _accountMgr.checkAccess(caller, null, true, vpc); @@ -158,9 +158,9 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ Long projectId = cmd.getProjectId(); boolean listAll = cmd.listAll(); Ternary domainIdRecursiveListProject = new Ternary(domainId, isRecursive, null); + ListProjectResourcesCriteria>(domainId, isRecursive, null); _accountMgr.buildACLSearchParameters(caller, id, accountName, projectId, permittedAccounts, domainIdRecursiveListProject, - listAll, false); + listAll, false); domainId = domainIdRecursiveListProject.first(); isRecursive = domainIdRecursiveListProject.second(); ListProjectResourcesCriteria listProjectResourcesCriteria = domainIdRecursiveListProject.third(); @@ -489,7 +489,7 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ sb.join("tagSearch", tagSearch, sb.entity().getId(), tagSearch.entity().getResourceId(), JoinBuilder.JoinType.INNER); } - if(aclId == null){ + if (aclId == null) { //Join with network_acl table when aclId is not specified to list acl_items within permitted VPCs SearchBuilder vpcSearch = _networkACLDao.createSearchBuilder(); vpcSearch.and("vpcId", vpcSearch.entity().getVpcId(), Op.IN); @@ -511,12 +511,12 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ sc.setParameters("trafficType", trafficType); } - if(aclId != null){ + if (aclId != null) { // Get VPC and check access NetworkACL acl = _networkACLDao.findById(aclId); - if(acl.getVpcId() != 0){ + if (acl.getVpcId() != 0) { Vpc vpc = _vpcDao.findById(acl.getVpcId()); - if(vpc == null){ + if (vpc == null) { throw new InvalidParameterValueException("Unable to find VPC associated with acl"); } _accountMgr.checkAccess(caller, null, true, vpc); @@ -525,7 +525,6 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ } else { //ToDo: Add accountId to network_acl_item table for permission check - // aclId is not specified // List permitted VPCs and filter aclItems List permittedAccounts = new ArrayList(); @@ -535,9 +534,9 @@ public class NetworkACLServiceImpl extends ManagerBase implements NetworkACLServ Long projectId = cmd.getProjectId(); boolean listAll = cmd.listAll(); Ternary domainIdRecursiveListProject = new Ternary(domainId, isRecursive, null); + ListProjectResourcesCriteria>(domainId, isRecursive, null); _accountMgr.buildACLSearchParameters(caller, id, accountName, projectId, permittedAccounts, domainIdRecursiveListProject, - listAll, false); + listAll, false); domainId = domainIdRecursiveListProject.first(); isRecursive = domainIdRecursiveListProject.second(); ListProjectResourcesCriteria listProjectResourcesCriteria = domainIdRecursiveListProject.third(); diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java index 7c5041b03f7..c961ce16a1a 100755 --- a/server/src/com/cloud/resource/ResourceManagerImpl.java +++ b/server/src/com/cloud/resource/ResourceManagerImpl.java @@ -120,7 +120,6 @@ import com.cloud.org.Grouping.AllocationState; import com.cloud.org.Managed; import com.cloud.serializer.GsonHelper; import com.cloud.storage.GuestOSCategoryVO; -import com.cloud.storage.GuestOsCategory; import com.cloud.storage.StorageManager; import com.cloud.storage.StoragePool; import com.cloud.storage.StoragePoolHostVO; @@ -155,7 +154,7 @@ import com.cloud.utils.fsm.NoTransitionException; import com.cloud.utils.net.Ip; import com.cloud.utils.net.NetUtils; import com.cloud.utils.ssh.SSHCmdHelper; -import com.cloud.utils.ssh.sshException; +import com.cloud.utils.ssh.SshException; import com.cloud.vm.VMInstanceVO; import com.cloud.vm.VirtualMachine.State; import com.cloud.vm.VirtualMachineManager; @@ -223,8 +222,8 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager, return _discoverers; } - public void setDiscoverers(List _discoverers) { - this._discoverers = _discoverers; + public void setDiscoverers(List discoverers) { + _discoverers = discoverers; } @Inject @@ -2066,7 +2065,7 @@ public class ResourceManagerImpl extends ManagerBase implements ResourceManager, try { SSHCmdHelper.sshExecuteCmdOneShot(connection, "service cloudstack-agent restart"); - } catch (sshException e) { + } catch (SshException e) { return false; } } diff --git a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java index 6e5dce6bd3f..98912ace596 100755 --- a/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java +++ b/server/src/com/cloud/resourcelimit/ResourceLimitManagerImpl.java @@ -47,7 +47,6 @@ import com.cloud.configuration.Resource.ResourceOwnerType; import com.cloud.configuration.Resource.ResourceType; import com.cloud.configuration.ResourceCount; import com.cloud.configuration.ResourceCountVO; -import com.cloud.configuration.ResourceLimit; import com.cloud.configuration.ResourceLimitVO; import com.cloud.configuration.dao.ResourceCountDao; import com.cloud.configuration.dao.ResourceLimitDao; @@ -253,7 +252,8 @@ public class ResourceLimitManagerImpl extends ManagerBase implements ResourceLim long numToDecrement = (delta.length == 0) ? 1 : delta[0].longValue(); if (!updateResourceCountForAccount(accountId, type, false, numToDecrement)) { - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_UPDATE_RESOURCE_COUNT, 0L, 0L, "Failed to decrement resource count of type " + type + " for account id=" + + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_UPDATE_RESOURCE_COUNT, 0L, 0L, "Failed to decrement resource count of type " + type + + " for account id=" + accountId, "Failed to decrement resource count of type " + type + " for account id=" + accountId + "; use updateResourceCount API to recalculate/fix the problem"); } @@ -961,7 +961,7 @@ public class ResourceLimitManagerImpl extends ManagerBase implements ResourceLim // TODO boilerplate code. boolean displayflag = (displayResource == null) || (displayResource != null && displayResource); - if(displayflag){ + if (displayflag) { checkResourceLimit(account, type, count); } } @@ -971,7 +971,7 @@ public class ResourceLimitManagerImpl extends ManagerBase implements ResourceLim // 1. If its null assume displayResource = 1 // 2. If its not null then increment if displayResource = 1 - if(displayResource == null || (displayResource != null && displayResource)){ + if (displayResource == null || (displayResource != null && displayResource)) { incrementResourceCount(accountId, type, delta); } } @@ -981,7 +981,7 @@ public class ResourceLimitManagerImpl extends ManagerBase implements ResourceLim // 1. If its null assume displayResource = 1 // 2. If its not null then decrement if displayResource = 1 - if(displayResource == null || (displayResource != null && displayResource)){ + if (displayResource == null || (displayResource != null && displayResource)) { decrementResourceCount(accountId, type, delta); } } @@ -990,13 +990,14 @@ public class ResourceLimitManagerImpl extends ManagerBase implements ResourceLim public void changeResourceCount(long accountId, ResourceType type, Boolean displayResource, Long... delta) { // meaning that the display flag is not changed so neither increment or decrement - if(displayResource == null) return; + if (displayResource == null) + return; // Increment because the display is turned on. - if(displayResource){ - // checkResourceLimit((Account)_accountDao.findById(accountId), type, delta); + if (displayResource) { + // checkResourceLimit((Account)_accountDao.findById(accountId), type, delta); incrementResourceCount(accountId, type, delta); - }else{ + } else { decrementResourceCount(accountId, type, delta); } } diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java index f907831767d..6cddc7162b0 100755 --- a/server/src/com/cloud/server/ConfigurationServerImpl.java +++ b/server/src/com/cloud/server/ConfigurationServerImpl.java @@ -283,7 +283,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio long startIPLong = NetUtils.ip2Long(startIp); long endIPLong = NetUtils.ip2Long(endIp); config.savePublicIPRange(TransactionLegacy.currentTxn(), startIPLong, endIPLong, vlan.getDataCenterId(), vlan.getId(), vlan.getNetworkId(), - vlan.getPhysicalNetworkId()); + vlan.getPhysicalNetworkId()); } }); @@ -370,16 +370,16 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio if (resouce == null) continue; if (resouce.equalsIgnoreCase("com.cloud.hypervisor.xen.resource.XenServer56Resource") || - resouce.equalsIgnoreCase("com.cloud.hypervisor.xen.resource.XenServer56FP1Resource") || - resouce.equalsIgnoreCase("com.cloud.hypervisor.xen.resource.XenServer56SP2Resource") || - resouce.equalsIgnoreCase("com.cloud.hypervisor.xen.resource.XenServer600Resource") || - resouce.equalsIgnoreCase("com.cloud.hypervisor.xen.resource.XenServer602Resource")) { + resouce.equalsIgnoreCase("com.cloud.hypervisor.xen.resource.XenServer56FP1Resource") || + resouce.equalsIgnoreCase("com.cloud.hypervisor.xen.resource.XenServer56SP2Resource") || + resouce.equalsIgnoreCase("com.cloud.hypervisor.xen.resource.XenServer600Resource") || + resouce.equalsIgnoreCase("com.cloud.hypervisor.xen.resource.XenServer602Resource")) { pvdriverversion = "xenserver56"; break; } } _configDao.getValueAndInitIfNotExist(Config.XenPVdriverVersion.key(), Config.XenPVdriverVersion.getCategory(), pvdriverversion, - Config.XenPVdriverVersion.getDescription()); + Config.XenPVdriverVersion.getDescription()); sql = "select id from vm_template where hypervisor_type='XenServer' and format!='ISO' and removed is null"; pstmt = txn.prepareAutoCloseStatement(sql); rs2 = pstmt.executeQuery(); @@ -455,8 +455,8 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio } // insert system user insertSql = - "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created, user.default)" - + " VALUES (1, UUID(), 'system', RAND(), 1, 'system', 'cloud', now(), 1)"; + "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created, user.default)" + + " VALUES (1, UUID(), 'system', RAND(), 1, 'system', 'cloud', now(), 1)"; txn = TransactionLegacy.currentTxn(); try { PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql); @@ -473,7 +473,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio // create an account for the admin user first insertSql = - "INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, account.default) VALUES (" + id + ", UUID(), '" + username + "', '1', '1', 1)"; + "INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, account.default) VALUES (" + id + ", UUID(), '" + username + "', '1', '1', 1)"; txn = TransactionLegacy.currentTxn(); try { PreparedStatement stmt = txn.prepareAutoCloseStatement(insertSql); @@ -483,7 +483,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio // now insert the user insertSql = - "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created, state, user.default) " + "VALUES (" + id + + "INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, created, state, user.default) " + "VALUES (" + id + ", UUID(), '" + username + "', RAND(), 2, '" + firstname + "','" + lastname + "',now(), 'disabled', 1)"; txn = TransactionLegacy.currentTxn(); @@ -511,11 +511,11 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio // save default security group if (tableName.equals("security_group")) { insertSql = - "INSERT INTO " + tableName + " (uuid, name, description, account_id, domain_id) " + "VALUES (UUID(), 'default', 'Default Security Group', 2, 1)"; + "INSERT INTO " + tableName + " (uuid, name, description, account_id, domain_id) " + "VALUES (UUID(), 'default', 'Default Security Group', 2, 1)"; } else { insertSql = - "INSERT INTO " + tableName + " (name, description, account_id, domain_id, account_name) " + - "VALUES ('default', 'Default Security Group', 2, 1, 'admin')"; + "INSERT INTO " + tableName + " (name, description, account_id, domain_id, account_name) " + + "VALUES ('default', 'Default Security Group', 2, 1, 'admin')"; } txn = TransactionLegacy.currentTxn(); @@ -618,8 +618,8 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio } String base64Keystore = getBase64Keystore(keystorePath); ConfigurationVO configVO = - new ConfigurationVO("Hidden", "DEFAULT", "management-server", "ssl.keystore", DBEncryptionUtil.encrypt(base64Keystore), - "SSL Keystore for the management servers"); + new ConfigurationVO("Hidden", "DEFAULT", "management-server", "ssl.keystore", DBEncryptionUtil.encrypt(base64Keystore), + "SSL Keystore for the management servers"); _configDao.persist(configVO); s_logger.info("Stored SSL keystore to database."); } else if (null != keystoreFile && keystoreFile.exists()) { // and dbExisted @@ -675,9 +675,9 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio try { String rpassword = PasswordGenerator.generatePresharedKey(8); String wSql = - "INSERT INTO `cloud`.`configuration` (category, instance, component, name, value, description) " + - "VALUES ('Secure','DEFAULT', 'management-server','system.vm.password', '" + DBEncryptionUtil.encrypt(rpassword) + - "','randmon password generated each management server starts for system vm')"; + "INSERT INTO `cloud`.`configuration` (category, instance, component, name, value, description) " + + "VALUES ('Secure','DEFAULT', 'management-server','system.vm.password', '" + DBEncryptionUtil.encrypt(rpassword) + + "','randmon password generated each management server starts for system vm')"; PreparedStatement stmt = txn.prepareAutoCloseStatement(wSql); stmt.executeUpdate(wSql); s_logger.info("Updated systemvm password in database"); @@ -752,13 +752,13 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio String publicKey = new String(arr2).trim(); String insertSql1 = - "INSERT INTO `cloud`.`configuration` (category, instance, component, name, value, description) " + - "VALUES ('Hidden','DEFAULT', 'management-server','ssh.privatekey', '" + DBEncryptionUtil.encrypt(privateKey) + - "','Private key for the entire CloudStack')"; + "INSERT INTO `cloud`.`configuration` (category, instance, component, name, value, description) " + + "VALUES ('Hidden','DEFAULT', 'management-server','ssh.privatekey', '" + DBEncryptionUtil.encrypt(privateKey) + + "','Private key for the entire CloudStack')"; String insertSql2 = - "INSERT INTO `cloud`.`configuration` (category, instance, component, name, value, description) " + - "VALUES ('Hidden','DEFAULT', 'management-server','ssh.publickey', '" + DBEncryptionUtil.encrypt(publicKey) + - "','Public key for the entire CloudStack')"; + "INSERT INTO `cloud`.`configuration` (category, instance, component, name, value, description) " + + "VALUES ('Hidden','DEFAULT', 'management-server','ssh.publickey', '" + DBEncryptionUtil.encrypt(publicKey) + + "','Public key for the entire CloudStack')"; TransactionLegacy txn = TransactionLegacy.currentTxn(); try { @@ -891,9 +891,9 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio String password = PasswordGenerator.generateRandomPassword(12); String insertSql1 = - "INSERT INTO `cloud`.`configuration` (category, instance, component, name, value, description) " + - "VALUES ('Hidden','DEFAULT', 'management-server','secstorage.copy.password', '" + DBEncryptionUtil.encrypt(password) + - "','Password used to authenticate zone-to-zone template copy requests')"; + "INSERT INTO `cloud`.`configuration` (category, instance, component, name, value, description) " + + "VALUES ('Hidden','DEFAULT', 'management-server','secstorage.copy.password', '" + DBEncryptionUtil.encrypt(password) + + "','Password used to authenticate zone-to-zone template copy requests')"; TransactionLegacy txn = TransactionLegacy.currentTxn(); try { @@ -924,7 +924,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio @DB protected HostPodVO createPod(long userId, String podName, final long zoneId, String gateway, String cidr, final String startIp, String endIp) - throws InternalErrorException { + throws InternalErrorException { String[] cidrPair = cidr.split("\\/"); String cidrAddress = cidrPair[0]; int cidrSize = Integer.parseInt(cidrPair[1]); @@ -983,7 +983,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio } private DiskOfferingVO createdefaultDiskOffering(Long domainId, String name, String description, int numGibibytes, String tags, boolean isCustomized, - boolean isSystemUse) { + boolean isSystemUse) { long diskSize = numGibibytes; diskSize = diskSize * 1024 * 1024 * 1024; tags = cleanupTags(tags); @@ -996,10 +996,10 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio } private ServiceOfferingVO createServiceOffering(long userId, String name, int cpu, int ramSize, int speed, String displayText, boolean localStorageRequired, - boolean offerHA, String tags) { + boolean offerHA, String tags) { tags = cleanupTags(tags); ServiceOfferingVO offering = - new ServiceOfferingVO(name, cpu, ramSize, speed, null, null, offerHA, displayText, localStorageRequired, false, tags, false, null, false); + new ServiceOfferingVO(name, cpu, ramSize, speed, null, null, offerHA, displayText, localStorageRequired, false, tags, false, null, false); offering.setUniqueName("Cloud.Com-" + name); offering = _serviceOfferingDao.persistSystemServiceOffering(offering); return offering; @@ -1074,87 +1074,87 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio public void doInTransactionWithoutResult(TransactionStatus status) { // Offering #1 NetworkOfferingVO defaultSharedSGNetworkOffering = - new NetworkOfferingVO(NetworkOffering.DefaultSharedNetworkOfferingWithSGService, "Offering for Shared Security group enabled networks", - TrafficType.Guest, false, true, null, null, true, Availability.Optional, null, Network.GuestType.Shared, true, true, false, false, false); + new NetworkOfferingVO(NetworkOffering.DefaultSharedNetworkOfferingWithSGService, "Offering for Shared Security group enabled networks", + TrafficType.Guest, false, true, null, null, true, Availability.Optional, null, Network.GuestType.Shared, true, true, false, false, false); defaultSharedSGNetworkOffering.setState(NetworkOffering.State.Enabled); defaultSharedSGNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(defaultSharedSGNetworkOffering); for (Service service : defaultSharedSGNetworkOfferingProviders.keySet()) { NetworkOfferingServiceMapVO offService = - new NetworkOfferingServiceMapVO(defaultSharedSGNetworkOffering.getId(), service, defaultSharedSGNetworkOfferingProviders.get(service)); + new NetworkOfferingServiceMapVO(defaultSharedSGNetworkOffering.getId(), service, defaultSharedSGNetworkOfferingProviders.get(service)); _ntwkOfferingServiceMapDao.persist(offService); s_logger.trace("Added service for the network offering: " + offService); } // Offering #2 NetworkOfferingVO defaultSharedNetworkOffering = - new NetworkOfferingVO(NetworkOffering.DefaultSharedNetworkOffering, "Offering for Shared networks", TrafficType.Guest, false, true, null, null, true, - Availability.Optional, null, Network.GuestType.Shared, true, true, false, false, false); + new NetworkOfferingVO(NetworkOffering.DefaultSharedNetworkOffering, "Offering for Shared networks", TrafficType.Guest, false, true, null, null, true, + Availability.Optional, null, Network.GuestType.Shared, true, true, false, false, false); defaultSharedNetworkOffering.setState(NetworkOffering.State.Enabled); defaultSharedNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(defaultSharedNetworkOffering); for (Service service : defaultSharedNetworkOfferingProviders.keySet()) { NetworkOfferingServiceMapVO offService = - new NetworkOfferingServiceMapVO(defaultSharedNetworkOffering.getId(), service, defaultSharedNetworkOfferingProviders.get(service)); + new NetworkOfferingServiceMapVO(defaultSharedNetworkOffering.getId(), service, defaultSharedNetworkOfferingProviders.get(service)); _ntwkOfferingServiceMapDao.persist(offService); s_logger.trace("Added service for the network offering: " + offService); } // Offering #3 NetworkOfferingVO defaultIsolatedSourceNatEnabledNetworkOffering = - new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService, - "Offering for Isolated networks with Source Nat service enabled", TrafficType.Guest, false, false, null, null, true, Availability.Required, null, - Network.GuestType.Isolated, true, false, false, false, true); + new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingWithSourceNatService, + "Offering for Isolated networks with Source Nat service enabled", TrafficType.Guest, false, false, null, null, true, Availability.Required, null, + Network.GuestType.Isolated, true, false, false, false, true); defaultIsolatedSourceNatEnabledNetworkOffering.setState(NetworkOffering.State.Enabled); defaultIsolatedSourceNatEnabledNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(defaultIsolatedSourceNatEnabledNetworkOffering); for (Service service : defaultIsolatedSourceNatEnabledNetworkOfferingProviders.keySet()) { NetworkOfferingServiceMapVO offService = - new NetworkOfferingServiceMapVO(defaultIsolatedSourceNatEnabledNetworkOffering.getId(), service, - defaultIsolatedSourceNatEnabledNetworkOfferingProviders.get(service)); + new NetworkOfferingServiceMapVO(defaultIsolatedSourceNatEnabledNetworkOffering.getId(), service, + defaultIsolatedSourceNatEnabledNetworkOfferingProviders.get(service)); _ntwkOfferingServiceMapDao.persist(offService); s_logger.trace("Added service for the network offering: " + offService); } // Offering #4 NetworkOfferingVO defaultIsolatedEnabledNetworkOffering = - new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOffering, "Offering for Isolated networks with no Source Nat service", TrafficType.Guest, - false, true, null, null, true, Availability.Optional, null, Network.GuestType.Isolated, true, true, false, false, false); + new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOffering, "Offering for Isolated networks with no Source Nat service", TrafficType.Guest, + false, true, null, null, true, Availability.Optional, null, Network.GuestType.Isolated, true, true, false, false, false); defaultIsolatedEnabledNetworkOffering.setState(NetworkOffering.State.Enabled); defaultIsolatedEnabledNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(defaultIsolatedEnabledNetworkOffering); for (Service service : defaultIsolatedNetworkOfferingProviders.keySet()) { NetworkOfferingServiceMapVO offService = - new NetworkOfferingServiceMapVO(defaultIsolatedEnabledNetworkOffering.getId(), service, defaultIsolatedNetworkOfferingProviders.get(service)); + new NetworkOfferingServiceMapVO(defaultIsolatedEnabledNetworkOffering.getId(), service, defaultIsolatedNetworkOfferingProviders.get(service)); _ntwkOfferingServiceMapDao.persist(offService); s_logger.trace("Added service for the network offering: " + offService); } // Offering #5 NetworkOfferingVO defaultNetscalerNetworkOffering = - new NetworkOfferingVO(NetworkOffering.DefaultSharedEIPandELBNetworkOffering, - "Offering for Shared networks with Elastic IP and Elastic LB capabilities", TrafficType.Guest, false, true, null, null, true, - Availability.Optional, null, Network.GuestType.Shared, true, false, false, false, true, true, true, false, false, true, true, false, false); + new NetworkOfferingVO(NetworkOffering.DefaultSharedEIPandELBNetworkOffering, + "Offering for Shared networks with Elastic IP and Elastic LB capabilities", TrafficType.Guest, false, true, null, null, true, + Availability.Optional, null, Network.GuestType.Shared, true, false, false, false, true, true, true, false, false, true, true, false, false); defaultNetscalerNetworkOffering.setState(NetworkOffering.State.Enabled); defaultNetscalerNetworkOffering = _networkOfferingDao.persistDefaultNetworkOffering(defaultNetscalerNetworkOffering); for (Service service : netscalerServiceProviders.keySet()) { NetworkOfferingServiceMapVO offService = - new NetworkOfferingServiceMapVO(defaultNetscalerNetworkOffering.getId(), service, netscalerServiceProviders.get(service)); + new NetworkOfferingServiceMapVO(defaultNetscalerNetworkOffering.getId(), service, netscalerServiceProviders.get(service)); _ntwkOfferingServiceMapDao.persist(offService); s_logger.trace("Added service for the network offering: " + offService); } // Offering #6 NetworkOfferingVO defaultNetworkOfferingForVpcNetworks = - new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworks, - "Offering for Isolated Vpc networks with Source Nat service enabled", TrafficType.Guest, false, false, null, null, true, Availability.Optional, - null, Network.GuestType.Isolated, false, false, false, false, true); + new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworks, + "Offering for Isolated Vpc networks with Source Nat service enabled", TrafficType.Guest, false, false, null, null, true, Availability.Optional, + null, Network.GuestType.Isolated, false, false, false, false, true); defaultNetworkOfferingForVpcNetworks.setState(NetworkOffering.State.Enabled); defaultNetworkOfferingForVpcNetworks = _networkOfferingDao.persistDefaultNetworkOffering(defaultNetworkOfferingForVpcNetworks); @@ -1173,16 +1173,16 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio for (Service service : defaultVpcNetworkOfferingProviders.keySet()) { NetworkOfferingServiceMapVO offService = - new NetworkOfferingServiceMapVO(defaultNetworkOfferingForVpcNetworks.getId(), service, defaultVpcNetworkOfferingProviders.get(service)); + new NetworkOfferingServiceMapVO(defaultNetworkOfferingForVpcNetworks.getId(), service, defaultVpcNetworkOfferingProviders.get(service)); _ntwkOfferingServiceMapDao.persist(offService); s_logger.trace("Added service for the network offering: " + offService); } // Offering #7 NetworkOfferingVO defaultNetworkOfferingForVpcNetworksNoLB = - new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworksNoLB, - "Offering for Isolated Vpc networks with Source Nat service enabled and LB service Disabled", TrafficType.Guest, false, false, null, null, true, - Availability.Optional, null, Network.GuestType.Isolated, false, false, false, false, false); + new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworksNoLB, + "Offering for Isolated Vpc networks with Source Nat service enabled and LB service Disabled", TrafficType.Guest, false, false, null, null, true, + Availability.Optional, null, Network.GuestType.Isolated, false, false, false, false, false); defaultNetworkOfferingForVpcNetworksNoLB.setState(NetworkOffering.State.Enabled); defaultNetworkOfferingForVpcNetworksNoLB = _networkOfferingDao.persistDefaultNetworkOffering(defaultNetworkOfferingForVpcNetworksNoLB); @@ -1200,16 +1200,16 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio for (Service service : defaultVpcNetworkOfferingProvidersNoLB.keySet()) { NetworkOfferingServiceMapVO offService = - new NetworkOfferingServiceMapVO(defaultNetworkOfferingForVpcNetworksNoLB.getId(), service, defaultVpcNetworkOfferingProvidersNoLB.get(service)); + new NetworkOfferingServiceMapVO(defaultNetworkOfferingForVpcNetworksNoLB.getId(), service, defaultVpcNetworkOfferingProvidersNoLB.get(service)); _ntwkOfferingServiceMapDao.persist(offService); s_logger.trace("Added service for the network offering: " + offService); } //offering #8 - network offering with internal lb service NetworkOfferingVO internalLbOff = - new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworksWithInternalLB, - "Offering for Isolated Vpc networks with Internal LB support", TrafficType.Guest, false, false, null, null, true, Availability.Optional, null, - Network.GuestType.Isolated, false, false, false, true, false); + new NetworkOfferingVO(NetworkOffering.DefaultIsolatedNetworkOfferingForVpcNetworksWithInternalLB, + "Offering for Isolated Vpc networks with Internal LB support", TrafficType.Guest, false, false, null, null, true, Availability.Optional, null, + Network.GuestType.Isolated, false, false, false, true, false); internalLbOff.setState(NetworkOffering.State.Enabled); internalLbOff = _networkOfferingDao.persistDefaultNetworkOffering(internalLbOff); @@ -1284,8 +1284,8 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio if (broadcastDomainType != null) { NetworkVO network = - new NetworkVO(id, trafficType, mode, broadcastDomainType, networkOfferingId, domainId, accountId, related, null, null, networkDomain, - Network.GuestType.Shared, zoneId, null, null, specifyIpRanges, null); + new NetworkVO(id, trafficType, mode, broadcastDomainType, networkOfferingId, domainId, accountId, related, null, null, networkDomain, + Network.GuestType.Shared, zoneId, null, null, specifyIpRanges, null); network.setGuruName(guruNames.get(network.getTrafficType())); network.setDns1(zone.getDns1()); network.setDns2(zone.getDns2()); diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java index 2b0f0b8dc94..8bc095dfc70 100755 --- a/server/src/com/cloud/server/ManagementServerImpl.java +++ b/server/src/com/cloud/server/ManagementServerImpl.java @@ -690,7 +690,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe private LoadBalancerDao _loadbalancerDao; @Inject private HypervisorCapabilitiesDao _hypervisorCapabilitiesDao; - private List _hostAllocators; + private List hostAllocators; private List _storagePoolAllocators; @Inject private ResourceTagDao _resourceTagDao; @@ -748,8 +748,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe return _planners; } - public void setPlanners(List _planners) { - this._planners = _planners; + public void setPlanners(List planners) { + this._planners = planners; } @Inject @@ -792,11 +792,11 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe } public List getHostAllocators() { - return _hostAllocators; + return hostAllocators; } - public void setHostAllocators(List _hostAllocators) { - this._hostAllocators = _hostAllocators; + public void setHostAllocators(List hostAllocators) { + this.hostAllocators = hostAllocators; } @Override @@ -1071,13 +1071,13 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe } if (!vm.getHypervisorType().equals(HypervisorType.XenServer) && !vm.getHypervisorType().equals(HypervisorType.VMware) - && !vm.getHypervisorType().equals(HypervisorType.KVM) && !vm.getHypervisorType().equals(HypervisorType.Ovm) - && !vm.getHypervisorType().equals(HypervisorType.Hyperv)) { + && !vm.getHypervisorType().equals(HypervisorType.KVM) && !vm.getHypervisorType().equals(HypervisorType.Ovm) + && !vm.getHypervisorType().equals(HypervisorType.Hyperv)) { if (s_logger.isDebugEnabled()) { s_logger.debug(vm + " is not XenServer/VMware/KVM/OVM/Hyperv, cannot migrate this VM."); } throw new InvalidParameterValueException("Unsupported Hypervisor Type for VM migration, we support " + - "XenServer/VMware/KVM/Ovm/Hyperv only"); + "XenServer/VMware/KVM/Ovm/Hyperv only"); } long srcHostId = vm.getHostId(); @@ -1176,7 +1176,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe } } - for (HostAllocator allocator : _hostAllocators) { + for (HostAllocator allocator : hostAllocators) { if (canMigrateWithStorage) { suitableHosts = allocator.allocateTo(vmProfile, plan, Host.Type.Routing, excludes, allHosts, HostAllocator.RETURN_UPTO_ALL, false); } else { @@ -2277,7 +2277,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe if (type != null) { sc.addAnd("type", SearchCriteria.Op.EQ, type); } - + if (name != null) { sc.addAnd("name", SearchCriteria.Op.EQ, name); } @@ -2866,8 +2866,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe cmdList.add(AssignCertToLoadBalancerCmd.class); cmdList.add(RemoveCertFromLoadBalancerCmd.class); cmdList.add(GenerateAlertCmd.class); - cmdList.add(ListOvsElementsCmd.class); - cmdList.add(ConfigureOvsElementCmd.class); + cmdList.add(ListOvsElementsCmd.class); + cmdList.add(ConfigureOvsElementCmd.class); return cmdList; } @@ -3790,7 +3790,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe throw new InvalidParameterValueException("Dynamic Scaling operation is not permitted for this hypervisor on system vm"); } boolean result = _userVmMgr.upgradeVirtualMachine(cmd.getId(), cmd.getServiceOfferingId(), cmd.getCustomParameters()); - if(result){ + if (result) { VirtualMachine vm = _vmInstanceDao.findById(cmd.getId()); return vm; } else { @@ -3806,7 +3806,7 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe } - private VirtualMachine upgradeStoppedSystemVm(Long systemVmId, Long serviceOfferingId, Map customparameters){ + private VirtualMachine upgradeStoppedSystemVm(Long systemVmId, Long serviceOfferingId, Map customparameters) { Account caller = CallContext.current().getCallingAccount(); VMInstanceVO systemVm = _vmInstanceDao.findByIdTypes(systemVmId, VirtualMachine.Type.ConsoleProxy, VirtualMachine.Type.SecondaryStorageVm); @@ -3818,8 +3818,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe // Check that the specified service offering ID is valid ServiceOfferingVO newServiceOffering = _offeringDao.findById(serviceOfferingId); - ServiceOfferingVO currentServiceOffering = _offeringDao.findById(systemVmId,systemVm.getServiceOfferingId()); - if (newServiceOffering.isDynamic()){ + ServiceOfferingVO currentServiceOffering = _offeringDao.findById(systemVmId, systemVm.getServiceOfferingId()); + if (newServiceOffering.isDynamic()) { newServiceOffering.setDynamicFlag(true); _userVmMgr.validateCustomParameters(newServiceOffering, customparameters); newServiceOffering = _offeringDao.getcomputeOffering(newServiceOffering, customparameters); diff --git a/server/src/com/cloud/server/StatsCollector.java b/server/src/com/cloud/server/StatsCollector.java index 82f774fcbe6..95ae047cea8 100755 --- a/server/src/com/cloud/server/StatsCollector.java +++ b/server/src/com/cloud/server/StatsCollector.java @@ -118,52 +118,78 @@ import com.cloud.vm.dao.VMInstanceDao; @Component public class StatsCollector extends ManagerBase implements ComponentMethodInterceptable { - public static final Logger s_logger = Logger.getLogger(StatsCollector.class.getName()); + public static final Logger s_logger = Logger.getLogger(StatsCollector.class.getName()); - private static StatsCollector s_instance = null; + private static StatsCollector s_instance = null; - private ScheduledExecutorService _executor = null; - @Inject private AgentManager _agentMgr; - @Inject private UserVmManager _userVmMgr; - @Inject private HostDao _hostDao; - @Inject private UserVmDao _userVmDao; - @Inject private VolumeDao _volsDao; - @Inject private PrimaryDataStoreDao _storagePoolDao; - @Inject private ImageStoreDao _imageStoreDao; - @Inject private StorageManager _storageManager; - @Inject private StoragePoolHostDao _storagePoolHostDao; - @Inject private DataStoreManager _dataStoreMgr; - @Inject private ResourceManager _resourceMgr; - @Inject private ConfigurationDao _configDao; - @Inject private EndPointSelector _epSelector; - @Inject private VmDiskStatisticsDao _vmDiskStatsDao; - @Inject private ManagementServerHostDao _msHostDao; - @Inject private AutoScaleVmGroupDao _asGroupDao; - @Inject private AutoScaleVmGroupVmMapDao _asGroupVmDao; - @Inject private AutoScaleManager _asManager; - @Inject private VMInstanceDao _vmInstance; - @Inject private AutoScaleVmGroupPolicyMapDao _asGroupPolicyDao; - @Inject private AutoScalePolicyDao _asPolicyDao; - @Inject private AutoScalePolicyConditionMapDao _asConditionMapDao; - @Inject private ConditionDao _asConditionDao; - @Inject private CounterDao _asCounterDao; - @Inject private AutoScaleVmProfileDao _asProfileDao; - @Inject private ServiceOfferingDao _serviceOfferingDao; + private ScheduledExecutorService _executor = null; + @Inject + private AgentManager _agentMgr; + @Inject + private UserVmManager _userVmMgr; + @Inject + private HostDao _hostDao; + @Inject + private UserVmDao _userVmDao; + @Inject + private VolumeDao _volsDao; + @Inject + private PrimaryDataStoreDao _storagePoolDao; + @Inject + private ImageStoreDao _imageStoreDao; + @Inject + private StorageManager _storageManager; + @Inject + private StoragePoolHostDao _storagePoolHostDao; + @Inject + private DataStoreManager _dataStoreMgr; + @Inject + private ResourceManager _resourceMgr; + @Inject + private ConfigurationDao _configDao; + @Inject + private EndPointSelector _epSelector; + @Inject + private VmDiskStatisticsDao _vmDiskStatsDao; + @Inject + private ManagementServerHostDao _msHostDao; + @Inject + private AutoScaleVmGroupDao _asGroupDao; + @Inject + private AutoScaleVmGroupVmMapDao _asGroupVmDao; + @Inject + private AutoScaleManager _asManager; + @Inject + private VMInstanceDao _vmInstance; + @Inject + private AutoScaleVmGroupPolicyMapDao _asGroupPolicyDao; + @Inject + private AutoScalePolicyDao _asPolicyDao; + @Inject + private AutoScalePolicyConditionMapDao _asConditionMapDao; + @Inject + private ConditionDao _asConditionDao; + @Inject + private CounterDao _asCounterDao; + @Inject + private AutoScaleVmProfileDao _asProfileDao; + @Inject + private ServiceOfferingDao _serviceOfferingDao; - private ConcurrentHashMap _hostStats = new ConcurrentHashMap(); - private final ConcurrentHashMap _VmStats = new ConcurrentHashMap(); - private ConcurrentHashMap _volumeStats = new ConcurrentHashMap(); - private ConcurrentHashMap _storageStats = new ConcurrentHashMap(); - private ConcurrentHashMap _storagePoolStats = new ConcurrentHashMap(); + private ConcurrentHashMap _hostStats = new ConcurrentHashMap(); + private final ConcurrentHashMap _VmStats = new ConcurrentHashMap(); + private final ConcurrentHashMap _volumeStats = new ConcurrentHashMap(); + private ConcurrentHashMap _storageStats = new ConcurrentHashMap(); + private ConcurrentHashMap _storagePoolStats = new ConcurrentHashMap(); - long hostStatsInterval = -1L; - long hostAndVmStatsInterval = -1L; - long storageStatsInterval = -1L; - long volumeStatsInterval = -1L; - long autoScaleStatsInterval = -1L; - int vmDiskStatsInterval = 0; + long hostStatsInterval = -1L; + long hostAndVmStatsInterval = -1L; + long storageStatsInterval = -1L; + long volumeStatsInterval = -1L; + long autoScaleStatsInterval = -1L; + int vmDiskStatsInterval = 0; - private ScheduledExecutorService _diskStatsUpdateExecutor; + private ScheduledExecutorService _diskStatsUpdateExecutor; private int _usageAggregationRange = 1440; private String _usageTimeZone = "GMT"; private final long mgmtSrvrId = MacAddress.getMacAddress().toLong(); @@ -192,15 +218,15 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc return true; } - private void init(Map configs) { - _executor = Executors.newScheduledThreadPool(4, new NamedThreadFactory("StatsCollector")); + private void init(Map configs) { + _executor = Executors.newScheduledThreadPool(4, new NamedThreadFactory("StatsCollector")); - hostStatsInterval = NumbersUtil.parseLong(configs.get("host.stats.interval"), 60000L); - hostAndVmStatsInterval = NumbersUtil.parseLong(configs.get("vm.stats.interval"), 60000L); - storageStatsInterval = NumbersUtil.parseLong(configs.get("storage.stats.interval"), 60000L); - volumeStatsInterval = NumbersUtil.parseLong(configs.get("volume.stats.interval"), -1L); - autoScaleStatsInterval = NumbersUtil.parseLong(configs.get("autoscale.stats.interval"), 60000L); - vmDiskStatsInterval = NumbersUtil.parseInt(configs.get("vm.disk.stats.interval"), 0); + hostStatsInterval = NumbersUtil.parseLong(configs.get("host.stats.interval"), 60000L); + hostAndVmStatsInterval = NumbersUtil.parseLong(configs.get("vm.stats.interval"), 60000L); + storageStatsInterval = NumbersUtil.parseLong(configs.get("storage.stats.interval"), 60000L); + volumeStatsInterval = NumbersUtil.parseLong(configs.get("volume.stats.interval"), -1L); + autoScaleStatsInterval = NumbersUtil.parseLong(configs.get("autoscale.stats.interval"), 60000L); + vmDiskStatsInterval = NumbersUtil.parseInt(configs.get("vm.disk.stats.interval"), 0); if (hostStatsInterval > 0) { _executor.scheduleWithFixedDelay(new HostCollector(), 15000L, hostStatsInterval, TimeUnit.MILLISECONDS); @@ -210,13 +236,13 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc _executor.scheduleWithFixedDelay(new VmStatsCollector(), 15000L, hostAndVmStatsInterval, TimeUnit.MILLISECONDS); } - if (storageStatsInterval > 0) { - _executor.scheduleWithFixedDelay(new StorageCollector(), 15000L, storageStatsInterval, TimeUnit.MILLISECONDS); - } - - if (autoScaleStatsInterval > 0) { + if (storageStatsInterval > 0) { + _executor.scheduleWithFixedDelay(new StorageCollector(), 15000L, storageStatsInterval, TimeUnit.MILLISECONDS); + } + + if (autoScaleStatsInterval > 0) { _executor.scheduleWithFixedDelay(new AutoScaleMonitor(), 15000L, autoScaleStatsInterval, TimeUnit.MILLISECONDS); - } + } if (vmDiskStatsInterval > 0) { if (vmDiskStatsInterval < 300) @@ -606,300 +632,301 @@ public class StatsCollector extends ManagerBase implements ComponentMethodInterc } } _storagePoolStats = storagePoolStats; - } catch (Throwable t) { - s_logger.error("Error trying to retrieve storage stats", t); - } - } - } + } catch (Throwable t) { + s_logger.error("Error trying to retrieve storage stats", t); + } + } + } - class AutoScaleMonitor extends ManagedContextRunnable { - @Override - protected void runInContext() { - try { - if (s_logger.isDebugEnabled()) { - s_logger.debug("AutoScaling Monitor is running..."); - } - // list all AS VMGroups - List asGroups = _asGroupDao.listAll(); - for (AutoScaleVmGroupVO asGroup : asGroups) { - // check group state - if ((asGroup.getState().equals("enabled")) && (is_native(asGroup.getId()))) { - // check minimum vm of group - Integer currentVM = _asGroupVmDao.countByGroup(asGroup.getId()); - if (currentVM < asGroup.getMinMembers()) { - _asManager.doScaleUp(asGroup.getId(), asGroup.getMinMembers() - currentVM); - continue; - } - - //check interval - long now = (new Date()).getTime(); - if (asGroup.getLastInterval() != null) - if ((now - asGroup.getLastInterval().getTime()) < (long) asGroup - .getInterval()) { - continue; - } + class AutoScaleMonitor extends ManagedContextRunnable { + @Override + protected void runInContext() { + try { + if (s_logger.isDebugEnabled()) { + s_logger.debug("AutoScaling Monitor is running..."); + } + // list all AS VMGroups + List asGroups = _asGroupDao.listAll(); + for (AutoScaleVmGroupVO asGroup : asGroups) { + // check group state + if ((asGroup.getState().equals("enabled")) && (is_native(asGroup.getId()))) { + // check minimum vm of group + Integer currentVM = _asGroupVmDao.countByGroup(asGroup.getId()); + if (currentVM < asGroup.getMinMembers()) { + _asManager.doScaleUp(asGroup.getId(), asGroup.getMinMembers() - currentVM); + continue; + } - // update last_interval - asGroup.setLastInterval(new Date()); - _asGroupDao.persist(asGroup); + //check interval + long now = (new Date()).getTime(); + if (asGroup.getLastInterval() != null) + if ((now - asGroup.getLastInterval().getTime()) < asGroup + .getInterval()) { + continue; + } - // collect RRDs data for this group - if (s_logger.isDebugEnabled()) { - s_logger.debug("[AutoScale] Collecting RRDs data..."); - } - Map params = new HashMap(); - List asGroupVmVOs = _asGroupVmDao.listByGroup(asGroup.getId()); - params.put("total_vm", String.valueOf(asGroupVmVOs.size())); - for (int i = 0; i < asGroupVmVOs.size(); i++) { - long vmId = asGroupVmVOs.get(i).getInstanceId(); - VMInstanceVO vmVO = _vmInstance.findById(vmId); - //xe vm-list | grep vmname -B 1 | head -n 1 | awk -F':' '{print $2}' - params.put("vmname" + String.valueOf(i + 1), vmVO.getInstanceName()); - params.put("vmid" + String.valueOf(i + 1), String.valueOf(vmVO.getId())); + // update last_interval + asGroup.setLastInterval(new Date()); + _asGroupDao.persist(asGroup); - } - // get random hostid because all vms are in a cluster - long vmId = asGroupVmVOs.get(0).getInstanceId(); - VMInstanceVO vmVO = _vmInstance.findById(vmId); - Long receiveHost = vmVO.getHostId(); + // collect RRDs data for this group + if (s_logger.isDebugEnabled()) { + s_logger.debug("[AutoScale] Collecting RRDs data..."); + } + Map params = new HashMap(); + List asGroupVmVOs = _asGroupVmDao.listByGroup(asGroup.getId()); + params.put("total_vm", String.valueOf(asGroupVmVOs.size())); + for (int i = 0; i < asGroupVmVOs.size(); i++) { + long vmId = asGroupVmVOs.get(i).getInstanceId(); + VMInstanceVO vmVO = _vmInstance.findById(vmId); + //xe vm-list | grep vmname -B 1 | head -n 1 | awk -F':' '{print $2}' + params.put("vmname" + String.valueOf(i + 1), vmVO.getInstanceName()); + params.put("vmid" + String.valueOf(i + 1), String.valueOf(vmVO.getId())); - // setup parameters phase: duration and counter - // list pair [counter, duration] - List> lstPair = getPairofCounternameAndDuration(asGroup.getId()); - int total_counter = 0; - String[] lstCounter = new String[lstPair.size()]; - for (int i = 0; i < lstPair.size(); i++) { - Pair pair = lstPair.get(i); - String strCounterNames = pair.first(); - Integer duration = pair.second(); - - lstCounter[i] = strCounterNames.split(",")[0]; - total_counter++; - params.put("duration" + String.valueOf(total_counter), duration.toString()); - params.put("counter" + String.valueOf(total_counter), lstCounter[i]); - params.put("con" + String.valueOf(total_counter), strCounterNames.split(",")[1]); - } - params.put("total_counter", String.valueOf(total_counter)); + } + // get random hostid because all vms are in a cluster + long vmId = asGroupVmVOs.get(0).getInstanceId(); + VMInstanceVO vmVO = _vmInstance.findById(vmId); + Long receiveHost = vmVO.getHostId(); - PerformanceMonitorCommand perfMon = new PerformanceMonitorCommand(params, 20); + // setup parameters phase: duration and counter + // list pair [counter, duration] + List> lstPair = getPairofCounternameAndDuration(asGroup.getId()); + int total_counter = 0; + String[] lstCounter = new String[lstPair.size()]; + for (int i = 0; i < lstPair.size(); i++) { + Pair pair = lstPair.get(i); + String strCounterNames = pair.first(); + Integer duration = pair.second(); - try { - Answer answer = _agentMgr.send(receiveHost, perfMon); - if (answer == null || !answer.getResult()) { - s_logger.debug("Failed to send data to node !"); - } else { - String result = answer.getDetails(); - s_logger.debug("[AutoScale] RRDs collection answer: " + result); - HashMap avgCounter = new HashMap(); - - // extract data - String[] counterElements = result.split(","); - if ((counterElements != null) && (counterElements.length > 0)) { - for (String string : counterElements) { - try { - String[] counterVals = string.split(":"); - String[] counter_vm = counterVals[0].split("\\."); - - Long counterId = Long.parseLong(counter_vm[1]); - Long conditionId = Long.parseLong(params.get("con" + counter_vm[1])); - Double coVal = Double.parseDouble(counterVals[1]); + lstCounter[i] = strCounterNames.split(",")[0]; + total_counter++; + params.put("duration" + String.valueOf(total_counter), duration.toString()); + params.put("counter" + String.valueOf(total_counter), lstCounter[i]); + params.put("con" + String.valueOf(total_counter), strCounterNames.split(",")[1]); + } + params.put("total_counter", String.valueOf(total_counter)); - // Summary of all counter by counterId key - if (avgCounter.get(counterId) == null){ - /* initialize if data is not set */ - avgCounter.put(counterId, new Double(0)); - } - - String counterName = getCounternamebyCondition(conditionId.longValue()); - if (counterName == Counter.Source.memory.toString()) { - // calculate memory in percent - Long profileId = asGroup.getProfileId(); - AutoScaleVmProfileVO profileVo = _asProfileDao.findById(profileId); - ServiceOfferingVO serviceOff = _serviceOfferingDao.findById(profileVo.getServiceOfferingId()); - int maxRAM = serviceOff.getRamSize(); + PerformanceMonitorCommand perfMon = new PerformanceMonitorCommand(params, 20); - // get current RAM percent - coVal = coVal / maxRAM; - } else { - // cpu - coVal = coVal * 100; - } - - // update data entry - avgCounter.put(counterId, avgCounter.get(counterId)+ coVal); - - } catch (Exception e) { - e.printStackTrace(); - } - } + try { + Answer answer = _agentMgr.send(receiveHost, perfMon); + if (answer == null || !answer.getResult()) { + s_logger.debug("Failed to send data to node !"); + } else { + String result = answer.getDetails(); + s_logger.debug("[AutoScale] RRDs collection answer: " + result); + HashMap avgCounter = new HashMap(); - String scaleAction = getAutoscaleAction(avgCounter, asGroup.getId(), currentVM, params); - if (scaleAction != null) { - s_logger.debug("[AutoScale] Doing scale action: " + scaleAction + " for group " + asGroup.getId()); - if (scaleAction.equals("scaleup")) { - _asManager.doScaleUp(asGroup.getId(), 1); - } else { - _asManager.doScaleDown(asGroup.getId()); - } - } - } - } + // extract data + String[] counterElements = result.split(","); + if ((counterElements != null) && (counterElements.length > 0)) { + for (String string : counterElements) { + try { + String[] counterVals = string.split(":"); + String[] counter_vm = counterVals[0].split("\\."); - } catch (Exception e) { - e.printStackTrace(); - } + Long counterId = Long.parseLong(counter_vm[1]); + Long conditionId = Long.parseLong(params.get("con" + counter_vm[1])); + Double coVal = Double.parseDouble(counterVals[1]); - } - } + // Summary of all counter by counterId key + if (avgCounter.get(counterId) == null) { + /* initialize if data is not set */ + avgCounter.put(counterId, new Double(0)); + } - } catch (Throwable t) { - s_logger.error("Error trying to monitor autoscaling", t); - } + String counterName = getCounternamebyCondition(conditionId.longValue()); + if (counterName == Counter.Source.memory.toString()) { + // calculate memory in percent + Long profileId = asGroup.getProfileId(); + AutoScaleVmProfileVO profileVo = _asProfileDao.findById(profileId); + ServiceOfferingVO serviceOff = _serviceOfferingDao.findById(profileVo.getServiceOfferingId()); + int maxRAM = serviceOff.getRamSize(); - } - - private boolean is_native(long groupId) { - List vos = _asGroupPolicyDao.listByVmGroupId(groupId); - for (AutoScaleVmGroupPolicyMapVO vo : vos) { - List ConditionPolicies = _asConditionMapDao.findByPolicyId(vo.getPolicyId()); - for (AutoScalePolicyConditionMapVO ConditionPolicy : ConditionPolicies) { - ConditionVO condition = _asConditionDao.findById(ConditionPolicy.getConditionId()); - CounterVO counter = _asCounterDao.findById(condition.getCounterid()); - if (counter.getSource() == Counter.Source.cpu || counter.getSource() == Counter.Source.memory) - return true; - } - } - return false; - } - - private String getAutoscaleAction(HashMap avgCounter, long groupId, long currentVM, Map params) { - - List listMap = _asGroupPolicyDao.listByVmGroupId(groupId); - if ( (listMap == null) || (listMap.size() == 0) ) - return null; - for (AutoScaleVmGroupPolicyMapVO asVmgPmap : listMap) { - AutoScalePolicyVO policyVO = _asPolicyDao.findById(asVmgPmap.getPolicyId()); - if (policyVO != null) { - Integer quitetime = policyVO.getQuietTime(); - Date quitetimeDate = policyVO.getLastQuiteTime(); - long last_quitetime = 0L; - if (quitetimeDate != null) { - last_quitetime = policyVO.getLastQuiteTime().getTime(); - } - long current_time = (new Date()).getTime(); + // get current RAM percent + coVal = coVal / maxRAM; + } else { + // cpu + coVal = coVal * 100; + } - // check quite time for this policy - if ((current_time - last_quitetime) >= (long) quitetime) { + // update data entry + avgCounter.put(counterId, avgCounter.get(counterId) + coVal); - // list all condition of this policy - boolean bValid = true; - List lstConditions = getConditionsbyPolicyId(policyVO.getId()); - if ((lstConditions != null) && (lstConditions.size() > 0)) { - // check whole conditions of this policy - for (ConditionVO conditionVO : lstConditions) { - long thresholdValue = conditionVO.getThreshold(); - Double thresholdPercent = (double)thresholdValue / 100; - CounterVO counterVO = _asCounterDao.findById(conditionVO.getCounterid()); -// Double sum = avgCounter.get(conditionVO.getCounterid()); - long counter_count=1; - do { - String counter_param = params.get("counter" + String.valueOf(counter_count)); - Counter.Source counter_source = counterVO.getSource(); - if (counter_param.equals(counter_source.toString())) - break; - counter_count++; - } while (1==1); - - Double sum = avgCounter.get(counter_count); - Double avg = sum / currentVM; - Operator op = conditionVO.getRelationalOperator(); - boolean bConditionCheck = ((op == com.cloud.network.as.Condition.Operator.EQ) && (thresholdPercent == avg)) - || ((op == com.cloud.network.as.Condition.Operator.GE) && (avg >= thresholdPercent)) - || ((op == com.cloud.network.as.Condition.Operator.GT) && (avg > thresholdPercent)) - || ((op == com.cloud.network.as.Condition.Operator.LE) && (avg <= thresholdPercent)) - || ((op == com.cloud.network.as.Condition.Operator.LT) && (avg < thresholdPercent)); + } catch (Exception e) { + e.printStackTrace(); + } + } - if (!bConditionCheck) { - bValid = false; - break; - } - } - if (bValid) { - return policyVO.getAction(); - } - } - } - } - } - return null; - } - - private List getConditionsbyPolicyId(long policyId){ - List conditionMap = _asConditionMapDao.findByPolicyId(policyId); - if ( (conditionMap == null) || (conditionMap.size() == 0)) - return null; - - List lstResult = new ArrayList(); - for (AutoScalePolicyConditionMapVO asPCmap : conditionMap) { - lstResult.add(_asConditionDao.findById(asPCmap.getConditionId())); - } - - return lstResult; - } + String scaleAction = getAutoscaleAction(avgCounter, asGroup.getId(), currentVM, params); + if (scaleAction != null) { + s_logger.debug("[AutoScale] Doing scale action: " + scaleAction + " for group " + asGroup.getId()); + if (scaleAction.equals("scaleup")) { + _asManager.doScaleUp(asGroup.getId(), 1); + } else { + _asManager.doScaleDown(asGroup.getId()); + } + } + } + } - public List> getPairofCounternameAndDuration( - long groupId) { - AutoScaleVmGroupVO groupVo = _asGroupDao.findById(groupId); - if (groupVo == null) - return null; - List> result = new ArrayList>(); - //list policy map - List groupPolicymap = _asGroupPolicyDao.listByVmGroupId(groupVo.getId()); - if (groupPolicymap == null) - return null; - for (AutoScaleVmGroupPolicyMapVO gpMap : groupPolicymap) { - //get duration - AutoScalePolicyVO policyVo = _asPolicyDao.findById(gpMap.getPolicyId()); - Integer duration = policyVo.getDuration(); - //get collection of counter name - String counterNames = ""; - List lstPCmap = _asConditionMapDao.findByPolicyId(policyVo.getId()); - for (AutoScalePolicyConditionMapVO pcMap : lstPCmap) { - String counterName = getCounternamebyCondition(pcMap.getConditionId()); - - counterNames += counterName + "," + pcMap.getConditionId(); - } - // add to result - Pair pair = new Pair(counterNames, duration); - result.add(pair); - } + } catch (Exception e) { + e.printStackTrace(); + } - return result; - } - - public String getCounternamebyCondition(long conditionId){ - - ConditionVO condition = _asConditionDao.findById(conditionId); - if (condition == null) - return ""; - - long counterId = condition.getCounterid(); - CounterVO counter = _asCounterDao.findById(counterId); - if (counter == null) - return ""; - - return counter.getSource().toString(); - } - } - public StorageStats getStorageStats(long id) { - return _storageStats.get(id); - } + } + } - public HostStats getHostStats(long hostId){ - return _hostStats.get(hostId); - } + } catch (Throwable t) { + s_logger.error("Error trying to monitor autoscaling", t); + } - public StorageStats getStoragePoolStats(long id) { - return _storagePoolStats.get(id); - } + } + + private boolean is_native(long groupId) { + List vos = _asGroupPolicyDao.listByVmGroupId(groupId); + for (AutoScaleVmGroupPolicyMapVO vo : vos) { + List ConditionPolicies = _asConditionMapDao.findByPolicyId(vo.getPolicyId()); + for (AutoScalePolicyConditionMapVO ConditionPolicy : ConditionPolicies) { + ConditionVO condition = _asConditionDao.findById(ConditionPolicy.getConditionId()); + CounterVO counter = _asCounterDao.findById(condition.getCounterid()); + if (counter.getSource() == Counter.Source.cpu || counter.getSource() == Counter.Source.memory) + return true; + } + } + return false; + } + + private String getAutoscaleAction(HashMap avgCounter, long groupId, long currentVM, Map params) { + + List listMap = _asGroupPolicyDao.listByVmGroupId(groupId); + if ((listMap == null) || (listMap.size() == 0)) + return null; + for (AutoScaleVmGroupPolicyMapVO asVmgPmap : listMap) { + AutoScalePolicyVO policyVO = _asPolicyDao.findById(asVmgPmap.getPolicyId()); + if (policyVO != null) { + Integer quitetime = policyVO.getQuietTime(); + Date quitetimeDate = policyVO.getLastQuiteTime(); + long last_quitetime = 0L; + if (quitetimeDate != null) { + last_quitetime = policyVO.getLastQuiteTime().getTime(); + } + long current_time = (new Date()).getTime(); + + // check quite time for this policy + if ((current_time - last_quitetime) >= (long)quitetime) { + + // list all condition of this policy + boolean bValid = true; + List lstConditions = getConditionsbyPolicyId(policyVO.getId()); + if ((lstConditions != null) && (lstConditions.size() > 0)) { + // check whole conditions of this policy + for (ConditionVO conditionVO : lstConditions) { + long thresholdValue = conditionVO.getThreshold(); + Double thresholdPercent = (double)thresholdValue / 100; + CounterVO counterVO = _asCounterDao.findById(conditionVO.getCounterid()); +//Double sum = avgCounter.get(conditionVO.getCounterid()); + long counter_count = 1; + do { + String counter_param = params.get("counter" + String.valueOf(counter_count)); + Counter.Source counter_source = counterVO.getSource(); + if (counter_param.equals(counter_source.toString())) + break; + counter_count++; + } while (1 == 1); + + Double sum = avgCounter.get(counter_count); + Double avg = sum / currentVM; + Operator op = conditionVO.getRelationalOperator(); + boolean bConditionCheck = ((op == com.cloud.network.as.Condition.Operator.EQ) && (thresholdPercent == avg)) + || ((op == com.cloud.network.as.Condition.Operator.GE) && (avg >= thresholdPercent)) + || ((op == com.cloud.network.as.Condition.Operator.GT) && (avg > thresholdPercent)) + || ((op == com.cloud.network.as.Condition.Operator.LE) && (avg <= thresholdPercent)) + || ((op == com.cloud.network.as.Condition.Operator.LT) && (avg < thresholdPercent)); + + if (!bConditionCheck) { + bValid = false; + break; + } + } + if (bValid) { + return policyVO.getAction(); + } + } + } + } + } + return null; + } + + private List getConditionsbyPolicyId(long policyId) { + List conditionMap = _asConditionMapDao.findByPolicyId(policyId); + if ((conditionMap == null) || (conditionMap.size() == 0)) + return null; + + List lstResult = new ArrayList(); + for (AutoScalePolicyConditionMapVO asPCmap : conditionMap) { + lstResult.add(_asConditionDao.findById(asPCmap.getConditionId())); + } + + return lstResult; + } + + public List> getPairofCounternameAndDuration( + long groupId) { + AutoScaleVmGroupVO groupVo = _asGroupDao.findById(groupId); + if (groupVo == null) + return null; + List> result = new ArrayList>(); + //list policy map + List groupPolicymap = _asGroupPolicyDao.listByVmGroupId(groupVo.getId()); + if (groupPolicymap == null) + return null; + for (AutoScaleVmGroupPolicyMapVO gpMap : groupPolicymap) { + //get duration + AutoScalePolicyVO policyVo = _asPolicyDao.findById(gpMap.getPolicyId()); + Integer duration = policyVo.getDuration(); + //get collection of counter name + String counterNames = ""; + List lstPCmap = _asConditionMapDao.findByPolicyId(policyVo.getId()); + for (AutoScalePolicyConditionMapVO pcMap : lstPCmap) { + String counterName = getCounternamebyCondition(pcMap.getConditionId()); + + counterNames += counterName + "," + pcMap.getConditionId(); + } + // add to result + Pair pair = new Pair(counterNames, duration); + result.add(pair); + } + + return result; + } + + public String getCounternamebyCondition(long conditionId) { + + ConditionVO condition = _asConditionDao.findById(conditionId); + if (condition == null) + return ""; + + long counterId = condition.getCounterid(); + CounterVO counter = _asCounterDao.findById(counterId); + if (counter == null) + return ""; + + return counter.getSource().toString(); + } + } + + public StorageStats getStorageStats(long id) { + return _storageStats.get(id); + } + + public HostStats getHostStats(long hostId) { + return _hostStats.get(hostId); + } + + public StorageStats getStoragePoolStats(long id) { + return _storagePoolStats.get(id); + } } diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java index 7a7f6b7dc75..831fac8ba44 100755 --- a/server/src/com/cloud/storage/StorageManagerImpl.java +++ b/server/src/com/cloud/storage/StorageManagerImpl.java @@ -269,8 +269,8 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C return _discoverers; } - public void setDiscoverers(List _discoverers) { - this._discoverers = _discoverers; + public void setDiscoverers(List discoverers) { + this._discoverers = discoverers; } protected SearchBuilder HostTemplateStatesSearch; diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java index 18c64ddd531..d215858dfb4 100644 --- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java +++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java @@ -382,8 +382,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic userSpecifiedName = getRandomVolumeName(); } if ((!url.toLowerCase().endsWith("vhd")) && (!url.toLowerCase().endsWith("vhd.zip")) && (!url.toLowerCase().endsWith("vhd.bz2")) && - (!url.toLowerCase().endsWith("vhdx")) && (!url.toLowerCase().endsWith("vhdx.zip")) && - (!url.toLowerCase().endsWith("vhdx.gz")) && (!url.toLowerCase().endsWith("vhdx.bz2")) && + (!url.toLowerCase().endsWith("vhdx")) && (!url.toLowerCase().endsWith("vhdx.zip")) && + (!url.toLowerCase().endsWith("vhdx.gz")) && (!url.toLowerCase().endsWith("vhdx.bz2")) && (!url.toLowerCase().endsWith("vhd.gz")) && (!url.toLowerCase().endsWith("qcow2")) && (!url.toLowerCase().endsWith("qcow2.zip")) && (!url.toLowerCase().endsWith("qcow2.bz2")) && (!url.toLowerCase().endsWith("qcow2.gz")) && (!url.toLowerCase().endsWith("ova")) && (!url.toLowerCase().endsWith("ova.zip")) && (!url.toLowerCase().endsWith("ova.bz2")) && (!url.toLowerCase().endsWith("ova.gz")) && @@ -393,8 +393,9 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic if ((format.equalsIgnoreCase("vhd") && (!url.toLowerCase().endsWith(".vhd") && !url.toLowerCase().endsWith("vhd.zip") && !url.toLowerCase().endsWith("vhd.bz2") && !url.toLowerCase() .endsWith("vhd.gz"))) || - (format.equalsIgnoreCase("vhdx") && (!url.toLowerCase().endsWith(".vhdx") && !url.toLowerCase().endsWith("vhdx.zip") && !url.toLowerCase().endsWith("vhdx.bz2") && !url.toLowerCase() - .endsWith("vhdx.gz"))) || + (format.equalsIgnoreCase("vhdx") && (!url.toLowerCase().endsWith(".vhdx") && !url.toLowerCase().endsWith("vhdx.zip") && + !url.toLowerCase().endsWith("vhdx.bz2") && !url.toLowerCase() + .endsWith("vhdx.gz"))) || (format.equalsIgnoreCase("qcow2") && (!url.toLowerCase().endsWith(".qcow2") && !url.toLowerCase().endsWith("qcow2.zip") && !url.toLowerCase().endsWith("qcow2.bz2") && !url.toLowerCase().endsWith("qcow2.gz"))) || (format.equalsIgnoreCase("ova") && (!url.toLowerCase().endsWith(".ova") && !url.toLowerCase().endsWith("ova.zip") && !url.toLowerCase().endsWith("ova.bz2") && !url.toLowerCase() @@ -632,7 +633,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic } VolumeVO volume = commitVolume(cmd, caller, ownerId, displayVolumeEnabled, zoneId, diskOfferingId, size, minIops, - maxIops, parentVolume, userSpecifiedName, _uuidMgr.generateUuid(Volume.class, cmd.getCustomId())); + maxIops, parentVolume, userSpecifiedName, _uuidMgr.generateUuid(Volume.class, cmd.getCustomId())); return volume; } @@ -740,7 +741,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic } protected VolumeVO createVolumeFromSnapshot(VolumeVO volume, long snapshotId, Long vmId) - throws StorageUnavailableException { + throws StorageUnavailableException { VolumeInfo createdVolume = null; SnapshotVO snapshot = _snapshotDao.findById(snapshotId); @@ -873,7 +874,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic if (!shrinkOk) { /* Check resource limit for this account on primary storage resource */ - _resourceLimitMgr.checkResourceLimit(_accountMgr.getAccount(volume.getAccountId()), ResourceType.primary_storage, volume.isDisplayVolume(), new Long(newSize - currentSize)); + _resourceLimitMgr.checkResourceLimit(_accountMgr.getAccount(volume.getAccountId()), ResourceType.primary_storage, volume.isDisplayVolume(), new Long(newSize - + currentSize)); } /* @@ -980,7 +982,8 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic /* If volume is in primary storage, decrement primary storage count else decrement secondary storage count (in case of upload volume). */ if (volume.getFolder() != null || volume.getPath() != null || volume.getState() == Volume.State.Allocated) { - _resourceLimitMgr.decrementResourceCount(volume.getAccountId(), ResourceType.primary_storage, volume.isDisplayVolume(), new Long(volume.getSize())); + _resourceLimitMgr.decrementResourceCount(volume.getAccountId(), ResourceType.primary_storage, volume.isDisplayVolume(), + new Long(volume.getSize())); } else { _resourceLimitMgr.recalculateResourceCount(volume.getAccountId(), volume.getDomainId(), ResourceType.secondary_storage.getOrdinal()); } @@ -1037,7 +1040,6 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic return attachVolumeToVM(vmId, volumeId, deviceId); } - @ActionEvent(eventType = EventTypes.EVENT_VOLUME_ATTACH, eventDescription = "attaching volume", async = true) public Volume attachVolumeToVM(Long vmId, Long volumeId, Long deviceId) { Account caller = CallContext.current().getCallingAccount(); @@ -1218,7 +1220,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic volume.setPoolId(pool.getId()); } - if (customId != null){ + if (customId != null) { _uuidMgr.checkUuid(customId, Volume.class); volume.setUuid(customId); } diff --git a/server/src/com/cloud/storage/download/DownloadListener.java b/server/src/com/cloud/storage/download/DownloadListener.java index 2941b6e2f35..4f9a5605e33 100755 --- a/server/src/com/cloud/storage/download/DownloadListener.java +++ b/server/src/com/cloud/storage/download/DownloadListener.java @@ -122,7 +122,7 @@ public class DownloadListener implements Listener { private StatusTask _statusTask; private TimeoutTask _timeoutTask; private Date _lastUpdated = new Date(); - private String _jobId; + private String jobId; private final Map _stateMap = new HashMap(); private AsyncCompletionCallback _callback; @@ -137,7 +137,7 @@ public class DownloadListener implements Listener { private VolumeService _volumeSrv; // TODO: this constructor should be the one used for template only, remove other template constructor later - public DownloadListener(EndPoint ssAgent, DataStore store, DataObject object, Timer _timer, DownloadMonitorImpl downloadMonitor, DownloadCommand cmd, + public DownloadListener(EndPoint ssAgent, DataStore store, DataObject object, Timer timer, DownloadMonitorImpl downloadMonitor, DownloadCommand cmd, AsyncCompletionCallback callback) { _ssAgent = ssAgent; this.object = object; @@ -145,7 +145,7 @@ public class DownloadListener implements Listener { _cmd = cmd; initStateMachine(); _currState = getState(Status.NOT_DOWNLOADED.toString()); - this._timer = _timer; + this._timer = timer; _timeoutTask = new TimeoutTask(this); this._timer.schedule(_timeoutTask, 3 * STATUS_POLL_INTERVAL); _callback = callback; @@ -306,8 +306,8 @@ public class DownloadListener implements Listener { } } - public void setCommand(DownloadCommand _cmd) { - this._cmd = _cmd; + public void setCommand(DownloadCommand cmd) { + this._cmd = cmd; } public DownloadCommand getCommand() { @@ -318,12 +318,12 @@ public class DownloadListener implements Listener { transition(DownloadEvent.ABANDON_DOWNLOAD, null); } - public void setJobId(String _jobId) { - this._jobId = _jobId; + public void setJobId(String jobId) { + this.jobId = jobId; } public String getJobId() { - return _jobId; + return jobId; } public void scheduleStatusCheck(RequestType request) { diff --git a/server/src/com/cloud/storage/download/DownloadMonitorImpl.java b/server/src/com/cloud/storage/download/DownloadMonitorImpl.java index d9003334f6c..33278afafb5 100755 --- a/server/src/com/cloud/storage/download/DownloadMonitorImpl.java +++ b/server/src/com/cloud/storage/download/DownloadMonitorImpl.java @@ -56,7 +56,6 @@ import com.cloud.agent.api.storage.Proxy; import com.cloud.configuration.Config; import com.cloud.storage.RegisterVolumePayload; import com.cloud.storage.Storage.ImageFormat; -import com.cloud.storage.VMTemplateStorageResourceAssoc; import com.cloud.storage.VMTemplateStorageResourceAssoc.Status; import com.cloud.storage.Volume; import com.cloud.storage.dao.VMTemplateDao; diff --git a/server/src/com/cloud/storage/listener/SnapshotStateListener.java b/server/src/com/cloud/storage/listener/SnapshotStateListener.java index 649aeff4256..45f0c5d7f52 100644 --- a/server/src/com/cloud/storage/listener/SnapshotStateListener.java +++ b/server/src/com/cloud/storage/listener/SnapshotStateListener.java @@ -29,7 +29,6 @@ import org.apache.cloudstack.framework.events.EventBus; import org.apache.cloudstack.framework.events.EventBusException; import com.cloud.event.EventCategory; -import com.cloud.server.ManagementServer; import com.cloud.server.ManagementService; import com.cloud.storage.Snapshot; import com.cloud.storage.Snapshot.Event; @@ -40,7 +39,7 @@ import com.cloud.utils.fsm.StateListener; public class SnapshotStateListener implements StateListener { - protected static EventBus _eventBus = null; + protected static EventBus s_eventBus = null; private static final Logger s_logger = Logger.getLogger(VolumeStateListener.class); @@ -63,7 +62,7 @@ public class SnapshotStateListener implements StateListener { - protected static EventBus _eventBus = null; + protected static EventBus s_eventBus = null; private static final Logger s_logger = Logger.getLogger(VolumeStateListener.class); @@ -62,7 +61,7 @@ public class VolumeStateListener implements StateListener private void pubishOnEventBus(String event, String status, Volume vo, State oldState, State newState) { try { - _eventBus = ComponentContext.getComponent(EventBus.class); + s_eventBus = ComponentContext.getComponent(EventBus.class); } catch (NoSuchBeanDefinitionException nbe) { return; // no provider is configured to provide events bus, so just return } @@ -82,7 +81,7 @@ public class VolumeStateListener implements StateListener eventMsg.setDescription(eventDescription); try { - _eventBus.publish(eventMsg); + s_eventBus.publish(eventMsg); } catch (EventBusException e) { s_logger.warn("Failed to state change event on the the event bus."); } diff --git a/server/src/com/cloud/storage/resource/DummySecondaryStorageResource.java b/server/src/com/cloud/storage/resource/DummySecondaryStorageResource.java index 583ad9b8def..ce01a69aa0a 100644 --- a/server/src/com/cloud/storage/resource/DummySecondaryStorageResource.java +++ b/server/src/com/cloud/storage/resource/DummySecondaryStorageResource.java @@ -159,8 +159,8 @@ public class DummySecondaryStorageResource extends ServerResourceBase implements return true; } - public void setUseServiceVm(boolean _useServiceVm) { - this._useServiceVm = _useServiceVm; + public void setUseServiceVm(boolean useServiceVm) { + this._useServiceVm = useServiceVm; } public boolean useServiceVm() { diff --git a/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java b/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java index 5c7557f8865..8decfd223b5 100755 --- a/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java +++ b/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java @@ -92,7 +92,6 @@ import com.cloud.network.dao.NetworkVO; import com.cloud.network.rules.RulesManager; import com.cloud.offering.NetworkOffering; import com.cloud.offering.ServiceOffering; -import com.cloud.offerings.NetworkOfferingVO; import com.cloud.offerings.dao.NetworkOfferingDao; import com.cloud.resource.ResourceManager; import com.cloud.resource.ResourceStateAdapter; @@ -168,7 +167,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar private static final int STARTUP_DELAY = 60000; // 60 seconds - private int _mgmt_port = 8250; + private int _mgmtPort = 8250; private List _ssVmAllocators; @@ -825,7 +824,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar Map agentMgrConfigs = _configDao.getConfiguration("AgentManager", params); value = agentMgrConfigs.get("port"); - _mgmt_port = NumbersUtil.parseInt(value, 8250); + _mgmtPort = NumbersUtil.parseInt(value, 8250); _listener = new SecondaryStorageListener(this, _agentMgr); _agentMgr.registerForHostEvents(_listener, true, false, true); @@ -1017,7 +1016,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar StringBuilder buf = profile.getBootArgsBuilder(); buf.append(" template=domP type=secstorage"); buf.append(" host=").append(ClusterManager.ManagementHostIPAdr.value()); - buf.append(" port=").append(_mgmt_port); + buf.append(" port=").append(_mgmtPort); buf.append(" name=").append(profile.getVirtualMachine().getHostName()); buf.append(" zone=").append(dest.getDataCenter().getId()); @@ -1381,6 +1380,6 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements Secondar @Inject public void setSecondaryStorageVmAllocators(List ssVmAllocators) { - this._ssVmAllocators = ssVmAllocators; + _ssVmAllocators = ssVmAllocators; } } diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index ef89fe21c9e..7efc24bd4b8 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -1077,8 +1077,9 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager, if (snapshotType != Type.MANUAL) { String msg = "Snapshot resource limit exceeded for account id : " + owner.getId() + ". Failed to create recurring snapshots"; s_logger.warn(msg); - _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_UPDATE_RESOURCE_COUNT, 0L, 0L, msg, "Snapshot resource limit exceeded for account id : " + owner.getId() + - ". Failed to create recurring snapshots; please use updateResourceLimit to increase the limit"); + _alertMgr.sendAlert(AlertManager.AlertType.ALERT_TYPE_UPDATE_RESOURCE_COUNT, 0L, 0L, msg, + "Snapshot resource limit exceeded for account id : " + owner.getId() + + ". Failed to create recurring snapshots; please use updateResourceLimit to increase the limit"); } throw e; } diff --git a/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java index 78e78b63bf5..315905953a6 100644 --- a/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java @@ -93,13 +93,13 @@ public class SnapshotSchedulerImpl extends ManagerBase implements SnapshotSchedu private TestClock _testTimerTask; public AsyncJobDispatcher getAsyncJobDispatcher() { - return _asyncDispatcher; + return _asyncDispatcher; } - + public void setAsyncJobDispatcher(AsyncJobDispatcher dispatcher) { - _asyncDispatcher = dispatcher; + _asyncDispatcher = dispatcher; } - + private Date getNextScheduledTime(long policyId, Date currentTimestamp) { SnapshotPolicyVO policy = _snapshotPolicyDao.findById(policyId); Date nextTimestamp = null; diff --git a/server/src/com/cloud/storage/upload/UploadListener.java b/server/src/com/cloud/storage/upload/UploadListener.java index 1fa89468b85..f6ad815d007 100755 --- a/server/src/com/cloud/storage/upload/UploadListener.java +++ b/server/src/com/cloud/storage/upload/UploadListener.java @@ -166,7 +166,7 @@ public class UploadListener implements Listener { private final Map stateMap = new HashMap(); private Long uploadId; - public UploadListener(DataStore host, Timer _timer, UploadDao uploadDao, UploadVO uploadObj, UploadMonitorImpl uploadMonitor, UploadCommand cmd, Long accountId, + public UploadListener(DataStore host, Timer timerInput, UploadDao uploadDao, UploadVO uploadObj, UploadMonitorImpl uploadMonitor, UploadCommand cmd, Long accountId, String typeName, Type type, long eventId, long asyncJobId, AsyncJobManager asyncMgr) { sserver = host; this.uploadDao = uploadDao; @@ -178,7 +178,7 @@ public class UploadListener implements Listener { this.type = type; initStateMachine(); currState = getState(Status.NOT_UPLOADED.toString()); - timer = _timer; + timer = timerInput; timeoutTask = new TimeoutTask(this); timer.schedule(timeoutTask, 3 * STATUS_POLL_INTERVAL); this.eventId = eventId; @@ -215,12 +215,12 @@ public class UploadListener implements Listener { return false; } - public void setCommand(UploadCommand _cmd) { - cmd = _cmd; + public void setCommand(UploadCommand cmd) { + this.cmd = cmd; } - public void setJobId(String _jobId) { - jobId = _jobId; + public void setJobId(String jobId) { + this.jobId = jobId; } public String getJobId() { diff --git a/server/src/com/cloud/tags/TaggedResourceManagerImpl.java b/server/src/com/cloud/tags/TaggedResourceManagerImpl.java index 84b7a670d78..28f94f06f4f 100644 --- a/server/src/com/cloud/tags/TaggedResourceManagerImpl.java +++ b/server/src/com/cloud/tags/TaggedResourceManagerImpl.java @@ -42,8 +42,6 @@ import com.cloud.network.dao.IPAddressDao; import com.cloud.network.dao.LoadBalancerDao; import com.cloud.network.dao.NetworkDao; import com.cloud.network.dao.RemoteAccessVpnDao; -import com.cloud.network.dao.Site2SiteCustomerGatewayDao; -import com.cloud.network.dao.Site2SiteVpnGatewayDao; import com.cloud.network.rules.dao.PortForwardingRulesDao; import com.cloud.network.security.dao.SecurityGroupDao; import com.cloud.network.vpc.NetworkACLItemDao; @@ -84,7 +82,7 @@ import com.cloud.vm.snapshot.dao.VMSnapshotDao; public class TaggedResourceManagerImpl extends ManagerBase implements TaggedResourceService { public static final Logger s_logger = Logger.getLogger(TaggedResourceManagerImpl.class); - private static Map> _daoMap = new HashMap>(); + private static Map> s_daoMap = new HashMap>(); @Inject AccountManager _accountMgr; @@ -140,38 +138,32 @@ public class TaggedResourceManagerImpl extends ManagerBase implements TaggedReso VpcGatewayDao _vpcGatewayDao; @Inject NetworkACLDao _networkACLListDao; - @Inject - Site2SiteVpnGatewayDao _vpnGatewayDao; - @Inject - Site2SiteCustomerGatewayDao _customerGatewayDao; @Override public boolean configure(String name, Map params) throws ConfigurationException { - _daoMap.put(ResourceObjectType.UserVm, _userVmDao); - _daoMap.put(ResourceObjectType.Volume, _volumeDao); - _daoMap.put(ResourceObjectType.Template, _templateDao); - _daoMap.put(ResourceObjectType.ISO, _templateDao); - _daoMap.put(ResourceObjectType.Snapshot, _snapshotDao); - _daoMap.put(ResourceObjectType.Network, _networkDao); - _daoMap.put(ResourceObjectType.LoadBalancer, _lbDao); - _daoMap.put(ResourceObjectType.PortForwardingRule, _pfDao); - _daoMap.put(ResourceObjectType.FirewallRule, _firewallDao); - _daoMap.put(ResourceObjectType.SecurityGroup, _securityGroupDao); - _daoMap.put(ResourceObjectType.PublicIpAddress, _publicIpDao); - _daoMap.put(ResourceObjectType.Project, _projectDao); - _daoMap.put(ResourceObjectType.Vpc, _vpcDao); - _daoMap.put(ResourceObjectType.Nic, _nicDao); - _daoMap.put(ResourceObjectType.NetworkACL, _networkACLItemDao); - _daoMap.put(ResourceObjectType.StaticRoute, _staticRouteDao); - _daoMap.put(ResourceObjectType.VMSnapshot, _vmSnapshotDao); - _daoMap.put(ResourceObjectType.RemoteAccessVpn, _vpnDao); - _daoMap.put(ResourceObjectType.Zone, _dataCenterDao); - _daoMap.put(ResourceObjectType.ServiceOffering, _serviceOffDao); - _daoMap.put(ResourceObjectType.Storage, _storagePoolDao); - _daoMap.put(ResourceObjectType.PrivateGateway, _vpcGatewayDao); - _daoMap.put(ResourceObjectType.NetworkACLList, _networkACLListDao); - _daoMap.put(ResourceObjectType.VpnGateway, _vpnGatewayDao); - _daoMap.put(ResourceObjectType.CustomerGateway, _customerGatewayDao); + s_daoMap.put(ResourceObjectType.UserVm, _userVmDao); + s_daoMap.put(ResourceObjectType.Volume, _volumeDao); + s_daoMap.put(ResourceObjectType.Template, _templateDao); + s_daoMap.put(ResourceObjectType.ISO, _templateDao); + s_daoMap.put(ResourceObjectType.Snapshot, _snapshotDao); + s_daoMap.put(ResourceObjectType.Network, _networkDao); + s_daoMap.put(ResourceObjectType.LoadBalancer, _lbDao); + s_daoMap.put(ResourceObjectType.PortForwardingRule, _pfDao); + s_daoMap.put(ResourceObjectType.FirewallRule, _firewallDao); + s_daoMap.put(ResourceObjectType.SecurityGroup, _securityGroupDao); + s_daoMap.put(ResourceObjectType.PublicIpAddress, _publicIpDao); + s_daoMap.put(ResourceObjectType.Project, _projectDao); + s_daoMap.put(ResourceObjectType.Vpc, _vpcDao); + s_daoMap.put(ResourceObjectType.Nic, _nicDao); + s_daoMap.put(ResourceObjectType.NetworkACL, _networkACLItemDao); + s_daoMap.put(ResourceObjectType.StaticRoute, _staticRouteDao); + s_daoMap.put(ResourceObjectType.VMSnapshot, _vmSnapshotDao); + s_daoMap.put(ResourceObjectType.RemoteAccessVpn, _vpnDao); + s_daoMap.put(ResourceObjectType.Zone, _dataCenterDao); + s_daoMap.put(ResourceObjectType.ServiceOffering, _serviceOffDao); + s_daoMap.put(ResourceObjectType.Storage, _storagePoolDao); + s_daoMap.put(ResourceObjectType.PrivateGateway, _vpcGatewayDao); + s_daoMap.put(ResourceObjectType.NetworkACLList, _networkACLListDao); return true; } @@ -188,7 +180,7 @@ public class TaggedResourceManagerImpl extends ManagerBase implements TaggedReso @Override public long getResourceId(String resourceId, ResourceObjectType resourceType) { - GenericDao dao = _daoMap.get(resourceType); + GenericDao dao = s_daoMap.get(resourceType); if (dao == null) { throw new CloudRuntimeException("Dao is not loaded for the resource type " + resourceType); } @@ -221,7 +213,7 @@ public class TaggedResourceManagerImpl extends ManagerBase implements TaggedReso private Pair getAccountDomain(long resourceId, ResourceObjectType resourceType) { Pair pair = null; - GenericDao dao = _daoMap.get(resourceType); + GenericDao dao = s_daoMap.get(resourceType); Class claz = DbUtil.getEntityBeanType(dao); while (claz != null && claz != Object.class) { try { @@ -316,7 +308,7 @@ public class TaggedResourceManagerImpl extends ManagerBase implements TaggedReso @Override public String getUuid(String resourceId, ResourceObjectType resourceType) { - GenericDao dao = _daoMap.get(resourceType); + GenericDao dao = s_daoMap.get(resourceType); Class claz = DbUtil.getEntityBeanType(dao); String identiyUUId = null; diff --git a/server/src/com/cloud/template/HypervisorTemplateAdapter.java b/server/src/com/cloud/template/HypervisorTemplateAdapter.java index 542e675d127..74d1ac85b4f 100755 --- a/server/src/com/cloud/template/HypervisorTemplateAdapter.java +++ b/server/src/com/cloud/template/HypervisorTemplateAdapter.java @@ -157,8 +157,9 @@ public class HypervisorTemplateAdapter extends TemplateAdapterBase { if ((format.equalsIgnoreCase("vhd") && (!url.toLowerCase().endsWith("vhd") && !url.toLowerCase().endsWith("vhd.zip") && !url.toLowerCase().endsWith("vhd.bz2") && !url.toLowerCase() .endsWith("vhd.gz"))) || - (format.equalsIgnoreCase("vhdx") && (!url.toLowerCase().endsWith("vhdx") && !url.toLowerCase().endsWith("vhdx.zip") && !url.toLowerCase().endsWith("vhdx.bz2") && !url.toLowerCase() - .endsWith("vhdx.gz"))) || + (format.equalsIgnoreCase("vhdx") && (!url.toLowerCase().endsWith("vhdx") && !url.toLowerCase().endsWith("vhdx.zip") && + !url.toLowerCase().endsWith("vhdx.bz2") && !url.toLowerCase() + .endsWith("vhdx.gz"))) || (format.equalsIgnoreCase("qcow2") && (!url.toLowerCase().endsWith("qcow2") && !url.toLowerCase().endsWith("qcow2.zip") && !url.toLowerCase().endsWith("qcow2.bz2") && !url.toLowerCase().endsWith("qcow2.gz"))) || (format.equalsIgnoreCase("ova") && (!url.toLowerCase().endsWith("ova") && !url.toLowerCase().endsWith("ova.zip") && !url.toLowerCase().endsWith("ova.bz2") && !url.toLowerCase() diff --git a/server/src/com/cloud/template/TemplateManagerImpl.java b/server/src/com/cloud/template/TemplateManagerImpl.java index ce178cd2e99..accb1812d2f 100755 --- a/server/src/com/cloud/template/TemplateManagerImpl.java +++ b/server/src/com/cloud/template/TemplateManagerImpl.java @@ -1267,12 +1267,12 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager, updatedTemplate.setFeatured(isFeatured.booleanValue()); } - if(isExtractable != null){ + if (isExtractable != null) { // Only Root admins allowed to change it for templates - if(!template.getFormat().equals(ImageFormat.ISO) && caller.getType() != Account.ACCOUNT_TYPE_ADMIN){ + if (!template.getFormat().equals(ImageFormat.ISO) && caller.getType() != Account.ACCOUNT_TYPE_ADMIN) { throw new InvalidParameterValueException("Only ROOT admins are allowed to modify this attribute."); - }else{ - // For Isos normal user can change it, as their are no derivatives. + } else { + // For Isos normal user can change it, as their are no derivatives. updatedTemplate.setExtractable(isExtractable.booleanValue()); } } @@ -1628,20 +1628,20 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager, // Increment the number of templates if (template != null) { Map details = new HashMap(); - if ( volume != null ) { + if (volume != null) { Long vmId = volume.getInstanceId(); - if ( vmId != null ) { - UserVmVO userVm = _userVmDao.findById(vmId); + if (vmId != null) { + UserVmVO userVm = _userVmDao.findById(vmId); if (userVm != null) { _userVmDao.loadDetails(userVm); details.putAll(userVm.getDetails()); } } } - if(cmd.getDetails() != null) { + if (cmd.getDetails() != null) { details.putAll(cmd.getDetails()); } - if( !details.isEmpty()) { + if (!details.isEmpty()) { privateTemplate.setDetails(details); _tmpltDao.saveDetails(privateTemplate); } diff --git a/server/src/com/cloud/user/AccountManagerImpl.java b/server/src/com/cloud/user/AccountManagerImpl.java index fa441ae65dd..8504ee11705 100755 --- a/server/src/com/cloud/user/AccountManagerImpl.java +++ b/server/src/com/cloud/user/AccountManagerImpl.java @@ -39,6 +39,7 @@ import javax.naming.ConfigurationException; import org.apache.commons.codec.binary.Base64; import org.apache.log4j.Logger; + import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.acl.RoleType; import org.apache.cloudstack.acl.SecurityChecker; @@ -54,8 +55,6 @@ import org.apache.cloudstack.engine.orchestration.service.NetworkOrchestrationSe import org.apache.cloudstack.framework.config.dao.ConfigurationDao; import org.apache.cloudstack.managed.context.ManagedContextRunnable; import org.apache.cloudstack.region.gslb.GlobalLoadBalancerRuleDao; -import org.apache.commons.codec.binary.Base64; -import org.apache.log4j.Logger; import com.cloud.api.ApiDBUtils; import com.cloud.api.query.vo.ControlledViewEntity; @@ -156,7 +155,7 @@ import com.cloud.vm.dao.InstanceGroupDao; import com.cloud.vm.dao.UserVmDao; import com.cloud.vm.dao.VMInstanceDao; -@Local(value = { AccountManager.class, AccountService.class }) +@Local(value = {AccountManager.class, AccountService.class}) public class AccountManagerImpl extends ManagerBase implements AccountManager, Manager { public static final Logger s_logger = Logger.getLogger(AccountManagerImpl.class); @@ -345,7 +344,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M @Override public boolean isAdmin(short accountType) { return ((accountType == Account.ACCOUNT_TYPE_ADMIN) || (accountType == Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN) || - (accountType == Account.ACCOUNT_TYPE_DOMAIN_ADMIN) || (accountType == Account.ACCOUNT_TYPE_READ_ONLY_ADMIN)); + (accountType == Account.ACCOUNT_TYPE_DOMAIN_ADMIN) || (accountType == Account.ACCOUNT_TYPE_READ_ONLY_ADMIN)); } @Override @@ -381,7 +380,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M @Override public void checkAccess(Account caller, AccessType accessType, boolean sameOwner, ControlledEntity... entities) { - + //check for the same owner Long ownerId = null; ControlledEntity prevEntity = null; @@ -395,7 +394,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M } prevEntity = entity; } - } + } } if (caller.getId() == Account.ACCOUNT_ID_SYSTEM || isRootAdmin(caller.getType())) { @@ -416,7 +415,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M domainId = account != null ? account.getDomainId() : -1; } if (entity.getAccountId() != -1 && domainId != -1 && !(entity instanceof VirtualMachineTemplate) && - !(accessType != null && accessType == AccessType.UseNetwork) && !(entity instanceof AffinityGroup)) { + !(accessType != null && accessType == AccessType.UseNetwork) && !(entity instanceof AffinityGroup)) { List toBeChecked = domains.get(entity.getDomainId()); // for templates, we don't have to do cross domains check if (toBeChecked == null) { @@ -864,12 +863,13 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M @Override @DB @ActionEvents({ - @ActionEvent(eventType = EventTypes.EVENT_ACCOUNT_CREATE, eventDescription = "creating Account"), - @ActionEvent(eventType = EventTypes.EVENT_USER_CREATE, eventDescription = "creating User") + @ActionEvent(eventType = EventTypes.EVENT_ACCOUNT_CREATE, eventDescription = "creating Account"), + @ActionEvent(eventType = EventTypes.EVENT_USER_CREATE, eventDescription = "creating User") }) - public UserAccount createUserAccount(final String userName, final String password, final String firstName, final String lastName, final String email, final String timezone, String accountName, - final short accountType, - Long domainId, final String networkDomain, final Map details, String accountUUID, final String userUUID) { + public UserAccount createUserAccount(final String userName, final String password, final String firstName, final String lastName, final String email, + final String timezone, String accountName, + final short accountType, + Long domainId, final String networkDomain, final Map details, String accountUUID, final String userUUID) { if (accountName == null) { accountName = userName; @@ -906,8 +906,8 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M if (networkDomain != null) { if (!NetUtils.verifyDomainName(networkDomain)) { throw new InvalidParameterValueException( - "Invalid network domain. Total length shouldn't exceed 190 chars. Each domain label must be between 1 and 63 characters long, can contain ASCII letters 'a' through 'z', the digits '0' through '9', " - + "and the hyphen ('-'); can't start or end with \"-\""); + "Invalid network domain. Total length shouldn't exceed 190 chars. Each domain label must be between 1 and 63 characters long, can contain ASCII letters 'a' through 'z', the digits '0' through '9', " + + "and the hyphen ('-'); can't start or end with \"-\""); } } @@ -950,7 +950,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M @Override @ActionEvent(eventType = EventTypes.EVENT_USER_CREATE, eventDescription = "creating User") public UserVO createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId, - String userUUID) { + String userUUID) { // default domain to ROOT if not specified if (domainId == null) { @@ -1265,7 +1265,8 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M @Override @ActionEvent(eventType = EventTypes.EVENT_ACCOUNT_DELETE, eventDescription = "deleting account", async = true) // This method deletes the account - public boolean deleteUserAccount(long accountId) { + public + boolean deleteUserAccount(long accountId) { CallContext ctx = CallContext.current(); long callerUserId = ctx.getCallingUserId(); @@ -1356,7 +1357,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M if (account == null || account.getType() == Account.ACCOUNT_TYPE_PROJECT) { throw new InvalidParameterValueException("Unable to find active account by accountId: " + accountId + " OR by name: " + accountName + " in domain " + - domainId); + domainId); } if (account.getId() == Account.ACCOUNT_ID_SYSTEM) { @@ -1445,14 +1446,14 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M // update // itself throw new InvalidParameterValueException("There already exists an account with the name:" + newAccountName + " in the domain:" + domainId + - " with existing account id:" + duplicateAcccount.getId()); + " with existing account id:" + duplicateAcccount.getId()); } if (networkDomain != null && !networkDomain.isEmpty()) { if (!NetUtils.verifyDomainName(networkDomain)) { throw new InvalidParameterValueException( - "Invalid network domain. Total length shouldn't exceed 190 chars. Each domain label must be between 1 and 63 characters long, can contain ASCII letters 'a' through 'z', the digits '0' through '9', " - + "and the hyphen ('-'); can't start or end with \"-\""); + "Invalid network domain. Total length shouldn't exceed 190 chars. Each domain label must be between 1 and 63 characters long, can contain ASCII letters 'a' through 'z', the digits '0' through '9', " + + "and the hyphen ('-'); can't start or end with \"-\""); } } @@ -1690,18 +1691,18 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M // Account type to role type translation switch (accountType) { - case Account.ACCOUNT_TYPE_ADMIN: - roleType = RoleType.Admin; - break; - case Account.ACCOUNT_TYPE_DOMAIN_ADMIN: - roleType = RoleType.DomainAdmin; - break; - case Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN: - roleType = RoleType.ResourceAdmin; - break; - case Account.ACCOUNT_TYPE_NORMAL: - roleType = RoleType.User; - break; + case Account.ACCOUNT_TYPE_ADMIN: + roleType = RoleType.Admin; + break; + case Account.ACCOUNT_TYPE_DOMAIN_ADMIN: + roleType = RoleType.DomainAdmin; + break; + case Account.ACCOUNT_TYPE_RESOURCE_DOMAIN_ADMIN: + roleType = RoleType.ResourceAdmin; + break; + case Account.ACCOUNT_TYPE_NORMAL: + roleType = RoleType.User; + break; } return roleType; } @@ -1731,7 +1732,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M @Override @DB public AccountVO createAccount(final String accountName, final short accountType, final Long domainId, final String networkDomain, final Map details, - final String uuid) { + final String uuid) { // Validate domain Domain domain = _domainMgr.getDomain(domainId); if (domain == null) { @@ -1754,8 +1755,8 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M if (networkDomain != null) { if (!NetUtils.verifyDomainName(networkDomain)) { throw new InvalidParameterValueException( - "Invalid network domain. Total length shouldn't exceed 190 chars. Each domain label must be between 1 and 63 characters long, can contain ASCII letters 'a' through 'z', the digits '0' through '9', " - + "and the hyphen ('-'); can't start or end with \"-\""); + "Invalid network domain. Total length shouldn't exceed 190 chars. Each domain label must be between 1 and 63 characters long, can contain ASCII letters 'a' through 'z', the digits '0' through '9', " + + "and the hyphen ('-'); can't start or end with \"-\""); } } @@ -1860,7 +1861,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M List parameterNames = new ArrayList(); for (Object paramNameObj : requestParameters.keySet()) { - parameterNames.add((String) paramNameObj); // put the name in a list that we'll sort later + parameterNames.add((String)paramNameObj); // put the name in a list that we'll sort later } Collections.sort(parameterNames); @@ -1868,7 +1869,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M try { for (String paramName : parameterNames) { // parameters come as name/value pairs in the form String/String[] - String paramValue = ((String[]) requestParameters.get(paramName))[0]; + String paramValue = ((String[])requestParameters.get(paramName))[0]; if ("signature".equalsIgnoreCase(paramName)) { signature = paramValue; @@ -1941,10 +1942,10 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M } if (NetUtils.isValidIp(loginIpAddress)) { ActionEventUtils.onActionEvent(user.getId(), user.getAccountId(), user.getDomainId(), EventTypes.EVENT_USER_LOGIN, "user has logged in from IP Address " + - loginIpAddress); + loginIpAddress); } else { ActionEventUtils.onActionEvent(user.getId(), user.getAccountId(), user.getDomainId(), EventTypes.EVENT_USER_LOGIN, - "user has logged in. The IP Address cannot be determined"); + "user has logged in. The IP Address cannot be determined"); } return user; } else { @@ -1982,7 +1983,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M } if (!userAccount.getState().equalsIgnoreCase(Account.State.enabled.toString()) || - !userAccount.getAccountState().equalsIgnoreCase(Account.State.enabled.toString())) { + !userAccount.getAccountState().equalsIgnoreCase(Account.State.enabled.toString())) { if (s_logger.isInfoEnabled()) { s_logger.info("User " + username + " in domain " + domainName + " is disabled/locked (or account is disabled/locked)"); } @@ -2114,14 +2115,14 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M @Override public void buildACLSearchBuilder(SearchBuilder sb, Long domainId, boolean isRecursive, List permittedAccounts, - ListProjectResourcesCriteria listProjectResourcesCriteria) { + ListProjectResourcesCriteria listProjectResourcesCriteria) { if (sb.entity() instanceof IPAddressVO) { - sb.and("accountIdIN", ((IPAddressVO) sb.entity()).getAllocatedToAccountId(), SearchCriteria.Op.IN); - sb.and("domainId", ((IPAddressVO) sb.entity()).getAllocatedInDomainId(), SearchCriteria.Op.EQ); + sb.and("accountIdIN", ((IPAddressVO)sb.entity()).getAllocatedToAccountId(), SearchCriteria.Op.IN); + sb.and("domainId", ((IPAddressVO)sb.entity()).getAllocatedInDomainId(), SearchCriteria.Op.EQ); } else if (sb.entity() instanceof ProjectInvitationVO) { - sb.and("accountIdIN", ((ProjectInvitationVO) sb.entity()).getForAccountId(), SearchCriteria.Op.IN); - sb.and("domainId", ((ProjectInvitationVO) sb.entity()).getInDomainId(), SearchCriteria.Op.EQ); + sb.and("accountIdIN", ((ProjectInvitationVO)sb.entity()).getForAccountId(), SearchCriteria.Op.IN); + sb.and("domainId", ((ProjectInvitationVO)sb.entity()).getInDomainId(), SearchCriteria.Op.EQ); } else { sb.and("accountIdIN", sb.entity().getAccountId(), SearchCriteria.Op.IN); sb.and("domainId", sb.entity().getDomainId(), SearchCriteria.Op.EQ); @@ -2133,9 +2134,9 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M domainSearch.and("path", domainSearch.entity().getPath(), SearchCriteria.Op.LIKE); if (sb.entity() instanceof IPAddressVO) { - sb.join("domainSearch", domainSearch, ((IPAddressVO) sb.entity()).getAllocatedInDomainId(), domainSearch.entity().getId(), JoinBuilder.JoinType.INNER); + sb.join("domainSearch", domainSearch, ((IPAddressVO)sb.entity()).getAllocatedInDomainId(), domainSearch.entity().getId(), JoinBuilder.JoinType.INNER); } else if (sb.entity() instanceof ProjectInvitationVO) { - sb.join("domainSearch", domainSearch, ((ProjectInvitationVO) sb.entity()).getInDomainId(), domainSearch.entity().getId(), JoinBuilder.JoinType.INNER); + sb.join("domainSearch", domainSearch, ((ProjectInvitationVO)sb.entity()).getInDomainId(), domainSearch.entity().getId(), JoinBuilder.JoinType.INNER); } else { sb.join("domainSearch", domainSearch, sb.entity().getDomainId(), domainSearch.entity().getId(), JoinBuilder.JoinType.INNER); } @@ -2150,9 +2151,9 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M } if (sb.entity() instanceof IPAddressVO) { - sb.join("accountSearch", accountSearch, ((IPAddressVO) sb.entity()).getAllocatedToAccountId(), accountSearch.entity().getId(), JoinBuilder.JoinType.INNER); + sb.join("accountSearch", accountSearch, ((IPAddressVO)sb.entity()).getAllocatedToAccountId(), accountSearch.entity().getId(), JoinBuilder.JoinType.INNER); } else if (sb.entity() instanceof ProjectInvitationVO) { - sb.join("accountSearch", accountSearch, ((ProjectInvitationVO) sb.entity()).getForAccountId(), accountSearch.entity().getId(), JoinBuilder.JoinType.INNER); + sb.join("accountSearch", accountSearch, ((ProjectInvitationVO)sb.entity()).getForAccountId(), accountSearch.entity().getId(), JoinBuilder.JoinType.INNER); } else { sb.join("accountSearch", accountSearch, sb.entity().getAccountId(), accountSearch.entity().getId(), JoinBuilder.JoinType.INNER); } @@ -2161,7 +2162,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M @Override public void buildACLSearchCriteria(SearchCriteria sc, Long domainId, boolean isRecursive, List permittedAccounts, - ListProjectResourcesCriteria listProjectResourcesCriteria) { + ListProjectResourcesCriteria listProjectResourcesCriteria) { if (listProjectResourcesCriteria != null) { sc.setJoinParameters("accountSearch", "type", Account.ACCOUNT_TYPE_PROJECT); @@ -2181,8 +2182,8 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M @Override public void buildACLSearchParameters(Account caller, Long id, String accountName, Long projectId, List - permittedAccounts, Ternary domainIdRecursiveListProject, - boolean listAll, boolean forProjectInvitation) { + permittedAccounts, Ternary domainIdRecursiveListProject, + boolean listAll, boolean forProjectInvitation) { Long domainId = domainIdRecursiveListProject.first(); if (domainId != null) { Domain domain = _domainDao.findById(domainId); @@ -2268,7 +2269,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M @Override public void buildACLViewSearchBuilder(SearchBuilder sb, Long domainId, boolean isRecursive, List permittedAccounts, - ListProjectResourcesCriteria listProjectResourcesCriteria) { + ListProjectResourcesCriteria listProjectResourcesCriteria) { sb.and("accountIdIN", sb.entity().getAccountId(), SearchCriteria.Op.IN); sb.and("domainId", sb.entity().getDomainId(), SearchCriteria.Op.EQ); @@ -2291,7 +2292,7 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M @Override public void buildACLViewSearchCriteria(SearchCriteria sc, Long domainId, boolean isRecursive, List permittedAccounts, - ListProjectResourcesCriteria listProjectResourcesCriteria) { + ListProjectResourcesCriteria listProjectResourcesCriteria) { if (listProjectResourcesCriteria != null) { sc.setParameters("accountType", Account.ACCOUNT_TYPE_PROJECT); diff --git a/server/src/com/cloud/uuididentity/UUIDManager.java b/server/src/com/cloud/uuididentity/UUIDManager.java index 6bef87a1cde..ecf238c9e09 100644 --- a/server/src/com/cloud/uuididentity/UUIDManager.java +++ b/server/src/com/cloud/uuididentity/UUIDManager.java @@ -16,7 +16,6 @@ // under the License. package com.cloud.uuididentity; -import org.apache.cloudstack.api.Identity; public interface UUIDManager { diff --git a/server/src/com/cloud/uuididentity/UUIDManagerImpl.java b/server/src/com/cloud/uuididentity/UUIDManagerImpl.java index 852b2dcaf7d..09ba3d1c18f 100644 --- a/server/src/com/cloud/uuididentity/UUIDManagerImpl.java +++ b/server/src/com/cloud/uuididentity/UUIDManagerImpl.java @@ -16,84 +16,82 @@ // under the License. package com.cloud.uuididentity; +import java.util.UUID; + +import javax.ejb.Local; +import javax.inject.Inject; + +import org.apache.cloudstack.context.CallContext; + import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.PermissionDeniedException; -import com.cloud.storage.Volume; import com.cloud.user.Account; import com.cloud.user.AccountManager; import com.cloud.utils.db.EntityManager; import com.cloud.utils.exception.CloudRuntimeException; -import org.apache.cloudstack.acl.ControlledEntity; -import org.apache.cloudstack.api.Identity; -import org.apache.cloudstack.context.CallContext; -import javax.ejb.Local; -import javax.inject.Inject; -import java.util.UUID; - -@Local(value = { UUIDManager.class }) +@Local(value = {UUIDManager.class}) public class UUIDManagerImpl implements UUIDManager { - @Inject EntityManager _entityMgr; @Inject AccountManager _accountMgr; //TODO - Make this configurable. - private final int UUID_RETRY = 3; - + private static final int UUID_RETRY = 3; @Override - public void checkUuid(String uuid, Class entityType){ + public void checkUuid(String uuid, Class entityType) { - if(uuid == null) return; + if (uuid == null) + return; Account caller = CallContext.current().getCallingAccount(); // Only admin and system allowed to do this - if ( !(caller.getId() == Account.ACCOUNT_ID_SYSTEM || _accountMgr.isRootAdmin(caller.getType())) ) { + if (!(caller.getId() == Account.ACCOUNT_ID_SYSTEM || _accountMgr.isRootAdmin(caller.getType()))) { throw new PermissionDeniedException("Please check your permissions, you are not allowed to create/update custom id"); } // check format - if(!IsUuidFormat(uuid)) + if (!IsUuidFormat(uuid)) throw new InvalidParameterValueException("UUID: " + uuid + " doesn't follow the UUID format"); // check unique - if(!IsUuidUnique(entityType, uuid)) + if (!IsUuidUnique(entityType, uuid)) throw new InvalidParameterValueException("UUID: " + uuid + " already exists so can't create/update with custom id"); } - public boolean IsUuidFormat(String uuid){ + public boolean IsUuidFormat(String uuid) { // Match against UUID regex to check if input is uuid string boolean isUuid = uuid.matches("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"); return isUuid; } - public boolean IsUuidUnique(Class entityType, String uuid){ + public boolean IsUuidUnique(Class entityType, String uuid) { T obj = _entityMgr.findByUuid(entityType, uuid); - if(obj != null) + if (obj != null) return false; else return true; } @Override - public String generateUuid(Class entityType, String customId){ + public String generateUuid(Class entityType, String customId) { - if(customId == null){ // if no customid is passed then generate it. + if (customId == null) { // if no customid is passed then generate it. int retry = UUID_RETRY; while (retry-- != 0) { // there might be collision so retry String uuid = UUID.randomUUID().toString(); - if(IsUuidUnique(entityType, uuid)) + if (IsUuidUnique(entityType, uuid)) return uuid; } throw new CloudRuntimeException("Unable to generate a unique uuid, please try again"); - }else { + } else { checkUuid(customId, entityType); return customId; } diff --git a/server/src/com/cloud/uuididentity/dao/IdentityDaoImpl.java b/server/src/com/cloud/uuididentity/dao/IdentityDaoImpl.java index c5d2c434b0b..3475104dbc3 100644 --- a/server/src/com/cloud/uuididentity/dao/IdentityDaoImpl.java +++ b/server/src/com/cloud/uuididentity/dao/IdentityDaoImpl.java @@ -61,9 +61,9 @@ public class IdentityDaoImpl extends GenericDaoBase implements pstmt = txn.prepareAutoCloseStatement(String.format("SELECT id FROM `%s` WHERE id=? OR uuid=?", tableName) - // TODO : after graceful period, use following line turn on more secure check - // String.format("SELECT id FROM %s WHERE (id=? AND uuid IS NULL) OR uuid=?", mapper.entityTableName()) - ); + // TODO : after graceful period, use following line turn on more secure check + // String.format("SELECT id FROM %s WHERE (id=? AND uuid IS NULL) OR uuid=?", mapper.entityTableName()) + ); long id = 0; try { @@ -150,8 +150,8 @@ public class IdentityDaoImpl extends GenericDaoBase implements try { try { pstmt = txn.prepareAutoCloseStatement(String.format("SELECT uuid FROM `%s` WHERE id=? OR uuid=?", tableName) - // String.format("SELECT uuid FROM %s WHERE (id=? AND uuid IS NULL) OR uuid=?", tableName) - ); + // String.format("SELECT uuid FROM %s WHERE (id=? AND uuid IS NULL) OR uuid=?", tableName) + ); long id = 0; try { diff --git a/server/src/com/cloud/vm/SystemVmLoadScanner.java b/server/src/com/cloud/vm/SystemVmLoadScanner.java index 28c900d9d7a..97f9dcdaab4 100644 --- a/server/src/com/cloud/vm/SystemVmLoadScanner.java +++ b/server/src/com/cloud/vm/SystemVmLoadScanner.java @@ -44,7 +44,7 @@ public class SystemVmLoadScanner { private final SystemVmLoadScanHandler _scanHandler; private final ScheduledExecutorService _capacityScanScheduler; private final GlobalLock _capacityScanLock; - + public SystemVmLoadScanner(SystemVmLoadScanHandler scanHandler) { _scanHandler = scanHandler; _capacityScanScheduler = Executors.newScheduledThreadPool(1, new NamedThreadFactory(scanHandler.getScanHandlerName())); @@ -71,15 +71,15 @@ public class SystemVmLoadScanner { @Override protected void runInContext() { - try { - CallContext callContext = CallContext.current(); - assert(callContext != null); - - AsyncJobExecutionContext.registerPseudoExecutionContext( - callContext.getCallingAccountId(), callContext.getCallingUserId()); - + try { + CallContext callContext = CallContext.current(); + assert (callContext != null); + + AsyncJobExecutionContext.registerPseudoExecutionContext( + callContext.getCallingAccountId(), callContext.getCallingUserId()); + reallyRun(); - + AsyncJobExecutionContext.unregister(); } catch (Throwable e) { s_logger.warn("Unexpected exception " + e.getMessage(), e); diff --git a/server/src/com/cloud/vm/UserVmManager.java b/server/src/com/cloud/vm/UserVmManager.java index da60f330abd..604349153ce 100755 --- a/server/src/com/cloud/vm/UserVmManager.java +++ b/server/src/com/cloud/vm/UserVmManager.java @@ -110,7 +110,8 @@ public interface UserVmManager extends UserVmService { Pair> startVirtualMachine(long vmId, Long hostId, Map additionalParams) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException; - boolean upgradeVirtualMachine(Long id, Long serviceOfferingId, Map customParameters) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException, + boolean upgradeVirtualMachine(Long id, Long serviceOfferingId, Map customParameters) throws ResourceUnavailableException, + ConcurrentOperationException, ManagementServerException, VirtualMachineMigrationException; boolean setupVmForPvlan(boolean add, Long hostId, NicProfile nic); @@ -118,7 +119,7 @@ public interface UserVmManager extends UserVmService { void collectVmDiskStatistics(UserVmVO userVm); UserVm updateVirtualMachine(long id, String displayName, String group, Boolean ha, Boolean isDisplayVmEnabled, Long osTypeId, String userData, - Boolean isDynamicallyScalable, HTTPMethod httpMethod, String customId) throws ResourceUnavailableException, InsufficientCapacityException; + Boolean isDynamicallyScalable, HTTPMethod httpMethod, String customId) throws ResourceUnavailableException, InsufficientCapacityException; //the validateCustomParameters, save and remove CustomOfferingDetils functions can be removed from the interface once we can //find a common place for all the scaling and upgrading code of both user and systemvms. diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index fa45cc8ed90..3ad49d89dc6 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -34,10 +34,6 @@ import javax.ejb.Local; import javax.inject.Inject; import javax.naming.ConfigurationException; -import com.cloud.event.UsageEventVO; -import com.cloud.uuididentity.UUIDManager; -import com.cloud.capacity.Capacity; -import com.cloud.exception.InsufficientServerCapacityException; import org.apache.commons.codec.binary.Base64; import org.apache.log4j.Logger; @@ -86,8 +82,6 @@ import org.apache.cloudstack.managed.context.ManagedContextRunnable; import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; import org.apache.cloudstack.storage.to.TemplateObjectTO; -import org.apache.commons.codec.binary.Base64; -import org.apache.log4j.Logger; import com.cloud.agent.AgentManager; import com.cloud.agent.api.Answer; @@ -107,6 +101,7 @@ import com.cloud.alert.AlertManager; import com.cloud.api.ApiDBUtils; import com.cloud.api.query.dao.UserVmJoinDao; import com.cloud.api.query.vo.UserVmJoinVO; +import com.cloud.capacity.Capacity; import com.cloud.capacity.CapacityManager; import com.cloud.configuration.Config; import com.cloud.configuration.ConfigurationManager; @@ -130,6 +125,7 @@ import com.cloud.domain.dao.DomainDao; import com.cloud.event.ActionEvent; import com.cloud.event.EventTypes; import com.cloud.event.UsageEventUtils; +import com.cloud.event.UsageEventVO; import com.cloud.event.dao.UsageEventDao; import com.cloud.exception.AgentUnavailableException; import com.cloud.exception.CloudException; @@ -261,6 +257,7 @@ import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.exception.ExecutionException; import com.cloud.utils.fsm.NoTransitionException; import com.cloud.utils.net.NetUtils; +import com.cloud.uuididentity.UUIDManager; import com.cloud.vm.VirtualMachine.State; import com.cloud.vm.dao.InstanceGroupDao; import com.cloud.vm.dao.InstanceGroupVMMapDao; @@ -468,9 +465,9 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir @Inject ConfigurationDao _configDao; - private final int MAX_VM_NAME_LEN = 80; - private final int MAX_HTTP_GET_LENGTH = 2 * MAX_USER_DATA_LENGTH_BYTES; - private final int MAX_HTTP_POST_LENGTH = 16 * MAX_USER_DATA_LENGTH_BYTES; + private static final int MAX_VM_NAME_LEN = 80; + private static final int MAX_HTTP_GET_LENGTH = 2 * MAX_USER_DATA_LENGTH_BYTES; + private static final int MAX_HTTP_POST_LENGTH = 16 * MAX_USER_DATA_LENGTH_BYTES; @Inject protected OrchestrationService _orchSrvc; @@ -659,7 +656,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir return userVm; } - private boolean resetVMSSHKeyInternal(Long vmId, String SSHPublicKey, String password) throws ResourceUnavailableException, InsufficientCapacityException { + private boolean resetVMSSHKeyInternal(Long vmId, String sshPublicKey, String password) throws ResourceUnavailableException, InsufficientCapacityException { Long userId = CallContext.current().getCallingUserId(); VMInstanceVO vmInstance = _vmDao.findById(vmId); @@ -685,7 +682,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir if (element == null) { throw new CloudRuntimeException("Can't find network element for " + Service.UserData.getName() + " provider needed for SSH Key reset"); } - boolean result = element.saveSSHKey(defaultNetwork, defaultNicProfile, vmProfile, SSHPublicKey); + boolean result = element.saveSSHKey(defaultNetwork, defaultNicProfile, vmProfile, sshPublicKey); // Need to reboot the virtual machine so that the password gets redownloaded from the DomR, and reset on the VM if (!result) { @@ -773,15 +770,15 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir VMInstanceVO vmInstance = _vmInstanceDao.findById(vmId); if (vmInstance == null) { throw new InvalidParameterValueException("unable to find a virtual machine with id " + vmId); - }else if (!(vmInstance.getState().equals(State.Stopped))) { + } else if (!(vmInstance.getState().equals(State.Stopped))) { throw new InvalidParameterValueException("Unable to upgrade virtual machine " + vmInstance.toString() + " " + " in state " + vmInstance.getState() + - "; make sure the virtual machine is stopped"); + "; make sure the virtual machine is stopped"); } _accountMgr.checkAccess(caller, null, true, vmInstance); // Check resource limits for CPU and Memory. - Map customParameters = cmd.getCustomParameters(); + Map customParameters = cmd.getCustomParameters(); ServiceOfferingVO newServiceOffering = _offeringDao.findById(svcOffId); if (newServiceOffering.isDynamic()) { newServiceOffering.setDynamicFlag(true); @@ -824,7 +821,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir saveCustomOfferingDetails(vmId, newServiceOffering); } if (currentServiceOffering.isDynamic() && !newServiceOffering.isDynamic()) { - removeCustomOfferingDetails(vmId); + removeCustomOfferingDetails(vmId); } // Increment or decrement CPU and Memory count accordingly. @@ -846,23 +843,25 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir @Override public void validateCustomParameters(ServiceOfferingVO serviceOffering, Map customParameters) { - if (customParameters.size() !=0 ) { + if (customParameters.size() != 0) { if (serviceOffering.getCpu() == null) { String cpuNumber = customParameters.get(UsageEventVO.DynamicParameters.cpuNumber.name()); if ((cpuNumber == null) || (NumbersUtil.parseInt(cpuNumber, -1) <= 0 || NumbersUtil.parseInt(cpuNumber, -1) > 2147483647)) { throw new InvalidParameterValueException("Invalid cpu cores value, specify a value between 1 and 2147483647"); } } else if (customParameters.containsKey(UsageEventVO.DynamicParameters.cpuNumber.name())) { - throw new InvalidParameterValueException("The cpu cores of this offering id:"+serviceOffering.getId()+" is not customizable. This is predefined in the template."); + throw new InvalidParameterValueException("The cpu cores of this offering id:" + serviceOffering.getId() + + " is not customizable. This is predefined in the template."); } if (serviceOffering.getSpeed() == null) { String cpuSpeed = customParameters.get(UsageEventVO.DynamicParameters.cpuSpeed.name()); - if ((cpuSpeed == null) || (NumbersUtil.parseInt(cpuSpeed, -1) <= 0 || NumbersUtil.parseInt(cpuSpeed, -1) > 2147483647 )) { + if ((cpuSpeed == null) || (NumbersUtil.parseInt(cpuSpeed, -1) <= 0 || NumbersUtil.parseInt(cpuSpeed, -1) > 2147483647)) { throw new InvalidParameterValueException("Invalid cpu speed value, specify a value between 1 and 2147483647"); } } else if (customParameters.containsKey(UsageEventVO.DynamicParameters.cpuSpeed.name())) { - throw new InvalidParameterValueException("The cpu speed of this offering id:"+serviceOffering.getId()+" is not customizable. This is predefined in the template."); + throw new InvalidParameterValueException("The cpu speed of this offering id:" + serviceOffering.getId() + + " is not customizable. This is predefined in the template."); } if (serviceOffering.getRamSize() == null) { @@ -870,8 +869,9 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir if (memory == null || (NumbersUtil.parseInt(memory, -1) < 32 || NumbersUtil.parseInt(memory, -1) > 2147483647)) { throw new InvalidParameterValueException("Invalid memory value, specify a value between 32 and 2147483647 MB"); } - } else if (customParameters.containsKey(UsageEventVO.DynamicParameters.memory.name())){ - throw new InvalidParameterValueException("The memory of this offering id:"+serviceOffering.getId()+" is not customizable. This is predefined in the template."); + } else if (customParameters.containsKey(UsageEventVO.DynamicParameters.memory.name())) { + throw new InvalidParameterValueException("The memory of this offering id:" + serviceOffering.getId() + + " is not customizable. This is predefined in the template."); } } else { throw new InvalidParameterValueException("Need to specify custom parameter values cpu, cpu speed and memory when using custom offering"); @@ -1213,8 +1213,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir Long newServiceOfferingId = cmd.getServiceOfferingId(); CallContext.current().setEventDetails("Vm Id: " + vmId); - boolean result = upgradeVirtualMachine(vmId, newServiceOfferingId,cmd.getCustomParameters()); - if(result){ + boolean result = upgradeVirtualMachine(vmId, newServiceOfferingId, cmd.getCustomParameters()); + if (result) { UserVmVO vmInstance = _vmDao.findById(vmId); if (vmInstance.getState().equals(State.Stopped)) { // Generate usage event for VM upgrade @@ -1222,7 +1222,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir } if (vmInstance.getState().equals(State.Running)) { // Generate usage event for Dynamic scaling of VM - generateUsageEvent(_serviceOfferingDao.findById(newServiceOfferingId),cmd.getCustomParameters(), vmInstance, EventTypes.EVENT_VM_UPGRADE); + generateUsageEvent(_serviceOfferingDao.findById(newServiceOfferingId), cmd.getCustomParameters(), vmInstance, EventTypes.EVENT_VM_UPGRADE); } return vmInstance; } else { @@ -1267,7 +1267,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir } @Override - public boolean upgradeVirtualMachine(Long vmId, Long newServiceOfferingId, Map customParameters) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException, VirtualMachineMigrationException{ + public boolean upgradeVirtualMachine(Long vmId, Long newServiceOfferingId, Map customParameters) throws ResourceUnavailableException, + ConcurrentOperationException, ManagementServerException, VirtualMachineMigrationException { // Verify input parameters VMInstanceVO vmInstance = _vmInstanceDao.findById(vmId); @@ -1276,13 +1277,14 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir upgradeStoppedVirtualMachine(vmId, newServiceOfferingId, customParameters); return true; } - if(vmInstance.getState().equals(State.Running)){ + if (vmInstance.getState().equals(State.Running)) { return upgradeRunningVirtualMachine(vmId, newServiceOfferingId, customParameters); } return false; } - private boolean upgradeRunningVirtualMachine(Long vmId, Long newServiceOfferingId, Map customParameters) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException, VirtualMachineMigrationException{ + private boolean upgradeRunningVirtualMachine(Long vmId, Long newServiceOfferingId, Map customParameters) throws ResourceUnavailableException, + ConcurrentOperationException, ManagementServerException, VirtualMachineMigrationException { Account caller = CallContext.current().getCallingAccount(); VMInstanceVO vmInstance = _vmInstanceDao.findById(vmId); @@ -1293,7 +1295,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir _accountMgr.checkAccess(caller, null, true, vmInstance); //Check if its a scale "up" - ServiceOfferingVO newServiceOffering = (ServiceOfferingVO) _offeringDao.findById(newServiceOfferingId); + ServiceOfferingVO newServiceOffering = _offeringDao.findById(newServiceOfferingId); if (newServiceOffering.isDynamic()) { newServiceOffering.setDynamicFlag(true); validateCustomParameters(newServiceOffering, customParameters); @@ -1311,7 +1313,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir int currentMemory = currentServiceOffering.getRamSize(); int currentSpeed = currentServiceOffering.getSpeed(); int memoryDiff = newMemory - currentMemory; - int cpuDiff = newCpu*newSpeed - currentCpu*currentSpeed; + int cpuDiff = newCpu * newSpeed - currentCpu * currentSpeed; // Don't allow to scale when (Any of the new values less than current values) OR (All current and new values are same) if ((newSpeed < currentSpeed || newMemory < currentMemory || newCpu < currentCpu) || @@ -1348,7 +1350,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir // Check disable threshold for cluster is not crossed HostVO host = _hostDao.findById(vmInstance.getHostId()); - if(_capacityMgr.checkIfClusterCrossesThreshold(host.getClusterId(), cpuDiff, memoryDiff)){ + if (_capacityMgr.checkIfClusterCrossesThreshold(host.getClusterId(), cpuDiff, memoryDiff)) { throw new CloudRuntimeException("Unable to scale vm: " + vmInstance.getUuid() + " due to insufficient resources"); } @@ -1362,13 +1364,13 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir } if (memoryDiff > 0) { - _resourceLimitMgr.incrementResourceCount(caller.getAccountId(), ResourceType.memory, new Long (memoryDiff)); + _resourceLimitMgr.incrementResourceCount(caller.getAccountId(), ResourceType.memory, new Long(memoryDiff)); } // #1 Check existing host has capacity - if( !excludes.shouldAvoid(ApiDBUtils.findHostById(vmInstance.getHostId())) ){ + if (!excludes.shouldAvoid(ApiDBUtils.findHostById(vmInstance.getHostId()))) { existingHostHasCapacity = _capacityMgr.checkIfHostHasCpuCapability(vmInstance.getHostId(), newCpu, newSpeed) - && _capacityMgr.checkIfHostHasCapacity(vmInstance.getHostId(), cpuDiff, + && _capacityMgr.checkIfHostHasCapacity(vmInstance.getHostId(), cpuDiff, (memoryDiff) * 1024L * 1024L, false, _capacityMgr.getClusterOverProvisioningFactor(host.getClusterId(), Capacity.CAPACITY_TYPE_CPU), _capacityMgr.getClusterOverProvisioningFactor(host.getClusterId(), Capacity.CAPACITY_TYPE_MEMORY), false); excludes.addHost(vmInstance.getHostId()); @@ -1404,7 +1406,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir if (!success) { _itMgr.upgradeVmDb(vmId, currentServiceOffering.getId()); // rollback if (newServiceOffering.isDynamic()) { - removeCustomOfferingDetails(vmId); + removeCustomOfferingDetails(vmId); } // Decrement CPU and Memory count accordingly. if (newCpu > currentCpu) { @@ -1412,7 +1414,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir } if (memoryDiff > 0) { - _resourceLimitMgr.decrementResourceCount(caller.getAccountId(), ResourceType.memory, new Long (memoryDiff)); + _resourceLimitMgr.decrementResourceCount(caller.getAccountId(), ResourceType.memory, new Long(memoryDiff)); } } } @@ -1428,7 +1430,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir details.put(UsageEventVO.DynamicParameters.cpuNumber.name(), serviceOffering.getCpu().toString()); details.put(UsageEventVO.DynamicParameters.cpuSpeed.name(), serviceOffering.getSpeed().toString()); details.put(UsageEventVO.DynamicParameters.memory.name(), serviceOffering.getRamSize().toString()); - List detailList = new ArrayList(); + List detailList = new ArrayList(); for (String key : details.keySet()) { UserVmDetailVO detailVO = new UserVmDetailVO(vmId, key, details.get(key)); detailList.add(detailVO); @@ -1437,12 +1439,12 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir } @Override - public void removeCustomOfferingDetails(long vmId){ + public void removeCustomOfferingDetails(long vmId) { Map details = _uservmDetailsDao.listDetailsKeyPairs(vmId); details.remove(UsageEventVO.DynamicParameters.cpuNumber.name()); details.remove(UsageEventVO.DynamicParameters.cpuSpeed.name()); details.remove(UsageEventVO.DynamicParameters.memory.name()); - List detailList = new ArrayList(); + List detailList = new ArrayList(); for (String key : details.keySet()) { UserVmDetailVO detailVO = new UserVmDetailVO(vmId, key, details.get(key)); detailList.add(detailVO); @@ -2204,9 +2206,9 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir @Override @ActionEvent(eventType = EventTypes.EVENT_VM_CREATE, eventDescription = "deploying Vm", create = true) public UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, - List securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, - HTTPMethod httpmethod, String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard, - List affinityGroupIdList, Map customParametes, String customId) throws InsufficientCapacityException, + List securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, + HTTPMethod httpmethod, String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard, + List affinityGroupIdList, Map customParametes, String customId) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException { Account caller = CallContext.current().getCallingAccount(); @@ -2258,9 +2260,9 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir @Override @ActionEvent(eventType = EventTypes.EVENT_VM_CREATE, eventDescription = "deploying Vm", create = true) public UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List networkIdList, - List securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, - HTTPMethod httpmethod, String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard, - List affinityGroupIdList, Map customParameters, String customId) throws InsufficientCapacityException, + List securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, + HTTPMethod httpmethod, String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard, + List affinityGroupIdList, Map customParameters, String customId) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException { Account caller = CallContext.current().getCallingAccount(); @@ -2365,9 +2367,9 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir @Override @ActionEvent(eventType = EventTypes.EVENT_VM_CREATE, eventDescription = "deploying Vm", create = true) public UserVm createAdvancedVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List networkIdList, - Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, HTTPMethod httpmethod, - String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIps, Boolean displayvm, String keyboard, - List affinityGroupIdList, Map customParametrs, String customId) throws InsufficientCapacityException, + Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, HTTPMethod httpmethod, + String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIps, Boolean displayvm, String keyboard, + List affinityGroupIdList, Map customParametrs, String customId) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException { Account caller = CallContext.current().getCallingAccount(); @@ -2468,9 +2470,9 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir @DB protected UserVm createVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate tmplt, String hostName, String displayName, - Account owner, Long diskOfferingId, Long diskSize, List networkList, List securityGroupIdList, String group, HTTPMethod httpmethod, - String userData, String sshKeyPair, HypervisorType hypervisor, Account caller, Map requestedIps, IpAddresses defaultIps, - Boolean isDisplayVmEnabled, String keyboard, List affinityGroupIdList, Map customParameters, String customId) + Account owner, Long diskOfferingId, Long diskSize, List networkList, List securityGroupIdList, String group, HTTPMethod httpmethod, + String userData, String sshKeyPair, HypervisorType hypervisor, Account caller, Map requestedIps, IpAddresses defaultIps, + Boolean isDisplayVmEnabled, String keyboard, List affinityGroupIdList, Map customParameters, String customId) throws InsufficientCapacityException, ResourceUnavailableException, ConcurrentOperationException, StorageUnavailableException, ResourceAllocationException { _accountMgr.checkAccess(caller, null, true, owner); @@ -2689,7 +2691,6 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir long id = _vmDao.getNextInSequence(Long.class, "id"); - if (hostName != null) { // Check is hostName is RFC compliant checkNameForRFCCompliance(hostName); @@ -2812,7 +2813,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir } Long rootDiskSize = null; if (customParameters.containsKey("rootdisksize")) { - if (NumbersUtil.parseLong(customParameters.get("rootdisksize"), -1) <=0) { + if (NumbersUtil.parseLong(customParameters.get("rootdisksize"), -1) <= 0) { throw new InvalidParameterValueException("rootdisk size should be a non zero number."); } rootDiskSize = Long.parseLong(customParameters.get("rootDisksize")); @@ -2895,8 +2896,8 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir if (!offering.isDynamic()) { UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VM_CREATE, accountId, zone.getId(), vm.getId(), - vm.getHostName(), offering.getId(), template.getId(), hypervisorType.toString(), - VirtualMachine.class.getName(), vm.getUuid()); + vm.getHostName(), offering.getId(), template.getId(), hypervisorType.toString(), + VirtualMachine.class.getName(), vm.getUuid()); } else { UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VM_CREATE, accountId, zone.getId(), vm.getId(), vm.getHostName(), offering.getId(), @@ -2910,16 +2911,16 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir }); } - private void generateUsageEvent(ServiceOfferingVO serviceOffering, Map customParameters, UserVmVO vm, String eventType){ + private void generateUsageEvent(ServiceOfferingVO serviceOffering, Map customParameters, UserVmVO vm, String eventType) { if (!serviceOffering.isDynamic()) { UsageEventUtils.publishUsageEvent(eventType, vm.getAccountId(), vm.getDataCenterId(), vm.getId(), - vm.getHostName(), serviceOffering.getId(), vm.getTemplateId(), vm.getHypervisorType().toString(), - VirtualMachine.class.getName(), vm.getUuid()); + vm.getHostName(), serviceOffering.getId(), vm.getTemplateId(), vm.getHypervisorType().toString(), + VirtualMachine.class.getName(), vm.getUuid()); } else { UsageEventUtils.publishUsageEvent(eventType, vm.getAccountId(), vm.getDataCenterId(), vm.getId(), - vm.getHostName(), serviceOffering.getId(), vm.getTemplateId(), vm.getHypervisorType().toString(), - VirtualMachine.class.getName(), vm.getUuid(), customParameters); + vm.getHostName(), serviceOffering.getId(), vm.getTemplateId(), vm.getHypervisorType().toString(), + VirtualMachine.class.getName(), vm.getUuid(), customParameters); } } @@ -3364,12 +3365,11 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir } @Override - public UserVm destroyVm(long vmId) throws ResourceUnavailableException, - ConcurrentOperationException { - // Account caller = CallContext.current().getCallingAccount(); - // Long userId = CallContext.current().getCallingUserId(); - Long userId = 2L; + ConcurrentOperationException { + // Account caller = CallContext.current().getCallingAccount(); + // Long userId = CallContext.current().getCallingUserId(); + Long userId = 2L; // Verify input parameters UserVmVO vm = _vmDao.findById(vmId); @@ -3383,8 +3383,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir return vm; } - - // _accountMgr.checkAccess(caller, null, true, vm); + // _accountMgr.checkAccess(caller, null, true, vm); User userCaller = _userDao.findById(userId); boolean status; @@ -3874,17 +3873,17 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir throw ex; } if (!vm.getHypervisorType().equals(HypervisorType.XenServer) - && !vm.getHypervisorType().equals(HypervisorType.VMware) - && !vm.getHypervisorType().equals(HypervisorType.KVM) - && !vm.getHypervisorType().equals(HypervisorType.Ovm) - && !vm.getHypervisorType().equals(HypervisorType.Hyperv) - && !vm.getHypervisorType().equals(HypervisorType.Simulator)) { + && !vm.getHypervisorType().equals(HypervisorType.VMware) + && !vm.getHypervisorType().equals(HypervisorType.KVM) + && !vm.getHypervisorType().equals(HypervisorType.Ovm) + && !vm.getHypervisorType().equals(HypervisorType.Hyperv) + && !vm.getHypervisorType().equals(HypervisorType.Simulator)) { if (s_logger.isDebugEnabled()) { s_logger.debug(vm - + " is not XenServer/VMware/KVM/Ovm/Hyperv, cannot migrate this VM."); + + " is not XenServer/VMware/KVM/Ovm/Hyperv, cannot migrate this VM."); } throw new InvalidParameterValueException( - "Unsupported Hypervisor Type for VM migration, we support XenServer/VMware/KVM/Ovm/Hyperv only"); + "Unsupported Hypervisor Type for VM migration, we support XenServer/VMware/KVM/Ovm/Hyperv only"); } if (isVMUsingLocalStorage(vm)) { diff --git a/server/src/com/cloud/vm/UserVmStateListener.java b/server/src/com/cloud/vm/UserVmStateListener.java index 9f5f51dc06f..a51b5ef6973 100644 --- a/server/src/com/cloud/vm/UserVmStateListener.java +++ b/server/src/com/cloud/vm/UserVmStateListener.java @@ -35,7 +35,6 @@ import com.cloud.event.UsageEventUtils; import com.cloud.event.dao.UsageEventDao; import com.cloud.network.dao.NetworkDao; import com.cloud.network.dao.NetworkVO; -import com.cloud.server.ManagementServer; import com.cloud.server.ManagementService; import com.cloud.utils.component.ComponentContext; import com.cloud.utils.fsm.StateListener; @@ -53,12 +52,12 @@ public class UserVmStateListener implements StateListener chain = null; try { - cert = parseCertificate(_cert); - key = parsePrivateKey(_key, _password); + cert = parseCertificate(certInput); + key = parsePrivateKey(keyInput, password); - if (_chain != null) { - chain = parseChain(_chain); + if (chainInput != null) { + chain = parseChain(chainInput); } } catch (IOException e) { throw new IllegalArgumentException("Parsing certificate/key failed: " + e.getMessage(), e); } - validateCert(cert, _chain != null ? true : false); + validateCert(cert, chainInput != null ? true : false); validateKeys(cert.getPublicKey(), key); - if (_chain != null) + if (chainInput != null) validateChain(chain, cert); } @@ -289,7 +289,7 @@ public class CertServiceImpl implements CertService { return response; } - private void validateCert(Certificate cert, boolean chain_present) { + private void validateCert(Certificate cert, boolean chainPresent) { if (!(cert instanceof X509Certificate)) throw new IllegalArgumentException("Invalid certificate format. Expected X509 certificate"); @@ -300,7 +300,7 @@ public class CertServiceImpl implements CertService { throw new IllegalArgumentException("Certificate expired or not valid", e); } - if (!chain_present) { + if (!chainPresent) { PublicKey pubKey = cert.getPublicKey(); try { cert.verify(pubKey); @@ -482,7 +482,7 @@ public class CertServiceImpl implements CertService { public static class KeyPassword implements PasswordFinder { - boolean password_requested = false; + boolean passwordRequested = false; char[] password; KeyPassword(char[] word) { @@ -491,12 +491,12 @@ public class CertServiceImpl implements CertService { @Override public char[] getPassword() { - password_requested = true; + passwordRequested = true; return password; } public boolean getPasswordRequested() { - return password_requested; + return passwordRequested; } } } \ No newline at end of file diff --git a/server/test/async-job-component.xml b/server/test/async-job-component.xml index 55f47cc5b50..6c7a6e004dd 100644 --- a/server/test/async-job-component.xml +++ b/server/test/async-job-component.xml @@ -1,204 +1,191 @@ - - + + - - - - - - - 50 - -1 - - - - - 50 - -1 - - - 50 - -1 - - - - - - - 50 - -1 - routing - - - 5000 - 300 - - - - - 50 - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + 50 + -1 + + + + + 50 + -1 + + + 50 + -1 + + + + + + + 50 + -1 + routing + + + 5000 + 300 + + + + + 50 + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - 2 - - - 2 - - - - - + + + - - - + + + + + + + + 2 + + + 2 + + + + + - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/server/test/com/cloud/capacity/CapacityManagerTest.java b/server/test/com/cloud/capacity/CapacityManagerTest.java index b6cae6be9c9..686089b9e34 100644 --- a/server/test/com/cloud/capacity/CapacityManagerTest.java +++ b/server/test/com/cloud/capacity/CapacityManagerTest.java @@ -39,11 +39,11 @@ public class CapacityManagerTest { ClusterDetailsDao ClusterDetailsDao = mock(com.cloud.dc.ClusterDetailsDao.class); CapacityManagerImpl capMgr; private ServiceOfferingVO svo = mock(ServiceOfferingVO.class); - private CapacityVO cvo_cpu = mock(CapacityVO.class); - private CapacityVO cvo_ram = mock(CapacityVO.class); + private CapacityVO cvoCpu = mock(CapacityVO.class); + private CapacityVO cvoRam = mock(CapacityVO.class); private VirtualMachine vm = mock(VirtualMachine.class); - private ClusterDetailsVO cluster_detail_cpu = mock(ClusterDetailsVO.class); - private ClusterDetailsVO cluster_detail_ram = mock(ClusterDetailsVO.class); + private ClusterDetailsVO clusterDetailCpu = mock(ClusterDetailsVO.class); + private ClusterDetailsVO clusterDetailRam = mock(ClusterDetailsVO.class); public CapacityManagerImpl setUp() { CapacityManagerImpl capMgr = new CapacityManagerImpl(); @@ -59,18 +59,18 @@ public class CapacityManagerTest { when(vm.getHostId()).thenReturn(1l); when(vm.getServiceOfferingId()).thenReturn(2l); when(SOfferingDao.findById(anyLong(), anyLong())).thenReturn(svo); - when(CDao.findByHostIdType(anyLong(), eq(Capacity.CAPACITY_TYPE_CPU))).thenReturn(cvo_cpu); - when(CDao.findByHostIdType(anyLong(), eq(Capacity.CAPACITY_TYPE_MEMORY))).thenReturn(cvo_ram); - when(cvo_cpu.getUsedCapacity()).thenReturn(500l); - when(cvo_cpu.getTotalCapacity()).thenReturn(2000l); - when(cvo_ram.getUsedCapacity()).thenReturn(3000l); - when(cvo_ram.getTotalCapacity()).thenReturn((long)1024 * 1024 * 1024); + when(CDao.findByHostIdType(anyLong(), eq(Capacity.CAPACITY_TYPE_CPU))).thenReturn(cvoCpu); + when(CDao.findByHostIdType(anyLong(), eq(Capacity.CAPACITY_TYPE_MEMORY))).thenReturn(cvoRam); + when(cvoCpu.getUsedCapacity()).thenReturn(500l); + when(cvoCpu.getTotalCapacity()).thenReturn(2000l); + when(cvoRam.getUsedCapacity()).thenReturn(3000l); + when(cvoRam.getTotalCapacity()).thenReturn((long)1024 * 1024 * 1024); when(svo.getCpu()).thenReturn(500); when(svo.getRamSize()).thenReturn(512); - when(cvo_cpu.getReservedCapacity()).thenReturn(0l); - when(cvo_ram.getReservedCapacity()).thenReturn(0l); - when(cluster_detail_ram.getValue()).thenReturn("1.5"); - when(cluster_detail_cpu.getValue()).thenReturn("2"); + when(cvoCpu.getReservedCapacity()).thenReturn(0l); + when(cvoRam.getReservedCapacity()).thenReturn(0l); + when(clusterDetailRam.getValue()).thenReturn("1.5"); + when(clusterDetailCpu.getValue()).thenReturn("2"); when(CDao.update(anyLong(), isA(CapacityVO.class))).thenReturn(true); boolean hasCapacity = capMgr.checkIfHostHasCapacity(1l, 500, 1024 * 1024 * 1024, false, 2, 2, false); Assert.assertTrue(hasCapacity); diff --git a/server/test/com/cloud/network/DedicateGuestVlanRangesTest.java b/server/test/com/cloud/network/DedicateGuestVlanRangesTest.java index 176891b198e..1615b849866 100644 --- a/server/test/com/cloud/network/DedicateGuestVlanRangesTest.java +++ b/server/test/com/cloud/network/DedicateGuestVlanRangesTest.java @@ -93,7 +93,7 @@ public class DedicateGuestVlanRangesTest { networkService._accountDao = _accountDao; networkService._projectMgr = _projectMgr; networkService._physicalNetworkDao = _physicalNetworkDao; - networkService._datacneter_vnet = _dataCenterVnetDao; + networkService._datacneterVnet = _dataCenterVnetDao; networkService._accountGuestVlanMapDao = _accountGuestVlanMapDao; Account account = new AccountVO("testaccount", 1, "networkdomain", (short)0, UUID.randomUUID().toString()); @@ -194,18 +194,18 @@ public class DedicateGuestVlanRangesTest { when(networkService._physicalNetworkDao.findById(anyLong())).thenReturn(physicalNetwork); - when(networkService._datacneter_vnet.listAllocatedVnetsInRange(anyLong(), anyLong(), anyInt(), anyInt())).thenReturn(null); + when(networkService._datacneterVnet.listAllocatedVnetsInRange(anyLong(), anyLong(), anyInt(), anyInt())).thenReturn(null); when(networkService._accountGuestVlanMapDao.listAccountGuestVlanMapsByPhysicalNetwork(anyLong())).thenReturn(null); when(networkService._accountGuestVlanMapDao.persist(any(AccountGuestVlanMapVO.class))).thenReturn(accountGuestVlanMapVO); - when(networkService._datacneter_vnet.update(anyLong(), any(DataCenterVnetVO.class))).thenReturn(true); + when(networkService._datacneterVnet.update(anyLong(), any(DataCenterVnetVO.class))).thenReturn(true); List dataCenterVnetList = new ArrayList(); DataCenterVnetVO dataCenterVnetVO = new DataCenterVnetVO("2-5", 1L, 1L); dataCenterVnetList.add(dataCenterVnetVO); - when(networkService._datacneter_vnet.findVnet(anyLong(), anyString())).thenReturn(dataCenterVnetList); + when(networkService._datacneterVnet.findVnet(anyLong(), anyString())).thenReturn(dataCenterVnetList); try { GuestVlan result = networkService.dedicateGuestVlanRange(dedicateGuestVlanRangesCmd); @@ -274,7 +274,7 @@ public class DedicateGuestVlanRangesTest { DataCenterVnetVO dataCenter = new DataCenterVnetVO("2-5", 1L, 1L); dataCenter.setAccountId(1L); dataCenterList.add(dataCenter); - when(networkService._datacneter_vnet.listAllocatedVnetsInRange(anyLong(), anyLong(), anyInt(), anyInt())).thenReturn(dataCenterList); + when(networkService._datacneterVnet.listAllocatedVnetsInRange(anyLong(), anyLong(), anyInt(), anyInt())).thenReturn(dataCenterList); try { networkService.dedicateGuestVlanRange(dedicateGuestVlanRangesCmd); @@ -297,7 +297,7 @@ public class DedicateGuestVlanRangesTest { when(networkService._physicalNetworkDao.findById(anyLong())).thenReturn(physicalNetwork); - when(networkService._datacneter_vnet.listAllocatedVnetsInRange(anyLong(), anyLong(), anyInt(), anyInt())).thenReturn(null); + when(networkService._datacneterVnet.listAllocatedVnetsInRange(anyLong(), anyLong(), anyInt(), anyInt())).thenReturn(null); List guestVlanMaps = new ArrayList(); AccountGuestVlanMapVO accountGuestVlanMap = new AccountGuestVlanMapVO(1L, 1L); @@ -326,7 +326,7 @@ public class DedicateGuestVlanRangesTest { when(networkService._physicalNetworkDao.findById(anyLong())).thenReturn(physicalNetwork); - when(networkService._datacneter_vnet.listAllocatedVnetsInRange(anyLong(), anyLong(), anyInt(), anyInt())).thenReturn(null); + when(networkService._datacneterVnet.listAllocatedVnetsInRange(anyLong(), anyLong(), anyInt(), anyInt())).thenReturn(null); List guestVlanMaps = new ArrayList(); AccountGuestVlanMapVO accountGuestVlanMap = new AccountGuestVlanMapVO(2L, 1L); @@ -348,7 +348,7 @@ public class DedicateGuestVlanRangesTest { AccountGuestVlanMapVO accountGuestVlanMap = new AccountGuestVlanMapVO(1L, 1L); when(networkService._accountGuestVlanMapDao.findById(anyLong())).thenReturn(accountGuestVlanMap); - doNothing().when(networkService._datacneter_vnet).releaseDedicatedGuestVlans(anyLong()); + doNothing().when(networkService._datacneterVnet).releaseDedicatedGuestVlans(anyLong()); when(networkService._accountGuestVlanMapDao.remove(anyLong())).thenReturn(true); try { diff --git a/server/test/com/cloud/network/MockFirewallManagerImpl.java b/server/test/com/cloud/network/MockFirewallManagerImpl.java index d3d11f1ab4f..3fbbcdf65a6 100644 --- a/server/test/com/cloud/network/MockFirewallManagerImpl.java +++ b/server/test/com/cloud/network/MockFirewallManagerImpl.java @@ -167,7 +167,7 @@ public class MockFirewallManagerImpl extends ManagerBase implements FirewallMana } @Override - public boolean applyIngressFirewallRules(long Ipid, Account caller) throws ResourceUnavailableException { + public boolean applyIngressFirewallRules(long ipId, Account caller) throws ResourceUnavailableException { // TODO Auto-generated method stub return false; } diff --git a/server/test/com/cloud/network/UpdatePhysicalNetworkTest.java b/server/test/com/cloud/network/UpdatePhysicalNetworkTest.java index 2608371db53..022181e2217 100644 --- a/server/test/com/cloud/network/UpdatePhysicalNetworkTest.java +++ b/server/test/com/cloud/network/UpdatePhysicalNetworkTest.java @@ -38,7 +38,7 @@ import com.cloud.utils.db.TransactionLegacy; public class UpdatePhysicalNetworkTest { private PhysicalNetworkDao _physicalNetworkDao = mock(PhysicalNetworkDao.class); - private DataCenterVnetDao _DatacenterVnetDao = mock(DataCenterVnetDao.class); + private DataCenterVnetDao _datacenterVnetDao = mock(DataCenterVnetDao.class); private DataCenterDao _datacenterDao = mock(DataCenterDao.class); private DataCenterVO datacentervo = mock(DataCenterVO.class); private PhysicalNetworkVO physicalNetworkVO = mock(PhysicalNetworkVO.class); @@ -49,7 +49,7 @@ public class UpdatePhysicalNetworkTest { NetworkServiceImpl networkService = new NetworkServiceImpl(); networkService._dcDao = _datacenterDao; networkService._physicalNetworkDao = _physicalNetworkDao; - networkService._datacneter_vnet = _DatacenterVnetDao; + networkService._datacneterVnet = _datacenterVnetDao; return networkService; } @@ -61,7 +61,7 @@ public class UpdatePhysicalNetworkTest { when(_physicalNetworkDao.findById(anyLong())).thenReturn(physicalNetworkVO); when(_datacenterDao.findById(anyLong())).thenReturn(datacentervo); when(_physicalNetworkDao.update(anyLong(), any(physicalNetworkVO.getClass()))).thenReturn(true); - when(_DatacenterVnetDao.listVnetsByPhysicalNetworkAndDataCenter(anyLong(), anyLong())).thenReturn(existingRange); + when(_datacenterVnetDao.listVnetsByPhysicalNetworkAndDataCenter(anyLong(), anyLong())).thenReturn(existingRange); networkService.updatePhysicalNetwork(1l, null, null, "524-524,525-530", null); txn.close("updatePhysicalNetworkTest"); verify(physicalNetworkVO).setVnet(argumentCaptor.capture()); diff --git a/server/test/com/cloud/network/security/SecurityGroupManagerTestConfiguration.java b/server/test/com/cloud/network/security/SecurityGroupManagerTestConfiguration.java index 81aacdd5b07..a5940cd779a 100644 --- a/server/test/com/cloud/network/security/SecurityGroupManagerTestConfiguration.java +++ b/server/test/com/cloud/network/security/SecurityGroupManagerTestConfiguration.java @@ -71,12 +71,12 @@ import com.cloud.vm.dao.VMInstanceDaoImpl; @Configuration @ComponentScan(basePackageClasses = {SecurityGroupRulesDaoImpl.class, UserVmDaoImpl.class, AccountDaoImpl.class, ConfigurationDaoImpl.class, - SecurityGroupWorkDaoImpl.class, VmRulesetLogDaoImpl.class, VMInstanceDaoImpl.class, DomainDaoImpl.class, UsageEventDaoImpl.class, - ResourceTagsDaoImpl.class, HostDaoImpl.class, HostDetailsDaoImpl.class, HostTagsDaoImpl.class, ClusterDaoImpl.class, HostPodDaoImpl.class, - DataCenterDaoImpl.class, DataCenterIpAddressDaoImpl.class, HostTransferMapDaoImpl.class, SecurityGroupManagerImpl2.class, SecurityGroupDaoImpl.class, - SecurityGroupVMMapDaoImpl.class, UserVmDetailsDaoImpl.class, DataCenterIpAddressDaoImpl.class, DataCenterLinkLocalIpAddressDaoImpl.class, - DataCenterVnetDaoImpl.class, PodVlanDaoImpl.class, DataCenterDetailsDaoImpl.class, SecurityGroupRuleDaoImpl.class, NicDaoImpl.class, - SecurityGroupJoinDaoImpl.class}, + SecurityGroupWorkDaoImpl.class, VmRulesetLogDaoImpl.class, VMInstanceDaoImpl.class, DomainDaoImpl.class, UsageEventDaoImpl.class, + ResourceTagsDaoImpl.class, HostDaoImpl.class, HostDetailsDaoImpl.class, HostTagsDaoImpl.class, ClusterDaoImpl.class, HostPodDaoImpl.class, + DataCenterDaoImpl.class, DataCenterIpAddressDaoImpl.class, HostTransferMapDaoImpl.class, SecurityGroupManagerImpl2.class, SecurityGroupDaoImpl.class, + SecurityGroupVMMapDaoImpl.class, UserVmDetailsDaoImpl.class, DataCenterIpAddressDaoImpl.class, DataCenterLinkLocalIpAddressDaoImpl.class, + DataCenterVnetDaoImpl.class, PodVlanDaoImpl.class, DataCenterDetailsDaoImpl.class, SecurityGroupRuleDaoImpl.class, NicDaoImpl.class, + SecurityGroupJoinDaoImpl.class}, includeFilters = {@Filter(value = Library.class, type = FilterType.CUSTOM)}, useDefaultFilters = false) public class SecurityGroupManagerTestConfiguration { diff --git a/server/test/com/cloud/snapshot/SnapshotDaoTestConfiguration.java b/server/test/com/cloud/snapshot/SnapshotDaoTestConfiguration.java index ffb97b885af..1d6cf4cf5f0 100644 --- a/server/test/com/cloud/snapshot/SnapshotDaoTestConfiguration.java +++ b/server/test/com/cloud/snapshot/SnapshotDaoTestConfiguration.java @@ -43,7 +43,7 @@ import com.cloud.vm.dao.VMInstanceDaoImpl; @Configuration @ComponentScan(basePackageClasses = {SnapshotDaoImpl.class, ResourceTagsDaoImpl.class, VMInstanceDaoImpl.class, VolumeDaoImpl.class, NicDaoImpl.class, HostDaoImpl.class, - HostDetailsDaoImpl.class, HostTagsDaoImpl.class, HostTransferMapDaoImpl.class, ClusterDaoImpl.class, HostPodDaoImpl.class}, + HostDetailsDaoImpl.class, HostTagsDaoImpl.class, HostTransferMapDaoImpl.class, ClusterDaoImpl.class, HostPodDaoImpl.class}, includeFilters = {@Filter(value = SnapshotDaoTestConfiguration.Library.class, type = FilterType.CUSTOM)}, useDefaultFilters = false) public class SnapshotDaoTestConfiguration { diff --git a/server/test/com/cloud/vm/snapshot/VMSnapshotManagerTest.java b/server/test/com/cloud/vm/snapshot/VMSnapshotManagerTest.java index 352dbeacae4..9d5c2b42ea9 100644 --- a/server/test/com/cloud/vm/snapshot/VMSnapshotManagerTest.java +++ b/server/test/com/cloud/vm/snapshot/VMSnapshotManagerTest.java @@ -106,7 +106,7 @@ public class VMSnapshotManagerTest { HypervisorCapabilitiesDao _hypervisorCapabilitiesDao; int _vmSnapshotMax = 10; - private static long TEST_VM_ID = 3L; + private static final long TEST_VM_ID = 3L; @Mock UserVmVO vmMock; @Mock diff --git a/server/test/com/cloud/vpc/MockResourceLimitManagerImpl.java b/server/test/com/cloud/vpc/MockResourceLimitManagerImpl.java index aec82fd5db1..be49abde0b1 100644 --- a/server/test/com/cloud/vpc/MockResourceLimitManagerImpl.java +++ b/server/test/com/cloud/vpc/MockResourceLimitManagerImpl.java @@ -22,7 +22,6 @@ import java.util.Map; import javax.ejb.Local; import javax.naming.ConfigurationException; -import com.cloud.configuration.Resource; import org.springframework.stereotype.Component; import com.cloud.configuration.Resource.ResourceType; diff --git a/server/test/com/cloud/vpc/MockVpcVirtualNetworkApplianceManager.java b/server/test/com/cloud/vpc/MockVpcVirtualNetworkApplianceManager.java index dbb2cc90df5..4802cfff93b 100644 --- a/server/test/com/cloud/vpc/MockVpcVirtualNetworkApplianceManager.java +++ b/server/test/com/cloud/vpc/MockVpcVirtualNetworkApplianceManager.java @@ -79,7 +79,7 @@ public class MockVpcVirtualNetworkApplianceManager extends ManagerBase implement } @Override - public boolean saveSSHPublicKeyToRouter(Network network, NicProfile nic, VirtualMachineProfile profile, List routers, String SSHPublicKey) + public boolean saveSSHPublicKeyToRouter(Network network, NicProfile nic, VirtualMachineProfile profile, List routers, String sshPublicKey) throws ResourceUnavailableException { return false; //To change body of implemented methods use File | Settings | File Templates. } diff --git a/server/test/com/cloud/vpc/NetworkACLManagerTest.java b/server/test/com/cloud/vpc/NetworkACLManagerTest.java index 54f5f787db2..2dd8b2d2e65 100644 --- a/server/test/com/cloud/vpc/NetworkACLManagerTest.java +++ b/server/test/com/cloud/vpc/NetworkACLManagerTest.java @@ -51,6 +51,14 @@ import com.cloud.network.NetworkModel; import com.cloud.network.dao.NetworkDao; import com.cloud.network.dao.NetworkVO; import com.cloud.network.element.NetworkACLServiceProvider; +import com.cloud.network.vpc.NetworkACLItem; +import com.cloud.network.vpc.NetworkACLItemDao; +import com.cloud.network.vpc.NetworkACLItemVO; +import com.cloud.network.vpc.NetworkACLManager; +import com.cloud.network.vpc.NetworkACLManagerImpl; +import com.cloud.network.vpc.NetworkACLVO; +import com.cloud.network.vpc.VpcManager; +import com.cloud.network.vpc.VpcService; import com.cloud.network.vpc.dao.NetworkACLDao; import com.cloud.network.vpc.dao.VpcGatewayDao; import com.cloud.tags.dao.ResourceTagDao; @@ -309,7 +317,6 @@ public class NetworkACLManagerTest extends TestCase { return Mockito.mock(VpcService.class); } - public static class Library implements TypeFilter { @Override public boolean match(MetadataReader mdr, MetadataReaderFactory arg1) throws IOException { diff --git a/server/test/com/cloud/vpc/NetworkACLServiceTest.java b/server/test/com/cloud/vpc/NetworkACLServiceTest.java index 079cd5e341b..99fb77189b4 100644 --- a/server/test/com/cloud/vpc/NetworkACLServiceTest.java +++ b/server/test/com/cloud/vpc/NetworkACLServiceTest.java @@ -20,8 +20,6 @@ import java.util.UUID; import javax.inject.Inject; -import com.cloud.network.vpc.*; -import com.cloud.network.vpc.dao.VpcDao; import junit.framework.TestCase; import org.apache.log4j.Logger; @@ -50,7 +48,19 @@ import org.apache.cloudstack.test.utils.SpringUtils; import com.cloud.exception.InvalidParameterValueException; import com.cloud.network.NetworkModel; import com.cloud.network.dao.NetworkDao; +import com.cloud.network.vpc.NetworkACLItem; +import com.cloud.network.vpc.NetworkACLItemDao; +import com.cloud.network.vpc.NetworkACLItemVO; +import com.cloud.network.vpc.NetworkACLManager; +import com.cloud.network.vpc.NetworkACLService; +import com.cloud.network.vpc.NetworkACLServiceImpl; +import com.cloud.network.vpc.NetworkACLVO; +import com.cloud.network.vpc.Vpc; +import com.cloud.network.vpc.VpcManager; +import com.cloud.network.vpc.VpcService; +import com.cloud.network.vpc.VpcVO; import com.cloud.network.vpc.dao.NetworkACLDao; +import com.cloud.network.vpc.dao.VpcDao; import com.cloud.network.vpc.dao.VpcGatewayDao; import com.cloud.tags.dao.ResourceTagDao; import com.cloud.user.Account; @@ -83,7 +93,6 @@ public class NetworkACLServiceTest extends TestCase { @Inject VpcService _vpcSrv; - private CreateNetworkACLCmd createACLItemCmd; private NetworkACLVO acl; private NetworkACLItemVO aclItem; @@ -244,7 +253,7 @@ public class NetworkACLServiceTest extends TestCase { } @Bean - public VpcDao vpcDao () { + public VpcDao vpcDao() { return Mockito.mock(VpcDao.class); } @@ -253,7 +262,6 @@ public class NetworkACLServiceTest extends TestCase { return Mockito.mock(VpcService.class); } - public static class Library implements TypeFilter { @Override public boolean match(MetadataReader mdr, MetadataReaderFactory arg1) throws IOException { diff --git a/server/test/com/cloud/vpc/VpcTestConfiguration.java b/server/test/com/cloud/vpc/VpcTestConfiguration.java index 94e92128b9d..8777698db86 100644 --- a/server/test/com/cloud/vpc/VpcTestConfiguration.java +++ b/server/test/com/cloud/vpc/VpcTestConfiguration.java @@ -108,20 +108,20 @@ import com.cloud.vpc.dao.MockVpcOfferingServiceMapDaoImpl; @Configuration @ComponentScan(basePackageClasses = {VpcManagerImpl.class, NetworkElement.class, VpcOfferingDao.class, ConfigurationDaoImpl.class, IPAddressDaoImpl.class, - DomainRouterDaoImpl.class, VpcGatewayDaoImpl.class, PrivateIpDaoImpl.class, StaticRouteDaoImpl.class, PhysicalNetworkDaoImpl.class, - ResourceTagsDaoImpl.class, FirewallRulesDaoImpl.class, VlanDaoImpl.class, AccountDaoImpl.class, ResourceCountDaoImpl.class, - Site2SiteVpnGatewayDaoImpl.class, PodVlanMapDaoImpl.class, AccountVlanMapDaoImpl.class, HostDaoImpl.class, HostDetailsDaoImpl.class, - HostTagsDaoImpl.class, HostTransferMapDaoImpl.class, ClusterDaoImpl.class, HostPodDaoImpl.class, RouterNetworkDaoImpl.class, - UserStatisticsDaoImpl.class, PhysicalNetworkTrafficTypeDaoImpl.class, FirewallRulesCidrsDaoImpl.class, ResourceLimitManagerImpl.class, - ResourceLimitDaoImpl.class, ResourceCountDaoImpl.class, DomainDaoImpl.class, UserVmDaoImpl.class, UserVmDetailsDaoImpl.class, NicDaoImpl.class, - SnapshotDaoImpl.class, VMInstanceDaoImpl.class, VolumeDaoImpl.class, UserIpv6AddressDaoImpl.class, NicSecondaryIpDaoImpl.class, - VpcServiceMapDaoImpl.class, ServiceOfferingDaoImpl.class, VMTemplateHostDaoImpl.class, MockVpcDaoImpl.class, VMTemplateDaoImpl.class, - VMTemplateZoneDaoImpl.class, VMTemplateDetailsDaoImpl.class, DataCenterDaoImpl.class, DataCenterIpAddressDaoImpl.class, - DataCenterLinkLocalIpAddressDaoImpl.class, DataCenterVnetDaoImpl.class, PodVlanDaoImpl.class, DataCenterDetailsDaoImpl.class, - MockNetworkManagerImpl.class, MockVpcVirtualNetworkApplianceManager.class, EntityManagerImpl.class, LoadBalancerDaoImpl.class, - FirewallRulesCidrsDaoImpl.class, VirtualRouterProviderDaoImpl.class, ProjectDaoImpl.class, ProjectAccountDaoImpl.class, MockVpcOfferingDaoImpl.class, - MockConfigurationManagerImpl.class, MockNetworkOfferingServiceMapDaoImpl.class, MockNetworkServiceMapDaoImpl.class, - MockVpcOfferingServiceMapDaoImpl.class, MockNetworkOfferingDaoImpl.class, MockNetworkModelImpl.class, Ipv6AddressManagerImpl.class}, + DomainRouterDaoImpl.class, VpcGatewayDaoImpl.class, PrivateIpDaoImpl.class, StaticRouteDaoImpl.class, PhysicalNetworkDaoImpl.class, + ResourceTagsDaoImpl.class, FirewallRulesDaoImpl.class, VlanDaoImpl.class, AccountDaoImpl.class, ResourceCountDaoImpl.class, + Site2SiteVpnGatewayDaoImpl.class, PodVlanMapDaoImpl.class, AccountVlanMapDaoImpl.class, HostDaoImpl.class, HostDetailsDaoImpl.class, + HostTagsDaoImpl.class, HostTransferMapDaoImpl.class, ClusterDaoImpl.class, HostPodDaoImpl.class, RouterNetworkDaoImpl.class, + UserStatisticsDaoImpl.class, PhysicalNetworkTrafficTypeDaoImpl.class, FirewallRulesCidrsDaoImpl.class, ResourceLimitManagerImpl.class, + ResourceLimitDaoImpl.class, ResourceCountDaoImpl.class, DomainDaoImpl.class, UserVmDaoImpl.class, UserVmDetailsDaoImpl.class, NicDaoImpl.class, + SnapshotDaoImpl.class, VMInstanceDaoImpl.class, VolumeDaoImpl.class, UserIpv6AddressDaoImpl.class, NicSecondaryIpDaoImpl.class, + VpcServiceMapDaoImpl.class, ServiceOfferingDaoImpl.class, VMTemplateHostDaoImpl.class, MockVpcDaoImpl.class, VMTemplateDaoImpl.class, + VMTemplateZoneDaoImpl.class, VMTemplateDetailsDaoImpl.class, DataCenterDaoImpl.class, DataCenterIpAddressDaoImpl.class, + DataCenterLinkLocalIpAddressDaoImpl.class, DataCenterVnetDaoImpl.class, PodVlanDaoImpl.class, DataCenterDetailsDaoImpl.class, + MockNetworkManagerImpl.class, MockVpcVirtualNetworkApplianceManager.class, EntityManagerImpl.class, LoadBalancerDaoImpl.class, + FirewallRulesCidrsDaoImpl.class, VirtualRouterProviderDaoImpl.class, ProjectDaoImpl.class, ProjectAccountDaoImpl.class, MockVpcOfferingDaoImpl.class, + MockConfigurationManagerImpl.class, MockNetworkOfferingServiceMapDaoImpl.class, MockNetworkServiceMapDaoImpl.class, + MockVpcOfferingServiceMapDaoImpl.class, MockNetworkOfferingDaoImpl.class, MockNetworkModelImpl.class, Ipv6AddressManagerImpl.class}, includeFilters = {@Filter(value = VpcTestConfiguration.VpcLibrary.class, type = FilterType.CUSTOM)}, useDefaultFilters = false) public class VpcTestConfiguration { diff --git a/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java b/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java index 6d93f84e17d..58d02fa1c1d 100644 --- a/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java +++ b/server/test/org/apache/cloudstack/networkoffering/ChildTestConfiguration.java @@ -122,15 +122,15 @@ import com.cloud.vm.dao.VMInstanceDaoImpl; @Configuration @ComponentScan(basePackageClasses = {AccountVlanMapDaoImpl.class, VolumeDaoImpl.class, HostPodDaoImpl.class, DomainDaoImpl.class, ServiceOfferingDaoImpl.class, - ServiceOfferingDetailsDaoImpl.class, VlanDaoImpl.class, IPAddressDaoImpl.class, ResourceTagsDaoImpl.class, AccountDaoImpl.class, - InstanceGroupDaoImpl.class, UserAccountJoinDaoImpl.class, CapacityDaoImpl.class, SnapshotDaoImpl.class, HostDaoImpl.class, VMInstanceDaoImpl.class, - HostTransferMapDaoImpl.class, PortForwardingRulesDaoImpl.class, PrivateIpDaoImpl.class, UsageEventDaoImpl.class, PodVlanMapDaoImpl.class, - DiskOfferingDaoImpl.class, DataCenterDaoImpl.class, DataCenterIpAddressDaoImpl.class, DataCenterVnetDaoImpl.class, PodVlanDaoImpl.class, - DataCenterDetailsDaoImpl.class, NicSecondaryIpDaoImpl.class, UserIpv6AddressDaoImpl.class, UserDaoImpl.class, NicDaoImpl.class, - NetworkDomainDaoImpl.class, HostDetailsDaoImpl.class, HostTagsDaoImpl.class, ClusterDaoImpl.class, FirewallRulesDaoImpl.class, - FirewallRulesCidrsDaoImpl.class, PhysicalNetworkDaoImpl.class, PhysicalNetworkTrafficTypeDaoImpl.class, PhysicalNetworkServiceProviderDaoImpl.class, - LoadBalancerDaoImpl.class, NetworkServiceMapDaoImpl.class, PrimaryDataStoreDaoImpl.class, StoragePoolDetailsDaoImpl.class, - PortableIpRangeDaoImpl.class, RegionDaoImpl.class, PortableIpDaoImpl.class, AccountGuestVlanMapDaoImpl.class}, + ServiceOfferingDetailsDaoImpl.class, VlanDaoImpl.class, IPAddressDaoImpl.class, ResourceTagsDaoImpl.class, AccountDaoImpl.class, + InstanceGroupDaoImpl.class, UserAccountJoinDaoImpl.class, CapacityDaoImpl.class, SnapshotDaoImpl.class, HostDaoImpl.class, VMInstanceDaoImpl.class, + HostTransferMapDaoImpl.class, PortForwardingRulesDaoImpl.class, PrivateIpDaoImpl.class, UsageEventDaoImpl.class, PodVlanMapDaoImpl.class, + DiskOfferingDaoImpl.class, DataCenterDaoImpl.class, DataCenterIpAddressDaoImpl.class, DataCenterVnetDaoImpl.class, PodVlanDaoImpl.class, + DataCenterDetailsDaoImpl.class, NicSecondaryIpDaoImpl.class, UserIpv6AddressDaoImpl.class, UserDaoImpl.class, NicDaoImpl.class, + NetworkDomainDaoImpl.class, HostDetailsDaoImpl.class, HostTagsDaoImpl.class, ClusterDaoImpl.class, FirewallRulesDaoImpl.class, + FirewallRulesCidrsDaoImpl.class, PhysicalNetworkDaoImpl.class, PhysicalNetworkTrafficTypeDaoImpl.class, PhysicalNetworkServiceProviderDaoImpl.class, + LoadBalancerDaoImpl.class, NetworkServiceMapDaoImpl.class, PrimaryDataStoreDaoImpl.class, StoragePoolDetailsDaoImpl.class, + PortableIpRangeDaoImpl.class, RegionDaoImpl.class, PortableIpDaoImpl.class, AccountGuestVlanMapDaoImpl.class}, includeFilters = {@Filter(value = ChildTestConfiguration.Library.class, type = FilterType.CUSTOM)}, useDefaultFilters = false) public class ChildTestConfiguration { diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/AwtRdpMouseAdapter.java b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/AwtRdpMouseAdapter.java index bb7c5867a22..f53390695f9 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/AwtRdpMouseAdapter.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/AwtRdpMouseAdapter.java @@ -17,7 +17,6 @@ package rdpclient; import java.awt.event.InputEvent; -import java.awt.event.MouseEvent; import streamer.BaseElement; import streamer.ByteBuffer; @@ -28,58 +27,58 @@ import common.MouseOrder; * @see http://msdn.microsoft.com/en-us/library/cc240594.aspx */ public class AwtRdpMouseAdapter extends BaseElement { - public static int FASTPATH_INPUT_EVENT_MOUSE = 0x01; + public static final int FASTPATH_INPUT_EVENT_MOUSE = 0x01; /** * Event is a mouse wheel rotation. The only valid flags in a wheel rotation * event are PTRFLAGS_WHEEL_NEGATIVE and the WheelRotationMask; all other * pointer flags are ignored. */ - public static int PTRFLAGS_WHEEL = 0x0200; + public static final int PTRFLAGS_WHEEL = 0x0200; /** * Wheel rotation value (contained in the WheelRotationMask bit field) is * negative and MUST be sign-extended before injection at the server. */ - public static int PTRFLAGS_WHEEL_NEGATIVE = 0x0100; + public static final int PTRFLAGS_WHEEL_NEGATIVE = 0x0100; /** * Bit field describing the number of rotation units the mouse wheel was * rotated. The value is negative if the PTRFLAGS_WHEEL_NEGATIVE flag is set. */ - public static int WHEEL_ROTATION_MASK = 0x01FF; + public static final int WHEEL_ROTATION_MASK = 0x01FF; /** * Indicates that the mouse position MUST be updated to the location specified * by the xPos and yPos fields. */ - public static int PTRFLAGS_MOVE = 0x0800; + public static final int PTRFLAGS_MOVE = 0x0800; /** * Indicates that a click event has occurred at the position specified by the * xPos and yPos fields. The button flags indicate which button has been * clicked and at least one of these flags MUST be set. */ - public static int PTRFLAGS_DOWN = 0x8000; + public static final int PTRFLAGS_DOWN = 0x8000; /** * Mouse button 1 (left button) was clicked or released. If the PTRFLAGS_DOWN * flag is set, then the button was clicked, otherwise it was released. */ - public static int PTRFLAGS_BUTTON1 = 0x1000; + public static final int PTRFLAGS_BUTTON1 = 0x1000; /** * Mouse button 2 (right button) was clicked or released. If the PTRFLAGS_DOWN * flag is set, then the button was clicked, otherwise it was released. */ - public static int PTRFLAGS_BUTTON2 = 0x2000; + public static final int PTRFLAGS_BUTTON2 = 0x2000; /** * Mouse button 3 (middle button or wheel) was clicked or released. If the * PTRFLAGS_DOWN flag is set, then the button was clicked, otherwise it was * released. */ - public static int PTRFLAGS_BUTTON3 = 0x4000; + public static final int PTRFLAGS_BUTTON3 = 0x4000; public AwtRdpMouseAdapter(String id) { super(id); diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientMCSChannelJoinRequest_ServerMCSChannelConfirmPDUs.java b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientMCSChannelJoinRequestServerMCSChannelConfirmPDUs.java similarity index 95% rename from services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientMCSChannelJoinRequest_ServerMCSChannelConfirmPDUs.java rename to services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientMCSChannelJoinRequestServerMCSChannelConfirmPDUs.java index 0b902a32326..6e06af48cb5 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientMCSChannelJoinRequest_ServerMCSChannelConfirmPDUs.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientMCSChannelJoinRequestServerMCSChannelConfirmPDUs.java @@ -34,7 +34,7 @@ import streamer.PipelineImpl; * * @see http://msdn.microsoft.com/en-us/library/cc240686.aspx */ -public class ClientMCSChannelJoinRequest_ServerMCSChannelConfirmPDUs extends OneTimeSwitch { +public class ClientMCSChannelJoinRequestServerMCSChannelConfirmPDUs extends OneTimeSwitch { private static final int MCS_CHANNEL_CONFIRM_PDU = 15; @@ -43,7 +43,7 @@ public class ClientMCSChannelJoinRequest_ServerMCSChannelConfirmPDUs extends One protected RdpState state; - public ClientMCSChannelJoinRequest_ServerMCSChannelConfirmPDUs(String id, int[] channels, RdpState state) { + public ClientMCSChannelJoinRequestServerMCSChannelConfirmPDUs(String id, int[] channels, RdpState state) { super(id); this.channels = channels; this.state = state; @@ -206,7 +206,7 @@ public class ClientMCSChannelJoinRequest_ServerMCSChannelConfirmPDUs extends One RdpState rdpState = new RdpState(); MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(serverResponsePacket, new byte[] {1, 2, 3})); - Element todo = new ClientMCSChannelJoinRequest_ServerMCSChannelConfirmPDUs("channels", new int[] {1007}, rdpState); + Element todo = new ClientMCSChannelJoinRequestServerMCSChannelConfirmPDUs("channels", new int[] {1007}, rdpState); Element x224 = new ClientX224DataPdu("x224"); Element tpkt = new ClientTpkt("tpkt"); Element sink = new MockSink("sink", ByteBuffer.convertByteArraysToByteBuffers(clientRequestPacket)); diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientPacketSniffer.java b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientPacketSniffer.java index ce517d2acea..78f523552da 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientPacketSniffer.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientPacketSniffer.java @@ -40,7 +40,7 @@ public class ClientPacketSniffer extends PacketSniffer { // new Pair("Client UNKNOWN PACKET (ERROR)", ".*"), // @formatter:on - }; + }; public ClientPacketSniffer(String id) { super(id, clientRegexps); diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientX224ConnectionRequestPDU.java b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientX224ConnectionRequestPDU.java index fbbfecbc341..66d0fd57d11 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientX224ConnectionRequestPDU.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ClientX224ConnectionRequestPDU.java @@ -119,7 +119,7 @@ public class ClientX224ConnectionRequestPDU extends OneTimeSwitch { byte[] packet = new byte[] { - 0x03, // TPKT Header: version = 3 + 0x03, // TPKT Header: version = 3 0x00, // TPKT Header: Reserved = 0 0x00, // TPKT Header: Packet length - high part 0x2c, // TPKT Header: Packet length - low part (total = 44 bytes) @@ -138,7 +138,7 @@ public class ClientX224ConnectionRequestPDU extends OneTimeSwitch { 0x08, 0x00, // RDP_NEG_REQ::length (8 bytes) 0x01, 0x00, 0x00, 0x00 // RDP_NEG_REQ: Requested protocols // (PROTOCOL_SSL in little endian format) - }; + }; MockSource source = new MockSource("source", ByteBuffer.convertByteArraysToByteBuffers(new byte[] {1, 2, 3})); Element cr = new ClientX224ConnectionRequestPDU("cr", cookie); diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/RdpClient.java b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/RdpClient.java index 825964f6a2d..ef05eda327e 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/RdpClient.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/RdpClient.java @@ -57,30 +57,30 @@ public class RdpClient extends PipelineImpl { add( - new ClientX224ConnectionRequestPDU("client_connection_req", userName), new ServerX224ConnectionConfirmPDU("server_connection_conf"), + new ClientX224ConnectionRequestPDU("client_connection_req", userName), new ServerX224ConnectionConfirmPDU("server_connection_conf"), - new UpgradeSocketToSSL("upgrade_to_ssl"), + new UpgradeSocketToSSL("upgrade_to_ssl"), - new ClientMCSConnectInitial("client_initial_conference_create"), new ServerMCSConnectResponse("server_initial_conference_create"), + new ClientMCSConnectInitial("client_initial_conference_create"), new ServerMCSConnectResponse("server_initial_conference_create"), - new ClientMCSErectDomainRequest("client_erect_domain"), + new ClientMCSErectDomainRequest("client_erect_domain"), - new ClientMCSAttachUserRequest("client_atach_user"), new ServerMCSAttachUserConfirmPDU("server_atach_user_confirm", state), + new ClientMCSAttachUserRequest("client_atach_user"), new ServerMCSAttachUserConfirmPDU("server_atach_user_confirm", state), - new ClientMCSChannelJoinRequest_ServerMCSChannelConfirmPDUs("client_channel_join_rdprdr", channelsToJoin, state), + new ClientMCSChannelJoinRequestServerMCSChannelConfirmPDUs("client_channel_join_rdprdr", channelsToJoin, state), - new ClientInfoPDU("client_info_req", userName), + new ClientInfoPDU("client_info_req", userName), - new ServerLicenseErrorPDUValidClient("server_valid_client"), + new ServerLicenseErrorPDUValidClient("server_valid_client"), - new ServerFastPath("server_fastpath"), + new ServerFastPath("server_fastpath"), - new ServerTpkt("server_tpkt"), + new ServerTpkt("server_tpkt"), - new ServerX224DataPdu("server_x224_data"), + new ServerX224DataPdu("server_x224_data"), - // These TPKT and X224 wrappers are connected directly to OUT for handshake - // sequence + // These TPKT and X224 wrappers are connected directly to OUT for handshake + // sequence new ClientTpkt("client_tpkt_ot"), new ClientX224DataPdu("client_x224_data_ot") @@ -90,25 +90,25 @@ public class RdpClient extends PipelineImpl { // Handshake sequence (via SlowPath) link("IN", - "server_fastpath >tpkt", "server_tpkt", + "server_fastpath >tpkt", "server_tpkt", - "client_connection_req", "server_connection_conf", + "client_connection_req", "server_connection_conf", - "upgrade_to_ssl", + "upgrade_to_ssl", - "client_initial_conference_create", "server_initial_conference_create", + "client_initial_conference_create", "server_initial_conference_create", - "client_erect_domain", + "client_erect_domain", - "server_x224_data", + "server_x224_data", - "client_atach_user", "server_atach_user_confirm", + "client_atach_user", "server_atach_user_confirm", - "client_channel_join_rdprdr", + "client_channel_join_rdprdr", - "client_info_req", + "client_info_req", - "server_valid_client" + "server_valid_client" ); @@ -134,10 +134,10 @@ public class RdpClient extends PipelineImpl { // add( - // To transfer packets between input threads and output thread. - new Queue("queue"), + // To transfer packets between input threads and output thread. + new Queue("queue"), - // Slow path: MultiChannel Support + // Slow path: MultiChannel Support new ServerMCSPDU("server_mcs") ); @@ -165,23 +165,23 @@ public class RdpClient extends PipelineImpl { // Add elements add( - new ServerChannel1003Router("server_channel_1003", state), + new ServerChannel1003Router("server_channel_1003", state), - new ServerDemandActivePDU("server_demand_active", screen, state), + new ServerDemandActivePDU("server_demand_active", screen, state), - new ClientConfirmActivePDU("client_confirm_active", screen, state), + new ClientConfirmActivePDU("client_confirm_active", screen, state), - new ServerBitmapUpdate("server_bitmap_update"), + new ServerBitmapUpdate("server_bitmap_update"), - new AwtCanvasAdapter("canvas_adapter", canvas, screen), + new AwtCanvasAdapter("canvas_adapter", canvas, screen), - new ServerPaletteUpdate("server_palette", screen), + new ServerPaletteUpdate("server_palette", screen), - keyEventSource, new AwtRdpKeyboardAdapter("keyboard_adapter"), + keyEventSource, new AwtRdpKeyboardAdapter("keyboard_adapter"), - mouseEventSource, new AwtRdpMouseAdapter("mouse_adapter"), + mouseEventSource, new AwtRdpMouseAdapter("mouse_adapter"), - // These FastPath, TPKT, and X224 wrappers are connected to queue + // These FastPath, TPKT, and X224 wrappers are connected to queue new ClientTpkt("client_tpkt_queue"), new ClientX224DataPdu("client_x224_data_queue"), diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ServerPacketSniffer.java b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ServerPacketSniffer.java index 290c1bcf9e7..8d50ea4ed02 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ServerPacketSniffer.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ServerPacketSniffer.java @@ -41,7 +41,7 @@ public class ServerPacketSniffer extends PacketSniffer { // new Pair("Server FastPath update with flags or continuation", ".*"), // @formatter:on - }; + }; public ServerPacketSniffer(String id) { super(id, serverRegexps); diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ServerX224ConnectionConfirmPDU.java b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ServerX224ConnectionConfirmPDU.java index c320573dc33..7dd70eb4575 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ServerX224ConnectionConfirmPDU.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/rdpclient/ServerX224ConnectionConfirmPDU.java @@ -206,7 +206,7 @@ public class ServerX224ConnectionConfirmPDU extends OneTimeSwitch { // 03 00 00 13 0e d0 00 00 12 34 00 03 00 08 00 05 00 00 00 byte[] packet = new byte[] { - 0x03, // -> TPKT Header: TPKT version = 3 + 0x03, // -> TPKT Header: TPKT version = 3 0x00, // TPKT Header: Reserved = 0 0x00, 0x13, // TPKT Header: Packet length - (total = 19 bytes) 0x0e, // X.224: Length indicator (14 bytes) diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SocketWrapper.java b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SocketWrapper.java index 19ac0629f45..dfffd35944d 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SocketWrapper.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/streamer/SocketWrapper.java @@ -46,7 +46,7 @@ public class SocketWrapper extends PipelineImpl { protected SSLSocket sslSocket; //protected String SSL_VERSION_TO_USE = "TLSv1.2"; - /*DEBUG*/protected String SSL_VERSION_TO_USE = "TLSv1"; + /*DEBUG*/protected static final String SSL_VERSION_TO_USE = "TLSv1"; public SocketWrapper(String id) { super(id); diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/AwtMouseEventToVncAdapter.java b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/AwtMouseEventToVncAdapter.java index a54d101f6a9..8af0195c22e 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/AwtMouseEventToVncAdapter.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/AwtMouseEventToVncAdapter.java @@ -17,7 +17,6 @@ package vncclient; import java.awt.event.InputEvent; -import java.awt.event.MouseEvent; import streamer.BaseElement; import streamer.ByteBuffer; diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc_3_3_Authentication.java b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc33Authentication.java similarity index 96% rename from services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc_3_3_Authentication.java rename to services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc33Authentication.java index e810fdc0625..de1036c62f8 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc_3_3_Authentication.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc33Authentication.java @@ -33,7 +33,7 @@ import streamer.OneTimeSwitch; import streamer.Pipeline; import streamer.PipelineImpl; -public class Vnc_3_3_Authentication extends OneTimeSwitch { +public class Vnc33Authentication extends OneTimeSwitch { /** * Password to use when authentication is required. @@ -49,11 +49,11 @@ public class Vnc_3_3_Authentication extends OneTimeSwitch { */ protected int stage = 0; - public Vnc_3_3_Authentication(String id) { + public Vnc33Authentication(String id) { super(id); } - public Vnc_3_3_Authentication(String id, String password) { + public Vnc33Authentication(String id, String password) { super(id); this.password = password; } @@ -265,7 +265,7 @@ public class Vnc_3_3_Authentication extends OneTimeSwitch { Element source = new MockSource("source") { { bufs = ByteBuffer.convertByteArraysToByteBuffers( - // Request authentication and send 16 byte challenge + // Request authentication and send 16 byte challenge new byte[] {0, 0, 0, RfbConstants.VNC_AUTH, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, // Respond to challenge with AUTH_OK new byte[] {0, 0, 0, RfbConstants.VNC_AUTH_OK}); @@ -273,7 +273,7 @@ public class Vnc_3_3_Authentication extends OneTimeSwitch { }; Element mainSink = new FakeSink("mainSink"); - final Vnc_3_3_Authentication auth = new Vnc_3_3_Authentication("auth", password); + final Vnc33Authentication auth = new Vnc33Authentication("auth", password); Element initSink = new MockSink("initSink") { { // Expect encoded password diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc_3_3_Hello.java b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc33Hello.java similarity index 96% rename from services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc_3_3_Hello.java rename to services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc33Hello.java index 1a65a9933fa..63d0caa3627 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc_3_3_Hello.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/Vnc33Hello.java @@ -33,9 +33,9 @@ import streamer.PipelineImpl; * "RFB 003.007\n". We need to send response packet with supported protocol * version, e.g. "RFB 003.003\n". */ -public class Vnc_3_3_Hello extends OneTimeSwitch { +public class Vnc33Hello extends OneTimeSwitch { - public Vnc_3_3_Hello(String id) { + public Vnc33Hello(String id) { super(id); } @@ -92,7 +92,7 @@ public class Vnc_3_3_Hello extends OneTimeSwitch { InputStreamSource inputStreamSource = new InputStreamSource("source", is); OutputStreamSink outputStreamSink = new OutputStreamSink("mainSink", mainOS); - Vnc_3_3_Hello hello = new Vnc_3_3_Hello("hello"); + Vnc33Hello hello = new Vnc33Hello("hello"); Pipeline pipeline = new PipelineImpl("test"); diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncClient.java b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncClient.java index c16a9f000c1..c035b52fc4e 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncClient.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncClient.java @@ -44,12 +44,12 @@ public class VncClient extends PipelineImpl { canvas.addKeyListener(keyEventSource); add( - // Handshake + // Handshake - // RFB protocol version exchanger - new Vnc_3_3_Hello("hello"), - // Authenticator - new Vnc_3_3_Authentication("auth", password), + // RFB protocol version exchanger + new Vnc33Hello("hello"), + // Authenticator + new Vnc33Authentication("auth", password), // Initializer new VncInitializer("init", true, screen), diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncInitializer.java b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncInitializer.java index a812a616945..25631c2a10d 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncInitializer.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncInitializer.java @@ -167,7 +167,7 @@ public class VncInitializer extends OneTimeSwitch { Element source = new MockSource("source") { { bufs = ByteBuffer.convertByteArraysToByteBuffers( - // Send screen description + // Send screen description new byte[] { // Framebuffer width (short) 0, (byte)200, diff --git a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncMessageHandler.java b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncMessageHandler.java index 0d4abfe0334..6421fb220d5 100644 --- a/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncMessageHandler.java +++ b/services/console-proxy-rdp/rdpconsole/src/main/java/vncclient/VncMessageHandler.java @@ -360,31 +360,31 @@ public class VncMessageHandler extends BaseElement { // Number of rectangles 0, 3,}, - new byte[] { + new byte[] { - // x, y, width, height: 0x0@4x4 - 0, 0, 0, 0, 0, 4, 0, 4, - // Encoding: desktop size - (byte)((RfbConstants.ENCODING_DESKTOP_SIZE >> 24) & 0xff), (byte)((RfbConstants.ENCODING_DESKTOP_SIZE >> 16) & 0xff), - (byte)((RfbConstants.ENCODING_DESKTOP_SIZE >> 8) & 0xff), (byte)((RfbConstants.ENCODING_DESKTOP_SIZE >> 0) & 0xff),}, + // x, y, width, height: 0x0@4x4 + 0, 0, 0, 0, 0, 4, 0, 4, + // Encoding: desktop size + (byte)((RfbConstants.ENCODING_DESKTOP_SIZE >> 24) & 0xff), (byte)((RfbConstants.ENCODING_DESKTOP_SIZE >> 16) & 0xff), + (byte)((RfbConstants.ENCODING_DESKTOP_SIZE >> 8) & 0xff), (byte)((RfbConstants.ENCODING_DESKTOP_SIZE >> 0) & 0xff),}, - new byte[] { + new byte[] { - // x, y, width, height: 0x0@4x4 - 0, 0, 0, 0, 0, 4, 0, 4, - // Encoding: raw rect - (byte)((RfbConstants.ENCODING_RAW >> 24) & 0xff), (byte)((RfbConstants.ENCODING_RAW >> 16) & 0xff), - (byte)((RfbConstants.ENCODING_RAW >> 8) & 0xff), (byte)((RfbConstants.ENCODING_RAW >> 0) & 0xff), - // Raw pixel data 4x4x1 bpp - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,}, new byte[] {11, 12, 13, 14, 15, 16, + // x, y, width, height: 0x0@4x4 + 0, 0, 0, 0, 0, 4, 0, 4, + // Encoding: raw rect + (byte)((RfbConstants.ENCODING_RAW >> 24) & 0xff), (byte)((RfbConstants.ENCODING_RAW >> 16) & 0xff), + (byte)((RfbConstants.ENCODING_RAW >> 8) & 0xff), (byte)((RfbConstants.ENCODING_RAW >> 0) & 0xff), + // Raw pixel data 4x4x1 bpp + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,}, new byte[] {11, 12, 13, 14, 15, 16, - // x, y, width, height: 0x0@2x2 - 0, 0, 0, 0, 0, 2, 0, 2, - // Encoding: copy rect - (byte)((RfbConstants.ENCODING_COPY_RECT >> 24) & 0xff), (byte)((RfbConstants.ENCODING_COPY_RECT >> 16) & 0xff), - (byte)((RfbConstants.ENCODING_COPY_RECT >> 8) & 0xff), (byte)((RfbConstants.ENCODING_COPY_RECT >> 0) & 0xff), - // srcX, srcY: 2x2 - 0, 2, 0, 2,}); + // x, y, width, height: 0x0@2x2 + 0, 0, 0, 0, 0, 2, 0, 2, + // Encoding: copy rect + (byte)((RfbConstants.ENCODING_COPY_RECT >> 24) & 0xff), (byte)((RfbConstants.ENCODING_COPY_RECT >> 16) & 0xff), + (byte)((RfbConstants.ENCODING_COPY_RECT >> 8) & 0xff), (byte)((RfbConstants.ENCODING_COPY_RECT >> 0) & 0xff), + // srcX, srcY: 2x2 + 0, 2, 0, 2,}); } }; diff --git a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxy.java b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxy.java index e52a751c831..f889cdbf05b 100644 --- a/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxy.java +++ b/services/console-proxy/server/src/com/cloud/consoleproxy/ConsoleProxy.java @@ -36,11 +36,12 @@ import java.util.concurrent.Executor; import org.apache.commons.codec.binary.Base64; import org.apache.log4j.xml.DOMConfigurator; -import com.cloud.consoleproxy.util.Logger; -import com.cloud.utils.PropertiesUtil; import com.google.gson.Gson; import com.sun.net.httpserver.HttpServer; +import com.cloud.consoleproxy.util.Logger; +import com.cloud.utils.PropertiesUtil; + /** * * ConsoleProxy, singleton class that manages overall activities in console proxy process. To make legacy code work, we still @@ -51,7 +52,7 @@ public class ConsoleProxy { public static final int KEYBOARD_RAW = 0; public static final int KEYBOARD_COOKED = 1; - public static int VIEWER_LINGER_SECONDS = 180; + public static final int VIEWER_LINGER_SECONDS = 180; public static Object context; @@ -195,8 +196,8 @@ public class ConsoleProxy { Object result; try { result = - authMethod.invoke(ConsoleProxy.context, param.getClientHostAddress(), String.valueOf(param.getClientHostPort()), param.getClientTag(), - param.getClientHostPassword(), param.getTicket(), new Boolean(reauthentication)); + authMethod.invoke(ConsoleProxy.context, param.getClientHostAddress(), String.valueOf(param.getClientHostPort()), param.getClientTag(), + param.getClientHostPassword(), param.getTicket(), new Boolean(reauthentication)); } catch (IllegalAccessException e) { s_logger.error("Unable to invoke authenticateConsoleAccess due to IllegalAccessException" + " for vm: " + param.getClientTag(), e); authResult.setSuccess(false); @@ -390,7 +391,7 @@ public class ConsoleProxy { } finally { try { confs.close(); - } catch (IOException ioex) { + } catch (IOException ioex) { s_logger.error(ioex.toString(), ioex); } } @@ -417,7 +418,7 @@ public class ConsoleProxy { viewer.initClient(param); } else if (!param.getClientHostPassword().equals(viewer.getClientHostPassword())) { s_logger.warn("Bad sid detected(VNC port may be reused). sid in session: " + viewer.getClientHostPassword() + ", sid in request: " + - param.getClientHostPassword()); + param.getClientHostPassword()); viewer.initClient(param); } } @@ -456,7 +457,7 @@ public class ConsoleProxy { } if (param.getClientHostPassword() == null || param.getClientHostPassword().isEmpty() || - !param.getClientHostPassword().equals(viewer.getClientHostPassword())) + !param.getClientHostPassword().equals(viewer.getClientHostPassword())) throw new AuthenticationException("Cannot use the existing viewer " + viewer + ": bad sid"); if (!viewer.isFrontEndAlive()) { diff --git a/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/VncScreenDescription.java b/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/VncScreenDescription.java index b0c5d6db959..ae39705cc09 100644 --- a/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/VncScreenDescription.java +++ b/services/console-proxy/server/src/com/cloud/consoleproxy/vnc/VncScreenDescription.java @@ -33,7 +33,7 @@ public class VncScreenDescription { // Indicates that screen uses format which we want to use: // RGB 24bit packed into 32bit little-endian int. - private boolean rgb888_32_le = false; + private boolean rgb888Bit32le = false; public VncScreenDescription() { } @@ -46,7 +46,7 @@ public class VncScreenDescription { bytesPerPixel = (bitsPerPixel + 7) / 8; - rgb888_32_le = + rgb888Bit32le = (depth == 24 && bitsPerPixel == 32 && redShift == 16 && greenShift == 8 && blueShift == 0 && redMax == 255 && greenMax == 255 && blueMax == 255 && bigEndianFlag == RfbConstants.LITTLE_ENDIAN && trueColorFlag == RfbConstants.TRUE_COLOR); } @@ -85,7 +85,7 @@ public class VncScreenDescription { } public boolean isRGB888_32_LE() { - return rgb888_32_le; + return rgb888Bit32le; } } diff --git a/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java b/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java index 71fbc97225a..7c1b9c8aa95 100755 --- a/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java +++ b/services/secondary-storage/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java @@ -150,8 +150,8 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S return _timeout; } - public void setTimeout(int _timeout) { - this._timeout = _timeout; + public void setTimeout(int timeout) { + this._timeout = timeout; } String _instance; diff --git a/test/src/com/cloud/test/longrun/BuildGuestNetwork.java b/test/src/com/cloud/test/longrun/BuildGuestNetwork.java index c6602d03740..3a823ab9733 100644 --- a/test/src/com/cloud/test/longrun/BuildGuestNetwork.java +++ b/test/src/com/cloud/test/longrun/BuildGuestNetwork.java @@ -26,9 +26,9 @@ import org.apache.log4j.Logger; public class BuildGuestNetwork { public static final Logger s_logger = Logger.getLogger(BuildGuestNetwork.class.getClass()); - private static final int _apiPort = 8096; - private static final int _developerPort = 8080; - private static final String _apiUrl = "/client/api"; + private static final int ApiPort = 8096; + private static final int DeveloperPort = 8080; + private static final String ApiUrl = "/client/api"; private static int numVM = 1; private static long zoneId = -1L; private static long templateId = 3; @@ -65,8 +65,8 @@ public class BuildGuestNetwork { } } - final String server = host + ":" + _apiPort + "/"; - final String developerServer = host + ":" + _developerPort + _apiUrl; + final String server = host + ":" + ApiPort + "/"; + final String developerServer = host + ":" + DeveloperPort + ApiUrl; s_logger.info("Starting test in " + numThreads + " thread(s). Each thread is launching " + numVM + " VMs"); for (int i = 0; i < numThreads; i++) { diff --git a/test/src/com/cloud/test/longrun/guestNetwork.java b/test/src/com/cloud/test/longrun/GuestNetwork.java similarity index 96% rename from test/src/com/cloud/test/longrun/guestNetwork.java rename to test/src/com/cloud/test/longrun/GuestNetwork.java index 0fc9e315e0c..226e31ae4cc 100644 --- a/test/src/com/cloud/test/longrun/guestNetwork.java +++ b/test/src/com/cloud/test/longrun/GuestNetwork.java @@ -25,14 +25,14 @@ import org.apache.log4j.NDC; import com.trilead.ssh2.Connection; import com.trilead.ssh2.Session; -public class guestNetwork implements Runnable { - public static final Logger s_logger = Logger.getLogger(guestNetwork.class.getClass()); +public class GuestNetwork implements Runnable { + public static final Logger s_logger = Logger.getLogger(GuestNetwork.class.getClass()); private String publicIp; private ArrayList virtualMachines; private int retryNum; - public guestNetwork(String publicIp, int retryNum) { + public GuestNetwork(String publicIp, int retryNum) { this.publicIp = publicIp; this.retryNum = retryNum; } diff --git a/test/src/com/cloud/test/longrun/PerformanceWithAPI.java b/test/src/com/cloud/test/longrun/PerformanceWithAPI.java index a3af1ce538c..445aa52cfc4 100644 --- a/test/src/com/cloud/test/longrun/PerformanceWithAPI.java +++ b/test/src/com/cloud/test/longrun/PerformanceWithAPI.java @@ -35,14 +35,14 @@ import com.cloud.test.stress.TestClientWithAPI; public class PerformanceWithAPI { public static final Logger s_logger = Logger.getLogger(PerformanceWithAPI.class.getClass()); - private static final int _retry = 10; - private static final int _apiPort = 8096; - private static int numVM = 2; - private static final long _zoneId = -1L; - private static final long _templateId = 3; - private static final long _serviceOfferingId = 1; - private static final String _apiUrl = "/client/api"; - private static final int _developerPort = 8080; + private static final int Retry = 10; + private static final int ApiPort = 8096; + private static int s_numVM = 2; + private static final long ZoneId = -1L; + private static final long TemplateId = 3; + private static final long ServiceOfferingId = 1; + private static final String ApiUrl = "/client/api"; + private static final int DeveloperPort = 8080; public static void main(String[] args) { @@ -60,14 +60,14 @@ public class PerformanceWithAPI { numThreads = Integer.parseInt(iter.next()); } if (arg.equals("-n")) { - numVM = Integer.parseInt(iter.next()); + s_numVM = Integer.parseInt(iter.next()); } } - final String server = host + ":" + _apiPort + "/"; - final String developerServer = host + ":" + _developerPort + _apiUrl; + final String server = host + ":" + ApiPort + "/"; + final String developerServer = host + ":" + DeveloperPort + ApiUrl; - s_logger.info("Starting test in " + numThreads + " thread(s). Each thread is launching " + numVM + " VMs"); + s_logger.info("Starting test in " + numThreads + " thread(s). Each thread is launching " + s_numVM + " VMs"); for (int i = 0; i < numThreads; i++) { new Thread(new Runnable() { @@ -93,10 +93,10 @@ public class PerformanceWithAPI { if (myUser.getUserId() != null) { s_logger.info("User " + myUser.getUserName() + " was created successfully, starting VM creation"); //create VMs for the user - for (int i = 0; i < numVM; i++) { + for (int i = 0; i < s_numVM; i++) { //Create a new VM, add it to the list of user's VMs VirtualMachine myVM = new VirtualMachine(myUser.getUserId()); - myVM.deployVM(_zoneId, _serviceOfferingId, _templateId, myUser.getDeveloperServer(), myUser.getApiKey(), myUser.getSecretKey()); + myVM.deployVM(ZoneId, ServiceOfferingId, TemplateId, myUser.getDeveloperServer(), myUser.getApiKey(), myUser.getSecretKey()); myUser.getVirtualMachines().add(myVM); singlePrivateIp = myVM.getPrivateIp(); @@ -108,7 +108,7 @@ public class PerformanceWithAPI { } //get public IP address for the User - myUser.retrievePublicIp(_zoneId); + myUser.retrievePublicIp(ZoneId); singlePublicIp = myUser.getPublicIp().get(myUser.getPublicIp().size() - 1); if (singlePublicIp != null) { s_logger.info("Successfully got public Ip " + singlePublicIp + " for user " + myUser.getUserName()); @@ -123,16 +123,16 @@ public class PerformanceWithAPI { break; } - s_logger.info("Deployment successful..." + numVM + " VMs were created. Waiting for 5 min before performance test"); + s_logger.info("Deployment successful..." + s_numVM + " VMs were created. Waiting for 5 min before performance test"); Thread.sleep(300000L); // Wait //Start performance test for the user s_logger.info("Starting performance test for Guest network that has " + myUser.getPublicIp().size() + " public IP addresses"); for (int j = 0; j < myUser.getPublicIp().size(); j++) { s_logger.info("Starting test for user which has " + myUser.getVirtualMachines().size() + " vms. Public IP for the user is " + - myUser.getPublicIp().get(j) + " , number of retries is " + _retry + " , private IP address of the machine is" + + myUser.getPublicIp().get(j) + " , number of retries is " + Retry + " , private IP address of the machine is" + myUser.getVirtualMachines().get(j).getPrivateIp()); - guestNetwork myNetwork = new guestNetwork(myUser.getPublicIp().get(j), _retry); + GuestNetwork myNetwork = new GuestNetwork(myUser.getPublicIp().get(j), Retry); myNetwork.setVirtualMachines(myUser.getVirtualMachines()); new Thread(myNetwork).start(); } diff --git a/test/src/com/cloud/test/regression/ApiCommand.java b/test/src/com/cloud/test/regression/ApiCommand.java index 148fa325ed1..7b685f9f46a 100644 --- a/test/src/com/cloud/test/regression/ApiCommand.java +++ b/test/src/com/cloud/test/regression/ApiCommand.java @@ -376,7 +376,7 @@ public class ApiCommand { // Send api command to the server public void sendCommand(HttpClient client, Connection conn) { - if (TestCaseEngine._printUrl == true) { + if (TestCaseEngine.s_printUrl == true) { s_logger.info("url is " + this.command); } @@ -440,7 +440,7 @@ public class ApiCommand { } } - if (TestCaseEngine._printUrl == true) { + if (TestCaseEngine.s_printUrl == true) { s_logger.info("Response code is " + this.responseCode); } } catch (Exception ex) { diff --git a/test/src/com/cloud/test/regression/TestCaseEngine.java b/test/src/com/cloud/test/regression/TestCaseEngine.java index 091dac8c878..4207e1786f5 100644 --- a/test/src/com/cloud/test/regression/TestCaseEngine.java +++ b/test/src/com/cloud/test/regression/TestCaseEngine.java @@ -38,20 +38,20 @@ import org.w3c.dom.NodeList; public class TestCaseEngine { public static final Logger s_logger = Logger.getLogger(TestCaseEngine.class.getName()); - public static String fileName = "../metadata/adapter.xml"; - public static HashMap globalParameters = new HashMap(); - protected static HashMap _componentMap = new HashMap(); - protected static HashMap> _inputFile = new HashMap>(); - protected static String testCaseName = new String(); - protected static ArrayList _keys = new ArrayList(); - private static ThreadLocal result = new ThreadLocal(); - public static int _numThreads = 1; - public static boolean _repeat = false; - public static boolean _printUrl = false; - public static String type = "All"; - public static boolean isSanity = false; - public static boolean isRegression = false; - private static int failure = 0; + public static String s_fileName = "../metadata/adapter.xml"; + public static HashMap s_globalParameters = new HashMap(); + protected static HashMap s_componentMap = new HashMap(); + protected static HashMap> s_inputFile = new HashMap>(); + protected static String s_testCaseName = new String(); + protected static ArrayList s_keys = new ArrayList(); + private static ThreadLocal s_result = new ThreadLocal(); + public static int s_numThreads = 1; + public static boolean s_repeat = false; + public static boolean s_printUrl = false; + public static String s_type = "All"; + public static boolean s_isSanity = false; + public static boolean s_isRegression = false; + private static int s_failure = 0; public static void main(String args[]) { @@ -62,35 +62,35 @@ public class TestCaseEngine { String arg = iter.next(); // is stress? if (arg.equals("-t")) { - _numThreads = Integer.parseInt(iter.next()); + s_numThreads = Integer.parseInt(iter.next()); } // do you want to print url for all commands? if (arg.equals("-p")) { - _printUrl = true; + s_printUrl = true; } //type of the test: sanity, regression, all (default) if (arg.equals("-type")) { - type = iter.next(); + s_type = iter.next(); } if (arg.equals("-repeat")) { - _repeat = Boolean.valueOf(iter.next()); + s_repeat = Boolean.valueOf(iter.next()); } if (arg.equals("-filename")) { - fileName = iter.next(); + s_fileName = iter.next(); } } - if (type.equalsIgnoreCase("sanity")) - isSanity = true; - else if (type.equalsIgnoreCase("regression")) - isRegression = true; + if (s_type.equalsIgnoreCase("sanity")) + s_isSanity = true; + else if (s_type.equalsIgnoreCase("regression")) + s_isRegression = true; try { // parse adapter.xml file to get list of tests to execute - File file = new File(fileName); + File file = new File(s_fileName); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(file); @@ -106,9 +106,9 @@ public class TestCaseEngine { // set error to 0 by default // execute test - for (int i = 0; i < _numThreads; i++) { - if (_numThreads > 1) { - s_logger.info("STARTING STRESS TEST IN " + _numThreads + " THREADS"); + for (int i = 0; i < s_numThreads; i++) { + if (s_numThreads > 1) { + s_logger.info("STARTING STRESS TEST IN " + s_numThreads + " THREADS"); } else { s_logger.info("STARTING FUNCTIONAL TEST"); } @@ -116,33 +116,33 @@ public class TestCaseEngine { @Override public void run() { do { - if (_numThreads == 1) { + if (s_numThreads == 1) { try { - for (String key : _keys) { - Class c = Class.forName(_componentMap.get(key)); + for (String key : s_keys) { + Class c = Class.forName(s_componentMap.get(key)); TestCase component = (TestCase)c.newInstance(); executeTest(key, c, component); } } catch (Exception ex1) { s_logger.error(ex1); } finally { - if (failure > 0) { + if (s_failure > 0) { System.exit(1); } } } else { Random ran = new Random(); - Integer randomNumber = Math.abs(ran.nextInt(_keys.size())); + Integer randomNumber = Math.abs(ran.nextInt(s_keys.size())); try { - String key = _keys.get(randomNumber); - Class c = Class.forName(_componentMap.get(key)); + String key = s_keys.get(randomNumber); + Class c = Class.forName(s_componentMap.get(key)); TestCase component = (TestCase)c.newInstance(); executeTest(key, c, component); } catch (Exception e) { s_logger.error("Error in thread ", e); } } - } while (_repeat); + } while (s_repeat); } }).start(); } @@ -166,7 +166,7 @@ public class TestCaseEngine { Element itemNameElement = (Element)itemName.item(0); NodeList itemVariable = itemElement.getElementsByTagName("variable"); Element itemVariableElement = (Element)itemVariable.item(0); - globalParameters.put(itemVariableElement.getTextContent(), itemNameElement.getTextContent()); + s_globalParameters.put(itemVariableElement.getTextContent(), itemNameElement.getTextContent()); } } } @@ -182,51 +182,51 @@ public class TestCaseEngine { // get test case name NodeList testCaseNameList = itemElement.getElementsByTagName("testname"); if (testCaseNameList != null) { - testCaseName = ((Element)testCaseNameList.item(0)).getTextContent(); + s_testCaseName = ((Element)testCaseNameList.item(0)).getTextContent(); } - if (isSanity == true && !testCaseName.equals("SANITY TEST")) + if (s_isSanity == true && !s_testCaseName.equals("SANITY TEST")) continue; - else if (isRegression == true && !(testCaseName.equals("SANITY TEST") || testCaseName.equals("REGRESSION TEST"))) + else if (s_isRegression == true && !(s_testCaseName.equals("SANITY TEST") || s_testCaseName.equals("REGRESSION TEST"))) continue; // set class name NodeList className = itemElement.getElementsByTagName("class"); if ((className.getLength() == 0) || (className == null)) { - _componentMap.put(testCaseName, "com.cloud.test.regression.VMApiTest"); + s_componentMap.put(s_testCaseName, "com.cloud.test.regression.VMApiTest"); } else { String name = ((Element)className.item(0)).getTextContent(); - _componentMap.put(testCaseName, name); + s_componentMap.put(s_testCaseName, name); } // set input file name NodeList inputFileNameLst = itemElement.getElementsByTagName("filename"); - _inputFile.put(testCaseName, new ArrayList()); + s_inputFile.put(s_testCaseName, new ArrayList()); for (int k = 0; k < inputFileNameLst.getLength(); k++) { String inputFileName = ((Element)inputFileNameLst.item(k)).getTextContent(); - _inputFile.get(testCaseName).add(inputFileName); + s_inputFile.get(s_testCaseName).add(inputFileName); } } } //If sanity test required, make sure that SANITY TEST componennt got loaded - if (isSanity == true && _componentMap.size() == 0) { + if (s_isSanity == true && s_componentMap.size() == 0) { s_logger.error("FAILURE!!! Failed to load SANITY TEST component. Verify that the test is uncommented in adapter.xml"); System.exit(1); } - if (isRegression == true && _componentMap.size() != 2) { + if (s_isRegression == true && s_componentMap.size() != 2) { s_logger.error("FAILURE!!! Failed to load SANITY TEST or REGRESSION TEST components. Verify that these tests are uncommented in adapter.xml"); System.exit(1); } // put all keys from _componentMap to the ArrayList - Set set = _componentMap.entrySet(); + Set set = s_componentMap.entrySet(); Iterator it = set.iterator(); while (it.hasNext()) { Map.Entry me = (Map.Entry)it.next(); String key = (String)me.getKey(); - _keys.add(key); + s_keys.add(key); } } @@ -238,30 +238,30 @@ public class TestCaseEngine { // set global parameters HashMap updateParam = new HashMap(); - updateParam.putAll(globalParameters); + updateParam.putAll(s_globalParameters); component.setParam(updateParam); // set DB ip address - component.setConn(globalParameters.get("dbPassword")); + component.setConn(s_globalParameters.get("dbPassword")); // set commands list component.setCommands(); // set input file - if (_inputFile.get(key) != null) { - component.setInputFile(_inputFile.get(key)); + if (s_inputFile.get(key) != null) { + component.setInputFile(s_inputFile.get(key)); } // set test case name if (key != null) { - component.setTestCaseName(testCaseName); + component.setTestCaseName(s_testCaseName); } // execute method - result.set(component.executeTest()); - if (result.get().toString().equals("false")) { + s_result.set(component.executeTest()); + if (s_result.get().toString().equals("false")) { s_logger.error("FAILURE!!! Test \"" + key + "\" failed\n\n\n"); - failure++; + s_failure++; } else { finalResult = true; s_logger.info("SUCCESS!!! Test \"" + key + "\" passed\n\n\n"); diff --git a/test/src/com/cloud/test/stress/StressTestDirectAttach.java b/test/src/com/cloud/test/stress/StressTestDirectAttach.java index 57623f912e6..7d0647a6dd6 100644 --- a/test/src/com/cloud/test/stress/StressTestDirectAttach.java +++ b/test/src/com/cloud/test/stress/StressTestDirectAttach.java @@ -61,18 +61,18 @@ public class StressTestDirectAttach { private static boolean repeat = true; private static String[] users = null; private static boolean internet = false; - private static ThreadLocal _linuxIP = new ThreadLocal(); - private static ThreadLocal _linuxVmId = new ThreadLocal(); - private static ThreadLocal _linuxVmId1 = new ThreadLocal(); - private static ThreadLocal _linuxPassword = new ThreadLocal(); - private static ThreadLocal _windowsIP = new ThreadLocal(); - private static ThreadLocal _secretKey = new ThreadLocal(); - private static ThreadLocal _apiKey = new ThreadLocal(); - private static ThreadLocal _userId = new ThreadLocal(); - private static ThreadLocal _account = new ThreadLocal(); - private static ThreadLocal _domainRouterId = new ThreadLocal(); - private static ThreadLocal _newVolume = new ThreadLocal(); - private static ThreadLocal _newVolume1 = new ThreadLocal(); + private static ThreadLocal s_linuxIP = new ThreadLocal(); + private static ThreadLocal s_linuxVmId = new ThreadLocal(); + private static ThreadLocal s_linuxVmId1 = new ThreadLocal(); + private static ThreadLocal s_linuxPassword = new ThreadLocal(); + private static ThreadLocal s_windowsIP = new ThreadLocal(); + private static ThreadLocal s_secretKey = new ThreadLocal(); + private static ThreadLocal s_apiKey = new ThreadLocal(); + private static ThreadLocal s_userId = new ThreadLocal(); + private static ThreadLocal s_account = new ThreadLocal(); + private static ThreadLocal s_domainRouterId = new ThreadLocal(); + private static ThreadLocal s_newVolume = new ThreadLocal(); + private static ThreadLocal s_newVolume1 = new ThreadLocal(); private static DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); private static int usageIterator = 1; private static int numThreads = 1; @@ -182,16 +182,16 @@ public class StressTestDirectAttach { // the windows VM // can boot up and do a sys prep. - s_logger.info("Begin Linux SSH test for account " + _account.get()); - reason = sshTest(_linuxIP.get(), _linuxPassword.get()); + s_logger.info("Begin Linux SSH test for account " + s_account.get()); + reason = sshTest(s_linuxIP.get(), s_linuxPassword.get()); if (reason == null) { - s_logger.info("Linux SSH test successful for account " + _account.get()); + s_logger.info("Linux SSH test successful for account " + s_account.get()); } } if (reason == null) { if (internet) { - s_logger.info("Windows SSH test successful for account " + _account.get()); + s_logger.info("Windows SSH test successful for account " + s_account.get()); } else { s_logger.info("deploy test successful....now cleaning up"); if (cleanUp) { @@ -228,7 +228,7 @@ public class StressTestDirectAttach { } else { // Just stop but don't destroy the // VMs/Routers - s_logger.info("SSH test failed for account " + _account.get() + "with reason '" + reason + "', stopping VMs"); + s_logger.info("SSH test failed for account " + s_account.get() + "with reason '" + reason + "', stopping VMs"); int stopResponseCode = executeStop(server, developerServer, username); s_logger.info("stop command finished with response code: " + stopResponseCode); success = false; // since the SSH test @@ -404,7 +404,7 @@ public class StressTestDirectAttach { } private static String executeRegistration(String server, String username, String password) throws HttpException, IOException { - String url = server + "?command=registerUserKeys&id=" + _userId.get().toString(); + String url = server + "?command=registerUserKeys&id=" + s_userId.get().toString(); s_logger.info("registering: " + username); String returnValue = null; HttpClient client = new HttpClient(); @@ -413,7 +413,7 @@ public class StressTestDirectAttach { if (responseCode == 200) { InputStream is = method.getResponseBodyAsStream(); Map requestKeyValues = getSingleValueFromXML(is, new String[] {"apikey", "secretkey"}); - _apiKey.set(requestKeyValues.get("apikey")); + s_apiKey.set(requestKeyValues.get("apikey")); returnValue = requestKeyValues.get("secretkey"); } else { s_logger.error("registration failed with error code: " + responseCode); @@ -458,8 +458,8 @@ public class StressTestDirectAttach { s_logger.info("created user " + username + " with id " + userIdStr); if (userIdStr != null) { userId = Long.parseLong(userIdStr); - _userId.set(userId); - _account.set(userIdValues.get("account")); + s_userId.set(userId); + s_account.set(userIdValues.get("account")); if (userId == -1) { s_logger.error("create user (" + username + ") failed to retrieve a valid user id, aborting depolyment test"); return -1; @@ -470,14 +470,14 @@ public class StressTestDirectAttach { return responseCode; } - _secretKey.set(executeRegistration(server, username, username)); + s_secretKey.set(executeRegistration(server, username, username)); - if (_secretKey.get() == null) { + if (s_secretKey.get() == null) { s_logger.error("FAILED to retrieve secret key during registration, skipping user: " + username); return -1; } else { - s_logger.info("got secret key: " + _secretKey.get()); - s_logger.info("got api key: " + _apiKey.get()); + s_logger.info("got secret key: " + s_secretKey.get()); + s_logger.info("got api key: " + s_apiKey.get()); } // --------------------------------- @@ -489,10 +489,10 @@ public class StressTestDirectAttach { } else { networkAccount = encodedUsername; } - String encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); + String encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); String requestToSign = "apikey=" + encodedApiKey + "&command=createSecurityGroup&name=" + encodedUsername; requestToSign = requestToSign.toLowerCase(); - String signature = signRequest(requestToSign, _secretKey.get()); + String signature = signRequest(requestToSign, s_secretKey.get()); String encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=createSecurityGroup&name=" + encodedUsername + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; method = new GetMethod(url); @@ -543,12 +543,12 @@ public class StressTestDirectAttach { String encodedZoneId = URLEncoder.encode("" + zoneId, "UTF-8"); String encodedServiceOfferingId = URLEncoder.encode("" + serviceOfferingId, "UTF-8"); String encodedTemplateId = URLEncoder.encode("" + templateId, "UTF-8"); - encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); + encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); requestToSign = "apikey=" + encodedApiKey + "&command=deployVirtualMachine&securitygrouplist=" + encodedUsername + "&serviceofferingid=" + encodedServiceOfferingId + "&templateid=" + encodedTemplateId + "&zoneid=" + encodedZoneId; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=deployVirtualMachine&securitygrouplist=" + encodedUsername + "&zoneid=" + encodedZoneId + "&serviceofferingid=" + @@ -568,9 +568,9 @@ public class StressTestDirectAttach { s_logger.info("deploy linux vm response code: " + responseCode); long linuxVMId = Long.parseLong(values.get("id")); s_logger.info("got linux virtual machine id: " + linuxVMId); - _linuxVmId.set(values.get("id")); - _linuxIP.set(values.get("ipaddress")); - _linuxPassword.set("rs-ccb35ea5"); + s_linuxVmId.set(values.get("id")); + s_linuxIP.set(values.get("ipaddress")); + s_linuxPassword.set("rs-ccb35ea5"); } } else { s_logger.error("deploy linux vm failed with error code: " + responseCode + ". Following URL was sent: " + url); @@ -580,7 +580,7 @@ public class StressTestDirectAttach { //Create a new volume { - url = server + "?command=createVolume&diskofferingid=" + diskOfferingId + "&zoneid=" + zoneId + "&name=newvolume&account=" + _account.get() + "&domainid=1"; + url = server + "?command=createVolume&diskofferingid=" + diskOfferingId + "&zoneid=" + zoneId + "&name=newvolume&account=" + s_account.get() + "&domainid=1"; s_logger.info("Creating volume...."); client = new HttpClient(); method = new GetMethod(url); @@ -597,7 +597,7 @@ public class StressTestDirectAttach { s_logger.info("create volume response code: " + responseCode); String volumeId = values.get("id"); s_logger.info("got volume id: " + volumeId); - _newVolume.set(volumeId); + s_newVolume.set(volumeId); } } else { s_logger.error("create volume failed with error code: " + responseCode + ". Following URL was sent: " + url); @@ -607,8 +607,8 @@ public class StressTestDirectAttach { //attach a new volume to the vm { - url = server + "?command=attachVolume&id=" + _newVolume.get() + "&virtualmachineid=" + _linuxVmId.get(); - s_logger.info("Attaching volume with id " + _newVolume.get() + " to the vm " + _linuxVmId.get()); + url = server + "?command=attachVolume&id=" + s_newVolume.get() + "&virtualmachineid=" + s_linuxVmId.get(); + s_logger.info("Attaching volume with id " + s_newVolume.get() + " to the vm " + s_linuxVmId.get()); client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -640,12 +640,12 @@ public class StressTestDirectAttach { String encodedZoneId = URLEncoder.encode("" + zoneId, "UTF-8"); String encodedServiceOfferingId = URLEncoder.encode("" + serviceOfferingId, "UTF-8"); String encodedTemplateId = URLEncoder.encode("" + templateId, "UTF-8"); - encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); + encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); requestToSign = "apikey=" + encodedApiKey + "&command=deployVirtualMachine&securitygrouplist=" + encodedUsername + "&serviceofferingid=" + encodedServiceOfferingId + "&templateid=" + encodedTemplateId + "&zoneid=" + encodedZoneId; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=deployVirtualMachine&securitygrouplist=" + encodedUsername + "&zoneid=" + encodedZoneId + "&serviceofferingid=" + @@ -665,7 +665,7 @@ public class StressTestDirectAttach { s_logger.info("deploy linux vm response code: " + responseCode); long linuxVMId = Long.parseLong(values.get("id")); s_logger.info("got linux virtual machine id: " + linuxVMId); - _linuxVmId1.set(values.get("id")); + s_linuxVmId1.set(values.get("id")); } } else { s_logger.error("deploy linux vm failed with error code: " + responseCode + ". Following URL was sent: " + url); @@ -675,7 +675,7 @@ public class StressTestDirectAttach { //Create a new volume { - url = server + "?command=createVolume&diskofferingid=" + diskOfferingId1 + "&zoneid=" + zoneId + "&name=newvolume1&account=" + _account.get() + "&domainid=1"; + url = server + "?command=createVolume&diskofferingid=" + diskOfferingId1 + "&zoneid=" + zoneId + "&name=newvolume1&account=" + s_account.get() + "&domainid=1"; s_logger.info("Creating volume...."); client = new HttpClient(); method = new GetMethod(url); @@ -692,7 +692,7 @@ public class StressTestDirectAttach { s_logger.info("create volume response code: " + responseCode); String volumeId = values.get("id"); s_logger.info("got volume id: " + volumeId); - _newVolume1.set(volumeId); + s_newVolume1.set(volumeId); } } else { s_logger.error("create volume failed with error code: " + responseCode + ". Following URL was sent: " + url); @@ -702,8 +702,8 @@ public class StressTestDirectAttach { //attach a new volume to the vm { - url = server + "?command=attachVolume&id=" + _newVolume1.get() + "&virtualmachineid=" + _linuxVmId1.get(); - s_logger.info("Attaching volume with id " + _newVolume1.get() + " to the vm " + _linuxVmId1.get()); + url = server + "?command=attachVolume&id=" + s_newVolume1.get() + "&virtualmachineid=" + s_linuxVmId1.get(); + s_logger.info("Attaching volume with id " + s_newVolume1.get() + " to the vm " + s_linuxVmId1.get()); client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -735,7 +735,7 @@ public class StressTestDirectAttach { // ----------------------------- // GET USER // ----------------------------- - String userId = _userId.get().toString(); + String userId = s_userId.get().toString(); String encodedUserId = URLEncoder.encode(userId, "UTF-8"); String url = server + "?command=listUsers&id=" + encodedUserId; s_logger.info("Cleaning up resources for user: " + userId + " with url " + url); @@ -780,13 +780,13 @@ public class StressTestDirectAttach { // ----------------------------- //Reboot centos VM - String encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); - String requestToSign = "apikey=" + encodedApiKey + "&command=rebootVirtualMachine&id=" + _linuxVmId.get(); + String encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); + String requestToSign = "apikey=" + encodedApiKey + "&command=rebootVirtualMachine&id=" + s_linuxVmId.get(); requestToSign = requestToSign.toLowerCase(); - String signature = signRequest(requestToSign, _secretKey.get()); + String signature = signRequest(requestToSign, s_secretKey.get()); String encodedSignature = URLEncoder.encode(signature, "UTF-8"); - url = developerServer + "?command=rebootVirtualMachine&id=" + _linuxVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; + url = developerServer + "?command=rebootVirtualMachine&id=" + s_linuxVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -802,12 +802,12 @@ public class StressTestDirectAttach { } //Stop centos VM - requestToSign = "apikey=" + encodedApiKey + "&command=stopVirtualMachine&id=" + _linuxVmId.get(); + requestToSign = "apikey=" + encodedApiKey + "&command=stopVirtualMachine&id=" + s_linuxVmId.get(); requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); - url = developerServer + "?command=stopVirtualMachine&id=" + _linuxVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; + url = developerServer + "?command=stopVirtualMachine&id=" + s_linuxVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -823,12 +823,12 @@ public class StressTestDirectAttach { } //Start centos VM - requestToSign = "apikey=" + encodedApiKey + "&command=startVirtualMachine&id=" + _linuxVmId.get(); + requestToSign = "apikey=" + encodedApiKey + "&command=startVirtualMachine&id=" + s_linuxVmId.get(); requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); - url = developerServer + "?command=startVirtualMachine&id=" + _linuxVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; + url = developerServer + "?command=startVirtualMachine&id=" + s_linuxVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -902,9 +902,9 @@ public class StressTestDirectAttach { // ----------------------------- // GET EVENTS // ----------------------------- - String url = server + "?command=listEvents&page=1&account=" + _account.get(); + String url = server + "?command=listEvents&page=1&account=" + s_account.get(); - s_logger.info("Getting events for the account " + _account.get()); + s_logger.info("Getting events for the account " + s_account.get()); HttpClient client = new HttpClient(); HttpMethod method = new GetMethod(url); int responseCode = client.executeMethod(method); @@ -939,7 +939,7 @@ public class StressTestDirectAttach { // ----------------------------- // GET USER // ----------------------------- - String userId = _userId.get().toString(); + String userId = s_userId.get().toString(); String encodedUserId = URLEncoder.encode(userId, "UTF-8"); String url = server + "?command=listUsers&id=" + encodedUserId; @@ -968,10 +968,10 @@ public class StressTestDirectAttach { // ---------------------------------- // LIST VIRTUAL MACHINES // ---------------------------------- - String encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); + String encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); String requestToSign = "apikey=" + encodedApiKey + "&command=listVirtualMachines"; requestToSign = requestToSign.toLowerCase(); - String signature = signRequest(requestToSign, _secretKey.get()); + String signature = signRequest(requestToSign, s_secretKey.get()); String encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=listVirtualMachines&apikey=" + encodedApiKey + "&signature=" + encodedSignature; @@ -1013,7 +1013,7 @@ public class StressTestDirectAttach { for (String vmId : vmIds) { requestToSign = "apikey=" + encodedApiKey + "&command=stopVirtualMachine&id=" + vmId; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=stopVirtualMachine&id=" + vmId + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; @@ -1052,15 +1052,15 @@ public class StressTestDirectAttach { } - _linuxIP.set(""); - _linuxVmId.set(""); - _linuxPassword.set(""); - _windowsIP.set(""); - _secretKey.set(""); - _apiKey.set(""); - _userId.set(Long.parseLong("0")); - _account.set(""); - _domainRouterId.set(""); + s_linuxIP.set(""); + s_linuxVmId.set(""); + s_linuxPassword.set(""); + s_windowsIP.set(""); + s_secretKey.set(""); + s_apiKey.set(""); + s_userId.set(Long.parseLong("0")); + s_account.set(""); + s_domainRouterId.set(""); return responseCode; } @@ -1090,16 +1090,16 @@ public class StressTestDirectAttach { while (true) { try { if (retry > 0) { - s_logger.info("Retry attempt : " + retry + " ...sleeping 300 seconds before next attempt. Account is " + _account.get()); + s_logger.info("Retry attempt : " + retry + " ...sleeping 300 seconds before next attempt. Account is " + s_account.get()); Thread.sleep(300000); } - s_logger.info("Attempting to SSH into windows host " + host + " with retry attempt: " + retry + " for account " + _account.get()); + s_logger.info("Attempting to SSH into windows host " + host + " with retry attempt: " + retry + " for account " + s_account.get()); Connection conn = new Connection(host); conn.connect(null, 60000, 60000); - s_logger.info("User " + _account.get() + " ssHed successfully into windows host " + host); + s_logger.info("User " + s_account.get() + " ssHed successfully into windows host " + host); boolean success = false; boolean isAuthenticated = conn.authenticateWithPassword("Administrator", "password"); if (isAuthenticated == false) { @@ -1121,7 +1121,7 @@ public class StressTestDirectAttach { } Session sess = conn.openSession(); - s_logger.info("User + " + _account.get() + " executing : wget http://192.168.1.250/dump.bin"); + s_logger.info("User + " + s_account.get() + " executing : wget http://192.168.1.250/dump.bin"); sess.execCommand("wget http://192.168.1.250/dump.bin && dir dump.bin"); InputStream stdout = sess.getStdout(); @@ -1164,7 +1164,7 @@ public class StressTestDirectAttach { } else { retry++; if (retry == MAX_RETRY_WIN) { - return "SSH Windows Network test fail for account " + _account.get(); + return "SSH Windows Network test fail for account " + s_account.get(); } } } catch (Exception e) { @@ -1196,16 +1196,16 @@ public class StressTestDirectAttach { while (true) { try { if (retry > 0) { - s_logger.info("Retry attempt : " + retry + " ...sleeping 120 seconds before next attempt. Account is " + _account.get()); + s_logger.info("Retry attempt : " + retry + " ...sleeping 120 seconds before next attempt. Account is " + s_account.get()); Thread.sleep(120000); } - s_logger.info("Attempting to SSH into linux host " + host + " with retry attempt: " + retry + ". Account is " + _account.get()); + s_logger.info("Attempting to SSH into linux host " + host + " with retry attempt: " + retry + ". Account is " + s_account.get()); Connection conn = new Connection(host); conn.connect(null, 60000, 60000); - s_logger.info("User + " + _account.get() + " ssHed successfully into linux host " + host); + s_logger.info("User + " + s_account.get() + " ssHed successfully into linux host " + host); boolean isAuthenticated = conn.authenticateWithPassword("root", password); @@ -1224,7 +1224,7 @@ public class StressTestDirectAttach { linuxCommand = "wget http://192.168.1.250/dump.bin && ls -al dump.bin"; Session sess = conn.openSession(); - s_logger.info("User " + _account.get() + " executing : " + linuxCommand); + s_logger.info("User " + s_account.get() + " executing : " + linuxCommand); sess.execCommand(linuxCommand); InputStream stdout = sess.getStdout(); diff --git a/test/src/com/cloud/test/stress/TestClientWithAPI.java b/test/src/com/cloud/test/stress/TestClientWithAPI.java index d49cf0b2a61..420bda61590 100644 --- a/test/src/com/cloud/test/stress/TestClientWithAPI.java +++ b/test/src/com/cloud/test/stress/TestClientWithAPI.java @@ -64,38 +64,38 @@ public class TestClientWithAPI { private static int numOfUsers = 0; private static String[] users = null; private static boolean internet = false; - private static ThreadLocal _linuxIP = new ThreadLocal(); - private static ThreadLocal _linuxIpId = new ThreadLocal(); - private static ThreadLocal _linuxVmId = new ThreadLocal(); - private static ThreadLocal _linuxPassword = new ThreadLocal(); - private static ThreadLocal _windowsIP = new ThreadLocal(); - private static ThreadLocal _windowsIpId = new ThreadLocal(); - private static ThreadLocal _windowsVmId = new ThreadLocal(); - private static ThreadLocal _secretKey = new ThreadLocal(); - private static ThreadLocal _apiKey = new ThreadLocal(); - private static ThreadLocal _userId = new ThreadLocal(); - private static ThreadLocal _accountId = new ThreadLocal(); - private static ThreadLocal _account = new ThreadLocal(); - private static ThreadLocal _domainRouterId = new ThreadLocal(); - private static ThreadLocal _pfGroupId = new ThreadLocal(); - private static ThreadLocal _windowsLb = new ThreadLocal(); - private static ThreadLocal _linuxLb = new ThreadLocal(); - private static ThreadLocal _dataVolume = new ThreadLocal(); - private static ThreadLocal _rootVolume = new ThreadLocal(); - private static ThreadLocal _newVolume = new ThreadLocal(); - private static ThreadLocal _snapshot = new ThreadLocal(); - private static ThreadLocal _volumeFromSnapshot = new ThreadLocal(); - private static ThreadLocal _networkId = new ThreadLocal(); - private static ThreadLocal _publicIpId = new ThreadLocal(); - private static ThreadLocal _winipfwdid = new ThreadLocal(); - private static ThreadLocal _linipfwdid = new ThreadLocal(); + private static ThreadLocal s_linuxIP = new ThreadLocal(); + private static ThreadLocal s_linuxIpId = new ThreadLocal(); + private static ThreadLocal s_linuxVmId = new ThreadLocal(); + private static ThreadLocal s_linuxPassword = new ThreadLocal(); + private static ThreadLocal s_windowsIP = new ThreadLocal(); + private static ThreadLocal s_windowsIpId = new ThreadLocal(); + private static ThreadLocal s_windowsVmId = new ThreadLocal(); + private static ThreadLocal s_secretKey = new ThreadLocal(); + private static ThreadLocal s_apiKey = new ThreadLocal(); + private static ThreadLocal s_userId = new ThreadLocal(); + private static ThreadLocal s_accountId = new ThreadLocal(); + private static ThreadLocal s_account = new ThreadLocal(); + private static ThreadLocal s_domainRouterId = new ThreadLocal(); + private static ThreadLocal s_pfGroupId = new ThreadLocal(); + private static ThreadLocal s_windowsLb = new ThreadLocal(); + private static ThreadLocal s_linuxLb = new ThreadLocal(); + private static ThreadLocal s_dataVolume = new ThreadLocal(); + private static ThreadLocal s_rootVolume = new ThreadLocal(); + private static ThreadLocal s_newVolume = new ThreadLocal(); + private static ThreadLocal s_snapshot = new ThreadLocal(); + private static ThreadLocal s_volumeFromSnapshot = new ThreadLocal(); + private static ThreadLocal s_networkId = new ThreadLocal(); + private static ThreadLocal s_publicIpId = new ThreadLocal(); + private static ThreadLocal s_winipfwdid = new ThreadLocal(); + private static ThreadLocal s_linipfwdid = new ThreadLocal(); private static DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); private static int usageIterator = 1; private static int numThreads = 1; private static int wait = 5000; private static String accountName = null; private static String zoneId = "1"; - private static String snapshot_test = "no"; + private static String snapshotTest = "no"; private static String serviceOfferingId = "1"; private static String diskOfferingId = "4"; private static String networkOfferingId = "6"; @@ -168,7 +168,7 @@ public class TestClientWithAPI { } if (arg.equals("-snapshot")) { - snapshot_test = "yes"; + snapshotTest = "yes"; } if (arg.equals("-so")) { @@ -225,7 +225,7 @@ public class TestClientWithAPI { NDC.push(username); s_logger.info("Starting test for the user " + username); - int response = executeDeployment(server, developerServer, username, snapshot_test); + int response = executeDeployment(server, developerServer, username, snapshotTest); boolean success = false; String reason = null; @@ -239,22 +239,22 @@ public class TestClientWithAPI { // can boot up and do a sys prep. if (accountName == null) { - s_logger.info("Begin Linux SSH test for account " + _account.get()); - reason = sshTest(_linuxIP.get(), _linuxPassword.get(), snapshot_test); + s_logger.info("Begin Linux SSH test for account " + s_account.get()); + reason = sshTest(s_linuxIP.get(), s_linuxPassword.get(), snapshotTest); } if (reason == null) { - s_logger.info("Linux SSH test successful for account " + _account.get()); - s_logger.info("Begin WindowsSSH test for account " + _account.get()); + s_logger.info("Linux SSH test successful for account " + s_account.get()); + s_logger.info("Begin WindowsSSH test for account " + s_account.get()); - reason = sshTest(_linuxIP.get(), _linuxPassword.get(), snapshot_test); - // reason = sshWinTest(_windowsIP.get()); + reason = sshTest(s_linuxIP.get(), s_linuxPassword.get(), snapshotTest); + // reason = sshWinTest(s_windowsIP.get()); } // release the linux IP now... - _linuxIP.set(null); + s_linuxIP.set(null); // release the Windows IP now - _windowsIP.set(null); + s_windowsIP.set(null); } // sleep for 3 min before getting the latest network stat @@ -263,7 +263,7 @@ public class TestClientWithAPI { // verify that network stat is correct for the user; if it's not - stop all the resources // for the user // if ((reason == null) && (getNetworkStat(server) == false) ) { - // s_logger.error("Stopping all the resources for the account " + _account.get() + + // s_logger.error("Stopping all the resources for the account " + s_account.get() + // " as network stat is incorrect"); // int stopResponseCode = executeStop( // server, developerServer, @@ -276,7 +276,7 @@ public class TestClientWithAPI { // } else if (reason == null) { if (internet) { - s_logger.info("Windows SSH test successful for account " + _account.get()); + s_logger.info("Windows SSH test successful for account " + s_account.get()); } else { s_logger.info("deploy test successful....now cleaning up"); if (cleanUp) { @@ -313,7 +313,7 @@ public class TestClientWithAPI { } else { // Just stop but don't destroy the // VMs/Routers - s_logger.info("SSH test failed for account " + _account.get() + "with reason '" + reason + "', stopping VMs"); + s_logger.info("SSH test failed for account " + s_account.get() + "with reason '" + reason + "', stopping VMs"); int stopResponseCode = executeStop(server, developerServer, username, false); s_logger.info("stop command finished with response code: " + stopResponseCode); success = false; // since the SSH test @@ -495,7 +495,7 @@ public class TestClientWithAPI { } private static String executeRegistration(String server, String username, String password) throws HttpException, IOException { - String url = server + "?command=registerUserKeys&id=" + _userId.get().toString(); + String url = server + "?command=registerUserKeys&id=" + s_userId.get().toString(); s_logger.info("registering: " + username); String returnValue = null; HttpClient client = new HttpClient(); @@ -504,7 +504,7 @@ public class TestClientWithAPI { if (responseCode == 200) { InputStream is = method.getResponseBodyAsStream(); Map requestKeyValues = getSingleValueFromXML(is, new String[] {"apikey", "secretkey"}); - _apiKey.set(requestKeyValues.get("apikey")); + s_apiKey.set(requestKeyValues.get("apikey")); returnValue = requestKeyValues.get("secretkey"); } else { s_logger.error("registration failed with error code: " + responseCode); @@ -512,7 +512,7 @@ public class TestClientWithAPI { return returnValue; } - private static Integer executeDeployment(String server, String developerServer, String username, String snapshot_test) throws HttpException, IOException { + private static Integer executeDeployment(String server, String developerServer, String username, String snapshotTest) throws HttpException, IOException { // test steps: // - create user // - deploy Windows VM @@ -545,8 +545,8 @@ public class TestClientWithAPI { s_logger.info("created account " + username + " with id " + accountIdStr); if (accountIdStr != null) { accountId = Long.parseLong(accountIdStr); - _accountId.set(accountId); - _account.set(accountValues.get("name")); + s_accountId.set(accountId); + s_account.set(accountValues.get("name")); if (accountId == -1) { s_logger.error("create account (" + username + ") failed to retrieve a valid user id, aborting depolyment test"); return -1; @@ -571,7 +571,7 @@ public class TestClientWithAPI { s_logger.info("listed user " + username + " with id " + userIdStr); if (userIdStr != null) { userId = Long.parseLong(userIdStr); - _userId.set(userId); + s_userId.set(userId); if (userId == -1) { s_logger.error("list user by username " + username + ") failed to retrieve a valid user id, aborting depolyment test"); return -1; @@ -583,14 +583,14 @@ public class TestClientWithAPI { return -1; } - _secretKey.set(executeRegistration(server, username, username)); + s_secretKey.set(executeRegistration(server, username, username)); - if (_secretKey.get() == null) { + if (s_secretKey.get() == null) { s_logger.error("FAILED to retrieve secret key during registration, skipping user: " + username); return -1; } else { - s_logger.info("got secret key: " + _secretKey.get()); - s_logger.info("got api key: " + _apiKey.get()); + s_logger.info("got secret key: " + s_secretKey.get()); + s_logger.info("got api key: " + s_apiKey.get()); } // --------------------------------- @@ -608,7 +608,7 @@ public class TestClientWithAPI { String networkIdStr = networkValues.get("id"); s_logger.info("Created virtual network with name virtualnetwork-" + encodedUsername + " and id " + networkIdStr); if (networkIdStr != null) { - _networkId.set(networkIdStr); + s_networkId.set(networkIdStr); } } else { s_logger.error("Create virtual network failed for account " + username + " with error code :" + responseCode + @@ -629,7 +629,7 @@ public class TestClientWithAPI { String networkIdStr = networkValues.get("id"); s_logger.info("Created direct network with name directnetwork-" + encodedUsername + " and id " + networkIdStr); if (networkIdStr != null) { - _networkId_dir.set(networkIdStr); + s_networkId_dir.set(networkIdStr); } } else { s_logger.error("Create direct network failed for account " + username + " with error code :" + responseCode + ", aborting deployment test. The command was sent with url " + url); @@ -647,13 +647,13 @@ public class TestClientWithAPI { String encodedZoneId = URLEncoder.encode("" + zoneId, "UTF-8"); String encodedServiceOfferingId = URLEncoder.encode("" + serviceOfferingId, "UTF-8"); String encodedTemplateId = URLEncoder.encode("" + templateId, "UTF-8"); - String encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); - String encodedNetworkIds = URLEncoder.encode(_networkId.get() + ",206", "UTF-8"); + String encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); + String encodedNetworkIds = URLEncoder.encode(s_networkId.get() + ",206", "UTF-8"); String requestToSign = "apikey=" + encodedApiKey + "&command=deployVirtualMachine&diskofferingid=" + diskOfferingId + "&networkids=" + encodedNetworkIds + "&serviceofferingid=" + encodedServiceOfferingId + "&templateid=" + encodedTemplateId + "&zoneid=" + encodedZoneId; requestToSign = requestToSign.toLowerCase(); - String signature = signRequest(requestToSign, _secretKey.get()); + String signature = signRequest(requestToSign, s_secretKey.get()); String encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=deployVirtualMachine" + "&zoneid=" + encodedZoneId + "&serviceofferingid=" + encodedServiceOfferingId + "&diskofferingid=" + @@ -674,11 +674,11 @@ public class TestClientWithAPI { s_logger.info("deploy linux vm response code: " + responseCode); long linuxVMId = Long.parseLong(values.get("id")); s_logger.info("got linux virtual machine id: " + linuxVMId); - _linuxVmId.set(values.get("id")); + s_linuxVmId.set(values.get("id")); linuxVMPrivateIP = values.get("ipaddress"); - // _linuxPassword.set(values.get("password")); - _linuxPassword.set(vmPassword); - s_logger.info("got linux virtual machine password: " + _linuxPassword.get()); + // s_linuxPassword.set(values.get("password")); + s_linuxPassword.set(vmPassword); + s_logger.info("got linux virtual machine password: " + s_linuxPassword.get()); } } else { s_logger.error("deploy linux vm failed with error code: " + responseCode + ". Following URL was sent: " + url); @@ -692,10 +692,10 @@ public class TestClientWithAPI { // --------------------------------- String ipAddr = null; - String encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); + String encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); String requestToSign = "apikey=" + encodedApiKey + "&command=associateIpAddress" + "&zoneid=" + zoneId; requestToSign = requestToSign.toLowerCase(); - String signature = signRequest(requestToSign, _secretKey.get()); + String signature = signRequest(requestToSign, s_secretKey.get()); String encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=associateIpAddress" + "&apikey=" + encodedApiKey + "&zoneid=" + zoneId + "&signature=" + encodedSignature; @@ -715,17 +715,17 @@ public class TestClientWithAPI { s_logger.info("Associate IP Address response code: " + responseCode); long publicIpId = Long.parseLong(values.get("id")); s_logger.info("Associate IP's Id: " + publicIpId); - _publicIpId.set(values.get("id")); + s_publicIpId.set(values.get("id")); } } else { s_logger.error("associate ip address for windows vm failed with error code: " + responseCode + ". Following URL was sent: " + url); return responseCode; } - String encodedPublicIpId = URLEncoder.encode(_publicIpId.get(), "UTF-8"); + String encodedPublicIpId = URLEncoder.encode(s_publicIpId.get(), "UTF-8"); requestToSign = "apikey=" + encodedApiKey + "&command=listPublicIpAddresses" + "&id=" + encodedPublicIpId; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=listPublicIpAddresses&apikey=" + encodedApiKey + "&id=" + encodedPublicIpId + "&signature=" + encodedSignature; @@ -740,8 +740,8 @@ public class TestClientWithAPI { List ipAddressValues = getIPs(is, false); // List ipAddressVals = getIPs(is, false, true); if ((ipAddressValues != null) && !ipAddressValues.isEmpty()) { - _windowsIpId.set(ipAddressValues.get(0)); - _windowsIP.set(ipAddressValues.get(1)); + s_windowsIpId.set(ipAddressValues.get(0)); + s_windowsIP.set(ipAddressValues.get(1)); s_logger.info("For Windows, using non-sourceNat IP address ID: " + ipAddressValues.get(0)); s_logger.info("For Windows, using non-sourceNat IP address: " + ipAddressValues.get(1)); } @@ -756,7 +756,7 @@ public class TestClientWithAPI { { requestToSign = "apikey=" + encodedApiKey + "&command=listPublicIpAddresses"; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=listPublicIpAddresses&apikey=" + encodedApiKey + "&signature=" + encodedSignature; @@ -772,8 +772,8 @@ public class TestClientWithAPI { // is = method.getResponseBodyAsStream(); // List ipAddressVals = getIPs(is, true, true); if ((ipAddressValues != null) && !ipAddressValues.isEmpty()) { - _linuxIpId.set(ipAddressValues.get(0)); - _linuxIP.set(ipAddressValues.get(1)); + s_linuxIpId.set(ipAddressValues.get(0)); + s_linuxIP.set(ipAddressValues.get(1)); s_logger.info("For linux, using sourceNat IP address ID: " + ipAddressValues.get(0)); s_logger.info("For linux, using sourceNat IP address: " + ipAddressValues.get(1)); } @@ -786,11 +786,11 @@ public class TestClientWithAPI { //-------------------------------------------- // Enable Static NAT for the Source NAT Ip //-------------------------------------------- - String encodedSourceNatPublicIpId = URLEncoder.encode(_linuxIpId.get(), "UTF-8"); + String encodedSourceNatPublicIpId = URLEncoder.encode(s_linuxIpId.get(), "UTF-8"); /* requestToSign = "apikey=" + encodedApiKey + "&command=enableStaticNat"+"&id=" + encodedSourceNatPublicIpId + "&virtualMachineId=" + encodedVmId;; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=enableStaticNat&apikey=" + encodedApiKey + "&signature=" + encodedSignature + "&id=" + encodedSourceNatPublicIpId + "&virtualMachineId=" + encodedVmId; @@ -811,13 +811,13 @@ public class TestClientWithAPI { // ------------------------------------------------------------- // CREATE IP FORWARDING RULE -- Linux VM // ------------------------------------------------------------- - String encodedVmId = URLEncoder.encode(_linuxVmId.get(), "UTF-8"); - String encodedIpAddress = URLEncoder.encode(_linuxIpId.get(), "UTF-8"); + String encodedVmId = URLEncoder.encode(s_linuxVmId.get(), "UTF-8"); + String encodedIpAddress = URLEncoder.encode(s_linuxIpId.get(), "UTF-8"); requestToSign = "apikey=" + encodedApiKey + "&command=createPortForwardingRule&ipaddressid=" + encodedIpAddress + "&privateport=22&protocol=TCP&publicport=22" + "&virtualmachineid=" + encodedVmId; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = @@ -834,7 +834,7 @@ public class TestClientWithAPI { s_logger.info("Port forwarding rule was assigned successfully to Linux VM"); long ipfwdid = Long.parseLong(values.get("id")); s_logger.info("got Port Forwarding Rule's Id:" + ipfwdid); - _linipfwdid.set(values.get("id")); + s_linipfwdid.set(values.get("id")); } else { s_logger.error("Port forwarding rule creation failed with error code: " + responseCode + ". Following URL was sent: " + url); @@ -842,11 +842,11 @@ public class TestClientWithAPI { } // Create snapshot recurring policy if needed; otherwise create windows vm - if (snapshot_test.equals("yes")) { + if (snapshotTest.equals("yes")) { // list volumes for linux vm { - url = server + "?command=listVolumes&virtualMachineId=" + _linuxVmId.get() + "&type=root"; + url = server + "?command=listVolumes&virtualMachineId=" + s_linuxVmId.get() + "&type=root"; s_logger.info("Getting rootDisk id of Centos vm"); client = new HttpClient(); method = new GetMethod(url); @@ -859,7 +859,7 @@ public class TestClientWithAPI { s_logger.error("Unable to get root volume for linux vm. Followin url was sent: " + url); } s_logger.info("Got rootVolume for linux vm with id " + success.get("id")); - _rootVolume.set(success.get("id")); + s_rootVolume.set(success.get("id")); } else { s_logger.error("List volumes for linux vm failed with error code: " + responseCode + ". Following URL was sent: " + url); return responseCode; @@ -869,7 +869,7 @@ public class TestClientWithAPI { { String encodedTimeZone = URLEncoder.encode("America/Los Angeles", "UTF-8"); url = - server + "?command=createSnapshotPolicy&intervaltype=hourly&schedule=10&maxsnaps=4&volumeid=" + _rootVolume.get() + "&timezone=" + + server + "?command=createSnapshotPolicy&intervaltype=hourly&schedule=10&maxsnaps=4&volumeid=" + s_rootVolume.get() + "&timezone=" + encodedTimeZone; s_logger.info("Creating recurring snapshot policy for linux vm ROOT disk"); client = new HttpClient(); @@ -893,14 +893,14 @@ public class TestClientWithAPI { String encodedZoneId = URLEncoder.encode("" + zoneId, "UTF-8"); String encodedServiceOfferingId = URLEncoder.encode("" + serviceOfferingId, "UTF-8"); String encodedTemplateId = URLEncoder.encode("" + templateId, "UTF-8"); - encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); - String encodedNetworkIds = URLEncoder.encode(_networkId.get() + ",206", "UTF-8"); + encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); + String encodedNetworkIds = URLEncoder.encode(s_networkId.get() + ",206", "UTF-8"); requestToSign = "apikey=" + encodedApiKey + "&command=deployVirtualMachine&diskofferingid=" + diskOfferingId + "&networkids=" + encodedNetworkIds + "&serviceofferingid=" + encodedServiceOfferingId + "&templateid=" + encodedTemplateId + "&zoneid=" + encodedZoneId; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = @@ -923,7 +923,7 @@ public class TestClientWithAPI { windowsVMPrivateIP = values.get("ipaddress"); long windowsVMId = Long.parseLong(values.get("id")); s_logger.info("got windows virtual machine id: " + windowsVMId); - _windowsVmId.set(values.get("id")); + s_windowsVmId.set(values.get("id")); } } else { s_logger.error("deploy windows vm failes with error code: " + responseCode + ". Following URL was sent: " + url); @@ -935,11 +935,11 @@ public class TestClientWithAPI { // Enable Static NAT for the Non Source NAT Ip //-------------------------------------------- - encodedVmId = URLEncoder.encode(_windowsVmId.get(), "UTF-8"); - encodedPublicIpId = URLEncoder.encode(_publicIpId.get(), "UTF-8"); + encodedVmId = URLEncoder.encode(s_windowsVmId.get(), "UTF-8"); + encodedPublicIpId = URLEncoder.encode(s_publicIpId.get(), "UTF-8"); requestToSign = "apikey=" + encodedApiKey + "&command=enableStaticNat" + "&ipaddressid=" + encodedPublicIpId + "&virtualMachineId=" + encodedVmId; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = @@ -964,12 +964,12 @@ public class TestClientWithAPI { // ------------------------------------------------------------- // create port forwarding rule for window vm - encodedIpAddress = URLEncoder.encode(_windowsIpId.get(), "UTF-8"); - //encodedVmId = URLEncoder.encode(_windowsVmId.get(), "UTF-8"); + encodedIpAddress = URLEncoder.encode(s_windowsIpId.get(), "UTF-8"); + //encodedVmId = URLEncoder.encode(s_windowsVmId.get(), "UTF-8"); requestToSign = "apikey=" + encodedApiKey + "&command=createIpForwardingRule&endPort=22&ipaddressid=" + encodedIpAddress + "&protocol=TCP&startPort=22"; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = @@ -986,7 +986,7 @@ public class TestClientWithAPI { s_logger.info("Port forwarding rule was assigned successfully to Windows VM"); long ipfwdid = Long.parseLong(values.get("id")); s_logger.info("got Ip Forwarding Rule's Id:" + ipfwdid); - _winipfwdid.set(values.get("id")); + s_winipfwdid.set(values.get("id")); } else { s_logger.error("Port forwarding rule creation failed with error code: " + responseCode + ". Following URL was sent: " + url); return responseCode; @@ -1004,7 +1004,7 @@ public class TestClientWithAPI { // ----------------------------- // GET USER // ----------------------------- - String userId = _userId.get().toString(); + String userId = s_userId.get().toString(); String encodedUserId = URLEncoder.encode(userId, "UTF-8"); String url = server + "?command=listUsers&id=" + encodedUserId; s_logger.info("Cleaning up resources for user: " + userId + " with url " + url); @@ -1048,7 +1048,7 @@ public class TestClientWithAPI { // Detach existin dataVolume, create a new volume, attach it to the vm // ----------------------------- { - url = server + "?command=listVolumes&virtualMachineId=" + _linuxVmId.get() + "&type=dataDisk"; + url = server + "?command=listVolumes&virtualMachineId=" + s_linuxVmId.get() + "&type=dataDisk"; s_logger.info("Getting dataDisk id of Centos vm"); client = new HttpClient(); method = new GetMethod(url); @@ -1058,7 +1058,7 @@ public class TestClientWithAPI { InputStream is = method.getResponseBodyAsStream(); Map success = getSingleValueFromXML(is, new String[] {"id"}); s_logger.info("Got dataDiskVolume with id " + success.get("id")); - _dataVolume.set(success.get("id")); + s_dataVolume.set(success.get("id")); } else { s_logger.error("List volumes failed with error code: " + responseCode + ". Following URL was sent: " + url); return responseCode; @@ -1067,8 +1067,8 @@ public class TestClientWithAPI { // Detach volume { - url = server + "?command=detachVolume&id=" + _dataVolume.get(); - s_logger.info("Detaching volume with id " + _dataVolume.get()); + url = server + "?command=detachVolume&id=" + s_dataVolume.get(); + s_logger.info("Detaching volume with id " + s_dataVolume.get()); client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1085,8 +1085,8 @@ public class TestClientWithAPI { // Delete a volume { - url = server + "?command=deleteVolume&id=" + _dataVolume.get(); - s_logger.info("Deleting volume with id " + _dataVolume.get()); + url = server + "?command=deleteVolume&id=" + s_dataVolume.get(); + s_logger.info("Deleting volume with id " + s_dataVolume.get()); client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1101,7 +1101,7 @@ public class TestClientWithAPI { // Create a new volume { - url = server + "?command=createVolume&diskofferingid=" + diskOfferingId + "&zoneid=" + zoneId + "&name=newvolume&account=" + _account.get() + "&domainid=1"; + url = server + "?command=createVolume&diskofferingid=" + diskOfferingId + "&zoneid=" + zoneId + "&name=newvolume&account=" + s_account.get() + "&domainid=1"; s_logger.info("Creating volume...."); client = new HttpClient(); method = new GetMethod(url); @@ -1118,7 +1118,7 @@ public class TestClientWithAPI { s_logger.info("create volume response code: " + responseCode); long volumeId = Long.parseLong(values.get("id")); s_logger.info("got volume id: " + volumeId); - _newVolume.set(values.get("id")); + s_newVolume.set(values.get("id")); } } else { s_logger.error("create volume failed with error code: " + responseCode + ". Following URL was sent: " + url); @@ -1128,8 +1128,8 @@ public class TestClientWithAPI { // attach a new volume to the vm { - url = server + "?command=attachVolume&id=" + _newVolume.get() + "&virtualmachineid=" + _linuxVmId.get(); - s_logger.info("Attaching volume with id " + _newVolume.get() + " to the vm " + _linuxVmId.get()); + url = server + "?command=attachVolume&id=" + s_newVolume.get() + "&virtualmachineid=" + s_linuxVmId.get(); + s_logger.info("Attaching volume with id " + s_newVolume.get() + " to the vm " + s_linuxVmId.get()); client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1147,7 +1147,7 @@ public class TestClientWithAPI { // Create a snapshot // list volumes { - url = server + "?command=listVolumes&virtualMachineId=" + _linuxVmId.get() + "&type=root"; + url = server + "?command=listVolumes&virtualMachineId=" + s_linuxVmId.get() + "&type=root"; s_logger.info("Getting rootDisk id of Centos vm"); client = new HttpClient(); method = new GetMethod(url); @@ -1160,7 +1160,7 @@ public class TestClientWithAPI { s_logger.error("Unable to get root volume. Followin url was sent: " + url); } s_logger.info("Got rootVolume with id " + success.get("id")); - _rootVolume.set(success.get("id")); + s_rootVolume.set(success.get("id")); } else { s_logger.error("List volumes failed with error code: " + responseCode + ". Following URL was sent: " + url); return responseCode; @@ -1168,13 +1168,13 @@ public class TestClientWithAPI { } // //Create snapshot from root disk volume - String encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); - String requestToSign = "apikey=" + encodedApiKey + "&command=createSnapshot&volumeid=" + _rootVolume.get(); + String encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); + String requestToSign = "apikey=" + encodedApiKey + "&command=createSnapshot&volumeid=" + s_rootVolume.get(); requestToSign = requestToSign.toLowerCase(); - String signature = signRequest(requestToSign, _secretKey.get()); + String signature = signRequest(requestToSign, s_secretKey.get()); String encodedSignature = URLEncoder.encode(signature, "UTF-8"); - url = developerServer + "?command=createSnapshot&volumeid=" + _rootVolume.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; + url = developerServer + "?command=createSnapshot&volumeid=" + s_rootVolume.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1189,7 +1189,7 @@ public class TestClientWithAPI { return 401; } else { s_logger.info("create snapshot response code: " + responseCode + ". Got snapshot with id " + values.get("id")); - _snapshot.set(values.get("id")); + s_snapshot.set(values.get("id")); } } else { s_logger.error("create snapshot failed with error code: " + responseCode + ". Following URL was sent: " + url); @@ -1197,13 +1197,13 @@ public class TestClientWithAPI { } // Create volume from the snapshot created on the previous step and attach it to the running vm - /* encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); - requestToSign = "apikey=" + encodedApiKey + "&command=createVolume&name=" + _account.get() + "&snapshotid=" + _snapshot.get(); + /* encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); + requestToSign = "apikey=" + encodedApiKey + "&command=createVolume&name=" + s_account.get() + "&snapshotid=" + s_snapshot.get(); requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); - url = developerServer + "?command=createVolume&name=" + _account.get() + "&snapshotid=" + _snapshot.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; + url = developerServer + "?command=createVolume&name=" + s_account.get() + "&snapshotid=" + s_snapshot.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1218,7 +1218,7 @@ public class TestClientWithAPI { return 401; } else { s_logger.info("create volume from snapshot response code: " + responseCode + ". Got volume with id " + values.get("id") + ". The command was sent with url " + url); - _volumeFromSnapshot.set(values.get("id")); + s_volumeFromSnapshot.set(values.get("id")); } } else { s_logger.error("create volume from snapshot failed with error code: " + responseCode + ". Following URL was sent: " + url); @@ -1226,8 +1226,8 @@ public class TestClientWithAPI { } { - url = server + "?command=attachVolume&id=" + _volumeFromSnapshot.get() + "&virtualmachineid=" + _linuxVmId.get(); - s_logger.info("Attaching volume with id " + _volumeFromSnapshot.get() + " to the vm " + _linuxVmId.get()); + url = server + "?command=attachVolume&id=" + s_volumeFromSnapshot.get() + "&virtualmachineid=" + s_linuxVmId.get(); + s_logger.info("Attaching volume with id " + s_volumeFromSnapshot.get() + " to the vm " + s_linuxVmId.get()); client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1247,12 +1247,12 @@ public class TestClientWithAPI { // ----------------------------- // Reboot windows VM - requestToSign = "apikey=" + encodedApiKey + "&command=rebootVirtualMachine&id=" + _windowsVmId.get(); + requestToSign = "apikey=" + encodedApiKey + "&command=rebootVirtualMachine&id=" + s_windowsVmId.get(); requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); - url = developerServer + "?command=rebootVirtualMachine&id=" + _windowsVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; + url = developerServer + "?command=rebootVirtualMachine&id=" + s_windowsVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1268,12 +1268,12 @@ public class TestClientWithAPI { } // Stop centos VM - requestToSign = "apikey=" + encodedApiKey + "&command=stopVirtualMachine&id=" + _linuxVmId.get(); + requestToSign = "apikey=" + encodedApiKey + "&command=stopVirtualMachine&id=" + s_linuxVmId.get(); requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); - url = developerServer + "?command=stopVirtualMachine&id=" + _linuxVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; + url = developerServer + "?command=stopVirtualMachine&id=" + s_linuxVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1290,15 +1290,15 @@ public class TestClientWithAPI { // Create private template from root disk volume requestToSign = - "apikey=" + encodedApiKey + "&command=createTemplate" + "&displaytext=" + _account.get() + "&name=" + _account.get() + "&ostypeid=11" + "&snapshotid=" + - _snapshot.get(); + "apikey=" + encodedApiKey + "&command=createTemplate" + "&displaytext=" + s_account.get() + "&name=" + s_account.get() + "&ostypeid=11" + "&snapshotid=" + + s_snapshot.get(); requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = - developerServer + "?command=createTemplate" + "&displaytext=" + _account.get() + "&name=" + _account.get() + "&ostypeid=11" + "&snapshotid=" + - _snapshot.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; + developerServer + "?command=createTemplate" + "&displaytext=" + s_account.get() + "&name=" + s_account.get() + "&ostypeid=11" + "&snapshotid=" + + s_snapshot.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1320,12 +1320,12 @@ public class TestClientWithAPI { } // Start centos VM - requestToSign = "apikey=" + encodedApiKey + "&command=startVirtualMachine&id=" + _windowsVmId.get(); + requestToSign = "apikey=" + encodedApiKey + "&command=startVirtualMachine&id=" + s_windowsVmId.get(); requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); - url = developerServer + "?command=startVirtualMachine&id=" + _windowsVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; + url = developerServer + "?command=startVirtualMachine&id=" + s_windowsVmId.get() + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1337,7 +1337,7 @@ public class TestClientWithAPI { // get domainRouter id { - url = server + "?command=listRouters&zoneid=" + zoneId + "&account=" + _account.get() + "&domainid=1"; + url = server + "?command=listRouters&zoneid=" + zoneId + "&account=" + s_account.get() + "&domainid=1"; client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1346,7 +1346,7 @@ public class TestClientWithAPI { InputStream is = method.getResponseBodyAsStream(); Map success = getSingleValueFromXML(is, new String[] {"id"}); s_logger.info("Got the domR with id " + success.get("id")); - _domainRouterId.set(success.get("id")); + s_domainRouterId.set(success.get("id")); } else { s_logger.error("List domain routers failed with error code: " + responseCode + ". Following URL was sent: " + url); return responseCode; @@ -1355,8 +1355,8 @@ public class TestClientWithAPI { // reboot the domain router { - url = server + "?command=rebootRouter&id=" + _domainRouterId.get(); - s_logger.info("Rebooting domR with id " + _domainRouterId.get()); + url = server + "?command=rebootRouter&id=" + s_domainRouterId.get(); + s_logger.info("Rebooting domR with id " + s_domainRouterId.get()); client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1375,7 +1375,7 @@ public class TestClientWithAPI { // DELETE ACCOUNT // ----------------------------- { - url = server + "?command=deleteAccount&id=" + _accountId.get(); + url = server + "?command=deleteAccount&id=" + s_accountId.get(); client = new HttpClient(); method = new GetMethod(url); responseCode = client.executeMethod(method); @@ -1401,9 +1401,9 @@ public class TestClientWithAPI { // ----------------------------- // GET EVENTS // ----------------------------- - String url = server + "?command=listEvents&page=1&pagesize=100&&account=" + _account.get(); + String url = server + "?command=listEvents&page=1&pagesize=100&&account=" + s_account.get(); - s_logger.info("Getting events for the account " + _account.get()); + s_logger.info("Getting events for the account " + s_account.get()); HttpClient client = new HttpClient(); HttpMethod method = new GetMethod(url); int responseCode = client.executeMethod(method); @@ -1457,7 +1457,7 @@ public class TestClientWithAPI { // -------------------------------- // GET USAGE RECORDS // -------------------------------- - url = server + "?command=listUsageRecords&startdate=2009-09-01&enddate=" + endDate + "&account=" + _account.get() + "&domaindid=1"; + url = server + "?command=listUsageRecords&startdate=2009-09-01&enddate=" + endDate + "&account=" + s_account.get() + "&domaindid=1"; s_logger.info("Getting all usage records with request: " + url); client = new HttpClient(); method = new GetMethod(url); @@ -1491,7 +1491,7 @@ public class TestClientWithAPI { private static boolean getNetworkStat(String server) { try { - String url = server + "?command=listAccountStatistics&account=" + _account.get(); + String url = server + "?command=listAccountStatistics&account=" + s_account.get(); HttpClient client = new HttpClient(); HttpMethod method = new GetMethod(url); int responseCode = client.executeMethod(method); @@ -1502,10 +1502,10 @@ public class TestClientWithAPI { int bytesReceived = Integer.parseInt(requestKeyValues.get("receivedbytes")); int bytesSent = Integer.parseInt(requestKeyValues.get("sentbytes")); if ((bytesReceived > 100000000) && (bytesSent > 0)) { - s_logger.info("Network stat is correct for account" + _account.get() + "; bytest received is " + bytesReceived + " and bytes sent is " + bytesSent); + s_logger.info("Network stat is correct for account" + s_account.get() + "; bytest received is " + bytesReceived + " and bytes sent is " + bytesSent); return true; } else { - s_logger.error("Incorrect value for bytes received/sent for the account " + _account.get() + ". We got " + bytesReceived + " bytes received; " + + s_logger.error("Incorrect value for bytes received/sent for the account " + s_account.get() + ". We got " + bytesReceived + " bytes received; " + " and " + bytesSent + " bytes sent"); return false; } @@ -1531,7 +1531,7 @@ public class TestClientWithAPI { // ----------------------------- // GET USER // ----------------------------- - String userId = _userId.get().toString(); + String userId = s_userId.get().toString(); String encodedUserId = URLEncoder.encode(userId, "UTF-8"); String url = server + "?command=listUsers&id=" + encodedUserId; @@ -1560,10 +1560,10 @@ public class TestClientWithAPI { // ---------------------------------- // LIST VIRTUAL MACHINES // ---------------------------------- - String encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); + String encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); String requestToSign = "apikey=" + encodedApiKey + "&command=listVirtualMachines"; requestToSign = requestToSign.toLowerCase(); - String signature = signRequest(requestToSign, _secretKey.get()); + String signature = signRequest(requestToSign, s_secretKey.get()); String encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=listVirtualMachines&apikey=" + encodedApiKey + "&signature=" + encodedSignature; @@ -1604,7 +1604,7 @@ public class TestClientWithAPI { requestToSign = "apikey=" + encodedApiKey + "&command=listPublicIpAddresses"; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=listPublicIpAddresses&apikey=" + encodedApiKey + "&signature=" + encodedSignature; @@ -1643,7 +1643,7 @@ public class TestClientWithAPI { requestToSign = "apikey=" + encodedApiKey + "&command=listZones"; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=listZones&apikey=" + encodedApiKey + "&signature=" + encodedSignature; @@ -1684,7 +1684,7 @@ public class TestClientWithAPI { requestToSign = "apikey=" + encodedApiKey + "&command=listAccounts"; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=listAccounts&apikey=" + encodedApiKey + "&signature=" + encodedSignature; @@ -1725,7 +1725,7 @@ public class TestClientWithAPI { requestToSign = "apikey=" + encodedApiKey + "&command=listTemplates@templatefilter=self"; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=listTemplates&apikey=" + encodedApiKey + "&templatefilter=self&signature=" + encodedSignature; @@ -1767,7 +1767,7 @@ public class TestClientWithAPI { requestToSign = "apikey=" + encodedApiKey + "&command=listServiceOfferings"; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=listServiceOfferings&apikey=" + encodedApiKey + "&signature=" + encodedSignature; @@ -1805,7 +1805,7 @@ public class TestClientWithAPI { // LIST EVENTS // --------------------------------- - url = server + "?command=listEvents&page=1&pagesize=100&&account=" + _account.get(); + url = server + "?command=listEvents&page=1&pagesize=100&&account=" + s_account.get(); String[] eventDescriptions = null; client = new HttpClient(); method = new GetMethod(url); @@ -1844,7 +1844,7 @@ public class TestClientWithAPI { for (String vmId : vmIds) { requestToSign = "apikey=" + encodedApiKey + "&command=" + cmdName + "&id=" + vmId; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=" + cmdName + "&id=" + vmId + "&apikey=" + encodedApiKey + "&signature=" + encodedSignature; @@ -1870,10 +1870,10 @@ public class TestClientWithAPI { // ----------------------------------------- // LIST NAT IP ADDRESSES // ----------------------------------------- - String encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); + String encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); String requestToSign = "apikey=" + encodedApiKey + "&command=listPublicIpAddresses"; requestToSign = requestToSign.toLowerCase(); - String signature = signRequest(requestToSign, _secretKey.get()); + String signature = signRequest(requestToSign, s_secretKey.get()); String encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=listPublicIpAddresses&apikey=" + encodedApiKey + "&signature=" + encodedSignature; @@ -1904,11 +1904,11 @@ public class TestClientWithAPI { // ------------------------------------------------------------- // Delete IP FORWARDING RULE -- Windows VM // ------------------------------------------------------------- - String encodedIpFwdId = URLEncoder.encode(_winipfwdid.get(), "UTF-8"); + String encodedIpFwdId = URLEncoder.encode(s_winipfwdid.get(), "UTF-8"); requestToSign = "apikey=" + encodedApiKey + "&command=deleteIpForwardingRule&id=" + encodedIpFwdId; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=deleteIpForwardingRule&apikey=" + encodedApiKey + "&id=" + encodedIpFwdId + "&signature=" + encodedSignature; @@ -1929,11 +1929,11 @@ public class TestClientWithAPI { //-------------------------------------------- // Disable Static NAT for the Source NAT Ip //-------------------------------------------- - encodedApiKey = URLEncoder.encode(_apiKey.get(), "UTF-8"); - String encodedPublicIpId = URLEncoder.encode(_publicIpId.get(), "UTF-8"); + encodedApiKey = URLEncoder.encode(s_apiKey.get(), "UTF-8"); + String encodedPublicIpId = URLEncoder.encode(s_publicIpId.get(), "UTF-8"); requestToSign = "apikey=" + encodedApiKey + "&command=disableStaticNat" + "&id=" + encodedPublicIpId; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=disableStaticNat&apikey=" + encodedApiKey + "&id=" + encodedPublicIpId + "&signature=" + encodedSignature; @@ -1958,7 +1958,7 @@ public class TestClientWithAPI { for (String ipAddress : ipAddresses) { requestToSign = "apikey=" + encodedApiKey + "&command=disassociateIpAddress&id=" + ipAddress; requestToSign = requestToSign.toLowerCase(); - signature = signRequest(requestToSign, _secretKey.get()); + signature = signRequest(requestToSign, s_secretKey.get()); encodedSignature = URLEncoder.encode(signature, "UTF-8"); url = developerServer + "?command=disassociateIpAddress&apikey=" + encodedApiKey + "&id=" + ipAddress + "&signature=" + encodedSignature; @@ -1979,18 +1979,18 @@ public class TestClientWithAPI { } } } - _linuxIP.set(""); - _linuxIpId.set(""); - _linuxVmId.set(""); - _linuxPassword.set(""); - _windowsIP.set(""); - _windowsIpId.set(""); - _windowsVmId.set(""); - _secretKey.set(""); - _apiKey.set(""); - _userId.set(Long.parseLong("0")); - _account.set(""); - _domainRouterId.set(""); + s_linuxIP.set(""); + s_linuxIpId.set(""); + s_linuxVmId.set(""); + s_linuxPassword.set(""); + s_windowsIP.set(""); + s_windowsIpId.set(""); + s_windowsVmId.set(""); + s_secretKey.set(""); + s_apiKey.set(""); + s_userId.set(Long.parseLong("0")); + s_account.set(""); + s_domainRouterId.set(""); return responseCode; } @@ -2020,16 +2020,16 @@ public class TestClientWithAPI { while (true) { try { if (retry > 0) { - s_logger.info("Retry attempt : " + retry + " ...sleeping 300 seconds before next attempt. Account is " + _account.get()); + s_logger.info("Retry attempt : " + retry + " ...sleeping 300 seconds before next attempt. Account is " + s_account.get()); Thread.sleep(300000); } - s_logger.info("Attempting to SSH into windows host " + host + " with retry attempt: " + retry + " for account " + _account.get()); + s_logger.info("Attempting to SSH into windows host " + host + " with retry attempt: " + retry + " for account " + s_account.get()); Connection conn = new Connection(host); conn.connect(null, 60000, 60000); - s_logger.info("User " + _account.get() + " ssHed successfully into windows host " + host); + s_logger.info("User " + s_account.get() + " ssHed successfully into windows host " + host); boolean success = false; boolean isAuthenticated = conn.authenticateWithPassword("Administrator", "password"); if (isAuthenticated == false) { @@ -2051,7 +2051,7 @@ public class TestClientWithAPI { } Session sess = conn.openSession(); - s_logger.info("User + " + _account.get() + " executing : wget http://" + downloadUrl); + s_logger.info("User + " + s_account.get() + " executing : wget http://" + downloadUrl); String downloadCommand = "wget http://" + downloadUrl + " && dir dump.bin"; sess.execCommand(downloadCommand); @@ -2094,7 +2094,7 @@ public class TestClientWithAPI { } else { retry++; if (retry == MAX_RETRY_WIN) { - return "SSH Windows Network test fail for account " + _account.get(); + return "SSH Windows Network test fail for account " + s_account.get(); } } } catch (Exception e) { @@ -2107,7 +2107,7 @@ public class TestClientWithAPI { } } - private static String sshTest(String host, String password, String snapshot_test) { + private static String sshTest(String host, String password, String snapshotTest) { int i = 0; if (host == null) { s_logger.info("Did not receive a host back from test, ignoring ssh test"); @@ -2126,16 +2126,16 @@ public class TestClientWithAPI { while (true) { try { if (retry > 0) { - s_logger.info("Retry attempt : " + retry + " ...sleeping 120 seconds before next attempt. Account is " + _account.get()); + s_logger.info("Retry attempt : " + retry + " ...sleeping 120 seconds before next attempt. Account is " + s_account.get()); Thread.sleep(120000); } - s_logger.info("Attempting to SSH into linux host " + host + " with retry attempt: " + retry + ". Account is " + _account.get()); + s_logger.info("Attempting to SSH into linux host " + host + " with retry attempt: " + retry + ". Account is " + s_account.get()); Connection conn = new Connection(host); conn.connect(null, 60000, 60000); - s_logger.info("User + " + _account.get() + " ssHed successfully into linux host " + host); + s_logger.info("User + " + s_account.get() + " ssHed successfully into linux host " + host); boolean isAuthenticated = conn.authenticateWithPassword("root", password); @@ -2154,7 +2154,7 @@ public class TestClientWithAPI { linuxCommand = "wget http://" + downloadUrl + " && ls -al dump.bin"; Session sess = conn.openSession(); - s_logger.info("User " + _account.get() + " executing : " + linuxCommand); + s_logger.info("User " + s_account.get() + " executing : " + linuxCommand); sess.execCommand(linuxCommand); InputStream stdout = sess.getStdout(); @@ -2199,7 +2199,7 @@ public class TestClientWithAPI { } } - if (snapshot_test.equals("no")) + if (snapshotTest.equals("no")) return result; else { Long sleep = 300000L; @@ -2209,7 +2209,7 @@ public class TestClientWithAPI { } catch (Exception e) { retry++; s_logger.error("SSH Linux Network test fail with error"); - if ((retry == MAX_RETRY_LINUX) && (snapshot_test.equals("no"))) { + if ((retry == MAX_RETRY_LINUX) && (snapshotTest.equals("no"))) { return "SSH Linux Network test fail with error " + e.getMessage(); } } diff --git a/test/src/com/cloud/test/stress/WgetTest.java b/test/src/com/cloud/test/stress/WgetTest.java index a972081e523..91885568447 100644 --- a/test/src/com/cloud/test/stress/WgetTest.java +++ b/test/src/com/cloud/test/stress/WgetTest.java @@ -29,7 +29,7 @@ import com.trilead.ssh2.Session; public class WgetTest { - public static int MAX_RETRY_LINUX = 1; + public static final int MAX_RETRY_LINUX = 1; public static final Logger s_logger = Logger.getLogger(WgetTest.class.getName()); public static String host = ""; public static String password = "rs-ccb35ea5"; diff --git a/test/src/com/cloud/test/utils/ConsoleProxy.java b/test/src/com/cloud/test/utils/ConsoleProxy.java index 23292471236..bc77bc918c7 100644 --- a/test/src/com/cloud/test/utils/ConsoleProxy.java +++ b/test/src/com/cloud/test/utils/ConsoleProxy.java @@ -54,7 +54,7 @@ public class ConsoleProxy implements Runnable { myScript.add(command); myScript.execute(); long begin = System.currentTimeMillis(); - wgetInt process = new wgetInt(); + WgetInt process = new WgetInt(); String response = myScript.execute(process); long end = process.getEnd(); if (response != null) { @@ -73,7 +73,7 @@ public class ConsoleProxy implements Runnable { } } - public class wgetInt extends OutputInterpreter { + public class WgetInt extends OutputInterpreter { private long end; public long getEnd() { diff --git a/usage/src/com/cloud/usage/UsageAlertManagerImpl.java b/usage/src/com/cloud/usage/UsageAlertManagerImpl.java index 0f86e857c5a..67bb7020d20 100644 --- a/usage/src/com/cloud/usage/UsageAlertManagerImpl.java +++ b/usage/src/com/cloud/usage/UsageAlertManagerImpl.java @@ -175,7 +175,8 @@ public class UsageAlertManagerImpl extends ManagerBase implements AlertManager { } // TODO: make sure this handles SSL transport (useAuth is true) and regular - protected void sendAlert(AlertType alertType, long dataCenterId, Long podId, String subject, String content) throws MessagingException, UnsupportedEncodingException { + protected void sendAlert(AlertType alertType, long dataCenterId, Long podId, String subject, String content) throws MessagingException, + UnsupportedEncodingException { s_alertsLogger.warn(" alertType:: " + alertType + " // dataCenterId:: " + dataCenterId + " // podId:: " + podId + " // clusterId:: " + null + " // message:: " + subject); AlertVO alert = null; @@ -249,7 +250,6 @@ public class UsageAlertManagerImpl extends ManagerBase implements AlertManager { } - @Override public boolean generateAlert(AlertType alertType, long dataCenterId, Long podId, String msg) { try { @@ -258,6 +258,6 @@ public class UsageAlertManagerImpl extends ManagerBase implements AlertManager { } catch (Exception ex) { s_logger.warn("Failed to generate an alert of type=" + alertType + "; msg=" + msg); return false; - } + } } } diff --git a/usage/src/com/cloud/usage/UsageManagerImpl.java b/usage/src/com/cloud/usage/UsageManagerImpl.java index b6c9ea6d064..0faf8acd9ff 100644 --- a/usage/src/com/cloud/usage/UsageManagerImpl.java +++ b/usage/src/com/cloud/usage/UsageManagerImpl.java @@ -45,6 +45,7 @@ import com.cloud.alert.AlertManager; import com.cloud.event.EventTypes; import com.cloud.event.UsageEventVO; import com.cloud.event.dao.UsageEventDao; +import com.cloud.event.dao.UsageEventDetailsDao; import com.cloud.usage.dao.UsageDao; import com.cloud.usage.dao.UsageIPAddressDao; import com.cloud.usage.dao.UsageJobDao; @@ -85,7 +86,6 @@ import com.cloud.utils.db.Filter; import com.cloud.utils.db.GlobalLock; import com.cloud.utils.db.SearchCriteria; import com.cloud.utils.db.TransactionLegacy; -import com.cloud.event.dao.UsageEventDetailsDao; @Component @Local(value = {UsageManager.class}) @@ -102,37 +102,37 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna private static final int USAGE_AGGREGATION_RANGE_MIN = 10; @Inject - private AccountDao m_accountDao; + private AccountDao _accountDao; @Inject - private UserStatisticsDao m_userStatsDao; + private UserStatisticsDao _userStatsDao; @Inject - private UsageDao m_usageDao; + private UsageDao _usageDao; @Inject - private UsageVMInstanceDao m_usageInstanceDao; + private UsageVMInstanceDao _usageInstanceDao; @Inject - private UsageIPAddressDao m_usageIPAddressDao; + private UsageIPAddressDao _usageIPAddressDao; @Inject - private UsageNetworkDao m_usageNetworkDao; + private UsageNetworkDao _usageNetworkDao; @Inject - private UsageVolumeDao m_usageVolumeDao; + private UsageVolumeDao _usageVolumeDao; @Inject - private UsageStorageDao m_usageStorageDao; + private UsageStorageDao _usageStorageDao; @Inject - private UsageLoadBalancerPolicyDao m_usageLoadBalancerPolicyDao; + private UsageLoadBalancerPolicyDao _usageLoadBalancerPolicyDao; @Inject - private UsagePortForwardingRuleDao m_usagePortForwardingRuleDao; + private UsagePortForwardingRuleDao _usagePortForwardingRuleDao; @Inject - private UsageNetworkOfferingDao m_usageNetworkOfferingDao; + private UsageNetworkOfferingDao _usageNetworkOfferingDao; @Inject - private UsageVPNUserDao m_usageVPNUserDao; + private UsageVPNUserDao _usageVPNUserDao; @Inject - private UsageSecurityGroupDao m_usageSecurityGroupDao; + private UsageSecurityGroupDao _usageSecurityGroupDao; @Inject - private UsageJobDao m_usageJobDao; + private UsageJobDao _usageJobDao; @Inject - private VmDiskStatisticsDao m_vmDiskStatsDao; + private VmDiskStatisticsDao _vmDiskStatsDao; @Inject - private UsageVmDiskDao m_usageVmDiskDao; + private UsageVmDiskDao _usageVmDiskDao; @Inject protected AlertManager _alertMgr; @Inject @@ -142,25 +142,25 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna @Inject ConfigurationDao _configDao; @Inject - private UsageVMSnapshotDao m_usageVMSnapshotDao; + private UsageVMSnapshotDao _usageVMSnapshotDao; - private String m_version = null; - private final Calendar m_jobExecTime = Calendar.getInstance(); - private int m_aggregationDuration = 0; - private int m_sanityCheckInterval = 0; - String m_hostname = null; - int m_pid = 0; - TimeZone m_usageTimezone = TimeZone.getTimeZone("GMT");; - private final GlobalLock m_heartbeatLock = GlobalLock.getInternLock("usage.job.heartbeat.check"); - private List usageNetworks = new ArrayList(); - private List usageVmDisks = new ArrayList(); + private String _version = null; + private final Calendar _jobExecTime = Calendar.getInstance(); + private int _aggregationDuration = 0; + private int _sanityCheckInterval = 0; + String _hostname = null; + int _pid = 0; + TimeZone _usageTimezone = TimeZone.getTimeZone("GMT");; + private final GlobalLock _heartbeatLock = GlobalLock.getInternLock("usage.job.heartbeat.check"); + private final List usageNetworks = new ArrayList(); + private final List usageVmDisks = new ArrayList(); - private final ScheduledExecutorService m_executor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("Usage-Job")); - private final ScheduledExecutorService m_heartbeatExecutor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("Usage-HB")); - private final ScheduledExecutorService m_sanityExecutor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("Usage-Sanity")); - private Future m_scheduledFuture = null; - private Future m_heartbeat = null; - private Future m_sanity = null; + private final ScheduledExecutorService _executor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("Usage-Job")); + private final ScheduledExecutorService _heartbeatExecutor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("Usage-HB")); + private final ScheduledExecutorService _sanityExecutor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("Usage-Sanity")); + private Future _scheduledFuture = null; + private Future _heartbeat = null; + private Future _sanity = null; public UsageManagerImpl() { } @@ -180,14 +180,14 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna } final Class c = UsageServer.class; - m_version = c.getPackage().getImplementationVersion(); - if (m_version == null) { + _version = c.getPackage().getImplementationVersion(); + if (_version == null) { // TODO // throw new CloudRuntimeException("Unable to find the implementation version of this usage server"); } if (s_logger.isInfoEnabled()) { - s_logger.info("Implementation Version is " + m_version); + s_logger.info("Implementation Version is " + _version); } Map configs = _configDao.getConfiguration(params); @@ -202,11 +202,11 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna String aggreagationTimeZone = configs.get("usage.aggregation.timezone"); String sanityCheckInterval = configs.get("usage.sanity.check.interval"); if (sanityCheckInterval != null) { - m_sanityCheckInterval = Integer.parseInt(sanityCheckInterval); + _sanityCheckInterval = Integer.parseInt(sanityCheckInterval); } if (aggreagationTimeZone != null && !aggreagationTimeZone.isEmpty()) { - m_usageTimezone = TimeZone.getTimeZone(aggreagationTimeZone); + _usageTimezone = TimeZone.getTimeZone(aggreagationTimeZone); } s_logger.debug("Usage stats aggregation time zone: " + aggreagationTimeZone); @@ -224,32 +224,32 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna } int hourOfDay = Integer.parseInt(execTimeSegments[0]); int minutes = Integer.parseInt(execTimeSegments[1]); - m_jobExecTime.setTime(new Date()); + _jobExecTime.setTime(new Date()); - m_jobExecTime.set(Calendar.HOUR_OF_DAY, hourOfDay); - m_jobExecTime.set(Calendar.MINUTE, minutes); - m_jobExecTime.set(Calendar.SECOND, 0); - m_jobExecTime.set(Calendar.MILLISECOND, 0); + _jobExecTime.set(Calendar.HOUR_OF_DAY, hourOfDay); + _jobExecTime.set(Calendar.MINUTE, minutes); + _jobExecTime.set(Calendar.SECOND, 0); + _jobExecTime.set(Calendar.MILLISECOND, 0); if (execTimeZone != null && !execTimeZone.isEmpty()) { - m_jobExecTime.setTimeZone(TimeZone.getTimeZone(execTimeZone)); + _jobExecTime.setTimeZone(TimeZone.getTimeZone(execTimeZone)); } // if the hour to execute the job has already passed, roll the day forward to the next day - Date execDate = m_jobExecTime.getTime(); + Date execDate = _jobExecTime.getTime(); if (execDate.before(new Date())) { - m_jobExecTime.roll(Calendar.DAY_OF_YEAR, true); + _jobExecTime.roll(Calendar.DAY_OF_YEAR, true); } s_logger.debug("Execution Time: " + execDate.toString()); Date currentDate = new Date(System.currentTimeMillis()); s_logger.debug("Current Time: " + currentDate.toString()); - m_aggregationDuration = Integer.parseInt(aggregationRange); - if (m_aggregationDuration < USAGE_AGGREGATION_RANGE_MIN) { + _aggregationDuration = Integer.parseInt(aggregationRange); + if (_aggregationDuration < USAGE_AGGREGATION_RANGE_MIN) { s_logger.warn("Usage stats job aggregation range is to small, using the minimum value of " + USAGE_AGGREGATION_RANGE_MIN); - m_aggregationDuration = USAGE_AGGREGATION_RANGE_MIN; + _aggregationDuration = USAGE_AGGREGATION_RANGE_MIN; } - m_hostname = InetAddress.getLocalHost().getHostName() + "/" + InetAddress.getLocalHost().getHostAddress(); + _hostname = InetAddress.getLocalHost().getHostName() + "/" + InetAddress.getLocalHost().getHostAddress(); } catch (NumberFormatException ex) { throw new ConfigurationException("Unable to parse usage.stats.job.exec.time '" + execTime + "' or usage.stats.job.aggregation.range '" + aggregationRange + "', please check configuration values"); @@ -257,7 +257,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.error("Unhandled exception configuring UsageManger", e); throw new ConfigurationException("Unhandled exception configuring UsageManager " + e.toString()); } - m_pid = Integer.parseInt(System.getProperty("pid")); + _pid = Integer.parseInt(System.getProperty("pid")); return true; } @@ -268,27 +268,27 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna } // use the configured exec time and aggregation duration for scheduling the job - m_scheduledFuture = - m_executor.scheduleAtFixedRate(this, m_jobExecTime.getTimeInMillis() - System.currentTimeMillis(), m_aggregationDuration * 60 * 1000, TimeUnit.MILLISECONDS); + _scheduledFuture = + _executor.scheduleAtFixedRate(this, _jobExecTime.getTimeInMillis() - System.currentTimeMillis(), _aggregationDuration * 60 * 1000, TimeUnit.MILLISECONDS); - m_heartbeat = - m_heartbeatExecutor.scheduleAtFixedRate(new Heartbeat(), /* start in 15 seconds...*/15 * 1000, /* check database every minute*/60 * 1000, + _heartbeat = + _heartbeatExecutor.scheduleAtFixedRate(new Heartbeat(), /* start in 15 seconds...*/15 * 1000, /* check database every minute*/60 * 1000, TimeUnit.MILLISECONDS); - if (m_sanityCheckInterval > 0) { - m_sanity = m_sanityExecutor.scheduleAtFixedRate(new SanityCheck(), 1, m_sanityCheckInterval, TimeUnit.DAYS); + if (_sanityCheckInterval > 0) { + _sanity = _sanityExecutor.scheduleAtFixedRate(new SanityCheck(), 1, _sanityCheckInterval, TimeUnit.DAYS); } TransactionLegacy usageTxn = TransactionLegacy.open(TransactionLegacy.USAGE_DB); try { - if (m_heartbeatLock.lock(3)) { // 3 second timeout + if (_heartbeatLock.lock(3)) { // 3 second timeout try { - UsageJobVO job = m_usageJobDao.getLastJob(); + UsageJobVO job = _usageJobDao.getLastJob(); if (job == null) { - m_usageJobDao.createNewJob(m_hostname, m_pid, UsageJobVO.JOB_TYPE_RECURRING); + _usageJobDao.createNewJob(_hostname, _pid, UsageJobVO.JOB_TYPE_RECURRING); } } finally { - m_heartbeatLock.unlock(); + _heartbeatLock.unlock(); } } else { if (s_logger.isTraceEnabled()) @@ -303,10 +303,10 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna @Override public boolean stop() { - m_heartbeat.cancel(true); - m_scheduledFuture.cancel(true); - if (m_sanity != null) { - m_sanity.cancel(true); + _heartbeat.cancel(true); + _scheduledFuture.cancel(true); + if (_sanity != null) { + _sanity.cancel(true); } return true; } @@ -327,27 +327,27 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna } // how about we update the job exec time when the job starts??? - long execTime = m_jobExecTime.getTimeInMillis(); + long execTime = _jobExecTime.getTimeInMillis(); long now = System.currentTimeMillis() + 2000; // 2 second buffer since jobs can run a little early (though usually just by milliseconds) if (execTime < now) { // if exec time is in the past, calculate the next time the job will execute...if this is a one-off job that is a result // of scheduleParse() then don't update the next exec time... - m_jobExecTime.add(Calendar.MINUTE, m_aggregationDuration); + _jobExecTime.add(Calendar.MINUTE, _aggregationDuration); } - UsageJobVO job = m_usageJobDao.isOwner(m_hostname, m_pid); + UsageJobVO job = _usageJobDao.isOwner(_hostname, _pid); if (job != null) { // FIXME: we really need to do a better job of not missing any events...so we should some how // keep track of the last time usage was run, then go from there... // For executing the job, we treat hourly and daily as special time ranges, using the previous full hour or the previous // full day. Otherwise we just subtract off the aggregation range from the current time and use that as start date with // current time as end date. - Calendar cal = Calendar.getInstance(m_usageTimezone); + Calendar cal = Calendar.getInstance(_usageTimezone); cal.setTime(new Date()); long startDate = 0; long endDate = 0; - if (m_aggregationDuration == DAILY_TIME) { + if (_aggregationDuration == DAILY_TIME) { cal.roll(Calendar.DAY_OF_YEAR, false); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); @@ -358,7 +358,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna cal.roll(Calendar.DAY_OF_YEAR, true); cal.add(Calendar.MILLISECOND, -1); endDate = cal.getTime().getTime(); - } else if (m_aggregationDuration == HOURLY_TIME) { + } else if (_aggregationDuration == HOURLY_TIME) { cal.roll(Calendar.HOUR_OF_DAY, false); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.SECOND, 0); @@ -370,7 +370,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna endDate = cal.getTime().getTime(); } else { endDate = cal.getTime().getTime(); // current time - cal.add(Calendar.MINUTE, -1 * m_aggregationDuration); + cal.add(Calendar.MINUTE, -1 * _aggregationDuration); startDate = cal.getTime().getTime(); } @@ -390,7 +390,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna if (s_logger.isDebugEnabled()) { s_logger.debug("Scheduling Usage job..."); } - m_executor.schedule(this, 0, TimeUnit.MILLISECONDS); + _executor.schedule(this, 0, TimeUnit.MILLISECONDS); } @Override @@ -405,7 +405,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna endDateMillis = timeStart; } - long lastSuccess = m_usageJobDao.getLastJobSuccessDateMillis(); + long lastSuccess = _usageJobDao.getLastJobSuccessDateMillis(); if (lastSuccess != 0) { startDateMillis = lastSuccess + 1; // 1 millisecond after } @@ -419,11 +419,11 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna try { jobUpdateTxn.start(); // everything seemed to work...set endDate as the last success date - m_usageJobDao.updateJobSuccess(job.getId(), startDateMillis, endDateMillis, System.currentTimeMillis() - timeStart, success); + _usageJobDao.updateJobSuccess(job.getId(), startDateMillis, endDateMillis, System.currentTimeMillis() - timeStart, success); // create a new job if this is a recurring job if (job.getJobType() == UsageJobVO.JOB_TYPE_RECURRING) { - m_usageJobDao.createNewJob(m_hostname, m_pid, UsageJobVO.JOB_TYPE_RECURRING); + _usageJobDao.createNewJob(_hostname, _pid, UsageJobVO.JOB_TYPE_RECURRING); } jobUpdateTxn.commit(); } finally { @@ -449,7 +449,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna try { Long limit = Long.valueOf(500); Long offset = Long.valueOf(0); - Long lastAccountId = m_usageDao.getLastAccountId(); + Long lastAccountId = _usageDao.getLastAccountId(); if (lastAccountId == null) { lastAccountId = Long.valueOf(0); } @@ -457,11 +457,11 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna do { Filter filter = new Filter(AccountVO.class, "id", true, offset, limit); - accounts = m_accountDao.findActiveAccounts(lastAccountId, filter); + accounts = _accountDao.findActiveAccounts(lastAccountId, filter); if ((accounts != null) && !accounts.isEmpty()) { // now update the accounts in the cloud_usage db - m_usageDao.updateAccounts(accounts); + _usageDao.updateAccounts(accounts); } offset = new Long(offset.longValue() + limit.longValue()); } while ((accounts != null) && !accounts.isEmpty()); @@ -472,11 +472,11 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna do { Filter filter = new Filter(AccountVO.class, "id", true, offset, limit); - accounts = m_accountDao.findRecentlyDeletedAccounts(lastAccountId, startDate, filter); + accounts = _accountDao.findRecentlyDeletedAccounts(lastAccountId, startDate, filter); if ((accounts != null) && !accounts.isEmpty()) { // now update the accounts in the cloud_usage db - m_usageDao.updateAccounts(accounts); + _usageDao.updateAccounts(accounts); } offset = new Long(offset.longValue() + limit.longValue()); } while ((accounts != null) && !accounts.isEmpty()); @@ -487,11 +487,11 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna do { Filter filter = new Filter(AccountVO.class, "id", true, offset, limit); - accounts = m_accountDao.findNewAccounts(lastAccountId, filter); + accounts = _accountDao.findNewAccounts(lastAccountId, filter); if ((accounts != null) && !accounts.isEmpty()) { // now copy the accounts to cloud_usage db - m_usageDao.saveAccounts(accounts); + _usageDao.saveAccounts(accounts); } offset = new Long(offset.longValue() + limit.longValue()); } while ((accounts != null) && !accounts.isEmpty()); @@ -500,21 +500,21 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna offset = Long.valueOf(0); // get all the user stats to create usage records for the network usage - Long lastUserStatsId = m_usageDao.getLastUserStatsId(); + Long lastUserStatsId = _usageDao.getLastUserStatsId(); if (lastUserStatsId == null) { lastUserStatsId = Long.valueOf(0); } - SearchCriteria sc2 = m_userStatsDao.createSearchCriteria(); + SearchCriteria sc2 = _userStatsDao.createSearchCriteria(); sc2.addAnd("id", SearchCriteria.Op.LTEQ, lastUserStatsId); do { Filter filter = new Filter(UserStatisticsVO.class, "id", true, offset, limit); - userStats = m_userStatsDao.search(sc2, filter); + userStats = _userStatsDao.search(sc2, filter); if ((userStats != null) && !userStats.isEmpty()) { // now copy the accounts to cloud_usage db - m_usageDao.updateUserStats(userStats); + _usageDao.updateUserStats(userStats); } offset = new Long(offset.longValue() + limit.longValue()); } while ((userStats != null) && !userStats.isEmpty()); @@ -522,16 +522,16 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna // reset offset offset = Long.valueOf(0); - sc2 = m_userStatsDao.createSearchCriteria(); + sc2 = _userStatsDao.createSearchCriteria(); sc2.addAnd("id", SearchCriteria.Op.GT, lastUserStatsId); do { Filter filter = new Filter(UserStatisticsVO.class, "id", true, offset, limit); - userStats = m_userStatsDao.search(sc2, filter); + userStats = _userStatsDao.search(sc2, filter); if ((userStats != null) && !userStats.isEmpty()) { // now copy the accounts to cloud_usage db - m_usageDao.saveUserStats(userStats); + _usageDao.saveUserStats(userStats); } offset = new Long(offset.longValue() + limit.longValue()); } while ((userStats != null) && !userStats.isEmpty()); @@ -539,21 +539,21 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna // reset offset offset = Long.valueOf(0); - // get all the vm network stats to create usage_vm_network records for the vm network usage - Long lastVmDiskStatsId = m_usageDao.getLastVmDiskStatsId(); + // get all the vm network stats to create usage_VM_network records for the vm network usage + Long lastVmDiskStatsId = _usageDao.getLastVmDiskStatsId(); if (lastVmDiskStatsId == null) { lastVmDiskStatsId = Long.valueOf(0); } - SearchCriteria sc4 = m_vmDiskStatsDao.createSearchCriteria(); + SearchCriteria sc4 = _vmDiskStatsDao.createSearchCriteria(); sc4.addAnd("id", SearchCriteria.Op.LTEQ, lastVmDiskStatsId); do { Filter filter = new Filter(VmDiskStatisticsVO.class, "id", true, offset, limit); - vmDiskStats = m_vmDiskStatsDao.search(sc4, filter); + vmDiskStats = _vmDiskStatsDao.search(sc4, filter); if ((vmDiskStats != null) && !vmDiskStats.isEmpty()) { // now copy the accounts to cloud_usage db - m_usageDao.updateVmDiskStats(vmDiskStats); + _usageDao.updateVmDiskStats(vmDiskStats); } offset = new Long(offset.longValue() + limit.longValue()); } while ((vmDiskStats != null) && !vmDiskStats.isEmpty()); @@ -561,16 +561,16 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna // reset offset offset = Long.valueOf(0); - sc4 = m_vmDiskStatsDao.createSearchCriteria(); + sc4 = _vmDiskStatsDao.createSearchCriteria(); sc4.addAnd("id", SearchCriteria.Op.GT, lastVmDiskStatsId); do { Filter filter = new Filter(VmDiskStatisticsVO.class, "id", true, offset, limit); - vmDiskStats = m_vmDiskStatsDao.search(sc4, filter); + vmDiskStats = _vmDiskStatsDao.search(sc4, filter); if ((vmDiskStats != null) && !vmDiskStats.isEmpty()) { // now copy the accounts to cloud_usage db - m_usageDao.saveVmDiskStats(vmDiskStats); + _usageDao.saveVmDiskStats(vmDiskStats); } offset = new Long(offset.longValue() + limit.longValue()); } while ((vmDiskStats != null) && !vmDiskStats.isEmpty()); @@ -610,9 +610,9 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna // TODO: Fetch a maximum number of user stats and process them before moving on to the next range of user stats // get user stats in order to compute network usage - networkStats = m_usageNetworkDao.getRecentNetworkStats(); + networkStats = _usageNetworkDao.getRecentNetworkStats(); - Calendar recentlyDeletedCal = Calendar.getInstance(m_usageTimezone); + Calendar recentlyDeletedCal = Calendar.getInstance(_usageTimezone); recentlyDeletedCal.setTimeInMillis(startDateMillis); recentlyDeletedCal.add(Calendar.MINUTE, -1 * THREE_DAYS_IN_MINUTES); Date recentlyDeletedDate = recentlyDeletedCal.getTime(); @@ -621,7 +621,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna Map aggregatedStats = new HashMap(); int startIndex = 0; do { - userStats = m_userStatsDao.listActiveAndRecentlyDeleted(recentlyDeletedDate, startIndex, 500); + userStats = _userStatsDao.listActiveAndRecentlyDeleted(recentlyDeletedDate, startIndex, 500); if (userStats != null) { for (UserStatisticsVO userStat : userStats) { @@ -655,20 +655,20 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna createNetworkHelperEntry(aggregatedStats.get(key), currentNetworkStats, endDateMillis); numAcctsProcessed++; } - m_usageNetworkDao.saveUsageNetworks(usageNetworks); + _usageNetworkDao.saveUsageNetworks(usageNetworks); if (s_logger.isDebugEnabled()) { s_logger.debug("created network stats helper entries for " + numAcctsProcessed + " accts"); } // get vm disk stats in order to compute vm disk usage - vmDiskUsages = m_usageVmDiskDao.getRecentVmDiskStats(); + vmDiskUsages = _usageVmDiskDao.getRecentVmDiskStats(); // Keep track of user stats for an account, across all of its public IPs Map aggregatedDiskStats = new HashMap(); startIndex = 0; do { - vmDiskStats = m_vmDiskStatsDao.listActiveAndRecentlyDeleted(recentlyDeletedDate, startIndex, 500); + vmDiskStats = _vmDiskStatsDao.listActiveAndRecentlyDeleted(recentlyDeletedDate, startIndex, 500); if (vmDiskUsages != null) { for (VmDiskStatisticsVO vmDiskStat : vmDiskStats) { @@ -704,7 +704,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna createVmDiskHelperEntry(aggregatedDiskStats.get(key), currentVmDiskStats, endDateMillis); numAcctsProcessed++; } - m_usageVmDiskDao.saveUsageVmDisks(usageVmDisks); + _usageVmDiskDao.saveUsageVmDisks(usageVmDisks); if (s_logger.isDebugEnabled()) { s_logger.debug("created vm disk stats helper entries for " + numAcctsProcessed + " accts"); @@ -721,12 +721,12 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna Date currentEndDate = endDate; Date tempDate = endDate; - Calendar aggregateCal = Calendar.getInstance(m_usageTimezone); + Calendar aggregateCal = Calendar.getInstance(_usageTimezone); while ((tempDate.after(startDate)) && ((tempDate.getTime() - startDate.getTime()) > 60000)) { currentEndDate = tempDate; aggregateCal.setTime(tempDate); - aggregateCal.add(Calendar.MINUTE, -m_aggregationDuration); + aggregateCal.add(Calendar.MINUTE, -_aggregationDuration); tempDate = aggregateCal.getTime(); } @@ -736,7 +736,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna do { Filter filter = new Filter(AccountVO.class, "id", true, offset, limit); - accounts = m_accountDao.listAll(filter); + accounts = _accountDao.listAll(filter); if ((accounts != null) && !accounts.isEmpty()) { for (AccountVO account : accounts) { parsed = parseHelperTables(account, currentStartDate, currentEndDate); @@ -757,15 +757,15 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna do { Filter filter = new Filter(AccountVO.class, "id", true, offset, limit); - accounts = m_accountDao.findRecentlyDeletedAccounts(null, recentlyDeletedDate, filter); + accounts = _accountDao.findRecentlyDeletedAccounts(null, recentlyDeletedDate, filter); if ((accounts != null) && !accounts.isEmpty()) { for (AccountVO account : accounts) { parsed = parseHelperTables(account, currentStartDate, currentEndDate); - List publicTemplates = m_usageDao.listPublicTemplatesByAccount(account.getId()); + List publicTemplates = _usageDao.listPublicTemplatesByAccount(account.getId()); for (Long templateId : publicTemplates) { //mark public templates owned by deleted accounts as deleted - List storageVOs = m_usageStorageDao.listById(account.getId(), templateId, StorageTypes.TEMPLATE); + List storageVOs = _usageStorageDao.listById(account.getId(), templateId, StorageTypes.TEMPLATE); if (storageVOs.size() > 1) { s_logger.warn("More that one usage entry for storage: " + templateId + " assigned to account: " + account.getId() + "; marking them all as deleted..."); @@ -775,7 +775,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("deleting template: " + storageVO.getId() + " from account: " + storageVO.getAccountId()); } storageVO.setDeleted(account.getRemoved()); - m_usageStorageDao.update(storageVO); + _usageStorageDao.update(storageVO); } } numAcctsProcessed++; @@ -786,7 +786,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna currentStartDate = new Date(currentEndDate.getTime() + 1); aggregateCal.setTime(currentEndDate); - aggregateCal.add(Calendar.MINUTE, m_aggregationDuration); + aggregateCal.add(Calendar.MINUTE, _aggregationDuration); currentEndDate = aggregateCal.getTime(); } @@ -806,11 +806,11 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna usageTxn.rollback(); } finally { // everything seemed to work...set endDate as the last success date - m_usageJobDao.updateJobSuccess(job.getId(), startDateMillis, endDateMillis, System.currentTimeMillis() - timeStart, success); + _usageJobDao.updateJobSuccess(job.getId(), startDateMillis, endDateMillis, System.currentTimeMillis() - timeStart, success); // create a new job if this is a recurring job if (job.getJobType() == UsageJobVO.JOB_TYPE_RECURRING) { - m_usageJobDao.createNewJob(m_hostname, m_pid, UsageJobVO.JOB_TYPE_RECURRING); + _usageJobDao.createNewJob(_hostname, _pid, UsageJobVO.JOB_TYPE_RECURRING); } usageTxn.commit(); usageTxn.close(); @@ -1032,29 +1032,29 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna String vmName = event.getResourceName(); if (EventTypes.EVENT_VM_START.equals(event.getType())) { - // create a new usage_vm_instance row for this VM + // create a new usage_VM_instance row for this VM try { - SearchCriteria sc = m_usageInstanceDao.createSearchCriteria(); + SearchCriteria sc = _usageInstanceDao.createSearchCriteria(); sc.addAnd("vmInstanceId", SearchCriteria.Op.EQ, Long.valueOf(vmId)); sc.addAnd("endDate", SearchCriteria.Op.NULL); sc.addAnd("usageType", SearchCriteria.Op.EQ, UsageTypes.RUNNING_VM); - List usageInstances = m_usageInstanceDao.search(sc, null); + List usageInstances = _usageInstanceDao.search(sc, null); if (usageInstances != null) { if (usageInstances.size() > 0) { s_logger.error("found entries for a vm running with id: " + vmId + ", which are not stopped. Ending them all..."); for (UsageVMInstanceVO usageInstance : usageInstances) { usageInstance.setEndDate(event.getCreateDate()); - m_usageInstanceDao.update(usageInstance); + _usageInstanceDao.update(usageInstance); } } } - sc = m_usageInstanceDao.createSearchCriteria(); + sc = _usageInstanceDao.createSearchCriteria(); sc.addAnd("vmInstanceId", SearchCriteria.Op.EQ, Long.valueOf(vmId)); sc.addAnd("endDate", SearchCriteria.Op.NULL); sc.addAnd("usageType", SearchCriteria.Op.EQ, UsageTypes.ALLOCATED_VM); - usageInstances = m_usageInstanceDao.search(sc, null); + usageInstances = _usageInstanceDao.search(sc, null); if (usageInstances == null || (usageInstances.size() == 0)) { s_logger.error("Cannot find allocated vm entry for a vm running with id: " + vmId); } else if (usageInstances.size() == 1) { @@ -1063,11 +1063,11 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna //Service Offering changed after Vm creation //End current Allocated usage and create new Allocated Vm entry with new soId usageInstance.setEndDate(event.getCreateDate()); - m_usageInstanceDao.update(usageInstance); + _usageInstanceDao.update(usageInstance); usageInstance.setServiceOfferingId(soId); usageInstance.setStartDate(event.getCreateDate()); usageInstance.setEndDate(null); - m_usageInstanceDao.persist(usageInstance); + _usageInstanceDao.persist(usageInstance); } } @@ -1078,18 +1078,18 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna UsageVMInstanceVO usageInstanceNew = new UsageVMInstanceVO(UsageTypes.RUNNING_VM, zoneId, event.getAccountId(), vmId, vmName, soId, templateId, hypervisorType, event.getCreateDate(), null); - m_usageInstanceDao.persist(usageInstanceNew); + _usageInstanceDao.persist(usageInstanceNew); } catch (Exception ex) { s_logger.error("Error saving usage instance for vm: " + vmId, ex); } } else if (EventTypes.EVENT_VM_STOP.equals(event.getType())) { - // find the latest usage_vm_instance row, update the stop date (should be null) to the event date + // find the latest usage_VM_instance row, update the stop date (should be null) to the event date // FIXME: search criteria needs to have some kind of type information so we distinguish between START/STOP and CREATE/DESTROY - SearchCriteria sc = m_usageInstanceDao.createSearchCriteria(); + SearchCriteria sc = _usageInstanceDao.createSearchCriteria(); sc.addAnd("vmInstanceId", SearchCriteria.Op.EQ, Long.valueOf(vmId)); sc.addAnd("endDate", SearchCriteria.Op.NULL); sc.addAnd("usageType", SearchCriteria.Op.EQ, UsageTypes.RUNNING_VM); - List usageInstances = m_usageInstanceDao.search(sc, null); + List usageInstances = _usageInstanceDao.search(sc, null); if (usageInstances != null) { if (usageInstances.size() > 1) { s_logger.warn("found multiple entries for a vm running with id: " + vmId + ", ending them all..."); @@ -1098,14 +1098,14 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna usageInstance.setEndDate(event.getCreateDate()); // TODO: UsageVMInstanceVO should have an ID field and we should do updates through that field since we are really // updating one row at a time here - m_usageInstanceDao.update(usageInstance); + _usageInstanceDao.update(usageInstance); } } } else if (EventTypes.EVENT_VM_CREATE.equals(event.getType())) { try { Long templateId = event.getTemplateId(); String hypervisorType = event.getResourceType(); - Long cpuCores= null; + Long cpuCores = null; Long memory = null; Long cpuSpeed = null; @@ -1126,7 +1126,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna // add this VM to the usage helper table UsageVMInstanceVO usageInstanceNew = new UsageVMInstanceVO(UsageTypes.ALLOCATED_VM, zoneId, event.getAccountId(), vmId, vmName, - soId, templateId, hypervisorType, event.getCreateDate(), null); + soId, templateId, hypervisorType, event.getCreateDate(), null); if (cpuCores != null) { usageInstanceNew.setCpuCores(cpuCores); } @@ -1136,38 +1136,38 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna if (memory != null) { usageInstanceNew.setMemory(memory); } - m_usageInstanceDao.persist(usageInstanceNew); + _usageInstanceDao.persist(usageInstanceNew); } catch (Exception ex) { s_logger.error("Error saving usage instance for vm: " + vmId, ex); } } else if (EventTypes.EVENT_VM_DESTROY.equals(event.getType())) { - SearchCriteria sc = m_usageInstanceDao.createSearchCriteria(); + SearchCriteria sc = _usageInstanceDao.createSearchCriteria(); sc.addAnd("vmInstanceId", SearchCriteria.Op.EQ, Long.valueOf(vmId)); sc.addAnd("endDate", SearchCriteria.Op.NULL); sc.addAnd("usageType", SearchCriteria.Op.EQ, UsageTypes.ALLOCATED_VM); - List usageInstances = m_usageInstanceDao.search(sc, null); + List usageInstances = _usageInstanceDao.search(sc, null); if (usageInstances != null) { if (usageInstances.size() > 1) { s_logger.warn("found multiple entries for a vm allocated with id: " + vmId + ", detroying them all..."); } for (UsageVMInstanceVO usageInstance : usageInstances) { usageInstance.setEndDate(event.getCreateDate()); - m_usageInstanceDao.update(usageInstance); + _usageInstanceDao.update(usageInstance); } } } else if (EventTypes.EVENT_VM_UPGRADE.equals(event.getType())) { - SearchCriteria sc = m_usageInstanceDao.createSearchCriteria(); + SearchCriteria sc = _usageInstanceDao.createSearchCriteria(); sc.addAnd("vmInstanceId", SearchCriteria.Op.EQ, Long.valueOf(vmId)); sc.addAnd("endDate", SearchCriteria.Op.NULL); sc.addAnd("usageType", SearchCriteria.Op.EQ, UsageTypes.ALLOCATED_VM); - List usageInstances = m_usageInstanceDao.search(sc, null); + List usageInstances = _usageInstanceDao.search(sc, null); if (usageInstances != null) { if (usageInstances.size() > 1) { s_logger.warn("found multiple entries for a vm allocated with id: " + vmId + ", updating end_date for all of them..."); } for (UsageVMInstanceVO usageInstance : usageInstances) { usageInstance.setEndDate(event.getCreateDate()); - m_usageInstanceDao.update(usageInstance); + _usageInstanceDao.update(usageInstance); } } @@ -1176,29 +1176,29 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna // add this VM to the usage helper table UsageVMInstanceVO usageInstanceNew = new UsageVMInstanceVO(UsageTypes.ALLOCATED_VM, zoneId, event.getAccountId(), vmId, vmName, soId, templateId, hypervisorType, event.getCreateDate(), null); - m_usageInstanceDao.persist(usageInstanceNew); + _usageInstanceDao.persist(usageInstanceNew); } else if (EventTypes.EVENT_VM_DYNAMIC_SCALE.equals(event.getType())) { // Ending the running vm event - SearchCriteria sc = m_usageInstanceDao.createSearchCriteria(); + SearchCriteria sc = _usageInstanceDao.createSearchCriteria(); sc.addAnd("vmInstanceId", SearchCriteria.Op.EQ, Long.valueOf(vmId)); sc.addAnd("endDate", SearchCriteria.Op.NULL); sc.addAnd("usageType", SearchCriteria.Op.EQ, UsageTypes.RUNNING_VM); - List usageInstances = m_usageInstanceDao.search(sc, null); + List usageInstances = _usageInstanceDao.search(sc, null); if (usageInstances != null) { if (usageInstances.size() > 1) { s_logger.warn("found multiple entries for a vm running with id: " + vmId + ", ending them all..."); } for (UsageVMInstanceVO usageInstance : usageInstances) { usageInstance.setEndDate(event.getCreateDate()); - m_usageInstanceDao.update(usageInstance); + _usageInstanceDao.update(usageInstance); } } - sc = m_usageInstanceDao.createSearchCriteria(); + sc = _usageInstanceDao.createSearchCriteria(); sc.addAnd("vmInstanceId", SearchCriteria.Op.EQ, Long.valueOf(vmId)); sc.addAnd("endDate", SearchCriteria.Op.NULL); sc.addAnd("usageType", SearchCriteria.Op.EQ, UsageTypes.ALLOCATED_VM); - usageInstances = m_usageInstanceDao.search(sc, null); + usageInstances = _usageInstanceDao.search(sc, null); if (usageInstances == null || (usageInstances.size() == 0)) { s_logger.error("Cannot find allocated vm entry for a vm running with id: " + vmId); } else if (usageInstances.size() == 1) { @@ -1207,11 +1207,11 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna //Service Offering changed after Vm creation //End current Allocated usage and create new Allocated Vm entry with new soId usageInstance.setEndDate(event.getCreateDate()); - m_usageInstanceDao.update(usageInstance); + _usageInstanceDao.update(usageInstance); usageInstance.setServiceOfferingId(soId); usageInstance.setStartDate(event.getCreateDate()); usageInstance.setEndDate(null); - m_usageInstanceDao.persist(usageInstance); + _usageInstanceDao.persist(usageInstance); } } @@ -1221,7 +1221,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna // add this VM to the usage helper table with new service offering Id UsageVMInstanceVO usageInstanceNew = new UsageVMInstanceVO(UsageTypes.RUNNING_VM, zoneId, event.getAccountId(), vmId, vmName, soId, templateId, hypervisorType, event.getCreateDate(), null); - m_usageInstanceDao.persist(usageInstanceNew); + _usageInstanceDao.persist(usageInstanceNew); } } @@ -1335,7 +1335,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna if (s_logger.isDebugEnabled()) { s_logger.debug("assigning ip address: " + ipAddress + " to account: " + event.getAccountId()); } - Account acct = m_accountDao.findByIdIncludingRemoved(event.getAccountId()); + Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId()); long zoneId = event.getZoneId(); long id = event.getResourceId(); long sourceNat = event.getSize(); @@ -1343,13 +1343,13 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna boolean isSystem = (event.getTemplateId() == null || event.getTemplateId() == 0) ? false : true; UsageIPAddressVO ipAddressVO = new UsageIPAddressVO(id, event.getAccountId(), acct.getDomainId(), zoneId, ipAddress, isSourceNat, isSystem, event.getCreateDate(), null); - m_usageIPAddressDao.persist(ipAddressVO); + _usageIPAddressDao.persist(ipAddressVO); } else if (EventTypes.EVENT_NET_IP_RELEASE.equals(event.getType())) { - SearchCriteria sc = m_usageIPAddressDao.createSearchCriteria(); + SearchCriteria sc = _usageIPAddressDao.createSearchCriteria(); sc.addAnd("accountId", SearchCriteria.Op.EQ, event.getAccountId()); sc.addAnd("address", SearchCriteria.Op.EQ, ipAddress); sc.addAnd("released", SearchCriteria.Op.NULL); - List ipAddressVOs = m_usageIPAddressDao.search(sc, null); + List ipAddressVOs = _usageIPAddressDao.search(sc, null); if (ipAddressVOs.size() > 1) { s_logger.warn("More that one usage entry for ip address: " + ipAddress + " assigned to account: " + event.getAccountId() + "; marking them all as released..."); @@ -1359,7 +1359,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("releasing ip address: " + ipAddressVO.getAddress() + " from account: " + ipAddressVO.getAccountId()); } ipAddressVO.setReleased(event.getCreateDate()); // there really shouldn't be more than one - m_usageIPAddressDao.update(ipAddressVO); + _usageIPAddressDao.update(ipAddressVO); } } } @@ -1380,11 +1380,11 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna } if (EventTypes.EVENT_VOLUME_CREATE.equals(event.getType())) { - SearchCriteria sc = m_usageVolumeDao.createSearchCriteria(); + SearchCriteria sc = _usageVolumeDao.createSearchCriteria(); sc.addAnd("accountId", SearchCriteria.Op.EQ, event.getAccountId()); sc.addAnd("id", SearchCriteria.Op.EQ, volId); sc.addAnd("deleted", SearchCriteria.Op.NULL); - List volumesVOs = m_usageVolumeDao.search(sc, null); + List volumesVOs = _usageVolumeDao.search(sc, null); if (volumesVOs.size() > 0) { //This is a safeguard to avoid double counting of volumes. s_logger.error("Found duplicate usage entry for volume: " + volId + " assigned to account: " + event.getAccountId() + "; marking as deleted..."); @@ -1394,20 +1394,20 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("deleting volume: " + volumesVO.getId() + " from account: " + volumesVO.getAccountId()); } volumesVO.setDeleted(event.getCreateDate()); - m_usageVolumeDao.update(volumesVO); + _usageVolumeDao.update(volumesVO); } if (s_logger.isDebugEnabled()) { s_logger.debug("create volume with id : " + volId + " for account: " + event.getAccountId()); } - Account acct = m_accountDao.findByIdIncludingRemoved(event.getAccountId()); + Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId()); UsageVolumeVO volumeVO = new UsageVolumeVO(volId, zoneId, event.getAccountId(), acct.getDomainId(), doId, templateId, size, event.getCreateDate(), null); - m_usageVolumeDao.persist(volumeVO); + _usageVolumeDao.persist(volumeVO); } else if (EventTypes.EVENT_VOLUME_DELETE.equals(event.getType())) { - SearchCriteria sc = m_usageVolumeDao.createSearchCriteria(); + SearchCriteria sc = _usageVolumeDao.createSearchCriteria(); sc.addAnd("accountId", SearchCriteria.Op.EQ, event.getAccountId()); sc.addAnd("id", SearchCriteria.Op.EQ, volId); sc.addAnd("deleted", SearchCriteria.Op.NULL); - List volumesVOs = m_usageVolumeDao.search(sc, null); + List volumesVOs = _usageVolumeDao.search(sc, null); if (volumesVOs.size() > 1) { s_logger.warn("More that one usage entry for volume: " + volId + " assigned to account: " + event.getAccountId() + "; marking them all as deleted..."); } @@ -1416,7 +1416,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("deleting volume: " + volumesVO.getId() + " from account: " + volumesVO.getAccountId()); } volumesVO.setDeleted(event.getCreateDate()); // there really shouldn't be more than one - m_usageVolumeDao.update(volumesVO); + _usageVolumeDao.update(volumesVO); } } } @@ -1445,22 +1445,22 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna if (s_logger.isDebugEnabled()) { s_logger.debug("create template with id : " + templateId + " for account: " + event.getAccountId()); } - List storageVOs = m_usageStorageDao.listByIdAndZone(event.getAccountId(), templateId, StorageTypes.TEMPLATE, zoneId); + List storageVOs = _usageStorageDao.listByIdAndZone(event.getAccountId(), templateId, StorageTypes.TEMPLATE, zoneId); if (storageVOs.size() > 0) { s_logger.warn("Usage entry for Template: " + templateId + " assigned to account: " + event.getAccountId() + "already exists in zone " + zoneId); return; } - Account acct = m_accountDao.findByIdIncludingRemoved(event.getAccountId()); + Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId()); UsageStorageVO storageVO = new UsageStorageVO(templateId, zoneId, event.getAccountId(), acct.getDomainId(), StorageTypes.TEMPLATE, event.getTemplateId(), templateSize, event.getVirtualSize(), event.getCreateDate(), null); - m_usageStorageDao.persist(storageVO); + _usageStorageDao.persist(storageVO); } else if (EventTypes.EVENT_TEMPLATE_DELETE.equals(event.getType())) { List storageVOs; if (zoneId != -1L) { - storageVOs = m_usageStorageDao.listByIdAndZone(event.getAccountId(), templateId, StorageTypes.TEMPLATE, zoneId); + storageVOs = _usageStorageDao.listByIdAndZone(event.getAccountId(), templateId, StorageTypes.TEMPLATE, zoneId); } else { - storageVOs = m_usageStorageDao.listById(event.getAccountId(), templateId, StorageTypes.TEMPLATE); + storageVOs = _usageStorageDao.listById(event.getAccountId(), templateId, StorageTypes.TEMPLATE); } if (storageVOs.size() > 1) { s_logger.warn("More that one usage entry for storage: " + templateId + " assigned to account: " + event.getAccountId() + @@ -1471,7 +1471,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("deleting template: " + storageVO.getId() + " from account: " + storageVO.getAccountId()); } storageVO.setDeleted(event.getCreateDate()); // there really shouldn't be more than one - m_usageStorageDao.update(storageVO); + _usageStorageDao.update(storageVO); } } } @@ -1489,21 +1489,21 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna if (s_logger.isDebugEnabled()) { s_logger.debug("create iso with id : " + isoId + " for account: " + event.getAccountId()); } - List storageVOs = m_usageStorageDao.listByIdAndZone(event.getAccountId(), isoId, StorageTypes.ISO, zoneId); + List storageVOs = _usageStorageDao.listByIdAndZone(event.getAccountId(), isoId, StorageTypes.ISO, zoneId); if (storageVOs.size() > 0) { s_logger.warn("Usage entry for ISO: " + isoId + " assigned to account: " + event.getAccountId() + "already exists in zone " + zoneId); return; } - Account acct = m_accountDao.findByIdIncludingRemoved(event.getAccountId()); + Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId()); UsageStorageVO storageVO = new UsageStorageVO(isoId, zoneId, event.getAccountId(), acct.getDomainId(), StorageTypes.ISO, null, isoSize, isoSize, event.getCreateDate(), null); - m_usageStorageDao.persist(storageVO); + _usageStorageDao.persist(storageVO); } else if (EventTypes.EVENT_ISO_DELETE.equals(event.getType())) { List storageVOs; if (zoneId != -1L) { - storageVOs = m_usageStorageDao.listByIdAndZone(event.getAccountId(), isoId, StorageTypes.ISO, zoneId); + storageVOs = _usageStorageDao.listByIdAndZone(event.getAccountId(), isoId, StorageTypes.ISO, zoneId); } else { - storageVOs = m_usageStorageDao.listById(event.getAccountId(), isoId, StorageTypes.ISO); + storageVOs = _usageStorageDao.listById(event.getAccountId(), isoId, StorageTypes.ISO); } if (storageVOs.size() > 1) { @@ -1514,7 +1514,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("deleting iso: " + storageVO.getId() + " from account: " + storageVO.getAccountId()); } storageVO.setDeleted(event.getCreateDate()); // there really shouldn't be more than one - m_usageStorageDao.update(storageVO); + _usageStorageDao.update(storageVO); } } } @@ -1533,12 +1533,12 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna if (s_logger.isDebugEnabled()) { s_logger.debug("create snapshot with id : " + snapId + " for account: " + event.getAccountId()); } - Account acct = m_accountDao.findByIdIncludingRemoved(event.getAccountId()); + Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId()); UsageStorageVO storageVO = new UsageStorageVO(snapId, zoneId, event.getAccountId(), acct.getDomainId(), StorageTypes.SNAPSHOT, null, snapSize, event.getCreateDate(), null); - m_usageStorageDao.persist(storageVO); + _usageStorageDao.persist(storageVO); } else if (EventTypes.EVENT_SNAPSHOT_DELETE.equals(event.getType())) { - List storageVOs = m_usageStorageDao.listById(event.getAccountId(), snapId, StorageTypes.SNAPSHOT); + List storageVOs = _usageStorageDao.listById(event.getAccountId(), snapId, StorageTypes.SNAPSHOT); if (storageVOs.size() > 1) { s_logger.warn("More that one usage entry for storage: " + snapId + " assigned to account: " + event.getAccountId() + "; marking them all as deleted..."); } @@ -1547,7 +1547,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("deleting snapshot: " + storageVO.getId() + " from account: " + storageVO.getAccountId()); } storageVO.setDeleted(event.getCreateDate()); // there really shouldn't be more than one - m_usageStorageDao.update(storageVO); + _usageStorageDao.update(storageVO); } } } @@ -1563,15 +1563,15 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("Creating load balancer : " + id + " for account: " + event.getAccountId()); } zoneId = event.getZoneId(); - Account acct = m_accountDao.findByIdIncludingRemoved(event.getAccountId()); + Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId()); UsageLoadBalancerPolicyVO lbVO = new UsageLoadBalancerPolicyVO(id, zoneId, event.getAccountId(), acct.getDomainId(), event.getCreateDate(), null); - m_usageLoadBalancerPolicyDao.persist(lbVO); + _usageLoadBalancerPolicyDao.persist(lbVO); } else if (EventTypes.EVENT_LOAD_BALANCER_DELETE.equals(event.getType())) { - SearchCriteria sc = m_usageLoadBalancerPolicyDao.createSearchCriteria(); + SearchCriteria sc = _usageLoadBalancerPolicyDao.createSearchCriteria(); sc.addAnd("accountId", SearchCriteria.Op.EQ, event.getAccountId()); sc.addAnd("id", SearchCriteria.Op.EQ, id); sc.addAnd("deleted", SearchCriteria.Op.NULL); - List lbVOs = m_usageLoadBalancerPolicyDao.search(sc, null); + List lbVOs = _usageLoadBalancerPolicyDao.search(sc, null); if (lbVOs.size() > 1) { s_logger.warn("More that one usage entry for load balancer policy: " + id + " assigned to account: " + event.getAccountId() + "; marking them all as deleted..."); @@ -1581,7 +1581,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("deleting load balancer policy: " + lbVO.getId() + " from account: " + lbVO.getAccountId()); } lbVO.setDeleted(event.getCreateDate()); // there really shouldn't be more than one - m_usageLoadBalancerPolicyDao.update(lbVO); + _usageLoadBalancerPolicyDao.update(lbVO); } } } @@ -1597,15 +1597,15 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("Creating port forwarding rule : " + id + " for account: " + event.getAccountId()); } zoneId = event.getZoneId(); - Account acct = m_accountDao.findByIdIncludingRemoved(event.getAccountId()); + Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId()); UsagePortForwardingRuleVO pfVO = new UsagePortForwardingRuleVO(id, zoneId, event.getAccountId(), acct.getDomainId(), event.getCreateDate(), null); - m_usagePortForwardingRuleDao.persist(pfVO); + _usagePortForwardingRuleDao.persist(pfVO); } else if (EventTypes.EVENT_NET_RULE_DELETE.equals(event.getType())) { - SearchCriteria sc = m_usagePortForwardingRuleDao.createSearchCriteria(); + SearchCriteria sc = _usagePortForwardingRuleDao.createSearchCriteria(); sc.addAnd("accountId", SearchCriteria.Op.EQ, event.getAccountId()); sc.addAnd("id", SearchCriteria.Op.EQ, id); sc.addAnd("deleted", SearchCriteria.Op.NULL); - List pfVOs = m_usagePortForwardingRuleDao.search(sc, null); + List pfVOs = _usagePortForwardingRuleDao.search(sc, null); if (pfVOs.size() > 1) { s_logger.warn("More that one usage entry for port forwarding rule: " + id + " assigned to account: " + event.getAccountId() + "; marking them all as deleted..."); @@ -1615,7 +1615,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("deleting port forwarding rule: " + pfVO.getId() + " from account: " + pfVO.getAccountId()); } pfVO.setDeleted(event.getCreateDate()); // there really shouldn't be more than one - m_usagePortForwardingRuleDao.update(pfVO); + _usagePortForwardingRuleDao.update(pfVO); } } } @@ -1638,19 +1638,19 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("Creating networking offering: " + networkOfferingId + " for Vm: " + vmId + " for account: " + event.getAccountId()); } zoneId = event.getZoneId(); - Account acct = m_accountDao.findByIdIncludingRemoved(event.getAccountId()); + Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId()); boolean isDefault = (event.getSize() == 1) ? true : false; UsageNetworkOfferingVO networkOffering = new UsageNetworkOfferingVO(zoneId, event.getAccountId(), acct.getDomainId(), vmId, networkOfferingId, nicId, isDefault, event.getCreateDate(), null); - m_usageNetworkOfferingDao.persist(networkOffering); + _usageNetworkOfferingDao.persist(networkOffering); } else if (EventTypes.EVENT_NETWORK_OFFERING_DELETE.equals(event.getType()) || EventTypes.EVENT_NETWORK_OFFERING_REMOVE.equals(event.getType())) { - SearchCriteria sc = m_usageNetworkOfferingDao.createSearchCriteria(); + SearchCriteria sc = _usageNetworkOfferingDao.createSearchCriteria(); sc.addAnd("accountId", SearchCriteria.Op.EQ, event.getAccountId()); sc.addAnd("vmInstanceId", SearchCriteria.Op.EQ, vmId); sc.addAnd("nicId", SearchCriteria.Op.EQ, nicId); sc.addAnd("networkOfferingId", SearchCriteria.Op.EQ, networkOfferingId); sc.addAnd("deleted", SearchCriteria.Op.NULL); - List noVOs = m_usageNetworkOfferingDao.search(sc, null); + List noVOs = _usageNetworkOfferingDao.search(sc, null); if (noVOs.size() > 1) { s_logger.warn("More that one usage entry for networking offering: " + networkOfferingId + " for Vm: " + vmId + " assigned to account: " + event.getAccountId() + "; marking them all as deleted..."); @@ -1660,7 +1660,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("deleting network offering: " + noVO.getNetworkOfferingId() + " from Vm: " + noVO.getVmInstanceId()); } noVO.setDeleted(event.getCreateDate()); // there really shouldn't be more than one - m_usageNetworkOfferingDao.update(noVO); + _usageNetworkOfferingDao.update(noVO); } } } @@ -1675,16 +1675,16 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna if (s_logger.isDebugEnabled()) { s_logger.debug("Creating VPN user: " + userId + " for account: " + event.getAccountId()); } - Account acct = m_accountDao.findByIdIncludingRemoved(event.getAccountId()); + Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId()); String userName = event.getResourceName(); UsageVPNUserVO vpnUser = new UsageVPNUserVO(zoneId, event.getAccountId(), acct.getDomainId(), userId, userName, event.getCreateDate(), null); - m_usageVPNUserDao.persist(vpnUser); + _usageVPNUserDao.persist(vpnUser); } else if (EventTypes.EVENT_VPN_USER_REMOVE.equals(event.getType())) { - SearchCriteria sc = m_usageVPNUserDao.createSearchCriteria(); + SearchCriteria sc = _usageVPNUserDao.createSearchCriteria(); sc.addAnd("accountId", SearchCriteria.Op.EQ, event.getAccountId()); sc.addAnd("userId", SearchCriteria.Op.EQ, userId); sc.addAnd("deleted", SearchCriteria.Op.NULL); - List vuVOs = m_usageVPNUserDao.search(sc, null); + List vuVOs = _usageVPNUserDao.search(sc, null); if (vuVOs.size() > 1) { s_logger.warn("More that one usage entry for vpn user: " + userId + " assigned to account: " + event.getAccountId() + "; marking them all as deleted..."); } @@ -1693,7 +1693,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("deleting vpn user: " + vuVO.getUserId()); } vuVO.setDeleted(event.getCreateDate()); // there really shouldn't be more than one - m_usageVPNUserDao.update(vuVO); + _usageVPNUserDao.update(vuVO); } } } @@ -1710,16 +1710,16 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("Assigning : security group" + sgId + " to Vm: " + vmId + " for account: " + event.getAccountId()); } zoneId = event.getZoneId(); - Account acct = m_accountDao.findByIdIncludingRemoved(event.getAccountId()); + Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId()); UsageSecurityGroupVO securityGroup = new UsageSecurityGroupVO(zoneId, event.getAccountId(), acct.getDomainId(), vmId, sgId, event.getCreateDate(), null); - m_usageSecurityGroupDao.persist(securityGroup); + _usageSecurityGroupDao.persist(securityGroup); } else if (EventTypes.EVENT_SECURITY_GROUP_REMOVE.equals(event.getType())) { - SearchCriteria sc = m_usageSecurityGroupDao.createSearchCriteria(); + SearchCriteria sc = _usageSecurityGroupDao.createSearchCriteria(); sc.addAnd("accountId", SearchCriteria.Op.EQ, event.getAccountId()); sc.addAnd("vmInstanceId", SearchCriteria.Op.EQ, vmId); sc.addAnd("securityGroupId", SearchCriteria.Op.EQ, sgId); sc.addAnd("deleted", SearchCriteria.Op.NULL); - List sgVOs = m_usageSecurityGroupDao.search(sc, null); + List sgVOs = _usageSecurityGroupDao.search(sc, null); if (sgVOs.size() > 1) { s_logger.warn("More that one usage entry for security group: " + sgId + " for Vm: " + vmId + " assigned to account: " + event.getAccountId() + "; marking them all as deleted..."); @@ -1729,7 +1729,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna s_logger.debug("deleting security group: " + sgVO.getSecurityGroupId() + " from Vm: " + sgVO.getVmInstanceId()); } sgVO.setDeleted(event.getCreateDate()); // there really shouldn't be more than one - m_usageSecurityGroupDao.update(sgVO); + _usageSecurityGroupDao.update(sgVO); } } } @@ -1742,10 +1742,10 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna Long accountId = event.getAccountId(); long size = event.getSize(); Date created = event.getCreateDate(); - Account acct = m_accountDao.findByIdIncludingRemoved(event.getAccountId()); + Account acct = _accountDao.findByIdIncludingRemoved(event.getAccountId()); Long domainId = acct.getDomainId(); UsageVMSnapshotVO vsVO = new UsageVMSnapshotVO(volumeId, zoneId, accountId, domainId, vmId, offeringId, size, created, null); - m_usageVMSnapshotDao.persist(vsVO); + _usageVMSnapshotDao.persist(vsVO); } private class Heartbeat extends ManagedContextRunnable { @@ -1753,7 +1753,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna protected void runInContext() { TransactionLegacy usageTxn = TransactionLegacy.open(TransactionLegacy.USAGE_DB); try { - if (!m_heartbeatLock.lock(3)) { // 3 second timeout + if (!_heartbeatLock.lock(3)) { // 3 second timeout if (s_logger.isTraceEnabled()) s_logger.trace("Heartbeat lock is in use by others, returning true as someone else will take over the job if required"); return; @@ -1761,24 +1761,24 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna try { // check for one-off jobs - UsageJobVO nextJob = m_usageJobDao.getNextImmediateJob(); + UsageJobVO nextJob = _usageJobDao.getNextImmediateJob(); if (nextJob != null) { - if (m_hostname.equals(nextJob.getHost()) && (m_pid == nextJob.getPid().intValue())) { + if (_hostname.equals(nextJob.getHost()) && (_pid == nextJob.getPid().intValue())) { updateJob(nextJob.getId(), null, null, null, UsageJobVO.JOB_SCHEDULED); scheduleParse(); } } - Long jobId = m_usageJobDao.checkHeartbeat(m_hostname, m_pid, m_aggregationDuration); + Long jobId = _usageJobDao.checkHeartbeat(_hostname, _pid, _aggregationDuration); if (jobId != null) { // if I'm taking over the job...see how long it's been since the last job, and if it's more than the // aggregation range...do a one off job to catch up. However, only do this if we are more than half // the aggregation range away from executing the next job long now = System.currentTimeMillis(); - long timeToJob = m_jobExecTime.getTimeInMillis() - now; + long timeToJob = _jobExecTime.getTimeInMillis() - now; long timeSinceJob = 0; - long aggregationDurationMillis = m_aggregationDuration * 60 * 1000; - long lastSuccess = m_usageJobDao.getLastJobSuccessDateMillis(); + long aggregationDurationMillis = _aggregationDuration * 60 * 1000; + long lastSuccess = _usageJobDao.getLastJobSuccessDateMillis(); if (lastSuccess > 0) { timeSinceJob = now - lastSuccess; } @@ -1787,19 +1787,19 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna if (timeToJob > (aggregationDurationMillis / 2)) { if (s_logger.isDebugEnabled()) { s_logger.debug("it's been " + timeSinceJob + " ms since last usage job and " + timeToJob + - " ms until next job, scheduling an immediate job to catch up (aggregation duration is " + m_aggregationDuration + " minutes)"); + " ms until next job, scheduling an immediate job to catch up (aggregation duration is " + _aggregationDuration + " minutes)"); } scheduleParse(); } } - boolean changeOwner = updateJob(jobId, m_hostname, Integer.valueOf(m_pid), new Date(), UsageJobVO.JOB_NOT_SCHEDULED); + boolean changeOwner = updateJob(jobId, _hostname, Integer.valueOf(_pid), new Date(), UsageJobVO.JOB_NOT_SCHEDULED); if (changeOwner) { - deleteOneOffJobs(m_hostname, m_pid); + deleteOneOffJobs(_hostname, _pid); } } } finally { - m_heartbeatLock.unlock(); + _heartbeatLock.unlock(); } } catch (Exception ex) { s_logger.error("error in heartbeat", ex); @@ -1816,12 +1816,12 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna txn.start(); // take over the job, setting our hostname/pid/heartbeat time - UsageJobVO job = m_usageJobDao.lockRow(jobId, Boolean.TRUE); + UsageJobVO job = _usageJobDao.lockRow(jobId, Boolean.TRUE); if (!job.getHost().equals(hostname) || !job.getPid().equals(pid)) { changeOwner = true; } - UsageJobVO jobForUpdate = m_usageJobDao.createForUpdate(); + UsageJobVO jobForUpdate = _usageJobDao.createForUpdate(); if (hostname != null) { jobForUpdate.setHost(hostname); } @@ -1832,7 +1832,7 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna jobForUpdate.setHeartbeat(heartbeat); } jobForUpdate.setScheduled(scheduled); - m_usageJobDao.update(job.getId(), jobForUpdate); + _usageJobDao.update(job.getId(), jobForUpdate); txn.commit(); } catch (Exception dbEx) { @@ -1844,15 +1844,15 @@ public class UsageManagerImpl extends ManagerBase implements UsageManager, Runna @DB protected void deleteOneOffJobs(String hostname, int pid) { - SearchCriteria sc = m_usageJobDao.createSearchCriteria(); - SearchCriteria ssc = m_usageJobDao.createSearchCriteria(); + SearchCriteria sc = _usageJobDao.createSearchCriteria(); + SearchCriteria ssc = _usageJobDao.createSearchCriteria(); ssc.addOr("host", SearchCriteria.Op.NEQ, hostname); ssc.addOr("pid", SearchCriteria.Op.NEQ, pid); sc.addAnd("host", SearchCriteria.Op.SC, ssc); sc.addAnd("endMillis", SearchCriteria.Op.EQ, Long.valueOf(0)); sc.addAnd("jobType", SearchCriteria.Op.EQ, Integer.valueOf(UsageJobVO.JOB_TYPE_SINGLE)); sc.addAnd("scheduled", SearchCriteria.Op.EQ, Integer.valueOf(0)); - m_usageJobDao.expunge(sc); + _usageJobDao.expunge(sc); } } diff --git a/usage/src/com/cloud/usage/parser/IPAddressUsageParser.java b/usage/src/com/cloud/usage/parser/IPAddressUsageParser.java index 6715bc84245..adeff01dae4 100644 --- a/usage/src/com/cloud/usage/parser/IPAddressUsageParser.java +++ b/usage/src/com/cloud/usage/parser/IPAddressUsageParser.java @@ -41,8 +41,8 @@ import com.cloud.utils.Pair; public class IPAddressUsageParser { public static final Logger s_logger = Logger.getLogger(IPAddressUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsageIPAddressDao m_usageIPAddressDao; + private static UsageDao s_usageDao; + private static UsageIPAddressDao s_usageIPAddressDao; @Inject private UsageDao _usageDao; @@ -51,8 +51,8 @@ public class IPAddressUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usageIPAddressDao = _usageIPAddressDao; + s_usageDao = _usageDao; + s_usageIPAddressDao = _usageIPAddressDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -68,7 +68,7 @@ public class IPAddressUsageParser { // - look for an entry for accountId with end date in the given range // - look for an entry for accountId with end date null (currently running vm or owned IP) // - look for an entry for accountId with start date before given range *and* end date after given range - List usageIPAddress = m_usageIPAddressDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate); + List usageIPAddress = s_usageIPAddressDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate); if (usageIPAddress.isEmpty()) { s_logger.debug("No IP Address usage for this period"); @@ -132,7 +132,7 @@ public class IPAddressUsageParser { usageDataMap.put(key, ipUsageInfo); } - private static void createUsageRecord(long zoneId, long runningTime, Date startDate, Date endDate, AccountVO account, long IpId, String IPAddress, + private static void createUsageRecord(long zoneId, long runningTime, Date startDate, Date endDate, AccountVO account, long ipId, String ipAddress, boolean isSourceNat, boolean isSystem) { if (s_logger.isDebugEnabled()) { s_logger.debug("Total usage time " + runningTime + "ms"); @@ -144,31 +144,31 @@ public class IPAddressUsageParser { String usageDisplay = dFormat.format(usage); if (s_logger.isDebugEnabled()) { - s_logger.debug("Creating IP usage record with id: " + IpId + ", usage: " + usageDisplay + ", startDate: " + startDate + ", endDate: " + endDate + + s_logger.debug("Creating IP usage record with id: " + ipId + ", usage: " + usageDisplay + ", startDate: " + startDate + ", endDate: " + endDate + ", for account: " + account.getId()); } - String usageDesc = "IPAddress: " + IPAddress; + String usageDesc = "IPAddress: " + ipAddress; // Create the usage record UsageVO usageRecord = - new UsageVO(zoneId, account.getAccountId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", UsageTypes.IP_ADDRESS, new Double(usage), IpId, + new UsageVO(zoneId, account.getAccountId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", UsageTypes.IP_ADDRESS, new Double(usage), ipId, (isSystem ? 1 : 0), (isSourceNat ? "SourceNat" : ""), startDate, endDate); - m_usageDao.persist(usageRecord); + s_usageDao.persist(usageRecord); } private static class IpInfo { private long zoneId; - private long IpId; - private String IPAddress; + private long ipId; + private String ipAddress; private boolean isSourceNat; private boolean isSystem; - public IpInfo(long zoneId, long IpId, String IPAddress, boolean isSourceNat, boolean isSystem) { + public IpInfo(long zoneId, long ipId, String ipAddress, boolean isSourceNat, boolean isSystem) { this.zoneId = zoneId; - this.IpId = IpId; - this.IPAddress = IPAddress; + this.ipId = ipId; + this.ipAddress = ipAddress; this.isSourceNat = isSourceNat; this.isSystem = isSystem; } @@ -178,11 +178,11 @@ public class IPAddressUsageParser { } public long getIpId() { - return IpId; + return ipId; } public String getIPAddress() { - return IPAddress; + return ipAddress; } public boolean isSourceNat() { diff --git a/usage/src/com/cloud/usage/parser/LoadBalancerUsageParser.java b/usage/src/com/cloud/usage/parser/LoadBalancerUsageParser.java index 387cae3606d..1b813b7a845 100644 --- a/usage/src/com/cloud/usage/parser/LoadBalancerUsageParser.java +++ b/usage/src/com/cloud/usage/parser/LoadBalancerUsageParser.java @@ -41,8 +41,8 @@ import com.cloud.utils.Pair; public class LoadBalancerUsageParser { public static final Logger s_logger = Logger.getLogger(LoadBalancerUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsageLoadBalancerPolicyDao m_usageLoadBalancerPolicyDao; + private static UsageDao s_usageDao; + private static UsageLoadBalancerPolicyDao s_usageLoadBalancerPolicyDao; @Inject private UsageDao _usageDao; @@ -51,8 +51,8 @@ public class LoadBalancerUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usageLoadBalancerPolicyDao = _usageLoadBalancerPolicyDao; + s_usageDao = _usageDao; + s_usageLoadBalancerPolicyDao = _usageLoadBalancerPolicyDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -68,7 +68,7 @@ public class LoadBalancerUsageParser { // - look for an entry for accountId with end date in the given range // - look for an entry for accountId with end date null (currently running vm or owned IP) // - look for an entry for accountId with start date before given range *and* end date after given range - List usageLBs = m_usageLoadBalancerPolicyDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); + List usageLBs = s_usageLoadBalancerPolicyDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); if (usageLBs.isEmpty()) { s_logger.debug("No load balancer usage events for this period"); @@ -152,7 +152,7 @@ public class LoadBalancerUsageParser { UsageVO usageRecord = new UsageVO(zoneId, account.getId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", type, new Double(usage), null, null, null, null, lbId, null, startDate, endDate); - m_usageDao.persist(usageRecord); + s_usageDao.persist(usageRecord); } private static class LBInfo { diff --git a/usage/src/com/cloud/usage/parser/NetworkOfferingUsageParser.java b/usage/src/com/cloud/usage/parser/NetworkOfferingUsageParser.java index 6aa61d6f608..4a5a1d2e58c 100644 --- a/usage/src/com/cloud/usage/parser/NetworkOfferingUsageParser.java +++ b/usage/src/com/cloud/usage/parser/NetworkOfferingUsageParser.java @@ -41,8 +41,8 @@ import com.cloud.utils.Pair; public class NetworkOfferingUsageParser { public static final Logger s_logger = Logger.getLogger(NetworkOfferingUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsageNetworkOfferingDao m_usageNetworkOfferingDao; + private static UsageDao s_usageDao; + private static UsageNetworkOfferingDao s_usageNetworkOfferingDao; @Inject private UsageDao _usageDao; @@ -51,8 +51,8 @@ public class NetworkOfferingUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usageNetworkOfferingDao = _usageNetworkOfferingDao; + s_usageDao = _usageDao; + s_usageNetworkOfferingDao = _usageNetworkOfferingDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -68,7 +68,7 @@ public class NetworkOfferingUsageParser { // - look for an entry for accountId with end date in the given range // - look for an entry for accountId with end date null (currently running vm or owned IP) // - look for an entry for accountId with start date before given range *and* end date after given range - List usageNOs = m_usageNetworkOfferingDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); + List usageNOs = s_usageNetworkOfferingDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); if (usageNOs.isEmpty()) { s_logger.debug("No NetworkOffering usage events for this period"); @@ -154,14 +154,14 @@ public class NetworkOfferingUsageParser { UsageVO usageRecord = new UsageVO(zoneId, account.getId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", type, new Double(usage), vmId, null, noId, null, defaultNic, null, startDate, endDate); - m_usageDao.persist(usageRecord); + s_usageDao.persist(usageRecord); } private static class NOInfo { - private long vmId; - private long zoneId; - private long noId; - private boolean isDefault; + private final long vmId; + private final long zoneId; + private final long noId; + private final boolean isDefault; public NOInfo(long vmId, long zoneId, long noId, boolean isDefault) { this.vmId = vmId; diff --git a/usage/src/com/cloud/usage/parser/NetworkUsageParser.java b/usage/src/com/cloud/usage/parser/NetworkUsageParser.java index 5dec1e01420..a54cb3e466b 100644 --- a/usage/src/com/cloud/usage/parser/NetworkUsageParser.java +++ b/usage/src/com/cloud/usage/parser/NetworkUsageParser.java @@ -41,8 +41,8 @@ import com.cloud.utils.db.SearchCriteria; public class NetworkUsageParser { public static final Logger s_logger = Logger.getLogger(NetworkUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsageNetworkDao m_usageNetworkDao; + private static UsageDao s_usageDao; + private static UsageNetworkDao s_usageNetworkDao; @Inject private UsageDao _usageDao; @@ -51,8 +51,8 @@ public class NetworkUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usageNetworkDao = _usageNetworkDao; + s_usageDao = _usageDao; + s_usageNetworkDao = _usageNetworkDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -66,10 +66,10 @@ public class NetworkUsageParser { // - query usage_network table for all entries for userId with // event_date in the given range - SearchCriteria sc = m_usageNetworkDao.createSearchCriteria(); + SearchCriteria sc = s_usageNetworkDao.createSearchCriteria(); sc.addAnd("accountId", SearchCriteria.Op.EQ, account.getId()); sc.addAnd("eventTimeMillis", SearchCriteria.Op.BETWEEN, startDate.getTime(), endDate.getTime()); - List usageNetworkVOs = m_usageNetworkDao.search(sc, null); + List usageNetworkVOs = s_usageNetworkDao.search(sc, null); Map networkUsageByZone = new HashMap(); @@ -136,7 +136,7 @@ public class NetworkUsageParser { } } - m_usageDao.saveUsageRecords(usageRecords); + s_usageDao.saveUsageRecords(usageRecords); return true; } diff --git a/usage/src/com/cloud/usage/parser/PortForwardingUsageParser.java b/usage/src/com/cloud/usage/parser/PortForwardingUsageParser.java index dd12d575149..37c7751cff4 100644 --- a/usage/src/com/cloud/usage/parser/PortForwardingUsageParser.java +++ b/usage/src/com/cloud/usage/parser/PortForwardingUsageParser.java @@ -41,8 +41,8 @@ import com.cloud.utils.Pair; public class PortForwardingUsageParser { public static final Logger s_logger = Logger.getLogger(PortForwardingUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsagePortForwardingRuleDao m_usagePFRuleDao; + private static UsageDao s_usageDao; + private static UsagePortForwardingRuleDao s_usagePFRuleDao; @Inject private UsageDao _usageDao; @@ -51,8 +51,8 @@ public class PortForwardingUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usagePFRuleDao = _usagePFRuleDao; + s_usageDao = _usageDao; + s_usagePFRuleDao = _usagePFRuleDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -68,7 +68,7 @@ public class PortForwardingUsageParser { // - look for an entry for accountId with end date in the given range // - look for an entry for accountId with end date null (currently running vm or owned IP) // - look for an entry for accountId with start date before given range *and* end date after given range - List usagePFs = m_usagePFRuleDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); + List usagePFs = s_usagePFRuleDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); if (usagePFs.isEmpty()) { s_logger.debug("No port forwarding usage events for this period"); @@ -152,7 +152,7 @@ public class PortForwardingUsageParser { UsageVO usageRecord = new UsageVO(zoneId, account.getId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", type, new Double(usage), null, null, null, null, pfId, null, startDate, endDate); - m_usageDao.persist(usageRecord); + s_usageDao.persist(usageRecord); } private static class PFInfo { diff --git a/usage/src/com/cloud/usage/parser/SecurityGroupUsageParser.java b/usage/src/com/cloud/usage/parser/SecurityGroupUsageParser.java index cb1d72ec5a6..ea86d49f14f 100644 --- a/usage/src/com/cloud/usage/parser/SecurityGroupUsageParser.java +++ b/usage/src/com/cloud/usage/parser/SecurityGroupUsageParser.java @@ -41,8 +41,8 @@ import com.cloud.utils.Pair; public class SecurityGroupUsageParser { public static final Logger s_logger = Logger.getLogger(SecurityGroupUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsageSecurityGroupDao m_usageSecurityGroupDao; + private static UsageDao s_usageDao; + private static UsageSecurityGroupDao s_usageSecurityGroupDao; @Inject private UsageDao _usageDao; @@ -51,8 +51,8 @@ public class SecurityGroupUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usageSecurityGroupDao = _usageSecurityGroupDao; + s_usageDao = _usageDao; + s_usageSecurityGroupDao = _usageSecurityGroupDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -68,7 +68,7 @@ public class SecurityGroupUsageParser { // - look for an entry for accountId with end date in the given range // - look for an entry for accountId with end date null (currently running vm or owned IP) // - look for an entry for accountId with start date before given range *and* end date after given range - List usageSGs = m_usageSecurityGroupDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); + List usageSGs = s_usageSecurityGroupDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); if (usageSGs.isEmpty()) { s_logger.debug("No SecurityGroup usage events for this period"); @@ -152,7 +152,7 @@ public class SecurityGroupUsageParser { UsageVO usageRecord = new UsageVO(zoneId, account.getId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", type, new Double(usage), vmId, null, null, null, sgId, null, startDate, endDate); - m_usageDao.persist(usageRecord); + s_usageDao.persist(usageRecord); } private static class SGInfo { diff --git a/usage/src/com/cloud/usage/parser/StorageUsageParser.java b/usage/src/com/cloud/usage/parser/StorageUsageParser.java index 560f6b09081..f1091a17643 100644 --- a/usage/src/com/cloud/usage/parser/StorageUsageParser.java +++ b/usage/src/com/cloud/usage/parser/StorageUsageParser.java @@ -42,8 +42,8 @@ import com.cloud.utils.Pair; public class StorageUsageParser { public static final Logger s_logger = Logger.getLogger(StorageUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsageStorageDao m_usageStorageDao; + private static UsageDao s_usageDao; + private static UsageStorageDao s_usageStorageDao; @Inject private UsageDao _usageDao; @@ -52,8 +52,8 @@ public class StorageUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usageStorageDao = _usageStorageDao; + s_usageDao = _usageDao; + s_usageStorageDao = _usageStorageDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -69,7 +69,7 @@ public class StorageUsageParser { // - look for an entry for accountId with end date in the given range // - look for an entry for accountId with end date null (currently running vm or owned IP) // - look for an entry for accountId with start date before given range *and* end date after given range - List usageUsageStorages = m_usageStorageDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); + List usageUsageStorages = s_usageStorageDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); if (usageUsageStorages.isEmpty()) { s_logger.debug("No Storage usage events for this period"); @@ -183,7 +183,7 @@ public class StorageUsageParser { UsageVO usageRecord = new UsageVO(zoneId, account.getId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", usage_type, new Double(usage), null, null, null, tmplSourceId, storageId, size, virtualSize, startDate, endDate); - m_usageDao.persist(usageRecord); + s_usageDao.persist(usageRecord); } private static class StorageInfo { diff --git a/usage/src/com/cloud/usage/parser/VMInstanceUsageParser.java b/usage/src/com/cloud/usage/parser/VMInstanceUsageParser.java index 78cafed9792..ba0d4bf9cd4 100644 --- a/usage/src/com/cloud/usage/parser/VMInstanceUsageParser.java +++ b/usage/src/com/cloud/usage/parser/VMInstanceUsageParser.java @@ -41,8 +41,8 @@ import com.cloud.utils.Pair; public class VMInstanceUsageParser { public static final Logger s_logger = Logger.getLogger(VMInstanceUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsageVMInstanceDao m_usageInstanceDao; + private static UsageDao s_usageDao; + private static UsageVMInstanceDao s_usageInstanceDao; @Inject private UsageDao _usageDao;; @@ -51,8 +51,8 @@ public class VMInstanceUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usageInstanceDao = _usageInstanceDao; + s_usageDao = _usageDao; + s_usageInstanceDao = _usageInstanceDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -68,7 +68,7 @@ public class VMInstanceUsageParser { // - look for an entry for accountId with end date in the given range // - look for an entry for accountId with end date null (currently running vm or owned IP) // - look for an entry for accountId with start date before given range *and* end date after given range - List usageInstances = m_usageInstanceDao.getUsageRecords(account.getId(), startDate, endDate); + List usageInstances = s_usageInstanceDao.getUsageRecords(account.getId(), startDate, endDate); //ToDo: Add domainID for getting usage records // This map has both the running time *and* the usage amount. @@ -180,7 +180,7 @@ public class VMInstanceUsageParser { UsageVO usageRecord = new UsageVO(Long.valueOf(zoneId), account.getId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", type, new Double(usage), Long.valueOf(vmId), vmName, Long.valueOf(serviceOfferingId), Long.valueOf(templateId), Long.valueOf(vmId), startDate, endDate, hypervisorType); - m_usageDao.persist(usageRecord); + s_usageDao.persist(usageRecord); } private static class VMInfo { diff --git a/usage/src/com/cloud/usage/parser/VMSnapshotUsageParser.java b/usage/src/com/cloud/usage/parser/VMSnapshotUsageParser.java index 0d2b0c1facc..9af81374437 100644 --- a/usage/src/com/cloud/usage/parser/VMSnapshotUsageParser.java +++ b/usage/src/com/cloud/usage/parser/VMSnapshotUsageParser.java @@ -40,8 +40,8 @@ import com.cloud.user.AccountVO; public class VMSnapshotUsageParser { public static final Logger s_logger = Logger.getLogger(VMSnapshotUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsageVMSnapshotDao m_usageVMSnapshotDao; + private static UsageDao s_usageDao; + private static UsageVMSnapshotDao s_usageVMSnapshotDao; @Inject private UsageDao _usageDao; @@ -50,8 +50,8 @@ public class VMSnapshotUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usageVMSnapshotDao = _usageVMSnapshotDao; + s_usageDao = _usageDao; + s_usageVMSnapshotDao = _usageVMSnapshotDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -62,7 +62,7 @@ public class VMSnapshotUsageParser { endDate = new Date(); } - List usageUsageVMSnapshots = m_usageVMSnapshotDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate); + List usageUsageVMSnapshots = s_usageVMSnapshotDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate); if (usageUsageVMSnapshots.isEmpty()) { s_logger.debug("No VM snapshot usage events for this period"); @@ -79,7 +79,7 @@ public class VMSnapshotUsageParser { unprocessedUsage.put(key, usageRec); continue; } - UsageVMSnapshotVO previousEvent = m_usageVMSnapshotDao.getPreviousUsageRecord(usageRec); + UsageVMSnapshotVO previousEvent = s_usageVMSnapshotDao.getPreviousUsageRecord(usageRec); if (previousEvent == null || previousEvent.getSize() == 0) { unprocessedUsage.put(key, usageRec); continue; @@ -96,11 +96,11 @@ public class VMSnapshotUsageParser { createUsageRecord(UsageTypes.VM_SNAPSHOT, duration, previousCreated, createDate, account, volId, zoneId, previousEvent.getDiskOfferingId(), vmId, previousEvent.getSize()); previousEvent.setProcessed(new Date()); - m_usageVMSnapshotDao.update(previousEvent); + s_usageVMSnapshotDao.update(previousEvent); if (usageRec.getSize() == 0) { usageRec.setProcessed(new Date()); - m_usageVMSnapshotDao.update(usageRec); + s_usageVMSnapshotDao.update(usageRec); } else unprocessedUsage.put(key, usageRec); } @@ -148,7 +148,7 @@ public class VMSnapshotUsageParser { UsageVO usageRecord = new UsageVO(zoneId, account.getId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", type, new Double(usage), vmId, null, doId, null, volId, size, startDate, endDate); - m_usageDao.persist(usageRecord); + s_usageDao.persist(usageRecord); } } diff --git a/usage/src/com/cloud/usage/parser/VPNUserUsageParser.java b/usage/src/com/cloud/usage/parser/VPNUserUsageParser.java index a6f4a69dcee..619c8619398 100644 --- a/usage/src/com/cloud/usage/parser/VPNUserUsageParser.java +++ b/usage/src/com/cloud/usage/parser/VPNUserUsageParser.java @@ -41,8 +41,8 @@ import com.cloud.utils.Pair; public class VPNUserUsageParser { public static final Logger s_logger = Logger.getLogger(VPNUserUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsageVPNUserDao m_usageVPNUserDao; + private static UsageDao s_usageDao; + private static UsageVPNUserDao s_usageVPNUserDao; @Inject private UsageDao _usageDao; @@ -51,8 +51,8 @@ public class VPNUserUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usageVPNUserDao = _usageVPNUserDao; + s_usageDao = _usageDao; + s_usageVPNUserDao = _usageVPNUserDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -63,7 +63,7 @@ public class VPNUserUsageParser { endDate = new Date(); } - List usageVUs = m_usageVPNUserDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); + List usageVUs = s_usageVPNUserDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); if (usageVUs.isEmpty()) { s_logger.debug("No VPN user usage events for this period"); @@ -147,7 +147,7 @@ public class VPNUserUsageParser { UsageVO usageRecord = new UsageVO(zoneId, account.getId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", type, new Double(usage), null, null, null, null, userId, null, startDate, endDate); - m_usageDao.persist(usageRecord); + s_usageDao.persist(usageRecord); } private static class VUInfo { diff --git a/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java b/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java index 8ab216dd08a..6022a3e7004 100644 --- a/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java +++ b/usage/src/com/cloud/usage/parser/VmDiskUsageParser.java @@ -41,8 +41,8 @@ import com.cloud.utils.db.SearchCriteria; public class VmDiskUsageParser { public static final Logger s_logger = Logger.getLogger(VmDiskUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsageVmDiskDao m_usageVmDiskDao; + private static UsageDao s_usageDao; + private static UsageVmDiskDao s_usageVmDiskDao; @Inject private UsageDao _usageDao; @@ -51,8 +51,8 @@ public class VmDiskUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usageVmDiskDao = _usageVmDiskDao; + s_usageDao = _usageDao; + s_usageVmDiskDao = _usageVmDiskDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -66,10 +66,10 @@ public class VmDiskUsageParser { // - query usage_disk table for all entries for userId with // event_date in the given range - SearchCriteria sc = m_usageVmDiskDao.createSearchCriteria(); + SearchCriteria sc = s_usageVmDiskDao.createSearchCriteria(); sc.addAnd("accountId", SearchCriteria.Op.EQ, account.getId()); sc.addAnd("eventTimeMillis", SearchCriteria.Op.BETWEEN, startDate.getTime(), endDate.getTime()); - List usageVmDiskVOs = m_usageVmDiskDao.search(sc, null); + List usageVmDiskVOs = s_usageVmDiskDao.search(sc, null); Map vmDiskUsageByZone = new HashMap(); @@ -164,7 +164,7 @@ public class VmDiskUsageParser { } } - m_usageDao.saveUsageRecords(usageRecords); + s_usageDao.saveUsageRecords(usageRecords); return true; } diff --git a/usage/src/com/cloud/usage/parser/VolumeUsageParser.java b/usage/src/com/cloud/usage/parser/VolumeUsageParser.java index adcf468ffdc..cd092a970d9 100644 --- a/usage/src/com/cloud/usage/parser/VolumeUsageParser.java +++ b/usage/src/com/cloud/usage/parser/VolumeUsageParser.java @@ -41,8 +41,8 @@ import com.cloud.utils.Pair; public class VolumeUsageParser { public static final Logger s_logger = Logger.getLogger(VolumeUsageParser.class.getName()); - private static UsageDao m_usageDao; - private static UsageVolumeDao m_usageVolumeDao; + private static UsageDao s_usageDao; + private static UsageVolumeDao s_usageVolumeDao; @Inject private UsageDao _usageDao; @@ -51,8 +51,8 @@ public class VolumeUsageParser { @PostConstruct void init() { - m_usageDao = _usageDao; - m_usageVolumeDao = _usageVolumeDao; + s_usageDao = _usageDao; + s_usageVolumeDao = _usageVolumeDao; } public static boolean parse(AccountVO account, Date startDate, Date endDate) { @@ -68,7 +68,7 @@ public class VolumeUsageParser { // - look for an entry for accountId with end date in the given range // - look for an entry for accountId with end date null (currently running vm or owned IP) // - look for an entry for accountId with start date before given range *and* end date after given range - List usageUsageVols = m_usageVolumeDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); + List usageUsageVols = s_usageVolumeDao.getUsageRecords(account.getId(), account.getDomainId(), startDate, endDate, false, 0); if (usageUsageVols.isEmpty()) { s_logger.debug("No volume usage events for this period"); @@ -164,7 +164,7 @@ public class VolumeUsageParser { UsageVO usageRecord = new UsageVO(zoneId, account.getId(), account.getDomainId(), usageDesc, usageDisplay + " Hrs", type, new Double(usage), null, null, doId, templateId, volId, size, startDate, endDate); - m_usageDao.persist(usageRecord); + s_usageDao.persist(usageRecord); } private static class VolInfo { diff --git a/usage/test/com/cloud/usage/UsageManagerTestConfiguration.java b/usage/test/com/cloud/usage/UsageManagerTestConfiguration.java index 85b6cec03be..26b610656c7 100644 --- a/usage/test/com/cloud/usage/UsageManagerTestConfiguration.java +++ b/usage/test/com/cloud/usage/UsageManagerTestConfiguration.java @@ -64,12 +64,12 @@ import com.cloud.user.dao.UserStatisticsDaoImpl; @Configuration @ComponentScan(basePackageClasses = {AccountDaoImpl.class, UsageDaoImpl.class, UsageJobDaoImpl.class, UsageVMInstanceDaoImpl.class, UsageIPAddressDaoImpl.class, - UsageNetworkDaoImpl.class, UsageVolumeDaoImpl.class, UsageStorageDaoImpl.class, UsageLoadBalancerPolicyDaoImpl.class, - UsagePortForwardingRuleDaoImpl.class, UsageNetworkOfferingDaoImpl.class, UsageVPNUserDaoImpl.class, UsageVmDiskDaoImpl.class, - UsageSecurityGroupDaoImpl.class, ConfigurationDaoImpl.class, UsageManagerImpl.class, VMInstanceUsageParser.class, IPAddressUsageParser.class, - LoadBalancerUsageParser.class, NetworkOfferingUsageParser.class, NetworkUsageParser.class, PortForwardingUsageParser.class, - SecurityGroupUsageParser.class, StorageUsageParser.class, VmDiskUsageParser.class, VolumeUsageParser.class, VPNUserUsageParser.class, - UserStatisticsDaoImpl.class}, + UsageNetworkDaoImpl.class, UsageVolumeDaoImpl.class, UsageStorageDaoImpl.class, UsageLoadBalancerPolicyDaoImpl.class, + UsagePortForwardingRuleDaoImpl.class, UsageNetworkOfferingDaoImpl.class, UsageVPNUserDaoImpl.class, UsageVmDiskDaoImpl.class, + UsageSecurityGroupDaoImpl.class, ConfigurationDaoImpl.class, UsageManagerImpl.class, VMInstanceUsageParser.class, IPAddressUsageParser.class, + LoadBalancerUsageParser.class, NetworkOfferingUsageParser.class, NetworkUsageParser.class, PortForwardingUsageParser.class, + SecurityGroupUsageParser.class, StorageUsageParser.class, VmDiskUsageParser.class, VolumeUsageParser.class, VPNUserUsageParser.class, + UserStatisticsDaoImpl.class}, includeFilters = {@Filter(value = Library.class, type = FilterType.CUSTOM)}, useDefaultFilters = false) public class UsageManagerTestConfiguration { diff --git a/utils/src/com/cloud/utils/DateUtil.java b/utils/src/com/cloud/utils/DateUtil.java index 510afd28fbd..560c92bb4fc 100644 --- a/utils/src/com/cloud/utils/DateUtil.java +++ b/utils/src/com/cloud/utils/DateUtil.java @@ -28,7 +28,7 @@ import com.cloud.utils.exception.CloudRuntimeException; public class DateUtil { public static final TimeZone GMT_TIMEZONE = TimeZone.getTimeZone("GMT"); public static final String YYYYMMDD_FORMAT = "yyyyMMddHHmmss"; - private static final DateFormat _outputFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); + private static final DateFormat s_outputFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); public static Date currentGMTTime() { // Date object always stores miliseconds offset based on GMT internally @@ -76,8 +76,8 @@ public class DateUtil { return ""; } String formattedString = null; - synchronized (_outputFormat) { - formattedString = _outputFormat.format(date); + synchronized (s_outputFormat) { + formattedString = s_outputFormat.format(date); } return formattedString; } diff --git a/utils/src/com/cloud/utils/StringUtils.java b/utils/src/com/cloud/utils/StringUtils.java index 6b4c8f8eb95..38d1369432e 100644 --- a/utils/src/com/cloud/utils/StringUtils.java +++ b/utils/src/com/cloud/utils/StringUtils.java @@ -189,25 +189,23 @@ public class StringUtils { return found > 0 ? found : end - start; } - - public static Map stringToMap(String s){ - Map map=new HashMap(); + public static Map stringToMap(String s) { + Map map = new HashMap(); String[] elements = s.split(";"); - for (String parts: elements) { + for (String parts : elements) { String[] keyValue = parts.split(":"); map.put(keyValue[0], keyValue[1]); } return map; } - - public static String mapToString(Map map){ + public static String mapToString(Map map) { String s = ""; - for (Map.Entry entry: map.entrySet()) { - s += entry.getKey() + ":" + entry.getValue() +";"; + for (Map.Entry entry : map.entrySet()) { + s += entry.getKey() + ":" + entry.getValue() + ";"; } if (s.length() > 0) { - s = s.substring(0, s.length()-1); + s = s.substring(0, s.length() - 1); } return s; } diff --git a/utils/src/com/cloud/utils/SwiftUtil.java b/utils/src/com/cloud/utils/SwiftUtil.java index c920e1f2c6a..829159f8fcb 100644 --- a/utils/src/com/cloud/utils/SwiftUtil.java +++ b/utils/src/com/cloud/utils/SwiftUtil.java @@ -29,7 +29,7 @@ import com.cloud.utils.script.Script; public class SwiftUtil { private static Logger logger = Logger.getLogger(SwiftUtil.class); - private static long SWIFT_MAX_SIZE = 5L * 1024L * 1024L * 1024L; + private static final long SWIFT_MAX_SIZE = 5L * 1024L * 1024L * 1024L; public interface SwiftClientCfg { String getAccount(); diff --git a/utils/src/com/cloud/utils/events/EventArgs.java b/utils/src/com/cloud/utils/events/EventArgs.java index 0f3dcdd8aa0..4bfe206da5a 100644 --- a/utils/src/com/cloud/utils/events/EventArgs.java +++ b/utils/src/com/cloud/utils/events/EventArgs.java @@ -20,7 +20,7 @@ import java.io.Serializable; public class EventArgs implements Serializable { private static final long serialVersionUID = 30659016120504139L; - public static EventArgs Empty = new EventArgs(); + public static final EventArgs Empty = new EventArgs(); private String subject; diff --git a/utils/src/com/cloud/utils/net/NetUtils.java b/utils/src/com/cloud/utils/net/NetUtils.java index c0c792fcb0d..f6f62851adb 100755 --- a/utils/src/com/cloud/utils/net/NetUtils.java +++ b/utils/src/com/cloud/utils/net/NetUtils.java @@ -72,10 +72,10 @@ public class NetUtils { public final static int DEFAULT_AUTOSCALE_VM_DESTROY_TIME = 2 * 60; // Grace period before Vm is destroyed public final static int DEFAULT_AUTOSCALE_POLICY_INTERVAL_TIME = 30; public final static int DEFAULT_AUTOSCALE_POLICY_QUIET_TIME = 5 * 60; - private final static Random _rand = new Random(System.currentTimeMillis()); + private final static Random s_rand = new Random(System.currentTimeMillis()); public static long createSequenceBasedMacAddress(long macAddress) { - return macAddress | 0x060000000000l | (((long)_rand.nextInt(32768) << 25) & 0x00fffe000000l); + return macAddress | 0x060000000000l | (((long)s_rand.nextInt(32768) << 25) & 0x00fffe000000l); } public static String getHostName() { @@ -702,7 +702,7 @@ public class NetUtils { //e.g., cidr = 192.168.10.0, size = /24, avoid = 192.168.10.1, 192.168.10.20, 192.168.10.254 // range = 2^8 - 1 - 3 = 252 range = range - avoid.size(); - int next = _rand.nextInt(range); //note: nextInt excludes last value + int next = s_rand.nextInt(range); //note: nextInt excludes last value long ip = startIp + next; for (Long avoidable : avoid) { if (ip >= avoidable) { @@ -1234,9 +1234,9 @@ public class NetUtils { String startIp = ips[0]; IPv6Address start = IPv6Address.fromString(startIp); BigInteger gap = countIp6InRange(ip6Range); - BigInteger next = new BigInteger(gap.bitLength(), _rand); + BigInteger next = new BigInteger(gap.bitLength(), s_rand); while (next.compareTo(gap) >= 0) { - next = new BigInteger(gap.bitLength(), _rand); + next = new BigInteger(gap.bitLength(), s_rand); } BigInteger startInt = convertIPv6AddressToBigInteger(start); BigInteger resultInt = startInt.add(next); diff --git a/utils/src/com/cloud/utils/nio/Link.java b/utils/src/com/cloud/utils/nio/Link.java index e20210db71a..dfeb9dcc4d1 100755 --- a/utils/src/com/cloud/utils/nio/Link.java +++ b/utils/src/com/cloud/utils/nio/Link.java @@ -150,7 +150,7 @@ public class Link { pkgBuf.clear(); engResult = sslEngine.wrap(buffers, pkgBuf); if (engResult.getHandshakeStatus() != HandshakeStatus.FINISHED && engResult.getHandshakeStatus() != HandshakeStatus.NOT_HANDSHAKING && - engResult.getStatus() != SSLEngineResult.Status.OK) { + engResult.getStatus() != SSLEngineResult.Status.OK) { throw new IOException("SSL: SSLEngine return bad result! " + engResult); } @@ -276,7 +276,7 @@ public class Link { appBuf = ByteBuffer.allocate(sslSession.getApplicationBufferSize() + 40); engResult = _sslEngine.unwrap(_readBuffer, appBuf); if (engResult.getHandshakeStatus() != HandshakeStatus.FINISHED && engResult.getHandshakeStatus() != HandshakeStatus.NOT_HANDSHAKING && - engResult.getStatus() != SSLEngineResult.Status.OK) { + engResult.getStatus() != SSLEngineResult.Status.OK) { throw new IOException("SSL: SSLEngine return bad result! " + engResult); } if (remaining == _readBuffer.remaining()) { diff --git a/utils/src/com/cloud/utils/security/CertificateHelper.java b/utils/src/com/cloud/utils/security/CertificateHelper.java index 5d8f6ad310d..64ba8bffa02 100644 --- a/utils/src/com/cloud/utils/security/CertificateHelper.java +++ b/utils/src/com/cloud/utils/security/CertificateHelper.java @@ -114,7 +114,7 @@ public class CertificateHelper { return kf.generatePrivate(keysp); } - public static List parseChain(String chain) throws IOException { + public static List parseChain(String chain) throws IOException { List certs = new ArrayList(); PEMReader reader = new PEMReader(new StringReader(chain)); @@ -160,6 +160,4 @@ public class CertificateHelper { return buffer.toString(); } - - } diff --git a/utils/src/com/cloud/utils/ssh/SSHCmdHelper.java b/utils/src/com/cloud/utils/ssh/SSHCmdHelper.java index 8b63c51e3cd..ebd65f56683 100644 --- a/utils/src/com/cloud/utils/ssh/SSHCmdHelper.java +++ b/utils/src/com/cloud/utils/ssh/SSHCmdHelper.java @@ -62,7 +62,7 @@ public class SSHCmdHelper { try { if (sshExecuteCmdOneShot(sshConnection, cmd)) return true; - } catch (sshException e) { + } catch (SshException e) { continue; } } @@ -77,7 +77,7 @@ public class SSHCmdHelper { for (int i = 0; i < nTimes; i++) { try { return sshExecuteCmdOneShotWithExitCode(sshConnection, cmd); - } catch (sshException e) { + } catch (SshException e) { continue; } } @@ -88,7 +88,7 @@ public class SSHCmdHelper { return sshExecuteCmd(sshConnection, cmd, 3); } - public static int sshExecuteCmdOneShotWithExitCode(com.trilead.ssh2.Connection sshConnection, String cmd) throws sshException { + public static int sshExecuteCmdOneShotWithExitCode(com.trilead.ssh2.Connection sshConnection, String cmd) throws SshException { s_logger.debug("Executing cmd: " + cmd); Session sshSession = null; try { @@ -98,7 +98,7 @@ public class SSHCmdHelper { Thread.sleep(1000); if (sshSession == null) { - throw new sshException("Cannot open ssh session"); + throw new SshException("Cannot open ssh session"); } sshSession.execCommand(cmd); @@ -109,7 +109,7 @@ public class SSHCmdHelper { byte[] buffer = new byte[8192]; while (true) { if (stdout == null || stderr == null) { - throw new sshException("stdout or stderr of ssh session is null"); + throw new SshException("stdout or stderr of ssh session is null"); } if ((stdout.available() == 0) && (stderr.available() == 0)) { @@ -143,14 +143,14 @@ public class SSHCmdHelper { return sshSession.getExitStatus(); } catch (Exception e) { s_logger.debug("Ssh executed failed", e); - throw new sshException("Ssh executed failed " + e.getMessage()); + throw new SshException("Ssh executed failed " + e.getMessage()); } finally { if (sshSession != null) sshSession.close(); } } - public static boolean sshExecuteCmdOneShot(com.trilead.ssh2.Connection sshConnection, String cmd) throws sshException { + public static boolean sshExecuteCmdOneShot(com.trilead.ssh2.Connection sshConnection, String cmd) throws SshException { return sshExecuteCmdOneShotWithExitCode(sshConnection, cmd) == 0; } } diff --git a/utils/src/com/cloud/utils/ssh/sshException.java b/utils/src/com/cloud/utils/ssh/SshException.java similarity index 92% rename from utils/src/com/cloud/utils/ssh/sshException.java rename to utils/src/com/cloud/utils/ssh/SshException.java index ca3cbb67b40..7c9d35c647e 100644 --- a/utils/src/com/cloud/utils/ssh/sshException.java +++ b/utils/src/com/cloud/utils/ssh/SshException.java @@ -18,10 +18,10 @@ package com.cloud.utils.ssh; import com.cloud.utils.SerialVersionUID; -public class sshException extends Exception { +public class SshException extends Exception { private static final long serialVersionUID = SerialVersionUID.sshException; - public sshException(String msg) { + public SshException(String msg) { super(msg); } } diff --git a/utils/src/com/cloud/utils/ssh/SshHelper.java b/utils/src/com/cloud/utils/ssh/SshHelper.java index e482a803e44..41625eb54c9 100755 --- a/utils/src/com/cloud/utils/ssh/SshHelper.java +++ b/utils/src/com/cloud/utils/ssh/SshHelper.java @@ -27,8 +27,8 @@ import com.trilead.ssh2.ChannelCondition; import com.cloud.utils.Pair; public class SshHelper { - private static int DEFAULT_CONNECT_TIMEOUT = 60000; - private static int DEFAULT_KEX_TIMEOUT = 60000; + private static final int DEFAULT_CONNECT_TIMEOUT = 60000; + private static final int DEFAULT_KEX_TIMEOUT = 60000; private static final Logger s_logger = Logger.getLogger(SshHelper.class); diff --git a/utils/src/org/apache/cloudstack/utils/identity/ManagementServerNode.java b/utils/src/org/apache/cloudstack/utils/identity/ManagementServerNode.java index 6149eaf2e8e..7dee8461f47 100755 --- a/utils/src/org/apache/cloudstack/utils/identity/ManagementServerNode.java +++ b/utils/src/org/apache/cloudstack/utils/identity/ManagementServerNode.java @@ -28,7 +28,7 @@ import com.cloud.utils.net.MacAddress; @Local(value = {SystemIntegrityChecker.class}) public class ManagementServerNode extends AdapterBase implements SystemIntegrityChecker { - private final Logger s_logger = Logger.getLogger(ManagementServerNode.class); + private static final Logger s_logger = Logger.getLogger(ManagementServerNode.class); private static final long s_nodeId = MacAddress.getMacAddress().toLong(); diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java index 20e5b26ae41..771c4a568cf 100644 --- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java +++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/VirtualMachineMO.java @@ -111,7 +111,7 @@ import com.cloud.utils.script.Script; public class VirtualMachineMO extends BaseMO { private static final Logger s_logger = Logger.getLogger(VirtualMachineMO.class); - private static final ExecutorService _monitorServiceExecutor = Executors.newCachedThreadPool(new NamedThreadFactory("VM-Question-Monitor")); + private static final ExecutorService MonitorServiceExecutor = Executors.newCachedThreadPool(new NamedThreadFactory("VM-Question-Monitor")); private ManagedObjectReference _vmEnvironmentBrowser = null; public VirtualMachineMO(VmwareContext context, ManagedObjectReference morVm) { @@ -1238,7 +1238,7 @@ public class VirtualMachineMO extends BaseMO { // Monitor VM questions final Boolean[] flags = {false}; final VirtualMachineMO vmMo = this; - Future future = _monitorServiceExecutor.submit(new Runnable() { + Future future = MonitorServiceExecutor.submit(new Runnable() { @Override public void run() { s_logger.info("VM Question monitor started..."); @@ -2334,7 +2334,7 @@ public class VirtualMachineMO extends BaseMO { // Monitor VM questions final Boolean[] flags = {false}; final VirtualMachineMO vmMo = this; - Future future = _monitorServiceExecutor.submit(new Runnable() { + Future future = MonitorServiceExecutor.submit(new Runnable() { @Override public void run() { s_logger.info("VM Question monitor started..."); diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java index 9ecd9879045..0a44a72289a 100644 --- a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java +++ b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareClient.java @@ -79,19 +79,19 @@ public class VmwareClient { } static { - try { - trustAllHttpsCertificates(); - HostnameVerifier hv = new HostnameVerifier() { - @Override - public boolean verify(String urlHostName, SSLSession session) { - return true; - } - }; - HttpsURLConnection.setDefaultHostnameVerifier(hv); - - vimService = new VimService(); - } catch (Exception e) { - } + try { + trustAllHttpsCertificates(); + HostnameVerifier hv = new HostnameVerifier() { + @Override + public boolean verify(String urlHostName, SSLSession session) { + return true; + } + }; + HttpsURLConnection.setDefaultHostnameVerifier(hv); + + vimService = new VimService(); + } catch (Exception e) { + } } private static void trustAllHttpsCertificates() throws Exception { @@ -106,11 +106,11 @@ public class VmwareClient { javax.net.ssl.HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); } - private ManagedObjectReference SVC_INST_REF = new ManagedObjectReference(); + private final ManagedObjectReference svcInstRef = new ManagedObjectReference(); private static VimService vimService; private VimPortType vimPort; private String serviceCookie; - private final String SVC_INST_NAME = "ServiceInstance"; + private final static String SVC_INST_NAME = "ServiceInstance"; private int vCenterSessionTimeout = 1200000; // Timeout in milliseconds private boolean isConnected = false; @@ -125,8 +125,8 @@ public class VmwareClient { * the exception */ public void connect(String url, String userName, String password) throws Exception { - SVC_INST_REF.setType(SVC_INST_NAME); - SVC_INST_REF.setValue(SVC_INST_NAME); + svcInstRef.setType(SVC_INST_NAME); + svcInstRef.setValue(SVC_INST_NAME); vimPort = vimService.getVimPort(); Map ctxt = ((BindingProvider)vimPort).getRequestContext(); @@ -137,7 +137,7 @@ public class VmwareClient { ctxt.put("com.sun.xml.internal.ws.request.timeout", vCenterSessionTimeout); ctxt.put("com.sun.xml.internal.ws.connect.timeout", vCenterSessionTimeout); - ServiceContent serviceContent = vimPort.retrieveServiceContent(SVC_INST_REF); + ServiceContent serviceContent = vimPort.retrieveServiceContent(svcInstRef); // Extract a cookie. See vmware sample program com.vmware.httpfileaccess.GetVMFiles Map> headers = (Map>)((BindingProvider)vimPort).getResponseContext().get(MessageContext.HTTP_RESPONSE_HEADERS); @@ -177,7 +177,7 @@ public class VmwareClient { public ServiceContent getServiceContent() { try { - return vimPort.retrieveServiceContent(SVC_INST_REF); + return vimPort.retrieveServiceContent(svcInstRef); } catch (RuntimeFaultFaultMsg e) { } return null; diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java index 44d9f0cc9f5..4c3ff55ae4d 100755 --- a/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java +++ b/vmware-base/src/com/cloud/hypervisor/vmware/util/VmwareContext.java @@ -57,10 +57,10 @@ import com.cloud.utils.ActionDelegate; public class VmwareContext { private static final Logger s_logger = Logger.getLogger(VmwareContext.class); - private static int MAX_CONNECT_RETRY = 5; - private static int CONNECT_RETRY_INTERVAL = 1000; + private static final int MAX_CONNECT_RETRY = 5; + private static final int CONNECT_RETRY_INTERVAL = 1000; - private final int _CHUNKSIZE = 1 * 1024 * 1024; // 1M + private static final int ChunkSize = 1 * 1024 * 1024; // 1M private final VmwareClient _vimClient; private final String _serverAddress; @@ -327,7 +327,7 @@ public class VmwareContext { InputStream in = conn.getInputStream(); OutputStream out = new FileOutputStream(new File(localFileFullName)); - byte[] buf = new byte[_CHUNKSIZE]; + byte[] buf = new byte[ChunkSize]; int len = 0; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); @@ -349,7 +349,7 @@ public class VmwareContext { try { out = conn.getOutputStream(); in = new FileInputStream(localFile); - byte[] buf = new byte[_CHUNKSIZE]; + byte[] buf = new byte[ChunkSize]; int len = 0; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); @@ -381,7 +381,7 @@ public class VmwareContext { conn.setDoOutput(true); conn.setUseCaches(false); - conn.setChunkedStreamingMode(_CHUNKSIZE); + conn.setChunkedStreamingMode(ChunkSize); conn.setRequestMethod(httpMethod); conn.setRequestProperty("Connection", "Keep-Alive"); conn.setRequestProperty("Content-Type", "application/x-vnd.vmware-streamVmdk"); @@ -393,7 +393,7 @@ public class VmwareContext { try { bos = new BufferedOutputStream(conn.getOutputStream()); is = new BufferedInputStream(new FileInputStream(localFileName)); - int bufferSize = _CHUNKSIZE; + int bufferSize = ChunkSize; byte[] buffer = new byte[bufferSize]; while (true) { int bytesRead = is.read(buffer, 0, bufferSize); @@ -438,7 +438,7 @@ public class VmwareContext { in = conn.getInputStream(); out = new FileOutputStream(new File(localFileName)); - byte[] buf = new byte[_CHUNKSIZE]; + byte[] buf = new byte[ChunkSize]; int len = 0; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); @@ -464,7 +464,7 @@ public class VmwareContext { InputStream in = conn.getInputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream(); - byte[] buf = new byte[_CHUNKSIZE]; + byte[] buf = new byte[ChunkSize]; int len = 0; while ((len = in.read(buf)) > 0) { out.write(buf, 0, len);