cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [3/4] git commit: updated refs/heads/master to ab5f580
Date Wed, 03 Jul 2013 18:22:23 GMT
VMSync: Separating jobs from api


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bec53fb5
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bec53fb5
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bec53fb5

Branch: refs/heads/master
Commit: bec53fb59ae8783a062e4b28acf50ac939d6474f
Parents: d2739cd
Author: Alex Huang <alex.huang@gmail.com>
Authored: Wed Jul 3 11:22:40 2013 -0700
Committer: Alex Huang <alex.huang@gmail.com>
Committed: Wed Jul 3 11:22:40 2013 -0700

----------------------------------------------------------------------
 api/src/com/cloud/async/AsyncJob.java           | 38 +---------------
 .../cloudstack/api/ApiCommandJobType.java       | 36 +++++++++++++++
 .../org/apache/cloudstack/api/BaseAsyncCmd.java |  4 +-
 .../org/apache/cloudstack/api/BaseListCmd.java  |  5 +--
 .../command/admin/account/DeleteAccountCmd.java |  6 +--
 .../admin/account/DisableAccountCmd.java        |  6 +--
 .../admin/autoscale/CreateCounterCmd.java       |  6 +--
 .../admin/autoscale/DeleteCounterCmd.java       |  6 +--
 .../admin/host/CancelMaintenanceCmd.java        |  6 +--
 .../api/command/admin/host/ListHostsCmd.java    |  6 +--
 .../admin/host/PrepareForMaintenanceCmd.java    |  6 +--
 .../command/admin/host/ReconnectHostCmd.java    |  6 +--
 .../admin/host/ReleaseHostReservationCmd.java   |  6 +--
 .../admin/internallb/ListInternalLBVMsCmd.java  |  6 +--
 .../admin/internallb/StartInternalLBVMCmd.java  |  6 +--
 .../admin/internallb/StopInternalLBVMCmd.java   |  6 +--
 .../network/AddNetworkServiceProviderCmd.java   |  6 +--
 .../admin/network/CreatePhysicalNetworkCmd.java |  6 +--
 .../DeleteNetworkServiceProviderCmd.java        |  6 +--
 .../admin/network/DeletePhysicalNetworkCmd.java |  6 +--
 .../ReleaseDedicatedGuestVlanRangeCmd.java      |  5 +--
 .../UpdateNetworkServiceProviderCmd.java        |  6 +--
 .../admin/network/UpdatePhysicalNetworkCmd.java |  6 +--
 .../admin/region/CreatePortableIpRangeCmd.java  |  6 +--
 .../admin/region/DeletePortableIpRangeCmd.java  |  5 +--
 .../ConfigureVirtualRouterElementCmd.java       |  6 +--
 .../command/admin/router/DestroyRouterCmd.java  |  6 +--
 .../command/admin/router/ListRoutersCmd.java    |  6 +--
 .../command/admin/router/RebootRouterCmd.java   |  6 +--
 .../command/admin/router/StartRouterCmd.java    |  6 +--
 .../api/command/admin/router/StopRouterCmd.java |  6 +--
 .../CancelPrimaryStorageMaintenanceCmd.java     |  6 +--
 .../FindStoragePoolsForMigrationCmd.java        |  6 +--
 .../admin/storage/ListStoragePoolsCmd.java      |  6 +--
 .../PreparePrimaryStorageForMaintenanceCmd.java |  6 +--
 .../admin/systemvm/DestroySystemVmCmd.java      |  6 +--
 .../admin/systemvm/ListSystemVMsCmd.java        |  6 +--
 .../admin/systemvm/RebootSystemVmCmd.java       |  6 +--
 .../admin/systemvm/StartSystemVMCmd.java        |  6 +--
 .../command/admin/systemvm/StopSystemVmCmd.java |  6 +--
 .../command/admin/usage/AddTrafficTypeCmd.java  |  6 +--
 .../admin/usage/DeleteTrafficTypeCmd.java       |  6 +--
 .../admin/usage/UpdateTrafficTypeCmd.java       |  6 +--
 .../api/command/admin/user/DisableUserCmd.java  |  6 +--
 .../admin/vpc/CreatePrivateGatewayCmd.java      |  6 +--
 .../admin/vpc/DeletePrivateGatewayCmd.java      |  6 +--
 .../zone/MarkDefaultZoneForAccountCmd.java      |  6 +--
 .../user/address/AssociateIPAddrCmd.java        |  6 +--
 .../user/address/DisassociateIPAddrCmd.java     |  6 +--
 .../user/address/ListPublicIpAddressesCmd.java  |  6 +--
 .../affinitygroup/CreateAffinityGroupCmd.java   |  6 +--
 .../affinitygroup/DeleteAffinityGroupCmd.java   |  6 +--
 .../affinitygroup/ListAffinityGroupsCmd.java    |  6 +--
 .../affinitygroup/UpdateVMAffinityGroupCmd.java |  6 +--
 .../autoscale/CreateAutoScalePolicyCmd.java     |  6 +--
 .../autoscale/CreateAutoScaleVmGroupCmd.java    |  6 +--
 .../autoscale/CreateAutoScaleVmProfileCmd.java  |  6 +--
 .../user/autoscale/CreateConditionCmd.java      |  6 +--
 .../autoscale/DeleteAutoScalePolicyCmd.java     |  6 +--
 .../autoscale/DeleteAutoScaleVmGroupCmd.java    |  6 +--
 .../autoscale/DeleteAutoScaleVmProfileCmd.java  |  6 +--
 .../user/autoscale/DeleteConditionCmd.java      |  6 +--
 .../autoscale/DisableAutoScaleVmGroupCmd.java   |  6 +--
 .../autoscale/EnableAutoScaleVmGroupCmd.java    |  6 +--
 .../autoscale/UpdateAutoScalePolicyCmd.java     |  6 +--
 .../autoscale/UpdateAutoScaleVmGroupCmd.java    |  6 +--
 .../autoscale/UpdateAutoScaleVmProfileCmd.java  |  6 +--
 .../firewall/CreateEgressFirewallRuleCmd.java   |  6 +--
 .../user/firewall/CreateFirewallRuleCmd.java    |  6 +--
 .../firewall/CreatePortForwardingRuleCmd.java   |  6 +--
 .../firewall/DeleteEgressFirewallRuleCmd.java   |  7 +--
 .../user/firewall/DeleteFirewallRuleCmd.java    |  6 +--
 .../firewall/DeletePortForwardingRuleCmd.java   |  6 +--
 .../api/command/user/iso/DeleteIsoCmd.java      |  6 +--
 .../api/command/user/iso/ExtractIsoCmd.java     |  6 +--
 .../api/command/user/iso/ListIsosCmd.java       |  6 +--
 .../CreateApplicationLoadBalancerCmd.java       |  6 +--
 .../loadbalancer/CreateLoadBalancerRuleCmd.java |  6 +--
 .../DeleteApplicationLoadBalancerCmd.java       |  6 +--
 .../loadbalancer/DeleteLoadBalancerRuleCmd.java |  6 +--
 .../user/nat/CreateIpForwardingRuleCmd.java     |  6 +--
 .../user/nat/DeleteIpForwardingRuleCmd.java     |  6 +--
 .../gslb/CreateGlobalLoadBalancerRuleCmd.java   |  5 +--
 .../gslb/DeleteGlobalLoadBalancerRuleCmd.java   |  5 +--
 .../AuthorizeSecurityGroupEgressCmd.java        |  6 +--
 .../AuthorizeSecurityGroupIngressCmd.java       |  6 +--
 .../securitygroup/ListSecurityGroupsCmd.java    |  6 +--
 .../RevokeSecurityGroupEgressCmd.java           |  6 +--
 .../RevokeSecurityGroupIngressCmd.java          |  6 +--
 .../user/snapshot/CreateSnapshotCmd.java        |  6 +--
 .../user/snapshot/DeleteSnapshotCmd.java        |  6 +--
 .../command/user/snapshot/ListSnapshotsCmd.java |  6 +--
 .../command/user/template/CopyTemplateCmd.java  |  6 +--
 .../user/template/CreateTemplateCmd.java        |  6 +--
 .../user/template/DeleteTemplateCmd.java        |  6 +--
 .../user/template/ExtractTemplateCmd.java       |  6 +--
 .../command/user/template/ListTemplatesCmd.java |  6 +--
 .../user/template/RegisterTemplateCmd.java      |  6 +--
 .../api/command/user/vm/AddIpToVmNicCmd.java    |  6 +--
 .../api/command/user/vm/DeployVMCmd.java        |  6 +--
 .../api/command/user/vm/DestroyVMCmd.java       |  6 +--
 .../api/command/user/vm/ListNicsCmd.java        |  6 +--
 .../api/command/user/vm/ListVMsCmd.java         |  6 +--
 .../api/command/user/vm/RebootVMCmd.java        |  6 +--
 .../command/user/vm/RemoveIpFromVmNicCmd.java   |  7 +--
 .../api/command/user/vm/ResetVMPasswordCmd.java |  6 +--
 .../api/command/user/vm/ResetVMSSHKeyCmd.java   |  7 +--
 .../api/command/user/vm/StartVMCmd.java         |  6 +--
 .../api/command/user/vm/StopVMCmd.java          |  6 +--
 .../command/user/volume/AttachVolumeCmd.java    |  6 +--
 .../command/user/volume/CreateVolumeCmd.java    |  6 +--
 .../command/user/volume/DetachVolumeCmd.java    |  6 +--
 .../command/user/volume/ExtractVolumeCmd.java   |  6 +--
 .../api/command/user/volume/ListVolumesCmd.java |  6 +--
 .../user/volume/RemoveResourceDetailCmd.java    |  6 +--
 .../command/user/volume/ResizeVolumeCmd.java    |  6 +--
 .../command/user/volume/UpdateVolumeCmd.java    |  6 +--
 .../command/user/vpc/CreateStaticRouteCmd.java  |  6 +--
 .../command/user/vpc/DeleteStaticRouteCmd.java  |  6 +--
 server/src/com/cloud/api/ApiDBUtils.java        | 47 ++++++++++----------
 .../com/cloud/api/query/vo/AsyncJobJoinVO.java  |  9 ++--
 server/src/com/cloud/async/AsyncJobManager.java |  3 +-
 .../com/cloud/async/AsyncJobManagerImpl.java    |  3 +-
 server/src/com/cloud/async/AsyncJobVO.java      | 12 ++---
 server/src/com/cloud/async/dao/AsyncJobDao.java |  5 ++-
 .../com/cloud/async/dao/AsyncJobDaoImpl.java    |  5 ++-
 tools/apidoc/build-apidoc.sh                    | 11 +----
 127 files changed, 433 insertions(+), 434 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/com/cloud/async/AsyncJob.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/async/AsyncJob.java b/api/src/com/cloud/async/AsyncJob.java
index 47f9b57..8d58af1 100644
--- a/api/src/com/cloud/async/AsyncJob.java
+++ b/api/src/com/cloud/async/AsyncJob.java
@@ -16,47 +16,13 @@
 // under the License.
 package com.cloud.async;
 
+import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.Identity;
 import org.apache.cloudstack.api.InternalIdentity;
 
 import java.util.Date;
 
 public interface AsyncJob extends Identity, InternalIdentity {
-    public enum Type {
-        None,
-        VirtualMachine,
-        DomainRouter,
-        Volume,
-        ConsoleProxy,
-        Snapshot,
-        Template,
-        Iso,
-        SystemVm,
-        Host,
-        StoragePool,
-        IpAddress,
-        PortableIpAddress,
-        SecurityGroup,
-        PhysicalNetwork,
-        TrafficType,
-        PhysicalNetworkServiceProvider,
-        FirewallRule,
-        Account,
-        User,
-        PrivateGateway,
-        StaticRoute,
-        Counter,
-        Condition,
-        AutoScalePolicy,
-        AutoScaleVmProfile,
-        AutoScaleVmGroup,
-        GlobalLoadBalancerRule,
-        LoadBalancerRule,
-        AffinityGroup,
-        InternalLbVm,
-        DedicatedGuestVlanRange
-    }
-
     long getUserId();
 
     long getAccountId();
@@ -91,7 +57,7 @@ public interface AsyncJob extends Identity, InternalIdentity {
 
     Date getRemoved();
 
-    Type getInstanceType();
+    ApiCommandJobType getInstanceType();
 
     Long getInstanceId();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/ApiCommandJobType.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiCommandJobType.java b/api/src/org/apache/cloudstack/api/ApiCommandJobType.java
new file mode 100644
index 0000000..d42ca85
--- /dev/null
+++ b/api/src/org/apache/cloudstack/api/ApiCommandJobType.java
@@ -0,0 +1,36 @@
+package org.apache.cloudstack.api;
+
+public enum ApiCommandJobType {
+    None,
+    VirtualMachine,
+    DomainRouter,
+    Volume,
+    ConsoleProxy,
+    Snapshot,
+    Template,
+    Iso,
+    SystemVm,
+    Host,
+    StoragePool,
+    IpAddress,
+    PortableIpAddress,
+    SecurityGroup,
+    PhysicalNetwork,
+    TrafficType,
+    PhysicalNetworkServiceProvider,
+    FirewallRule,
+    Account,
+    User,
+    PrivateGateway,
+    StaticRoute,
+    Counter,
+    Condition,
+    AutoScalePolicy,
+    AutoScaleVmProfile,
+    AutoScaleVmGroup,
+    GlobalLoadBalancerRule,
+    LoadBalancerRule,
+    AffinityGroup,
+    InternalLbVm,
+    DedicatedGuestVlanRange
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/BaseAsyncCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/BaseAsyncCmd.java b/api/src/org/apache/cloudstack/api/BaseAsyncCmd.java
index f3b3170..022157a 100644
--- a/api/src/org/apache/cloudstack/api/BaseAsyncCmd.java
+++ b/api/src/org/apache/cloudstack/api/BaseAsyncCmd.java
@@ -88,8 +88,8 @@ public abstract class BaseAsyncCmd extends BaseCmd {
         return null;
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.None;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.None;
     }
 
     public String getSyncObjType() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/BaseListCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/BaseListCmd.java b/api/src/org/apache/cloudstack/api/BaseListCmd.java
index bc0b2b8..4d9b350 100644
--- a/api/src/org/apache/cloudstack/api/BaseListCmd.java
+++ b/api/src/org/apache/cloudstack/api/BaseListCmd.java
@@ -16,7 +16,6 @@
 // under the License.
 package org.apache.cloudstack.api;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.exception.InvalidParameterValueException;
 
 public abstract class BaseListCmd extends BaseCmd {
@@ -109,7 +108,7 @@ public abstract class BaseListCmd extends BaseCmd {
         return startIndex;
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.None;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.None;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java
index 9895da1..4a42fde 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java
@@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.admin.account;
 import javax.inject.Inject;
 
 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;
@@ -29,7 +30,6 @@ import org.apache.cloudstack.api.response.SuccessResponse;
 import org.apache.cloudstack.region.RegionService;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.user.Account;
 import com.cloud.user.User;
@@ -107,7 +107,7 @@ public class DeleteAccountCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.Account;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.Account;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java
index 1f9b821..6d25fde 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java
@@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.admin.account;
 import javax.inject.Inject;
 
 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;
@@ -29,7 +30,6 @@ import org.apache.cloudstack.api.response.DomainResponse;
 import org.apache.cloudstack.region.RegionService;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.ResourceUnavailableException;
@@ -128,7 +128,7 @@ public class DisableAccountCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.Account;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.Account;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java
index 98ffc51..ebab8b5 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java
@@ -18,6 +18,7 @@
 package org.apache.cloudstack.api.command.admin.autoscale;
 
 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;
@@ -26,7 +27,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.CounterResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.network.as.Counter;
 import com.cloud.user.Account;
@@ -95,8 +95,8 @@ public class CreateCounterCmd extends BaseAsyncCreateCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.Counter;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.Counter;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java
index 35d99bb..c5fe881 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java
@@ -18,6 +18,7 @@
 package org.apache.cloudstack.api.command.admin.autoscale;
 
 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;
@@ -27,7 +28,6 @@ import org.apache.cloudstack.api.response.CounterResponse;
 import org.apache.cloudstack.api.response.SuccessResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ResourceInUseException;
 import com.cloud.user.Account;
@@ -82,8 +82,8 @@ public class DeleteCounterCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.Counter;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.Counter;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java
index d9e5934..ea85d12 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.host;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.HostResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.host.Host;
 import com.cloud.user.Account;
@@ -87,8 +87,8 @@ public class CancelMaintenanceCmd extends BaseAsyncCmd  {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.Host;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.Host;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java
index 1e378fa..95b9ac3 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java
@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.ApiConstants.HostDetails;
 import org.apache.cloudstack.api.BaseListCmd;
@@ -34,7 +35,6 @@ import org.apache.cloudstack.api.response.UserVmResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.host.Host;
 import com.cloud.utils.Pair;
@@ -160,8 +160,8 @@ public class ListHostsCmd extends BaseListCmd {
         return s_name;
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.Host;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.Host;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java
index c1a83fa..fd3685a 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.host;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.HostResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.host.Host;
 import com.cloud.user.Account;
@@ -87,8 +87,8 @@ public class PrepareForMaintenanceCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.Host;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.Host;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java
index b151865..8a1ef79 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.host;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.HostResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.host.Host;
 import com.cloud.user.Account;
@@ -86,8 +86,8 @@ public class ReconnectHostCmd extends BaseAsyncCmd {
         return  "reconnecting host: " + getId();
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.Host;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.Host;
     }
 
     public Long getInstanceId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/host/ReleaseHostReservationCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/ReleaseHostReservationCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/ReleaseHostReservationCmd.java
index d09cf38..b11bcd2 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/host/ReleaseHostReservationCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/host/ReleaseHostReservationCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.host;
 
 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;
@@ -26,7 +27,6 @@ import org.apache.cloudstack.api.response.HostResponse;
 import org.apache.cloudstack.api.response.SuccessResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.user.Account;
 import com.cloud.user.UserContext;
@@ -83,8 +83,8 @@ public class ReleaseHostReservationCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.Host;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.Host;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/internallb/ListInternalLBVMsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/internallb/ListInternalLBVMsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/internallb/ListInternalLBVMsCmd.java
index 68370e8..21b3fc4 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/internallb/ListInternalLBVMsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/internallb/ListInternalLBVMsCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.internallb;
 
 import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
 import org.apache.cloudstack.api.Parameter;
@@ -30,7 +31,6 @@ import org.apache.cloudstack.api.response.VpcResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.network.router.VirtualRouter.Role;
 
 @APICommand(name = "listInternalLoadBalancerVMs", description="List internal LB VMs.", responseObject=DomainRouterResponse.class)
@@ -132,8 +132,8 @@ public class ListInternalLBVMsCmd extends BaseListProjectAndAccountResourcesCmd
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.DomainRouter;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.DomainRouter;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java
index 31d132b..256804f 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.internallb;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.DomainRouterResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
@@ -90,8 +90,8 @@ public class StartInternalLBVMCmd extends BaseAsyncCmd {
         return  "starting internal lb vm: " + getId();
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.InternalLbVm;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.InternalLbVm;
     }
 
     public Long getInstanceId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java
index f40db49..fd6a7dd 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.internallb;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.DomainRouterResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InvalidParameterValueException;
@@ -88,8 +88,8 @@ public class StopInternalLBVMCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.InternalLbVm;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.InternalLbVm;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java
index 2c6cc60..280369a 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java
@@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.admin.network;
 import java.util.List;
 
 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;
@@ -28,7 +29,6 @@ import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
 import org.apache.cloudstack.api.response.ProviderResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.network.PhysicalNetworkServiceProvider;
@@ -129,7 +129,7 @@ public class AddNetworkServiceProviderCmd extends BaseAsyncCreateCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.PhysicalNetworkServiceProvider;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.PhysicalNetworkServiceProvider;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java
index fb6db61..6c1100a 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java
@@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.admin.network;
 import java.util.List;
 
 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;
@@ -29,7 +30,6 @@ import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.network.PhysicalNetwork;
@@ -167,7 +167,7 @@ public class CreatePhysicalNetworkCmd extends BaseAsyncCreateCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.PhysicalNetwork;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.PhysicalNetwork;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java
index cbcf29b..a69ffa4 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.network;
 
 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;
@@ -26,7 +27,6 @@ import org.apache.cloudstack.api.response.ProviderResponse;
 import org.apache.cloudstack.api.response.SuccessResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.ResourceUnavailableException;
@@ -100,7 +100,7 @@ public class DeleteNetworkServiceProviderCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.PhysicalNetworkServiceProvider;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.PhysicalNetworkServiceProvider;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java
index c7dd93c..b5c015a 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.network;
 
 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;
@@ -26,7 +27,6 @@ import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
 import org.apache.cloudstack.api.response.SuccessResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.user.Account;
 import com.cloud.user.UserContext;
@@ -90,7 +90,7 @@ public class DeletePhysicalNetworkCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.PhysicalNetwork;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.PhysicalNetwork;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/network/ReleaseDedicatedGuestVlanRangeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/ReleaseDedicatedGuestVlanRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/ReleaseDedicatedGuestVlanRangeCmd.java
index 76cb42d..f9e96f6 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/network/ReleaseDedicatedGuestVlanRangeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/network/ReleaseDedicatedGuestVlanRangeCmd.java
@@ -17,7 +17,6 @@
 
 package org.apache.cloudstack.api.command.admin.network;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ResourceInUseException;
 import com.cloud.user.Account;
@@ -55,8 +54,8 @@ public class ReleaseDedicatedGuestVlanRangeCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.DedicatedGuestVlanRange;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.DedicatedGuestVlanRange;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java
index 4364b2d..74d1c7c 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java
@@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.admin.network;
 import java.util.List;
 
 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;
@@ -27,7 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.ProviderResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.network.PhysicalNetworkServiceProvider;
 import com.cloud.user.Account;
@@ -103,8 +103,8 @@ public class UpdateNetworkServiceProviderCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.PhysicalNetworkServiceProvider;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.PhysicalNetworkServiceProvider;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java
index 6d37dd8..333564e 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java
@@ -19,13 +19,13 @@ package org.apache.cloudstack.api.command.admin.network;
 import java.util.List;
 
 import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseAsyncCmd;
 import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.network.PhysicalNetwork;
 import com.cloud.user.Account;
@@ -118,7 +118,7 @@ public class UpdatePhysicalNetworkCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.PhysicalNetwork;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.PhysicalNetwork;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/region/CreatePortableIpRangeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/region/CreatePortableIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/region/CreatePortableIpRangeCmd.java
index 78e4c94..84e8753 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/region/CreatePortableIpRangeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/region/CreatePortableIpRangeCmd.java
@@ -19,13 +19,13 @@ package org.apache.cloudstack.api.command.admin.region;
 
 import javax.inject.Inject;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.dc.Vlan;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.exception.ResourceAllocationException;
 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;
@@ -150,7 +150,7 @@ public class CreatePortableIpRangeCmd extends BaseAsyncCreateCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.PortableIpAddress;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.PortableIpAddress;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/region/DeletePortableIpRangeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/region/DeletePortableIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/region/DeletePortableIpRangeCmd.java
index 856e8ef..7c2fc81 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/region/DeletePortableIpRangeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/region/DeletePortableIpRangeCmd.java
@@ -19,7 +19,6 @@ package org.apache.cloudstack.api.command.admin.region;
 
 import javax.inject.Inject;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import org.apache.cloudstack.api.*;
 import org.apache.cloudstack.api.response.PortableIpRangeResponse;
@@ -87,7 +86,7 @@ public class DeletePortableIpRangeCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.PortableIpAddress;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.PortableIpAddress;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 f19e0fa..e28e916 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
@@ -21,6 +21,7 @@ import java.util.List;
 import javax.inject.Inject;
 
 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;
@@ -29,7 +30,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.VirtualRouterProviderResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
@@ -106,8 +106,8 @@ public class ConfigureVirtualRouterElementCmd extends BaseAsyncCmd {
         return  "configuring virtual router provider: " + id;
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.None;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.None;
     }
 
     public Long getInstanceId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 3efc865..d0dda29 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.router;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.DomainRouterResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.ResourceUnavailableException;
@@ -84,8 +84,8 @@ public class DestroyRouterCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.DomainRouter;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.DomainRouter;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 a74eb89..d7f59b96 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.router;
 
 import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
 import org.apache.cloudstack.api.Parameter;
@@ -30,7 +31,6 @@ import org.apache.cloudstack.api.response.VpcResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.network.router.VirtualRouter.Role;
 
 @APICommand(name = "listRouters", description="List routers.", responseObject=DomainRouterResponse.class)
@@ -130,8 +130,8 @@ public class ListRoutersCmd extends BaseListProjectAndAccountResourcesCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.DomainRouter;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.DomainRouter;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 c9b518f..504b715 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.router;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.DomainRouterResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
@@ -84,8 +84,8 @@ public class RebootRouterCmd extends BaseAsyncCmd {
         return  "rebooting router: " + getId();
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.DomainRouter;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.DomainRouter;
     }
 
     public Long getInstanceId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 ad0461e..b575bf5 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.router;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.DomainRouterResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
@@ -91,8 +91,8 @@ public class StartRouterCmd extends BaseAsyncCmd {
         return  "starting router: " + getId();
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.DomainRouter;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.DomainRouter;
     }
 
     public Long getInstanceId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 94473cf..10aebc0 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.router;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.DomainRouterResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InvalidParameterValueException;
@@ -89,8 +89,8 @@ public class StopRouterCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.DomainRouter;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.DomainRouter;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 b50cb27..525e923 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.storage;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.StoragePoolResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ResourceUnavailableException;
 import com.cloud.storage.StoragePool;
@@ -70,8 +70,8 @@ public class CancelPrimaryStorageMaintenanceCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.StoragePool;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.StoragePool;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 ed6ca04..33b696d 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,10 +16,10 @@
 // under the License.
 package org.apache.cloudstack.api.command.admin.storage;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.storage.StoragePool;
 import com.cloud.utils.Pair;
 import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseListCmd;
 import org.apache.cloudstack.api.Parameter;
@@ -63,8 +63,8 @@ public class FindStoragePoolsForMigrationCmd extends BaseListCmd {
         return s_name;
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.StoragePool;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.StoragePool;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 f33b987..26351bb 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.storage;
 
 import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseListCmd;
 import org.apache.cloudstack.api.Parameter;
@@ -27,7 +28,6 @@ import org.apache.cloudstack.api.response.StoragePoolResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 
 @APICommand(name = "listStoragePools", description="Lists storage pools.", responseObject=StoragePoolResponse.class)
 public class ListStoragePoolsCmd extends BaseListCmd {
@@ -109,8 +109,8 @@ public class ListStoragePoolsCmd extends BaseListCmd {
         return s_name;
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.StoragePool;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.StoragePool;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 95a9214..565ed07 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.storage;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.StoragePoolResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.exception.ResourceUnavailableException;
@@ -68,8 +68,8 @@ public class PreparePrimaryStorageForMaintenanceCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.StoragePool;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.StoragePool;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 ef7af5c..87c6696 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.systemvm;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.SystemVmResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.user.Account;
 import com.cloud.user.UserContext;
@@ -81,8 +81,8 @@ public class DestroySystemVmCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.SystemVm;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.SystemVm;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 f230a20..151f207 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
@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseListCmd;
 import org.apache.cloudstack.api.Parameter;
@@ -31,7 +32,6 @@ import org.apache.cloudstack.api.response.SystemVmResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.utils.Pair;
 import com.cloud.vm.VirtualMachine;
 
@@ -119,8 +119,8 @@ public class ListSystemVMsCmd extends BaseListCmd {
         return s_name;
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.SystemVm;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.SystemVm;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 6e4c925..8cb0718 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.systemvm;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.SystemVmResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.user.Account;
 import com.cloud.user.UserContext;
@@ -88,8 +88,8 @@ public class RebootSystemVmCmd extends BaseAsyncCmd {
         return  "rebooting system vm: " + getId();
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.SystemVm;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.SystemVm;
     }
 
     public Long getInstanceId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 f97d899..1283d98 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.systemvm;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.SystemVmResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.user.Account;
 import com.cloud.user.UserContext;
@@ -92,8 +92,8 @@ public class StartSystemVMCmd extends BaseAsyncCmd {
         return  "starting system vm: " + getId();
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.SystemVm;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.SystemVm;
     }
 
     public Long getInstanceId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 5f9a3ef..9954330 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.systemvm;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.SystemVmResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.ResourceUnavailableException;
@@ -94,8 +94,8 @@ public class StopSystemVmCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.SystemVm;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.SystemVm;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 7211bae..f9f2b03 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.usage;
 
 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;
@@ -26,7 +27,6 @@ import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
 import org.apache.cloudstack.api.response.TrafficTypeResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.network.PhysicalNetworkTrafficType;
@@ -149,7 +149,7 @@ public class AddTrafficTypeCmd extends BaseAsyncCreateCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.TrafficType;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.TrafficType;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 32e0512..0a6da18 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.usage;
 
 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;
@@ -26,7 +27,6 @@ import org.apache.cloudstack.api.response.SuccessResponse;
 import org.apache.cloudstack.api.response.TrafficTypeResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.user.Account;
 
@@ -88,8 +88,8 @@ public class DeleteTrafficTypeCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.TrafficType;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.TrafficType;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 d3cf3f8..e54b87c 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
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.usage;
 
 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;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.TrafficTypeResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.network.PhysicalNetworkTrafficType;
 import com.cloud.user.Account;
@@ -110,7 +110,7 @@ public class UpdateTrafficTypeCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.TrafficType;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.TrafficType;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/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 6eaa46b..a487556 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
@@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.admin.user;
 import javax.inject.Inject;
 
 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;
@@ -29,7 +30,6 @@ import org.apache.cloudstack.api.response.UserResponse;
 import org.apache.cloudstack.region.RegionService;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.user.Account;
 import com.cloud.user.User;
@@ -104,7 +104,7 @@ public class DisableUserCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.User;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.User;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayCmd.java
index 22dfb9e..0bc905c 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.vpc;
 
 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;
@@ -29,7 +30,6 @@ import org.apache.cloudstack.api.response.PrivateGatewayResponse;
 import org.apache.cloudstack.api.response.VpcResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
@@ -197,7 +197,7 @@ public class CreatePrivateGatewayCmd extends BaseAsyncCreateCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.PrivateGateway;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.PrivateGateway;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java
index 182a19e..71dfba8 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.admin.vpc;
 
 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;
@@ -26,7 +27,6 @@ import org.apache.cloudstack.api.response.PrivateGatewayResponse;
 import org.apache.cloudstack.api.response.SuccessResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InvalidParameterValueException;
@@ -107,8 +107,8 @@ public class DeletePrivateGatewayCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.PrivateGateway;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.PrivateGateway;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/admin/zone/MarkDefaultZoneForAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/zone/MarkDefaultZoneForAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/zone/MarkDefaultZoneForAccountCmd.java
index 858457b..5696bfd 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/zone/MarkDefaultZoneForAccountCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/zone/MarkDefaultZoneForAccountCmd.java
@@ -18,6 +18,7 @@
 package org.apache.cloudstack.api.command.admin.zone;
 
 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;
@@ -28,7 +29,6 @@ import org.apache.cloudstack.api.response.DomainResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.user.Account;
 
@@ -95,8 +95,8 @@ public class MarkDefaultZoneForAccountCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.Account;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.Account;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java b/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
index c97a5e4..6d7ec6a 100644
--- a/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java
@@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.user.address;
 import java.util.List;
 
 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;
@@ -35,7 +36,6 @@ import org.apache.cloudstack.api.response.VpcResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.dc.DataCenter;
 import com.cloud.dc.DataCenter.NetworkType;
 import com.cloud.event.EventTypes;
@@ -311,8 +311,8 @@ public class AssociateIPAddrCmd extends BaseAsyncCreateCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.IpAddress;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.IpAddress;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java b/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java
index 3d431f4..cbd802b 100644
--- a/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.api.command.user.address;
 
 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;
@@ -27,7 +28,6 @@ import org.apache.cloudstack.api.response.IPAddressResponse;
 import org.apache.cloudstack.api.response.SuccessResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.InsufficientAddressCapacityException;
 import com.cloud.exception.InvalidParameterValueException;
@@ -140,8 +140,8 @@ public class DisassociateIPAddrCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.IpAddress;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.IpAddress;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java b/api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java
index ac0f823..bc179b2 100644
--- a/api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java
@@ -20,6 +20,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseListTaggedResourcesCmd;
 import org.apache.cloudstack.api.Parameter;
@@ -32,7 +33,6 @@ import org.apache.cloudstack.api.response.VpcResponse;
 import org.apache.cloudstack.api.response.ZoneResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.network.IpAddress;
 import com.cloud.utils.Pair;
 
@@ -159,8 +159,8 @@ public class ListPublicIpAddressesCmd extends BaseListTaggedResourcesCmd {
         this.setResponseObject(response);
     }
 
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.IpAddress;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.IpAddress;
     }
 
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
index 96de4aa..bc16310 100644
--- a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java
@@ -19,6 +19,7 @@ package org.apache.cloudstack.api.command.user.affinitygroup;
 import org.apache.cloudstack.affinity.AffinityGroup;
 import org.apache.cloudstack.affinity.AffinityGroupResponse;
 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;
@@ -27,7 +28,6 @@ import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.DomainResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ResourceAllocationException;
 import com.cloud.user.Account;
@@ -160,8 +160,8 @@ public class CreateAffinityGroupCmd extends BaseAsyncCreateCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.AffinityGroup;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.AffinityGroup;
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
index f80e176..a237cba 100644
--- a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java
@@ -18,6 +18,7 @@ package org.apache.cloudstack.api.command.user.affinitygroup;
 
 import org.apache.cloudstack.affinity.AffinityGroupResponse;
 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;
@@ -27,7 +28,6 @@ import org.apache.cloudstack.api.response.DomainResponse;
 import org.apache.cloudstack.api.response.SuccessResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.user.Account;
@@ -142,7 +142,7 @@ public class DeleteAffinityGroupCmd extends BaseAsyncCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.AffinityGroup;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.AffinityGroup;
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bec53fb5/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
index d966a4c..40ba715 100644
--- a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java
@@ -18,6 +18,7 @@ package org.apache.cloudstack.api.command.user.affinitygroup;
 
 import org.apache.cloudstack.affinity.AffinityGroupResponse;
 import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiCommandJobType;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseListAccountResourcesCmd;
 import org.apache.cloudstack.api.Parameter;
@@ -25,7 +26,6 @@ import org.apache.cloudstack.api.response.ListResponse;
 import org.apache.cloudstack.api.response.UserVmResponse;
 import org.apache.log4j.Logger;
 
-import com.cloud.async.AsyncJob;
 
 @APICommand(name = "listAffinityGroups", description = "Lists affinity groups", responseObject = AffinityGroupResponse.class)
 public class ListAffinityGroupsCmd extends BaseListAccountResourcesCmd {
@@ -85,7 +85,7 @@ public class ListAffinityGroupsCmd extends BaseListAccountResourcesCmd {
     }
 
     @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.AffinityGroup;
+    public ApiCommandJobType getInstanceType() {
+        return ApiCommandJobType.AffinityGroup;
     }
 }


Mime
View raw message