All Checkstyle problems corrected

This commit is contained in:
Alex Huang 2013-12-12 10:30:09 -08:00
parent f33b247fc3
commit be5e5cc641
519 changed files with 18159 additions and 17767 deletions

View File

@ -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");
}

View File

@ -180,8 +180,8 @@ public class DummyResource implements ServerResource {
return true;
}
public void setParams(Map<String, Object> _params) {
this._params = _params;
public void setParams(Map<String, Object> params) {
this._params = params;
}
@Override

View File

@ -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

View File

@ -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;
}

View File

@ -39,5 +39,6 @@ public interface Alert extends Identity, InternalIdentity {
Date getResolved();
boolean getArchived();
String getName();
}

View File

@ -99,22 +99,22 @@ public interface DeploymentPlanner extends Adapter {
public ExcludeList() {
}
public ExcludeList(Set<Long> _dcIds, Set<Long> _podIds, Set<Long> _clusterIds, Set<Long> _hostIds, Set<Long> _poolIds) {
if (_dcIds != null) {
this._dcIds = new HashSet<Long>(_dcIds);
public ExcludeList(Set<Long> dcIds, Set<Long> podIds, Set<Long> clusterIds, Set<Long> hostIds, Set<Long> poolIds) {
if (dcIds != null) {
this._dcIds = new HashSet<Long>(dcIds);
}
if (_podIds != null) {
this._podIds = new HashSet<Long>(_podIds);
if (podIds != null) {
this._podIds = new HashSet<Long>(podIds);
}
if (_clusterIds != null) {
this._clusterIds = new HashSet<Long>(_clusterIds);
if (clusterIds != null) {
this._clusterIds = new HashSet<Long>(clusterIds);
}
if (_hostIds != null) {
this._hostIds = new HashSet<Long>(_hostIds);
if (hostIds != null) {
this._hostIds = new HashSet<Long>(hostIds);
}
if (_poolIds != null) {
this._poolIds = new HashSet<Long>(_poolIds);
if (poolIds != null) {
this._poolIds = new HashSet<Long>(poolIds);
}
}

View File

@ -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

View File

@ -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";
}
/**

View File

@ -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();
}

View File

@ -69,5 +69,5 @@ public interface VirtualNetworkApplianceService {
List<Long> upgradeRouterTemplate(UpgradeRouterTemplateCmd cmd);
public static final String _minVRVersion = "4.2.0";
public static final String MinVRVersion = "4.2.0";
}

View File

@ -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();

View File

@ -47,7 +47,7 @@ public interface AutoScaleVmGroup extends ControlledEntity, InternalIdentity {
int getInterval();
Date getLastInterval();
Date getLastInterval();
String getState();

View File

@ -34,5 +34,5 @@ public interface Counter extends InternalIdentity, Identity {
String getValue();
Source getSource();
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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<? extends VirtualRouterProvider> searchForVirtualRouterElement(ListVirtualRouterElementsCmd cmd);
List<? extends OvsProvider> searchForOvsElement(ListOvsElementsCmd cmd);
List<? extends OvsProvider> searchForOvsElement(ListOvsElementsCmd cmd);
}

View File

@ -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);

View File

@ -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<? extends HealthCheckPolicy> searchForLBHealthCheckPolicies(ListLBHealthCheckPoliciesCmd cmd);
LoadBalancer findById(long LoadBalancer);
LoadBalancer findById(long loadBalancer);
public void updateLBHealthChecks(Scheme scheme) throws ResourceUnavailableException;

View File

@ -47,7 +47,7 @@ public interface NetworkACLService {
* @param cmd
* @return
*/
Pair<List<? extends NetworkACL>,Integer> listNetworkACLs(ListNetworkACLListsCmd cmd);
Pair<List<? extends NetworkACL>, Integer> listNetworkACLs(ListNetworkACLListsCmd cmd);
/**
* Delete specified network ACL. Deletion fails if the list is not empty

View File

@ -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) {

View File

@ -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;

View File

@ -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);

View File

@ -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<List<? extends Snapshot>, Integer> listSnapshots(ListSnapshotsCmd cmd);

View File

@ -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
*

View File

@ -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) {

View File

@ -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<Long> securityGroupIdList,
Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, HTTPMethod httpmethod,
String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIp, Boolean displayVm, String keyboard,
List<Long> affinityGroupIdList, Map<String, String> 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<Long, IpAddresses> requestedIps, IpAddresses defaultIp, Boolean displayVm, String keyboard,
List<Long> affinityGroupIdList, Map<String, String> 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<Long> networkIdList,
List<Long> securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor,
HTTPMethod httpmethod, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard,
List<Long> affinityGroupIdList, Map<String, String> customParameters, String customId) throws InsufficientCapacityException,
List<Long> securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor,
HTTPMethod httpmethod, String userData, String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard,
List<Long> affinityGroupIdList, Map<String, String> 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<Long> networkIdList, Account owner,
String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, HTTPMethod httpmethod, String userData,
String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard, List<Long> affinityGroupIdList,
Map<String, String> customParameters, String customId)
String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, HTTPMethod httpmethod, String userData,
String sshKeyPair, Map<Long, IpAddresses> requestedIps, IpAddresses defaultIps, Boolean displayVm, String keyboard, List<Long> affinityGroupIdList,
Map<String, String> customParameters, String customId)
throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException;
throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException;
/**
* Starts the virtual machine created from createVirtualMachine.

View File

@ -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<VirtualMachine.State> {
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();

View File

@ -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<AlertType> defaultAlertTypes = new HashSet<AlertType>();
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);
}

View File

@ -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";

View File

@ -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() {

View File

@ -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() {

View File

@ -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<String, String> 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;
}

View File

@ -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() {

View File

@ -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;
}

View File

@ -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<String> 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);
}
}

View File

@ -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");
}

View File

@ -290,7 +290,7 @@ public interface ResponseGenerator {
//ListResponse<SecurityGroupResponse> createSecurityGroupResponses(List<? extends SecurityGroupRules> networkGroups);
SecurityGroupResponse createSecurityGroupResponseFromSecurityGroupRule(List<? extends SecurityRule> SecurityRules);
SecurityGroupResponse createSecurityGroupResponseFromSecurityGroupRule(List<? extends SecurityRule> 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);

View File

@ -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());

View File

@ -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);
}
}

View File

@ -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;
}
/////////////////////////////////////////////////////

View File

@ -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

View File

@ -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");
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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<VirtualRouterElementService> _service;
public static final Logger s_logger = Logger
.getLogger(ConfigureOvsElementCmd.class.getName());
private static final String s_name = "configureovselementresponse";
@Inject
private List<VirtualRouterElementService> _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");
}
}
}

View File

@ -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<VirtualRouterElementService> _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<VirtualRouterElementService> _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<? extends OvsProvider> providers = _service.get(0).searchForOvsElement(this);
ListResponse<OvsProviderResponse> response = new ListResponse<OvsProviderResponse>();
List<OvsProviderResponse> providerResponses = new ArrayList<OvsProviderResponse>();
for (OvsProvider provider : providers) {
OvsProviderResponse providerResponse = _responseGenerator.createOvsProviderResponse(provider);
OvsProviderResponse providerResponse = _responseGenerator.createOvsProviderResponse(provider);
providerResponses.add(providerResponse);
}
response.setResponses(providerResponses);

View File

@ -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

View File

@ -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;
}
}

View File

@ -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<String, String> customParameters;
/////////////////////////////////////////////////////
@ -84,12 +84,12 @@ public class ScaleSystemVMCmd extends BaseAsyncCmd {
}
public Map<String, String> getCustomParameters() {
Map<String,String> customparameterMap = new HashMap<String, String>();
Map<String, String> customparameterMap = new HashMap<String, String>();
if (customParameters != null && customParameters.size() != 0) {
Collection parameterCollection = customParameters.values();
Iterator iter = parameterCollection.iterator();
while (iter.hasNext()) {
HashMap<String, String> value = (HashMap<String, String>) iter.next();
HashMap<String, String> value = (HashMap<String, String>)iter.next();
for (String key : value.keySet()) {
customparameterMap.put(key, value.get(key));
}

View File

@ -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<String, String> customParameters;
/////////////////////////////////////////////////////
@ -79,12 +79,12 @@ public class UpgradeSystemVMCmd extends BaseCmd {
}
public Map<String, String> getCustomParameters() {
Map<String,String> customparameterMap = new HashMap<String, String>();
if (customParameters != null && customParameters.size() !=0){
Map<String, String> customparameterMap = new HashMap<String, String>();
if (customParameters != null && customParameters.size() != 0) {
Collection parameterCollection = customParameters.values();
Iterator iter = parameterCollection.iterator();
while (iter.hasNext()) {
HashMap<String, String> value = (HashMap<String, String>) iter.next();
HashMap<String, String> value = (HashMap<String, String>)iter.next();
for (String key : value.keySet()) {
customparameterMap.put(key, value.get(key));
}

View File

@ -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;
}
}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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<List<? extends NetworkACL>,Integer> result = _networkACLService.listNetworkACLs(this);
public void execute() {
Pair<List<? extends NetworkACL>, Integer> result = _networkACLService.listNetworkACLs(this);
ListResponse<NetworkACLResponse> response = new ListResponse<NetworkACLResponse>();
List<NetworkACLResponse> aclResponses = new ArrayList<NetworkACLResponse>();
@ -96,6 +95,6 @@ public class ListNetworkACLListsCmd extends BaseListProjectAndAccountResourcesCm
}
response.setResponses(aclResponses, result.second());
response.setResponseName(getCommandName());
this.setResponseObject(response);
setResponseObject(response);
}
}

View File

@ -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);
}
}

View File

@ -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

View File

@ -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

View File

@ -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<String, String> getCustomParameters() {
Map<String,String> customparameterMap = new HashMap<String, String>();
if (customParameters != null && customParameters.size() !=0){
Map<String, String> customparameterMap = new HashMap<String, String>();
if (customParameters != null && customParameters.size() != 0) {
Collection parameterCollection = customParameters.values();
Iterator iter = parameterCollection.iterator();
while (iter.hasNext()) {
HashMap<String, String> value = (HashMap<String, String>) iter.next();
HashMap<String, String> value = (HashMap<String, String>)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<Long> getSecurityGroupIdList() {
if (securityGroupNameList != null && securityGroupIdList != null) {
throw new InvalidParameterValueException("securitygroupids parameter is mutually exclusive with securitygroupnames parameter");

View File

@ -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<String, String> 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<String, String> getCustomParameters() {
Map<String,String> customparameterMap = new HashMap<String, String>();
if (customParameters != null && customParameters.size() !=0){
Map<String, String> customparameterMap = new HashMap<String, String>();
if (customParameters != null && customParameters.size() != 0) {
Collection parameterCollection = customParameters.values();
Iterator iter = parameterCollection.iterator();
while (iter.hasNext()) {
HashMap<String, String> value = (HashMap<String, String>) iter.next();
HashMap<String, String> value = (HashMap<String, String>)iter.next();
for (String key : value.keySet()) {
customparameterMap.put(key, value.get(key));
}

View File

@ -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");
}

View File

@ -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<String, String> customParameters;
/////////////////////////////////////////////////////
@ -77,12 +77,12 @@ public class UpgradeVMCmd extends BaseCmd {
}
public Map<String, String> getCustomParameters() {
Map<String,String> customparameterMap = new HashMap<String, String>();
if (customParameters != null && customParameters.size() !=0){
Map<String, String> customparameterMap = new HashMap<String, String>();
if (customParameters != null && customParameters.size() != 0) {
Collection parameterCollection = customParameters.values();
Iterator iter = parameterCollection.iterator();
while (iter.hasNext()) {
HashMap<String, String> value = (HashMap<String, String>) iter.next();
HashMap<String, String> value = (HashMap<String, String>)iter.next();
for (String key : value.keySet()) {
customparameterMap.put(key, value.get(key));
}

View File

@ -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;
/////////////////////////////////////////////////////

View File

@ -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");
}

View File

@ -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;
// ///////////////////////////////////////////////////

View File

@ -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;
}
}

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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) {

View File

@ -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")

View File

@ -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;
}
}

View File

@ -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() {

View File

@ -42,10 +42,10 @@ public class CallContext {
private static final Logger s_logger = Logger.getLogger(CallContext.class);
private static ManagedThreadLocal<CallContext> s_currentContext = new ManagedThreadLocal<CallContext>();
private static ManagedThreadLocal<Stack<CallContext>> s_currentContextStack = new ManagedThreadLocal<Stack<CallContext>>() {
@Override
protected Stack<CallContext> initialValue() {
return new Stack<CallContext>();
}
@Override
protected Stack<CallContext> initialValue() {
return new Stack<CallContext>();
}
};
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;
}

View File

@ -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;

File diff suppressed because it is too large Load Diff

View File

@ -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;

File diff suppressed because it is too large Load Diff

View File

@ -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);

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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();

View File

@ -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;

View File

@ -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;
}
/**

View File

@ -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<CloudStackIngressRule> ingressRules = resp.getIngressRules();
@ -815,7 +815,7 @@ public class EC2Engine extends ManagerBase {
CloudStackIpAddress cloudIp = cloudIps.get(0);
List<CloudStackUserVm> 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<CloudStackTemplate> 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<CloudStackKeyValue> 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<CloudStackKeyValue> resourceTagSet)
throws Exception {
throws Exception {
List<CloudStackVolume> 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<CloudStackKeyValue> resourceTagSet)
throws Exception {
throws Exception {
String instId = instanceId != null ? instanceId : null;
List<CloudStackUserVm> 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");
}

View File

@ -1,56 +1,55 @@
<?xml version="1.0"?>
<!--
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
regarding copyright ownership. The ASF licenses this file
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,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!-- 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 regarding copyright ownership. The ASF licenses this file 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, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License. -->
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
<module name="FileTabCharacter">
<property name="eachLine" value="true" />
</module>
<module name="TreeWalker">
<module name="LineLength">
<property name="max" value="1024" />
</module>
<module name="TreeWalker">
<module name="LineLength">
<property name="max" value="1024"/>
</module>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="MemberName">
<property name="format" value="^[a-zA-Z_][a-zA-Z0-9]*$"/>
</module>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="TypeName"/>
<module name="AvoidStarImport"/>
</module>
<module name="RegexpSingleline">
<!-- \s matches whitespace character, $ matches end of line.-->
<property name="format" value="\s+$"/>
<property name="message" value="Line has trailing spaces."/>
<module name="RedundantImport" />
<module name="UnusedImports" />
<module name="MemberName">
<property name="format" value="^_?[a-zA-Z0-9]*$" />
</module>
<module name="LocalFinalVariableName">
<property name="format" value="^[a-zA-Z][a-zA-Z0-9_]*$" />
</module>
<module name="StaticVariableName">
<property name="format" value="^(s_)?[a-z][a-zA-Z0-9]*$"/>
</module>
<module name="ConstantName">
<property name="format" value="^[a-zA-Z][a-zA-Z0-9_]*$"/>
</module>
<!-- some modules that we should soon add
<module name="MagicNumber"/> -->
<module name="PackageName" />
<module name="ParameterName" />
<module name="TypeName" />
<module name="AvoidStarImport" />
</module>
<module name="RegexpSingleline">
<!-- \s matches whitespace character, $ matches end of line. -->
<property name="format" value="\s+$" />
<property name="message" value="Line has trailing spaces." />
</module>
<!-- some modules that we should soon add -->
<!-- some modules that we should soon add <module name="MagicNumber"/> -->
<!-- some modules that we should soon add -->
</module>

View File

@ -84,7 +84,7 @@ public class AttachVolumeCommand extends Command {
}
public String getVolumeName() {
return volumeName;
return volumeName;
}
public Long getVolumeSize() {

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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);
}
}

View File

@ -21,26 +21,26 @@ import java.util.Map;
public class PerformanceMonitorCommand extends Command {
Map<String, String> params = new HashMap<String, String>();
Map<String, String> params = new HashMap<String, String>();
public PerformanceMonitorCommand() {
}
public PerformanceMonitorCommand() {
}
public PerformanceMonitorCommand(Map<String, String> params, int wait) {
setWait(wait);
this.params = params;
}
public PerformanceMonitorCommand(Map<String, String> params, int wait) {
setWait(wait);
this.params = params;
}
@Override
public boolean executeInSequence() {
return false;
}
@Override
public boolean executeInSequence() {
return false;
}
public Map<String, String> getParams() {
return params;
}
public Map<String, String> getParams() {
return params;
}
public void setParams(Map<String, String> params) {
this.params = params;
}
public void setParams(Map<String, String> params) {
this.params = params;
}
}

Some files were not shown because too many files have changed in this diff Show More