You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2012/12/04 11:02:57 UTC

[46/55] [abbrv] api_refactor: refactor vpn and vm apis

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DeployVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DeployVMCmd.java b/api/src/com/cloud/api/commands/DeployVMCmd.java
deleted file mode 100644
index 95a676d..0000000
--- a/api/src/com/cloud/api/commands/DeployVMCmd.java
+++ /dev/null
@@ -1,451 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.api.commands;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-
-import com.cloud.api.ACL;
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCreateCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.UserVmResponse;
-import com.cloud.async.AsyncJob;
-import com.cloud.dc.DataCenter;
-import com.cloud.dc.DataCenter.NetworkType;
-import com.cloud.event.EventTypes;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.exception.ResourceAllocationException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.network.IpAddress;
-import com.cloud.network.Network;
-import com.cloud.network.security.SecurityGroup;
-import com.cloud.offering.DiskOffering;
-import com.cloud.offering.ServiceOffering;
-import com.cloud.template.VirtualMachineTemplate;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-import com.cloud.uservm.UserVm;
-
-
-@Implementation(description="Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.", responseObject=UserVmResponse.class)
-public class DeployVMCmd extends BaseAsyncCreateCmd {
-    public static final Logger s_logger = Logger.getLogger(DeployVMCmd.class.getName());
-
-    private static final String s_name = "deployvirtualmachineresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-    @IdentityMapper(entityTableName="data_center")
-    @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="availability zone for the virtual machine")
-    private Long zoneId;
-
-    @ACL
-    @IdentityMapper(entityTableName="disk_offering")
-    @Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.LONG, required=true, description="the ID of the service offering for the virtual machine", resourceType=ServiceOffering.class)
-    private Long serviceOfferingId;
-
-    @ACL
-    @IdentityMapper(entityTableName="vm_template")
-    @Parameter(name=ApiConstants.TEMPLATE_ID, type=CommandType.LONG, required=true, description="the ID of the template for the virtual machine",resourceType=VirtualMachineTemplate.class)
-    private Long templateId;
-
-    @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="host name for the virtual machine")
-    private String name;
-
-    @Parameter(name=ApiConstants.DISPLAY_NAME, type=CommandType.STRING, description="an optional user generated name for the virtual machine")
-    private String displayName;
-
-    //Owner information
-    @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="an optional account for the virtual machine. Must be used with domainId.")
-    private String accountName;
-
-    @IdentityMapper(entityTableName="domain")
-    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="an optional domainId for the virtual machine. If the account parameter is used, domainId must also be used.", entityType=Domain.class)
-    private Long domainId;
-
-    //Network information
-    @ACL
-    @IdentityMapper(entityTableName="networks")
-    @Parameter(name=ApiConstants.NETWORK_IDS, type=CommandType.LIST, collectionType=CommandType.LONG, description="list of network ids used by virtual machine. Can't be specified with ipToNetworkList parameter", resourceType=Network.class)
-    private List<Long> networkIds;
-
-    //DataDisk information
-    @ACL
-    @IdentityMapper(entityTableName="disk_offering")
-    @Parameter(name=ApiConstants.DISK_OFFERING_ID, type=CommandType.LONG, description="the ID of the disk offering for the virtual machine. If the template is of ISO format, the diskOfferingId is for the root disk volume. Otherwise this parameter is used to indicate the offering for the data disk volume. If the templateId parameter passed is from a Template object, the diskOfferingId refers to a DATA Disk Volume created. If the templateId parameter passed is from an ISO object, the diskOfferingId refers to a ROOT Disk Volume created.", resourceType=DiskOffering.class)
-    private Long diskOfferingId;
-
-    @Parameter(name=ApiConstants.SIZE, type=CommandType.LONG, description="the arbitrary size for the DATADISK volume. Mutually exclusive with diskOfferingId")
-    private Long size;
-
-    @Parameter(name=ApiConstants.GROUP, type=CommandType.STRING, description="an optional group for the virtual machine")
-    private String group;
-
-    @Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, description="the hypervisor on which to deploy the virtual machine")
-    private String hypervisor;
-
-    @Parameter(name=ApiConstants.USER_DATA, type=CommandType.STRING, description="an optional binary data that can be sent to the virtual machine upon a successful deployment. This binary data must be base64 encoded before adding it to the request. Currently only HTTP GET is supported. Using HTTP GET (via querystring), you can send up to 2KB of data after base64 encoding.", length=2048)
-    private String userData;
-
-    @Parameter(name=ApiConstants.SSH_KEYPAIR, type=CommandType.STRING, description="name of the ssh key pair used to login to the virtual machine")
-    private String sshKeyPairName;
-
-    
-    @IdentityMapper(entityTableName="host")
-    @Parameter(name=ApiConstants.HOST_ID, type=CommandType.LONG, description="destination Host ID to deploy the VM to - parameter available for root admin only")
-    private Long hostId;
-    
-    @ACL
-    @IdentityMapper(entityTableName="security_group")
-    @Parameter(name=ApiConstants.SECURITY_GROUP_IDS, type=CommandType.LIST, collectionType=CommandType.LONG, description="comma separated list of security groups id that going to be applied to the virtual machine. Should be passed only when vm is created from a zone with Basic Network support. Mutually exclusive with securitygroupnames parameter", resourceType=SecurityGroup.class)
-    private List<Long> securityGroupIdList;
-    
-    @ACL
-    @Parameter(name=ApiConstants.SECURITY_GROUP_NAMES, type=CommandType.LIST, collectionType=CommandType.STRING, description="comma separated list of security groups names that going to be applied to the virtual machine. Should be passed only when vm is created from a zone with Basic Network support. Mutually exclusive with securitygroupids parameter", resourceType=SecurityGroup.class)
-    private List<String> securityGroupNameList;
-    
-    @ACL(checkKeyAccess=true)
-    @Parameter(name = ApiConstants.IP_NETWORK_LIST, type = CommandType.MAP, description = "ip to network mapping. Can't be specified with networkIds parameter. Example: iptonetworklist[0].ip=10.10.10.11&iptonetworklist[0].networkid=204 - requests to use ip 10.10.10.11 in network id=204",resourceType={Network.class,IpAddress.class})
-    private Map ipToNetworkList;
-    
-    @Parameter(name=ApiConstants.IP_ADDRESS, type=CommandType.STRING, description="the ip address for default vm's network")
-    private String ipAddress;
-    
-    @Parameter(name=ApiConstants.KEYBOARD, type=CommandType.STRING, description="an optional keyboard device type for the virtual machine. valid value can be one of de,de-ch,es,fi,fr,fr-be,fr-ch,is,it,jp,nl-be,no,pt,uk,us")
-    private String keyboard;
-    
-    @IdentityMapper(entityTableName="projects")
-    @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.LONG, description="Deploy vm for the project")
-    private Long projectId;
-    
-    @Parameter(name=ApiConstants.START_VM, type=CommandType.BOOLEAN, description="true if network offering supports specifying ip ranges; defaulted to true if not specified")
-    private Boolean startVm;
-    
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public String getEntityTable() {
-    	return "vm_instance";
-    }
-    
-    public String getAccountName() {
-        if (accountName == null) {
-            return UserContext.current().getCaller().getAccountName();
-        }
-        return accountName;
-    }
-
-    public Long getDiskOfferingId() {
-        return diskOfferingId;
-    }
-
-    public String getDisplayName() {
-        return displayName;
-    }
-
-    public Long getDomainId() {
-        if (domainId == null) {
-            return UserContext.current().getCaller().getDomainId();
-        }
-        return domainId;
-    }
-
-    public String getGroup() {
-        return group;
-    }
-
-    public HypervisorType getHypervisor() {  	
-        return HypervisorType.getType(hypervisor);
-    }
-
-    public List<Long> getSecurityGroupIdList() {
-        if (securityGroupNameList != null && securityGroupIdList != null) {
-            throw new InvalidParameterValueException("securitygroupids parameter is mutually exclusive with securitygroupnames parameter");
-        }
-        
-       //transform group names to ids here
-       if (securityGroupNameList != null) {
-            List<Long> securityGroupIds = new ArrayList<Long>();
-            for (String groupName : securityGroupNameList) {
-                Long groupId = _responseGenerator.getSecurityGroupId(groupName, getEntityOwnerId());
-                if (groupId == null) {
-                    throw new InvalidParameterValueException("Unable to find group by name " + groupName + " for account " + getEntityOwnerId());
-                } else {
-                    securityGroupIds.add(groupId);
-                }
-            }    
-            return securityGroupIds;
-        } else {
-            return securityGroupIdList;
-        }
-    }
-
-    public Long getServiceOfferingId() {
-        return serviceOfferingId;
-    }
-
-    public Long getSize() {
-        return size;
-    }
-
-    public Long getTemplateId() {
-        return templateId;
-    }
-
-    public String getUserData() {
-        return userData;
-    }
-
-    public Long getZoneId() {
-        return zoneId;
-    }
-
-    public List<Long> getNetworkIds() {
-       if (ipToNetworkList != null) {
-           if (networkIds != null || ipAddress != null) {
-               throw new InvalidParameterValueException("ipToNetworkMap can't be specified along with networkIds or ipAddress");
-           } else {
-               List<Long> networks = new ArrayList<Long>();
-               networks.addAll(getIpToNetworkMap().keySet());
-               return networks;
-           }
-       }
-        return networkIds;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public String getSSHKeyPairName() {
-        return sshKeyPairName;
-    }
-
-    public Long getHostId() {
-        return hostId;
-    }
-    
-    public boolean getStartVm() {
-        return startVm == null ? true : startVm;
-    }
-    
-    private Map<Long, String> getIpToNetworkMap() {
-        if ((networkIds != null || ipAddress != null) && ipToNetworkList != null) {
-            throw new InvalidParameterValueException("NetworkIds and ipAddress can't be specified along with ipToNetworkMap parameter");
-        }
-        LinkedHashMap<Long, String> ipToNetworkMap = null;
-        if (ipToNetworkList != null && !ipToNetworkList.isEmpty()) {
-            ipToNetworkMap = new LinkedHashMap<Long, String>();
-            Collection ipsCollection = ipToNetworkList.values();
-            Iterator iter = ipsCollection.iterator();
-            while (iter.hasNext()) {
-                HashMap<String, String> ips = (HashMap<String, String>) iter.next();
-                Long networkId = Long.valueOf(_responseGenerator.getIdentiyId("networks", ips.get("networkid")));
-                String requestedIp = (String) ips.get("ip");
-                ipToNetworkMap.put(networkId, requestedIp);
-            }
-        }
-        
-        return ipToNetworkMap;
-    }
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-
-    public static String getResultObjectName() {
-        return "virtualmachine";
-    }
-
-    @Override
-    public long getEntityOwnerId() {
-        Long accountId = finalyzeAccountId(accountName, domainId, projectId, true);
-        if (accountId == null) {
-            return UserContext.current().getCaller().getId();
-        }
-        
-        return accountId;
-    }
-
-    @Override
-    public String getEventType() {
-        return EventTypes.EVENT_VM_CREATE;
-    }
-
-    @Override
-    public String getCreateEventType() {
-        return EventTypes.EVENT_VM_CREATE;
-    }
-
-    @Override
-    public String getCreateEventDescription() {
-        return "creating Vm";
-    }
-
-    @Override
-    public String getEventDescription() {
-        return  "starting Vm. Vm Id: "+getEntityId();
-    }
-
-    @Override
-    public AsyncJob.Type getInstanceType() {
-        return AsyncJob.Type.VirtualMachine;
-    }
-
-    @Override
-    public void execute(){
-        UserVm result;
-        
-        if (getStartVm()) {
-            try {
-                UserContext.current().setEventDetails("Vm Id: "+getEntityId());
-                if (getHypervisor() == HypervisorType.BareMetal) {
-                    result = _bareMetalVmService.startVirtualMachine(this);
-                } else {
-                    result = _userVmService.startVirtualMachine(this);
-                }
-            } catch (ResourceUnavailableException ex) {
-                s_logger.warn("Exception: ", ex);
-                throw new ServerApiException(BaseCmd.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage());
-            } catch (ConcurrentOperationException ex) {
-                s_logger.warn("Exception: ", ex);
-                throw new ServerApiException(BaseCmd.INTERNAL_ERROR, ex.getMessage()); 
-            } catch (InsufficientCapacityException ex) {
-                s_logger.info(ex);
-                s_logger.trace(ex);
-                throw new ServerApiException(BaseCmd.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage());
-            }
-        } else {
-            result = _userVmService.getUserVm(getEntityId());
-        }
-        
-        if (result != null) {
-            UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0);
-            response.setResponseName(getCommandName());
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to deploy vm");
-        }
-    }
-
-    @Override
-    public void create() throws ResourceAllocationException{
-        try {
-            //Verify that all objects exist before passing them to the service
-            Account owner = _accountService.getActiveAccountById(getEntityOwnerId());
-
-            DataCenter zone = _configService.getZone(zoneId);
-            if (zone == null) {
-                throw new InvalidParameterValueException("Unable to find zone by id=" + zoneId);
-            }
-
-            ServiceOffering serviceOffering = _configService.getServiceOffering(serviceOfferingId);
-            if (serviceOffering == null) {
-                throw new InvalidParameterValueException("Unable to find service offering: " + serviceOfferingId);
-            }
-
-            VirtualMachineTemplate template = _templateService.getTemplate(templateId);
-            // Make sure a valid template ID was specified
-            if (template == null) {
-                throw new InvalidParameterValueException("Unable to use template " + templateId);
-            }
-
-            DiskOffering diskOffering = null;
-            if (diskOfferingId != null) {
-                diskOffering = _configService.getDiskOffering(diskOfferingId);
-                if (diskOffering == null) {
-                    throw new InvalidParameterValueException("Unable to find disk offering " + diskOfferingId);
-                }
-            }
-
-            if (!zone.isLocalStorageEnabled()) {
-                if (serviceOffering.getUseLocalStorage()) {
-                    throw new InvalidParameterValueException("Zone is not configured to use local storage but service offering " + serviceOffering.getName() + " uses it");
-                }
-                if (diskOffering != null && diskOffering.getUseLocalStorage()) {
-                    throw new InvalidParameterValueException("Zone is not configured to use local storage but disk offering " + diskOffering.getName() + " uses it");
-                }
-            }
-
-            UserVm vm = null;
-            if (getHypervisor() == HypervisorType.BareMetal) {
-                vm = _bareMetalVmService.createVirtualMachine(this);
-            } else {
-                if (zone.getNetworkType() == NetworkType.Basic) {
-                    if (getNetworkIds() != null) {
-                        throw new InvalidParameterValueException("Can't specify network Ids in Basic zone");
-                    } else {
-                        vm = _userVmService.createBasicSecurityGroupVirtualMachine(zone, serviceOffering, template, getSecurityGroupIdList(), owner, name,
-                                displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), ipAddress, keyboard);
-                    }
-                } else {
-                    if (zone.isSecurityGroupEnabled())  {
-                        vm = _userVmService.createAdvancedSecurityGroupVirtualMachine(zone, serviceOffering, template, getNetworkIds(), getSecurityGroupIdList(),
-                                owner, name, displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), ipAddress, keyboard);
-                    } else {
-                        if (getSecurityGroupIdList() != null && !getSecurityGroupIdList().isEmpty()) {
-                            throw new InvalidParameterValueException("Can't create vm with security groups; security group feature is not enabled per zone");
-                        }
-                        vm = _userVmService.createAdvancedVirtualMachine(zone, serviceOffering, template, getNetworkIds(), owner, name, displayName,
-                                diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), ipAddress, keyboard);
-                    }
-                }
-            }
-
-            if (vm != null) {
-                setEntityId(vm.getId());
-            } else {
-                throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to deploy vm");
-            }
-        } catch (InsufficientCapacityException ex) {
-            s_logger.info(ex);
-            s_logger.trace(ex);
-            throw new ServerApiException(BaseCmd.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage());
-        } catch (ResourceUnavailableException ex) {
-            s_logger.warn("Exception: ", ex);
-            throw new ServerApiException(BaseCmd.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage());
-        }  catch (ConcurrentOperationException ex) {
-            s_logger.warn("Exception: ", ex);
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, ex.getMessage());
-        }  
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java b/api/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java
index 3ae61c1..c9a1043 100644
--- a/api/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java
+++ b/api/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java
@@ -18,12 +18,12 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.SuccessResponse;
 import com.cloud.event.EventTypes;
 import com.cloud.user.Account;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DestroyRouterCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DestroyRouterCmd.java b/api/src/com/cloud/api/commands/DestroyRouterCmd.java
index f5286d6..7c52479 100644
--- a/api/src/com/cloud/api/commands/DestroyRouterCmd.java
+++ b/api/src/com/cloud/api/commands/DestroyRouterCmd.java
@@ -18,13 +18,13 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.DomainRouterResponse;
 import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DestroySystemVmCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DestroySystemVmCmd.java b/api/src/com/cloud/api/commands/DestroySystemVmCmd.java
index 44626e1..3b0232e 100644
--- a/api/src/com/cloud/api/commands/DestroySystemVmCmd.java
+++ b/api/src/com/cloud/api/commands/DestroySystemVmCmd.java
@@ -18,13 +18,13 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.SystemVmResponse;
 import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DestroyVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DestroyVMCmd.java b/api/src/com/cloud/api/commands/DestroyVMCmd.java
deleted file mode 100644
index 1f7a2bf..0000000
--- a/api/src/com/cloud/api/commands/DestroyVMCmd.java
+++ /dev/null
@@ -1,115 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.api.commands;
-
-import org.apache.log4j.Logger;
-
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
-import com.cloud.api.response.UserVmResponse;
-import com.cloud.async.AsyncJob;
-import com.cloud.event.EventTypes;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.user.Account;
-import com.cloud.user.UserContext;
-import com.cloud.uservm.UserVm;
-
-@Implementation(description="Destroys a virtual machine. Once destroyed, only the administrator can recover it.", responseObject=UserVmResponse.class)
-public class DestroyVMCmd extends BaseAsyncCmd {
-    public static final Logger s_logger = Logger.getLogger(DestroyVMCmd.class.getName());
-
-    private static final String s_name = "destroyvirtualmachineresponse";
-
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-    @IdentityMapper(entityTableName="vm_instance")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the virtual machine")
-    private Long id;
-
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public Long getId() {
-        return id;
-    }
-
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-
-    @Override
-    public String getCommandName() {
-        return s_name;
-    }
-
-    @Override
-    public long getEntityOwnerId() {
-        UserVm vm = _responseGenerator.findUserVmById(getId());
-        if (vm != null) {
-            return vm.getAccountId();
-        }
-
-        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
-    }
-
-    @Override
-    public String getEventType() {
-        return EventTypes.EVENT_VM_DESTROY;
-    }
-
-    @Override
-    public String getEventDescription() {
-        return  "destroying vm: " + getId();
-    }
-    
-    public AsyncJob.Type getInstanceType() {
-    	return AsyncJob.Type.VirtualMachine;
-    }
-    
-    public Long getInstanceId() {
-    	return getId();
-    }
-
-    @Override
-    public void execute() throws ResourceUnavailableException, ConcurrentOperationException{
-        UserContext.current().setEventDetails("Vm Id: "+getId());
-        UserVm result;
-        if (_userVmService.getHypervisorTypeOfUserVM(getId()) == HypervisorType.BareMetal) {
-        	result = _bareMetalVmService.destroyVm(this);
-        } else {
-        	result = _userVmService.destroyVm(this);
-        }
-        
-        if (result != null) {
-            UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0);
-            response.setResponseName("virtualmachine");
-            this.setResponseObject(response);
-        } else {
-            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to destroy vm");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DetachIsoCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DetachIsoCmd.java b/api/src/com/cloud/api/commands/DetachIsoCmd.java
index af318d7..4bdc9dd 100755
--- a/api/src/com/cloud/api/commands/DetachIsoCmd.java
+++ b/api/src/com/cloud/api/commands/DetachIsoCmd.java
@@ -16,15 +16,16 @@
 // under the License.
 package com.cloud.api.commands;
 
+import org.apache.cloudstack.api.user.vm.command.DeployVMCmd;
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.UserVmResponse;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.InvalidParameterValueException;
@@ -87,7 +88,7 @@ public class DetachIsoCmd extends BaseAsyncCmd {
         if (result) {
             UserVm userVm = _entityMgr.findById(UserVm.class, virtualMachineId);         
             UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", userVm).get(0);            
-            response.setResponseName(DeployVMCmd.getResultObjectName());           
+            response.setResponseName(DeployVMCmd.getResultObjectName());
             this.setResponseObject(response);
         } else {
             throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to detach iso");

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DetachVolumeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DetachVolumeCmd.java b/api/src/com/cloud/api/commands/DetachVolumeCmd.java
index 3a3557d..d086159 100755
--- a/api/src/com/cloud/api/commands/DetachVolumeCmd.java
+++ b/api/src/com/cloud/api/commands/DetachVolumeCmd.java
@@ -18,13 +18,13 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.VolumeResponse;
 import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DisableAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DisableAccountCmd.java b/api/src/com/cloud/api/commands/DisableAccountCmd.java
index 7c5e5e3..539eaa5 100644
--- a/api/src/com/cloud/api/commands/DisableAccountCmd.java
+++ b/api/src/com/cloud/api/commands/DisableAccountCmd.java
@@ -18,13 +18,13 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.AccountResponse;
 import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DisableAutoScaleVmGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DisableAutoScaleVmGroupCmd.java b/api/src/com/cloud/api/commands/DisableAutoScaleVmGroupCmd.java
index bd37d0a..3ca52ed 100644
--- a/api/src/com/cloud/api/commands/DisableAutoScaleVmGroupCmd.java
+++ b/api/src/com/cloud/api/commands/DisableAutoScaleVmGroupCmd.java
@@ -19,13 +19,13 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.AutoScaleVmGroupResponse;
 import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DisableStaticNatCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DisableStaticNatCmd.java b/api/src/com/cloud/api/commands/DisableStaticNatCmd.java
index 5983264..d594991 100644
--- a/api/src/com/cloud/api/commands/DisableStaticNatCmd.java
+++ b/api/src/com/cloud/api/commands/DisableStaticNatCmd.java
@@ -18,13 +18,13 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.SuccessResponse;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.InsufficientAddressCapacityException;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DisableUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DisableUserCmd.java b/api/src/com/cloud/api/commands/DisableUserCmd.java
index 407042d..9a5b614 100644
--- a/api/src/com/cloud/api/commands/DisableUserCmd.java
+++ b/api/src/com/cloud/api/commands/DisableUserCmd.java
@@ -18,13 +18,13 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.UserResponse;
 import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/DisassociateIPAddrCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/DisassociateIPAddrCmd.java b/api/src/com/cloud/api/commands/DisassociateIPAddrCmd.java
index 2f2addb..9ba3cd1 100644
--- a/api/src/com/cloud/api/commands/DisassociateIPAddrCmd.java
+++ b/api/src/com/cloud/api/commands/DisassociateIPAddrCmd.java
@@ -18,13 +18,13 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.SuccessResponse;
 import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/EnableAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/EnableAccountCmd.java b/api/src/com/cloud/api/commands/EnableAccountCmd.java
index 576f935..d476ed6 100644
--- a/api/src/com/cloud/api/commands/EnableAccountCmd.java
+++ b/api/src/com/cloud/api/commands/EnableAccountCmd.java
@@ -18,12 +18,12 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.AccountResponse;
 import com.cloud.user.Account;
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/EnableAutoScaleVmGroupCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/EnableAutoScaleVmGroupCmd.java b/api/src/com/cloud/api/commands/EnableAutoScaleVmGroupCmd.java
index dee1d27..329998a 100644
--- a/api/src/com/cloud/api/commands/EnableAutoScaleVmGroupCmd.java
+++ b/api/src/com/cloud/api/commands/EnableAutoScaleVmGroupCmd.java
@@ -19,13 +19,13 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.AutoScaleVmGroupResponse;
 import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/EnableStaticNatCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/EnableStaticNatCmd.java b/api/src/com/cloud/api/commands/EnableStaticNatCmd.java
index 9e21b83..f211366 100644
--- a/api/src/com/cloud/api/commands/EnableStaticNatCmd.java
+++ b/api/src/com/cloud/api/commands/EnableStaticNatCmd.java
@@ -18,12 +18,12 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.SuccessResponse;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.NetworkRuleConflictException;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/EnableUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/EnableUserCmd.java b/api/src/com/cloud/api/commands/EnableUserCmd.java
index 914d59b..90843e2 100644
--- a/api/src/com/cloud/api/commands/EnableUserCmd.java
+++ b/api/src/com/cloud/api/commands/EnableUserCmd.java
@@ -18,12 +18,12 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.UserResponse;
 import com.cloud.user.Account;
 import com.cloud.user.User;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ExtractIsoCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ExtractIsoCmd.java b/api/src/com/cloud/api/commands/ExtractIsoCmd.java
index a9fb606..cb180f2 100755
--- a/api/src/com/cloud/api/commands/ExtractIsoCmd.java
+++ b/api/src/com/cloud/api/commands/ExtractIsoCmd.java
@@ -18,13 +18,13 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.ExtractResponse;
 import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ExtractTemplateCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ExtractTemplateCmd.java b/api/src/com/cloud/api/commands/ExtractTemplateCmd.java
index 975897e..c2e22d0 100755
--- a/api/src/com/cloud/api/commands/ExtractTemplateCmd.java
+++ b/api/src/com/cloud/api/commands/ExtractTemplateCmd.java
@@ -18,13 +18,13 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.ExtractResponse;
 import com.cloud.async.AsyncJob;
 import com.cloud.event.EventTypes;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ExtractVolumeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ExtractVolumeCmd.java b/api/src/com/cloud/api/commands/ExtractVolumeCmd.java
index 2a9dbff..2b82b06 100755
--- a/api/src/com/cloud/api/commands/ExtractVolumeCmd.java
+++ b/api/src/com/cloud/api/commands/ExtractVolumeCmd.java
@@ -20,13 +20,13 @@ import java.net.URISyntaxException;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseAsyncCmd;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseAsyncCmd;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.ExtractResponse;
 import com.cloud.async.AsyncJob;
 import com.cloud.dc.DataCenter;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/GetCloudIdentifierCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/GetCloudIdentifierCmd.java b/api/src/com/cloud/api/commands/GetCloudIdentifierCmd.java
index e1f7cd3..e934ddf 100644
--- a/api/src/com/cloud/api/commands/GetCloudIdentifierCmd.java
+++ b/api/src/com/cloud/api/commands/GetCloudIdentifierCmd.java
@@ -20,12 +20,12 @@ import java.util.ArrayList;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.CloudIdentifierResponse;
 import com.cloud.user.Account;
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/GetUserCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/GetUserCmd.java b/api/src/com/cloud/api/commands/GetUserCmd.java
index 465e440..8f5d6b4 100644
--- a/api/src/com/cloud/api/commands/GetUserCmd.java
+++ b/api/src/com/cloud/api/commands/GetUserCmd.java
@@ -18,10 +18,10 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.UserResponse;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.user.UserAccount;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/GetVMPasswordCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/GetVMPasswordCmd.java b/api/src/com/cloud/api/commands/GetVMPasswordCmd.java
deleted file mode 100644
index a6a3c6d..0000000
--- a/api/src/com/cloud/api/commands/GetVMPasswordCmd.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-package com.cloud.api.commands;
-
-import java.security.InvalidParameterException;
-
-import org.apache.log4j.Logger;
-
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.response.GetVMPasswordResponse;
-import com.cloud.user.Account;
-import com.cloud.uservm.UserVm;
-
-@Implementation(responseObject=GetVMPasswordResponse.class, description="Returns an encrypted password for the VM")
-public class GetVMPasswordCmd extends BaseCmd {
-    public static final Logger s_logger = Logger.getLogger(GetVMPasswordCmd.class.getName());
-    private static final String s_name = "getvmpasswordresponse";
-
-    
-    /////////////////////////////////////////////////////
-    //////////////// API parameters /////////////////////
-    /////////////////////////////////////////////////////
-
-    @IdentityMapper(entityTableName="vm_instance")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the virtual machine")
-    private Long id;
-    
-    
-    /////////////////////////////////////////////////////
-    /////////////////// Accessors ///////////////////////
-    /////////////////////////////////////////////////////
-
-    public Long getId() {
-        return id;
-    }
-
-    
-    /////////////////////////////////////////////////////
-    /////////////// API Implementation///////////////////
-    /////////////////////////////////////////////////////
-    
-	@Override
-	public void execute() {
-		String passwd = _mgr.getVMPassword(this);
-		if (passwd == null || passwd.equals("")) 
-			throw new InvalidParameterException("No password for VM with id '" + getId() + "' found.");
-		
-		this.setResponseObject(new GetVMPasswordResponse(getCommandName(), passwd));
-	}
-	
-    @Override
-    public long getEntityOwnerId() {
-        UserVm userVm = _entityMgr.findById(UserVm.class, getId());
-        if (userVm != null) {
-            return userVm.getAccountId();
-        }
-
-        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
-    }
-
-	@Override
-	public String getCommandName() {
-		return s_name;
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/LDAPConfigCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/LDAPConfigCmd.java b/api/src/com/cloud/api/commands/LDAPConfigCmd.java
index d7ff5b5..b0a9e5b 100644
--- a/api/src/com/cloud/api/commands/LDAPConfigCmd.java
+++ b/api/src/com/cloud/api/commands/LDAPConfigCmd.java
@@ -21,11 +21,11 @@ import javax.naming.NamingException;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
-import com.cloud.api.ServerApiException;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
 import com.cloud.api.response.LDAPConfigResponse;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/LDAPRemoveCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/LDAPRemoveCmd.java b/api/src/com/cloud/api/commands/LDAPRemoveCmd.java
index 4858e67..9d5a5d8 100644
--- a/api/src/com/cloud/api/commands/LDAPRemoveCmd.java
+++ b/api/src/com/cloud/api/commands/LDAPRemoveCmd.java
@@ -19,8 +19,8 @@ package com.cloud.api.commands;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.BaseCmd;
-import com.cloud.api.Implementation;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Implementation;
 import com.cloud.api.response.LDAPConfigResponse;
 import com.cloud.api.response.LDAPRemoveResponse;
 import com.cloud.user.Account;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListAccountsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListAccountsCmd.java b/api/src/com/cloud/api/commands/ListAccountsCmd.java
index 6e0a524..cf4bcd0 100755
--- a/api/src/com/cloud/api/commands/ListAccountsCmd.java
+++ b/api/src/com/cloud/api/commands/ListAccountsCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListDomainResourcesCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListDomainResourcesCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.AccountResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.user.Account;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListAlertsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListAlertsCmd.java b/api/src/com/cloud/api/commands/ListAlertsCmd.java
index 1f6c7b3..00ee59f 100644
--- a/api/src/com/cloud/api/commands/ListAlertsCmd.java
+++ b/api/src/com/cloud/api/commands/ListAlertsCmd.java
@@ -22,11 +22,11 @@ import java.util.List;
 import org.apache.log4j.Logger;
 
 import com.cloud.alert.Alert;
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.AlertResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.utils.Pair;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListAsyncJobsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListAsyncJobsCmd.java b/api/src/com/cloud/api/commands/ListAsyncJobsCmd.java
index e0520cd..734b578 100644
--- a/api/src/com/cloud/api/commands/ListAsyncJobsCmd.java
+++ b/api/src/com/cloud/api/commands/ListAsyncJobsCmd.java
@@ -20,10 +20,10 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListAccountResourcesCmd;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListAccountResourcesCmd;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.AsyncJobResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.async.AsyncJob;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListAutoScalePoliciesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListAutoScalePoliciesCmd.java b/api/src/com/cloud/api/commands/ListAutoScalePoliciesCmd.java
index edab908..06424d0 100644
--- a/api/src/com/cloud/api/commands/ListAutoScalePoliciesCmd.java
+++ b/api/src/com/cloud/api/commands/ListAutoScalePoliciesCmd.java
@@ -1,19 +1,19 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 package com.cloud.api.commands;
 
 import java.util.ArrayList;
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListAccountResourcesCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListAccountResourcesCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.AutoScalePolicyResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.network.as.AutoScalePolicy;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListAutoScaleVmGroupsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListAutoScaleVmGroupsCmd.java b/api/src/com/cloud/api/commands/ListAutoScaleVmGroupsCmd.java
index 0d1b2e0..6cb3d56 100644
--- a/api/src/com/cloud/api/commands/ListAutoScaleVmGroupsCmd.java
+++ b/api/src/com/cloud/api/commands/ListAutoScaleVmGroupsCmd.java
@@ -1,19 +1,19 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 package com.cloud.api.commands;
 
 import java.util.ArrayList;
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListProjectAndAccountResourcesCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.AutoScaleVmGroupResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.exception.InvalidParameterValueException;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListAutoScaleVmProfilesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListAutoScaleVmProfilesCmd.java b/api/src/com/cloud/api/commands/ListAutoScaleVmProfilesCmd.java
index 8034800..987c18c 100644
--- a/api/src/com/cloud/api/commands/ListAutoScaleVmProfilesCmd.java
+++ b/api/src/com/cloud/api/commands/ListAutoScaleVmProfilesCmd.java
@@ -1,19 +1,19 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
 package com.cloud.api.commands;
 
 import java.util.ArrayList;
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListProjectAndAccountResourcesCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.AutoScaleVmProfileResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.network.as.AutoScaleVmProfile;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java b/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java
index 108b268..6218323 100644
--- a/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java
+++ b/api/src/com/cloud/api/commands/ListCapabilitiesCmd.java
@@ -20,8 +20,8 @@ import java.util.Map;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.BaseCmd;
-import com.cloud.api.Implementation;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Implementation;
 import com.cloud.api.response.CapabilitiesResponse;
 import com.cloud.user.Account;
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListCapacityCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListCapacityCmd.java b/api/src/com/cloud/api/commands/ListCapacityCmd.java
index 5e3ca5e..a7899f6 100755
--- a/api/src/com/cloud/api/commands/ListCapacityCmd.java
+++ b/api/src/com/cloud/api/commands/ListCapacityCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.CapacityResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.capacity.Capacity;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListCfgsByCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListCfgsByCmd.java b/api/src/com/cloud/api/commands/ListCfgsByCmd.java
index 6e07ca9..e539338 100644
--- a/api/src/com/cloud/api/commands/ListCfgsByCmd.java
+++ b/api/src/com/cloud/api/commands/ListCfgsByCmd.java
@@ -21,10 +21,10 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.ConfigurationResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.configuration.Configuration;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListClustersCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListClustersCmd.java b/api/src/com/cloud/api/commands/ListClustersCmd.java
index e571bf5..1953325 100755
--- a/api/src/com/cloud/api/commands/ListClustersCmd.java
+++ b/api/src/com/cloud/api/commands/ListClustersCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.ClusterResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.org.Cluster;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListConditionsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListConditionsCmd.java b/api/src/com/cloud/api/commands/ListConditionsCmd.java
index 4d50b8b..c99d627 100644
--- a/api/src/com/cloud/api/commands/ListConditionsCmd.java
+++ b/api/src/com/cloud/api/commands/ListConditionsCmd.java
@@ -22,11 +22,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListAccountResourcesCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListAccountResourcesCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.ConditionResponse;
 import com.cloud.api.response.CounterResponse;
 import com.cloud.api.response.ListResponse;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListCountersCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListCountersCmd.java b/api/src/com/cloud/api/commands/ListCountersCmd.java
index 60108ca..b70a03f 100644
--- a/api/src/com/cloud/api/commands/ListCountersCmd.java
+++ b/api/src/com/cloud/api/commands/ListCountersCmd.java
@@ -22,11 +22,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.CounterResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.network.as.Counter;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListDiskOfferingsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListDiskOfferingsCmd.java b/api/src/com/cloud/api/commands/ListDiskOfferingsCmd.java
index fbf655d..7f30d06 100644
--- a/api/src/com/cloud/api/commands/ListDiskOfferingsCmd.java
+++ b/api/src/com/cloud/api/commands/ListDiskOfferingsCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.DiskOfferingResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.offering.DiskOffering;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListDomainChildrenCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListDomainChildrenCmd.java b/api/src/com/cloud/api/commands/ListDomainChildrenCmd.java
index bb0dd7f..f014d34 100644
--- a/api/src/com/cloud/api/commands/ListDomainChildrenCmd.java
+++ b/api/src/com/cloud/api/commands/ListDomainChildrenCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.DomainResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.domain.Domain;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListDomainsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListDomainsCmd.java b/api/src/com/cloud/api/commands/ListDomainsCmd.java
index 93d1570..492fbdf 100644
--- a/api/src/com/cloud/api/commands/ListDomainsCmd.java
+++ b/api/src/com/cloud/api/commands/ListDomainsCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.DomainResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.domain.Domain;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListEventTypesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListEventTypesCmd.java b/api/src/com/cloud/api/commands/ListEventTypesCmd.java
index cd1d129..8d6f21f 100644
--- a/api/src/com/cloud/api/commands/ListEventTypesCmd.java
+++ b/api/src/com/cloud/api/commands/ListEventTypesCmd.java
@@ -20,8 +20,8 @@ import java.util.ArrayList;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.BaseCmd;
-import com.cloud.api.Implementation;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Implementation;
 import com.cloud.api.response.EventTypeResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.user.Account;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListEventsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListEventsCmd.java b/api/src/com/cloud/api/commands/ListEventsCmd.java
index 512d377..eca145f 100755
--- a/api/src/com/cloud/api/commands/ListEventsCmd.java
+++ b/api/src/com/cloud/api/commands/ListEventsCmd.java
@@ -22,11 +22,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListProjectAndAccountResourcesCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.EventResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.event.Event;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListFirewallRulesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListFirewallRulesCmd.java b/api/src/com/cloud/api/commands/ListFirewallRulesCmd.java
index c136266..232f5a2 100644
--- a/api/src/com/cloud/api/commands/ListFirewallRulesCmd.java
+++ b/api/src/com/cloud/api/commands/ListFirewallRulesCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListTaggedResourcesCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListTaggedResourcesCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.FirewallResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.network.rules.FirewallRule;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListGuestOsCategoriesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListGuestOsCategoriesCmd.java b/api/src/com/cloud/api/commands/ListGuestOsCategoriesCmd.java
index 79ce709..e0af2f6 100644
--- a/api/src/com/cloud/api/commands/ListGuestOsCategoriesCmd.java
+++ b/api/src/com/cloud/api/commands/ListGuestOsCategoriesCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.GuestOSCategoryResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.storage.GuestOsCategory;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListGuestOsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListGuestOsCmd.java b/api/src/com/cloud/api/commands/ListGuestOsCmd.java
index 61ec453..f64e89a 100644
--- a/api/src/com/cloud/api/commands/ListGuestOsCmd.java
+++ b/api/src/com/cloud/api/commands/ListGuestOsCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.GuestOSResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.storage.GuestOS;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListHostsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListHostsCmd.java b/api/src/com/cloud/api/commands/ListHostsCmd.java
index 87f1330..09e7179 100755
--- a/api/src/com/cloud/api/commands/ListHostsCmd.java
+++ b/api/src/com/cloud/api/commands/ListHostsCmd.java
@@ -22,12 +22,12 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.ApiConstants.HostDetails;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiConstants.HostDetails;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.HostResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.async.AsyncJob;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListHypervisorCapabilitiesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListHypervisorCapabilitiesCmd.java b/api/src/com/cloud/api/commands/ListHypervisorCapabilitiesCmd.java
index 9afd3eb..29a56a3 100644
--- a/api/src/com/cloud/api/commands/ListHypervisorCapabilitiesCmd.java
+++ b/api/src/com/cloud/api/commands/ListHypervisorCapabilitiesCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.HypervisorCapabilitiesResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListHypervisorsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListHypervisorsCmd.java b/api/src/com/cloud/api/commands/ListHypervisorsCmd.java
index e058df6..ec460f3 100644
--- a/api/src/com/cloud/api/commands/ListHypervisorsCmd.java
+++ b/api/src/com/cloud/api/commands/ListHypervisorsCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.HypervisorResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.user.Account;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListIpForwardingRulesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListIpForwardingRulesCmd.java b/api/src/com/cloud/api/commands/ListIpForwardingRulesCmd.java
index fedbac0..a3e1479 100644
--- a/api/src/com/cloud/api/commands/ListIpForwardingRulesCmd.java
+++ b/api/src/com/cloud/api/commands/ListIpForwardingRulesCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListProjectAndAccountResourcesCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.FirewallRuleResponse;
 import com.cloud.api.response.IpForwardingRuleResponse;
 import com.cloud.api.response.ListResponse;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListIsosCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListIsosCmd.java b/api/src/com/cloud/api/commands/ListIsosCmd.java
index 752c834..970b6d4 100755
--- a/api/src/com/cloud/api/commands/ListIsosCmd.java
+++ b/api/src/com/cloud/api/commands/ListIsosCmd.java
@@ -22,11 +22,11 @@ import java.util.Set;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListTaggedResourcesCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListTaggedResourcesCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.ListResponse;
 import com.cloud.api.response.TemplateResponse;
 import com.cloud.async.AsyncJob;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6fc3bc37/api/src/com/cloud/api/commands/ListLBStickinessPoliciesCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/ListLBStickinessPoliciesCmd.java b/api/src/com/cloud/api/commands/ListLBStickinessPoliciesCmd.java
index 6be47c1..9f695e6 100644
--- a/api/src/com/cloud/api/commands/ListLBStickinessPoliciesCmd.java
+++ b/api/src/com/cloud/api/commands/ListLBStickinessPoliciesCmd.java
@@ -21,11 +21,11 @@ import java.util.List;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.api.ApiConstants;
-import com.cloud.api.BaseListCmd;
-import com.cloud.api.IdentityMapper;
-import com.cloud.api.Implementation;
-import com.cloud.api.Parameter;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.IdentityMapper;
+import org.apache.cloudstack.api.Implementation;
+import org.apache.cloudstack.api.Parameter;
 import com.cloud.api.response.LBStickinessResponse;
 import com.cloud.api.response.ListResponse;
 import com.cloud.network.rules.LoadBalancer;