You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2013/07/22 20:48:39 UTC

[6/7] git commit: updated refs/heads/master to 0223657

Changed VirtualMachineProfile to be non-generic.  From here on VirtualMachineManager will only manage vm instance.  It doesn't understand the difference between different types of VMs.  This makes the vmsync code to be generic across all vms.


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

Branch: refs/heads/master
Commit: 1325014a03efbe8d698f55c17ed70ecb8817c1b4
Parents: 7928963
Author: Alex Huang <al...@citrix.com>
Authored: Mon Jul 22 11:08:39 2013 -0700
Committer: Alex Huang <al...@citrix.com>
Committed: Mon Jul 22 11:48:11 2013 -0700

----------------------------------------------------------------------
 .../agent/manager/allocator/HostAllocator.java  |   6 +-
 .../cloud/deploy/DeploymentClusterPlanner.java  |   6 +-
 api/src/com/cloud/deploy/DeploymentPlanner.java |   7 +-
 .../com/cloud/hypervisor/HypervisorGuru.java    |   2 +-
 .../network/NetworkMigrationResponder.java      |   6 +-
 .../network/element/DhcpServiceProvider.java    |   4 +-
 .../cloud/network/element/NetworkElement.java   |   4 +-
 .../element/UserDataServiceProvider.java        |   8 +-
 api/src/com/cloud/network/guru/NetworkGuru.java |   8 +-
 api/src/com/cloud/vm/VirtualMachineProfile.java |   8 +-
 .../affinity/AffinityGroupProcessor.java        |   5 +-
 .../affinity/AffinityProcessorBase.java         |   5 +-
 .../api/storage/StoragePoolAllocator.java       |   3 +-
 .../cloud/entity/api/VMEntityManagerImpl.java   |   6 +-
 .../allocator/AbstractStoragePoolAllocator.java |  10 +-
 .../ClusterScopeStoragePoolAllocator.java       |  10 +-
 .../GarbageCollectingStoragePoolAllocator.java  |   2 +-
 .../allocator/LocalStoragePoolAllocator.java    |   2 +-
 .../allocator/UseLocalForRootAllocator.java     |   2 +-
 .../allocator/ZoneWideStoragePoolAllocator.java |   2 +-
 .../affinity/ExplicitDedicationProcessor.java   |   5 +-
 .../affinity/HostAntiAffinityProcessor.java     |   4 +-
 .../cloud/deploy/ImplicitDedicationPlanner.java |   4 +-
 .../implicitplanner/ImplicitPlannerTest.java    |  16 +-
 .../deploy/UserConcentratedPodPlanner.java      |   4 +-
 .../com/cloud/deploy/UserDispersingPlanner.java |   4 +-
 .../manager/allocator/impl/RandomAllocator.java |   6 +-
 .../cloud/baremetal/manager/BareMetalGuru.java  |  11 +-
 .../baremetal/manager/BareMetalPlanner.java     |  16 +-
 .../BareMetalPingServiceImpl.java               |  20 +-
 .../networkservice/BaremetaNetworkGuru.java     |   4 +-
 .../networkservice/BaremetalDhcpElement.java    |   8 +-
 .../networkservice/BaremetalDhcpManager.java    |   2 +-
 .../BaremetalDhcpManagerImpl.java               |   2 +-
 .../BaremetalKickStartServiceImpl.java          |  10 +-
 .../networkservice/BaremetalPxeElement.java     |   4 +-
 .../networkservice/BaremetalPxeManager.java     |  11 +-
 .../networkservice/BaremetalPxeManagerImpl.java |  13 +-
 .../networkservice/BaremetalPxeService.java     |  14 +-
 .../BaremetalUserdataElement.java               |  14 +-
 .../src/com/cloud/ovm/hypervisor/OvmGuru.java   |   6 +-
 .../src/com/cloud/simulator/SimulatorGuru.java  |   9 +-
 .../com/cloud/hypervisor/guru/VMwareGuru.java   |   2 +-
 .../network/element/CiscoNexusVSMElement.java   |   4 +-
 .../src/com/cloud/hypervisor/XenServerGuru.java |   6 +-
 .../network/element/BigSwitchVnsElement.java    |   4 +-
 .../guru/BigSwitchVnsGuestNetworkGuru.java      |   4 +-
 .../cloud/network/element/CiscoVnmcElement.java |   4 +-
 .../cloudstack/network/element/DnsNotifier.java |   4 +-
 .../element/ElasticLoadBalancerElement.java     |   4 +-
 .../lb/ElasticLoadBalancerManagerImpl.java      |  21 +-
 .../element/F5ExternalLoadBalancerElement.java  |   4 +-
 .../element/InternalLoadBalancerElement.java    |   4 +-
 .../lb/InternalLoadBalancerVMManagerImpl.java   |  23 +-
 .../JuniperSRXExternalFirewallElement.java      |   4 +-
 .../cloud/network/element/MidoNetElement.java   |   8 +-
 .../network/guru/MidoNetGuestNetworkGuru.java   |   4 +-
 .../network/guru/MidoNetPublicNetworkGuru.java  |  10 +-
 .../network/element/MidoNetElementTest.java     |   4 +-
 .../cloud/network/element/NetscalerElement.java |   4 +-
 .../cloud/network/element/NiciraNvpElement.java |   4 +-
 .../network/guru/NiciraNvpGuestNetworkGuru.java |   4 +-
 .../com/cloud/network/element/OvsElement.java   |   4 +-
 .../com/cloud/network/ovs/OvsTunnelManager.java |   2 +-
 .../cloud/network/ovs/OvsTunnelManagerImpl.java |   2 +-
 .../cloudstack/network/element/SspElement.java  |  10 +-
 .../network/guru/SspGuestNetworkGuru.java       |  10 +-
 .../allocator/RandomStoragePoolAllocator.java   |   2 +-
 .../allocator/impl/FirstFitAllocator.java       |   6 +-
 .../impl/FirstFitRoutingAllocator.java          |   2 +-
 .../allocator/impl/RecreateHostAllocator.java   |   2 +-
 .../allocator/impl/TestingAllocator.java        |   6 +-
 .../consoleproxy/ConsoleProxyManagerImpl.java   |  18 +-
 .../cloud/deploy/DeploymentPlanningManager.java |   5 +-
 .../deploy/DeploymentPlanningManagerImpl.java   |  14 +-
 .../src/com/cloud/deploy/FirstFitPlanner.java   |  20 +-
 .../cloud/hypervisor/HypervisorGuruBase.java    |   2 +-
 server/src/com/cloud/hypervisor/KVMGuru.java    |   4 +-
 server/src/com/cloud/hypervisor/LXCGuru.java    |   4 +-
 .../src/com/cloud/network/NetworkManager.java   |  49 +-
 .../com/cloud/network/NetworkManagerImpl.java   |  42 +-
 .../element/CloudZonesNetworkElement.java       |  31 +-
 .../network/element/SecurityGroupElement.java   |   4 +-
 .../network/element/VirtualRouterElement.java   |  36 +-
 .../element/VpcVirtualRouterElement.java        |   2 +-
 .../cloud/network/guru/ControlNetworkGuru.java  |   8 +-
 .../cloud/network/guru/DirectNetworkGuru.java   |  10 +-
 .../network/guru/DirectPodBasedNetworkGuru.java |   6 +-
 .../network/guru/ExternalGuestNetworkGuru.java  |   8 +-
 .../cloud/network/guru/GuestNetworkGuru.java    |   8 +-
 .../cloud/network/guru/PodBasedNetworkGuru.java |   8 +-
 .../cloud/network/guru/PrivateNetworkGuru.java  |   8 +-
 .../cloud/network/guru/PublicNetworkGuru.java   |  10 +-
 .../cloud/network/guru/StorageNetworkGuru.java  |   8 +-
 .../router/VirtualNetworkApplianceManager.java  |  12 +-
 .../VirtualNetworkApplianceManagerImpl.java     |  86 +-
 .../VpcVirtualNetworkApplianceManagerImpl.java  |  18 +-
 .../com/cloud/server/ManagementServerImpl.java  |   6 +-
 .../com/cloud/storage/StorageManagerImpl.java   |   2 +-
 server/src/com/cloud/storage/VolumeManager.java |  13 +-
 .../com/cloud/storage/VolumeManagerImpl.java    |  12 +-
 .../secondary/SecondaryStorageManagerImpl.java  |  23 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java  |  37 +-
 server/src/com/cloud/vm/VirtualMachineGuru.java |  14 +-
 .../src/com/cloud/vm/VirtualMachineManager.java |   2 +-
 .../com/cloud/vm/VirtualMachineManagerImpl.java |  47 +-
 .../com/cloud/vm/VirtualMachineProfileImpl.java |  20 +-
 .../cloud/network/MockNetworkManagerImpl.java   | 962 -------------------
 .../cloud/vm/VirtualMachineManagerImplTest.java |   2 +-
 .../com/cloud/vpc/MockNetworkManagerImpl.java   |  62 +-
 .../MockVpcVirtualNetworkApplianceManager.java  |  12 +-
 111 files changed, 548 insertions(+), 1552 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/com/cloud/agent/manager/allocator/HostAllocator.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/manager/allocator/HostAllocator.java b/api/src/com/cloud/agent/manager/allocator/HostAllocator.java
index fcd1fc1..14525aa 100755
--- a/api/src/com/cloud/agent/manager/allocator/HostAllocator.java
+++ b/api/src/com/cloud/agent/manager/allocator/HostAllocator.java
@@ -47,7 +47,7 @@ public interface HostAllocator extends Adapter {
 	* @return List<Host> List of hosts that are suitable for VM allocation
 	**/
 	
-	public List<Host> allocateTo(VirtualMachineProfile<?extends VirtualMachine> vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo);
+	public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo);
 	
     /**
     * Determines which physical hosts are suitable to
@@ -62,7 +62,7 @@ public interface HostAllocator extends Adapter {
     * @return List<Host> List of hosts that are suitable for VM allocation
     **/
     
-    public List<Host> allocateTo(VirtualMachineProfile<?extends VirtualMachine> vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo, boolean considerReservedCapacity);
+    public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo, boolean considerReservedCapacity);
 
     /**
      * Determines which physical hosts are suitable to
@@ -77,7 +77,7 @@ public interface HostAllocator extends Adapter {
      * @param boolean considerReservedCapacity (default should be true, set to false if host capacity calculation should not look at reserved capacity)
      * @return List<Host> List of hosts that are suitable for VM allocation
      **/
-    public List<Host> allocateTo(VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, List<? extends Host> hosts,
+    public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, List<? extends Host> hosts,
             int returnUpTo, boolean considerReservedCapacity);
 
      public static int RETURN_UPTO_ALL = -1;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/deploy/DeploymentClusterPlanner.java b/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
index 8b15ea5..ca73267 100644
--- a/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
+++ b/api/src/com/cloud/deploy/DeploymentClusterPlanner.java
@@ -18,9 +18,7 @@ package com.cloud.deploy;
 
 import java.util.List;
 
-import com.cloud.deploy.DeploymentPlanner.ExcludeList;
 import com.cloud.exception.InsufficientServerCapacityException;
-import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
 
 /**
@@ -38,10 +36,10 @@ public interface DeploymentClusterPlanner extends DeploymentPlanner {
      *            avoid these data centers, pods, clusters, or hosts.
      * @return DeployDestination for that virtual machine.
      */
-    List<Long> orderClusters(VirtualMachineProfile<? extends VirtualMachine> vm, DeploymentPlan plan, ExcludeList avoid)
+    List<Long> orderClusters(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid)
             throws InsufficientServerCapacityException;
 
-    PlannerResourceUsage getResourceUsage(VirtualMachineProfile<? extends VirtualMachine> vmProfile,
+    PlannerResourceUsage getResourceUsage(VirtualMachineProfile vmProfile,
             DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException;
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/com/cloud/deploy/DeploymentPlanner.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/deploy/DeploymentPlanner.java b/api/src/com/cloud/deploy/DeploymentPlanner.java
index 769da39..741a804 100644
--- a/api/src/com/cloud/deploy/DeploymentPlanner.java
+++ b/api/src/com/cloud/deploy/DeploymentPlanner.java
@@ -29,7 +29,6 @@ import com.cloud.host.Host;
 import com.cloud.org.Cluster;
 import com.cloud.storage.StoragePool;
 import com.cloud.utils.component.Adapter;
-import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
 
 /**
@@ -48,7 +47,7 @@ public interface DeploymentPlanner extends Adapter {
      * @return DeployDestination for that virtual machine.
      */
     @Deprecated
-    DeployDestination plan(VirtualMachineProfile<? extends VirtualMachine> vm, DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException;
+    DeployDestination plan(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException;
 
     /**
      * check() is called right before the virtual machine starts to make sure
@@ -65,7 +64,7 @@ public interface DeploymentPlanner extends Adapter {
      * @return true if it's okay to start; false if not. If false, the exclude list will include what should be
      *         excluded.
      */
-    boolean check(VirtualMachineProfile<? extends VirtualMachine> vm, DeploymentPlan plan, DeployDestination dest, ExcludeList exclude);
+    boolean check(VirtualMachineProfile vm, DeploymentPlan plan, DeployDestination dest, ExcludeList exclude);
 
     /**
      * canHandle is called before plan to determine if the plan can do the allocation. Planers should be exclusive so
@@ -80,7 +79,7 @@ public interface DeploymentPlanner extends Adapter {
      *            avoid these data centers, pods, clusters, or hosts.
      * @return true if it's okay to allocate; false or not
      */
-    boolean canHandle(VirtualMachineProfile<? extends VirtualMachine> vm, DeploymentPlan plan, ExcludeList avoid);
+    boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid);
 
     public enum AllocationAlgorithm {
         random,

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/com/cloud/hypervisor/HypervisorGuru.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/hypervisor/HypervisorGuru.java b/api/src/com/cloud/hypervisor/HypervisorGuru.java
index 47ca17a..182f06a 100644
--- a/api/src/com/cloud/hypervisor/HypervisorGuru.java
+++ b/api/src/com/cloud/hypervisor/HypervisorGuru.java
@@ -36,7 +36,7 @@ public interface HypervisorGuru extends Adapter {
      * @param vm
      * @return
      */
-    <T extends VirtualMachine> VirtualMachineTO implement(VirtualMachineProfile<T> vm);
+    VirtualMachineTO implement(VirtualMachineProfile vm);
 
     /**
      * Give hypervisor guru opportunity to decide if certain command needs to be delegated to other host, mainly to secondary storage VM host

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/com/cloud/network/NetworkMigrationResponder.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkMigrationResponder.java b/api/src/com/cloud/network/NetworkMigrationResponder.java
index 6283cc5..951e1c2 100644
--- a/api/src/com/cloud/network/NetworkMigrationResponder.java
+++ b/api/src/com/cloud/network/NetworkMigrationResponder.java
@@ -38,7 +38,7 @@ public interface NetworkMigrationResponder {
      * @param context
      * @return true when operation was successful.
      */
-    public boolean prepareMigration(NicProfile nic, Network network, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context);
+    public boolean prepareMigration(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context);
 
     /**
      * Cancel for migration preparation.
@@ -52,7 +52,7 @@ public interface NetworkMigrationResponder {
      * @param src The context nic migrates from.
      * @param dst The context nic migrates to.
      */
-    public void rollbackMigration(NicProfile nic, Network network, VirtualMachineProfile<? extends VirtualMachine> vm, ReservationContext src, ReservationContext dst);
+    public void rollbackMigration(NicProfile nic, Network network, VirtualMachineProfile vm, ReservationContext src, ReservationContext dst);
 
     /**
      * Commit the migration resource.
@@ -66,5 +66,5 @@ public interface NetworkMigrationResponder {
      * @param src the context nic migrates from.
      * @param dst the context nic migrates to.
      */
-    public void commitMigration(NicProfile nic, Network network, VirtualMachineProfile<? extends VirtualMachine> vm, ReservationContext src, ReservationContext dst);
+    public void commitMigration(NicProfile nic, Network network, VirtualMachineProfile vm, ReservationContext src, ReservationContext dst);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/com/cloud/network/element/DhcpServiceProvider.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/element/DhcpServiceProvider.java b/api/src/com/cloud/network/element/DhcpServiceProvider.java
index 6363d7c..62c650b 100644
--- a/api/src/com/cloud/network/element/DhcpServiceProvider.java
+++ b/api/src/com/cloud/network/element/DhcpServiceProvider.java
@@ -27,7 +27,7 @@ import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
 
 public interface DhcpServiceProvider extends NetworkElement {
-    boolean addDhcpEntry(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
-    boolean configDhcpSupportForSubnet(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
+    boolean addDhcpEntry(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
+    boolean configDhcpSupportForSubnet(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
     boolean  removeDhcpSupportForSubnet(Network network) throws ResourceUnavailableException;
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/com/cloud/network/element/NetworkElement.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/element/NetworkElement.java b/api/src/com/cloud/network/element/NetworkElement.java
index d89c2a3..5f603ce 100644
--- a/api/src/com/cloud/network/element/NetworkElement.java
+++ b/api/src/com/cloud/network/element/NetworkElement.java
@@ -71,7 +71,7 @@ public interface NetworkElement extends Adapter {
      * @throws ResourceUnavailableException
      * @throws InsufficientNetworkCapacityException
      */
-    boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, 
+    boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, 
             DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, 
             ResourceUnavailableException, InsufficientCapacityException;
 
@@ -85,7 +85,7 @@ public interface NetworkElement extends Adapter {
      * @throws ConcurrentOperationException
      * @throws ResourceUnavailableException
      */
-    boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, 
+    boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, 
             ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException;
 
     /**

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/com/cloud/network/element/UserDataServiceProvider.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/element/UserDataServiceProvider.java b/api/src/com/cloud/network/element/UserDataServiceProvider.java
index d9ddf93..29cd5ae 100644
--- a/api/src/com/cloud/network/element/UserDataServiceProvider.java
+++ b/api/src/com/cloud/network/element/UserDataServiceProvider.java
@@ -27,8 +27,8 @@ import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
 
 public interface UserDataServiceProvider extends NetworkElement {
-    public boolean addPasswordAndUserdata(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
-    boolean savePassword(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm) throws ResourceUnavailableException;
-    boolean saveUserData(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm) throws ResourceUnavailableException;
-    boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, String SSHPublicKey) throws ResourceUnavailableException;
+    public boolean addPasswordAndUserdata(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException;
+    boolean savePassword(Network network, NicProfile nic, VirtualMachineProfile vm) throws ResourceUnavailableException;
+    boolean saveUserData(Network network, NicProfile nic, VirtualMachineProfile vm) throws ResourceUnavailableException;
+    boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile vm, String SSHPublicKey) throws ResourceUnavailableException;
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/com/cloud/network/guru/NetworkGuru.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/guru/NetworkGuru.java b/api/src/com/cloud/network/guru/NetworkGuru.java
index 4a9b871..4127233 100755
--- a/api/src/com/cloud/network/guru/NetworkGuru.java
+++ b/api/src/com/cloud/network/guru/NetworkGuru.java
@@ -127,7 +127,7 @@ public interface NetworkGuru extends Adapter {
      * @throws InsufficientAddressCapacityException if there are not addresses
      *         to be assigned.
      */
-    NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException;
+    NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException;
 
     /**
      * Once a guest network is implemented, then the virtual machine must
@@ -147,7 +147,7 @@ public interface NetworkGuru extends Adapter {
      * @throws ConcurrentOperationException if there are multiple operations
      *         happening on this guest network or vm.
      */
-    void reserve(NicProfile nic, Network network, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException;
+    void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException;
 
     /**
      * When a virtual machine is stopped, the NetworkGuru is informed via the
@@ -158,7 +158,7 @@ public interface NetworkGuru extends Adapter {
      * @param reservationId reservation id passed to it in the ReservationContext
      * @return true if release is successful or false if unsuccessful.
      */
-    boolean release(NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, String reservationId);
+    boolean release(NicProfile nic, VirtualMachineProfile vm, String reservationId);
 
     /**
      * When a virtual machine is destroyed, the NetworkGuru is informed via
@@ -169,7 +169,7 @@ public interface NetworkGuru extends Adapter {
      * @param nic nic that the vm was using to access the guest network.
      * @param vm virtual machine being destroyed.
      */
-    void deallocate(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm);
+    void deallocate(Network network, NicProfile nic, VirtualMachineProfile vm);
 
     /**
      * @deprecated This method should not be here in the first place. What does this really mean? Is it always persisted

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/com/cloud/vm/VirtualMachineProfile.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/vm/VirtualMachineProfile.java b/api/src/com/cloud/vm/VirtualMachineProfile.java
index 6861372..3da8397 100644
--- a/api/src/com/cloud/vm/VirtualMachineProfile.java
+++ b/api/src/com/cloud/vm/VirtualMachineProfile.java
@@ -19,9 +19,7 @@ package com.cloud.vm;
 import java.util.List;
 import java.util.Map;
 
-import com.cloud.agent.api.to.DataTO;
 import com.cloud.agent.api.to.DiskTO;
-import com.cloud.agent.api.to.VolumeTO;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.offering.ServiceOffering;
 import com.cloud.template.VirtualMachineTemplate;
@@ -33,10 +31,8 @@ import com.cloud.user.Account;
  * on what the virtual machine profile should look like before it is
  * actually started on the hypervisor.
  *
- * @param <T>
- *            a VirtualMachine
  */
-public interface VirtualMachineProfile<T extends VirtualMachine> {
+public interface VirtualMachineProfile {
 
     public static class Param {
 
@@ -69,7 +65,7 @@ public interface VirtualMachineProfile<T extends VirtualMachine> {
     /**
      * @return the virtual machine that backs up this profile.
      */
-    T getVirtualMachine();
+    VirtualMachine getVirtualMachine();
 
     /**
      * @return service offering for this virtual machine.

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java b/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java
index e3a9b62..8e9fabd 100644
--- a/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java
+++ b/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java
@@ -21,7 +21,6 @@ import com.cloud.deploy.DeploymentPlan;
 import com.cloud.deploy.DeploymentPlanner.ExcludeList;
 import com.cloud.exception.AffinityConflictException;
 import com.cloud.utils.component.Adapter;
-import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
 
 public interface AffinityGroupProcessor extends Adapter {
@@ -37,7 +36,7 @@ public interface AffinityGroupProcessor extends Adapter {
      * @param avoid
      *            avoid these data centers, pods, clusters, or hosts.
      */
-    void process(VirtualMachineProfile<? extends VirtualMachine> vm, DeploymentPlan plan, ExcludeList avoid)
+    void process(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid)
             throws AffinityConflictException;
 
     /**
@@ -57,6 +56,6 @@ public interface AffinityGroupProcessor extends Adapter {
      * @param plannedDestination
      *            deployment destination where VM is planned to be deployed
      */
-    boolean check(VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination plannedDestination)
+    boolean check(VirtualMachineProfile vm, DeployDestination plannedDestination)
             throws AffinityConflictException;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/api/src/org/apache/cloudstack/affinity/AffinityProcessorBase.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/affinity/AffinityProcessorBase.java b/api/src/org/apache/cloudstack/affinity/AffinityProcessorBase.java
index 325ab80..779ca32 100644
--- a/api/src/org/apache/cloudstack/affinity/AffinityProcessorBase.java
+++ b/api/src/org/apache/cloudstack/affinity/AffinityProcessorBase.java
@@ -21,7 +21,6 @@ import com.cloud.deploy.DeploymentPlan;
 import com.cloud.deploy.DeploymentPlanner.ExcludeList;
 import com.cloud.exception.AffinityConflictException;
 import com.cloud.utils.component.AdapterBase;
-import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
 
 public class AffinityProcessorBase extends AdapterBase implements AffinityGroupProcessor {
@@ -29,7 +28,7 @@ public class AffinityProcessorBase extends AdapterBase implements AffinityGroupP
     protected String _type;
 
     @Override
-    public void process(VirtualMachineProfile<? extends VirtualMachine> vm, DeploymentPlan plan, ExcludeList avoid)
+    public void process(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid)
             throws AffinityConflictException {
 
     }
@@ -44,7 +43,7 @@ public class AffinityProcessorBase extends AdapterBase implements AffinityGroupP
     }
 
     @Override
-    public boolean check(VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination plannedDestination)
+    public boolean check(VirtualMachineProfile vm, DeployDestination plannedDestination)
             throws AffinityConflictException {
         return true;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StoragePoolAllocator.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StoragePoolAllocator.java
index eccf0f4..54808c1 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StoragePoolAllocator.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StoragePoolAllocator.java
@@ -23,7 +23,6 @@ import com.cloud.deploy.DeploymentPlanner.ExcludeList;
 import com.cloud.storage.StoragePool;
 import com.cloud.utils.component.Adapter;
 import com.cloud.vm.DiskProfile;
-import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
 
 /**
@@ -44,7 +43,7 @@ public interface StoragePoolAllocator extends Adapter {
      * @return List<StoragePool> List of storage pools that are suitable for the
      *         VM
      **/
-    List<StoragePool> allocateToPool(DiskProfile dskCh, VirtualMachineProfile<? extends VirtualMachine> vmProfile,
+    List<StoragePool> allocateToPool(DiskProfile dskCh, VirtualMachineProfile vmProfile,
             DeploymentPlan plan, ExcludeList avoid, int returnUpTo);
 
     static int RETURN_UPTO_ALL = -1;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
index ee5ae2d..aae0962 100755
--- a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
@@ -129,7 +129,7 @@ public class VMEntityManagerImpl implements VMEntityManager {
 
 	}
 
-    protected boolean areAffinityGroupsAssociated(VirtualMachineProfile<? extends VirtualMachine> vmProfile) {
+    protected boolean areAffinityGroupsAssociated(VirtualMachineProfile vmProfile) {
         VirtualMachine vm = vmProfile.getVirtualMachine();
         long vmGroupCount = _affinityGroupVMMapDao.countAffinityGroupsForVm(vm.getId());
 
@@ -147,7 +147,7 @@ public class VMEntityManagerImpl implements VMEntityManager {
         //load vm instance and offerings and call virtualMachineManagerImpl
         //FIXME: profile should work on VirtualMachineEntity
         VMInstanceVO vm = _vmDao.findByUuid(vmEntityVO.getUuid());
-        VirtualMachineProfileImpl<VMInstanceVO> vmProfile = new VirtualMachineProfileImpl<VMInstanceVO>(vm);
+        VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vm);
         DataCenterDeployment plan = new DataCenterDeployment(vm.getDataCenterId(), vm.getPodIdToDeployIn(), null, null, null, null);
         if(planToDeploy != null && planToDeploy.getDataCenterId() != 0){
             plan = new DataCenterDeployment(planToDeploy.getDataCenterId(), planToDeploy.getPodId(), planToDeploy.getClusterId(), planToDeploy.getHostId(), planToDeploy.getPoolId(), planToDeploy.getPhysicalNetworkId());
@@ -256,8 +256,6 @@ public class VMEntityManagerImpl implements VMEntityManager {
 
          VMInstanceVO vm = _vmDao.findByUuid(vmEntityVO.getUuid());
          return _itMgr.destroy(vm, _userDao.findById(new Long(caller)), _accountDao.findById(vm.getAccountId()));
-
-
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
index 89e0974..851377e 100755
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java
@@ -27,10 +27,11 @@ import java.util.Random;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
+import org.apache.log4j.Logger;
+
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
-import org.apache.log4j.Logger;
 
 import com.cloud.configuration.dao.ConfigurationDao;
 import com.cloud.dc.ClusterVO;
@@ -49,7 +50,6 @@ import com.cloud.user.Account;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.component.AdapterBase;
 import com.cloud.vm.DiskProfile;
-import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
 
 public abstract class AbstractStoragePoolAllocator extends AdapterBase implements StoragePoolAllocator {
@@ -99,12 +99,12 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
     }
 
     protected abstract List<StoragePool> select(DiskProfile dskCh,
-            VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan, ExcludeList avoid,
+            VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid,
             int returnUpTo);
 
     @Override
     public List<StoragePool> allocateToPool(DiskProfile dskCh,
-            VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan, ExcludeList avoid,
+            VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid,
             int returnUpTo) {
         List<StoragePool> pools = select(dskCh, vmProfile, plan, avoid, returnUpTo);
         return reOrder(pools, vmProfile, plan);
@@ -144,7 +144,7 @@ public abstract class AbstractStoragePoolAllocator extends AdapterBase implement
     }
 
     protected List<StoragePool> reOrder(List<StoragePool> pools,
-            VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan) {
+            VirtualMachineProfile vmProfile, DeploymentPlan plan) {
         if (pools == null) {
             return null;
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
index 41afa83..b1105ba 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java
@@ -25,18 +25,18 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
-import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
+import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator;
+import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
+
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.deploy.DeploymentPlanner.ExcludeList;
 import com.cloud.offering.ServiceOffering;
 import com.cloud.storage.StoragePool;
 import com.cloud.storage.dao.DiskOfferingDao;
 import com.cloud.vm.DiskProfile;
-import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
 
 @Component
@@ -49,7 +49,7 @@ public class ClusterScopeStoragePoolAllocator extends AbstractStoragePoolAllocat
     DiskOfferingDao _diskOfferingDao;
 
     @Override
-    protected List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile<? extends VirtualMachine> vmProfile,
+    protected List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile vmProfile,
             DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {
 
         s_logger.debug("ClusterScopeStoragePoolAllocator looking for storage pool");
@@ -91,7 +91,7 @@ public class ClusterScopeStoragePoolAllocator extends AbstractStoragePoolAllocat
             if (suitablePools.size() == returnUpTo) {
                 break;
             }
-            StoragePool pol = (StoragePool) this.dataStoreMgr.getPrimaryDataStore(pool.getId());
+            StoragePool pol = (StoragePool) dataStoreMgr.getPrimaryDataStore(pool.getId());
             if (filter(avoid, pol, dskCh, plan)) {
                 suitablePools.add(pol);
             } else {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java
index 979ea73..15b4407 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java
@@ -49,7 +49,7 @@ public class GarbageCollectingStoragePoolAllocator extends AbstractStoragePoolAl
     boolean _storagePoolCleanupEnabled;
 
     @Override
-    public List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile<? extends VirtualMachine> vmProfile,
+    public List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile vmProfile,
             DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {
         s_logger.debug("GarbageCollectingStoragePoolAllocator looking for storage pool");
         if (!_storagePoolCleanupEnabled) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java
index 4056fe7..310f4a1 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java
@@ -65,7 +65,7 @@ public class LocalStoragePoolAllocator extends AbstractStoragePoolAllocator {
     ConfigurationDao _configDao;
 
     @Override
-    protected List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile<? extends VirtualMachine> vmProfile,
+    protected List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile vmProfile,
             DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {
 
         List<StoragePool> suitablePools = new ArrayList<StoragePool>();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/engine/storage/src/org/apache/cloudstack/storage/allocator/UseLocalForRootAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/UseLocalForRootAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/UseLocalForRootAllocator.java
index d057138..6d7ac93 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/UseLocalForRootAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/UseLocalForRootAllocator.java
@@ -42,7 +42,7 @@ public class UseLocalForRootAllocator extends LocalStoragePoolAllocator implemen
 
     @Override
     public List<StoragePool> allocateToPool(DiskProfile dskCh,
-            VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan, ExcludeList avoid,
+            VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid,
             int returnUpTo) {
         DataCenterVO dc = _dcDao.findById(plan.getDataCenterId());
         if (!dc.isLocalStorageEnabled()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
index 300d932..0288b17 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
@@ -56,7 +56,7 @@ public class ZoneWideStoragePoolAllocator extends AbstractStoragePoolAllocator {
 
 	@Override
 	protected List<StoragePool> select(DiskProfile dskCh,
-			VirtualMachineProfile<? extends VirtualMachine> vmProfile,
+			VirtualMachineProfile vmProfile,
 			DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {
 	    s_logger.debug("ZoneWideStoragePoolAllocator to find storage pool");
 		List<StoragePool> suitablePools = new ArrayList<StoragePool>();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java b/plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java
index a0eb56c..2169359 100644
--- a/plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java
+++ b/plugins/affinity-group-processors/explicit-dedication/src/org/apache/cloudstack/affinity/ExplicitDedicationProcessor.java
@@ -23,9 +23,10 @@ import java.util.Set;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
+import org.apache.log4j.Logger;
+
 import org.apache.cloudstack.affinity.dao.AffinityGroupDao;
 import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao;
-import org.apache.log4j.Logger;
 
 import com.cloud.dc.ClusterVO;
 import com.cloud.dc.DataCenter;
@@ -82,7 +83,7 @@ public class ExplicitDedicationProcessor extends AffinityProcessorBase implement
      * This IncludeList is then used to update the avoid list for a given data center.
      */
     @Override
-    public void process(VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan,
+    public void process(VirtualMachineProfile vmProfile, DeploymentPlan plan,
             ExcludeList avoid) throws AffinityConflictException {
         VirtualMachine vm = vmProfile.getVirtualMachine();
         List<AffinityGroupVMMapVO> vmGroupMappings = _affinityGroupVMMapDao.findByVmIdType(vm.getId(), getType());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
index 1569c7e..c4a847d 100644
--- a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
+++ b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java
@@ -66,7 +66,7 @@ public class HostAntiAffinityProcessor extends AffinityProcessorBase implements
     protected VMReservationDao _reservationDao;
 
     @Override
-    public void process(VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan,
+    public void process(VirtualMachineProfile vmProfile, DeploymentPlan plan,
             ExcludeList avoid)
             throws AffinityConflictException {
         VirtualMachine vm = vmProfile.getVirtualMachine();
@@ -118,7 +118,7 @@ public class HostAntiAffinityProcessor extends AffinityProcessorBase implements
     }
 
     @Override
-    public boolean check(VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeployDestination plannedDestination)
+    public boolean check(VirtualMachineProfile vmProfile, DeployDestination plannedDestination)
             throws AffinityConflictException {
 
         if (plannedDestination.getHost() == null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java
----------------------------------------------------------------------
diff --git a/plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java b/plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java
index be016cb..6eee28d 100644
--- a/plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java
+++ b/plugins/deployment-planners/implicit-dedication/src/com/cloud/deploy/ImplicitDedicationPlanner.java
@@ -67,7 +67,7 @@ public class ImplicitDedicationPlanner extends FirstFitPlanner implements Deploy
     }
 
     @Override
-    public List<Long> orderClusters(VirtualMachineProfile<? extends VirtualMachine> vmProfile,
+    public List<Long> orderClusters(VirtualMachineProfile vmProfile,
             DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException {
         List<Long> clusterList = super.orderClusters(vmProfile, plan, avoid);
         Set<Long> hostsToAvoid = avoid.getHostsToAvoid();
@@ -251,7 +251,7 @@ public class ImplicitDedicationPlanner extends FirstFitPlanner implements Deploy
     }
 
     @Override
-    public PlannerResourceUsage getResourceUsage(VirtualMachineProfile<? extends VirtualMachine> vmProfile,
+    public PlannerResourceUsage getResourceUsage(VirtualMachineProfile vmProfile,
             DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException {
         // Check if strict or preferred mode should be used.
         boolean preferred = isServiceOfferingUsingPlannerInPreferredMode(vmProfile.getServiceOfferingId());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java
----------------------------------------------------------------------
diff --git a/plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java b/plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java
index 02124a2..73fd249 100644
--- a/plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java
+++ b/plugins/deployment-planners/implicit-dedication/test/org/apache/cloudstack/implicitplanner/ImplicitPlannerTest.java
@@ -176,8 +176,7 @@ public class ImplicitPlannerTest {
     public void checkWhenDcInAvoidList() throws InsufficientServerCapacityException {
         DataCenterVO mockDc = mock(DataCenterVO.class);
         ExcludeList avoids = mock(ExcludeList.class);
-        @SuppressWarnings("unchecked")
-        VirtualMachineProfileImpl<VMInstanceVO> vmProfile = mock(VirtualMachineProfileImpl.class);
+        VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
         VMInstanceVO vm = mock(VMInstanceVO.class);
         DataCenterDeployment plan = mock(DataCenterDeployment.class);
 
@@ -193,8 +192,7 @@ public class ImplicitPlannerTest {
 
     @Test
     public void checkStrictModeWithCurrentAccountVmsPresent() throws InsufficientServerCapacityException {
-        @SuppressWarnings("unchecked")
-        VirtualMachineProfileImpl<VMInstanceVO> vmProfile = mock(VirtualMachineProfileImpl.class);
+        VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
         DataCenterDeployment plan = mock(DataCenterDeployment.class);
         ExcludeList avoids = new ExcludeList();
 
@@ -230,7 +228,7 @@ public class ImplicitPlannerTest {
     @Test
     public void checkStrictModeHostWithCurrentAccountVmsFull() throws InsufficientServerCapacityException {
         @SuppressWarnings("unchecked")
-        VirtualMachineProfileImpl<VMInstanceVO> vmProfile = mock(VirtualMachineProfileImpl.class);
+        VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
         DataCenterDeployment plan = mock(DataCenterDeployment.class);
         ExcludeList avoids = new ExcludeList();
 
@@ -268,7 +266,7 @@ public class ImplicitPlannerTest {
     @Test
     public void checkStrictModeNoHostsAvailable() throws InsufficientServerCapacityException {
         @SuppressWarnings("unchecked")
-        VirtualMachineProfileImpl<VMInstanceVO> vmProfile = mock(VirtualMachineProfileImpl.class);
+        VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
         DataCenterDeployment plan = mock(DataCenterDeployment.class);
         ExcludeList avoids = new ExcludeList();
 
@@ -289,7 +287,7 @@ public class ImplicitPlannerTest {
     @Test
     public void checkPreferredModePreferredHostAvailable() throws InsufficientServerCapacityException {
         @SuppressWarnings("unchecked")
-        VirtualMachineProfileImpl<VMInstanceVO> vmProfile = mock(VirtualMachineProfileImpl.class);
+        VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
         DataCenterDeployment plan = mock(DataCenterDeployment.class);
         ExcludeList avoids = new ExcludeList();
 
@@ -328,7 +326,7 @@ public class ImplicitPlannerTest {
     @Test
     public void checkPreferredModeNoHostsAvailable() throws InsufficientServerCapacityException {
         @SuppressWarnings("unchecked")
-        VirtualMachineProfileImpl<VMInstanceVO> vmProfile = mock(VirtualMachineProfileImpl.class);
+        VirtualMachineProfileImpl vmProfile = mock(VirtualMachineProfileImpl.class);
         DataCenterDeployment plan = mock(DataCenterDeployment.class);
         ExcludeList avoids = new ExcludeList();
 
@@ -347,7 +345,7 @@ public class ImplicitPlannerTest {
         assertTrue("Cluster list should not be null/empty", (clusterList == null || clusterList.isEmpty()));
     }
 
-    private void initializeForTest(VirtualMachineProfileImpl<VMInstanceVO> vmProfile, DataCenterDeployment plan) {
+    private void initializeForTest(VirtualMachineProfileImpl vmProfile, DataCenterDeployment plan) {
         DataCenterVO mockDc = mock(DataCenterVO.class);
         VMInstanceVO vm = mock(VMInstanceVO.class);
         UserVmVO userVm = mock(UserVmVO.class);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/deployment-planners/user-concentrated-pod/src/com/cloud/deploy/UserConcentratedPodPlanner.java
----------------------------------------------------------------------
diff --git a/plugins/deployment-planners/user-concentrated-pod/src/com/cloud/deploy/UserConcentratedPodPlanner.java b/plugins/deployment-planners/user-concentrated-pod/src/com/cloud/deploy/UserConcentratedPodPlanner.java
index d917893..2d73425 100644
--- a/plugins/deployment-planners/user-concentrated-pod/src/com/cloud/deploy/UserConcentratedPodPlanner.java
+++ b/plugins/deployment-planners/user-concentrated-pod/src/com/cloud/deploy/UserConcentratedPodPlanner.java
@@ -41,7 +41,7 @@ public class UserConcentratedPodPlanner extends FirstFitPlanner implements Deplo
      * @return List<Long> ordered list of Cluster Ids
      */
     @Override
-    protected List<Long> reorderClusters(long id, boolean isZone, Pair<List<Long>, Map<Long, Double>> clusterCapacityInfo, VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan){
+    protected List<Long> reorderClusters(long id, boolean isZone, Pair<List<Long>, Map<Long, Double>> clusterCapacityInfo, VirtualMachineProfile vmProfile, DeploymentPlan plan){
         List<Long> clusterIdsByCapacity = clusterCapacityInfo.first();
         if(vmProfile.getOwner() == null || !isZone){
             return clusterIdsByCapacity;
@@ -118,7 +118,7 @@ public class UserConcentratedPodPlanner extends FirstFitPlanner implements Deplo
      * @return List<Long> ordered list of Pod Ids
      */
     @Override
-    protected List<Long> reorderPods(Pair<List<Long>, Map<Long, Double>> podCapacityInfo, VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan){
+    protected List<Long> reorderPods(Pair<List<Long>, Map<Long, Double>> podCapacityInfo, VirtualMachineProfile vmProfile, DeploymentPlan plan){
         List<Long> podIdsByCapacity = podCapacityInfo.first();
         if(vmProfile.getOwner() == null){
             return podIdsByCapacity;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/deployment-planners/user-dispersing/src/com/cloud/deploy/UserDispersingPlanner.java
----------------------------------------------------------------------
diff --git a/plugins/deployment-planners/user-dispersing/src/com/cloud/deploy/UserDispersingPlanner.java b/plugins/deployment-planners/user-dispersing/src/com/cloud/deploy/UserDispersingPlanner.java
index 2b0b158..d70eb31 100755
--- a/plugins/deployment-planners/user-dispersing/src/com/cloud/deploy/UserDispersingPlanner.java
+++ b/plugins/deployment-planners/user-dispersing/src/com/cloud/deploy/UserDispersingPlanner.java
@@ -46,7 +46,7 @@ public class UserDispersingPlanner extends FirstFitPlanner implements Deployment
      * @return List<Long> ordered list of Cluster Ids
      */
     @Override
-    protected List<Long> reorderClusters(long id, boolean isZone, Pair<List<Long>, Map<Long, Double>> clusterCapacityInfo, VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan){
+    protected List<Long> reorderClusters(long id, boolean isZone, Pair<List<Long>, Map<Long, Double>> clusterCapacityInfo, VirtualMachineProfile vmProfile, DeploymentPlan plan){
         List<Long> clusterIdsByCapacity = clusterCapacityInfo.first();
         if(vmProfile.getOwner() == null){
             return clusterIdsByCapacity;
@@ -76,7 +76,7 @@ public class UserDispersingPlanner extends FirstFitPlanner implements Deployment
      * @return List<Long> ordered list of Pod Ids
      */
     @Override
-    protected List<Long> reorderPods(Pair<List<Long>, Map<Long, Double>> podCapacityInfo, VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan){
+    protected List<Long> reorderPods(Pair<List<Long>, Map<Long, Double>> podCapacityInfo, VirtualMachineProfile vmProfile, DeploymentPlan plan){
         List<Long> podIdsByCapacity = podCapacityInfo.first();
         if(vmProfile.getOwner() == null){
             return podIdsByCapacity;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java
----------------------------------------------------------------------
diff --git a/plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java b/plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java
index 303e438..d4a6277 100755
--- a/plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java
+++ b/plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java
@@ -47,13 +47,13 @@ public class RandomAllocator extends AdapterBase implements HostAllocator {
     @Inject private ResourceManager _resourceMgr;
 
     @Override
-    public List<Host> allocateTo(VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan, Type type,
+    public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type,
             ExcludeList avoid, int returnUpTo) {
         return allocateTo(vmProfile, plan, type, avoid, returnUpTo, true);
     }
 
     @Override
-    public List<Host> allocateTo(VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan, Type type,
+    public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type,
             ExcludeList avoid, List<? extends Host> hosts, int returnUpTo, boolean considerReservedCapacity) {
         long dcId = plan.getDataCenterId();
         Long podId = plan.getPodId();
@@ -109,7 +109,7 @@ public class RandomAllocator extends AdapterBase implements HostAllocator {
     }
 
     @Override
-    public List<Host> allocateTo(VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan, Type type,
+    public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type,
             ExcludeList avoid, int returnUpTo, boolean considerReservedCapacity) {
 
         long dcId = plan.getDataCenterId();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalGuru.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalGuru.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalGuru.java
index 03ba3fa..b2f1287 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalGuru.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalGuru.java
@@ -5,20 +5,20 @@
 // 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.
-// 
+//
 // Automatically generated by addcopyright.py at 01/29/2013
 // Apache License, Version 2.0 (the "License"); you may not use this
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// 
+//
 // Automatically generated by addcopyright.py at 04/03/2012
 package com.cloud.baremetal.manager;
 
@@ -38,7 +38,6 @@ import com.cloud.hypervisor.HypervisorGuruBase;
 import com.cloud.storage.GuestOSVO;
 import com.cloud.storage.dao.GuestOSDao;
 import com.cloud.vm.VMInstanceVO;
-import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
 import com.cloud.vm.dao.VMInstanceDao;
 
@@ -59,7 +58,7 @@ public class BareMetalGuru extends HypervisorGuruBase implements HypervisorGuru
 	}
 
 	@Override
-	public <T extends VirtualMachine> VirtualMachineTO implement(VirtualMachineProfile<T> vm) {
+    public VirtualMachineTO implement(VirtualMachineProfile vm) {
 		VirtualMachineTO to = toVirtualMachineTO(vm);
 
 		VMInstanceVO vo = _vmDao.findById(vm.getId());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalPlanner.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalPlanner.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalPlanner.java
index e6ddcbe..cf3ceed 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalPlanner.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalPlanner.java
@@ -23,20 +23,21 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import com.cloud.dc.*;
-import com.cloud.dc.ClusterDetailsDao;
 import org.apache.log4j.Logger;
 
 import com.cloud.capacity.CapacityManager;
-import com.cloud.configuration.Config;
 import com.cloud.configuration.dao.ConfigurationDao;
+import com.cloud.dc.ClusterDetailsDao;
+import com.cloud.dc.ClusterDetailsVO;
+import com.cloud.dc.ClusterVO;
+import com.cloud.dc.DataCenter;
+import com.cloud.dc.Pod;
 import com.cloud.dc.dao.ClusterDao;
 import com.cloud.dc.dao.DataCenterDao;
 import com.cloud.dc.dao.HostPodDao;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.deploy.DeploymentPlanner;
-import com.cloud.deploy.DeploymentPlanner.ExcludeList;
 import com.cloud.exception.InsufficientServerCapacityException;
 import com.cloud.host.Host;
 import com.cloud.host.HostVO;
@@ -45,7 +46,6 @@ import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.offering.ServiceOffering;
 import com.cloud.org.Cluster;
 import com.cloud.resource.ResourceManager;
-import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.component.AdapterBase;
 import com.cloud.vm.VirtualMachine;
 import com.cloud.vm.VirtualMachineProfile;
@@ -63,7 +63,7 @@ public class BareMetalPlanner extends AdapterBase implements DeploymentPlanner {
     @Inject protected ClusterDetailsDao _clusterDetailsDao;
 	
 	@Override
-	public DeployDestination plan(VirtualMachineProfile<? extends VirtualMachine> vmProfile, DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException {
+    public DeployDestination plan(VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException {
 		VirtualMachine vm = vmProfile.getVirtualMachine();
 		ServiceOffering offering = vmProfile.getServiceOffering();
 		String hostTag = null;
@@ -143,7 +143,7 @@ public class BareMetalPlanner extends AdapterBase implements DeploymentPlanner {
 	}
 
 	@Override
-	public boolean canHandle(VirtualMachineProfile<? extends VirtualMachine> vm, DeploymentPlan plan, ExcludeList avoid) {
+    public boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid) {
 		return vm.getHypervisorType() == HypervisorType.BareMetal;
 	}
 
@@ -163,7 +163,7 @@ public class BareMetalPlanner extends AdapterBase implements DeploymentPlanner {
 	}
 
 	@Override
-	public boolean check(VirtualMachineProfile<? extends VirtualMachine> vm, DeploymentPlan plan, DeployDestination dest, ExcludeList exclude) {
+    public boolean check(VirtualMachineProfile vm, DeploymentPlan plan, DeployDestination dest, ExcludeList exclude) {
 		// TODO Auto-generated method stub
 		return false;
 	}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java
index 77958ae..772898d 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java
@@ -5,20 +5,20 @@
 // 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.
-// 
+//
 // Automatically generated by addcopyright.py at 01/29/2013
 // Apache License, Version 2.0 (the "License"); you may not use this
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// 
+//
 // Automatically generated by addcopyright.py at 04/03/2012
 package com.cloud.baremetal.networkservice;
 
@@ -31,10 +31,11 @@ import java.util.Map;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
+import org.apache.log4j.Logger;
+
 import org.apache.cloudstack.api.AddBaremetalPxeCmd;
 import org.apache.cloudstack.api.AddBaremetalPxePingServerCmd;
 import org.apache.cloudstack.api.ListBaremetalPxePingServersCmd;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.baremetal.IpmISetBootDevCommand;
@@ -68,7 +69,6 @@ import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.vm.NicProfile;
 import com.cloud.vm.NicVO;
 import com.cloud.vm.ReservationContext;
-import com.cloud.vm.UserVmVO;
 import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value=BaremetalPxeService.class)
@@ -82,7 +82,7 @@ public class BareMetalPingServiceImpl extends BareMetalPxeServiceBase implements
 	
 	
 	@Override
-	public boolean prepare(VirtualMachineProfile<UserVmVO> profile, NicProfile pxeNic, DeployDestination dest, ReservationContext context) {
+    public boolean prepare(VirtualMachineProfile profile, NicProfile pxeNic, DeployDestination dest, ReservationContext context) {
 	    SearchCriteriaService<BaremetalPxeVO, BaremetalPxeVO> sc = SearchCriteria2.create(BaremetalPxeVO.class);
         sc.addAnd(sc.getEntity().getDeviceType(), Op.EQ, BaremetalPxeType.PING.toString());
         sc.addAnd(sc.getEntity().getPodId(), Op.EQ, dest.getPod().getId());
@@ -127,7 +127,7 @@ public class BareMetalPingServiceImpl extends BareMetalPxeServiceBase implements
 
 	
     @Override
-    public boolean prepareCreateTemplate(Long pxeServerId, UserVm vm, String templateUrl) {        
+    public boolean prepareCreateTemplate(Long pxeServerId, UserVm vm, String templateUrl) {
         List<NicVO> nics = _nicDao.listByVmId(vm.getId());
         if (nics.size() != 1) {
             throw new CloudRuntimeException("Wrong nic number " + nics.size() + " of vm " + vm.getId());
@@ -168,7 +168,7 @@ public class BareMetalPingServiceImpl extends BareMetalPxeServiceBase implements
         
         if (cmd.getPhysicalNetworkId() == null || cmd.getUrl() == null || cmd.getUsername() == null || cmd.getPassword() == null) {
             throw new IllegalArgumentException("At least one of the required parameters(physical network id, url, username, password) is null");
-        } 
+        }
         
         pNetwork = _physicalNetworkDao.findById(cmd.getPhysicalNetworkId());
         if (pNetwork == null) {
@@ -188,7 +188,7 @@ public class BareMetalPingServiceImpl extends BareMetalPxeServiceBase implements
         HostPodVO pod = _podDao.findById(cmd.getPodId());
         if (pod == null) {
             throw new IllegalArgumentException("Could not find pod with ID: " + cmd.getPodId());
-        } 
+        }
         
         List<HostVO> pxes = _resourceMgr.listAllUpAndEnabledHosts(Host.Type.BaremetalPxe, null, cmd.getPodId(), zoneId);
         if (pxes.size() != 0) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java
index 6d14e3f..7501882 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java
@@ -76,7 +76,7 @@ public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru {
     PodVlanMapDao _podVlanDao;
 
     @Override
-    public void reserve(NicProfile nic, Network network, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context)
+    public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context)
             throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
         if (dest.getHost().getHypervisorType() != HypervisorType.BareMetal) {
             super.reserve(nic, network, vm, dest, context);
@@ -149,7 +149,7 @@ public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru {
         s_logger.debug("Allocated a nic " + nic + " for " + vm);
     }
 
-    private void getBaremetalIp(NicProfile nic, Pod pod, VirtualMachineProfile<? extends VirtualMachine> vm, Network network, String requiredIp)
+    private void getBaremetalIp(NicProfile nic, Pod pod, VirtualMachineProfile vm, Network network, String requiredIp)
             throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException {
         DataCenter dc = _dcDao.findById(pod.getDataCenterId());
         if (nic.getIp4Address() == null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpElement.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpElement.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpElement.java
index 96d702d..1eb1c74 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpElement.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpElement.java
@@ -103,7 +103,7 @@ public class BaremetalDhcpElement extends AdapterBase implements DhcpServiceProv
 
     @Override
     @DB
-    public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest,
+    public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest,
             ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
         Host host = dest.getHost();
         if (vm.getType() != Type.User || vm.getHypervisorType() != HypervisorType.BareMetal) {
@@ -122,7 +122,7 @@ public class BaremetalDhcpElement extends AdapterBase implements DhcpServiceProv
     }
 
     @Override
-    public boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, ReservationContext context)
+    public boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context)
             throws ConcurrentOperationException, ResourceUnavailableException {
         return true;
     }
@@ -158,7 +158,7 @@ public class BaremetalDhcpElement extends AdapterBase implements DhcpServiceProv
         return true;
     }
     
-    public boolean addDhcpEntry(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest,
+    public boolean addDhcpEntry(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest,
             ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
         if (vm.getHypervisorType() != HypervisorType.BareMetal || !canHandle(dest, network.getTrafficType(), network.getGuestType())) {
             return false;
@@ -167,7 +167,7 @@ public class BaremetalDhcpElement extends AdapterBase implements DhcpServiceProv
     }
 
     @Override
-    public boolean configDhcpSupportForSubnet(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
+    public boolean configDhcpSupportForSubnet(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
     	//TODO Add support for baremetal
         return true;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java
index 9c00731..8a83c32 100644
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManager.java
@@ -47,7 +47,7 @@ public interface BaremetalDhcpManager extends Manager, PluggableService {
         DHCPD,
     }
 	
-	boolean addVirtualMachineIntoNetwork(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> profile, DeployDestination dest, ReservationContext context) throws ResourceUnavailableException;
+	boolean addVirtualMachineIntoNetwork(Network network, NicProfile nic, VirtualMachineProfile profile, DeployDestination dest, ReservationContext context) throws ResourceUnavailableException;
 	
 	BaremetalDhcpVO addDchpServer(AddBaremetalDhcpCmd cmd);
 	

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java
index 17e4481..1e2ad54 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java
@@ -133,7 +133,7 @@ public class BaremetalDhcpManagerImpl extends ManagerBase implements BaremetalDh
     }
 
     @Override
-    public boolean addVirtualMachineIntoNetwork(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> profile,
+    public boolean addVirtualMachineIntoNetwork(Network network, NicProfile nic, VirtualMachineProfile profile,
             DeployDestination dest, ReservationContext context) throws ResourceUnavailableException {
         Long zoneId = profile.getVirtualMachine().getDataCenterId();
         Long podId = profile.getVirtualMachine().getPodIdToDeployIn();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
index 5858e7e..9a6c1c6 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java
@@ -5,9 +5,9 @@
 // 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
@@ -27,10 +27,11 @@ import java.util.Map;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
+import org.apache.log4j.Logger;
+
 import org.apache.cloudstack.api.AddBaremetalKickStartPxeCmd;
 import org.apache.cloudstack.api.AddBaremetalPxeCmd;
 import org.apache.cloudstack.api.ListBaremetalPxePingServersCmd;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.baremetal.IpmISetBootDevCommand;
@@ -62,7 +63,6 @@ import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.vm.NicProfile;
 import com.cloud.vm.ReservationContext;
-import com.cloud.vm.UserVmVO;
 import com.cloud.vm.VirtualMachineProfile;
 
 @Local(value = BaremetalPxeService.class)
@@ -84,7 +84,7 @@ public class BaremetalKickStartServiceImpl extends BareMetalPxeServiceBase imple
     VMTemplateDao _tmpDao;
 
     @Override
-    public boolean prepare(VirtualMachineProfile<UserVmVO> profile, NicProfile nic, DeployDestination dest, ReservationContext context) {
+    public boolean prepare(VirtualMachineProfile profile, NicProfile nic, DeployDestination dest, ReservationContext context) {
         NetworkVO nwVO = _nwDao.findById(nic.getNetworkId());
         SearchCriteriaService<BaremetalPxeVO, BaremetalPxeVO> sc = SearchCriteria2.create(BaremetalPxeVO.class);
         sc.addAnd(sc.getEntity().getDeviceType(), Op.EQ, BaremetalPxeType.KICK_START.toString());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
index 7b8d528..82094d8 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java
@@ -111,7 +111,7 @@ public class BaremetalPxeElement extends AdapterBase implements NetworkElement {
 
     @Override
     @DB
-    public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, DeployDestination dest,
+    public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest,
             ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException {
         if (vm.getType() != Type.User || vm.getHypervisorType() != HypervisorType.BareMetal) {
             return false;
@@ -138,7 +138,7 @@ public class BaremetalPxeElement extends AdapterBase implements NetworkElement {
     }
 
     @Override
-    public boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, ReservationContext context)
+    public boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context)
             throws ConcurrentOperationException, ResourceUnavailableException {
         return true;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java
index 7984ddd..73243b5 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManager.java
@@ -5,20 +5,20 @@
 // 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.
-// 
+//
 // Automatically generated by addcopyright.py at 01/29/2013
 // Apache License, Version 2.0 (the "License"); you may not use this
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// 
+//
 // Automatically generated by addcopyright.py at 04/03/2012
 package com.cloud.baremetal.networkservice;
 
@@ -37,7 +37,6 @@ import com.cloud.utils.component.Manager;
 import com.cloud.utils.component.PluggableService;
 import com.cloud.vm.NicProfile;
 import com.cloud.vm.ReservationContext;
-import com.cloud.vm.UserVmVO;
 import com.cloud.vm.VirtualMachineProfile;
 
 public interface BaremetalPxeManager extends Manager, PluggableService {
@@ -58,7 +57,7 @@ public interface BaremetalPxeManager extends Manager, PluggableService {
 	
 	List<BaremetalPxeResponse> listPxeServers(ListBaremetalPxePingServersCmd cmd);
 	
-	boolean addUserData(NicProfile nic, VirtualMachineProfile<UserVm> vm);
+    boolean addUserData(NicProfile nic, VirtualMachineProfile vm);
 		
 	public static final Network.Service BAREMETAL_PXE_SERVICE = new Network.Service("BaremetalPxeService");
 	public static final String BAREMETAL_PXE_CAPABILITY = "BaremetalPxe";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
index 555adf7..4e9a11d 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java
@@ -5,20 +5,20 @@
 // 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.
-// 
+//
 // Automatically generated by addcopyright.py at 01/29/2013
 // Apache License, Version 2.0 (the "License"); you may not use this
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// 
+//
 // Automatically generated by addcopyright.py at 04/03/2012
 package com.cloud.baremetal.networkservice;
 
@@ -31,11 +31,12 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
+import org.apache.log4j.Logger;
+
 import org.apache.cloudstack.api.AddBaremetalKickStartPxeCmd;
 import org.apache.cloudstack.api.AddBaremetalPxeCmd;
 import org.apache.cloudstack.api.AddBaremetalPxePingServerCmd;
 import org.apache.cloudstack.api.ListBaremetalPxePingServersCmd;
-import org.apache.log4j.Logger;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
@@ -183,7 +184,7 @@ public class BaremetalPxeManagerImpl extends ManagerBase implements BaremetalPxe
     }
 
     @Override
-    public boolean addUserData(NicProfile nic, VirtualMachineProfile<UserVm> profile) {
+    public boolean addUserData(NicProfile nic, VirtualMachineProfile profile) {
         UserVmVO vm = (UserVmVO) profile.getVirtualMachine();
         _vmDao.loadDetails(vm);
         

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1325014a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java
index af6a6c8..d74e31d 100755
--- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java
+++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java
@@ -5,20 +5,20 @@
 // 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.
-// 
+//
 // Automatically generated by addcopyright.py at 01/29/2013
 // Apache License, Version 2.0 (the "License"); you may not use this
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// 
+//
 // Automatically generated by addcopyright.py at 04/03/2012
 package com.cloud.baremetal.networkservice;
 
@@ -29,17 +29,15 @@ import org.apache.cloudstack.api.ListBaremetalPxePingServersCmd;
 
 import com.cloud.baremetal.database.BaremetalPxeVO;
 import com.cloud.deploy.DeployDestination;
-import com.cloud.host.Host;
 import com.cloud.uservm.UserVm;
 import com.cloud.utils.component.Adapter;
 import com.cloud.vm.NicProfile;
 import com.cloud.vm.ReservationContext;
-import com.cloud.vm.UserVmVO;
 import com.cloud.vm.VirtualMachineProfile;
 
 public interface BaremetalPxeService extends Adapter {
 	
-	public boolean prepare(VirtualMachineProfile<UserVmVO> profile, NicProfile nic, DeployDestination dest, ReservationContext context);
+    public boolean prepare(VirtualMachineProfile profile, NicProfile nic, DeployDestination dest, ReservationContext context);
 
     public boolean prepareCreateTemplate(Long pxeServerId, UserVm vm, String templateUrl);
     
@@ -62,5 +60,5 @@ public interface BaremetalPxeService extends Adapter {
 	public static final String PXE_PARAM_PING_STORAGE_SERVER_IP = "pingStorageServerIp";
 	public static final String PXE_PARAM_PING_ROOT_DIR = "pingDir";
 	public static final String PXE_PARAM_PING_STORAGE_SERVER_USERNAME = "pingStorageServerUserName";
-	public static final String PXE_PARAM_PING_STORAGE_SERVER_PASSWORD = "pingStorageServerPassword";	
+	public static final String PXE_PARAM_PING_STORAGE_SERVER_PASSWORD = "pingStorageServerPassword";
 }