You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/11/21 23:11:16 UTC
[47/69] [abbrv] [partial] Reformatted all of the code.
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java b/api/src/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java
index 359dc9d..2b0f827 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java
@@ -19,6 +19,8 @@ package org.apache.cloudstack.api.command.admin.resource;
import java.text.DecimalFormat;
import java.util.List;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListCmd;
@@ -28,7 +30,6 @@ import org.apache.cloudstack.api.response.ClusterResponse;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.PodResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
import com.cloud.capacity.Capacity;
import com.cloud.exception.InvalidParameterValueException;
@@ -51,17 +52,19 @@ public class ListCapacityCmd extends BaseListCmd {
@Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "lists capacity by the Pod ID")
private Long podId;
- @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, since = "3.0.0", description = "lists capacity by the Cluster ID")
+ @Parameter(name = ApiConstants.CLUSTER_ID,
+ type = CommandType.UUID,
+ entityType = ClusterResponse.class,
+ since = "3.0.0",
+ description = "lists capacity by the Cluster ID")
private Long clusterId;
@Parameter(name = ApiConstants.FETCH_LATEST, type = CommandType.BOOLEAN, since = "3.0.0", description = "recalculate capacities and fetch the latest")
private Boolean fetchLatest;
@Parameter(name = ApiConstants.TYPE, type = CommandType.INTEGER, description = "lists capacity by type" + "* CAPACITY_TYPE_MEMORY = 0" + "* CAPACITY_TYPE_CPU = 1"
- + "* CAPACITY_TYPE_STORAGE = 2" + "* CAPACITY_TYPE_STORAGE_ALLOCATED = 3"
- + "* CAPACITY_TYPE_VIRTUAL_NETWORK_PUBLIC_IP = 4" + "* CAPACITY_TYPE_PRIVATE_IP = 5"
- + "* CAPACITY_TYPE_SECONDARY_STORAGE = 6" + "* CAPACITY_TYPE_VLAN = 7"
- + "* CAPACITY_TYPE_DIRECT_ATTACHED_PUBLIC_IP = 8" + "* CAPACITY_TYPE_LOCAL_STORAGE = 9.")
+ + "* CAPACITY_TYPE_STORAGE = 2" + "* CAPACITY_TYPE_STORAGE_ALLOCATED = 3" + "* CAPACITY_TYPE_VIRTUAL_NETWORK_PUBLIC_IP = 4" + "* CAPACITY_TYPE_PRIVATE_IP = 5"
+ + "* CAPACITY_TYPE_SECONDARY_STORAGE = 6" + "* CAPACITY_TYPE_VLAN = 7" + "* CAPACITY_TYPE_DIRECT_ATTACHED_PUBLIC_IP = 8" + "* CAPACITY_TYPE_LOCAL_STORAGE = 9.")
private Integer type;
@Parameter(name = ApiConstants.SORT_BY, type = CommandType.STRING, since = "3.0.0", description = "Sort the results. Available values: Usage")
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/resource/UploadCustomCertificateCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/resource/UploadCustomCertificateCmd.java b/api/src/org/apache/cloudstack/api/command/admin/resource/UploadCustomCertificateCmd.java
index 5673a49..68ef5ac 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/resource/UploadCustomCertificateCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/resource/UploadCustomCertificateCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.resource;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -23,7 +25,6 @@ import org.apache.cloudstack.api.BaseAsyncCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.CustomCertificateResponse;
-import org.apache.log4j.Logger;
import com.cloud.event.EventTypes;
import com.cloud.user.Account;
@@ -48,7 +49,11 @@ public class UploadCustomCertificateCmd extends BaseAsyncCmd {
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = false, description = "A name / alias for the certificate.")
private String alias;
- @Parameter(name = ApiConstants.PRIVATE_KEY, type = CommandType.STRING, required = false, description = "The private key for the attached certificate.", length = 65535)
+ @Parameter(name = ApiConstants.PRIVATE_KEY,
+ type = CommandType.STRING,
+ required = false,
+ description = "The private key for the attached certificate.",
+ length = 65535)
private String privateKey;
@Parameter(name = ApiConstants.DOMAIN_SUFFIX, type = CommandType.STRING, required = true, description = "DNS domain suffix that the certificate is granted for.")
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java
index 69ae028..2cfefda 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java
@@ -20,6 +20,8 @@ import java.util.List;
import javax.inject.Inject;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -30,8 +32,6 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.VirtualRouterProviderResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
@@ -110,10 +110,12 @@ public class ConfigureVirtualRouterElementCmd extends BaseAsyncCmd {
return "configuring virtual router provider: " + id;
}
+ @Override
public ApiCommandJobType getInstanceType() {
return ApiCommandJobType.None;
}
+ @Override
public Long getInstanceId() {
return id;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java
index 7640cef..bf5eb18 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java
@@ -20,6 +20,8 @@ import java.util.List;
import javax.inject.Inject;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -30,8 +32,6 @@ import org.apache.cloudstack.api.response.ProviderResponse;
import org.apache.cloudstack.api.response.VirtualRouterProviderResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.exception.ResourceAllocationException;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java
index 10e5dae..2ad312e 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.router;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,8 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.DomainRouterResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.ResourceUnavailableException;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java
index 7bbc459..9c91e0f 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.router;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -30,7 +32,6 @@ import org.apache.cloudstack.api.response.PodResponse;
import org.apache.cloudstack.api.response.UserVmResponse;
import org.apache.cloudstack.api.response.VpcResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
import com.cloud.network.router.VirtualRouter.Role;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java
index 4c91beb..4f04018 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java
@@ -21,6 +21,8 @@ import java.util.List;
import javax.inject.Inject;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListCmd;
@@ -30,7 +32,6 @@ import org.apache.cloudstack.api.command.user.network.ListNetworkOfferingsCmd;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.ProviderResponse;
import org.apache.cloudstack.api.response.VirtualRouterProviderResponse;
-import org.apache.log4j.Logger;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
@@ -97,7 +98,8 @@ public class ListVirtualRouterElementsCmd extends BaseListCmd {
}
@Override
- public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
+ public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+ ResourceAllocationException {
List<? extends VirtualRouterProvider> providers = _service.get(0).searchForVirtualRouterElement(this);
ListResponse<VirtualRouterProviderResponse> response = new ListResponse<VirtualRouterProviderResponse>();
List<VirtualRouterProviderResponse> providerResponses = new ArrayList<VirtualRouterProviderResponse>();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java
index 880cbde..15527d3 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.router;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,8 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.DomainRouterResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
@@ -84,10 +84,12 @@ public class RebootRouterCmd extends BaseAsyncCmd {
return "rebooting router: " + getId();
}
+ @Override
public ApiCommandJobType getInstanceType() {
return ApiCommandJobType.DomainRouter;
}
+ @Override
public Long getInstanceId() {
return getId();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java
index 23a542e..9196cd0 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.router;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,8 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.DomainRouterResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
@@ -90,10 +90,12 @@ public class StartRouterCmd extends BaseAsyncCmd {
return "starting router: " + getId();
}
+ @Override
public ApiCommandJobType getInstanceType() {
return ApiCommandJobType.DomainRouter;
}
+ @Override
public Long getInstanceId() {
return getId();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java
index f2209cf..ee2b9eb 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.router;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,8 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.DomainRouterResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InvalidParameterValueException;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java
index d9bc9f8..04a4e67 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.router;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -24,7 +26,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.DomainRouterResponse;
import org.apache.cloudstack.api.response.ServiceOfferingResponse;
-import org.apache.log4j.Logger;
import com.cloud.network.router.VirtualRouter;
import com.cloud.user.Account;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterTemplateCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterTemplateCmd.java
index 296071f..3a20a51 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterTemplateCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterTemplateCmd.java
@@ -16,12 +16,9 @@
// under the License.
package org.apache.cloudstack.api.command.admin.router;
-import com.cloud.event.EventTypes;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.network.router.VirtualRouter;
-import com.cloud.user.Account;
+import java.util.List;
+import java.util.logging.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -35,13 +32,14 @@ import org.apache.cloudstack.api.response.DomainResponse;
import org.apache.cloudstack.api.response.DomainRouterResponse;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.PodResponse;
-import org.apache.cloudstack.api.response.SuccessResponse;
import org.apache.cloudstack.api.response.UpgradeRouterTemplateResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
import org.apache.cloudstack.context.CallContext;
-import java.util.List;
-import java.util.logging.Logger;
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InsufficientCapacityException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.user.Account;
@APICommand(name = "upgradeRouterTemplate", description = "Upgrades router to use newer template", responseObject = BaseResponse.class)
public class UpgradeRouterTemplateCmd extends org.apache.cloudstack.api.BaseCmd {
@@ -55,7 +53,10 @@ public class UpgradeRouterTemplateCmd extends org.apache.cloudstack.api.BaseCmd
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, description = "upgrades router with the specified Id")
private Long id;
- @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "upgrades all routers within the specified cluster")
+ @Parameter(name = ApiConstants.CLUSTER_ID,
+ type = CommandType.UUID,
+ entityType = ClusterResponse.class,
+ description = "upgrades all routers within the specified cluster")
private Long clusterId;
@Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "upgrades all routers within the specified pod")
@@ -64,10 +65,16 @@ public class UpgradeRouterTemplateCmd extends org.apache.cloudstack.api.BaseCmd
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "upgrades all routers within the specified zone")
private Long zoneId;
- @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "upgrades all routers owned by the specified account")
+ @Parameter(name = ApiConstants.ACCOUNT_ID,
+ type = CommandType.UUID,
+ entityType = AccountResponse.class,
+ description = "upgrades all routers owned by the specified account")
private Long accountId;
- @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "upgrades all routers owned by the specified domain")
+ @Parameter(name = ApiConstants.DOMAIN_ID,
+ type = CommandType.UUID,
+ entityType = DomainResponse.class,
+ description = "upgrades all routers owned by the specified domain")
private Long domainId;
/////////////////////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/AddImageStoreCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/AddImageStoreCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/AddImageStoreCmd.java
index 1446823..5dcedff 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/AddImageStoreCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/AddImageStoreCmd.java
@@ -21,6 +21,8 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -29,7 +31,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.ImageStoreResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
import com.cloud.exception.DiscoveryException;
import com.cloud.storage.ImageStore;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
index 4d015ae..cc6680b 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java
@@ -34,6 +34,8 @@ import static org.apache.cloudstack.api.BaseCmd.CommandType.STRING;
import java.util.HashMap;
import java.util.Map;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -41,7 +43,6 @@ import org.apache.cloudstack.api.BaseCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.ImageStoreResponse;
-import org.apache.log4j.Logger;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.DiscoveryException;
@@ -82,8 +83,8 @@ public final class AddS3Cmd extends BaseCmd {
private Integer socketTimeout = null;
@Override
- public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException,
- NetworkRuleConflictException {
+ public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+ ResourceAllocationException, NetworkRuleConflictException {
AddImageStoreCmd cmd = new AddImageStoreCmd() {
@Override
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java
index 76dbd45..b1c5594 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.storage;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,8 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.StoragePoolResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.exception.ResourceUnavailableException;
import com.cloud.storage.StoragePool;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java
index f9d9a08..1480e75 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java
@@ -18,8 +18,13 @@
*/
package org.apache.cloudstack.api.command.admin.storage;
-import com.cloud.storage.ImageStore;
-import com.cloud.user.Account;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -28,12 +33,9 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.ImageStoreResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
+import com.cloud.storage.ImageStore;
+import com.cloud.user.Account;
@APICommand(name = "createSecondaryStagingStore", description = "create secondary staging store.", responseObject = ImageStoreResponse.class)
public class CreateSecondaryStagingStoreCmd extends BaseCmd {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java
index a939567..dfd0026 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java
@@ -19,6 +19,8 @@ package org.apache.cloudstack.api.command.admin.storage;
import java.net.UnknownHostException;
import java.util.Map;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -29,7 +31,6 @@ import org.apache.cloudstack.api.response.ClusterResponse;
import org.apache.cloudstack.api.response.PodResponse;
import org.apache.cloudstack.api.response.StoragePoolResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
import com.cloud.exception.ResourceInUseException;
import com.cloud.exception.ResourceUnavailableException;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteImageStoreCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteImageStoreCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteImageStoreCmd.java
index 24a5ccc..602da83 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteImageStoreCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteImageStoreCmd.java
@@ -16,16 +16,16 @@
// under the License.
package org.apache.cloudstack.api.command.admin.storage;
+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.Parameter;
import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.response.HostResponse;
import org.apache.cloudstack.api.response.ImageStoreResponse;
import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.log4j.Logger;
import com.cloud.user.Account;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/DeletePoolCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/DeletePoolCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/DeletePoolCmd.java
index e21ce88..fb63daa 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/DeletePoolCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/DeletePoolCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.storage;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -24,7 +26,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.StoragePoolResponse;
import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.log4j.Logger;
import com.cloud.storage.StoragePool;
import com.cloud.storage.StoragePoolStatus;
@@ -43,7 +44,7 @@ public class DeletePoolCmd extends BaseCmd {
private Long id;
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force destroy storage pool "
- + "(force expunge volumes in Destroyed state as a part of pool removal)")
+ + "(force expunge volumes in Destroyed state as a part of pool removal)")
private Boolean forced;
// ///////////////////////////////////////////////////
@@ -81,7 +82,8 @@ public class DeletePoolCmd extends BaseCmd {
} else {
StoragePool pool = _storageService.getStoragePool(id);
if (pool != null && pool.getStatus() == StoragePoolStatus.Removed) {
- throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to finish storage pool removal. The storage pool will not be used but cleanup is needed");
+ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR,
+ "Failed to finish storage pool removal. The storage pool will not be used but cleanup is needed");
} else {
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete storage pool");
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java
index 8d0ede4..caf937f 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.storage;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -24,7 +26,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.ImageStoreResponse;
import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.log4j.Logger;
import com.cloud.user.Account;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/FindStoragePoolsForMigrationCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/FindStoragePoolsForMigrationCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/FindStoragePoolsForMigrationCmd.java
index 4f7f67d..10813ca 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/FindStoragePoolsForMigrationCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/FindStoragePoolsForMigrationCmd.java
@@ -16,8 +16,11 @@
// under the License.
package org.apache.cloudstack.api.command.admin.storage;
-import com.cloud.storage.StoragePool;
-import com.cloud.utils.Pair;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,10 +29,9 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.StoragePoolResponse;
import org.apache.cloudstack.api.response.VolumeResponse;
-import org.apache.log4j.Logger;
-import java.util.ArrayList;
-import java.util.List;
+import com.cloud.storage.StoragePool;
+import com.cloud.utils.Pair;
@APICommand(name = "findStoragePoolsForMigration", description = "Lists storage pools available for migration of a volume.", responseObject = StoragePoolResponse.class)
public class FindStoragePoolsForMigrationCmd extends BaseListCmd {
@@ -61,6 +63,7 @@ public class FindStoragePoolsForMigrationCmd extends BaseListCmd {
return s_name;
}
+ @Override
public ApiCommandJobType getInstanceType() {
return ApiCommandJobType.StoragePool;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/ListImageStoresCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListImageStoresCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/ListImageStoresCmd.java
index 2c2ca75..bf47084 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/ListImageStoresCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/ListImageStoresCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.storage;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListCmd;
@@ -23,7 +25,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.response.ImageStoreResponse;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
@APICommand(name = "listImageStores", description = "Lists image stores.", responseObject = ImageStoreResponse.class, since = "4.2.0")
public class ListImageStoresCmd extends BaseListCmd {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/ListS3sCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListS3sCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/ListS3sCmd.java
index bfb5852..362d69e 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/ListS3sCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/ListS3sCmd.java
@@ -23,6 +23,7 @@ import org.apache.cloudstack.api.BaseListCmd;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.ImageStoreResponse;
import org.apache.cloudstack.api.response.ListResponse;
+
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.NetworkRuleConflictException;
@@ -35,8 +36,8 @@ public class ListS3sCmd extends BaseListCmd {
private static final String COMMAND_NAME = "lists3sresponse";
@Override
- public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException,
- NetworkRuleConflictException {
+ public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+ ResourceAllocationException, NetworkRuleConflictException {
ListImageStoresCmd cmd = new ListImageStoresCmd();
cmd.setProvider("S3");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java
index bd93202..171f971 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.storage;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListCmd;
@@ -23,7 +25,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.response.ImageStoreResponse;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
@APICommand(name = "listSecondaryStagingStores", description = "Lists secondary staging stores.", responseObject = ImageStoreResponse.class, since = "4.2.0")
public class ListSecondaryStagingStoresCmd extends BaseListCmd {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java
index a214c60..868b402 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.storage;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,7 +28,6 @@ import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.PodResponse;
import org.apache.cloudstack.api.response.StoragePoolResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
@APICommand(name = "listStoragePools", description = "Lists storage pools.", responseObject = StoragePoolResponse.class)
public class ListStoragePoolsCmd extends BaseListCmd {
@@ -38,7 +39,10 @@ public class ListStoragePoolsCmd extends BaseListCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
- @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "list storage pools belongig to the specific cluster")
+ @Parameter(name = ApiConstants.CLUSTER_ID,
+ type = CommandType.UUID,
+ entityType = ClusterResponse.class,
+ description = "list storage pools belongig to the specific cluster")
private Long clusterId;
@Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, description = "the IP address for the storage pool")
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java
index 3ba6178..bac6b7c 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java
@@ -20,6 +20,8 @@ package org.apache.cloudstack.api.command.admin.storage;
import java.util.List;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -28,7 +30,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.StorageProviderResponse;
-import org.apache.log4j.Logger;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
@@ -54,8 +55,8 @@ public class ListStorageProvidersCmd extends BaseListCmd {
}
@Override
- public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException,
- NetworkRuleConflictException {
+ public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+ ResourceAllocationException, NetworkRuleConflictException {
if (getType() == null) {
throw new ServerApiException(ApiErrorCode.MALFORMED_PARAMETER_ERROR, "need to specify type: either primary or image");
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/PreparePrimaryStorageForMaintenanceCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/PreparePrimaryStorageForMaintenanceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/PreparePrimaryStorageForMaintenanceCmd.java
index cede60d..9d11966 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/PreparePrimaryStorageForMaintenanceCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/PreparePrimaryStorageForMaintenanceCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.storage;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,8 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.StoragePoolResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.exception.InsufficientCapacityException;
import com.cloud.exception.ResourceUnavailableException;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java
index 6441c93..50be6ba 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java
@@ -18,6 +18,8 @@ package org.apache.cloudstack.api.command.admin.storage;
import java.util.List;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -25,7 +27,6 @@ import org.apache.cloudstack.api.BaseCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.StoragePoolResponse;
-import org.apache.log4j.Logger;
import com.cloud.storage.StoragePool;
import com.cloud.user.Account;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java b/api/src/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java
index 70045d9..3b684f4 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java
@@ -19,6 +19,8 @@ package org.apache.cloudstack.api.command.admin.swift;
import java.util.HashMap;
import java.util.Map;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -27,7 +29,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.command.admin.storage.AddImageStoreCmd;
import org.apache.cloudstack.api.response.ImageStoreResponse;
-import org.apache.log4j.Logger;
import com.cloud.exception.DiscoveryException;
import com.cloud.storage.ImageStore;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java
index b782dc0..fcc8e46 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.swift;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListCmd;
@@ -23,7 +25,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.command.admin.storage.ListImageStoresCmd;
import org.apache.cloudstack.api.response.ImageStoreResponse;
import org.apache.cloudstack.api.response.ListResponse;
-import org.apache.log4j.Logger;
import com.cloud.user.Account;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java
index 6f7321f..07e111c 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.systemvm;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,8 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.SystemVmResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.user.Account;
import com.cloud.vm.VirtualMachine;
@@ -38,7 +38,11 @@ public class DestroySystemVmCmd extends BaseAsyncCmd {
private static final String s_name = "destroysystemvmresponse";
- @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, description = "The ID of the system virtual machine")
+ @Parameter(name = ApiConstants.ID,
+ type = CommandType.UUID,
+ entityType = SystemVmResponse.class,
+ required = true,
+ description = "The ID of the system virtual machine")
private Long id;
public Long getId() {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java
index 10ca470..9480497 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java
@@ -19,6 +19,8 @@ package org.apache.cloudstack.api.command.admin.systemvm;
import java.util.ArrayList;
import java.util.List;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -30,7 +32,6 @@ import org.apache.cloudstack.api.response.PodResponse;
import org.apache.cloudstack.api.response.StoragePoolResponse;
import org.apache.cloudstack.api.response.SystemVmResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
import com.cloud.utils.Pair;
import com.cloud.vm.VirtualMachine;
@@ -60,7 +61,9 @@ public class ListSystemVMsCmd extends BaseListCmd {
@Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "the state of the system VM")
private String state;
- @Parameter(name = ApiConstants.SYSTEM_VM_TYPE, type = CommandType.STRING, description = "the system VM type. Possible types are \"consoleproxy\" and \"secondarystoragevm\".")
+ @Parameter(name = ApiConstants.SYSTEM_VM_TYPE,
+ type = CommandType.STRING,
+ description = "the system VM type. Possible types are \"consoleproxy\" and \"secondarystoragevm\".")
private String systemVmType;
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID of the system VM")
@@ -118,6 +121,7 @@ public class ListSystemVMsCmd extends BaseListCmd {
return s_name;
}
+ @Override
public ApiCommandJobType getInstanceType() {
return ApiCommandJobType.SystemVm;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java
index ec36ecc..8199e68 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java
@@ -16,15 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.systemvm;
-import com.cloud.event.EventTypes;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.exception.ManagementServerException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.exception.VirtualMachineMigrationException;
-import com.cloud.host.Host;
-import com.cloud.user.Account;
-import com.cloud.vm.VirtualMachine;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -34,7 +27,16 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.HostResponse;
import org.apache.cloudstack.api.response.SystemVmResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
+
+import com.cloud.event.EventTypes;
+import com.cloud.exception.ConcurrentOperationException;
+import com.cloud.exception.InvalidParameterValueException;
+import com.cloud.exception.ManagementServerException;
+import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.exception.VirtualMachineMigrationException;
+import com.cloud.host.Host;
+import com.cloud.user.Account;
+import com.cloud.vm.VirtualMachine;
@APICommand(name = "migrateSystemVm", description = "Attempts Migration of a system virtual machine to the host specified.", responseObject = SystemVmResponse.class)
public class MigrateSystemVMCmd extends BaseAsyncCmd {
@@ -46,10 +48,18 @@ public class MigrateSystemVMCmd extends BaseAsyncCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
- @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "destination Host ID to migrate VM to")
+ @Parameter(name = ApiConstants.HOST_ID,
+ type = CommandType.UUID,
+ entityType = HostResponse.class,
+ required = true,
+ description = "destination Host ID to migrate VM to")
private Long hostId;
- @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, description = "the ID of the virtual machine")
+ @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID,
+ type = CommandType.UUID,
+ entityType = SystemVmResponse.class,
+ required = true,
+ description = "the ID of the virtual machine")
private Long virtualMachineId;
/////////////////////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java
index e6bf5fd..1c38b05 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.systemvm;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,8 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.SystemVmResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.user.Account;
import com.cloud.vm.VirtualMachine;
@@ -42,7 +42,11 @@ public class RebootSystemVmCmd extends BaseAsyncCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
- @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, description = "The ID of the system virtual machine")
+ @Parameter(name = ApiConstants.ID,
+ type = CommandType.UUID,
+ entityType = SystemVmResponse.class,
+ required = true,
+ description = "The ID of the system virtual machine")
private Long id;
/////////////////////////////////////////////////////
@@ -87,10 +91,12 @@ public class RebootSystemVmCmd extends BaseAsyncCmd {
return "rebooting system vm: " + getId();
}
+ @Override
public ApiCommandJobType getInstanceType() {
return ApiCommandJobType.SystemVm;
}
+ @Override
public Long getInstanceId() {
return getId();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java
index 7a2d6a1..a7c864d 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java
@@ -39,8 +39,10 @@ import com.cloud.offering.ServiceOffering;
import com.cloud.user.Account;
import com.cloud.vm.VirtualMachine;
-@APICommand(name = "scaleSystemVm", responseObject = SystemVmResponse.class, description = "Scale the service offering for a system vm (console proxy or secondary storage). "
- + "The system vm must be in a \"Stopped\" state for " + "this command to take effect.")
+@APICommand(name = "scaleSystemVm",
+ responseObject = SystemVmResponse.class,
+ description = "Scale the service offering for a system vm (console proxy or secondary storage). " + "The system vm must be in a \"Stopped\" state for "
+ + "this command to take effect.")
public class ScaleSystemVMCmd extends BaseAsyncCmd {
public static final Logger s_logger = Logger.getLogger(UpgradeVMCmd.class.getName());
private static final String s_name = "changeserviceforsystemvmresponse";
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java
index 3c65672..2e65928 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.systemvm;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,8 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.SystemVmResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.user.Account;
import com.cloud.vm.VirtualMachine;
@@ -42,7 +42,11 @@ public class StartSystemVMCmd extends BaseAsyncCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
- @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, description = "The ID of the system virtual machine")
+ @Parameter(name = ApiConstants.ID,
+ type = CommandType.UUID,
+ entityType = SystemVmResponse.class,
+ required = true,
+ description = "The ID of the system virtual machine")
private Long id;
/////////////////////////////////////////////////////
@@ -91,10 +95,12 @@ public class StartSystemVMCmd extends BaseAsyncCmd {
return "starting system vm: " + getId();
}
+ @Override
public ApiCommandJobType getInstanceType() {
return ApiCommandJobType.SystemVm;
}
+ @Override
public Long getInstanceId() {
return getId();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java
index 1760018..7709ebe 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.systemvm;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,8 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.SystemVmResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.ResourceUnavailableException;
@@ -44,7 +44,11 @@ public class StopSystemVmCmd extends BaseAsyncCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
- @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, description = "The ID of the system virtual machine")
+ @Parameter(name = ApiConstants.ID,
+ type = CommandType.UUID,
+ entityType = SystemVmResponse.class,
+ required = true,
+ description = "The ID of the system virtual machine")
private Long id;
@Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM. The caller knows the VM is stopped.")
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java
index cbdebe1..1357a7d 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java
@@ -37,7 +37,7 @@ import com.cloud.vm.VirtualMachine;
@APICommand(name = "changeServiceForSystemVm",
responseObject = SystemVmResponse.class,
description = "Changes the service offering for a system vm (console proxy or secondary storage). " + "The system vm must be in a \"Stopped\" state for "
- + "this command to take effect.")
+ + "this command to take effect.")
public class UpgradeSystemVMCmd extends BaseCmd {
public static final Logger s_logger = Logger.getLogger(UpgradeVMCmd.class.getName());
private static final String s_name = "changeserviceforsystemvmresponse";
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java
index 507b9af..16761ba 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java
@@ -18,6 +18,8 @@ package org.apache.cloudstack.api.command.admin.template;
import java.util.List;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseCmd;
@@ -25,7 +27,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.TemplateResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
import com.cloud.template.VirtualMachineTemplate;
import com.cloud.user.Account;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficMonitorCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficMonitorCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficMonitorCmd.java
index a85d757..031fc8d 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficMonitorCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficMonitorCmd.java
@@ -16,7 +16,7 @@
// under the License.
package org.apache.cloudstack.api.command.admin.usage;
-import javax.inject.Inject;
+import org.apache.log4j.Logger;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,7 +26,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.TrafficMonitorResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.host.Host;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java
index 4e5c91a..e6e18cb 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.usage;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -27,8 +29,6 @@ import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
import org.apache.cloudstack.api.response.TrafficTypeResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.exception.ResourceAllocationException;
import com.cloud.network.PhysicalNetworkTrafficType;
@@ -147,8 +147,9 @@ public class AddTrafficTypeCmd extends BaseAsyncCreateCmd {
@Override
public void create() throws ResourceAllocationException {
- PhysicalNetworkTrafficType result = _networkService.addTrafficTypeToPhysicalNetwork(getPhysicalNetworkId(), getTrafficType(), getXenLabel(), getKvmLabel(),
- getVmwareLabel(), getSimulatorLabel(), getVlan(), getHypervLabel());
+ PhysicalNetworkTrafficType result =
+ _networkService.addTrafficTypeToPhysicalNetwork(getPhysicalNetworkId(), getTrafficType(), getXenLabel(), getKvmLabel(), getVmwareLabel(),
+ getSimulatorLabel(), getVlan(), getHypervLabel());
if (result != null) {
setEntityId(result.getId());
setEntityUuid(result.getUuid());
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficMonitorCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficMonitorCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficMonitorCmd.java
index d650ce6..debaf00 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficMonitorCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficMonitorCmd.java
@@ -16,7 +16,7 @@
// under the License.
package org.apache.cloudstack.api.command.admin.usage;
-import javax.inject.Inject;
+import org.apache.log4j.Logger;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
@@ -26,7 +26,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.HostResponse;
import org.apache.cloudstack.api.response.SuccessResponse;
-import org.apache.log4j.Logger;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.user.Account;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java
index 583cf71..111e177 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.usage;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -25,7 +27,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.SuccessResponse;
import org.apache.cloudstack.api.response.TrafficTypeResponse;
-import org.apache.log4j.Logger;
import com.cloud.event.EventTypes;
import com.cloud.user.Account;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java
index 11bdc86..4fc36ab 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java
@@ -18,12 +18,17 @@ package org.apache.cloudstack.api.command.admin.usage;
import java.util.Date;
-import org.apache.cloudstack.api.*;
-import org.apache.cloudstack.api.response.DomainResponse;
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.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.response.DomainResponse;
import org.apache.cloudstack.api.response.SuccessResponse;
+
import com.cloud.user.Account;
@APICommand(name = "generateUsageRecords",
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/usage/GetUsageRecordsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/GetUsageRecordsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/GetUsageRecordsCmd.java
index ef1bba7..a8bd1e5 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/usage/GetUsageRecordsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/usage/GetUsageRecordsCmd.java
@@ -20,6 +20,8 @@ import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListCmd;
@@ -30,7 +32,6 @@ import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.ProjectResponse;
import org.apache.cloudstack.api.response.UsageRecordResponse;
import org.apache.cloudstack.usage.Usage;
-import org.apache.log4j.Logger;
import com.cloud.utils.Pair;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java
index 49cab07..3592539 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java
@@ -19,7 +19,7 @@ package org.apache.cloudstack.api.command.admin.usage;
import java.util.ArrayList;
import java.util.List;
-import javax.inject.Inject;
+import org.apache.log4j.Logger;
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
@@ -29,7 +29,6 @@ import org.apache.cloudstack.api.command.user.offering.ListServiceOfferingsCmd;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.TrafficMonitorResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
-import org.apache.log4j.Logger;
import com.cloud.host.Host;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java
index 38d6e6c..3a1dfba 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java
@@ -19,6 +19,8 @@ package org.apache.cloudstack.api.command.admin.usage;
import java.util.ArrayList;
import java.util.List;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListCmd;
@@ -26,7 +28,6 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.TrafficTypeImplementorResponse;
-import org.apache.log4j.Logger;
import com.cloud.exception.ConcurrentOperationException;
import com.cloud.exception.InsufficientCapacityException;
@@ -61,7 +62,8 @@ public class ListTrafficTypeImplementorsCmd extends BaseListCmd {
}
@Override
- public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException {
+ public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException,
+ ResourceAllocationException {
List<Pair<TrafficType, String>> results = _networkService.listTrafficTypeImplementor(this);
ListResponse<TrafficTypeImplementorResponse> response = new ListResponse<TrafficTypeImplementorResponse>();
List<TrafficTypeImplementorResponse> responses = new ArrayList<TrafficTypeImplementorResponse>();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java
index 2ef7cb0..378058f 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java
@@ -19,6 +19,8 @@ package org.apache.cloudstack.api.command.admin.usage;
import java.util.ArrayList;
import java.util.List;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListCmd;
@@ -27,7 +29,6 @@ import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
import org.apache.cloudstack.api.response.ProviderResponse;
import org.apache.cloudstack.api.response.TrafficTypeResponse;
-import org.apache.log4j.Logger;
import com.cloud.network.PhysicalNetworkTrafficType;
import com.cloud.user.Account;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/usage/ListUsageTypesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/ListUsageTypesCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/ListUsageTypesCmd.java
index bc02911..b5e445b 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/usage/ListUsageTypesCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/usage/ListUsageTypesCmd.java
@@ -18,12 +18,13 @@ package org.apache.cloudstack.api.command.admin.usage;
import java.util.List;
-import org.apache.cloudstack.api.APICommand;
import org.apache.log4j.Logger;
+import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.BaseCmd;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.UsageTypeResponse;
+
import com.cloud.user.Account;
@APICommand(name = "listUsageTypes", description = "List Usage Types", responseObject = UsageTypeResponse.class)
@@ -36,6 +37,7 @@ public class ListUsageTypesCmd extends BaseCmd {
return s_name;
}
+ @Override
public long getEntityOwnerId() {
return Account.ACCOUNT_ID_SYSTEM;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java
index 8a56031..2ad470e 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.usage;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiCommandJobType;
import org.apache.cloudstack.api.ApiConstants;
@@ -23,9 +25,7 @@ import org.apache.cloudstack.api.ApiErrorCode;
import org.apache.cloudstack.api.BaseAsyncCmd;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
-import org.apache.cloudstack.api.BaseCmd.CommandType;
import org.apache.cloudstack.api.response.TrafficTypeResponse;
-import org.apache.log4j.Logger;
import com.cloud.event.EventTypes;
import com.cloud.network.PhysicalNetworkTrafficType;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java
index 4448a0d..03512db 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.api.command.admin.user;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -26,8 +28,6 @@ import org.apache.cloudstack.api.response.DomainResponse;
import org.apache.cloudstack.api.response.UserResponse;
import org.apache.cloudstack.context.CallContext;
-import org.apache.log4j.Logger;
-
import com.cloud.user.Account;
import com.cloud.user.User;
@@ -150,8 +150,9 @@ public class CreateUserCmd extends BaseCmd {
@Override
public void execute() {
CallContext.current().setEventDetails("UserName: " + getUserName() + ", FirstName :" + getFirstName() + ", LastName: " + getLastName());
- User user = _accountService.createUser(getUserName(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimezone(), getAccountName(), getDomainId(),
- getUserUUID());
+ User user =
+ _accountService.createUser(getUserName(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimezone(), getAccountName(), getDomainId(),
+ getUserUUID());
if (user != null) {
UserResponse response = _responseGenerator.createUserResponse(user);
response.setResponseName(getCommandName());
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java
index 02fbf4d..6ba382a 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java
@@ -18,6 +18,8 @@ package org.apache.cloudstack.api.command.admin.user;
import javax.inject.Inject;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -29,8 +31,6 @@ import org.apache.cloudstack.api.response.UserResponse;
import org.apache.cloudstack.context.CallContext;
import org.apache.cloudstack.region.RegionService;
-import org.apache.log4j.Logger;
-
import com.cloud.user.Account;
import com.cloud.user.User;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java
index 26af9ff..599328d 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java
@@ -18,20 +18,19 @@ package org.apache.cloudstack.api.command.admin.user;
import javax.inject.Inject;
+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.APICommand;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.response.UserResponse;
import org.apache.cloudstack.context.CallContext;
import org.apache.cloudstack.region.RegionService;
-import org.apache.log4j.Logger;
-
import com.cloud.event.EventTypes;
import com.cloud.user.Account;
import com.cloud.user.User;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d620df2b/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java
index 8088f9d..8d37eda 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java
@@ -18,6 +18,8 @@ package org.apache.cloudstack.api.command.admin.user;
import javax.inject.Inject;
+import org.apache.log4j.Logger;
+
import org.apache.cloudstack.api.APICommand;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.ApiErrorCode;
@@ -28,8 +30,6 @@ import org.apache.cloudstack.api.response.UserResponse;
import org.apache.cloudstack.context.CallContext;
import org.apache.cloudstack.region.RegionService;
-import org.apache.log4j.Logger;
-
import com.cloud.user.Account;
import com.cloud.user.User;
import com.cloud.user.UserAccount;