cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [06/16] Moved VirtualMachineManager into engine
Date Mon, 19 Aug 2013 21:12:14 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba359c3/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
index 95b92aa..da4aef2 100644
--- a/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VpcVirtualNetworkApplianceManagerImpl.java
@@ -20,6 +20,7 @@ import java.net.URI;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeSet;
@@ -30,13 +31,12 @@ import javax.inject.Inject;
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
-import com.cloud.agent.AgentManager.OnError;
+import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.Command;
 import com.cloud.agent.api.NetworkUsageCommand;
 import com.cloud.agent.api.PlugNicCommand;
 import com.cloud.agent.api.SetupGuestNetworkAnswer;
 import com.cloud.agent.api.SetupGuestNetworkCommand;
-import com.cloud.agent.api.StopAnswer;
 import com.cloud.agent.api.routing.IpAssocVpcCommand;
 import com.cloud.agent.api.routing.NetworkElementCommand;
 import com.cloud.agent.api.routing.SetNetworkACLCommand;
@@ -318,7 +318,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
             InsufficientAddressCapacityException, InsufficientServerCapacityException, InsufficientCapacityException,
             StorageUnavailableException, ResourceUnavailableException {
         
-        List<Pair<NetworkVO, NicProfile>> networks = createVpcRouterNetworks(owner,
isRedundant, plan, new Pair<Boolean, PublicIp>(true, sourceNatIp),
+        LinkedHashMap<Network, NicProfile> networks = createVpcRouterNetworks(owner,
isRedundant, plan, new Pair<Boolean, PublicIp>(true, sourceNatIp),
                 vpcId);
         DomainRouterVO router =
                 super.deployRouter(owner, dest, plan, params, isRedundant, vrProvider, svcOffId,
vpcId, networks, true,
@@ -334,7 +334,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         if (router.getState() == State.Running) {
             SetupGuestNetworkCommand setupCmd = createSetupGuestNetworkCommand(router, add,
guestNic);
 
-            Commands cmds = new Commands(OnError.Stop);
+            Commands cmds = new Commands(Command.OnError.Stop);
             cmds.addCommand("setupguestnetwork", setupCmd);
             sendCommandsToRouter(router, cmds);
             
@@ -508,7 +508,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
             }
         }
 
-        Commands netUsagecmds = new Commands(OnError.Continue);
+        Commands netUsagecmds = new Commands(Command.OnError.Continue);
         VpcVO vpc = _vpcDao.findById(router.getVpcId());
          
         //2) Plug the nics
@@ -561,7 +561,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         boolean result = applyRules(network, routers, "vpc ip association", false, null,
false, new RuleApplier() {
             @Override
             public boolean execute(Network network, VirtualRouter router) throws ResourceUnavailableException
{
-                Commands cmds = new Commands(OnError.Continue);
+                Commands cmds = new Commands(Command.OnError.Continue);
                 Map<String, String> vlanMacAddress = new HashMap<String, String>();
                 List<PublicIpAddress> ipsToSend = new ArrayList<PublicIpAddress>();
                 for (PublicIpAddress ipAddr : ipAddress) {
@@ -655,7 +655,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
     
     protected boolean sendNetworkACLs(VirtualRouter router, List<? extends NetworkACLItem>
rules, long guestNetworkId, boolean isPrivateGateway)
             throws ResourceUnavailableException {
-        Commands cmds = new Commands(OnError.Continue);
+        Commands cmds = new Commands(Command.OnError.Continue);
         createNetworkACLsCommands(rules, router, cmds, guestNetworkId, isPrivateGateway);
         return sendCommandsToRouter(router, cmds);
     }
@@ -938,7 +938,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
             
             List<PrivateIpAddress> privateIps = new ArrayList<PrivateIpAddress>(1);
             privateIps.add(ip);
-            Commands cmds = new Commands(OnError.Stop);
+            Commands cmds = new Commands(Command.OnError.Stop);
             createVpcAssociatePrivateIPCommands(router, privateIps, cmds, add);
             
             if (sendCommandsToRouter(router, cmds)) {
@@ -1034,7 +1034,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
     
     protected boolean sendStaticRoutes(List<StaticRouteProfile> staticRoutes, DomainRouterVO
router)
             throws ResourceUnavailableException {
-        Commands cmds = new Commands(OnError.Continue);
+        Commands cmds = new Commands(Command.OnError.Continue);
         createStaticRouteCommands(staticRoutes, router, cmds);
         return sendCommandsToRouter(router, cmds);
     }
@@ -1076,7 +1076,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
     }
 
     protected boolean applySite2SiteVpn(boolean isCreate, VirtualRouter router, Site2SiteVpnConnection
conn) throws ResourceUnavailableException {
-        Commands cmds = new Commands(OnError.Continue);
+        Commands cmds = new Commands(Command.OnError.Continue);
         createSite2SiteVpnCfgCommands(conn, isCreate, router, cmds);
         return sendCommandsToRouter(router, cmds);
     }
@@ -1152,11 +1152,12 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
     }
     
     
-    protected List<Pair<NetworkVO, NicProfile>> createVpcRouterNetworks(Account
owner, boolean isRedundant,
+    protected LinkedHashMap<Network, NicProfile>
+        createVpcRouterNetworks(Account owner, boolean isRedundant,
             DeploymentPlan plan, Pair<Boolean, PublicIp> sourceNatIp, long vpcId) throws
ConcurrentOperationException,
             InsufficientAddressCapacityException {
 
-        List<Pair<NetworkVO, NicProfile>> networks = new ArrayList<Pair<NetworkVO,
NicProfile>>(4);
+        LinkedHashMap<Network, NicProfile> networks = new LinkedHashMap<Network,
NicProfile>(4);
         
         TreeSet<String> publicVlans = new TreeSet<String>();
         publicVlans.add(sourceNatIp.second().getVlanTag());
@@ -1170,7 +1171,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
             for (PrivateGateway privateGateway : privateGateways) {
                 NicProfile privateNic = createPrivateNicProfileForGateway(privateGateway);
                 Network privateNetwork = _networkModel.getNetwork(privateGateway.getNetworkId());
-                networks.add(new Pair<NetworkVO, NicProfile>((NetworkVO) privateNetwork,
privateNic));
+                networks.put(privateNetwork, privateNic);
             }
         }
         
@@ -1179,7 +1180,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
         for (Network guestNetwork : guestNetworks) {
             if (guestNetwork.getState() == Network.State.Implemented) {
                 NicProfile guestNic = createGuestNicProfileForVpcRouter(guestNetwork);
-                networks.add(new Pair<NetworkVO, NicProfile>((NetworkVO) guestNetwork,
guestNic));
+                networks.put(guestNetwork, guestNic);
             }
         }
         
@@ -1201,7 +1202,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
                 publicNic.setIsolationUri(IsolationType.Vlan.toUri(publicIp.getVlanTag()));
                 NetworkOffering publicOffering = _networkModel.getSystemAccountNetworkOfferings(NetworkOffering.SystemPublicNetwork).get(0);
                 List<NetworkVO> publicNetworks = _networkMgr.setupNetwork(_systemAcct,
publicOffering, plan, null, null, false);
-                networks.add(new Pair<NetworkVO, NicProfile>(publicNetworks.get(0),
publicNic));
+                networks.put(publicNetworks.get(0), publicNic);
                 publicVlans.add(publicIp.getVlanTag());
             }
         }
@@ -1321,7 +1322,7 @@ public class VpcVirtualNetworkApplianceManagerImpl extends VirtualNetworkApplian
     }
     
     @Override
-    public void finalizeStop(VirtualMachineProfile profile, StopAnswer answer) {
+    public void finalizeStop(VirtualMachineProfile profile, Answer answer) {
         super.finalizeStop(profile, answer);
         //Mark VPN connections as Disconnected
         DomainRouterVO router = _routerDao.findById(profile.getId());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba359c3/server/src/com/cloud/server/StatsCollector.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/StatsCollector.java b/server/src/com/cloud/server/StatsCollector.java
index 2fc423c..5e110aa 100755
--- a/server/src/com/cloud/server/StatsCollector.java
+++ b/server/src/com/cloud/server/StatsCollector.java
@@ -48,8 +48,8 @@ import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.agent.AgentManager;
-import com.cloud.agent.AgentManager.OnError;
 import com.cloud.agent.api.Answer;
+import com.cloud.agent.api.Command.OnError;
 import com.cloud.agent.api.GetFileStatsCommand;
 import com.cloud.agent.api.GetStorageStatsCommand;
 import com.cloud.agent.api.HostStatsEntry;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba359c3/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java b/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
index 99aad9c..1621eca 100755
--- a/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
+++ b/server/src/com/cloud/storage/secondary/SecondaryStorageManagerImpl.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -52,7 +53,6 @@ import com.cloud.agent.api.SecStorageSetupCommand.Certificates;
 import com.cloud.agent.api.SecStorageVMSetupCommand;
 import com.cloud.agent.api.StartupCommand;
 import com.cloud.agent.api.StartupSecondaryStorageCommand;
-import com.cloud.agent.api.StopAnswer;
 import com.cloud.agent.api.check.CheckSshAnswer;
 import com.cloud.agent.api.check.CheckSshCommand;
 import com.cloud.agent.api.to.NfsTO;
@@ -554,14 +554,14 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements
Secondar
         }
 
         List<? extends NetworkOffering> offerings = _networkModel.getSystemAccountNetworkOfferings(NetworkOfferingVO.SystemControlNetwork,
NetworkOfferingVO.SystemManagementNetwork, NetworkOfferingVO.SystemStorageNetwork);
-        List<Pair<NetworkVO, NicProfile>> networks = new ArrayList<Pair<NetworkVO,
NicProfile>>(offerings.size() + 1);
+        LinkedHashMap<NetworkVO, NicProfile> networks = new LinkedHashMap<NetworkVO,
NicProfile>(offerings.size() + 1);
         NicProfile defaultNic = new NicProfile();
         defaultNic.setDefaultNic(true);
         defaultNic.setDeviceId(2);
         try {
-            networks.add(new Pair<NetworkVO, NicProfile>(_networkMgr.setupNetwork(systemAcct,
_networkOfferingDao.findById(defaultNetwork.getNetworkOfferingId()), plan, null, null, false).get(0),
defaultNic));
+            networks.put(_networkMgr.setupNetwork(systemAcct, _networkOfferingDao.findById(defaultNetwork.getNetworkOfferingId()),
plan, null, null, false).get(0), defaultNic);
             for (NetworkOffering offering : offerings) {
-                networks.add(new Pair<NetworkVO, NicProfile>(_networkMgr.setupNetwork(systemAcct,
offering, plan, null, null, false).get(0), null));
+                networks.put(_networkMgr.setupNetwork(systemAcct, offering, plan, null, null,
false).get(0), null);
             }
         } catch (ConcurrentOperationException e) {
             s_logger.info("Unable to setup due to concurrent operation. " + e);
@@ -1178,7 +1178,7 @@ public class SecondaryStorageManagerImpl extends ManagerBase implements
Secondar
     }
 
     @Override
-    public void finalizeStop(VirtualMachineProfile profile, StopAnswer answer) {
+    public void finalizeStop(VirtualMachineProfile profile, Answer answer) {
         //release elastic IP here
         IPAddressVO ip = _ipAddressDao.findByAssociatedVmId(profile.getId());
         if (ip != null && ip.getSystem()) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba359c3/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index b710c08..70a5692 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -81,7 +81,6 @@ import com.cloud.agent.api.GetVmStatsAnswer;
 import com.cloud.agent.api.GetVmStatsCommand;
 import com.cloud.agent.api.PvlanSetupCommand;
 import com.cloud.agent.api.StartAnswer;
-import com.cloud.agent.api.StopAnswer;
 import com.cloud.agent.api.VmDiskStatsEntry;
 import com.cloud.agent.api.VmStatsEntry;
 import com.cloud.agent.api.to.DiskTO;
@@ -1302,7 +1301,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Vir
                     // #3 scale the vm now
                     _itMgr.upgradeVmDb(vmId, newServiceOfferingId);
                     vmInstance = _vmInstanceDao.findById(vmId);
-                    vmInstance = _itMgr.reConfigureVm(vmInstance, currentServiceOffering,
existingHostHasCapacity);
+                    _itMgr.reConfigureVm(vmInstance.getUuid(), currentServiceOffering, existingHostHasCapacity);
                     success = true;
                     return success;
                 }catch(InsufficientCapacityException e ){
@@ -3210,7 +3209,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Vir
     }
 
     @Override
-    public void finalizeStop(VirtualMachineProfile profile, StopAnswer answer) {
+    public void finalizeStop(VirtualMachineProfile profile, Answer answer) {
         VirtualMachine vm = profile.getVirtualMachine();
         // release elastic IP here
         IPAddressVO ip = _ipAddressDao.findByAssociatedVmId(profile.getId());
@@ -4549,11 +4548,10 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Vir
                 }
             }
 
-            List<Pair<NetworkVO, NicProfile>> networks = new ArrayList<Pair<NetworkVO,
NicProfile>>();
+            LinkedHashMap<Network, NicProfile> networks = new LinkedHashMap<Network,
NicProfile>();
             NicProfile profile = new NicProfile();
             profile.setDefaultNic(true);
-            networks.add(new Pair<NetworkVO, NicProfile>(networkList.get(0),
-                    profile));
+            networks.put(networkList.get(0), profile);
 
             VirtualMachine vmi = _itMgr.findById(vm.getId());
             VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vmi);
@@ -4677,7 +4675,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Vir
                 }
 
                 // add the new nics
-                List<Pair<NetworkVO, NicProfile>> networks = new ArrayList<Pair<NetworkVO,
NicProfile>>();
+                LinkedHashMap<Network, NicProfile> networks = new LinkedHashMap<Network,
NicProfile>();
                 int toggle = 0;
                 for (NetworkVO appNet : applicableNetworks) {
                     NicProfile defaultNic = new NicProfile();
@@ -4685,8 +4683,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Vir
                         defaultNic.setDefaultNic(true);
                         toggle++;
                     }
-                    networks.add(new Pair<NetworkVO, NicProfile>(appNet,
-                            defaultNic));
+                    networks.put(appNet, defaultNic);
                 }
                 VirtualMachine vmi = _itMgr.findById(vm.getId());
                 VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vmi);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba359c3/server/src/com/cloud/vm/VirtualMachineGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineGuru.java b/server/src/com/cloud/vm/VirtualMachineGuru.java
deleted file mode 100644
index 3fb065b..0000000
--- a/server/src/com/cloud/vm/VirtualMachineGuru.java
+++ /dev/null
@@ -1,62 +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.vm;
-
-import com.cloud.agent.api.StopAnswer;
-import com.cloud.agent.manager.Commands;
-import com.cloud.deploy.DeployDestination;
-import com.cloud.exception.ResourceUnavailableException;
-
-/**
- * A VirtualMachineGuru knows how to process a certain type of virtual machine.
- *
- */
-public interface VirtualMachineGuru {
-    
-    boolean finalizeVirtualMachineProfile(VirtualMachineProfile profile, DeployDestination
dest, ReservationContext context);
-    
-    /**
-     * finalize the virtual machine deployment.
-     * @param cmds commands that were created.
-     * @param profile virtual machine profile.
-     * @param dest destination to send the command.
-     * @return true if everything checks out.  false if not and we should try again.
-     */
-    boolean finalizeDeployment(Commands cmds, VirtualMachineProfile profile, DeployDestination
dest, ReservationContext context) throws ResourceUnavailableException;
-    
-    /**
-     * Check the deployment results.
-     * @param cmds commands and answers that were sent.
-     * @param profile virtual machine profile.
-     * @param dest destination it was sent to.
-     * @return true if deployment was fine; false if it didn't go well.
-     */
-    boolean finalizeStart(VirtualMachineProfile profile, long hostId, Commands cmds, ReservationContext
context);
-    
-    boolean finalizeCommandsOnStart(Commands cmds, VirtualMachineProfile profile);
-    
-    void finalizeStop(VirtualMachineProfile profile, StopAnswer answer);
-    
-    void finalizeExpunge(VirtualMachine vm);
-    
-    /**
-     * Prepare Vm for Stop
-     * @param profile
-     * @return
-     */
-    void prepareStop(VirtualMachineProfile profile);
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba359c3/server/src/com/cloud/vm/VirtualMachineManager.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManager.java b/server/src/com/cloud/vm/VirtualMachineManager.java
deleted file mode 100644
index a0a8464..0000000
--- a/server/src/com/cloud/vm/VirtualMachineManager.java
+++ /dev/null
@@ -1,183 +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.vm;
-
-import java.net.URI;
-import java.util.List;
-import java.util.Map;
-
-import com.cloud.agent.api.to.NicTO;
-import com.cloud.agent.api.to.VirtualMachineTO;
-import com.cloud.deploy.DeployDestination;
-import com.cloud.deploy.DeploymentPlan;
-import com.cloud.deploy.DeploymentPlanner;
-import com.cloud.exception.AgentUnavailableException;
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.exception.InsufficientServerCapacityException;
-import com.cloud.exception.OperationTimedoutException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.network.Network;
-import com.cloud.network.dao.NetworkVO;
-import com.cloud.offering.ServiceOffering;
-import com.cloud.service.ServiceOfferingVO;
-import com.cloud.storage.DiskOfferingVO;
-import com.cloud.storage.StoragePool;
-import com.cloud.storage.VMTemplateVO;
-import com.cloud.storage.Volume;
-import com.cloud.utils.Pair;
-import com.cloud.utils.component.Manager;
-import com.cloud.utils.fsm.NoTransitionException;
-
-/**
- * Manages allocating resources to vms.
- */
-public interface VirtualMachineManager extends Manager {
-
-    void allocate(String vmInstanceName,
-            VMTemplateVO template,
-            ServiceOfferingVO serviceOffering,
-            Pair<? extends DiskOfferingVO, Long> rootDiskOffering,
-            List<Pair<DiskOfferingVO, Long>> dataDiskOfferings,
-            List<Pair<NetworkVO, NicProfile>> networks,
-            Map<VirtualMachineProfile.Param, Object> params,
-            DeploymentPlan plan,
-            HypervisorType hyperType) throws InsufficientCapacityException;
-
-    void allocate(String vmInstanceName,
-            VMTemplateVO template,
-            ServiceOfferingVO serviceOffering,
-            List<Pair<NetworkVO, NicProfile>> networkProfiles,
-            DeploymentPlan plan,
-            HypervisorType hyperType) throws InsufficientCapacityException;
-
-    void start(String vmUuid, Map<VirtualMachineProfile.Param, Object> params);
-
-    void start(String vmUuid, Map<VirtualMachineProfile.Param, Object> params, DeploymentPlan
planToDeploy);
-
-    void stop(String vmUuid) throws ResourceUnavailableException;
-
-    void expunge(String vmUuid) throws ResourceUnavailableException;
-
-    void registerGuru(VirtualMachine.Type type, VirtualMachineGuru guru);
-
-    boolean stateTransitTo(VMInstanceVO vm, VirtualMachine.Event e, Long hostId) throws NoTransitionException;
-
-    void advanceStart(String vmUuid, Map<VirtualMachineProfile.Param, Object> params)
throws InsufficientCapacityException, ResourceUnavailableException,
-            ConcurrentOperationException, OperationTimedoutException;
-
-    void advanceStart(String vmUuid, Map<VirtualMachineProfile.Param, Object> params,
DeploymentPlan planToDeploy) throws InsufficientCapacityException,
-            ResourceUnavailableException, ConcurrentOperationException, OperationTimedoutException;
-
-    void advanceStop(String vmUuid, boolean cleanupEvenIfUnableToStop) throws ResourceUnavailableException,
OperationTimedoutException, ConcurrentOperationException;
-
-    void advanceExpunge(String vmUuid) throws ResourceUnavailableException, OperationTimedoutException,
ConcurrentOperationException;
-
-    void destroy(String vmUuid) throws AgentUnavailableException, OperationTimedoutException,
ConcurrentOperationException;
-
-    void migrateAway(String vmUuid, long hostId) throws InsufficientServerCapacityException;
-
-    void migrate(String vmUuid, long srcHostId, DeployDestination dest) throws ResourceUnavailableException,
ConcurrentOperationException;
-
-    void migrateWithStorage(String vmUuid, long srcId, long destId, Map<Volume, StoragePool>
volumeToPool) throws ResourceUnavailableException, ConcurrentOperationException;
-
-    void reboot(String vmUuid, Map<VirtualMachineProfile.Param, Object> params) throws
InsufficientCapacityException, ResourceUnavailableException;
-
-    void advanceReboot(String vmUuid, Map<VirtualMachineProfile.Param, Object> params)
throws InsufficientCapacityException, ResourceUnavailableException,
-            ConcurrentOperationException, OperationTimedoutException;
-
-    /**
-     * Check to see if a virtual machine can be upgraded to the given service offering
-     * 
-     * @param vm
-     * @param offering
-     * @return true if the host can handle the upgrade, false otherwise
-     */
-    boolean isVirtualMachineUpgradable(final VirtualMachine vm, final ServiceOffering offering);
-    
-    VirtualMachine findById(long vmId);
-
-    void storageMigration(String vmUuid, StoragePool storagePoolId);
-
-    /**
-     * @param vmInstance
-     * @param newServiceOfferingId
-     */
-    void checkIfCanUpgrade(VirtualMachine vmInstance, long newServiceOfferingId);
-
-    /**
-     * @param vmId
-     * @param serviceOfferingId
-     * @return
-     */
-    boolean upgradeVmDb(long vmId, long serviceOfferingId);
-
-    /**
-     * @param vm
-     * @param network
-     * @param requested TODO
-     * @return
-     * @throws ConcurrentOperationException
-     * @throws ResourceUnavailableException
-     * @throws InsufficientCapacityException
-     */
-    NicProfile addVmToNetwork(VirtualMachine vm, Network network, NicProfile requested) throws
ConcurrentOperationException,
-                ResourceUnavailableException, InsufficientCapacityException;
-
-    /**
-     * @param vm
-     * @param nic
-     * @return
-     * @throws ResourceUnavailableException
-     * @throws ConcurrentOperationException
-     */
-    boolean removeNicFromVm(VirtualMachine vm, NicVO nic) throws ConcurrentOperationException,
ResourceUnavailableException;
-
-    /**
-     * @param vm
-     * @param network
-     * @param broadcastUri TODO
-     * @return
-     * @throws ResourceUnavailableException
-     * @throws ConcurrentOperationException
-     */
-    boolean removeVmFromNetwork(VirtualMachine vm, Network network, URI broadcastUri) throws
ConcurrentOperationException, ResourceUnavailableException;
-
-    /**
-     * @param nic
-     * @param hypervisorType
-     * @return
-     */
-    NicTO toNicTO(NicProfile nic, HypervisorType hypervisorType);
-
-    /**
-     * @param profile
-     * @param hvGuru
-     * @return
-     */
-    VirtualMachineTO toVmTO(VirtualMachineProfile profile);
-
-
-    VMInstanceVO reConfigureVm(VMInstanceVO vm, ServiceOffering newServiceOffering, boolean
sameHost) throws ResourceUnavailableException, ConcurrentOperationException;
-
-    void findHostAndMigrate(String vmUuid, Long newSvcOfferingId, DeploymentPlanner.ExcludeList
excludeHostList) throws InsufficientCapacityException,
-            ConcurrentOperationException, ResourceUnavailableException;
-
-    void migrateForScale(String vmUuid, long srcHostId, DeployDestination dest, Long newSvcOfferingId)
throws ResourceUnavailableException, ConcurrentOperationException;
-
-}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba359c3/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 7c19c28..19ded96 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -18,11 +18,11 @@
 package com.cloud.vm;
 
 import java.net.URI;
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -35,7 +35,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import com.cloud.exception.StorageUnavailableException;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao;
@@ -49,7 +48,6 @@ import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
 import org.apache.cloudstack.utils.identity.ManagementServerNode;
 
 import com.cloud.agent.AgentManager;
-import com.cloud.agent.AgentManager.OnError;
 import com.cloud.agent.Listener;
 import com.cloud.agent.api.AgentControlAnswer;
 import com.cloud.agent.api.AgentControlCommand;
@@ -113,6 +111,7 @@ import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.exception.OperationTimedoutException;
 import com.cloud.exception.ResourceUnavailableException;
+import com.cloud.exception.StorageUnavailableException;
 import com.cloud.ha.HighAvailabilityManager;
 import com.cloud.ha.HighAvailabilityManager.WorkType;
 import com.cloud.host.Host;
@@ -125,13 +124,11 @@ import com.cloud.hypervisor.HypervisorGuruManager;
 import com.cloud.network.Network;
 import com.cloud.network.NetworkManager;
 import com.cloud.network.NetworkModel;
-import com.cloud.network.Networks;
 import com.cloud.network.dao.IPAddressDao;
-import com.cloud.network.dao.IPAddressVO;
 import com.cloud.network.dao.NetworkDao;
 import com.cloud.network.dao.NetworkVO;
-import com.cloud.network.element.DhcpServiceProvider;
 import com.cloud.network.rules.RulesManager;
+import com.cloud.offering.DiskOffering;
 import com.cloud.offering.ServiceOffering;
 import com.cloud.org.Cluster;
 import com.cloud.resource.ResourceManager;
@@ -153,6 +150,7 @@ import com.cloud.storage.dao.StoragePoolHostDao;
 import com.cloud.storage.dao.VMTemplateDao;
 import com.cloud.storage.dao.VolumeDao;
 import com.cloud.storage.snapshot.SnapshotManager;
+import com.cloud.template.VirtualMachineTemplate;
 import com.cloud.user.Account;
 import com.cloud.user.AccountManager;
 import com.cloud.user.ResourceLimitService;
@@ -177,7 +175,6 @@ import com.cloud.vm.VirtualMachine.Event;
 import com.cloud.vm.VirtualMachine.State;
 import com.cloud.vm.dao.NicDao;
 import com.cloud.vm.dao.NicIpAliasDao;
-import com.cloud.vm.dao.NicIpAliasVO;
 import com.cloud.vm.dao.UserVmDao;
 import com.cloud.vm.dao.UserVmDetailsDao;
 import com.cloud.vm.dao.VMInstanceDao;
@@ -325,9 +322,14 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
 
     @Override
     @DB
-    public void allocate(String vmInstanceName, VMTemplateVO template, ServiceOfferingVO
serviceOffering, Pair<? extends DiskOfferingVO, Long> rootDiskOffering,
-            List<Pair<DiskOfferingVO, Long>> dataDiskOfferings, List<Pair<NetworkVO,
NicProfile>> networks, Map<VirtualMachineProfile.Param, Object> params, DeploymentPlan
plan,
-            HypervisorType hyperType) throws InsufficientCapacityException {
+    public void allocate(String vmInstanceName,
+        VirtualMachineTemplate template,
+        ServiceOffering serviceOffering,
+        Pair<? extends DiskOffering, Long> rootDiskOffering,
+        LinkedHashMap<? extends DiskOffering, Long> dataDiskOfferings,
+        LinkedHashMap<? extends Network, ? extends NicProfile> auxiliaryNetworks,
+        DeploymentPlan plan,
+        HypervisorType hyperType) throws InsufficientCapacityException {
 
         VMInstanceVO vm = _vmDao.findVMByInstanceName(vmInstanceName);
         Account owner = _entityMgr.findById(Account.class, vm.getAccountId());
@@ -343,7 +345,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
         assert (plan.getClusterId() == null && plan.getPoolId() == null) : "We currently
don't support cluster and pool preset yet";
         vm = _vmDao.persist(vm);
 
-        VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vm, template,
serviceOffering, null, params);
+        VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vm, template,
serviceOffering, null, null);
 
         Transaction txn = Transaction.currentTxn();
         txn.start();
@@ -353,13 +355,13 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
         }
 
         try {
-            _networkMgr.allocate(vmProfile, networks);
+            _networkMgr.allocate(vmProfile, auxiliaryNetworks);
         } catch (ConcurrentOperationException e) {
             throw new CloudRuntimeException("Concurrent operation while trying to allocate
resources for the VM", e);
         }
 
         if (dataDiskOfferings == null) {
-            dataDiskOfferings = new ArrayList<Pair<DiskOfferingVO, Long>>(0);
+            dataDiskOfferings = new LinkedHashMap<DiskOffering, Long>(0);
         }
 
         if (s_logger.isDebugEnabled()) {
@@ -374,8 +376,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
             volumeMgr.allocateTemplatedVolume(Type.ROOT, "ROOT-" + vm.getId(), rootDiskOffering.first(),
template, vm, owner);
         }
 
-        for (Pair<DiskOfferingVO, Long> offering : dataDiskOfferings) {
-            volumeMgr.allocateRawVolume(Type.DATADISK, "DATA-" + vm.getId(), offering.first(),
offering.second(), vm, template, owner);
+        for (Map.Entry<? extends DiskOffering, Long> offering : dataDiskOfferings.entrySet())
{
+            volumeMgr.allocateRawVolume(Type.DATADISK, "DATA-" + vm.getId(), offering.getKey(),
offering.getValue(), vm, template, owner);
         }
 
         txn.commit();
@@ -385,9 +387,13 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
     }
 
     @Override
-    public void allocate(String vmInstanceName, VMTemplateVO template, ServiceOfferingVO
serviceOffering, List<Pair<NetworkVO, NicProfile>> networks, DeploymentPlan plan,
-            HypervisorType hyperType) throws InsufficientCapacityException {
-        allocate(vmInstanceName, template, serviceOffering, new Pair<DiskOfferingVO, Long>(serviceOffering,
null), null, networks, null, plan, hyperType);
+    public void allocate(String vmInstanceName,
+        VirtualMachineTemplate template,
+        ServiceOffering serviceOffering,
+        LinkedHashMap<? extends Network, ? extends NicProfile> networks,
+        DeploymentPlan plan,
+        HypervisorType hyperType) throws InsufficientCapacityException {
+        allocate(vmInstanceName, template, serviceOffering, new Pair<DiskOffering, Long>(serviceOffering,
null), null, networks, plan, hyperType);
     }
 
     private VirtualMachineGuru getVmGuru(VirtualMachine vm) {
@@ -457,7 +463,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
         if (finalizeExpungeCommands != null && finalizeExpungeCommands.size() >
0) {
             Long hostId = vm.getHostId() != null ? vm.getHostId() : vm.getLastHostId();
             if (hostId != null) {
-                Commands cmds = new Commands(OnError.Stop);
+                Commands cmds = new Commands(Command.OnError.Stop);
                 for (Command command : finalizeExpungeCommands) {
                     cmds.addCommand(command);
                 }
@@ -867,7 +873,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
 
                     VirtualMachineTO vmTO = hvGuru.implement(vmProfile);
 
-                    cmds = new Commands(OnError.Stop);
+                    cmds = new Commands(Command.OnError.Stop);
                     cmds.addCommand(new StartCommand(vmTO, dest.getHost(), _mgmtServer.getExecuteInSequence()));
 
                     vmGuru.finalizeDeployment(cmds, vmProfile, dest, ctx);
@@ -1005,7 +1011,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
                 return false;
             }
 
-            guru.finalizeStop(profile, (StopAnswer)answer);
+            guru.finalizeStop(profile, answer);
         } catch (AgentUnavailableException e) {
             if (!force) {
                 return false;
@@ -1282,7 +1288,8 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
     }
 
     @Override
-    public boolean stateTransitTo(VMInstanceVO vm, VirtualMachine.Event e, Long hostId) throws
NoTransitionException {
+    public boolean stateTransitTo(VirtualMachine vm1, VirtualMachine.Event e, Long hostId)
throws NoTransitionException {
+        VMInstanceVO vm = (VMInstanceVO)vm1;
         // if there are active vm snapshots task, state change is not allowed
         if (_vmSnapshotMgr.hasActiveVMSnapshotTasks(vm.getId())) {
             s_logger.error("State transit with event: " + e + " failed due to: " + vm.getInstanceName()
+ " has active VM snapshots tasks");
@@ -1906,7 +1913,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
 
         try {
 
-            Commands cmds = new Commands(OnError.Stop);
+            Commands cmds = new Commands(Command.OnError.Stop);
             cmds.addCommand(new RebootCommand(vm.getInstanceName()));
             _agentMgr.send(host.getId(), cmds);
 
@@ -1930,7 +1937,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
     }
 
     public Commands fullHostSync(final long hostId, StartupRoutingCommand startup) {
-        Commands commands = new Commands(OnError.Continue);
+        Commands commands = new Commands(Command.OnError.Continue);
 
         Map<Long, AgentVmInfo> infos = convertToInfos(startup);
 
@@ -1990,7 +1997,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
 
     public Commands deltaHostSync(long hostId, Map<String, State> newStates) {
         Map<Long, AgentVmInfo> states = convertDeltaToInfos(newStates);
-        Commands commands = new Commands(OnError.Continue);
+        Commands commands = new Commands(Command.OnError.Continue);
 
         for (Map.Entry<Long, AgentVmInfo> entry : states.entrySet()) {
             AgentVmInfo info = entry.getValue();
@@ -2462,7 +2469,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
             profile.addNic(nicProfile);
         }
 
-        Commands cmds = new Commands(OnError.Stop);
+        Commands cmds = new Commands(Command.OnError.Stop);
         s_logger.debug("Finalizing commands that need to be send to complete Start process
for the vm " + vm);
 
         if (vmGuru.finalizeCommandsOnStart(cmds, profile)) {
@@ -2824,7 +2831,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
     }
 
     @Override
-    public boolean removeNicFromVm(VirtualMachine vm, NicVO nic) throws ConcurrentOperationException,
ResourceUnavailableException {
+    public boolean removeNicFromVm(VirtualMachine vm, Nic nic) throws ConcurrentOperationException,
ResourceUnavailableException {
         VMInstanceVO vmVO = _vmDao.findById(vm.getId());
         NetworkVO network = _networkDao.findById(nic.getNetworkId());
         ReservationContext context = new ReservationContextImpl(null, null, _accountMgr.getActiveUser(User.UID_SYSTEM),
@@ -3196,7 +3203,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
             try {
                 PlugNicCommand plugNicCmd = new PlugNicCommand(nic, vm.getName(), vm.getType());
 
-                Commands cmds = new Commands(OnError.Stop);
+                Commands cmds = new Commands(Command.OnError.Stop);
                 cmds.addCommand("plugnic", plugNicCmd);
                 _agentMgr.send(dest.getHost().getId(), cmds);
                 PlugNicAnswer plugNicAnswer = cmds.getAnswer(PlugNicAnswer.class);
@@ -3226,7 +3233,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
 
         if (router.getState() == State.Running) {
             try {
-                Commands cmds = new Commands(OnError.Stop);
+                Commands cmds = new Commands(Command.OnError.Stop);
                 UnPlugNicCommand unplugNicCmd = new UnPlugNicCommand(nic, vm.getName());
                 cmds.addCommand("unplugnic", unplugNicCmd);
                 _agentMgr.send(dest.getHost().getId(), cmds);
@@ -3254,8 +3261,9 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
     }
 
     @Override
-    public VMInstanceVO reConfigureVm(VMInstanceVO vm, ServiceOffering oldServiceOffering,
boolean reconfiguringOnExistingHost) throws ResourceUnavailableException,
+    public VMInstanceVO reConfigureVm(String vmUuid, ServiceOffering oldServiceOffering,
boolean reconfiguringOnExistingHost) throws ResourceUnavailableException,
             ConcurrentOperationException {
+        VMInstanceVO vm = _vmDao.findByUuid(vmUuid);
 
         long newServiceofferingId = vm.getServiceOfferingId();
         ServiceOffering newServiceOffering = _configMgr.getServiceOffering(newServiceofferingId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba359c3/server/src/com/cloud/vm/VirtualMachineProfileImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineProfileImpl.java b/server/src/com/cloud/vm/VirtualMachineProfileImpl.java
index 5a3505e..8282b16 100644
--- a/server/src/com/cloud/vm/VirtualMachineProfileImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineProfileImpl.java
@@ -25,7 +25,6 @@ import com.cloud.agent.api.to.DiskTO;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.offering.ServiceOffering;
 import com.cloud.service.ServiceOfferingVO;
-import com.cloud.storage.VMTemplateVO;
 import com.cloud.template.VirtualMachineTemplate;
 import com.cloud.template.VirtualMachineTemplate.BootloaderType;
 import com.cloud.user.Account;
@@ -52,7 +51,7 @@ public class VirtualMachineProfileImpl implements VirtualMachineProfile
{
 
     VirtualMachine.Type _type;
 
-    public VirtualMachineProfileImpl(VirtualMachine vm, VMTemplateVO template, ServiceOfferingVO
offering, Account owner, Map<Param, Object> params) {
+    public VirtualMachineProfileImpl(VirtualMachine vm, VirtualMachineTemplate template,
ServiceOffering offering, Account owner, Map<Param, Object> params) {
         _vm = vm;
         _template = template;
         _offering = offering;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba359c3/server/test/com/cloud/vm/UserVmManagerTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/UserVmManagerTest.java b/server/test/com/cloud/vm/UserVmManagerTest.java
index e74188f..02124dc 100755
--- a/server/test/com/cloud/vm/UserVmManagerTest.java
+++ b/server/test/com/cloud/vm/UserVmManagerTest.java
@@ -449,7 +449,7 @@ public class UserVmManagerTest {
 
         //when(ApiDBUtils.getCpuOverprovisioningFactor()).thenReturn(3f);
         when(_capacityMgr.checkIfHostHasCapacity(anyLong(), anyInt(), anyLong(), anyBoolean(),
anyFloat(), anyFloat(),  anyBoolean())).thenReturn(false);
-        when(_itMgr.reConfigureVm(_vmInstance, so1, false)).thenReturn(_vmInstance);
+        when(_itMgr.reConfigureVm(_vmInstance.getUuid(), so1, false)).thenReturn(_vmInstance);
 
         doReturn(true).when(_itMgr).upgradeVmDb(anyLong(), anyLong());
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba359c3/server/test/com/cloud/vm/VirtualMachineManagerImplTest.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/VirtualMachineManagerImplTest.java b/server/test/com/cloud/vm/VirtualMachineManagerImplTest.java
index 00c8eb5..5f68074 100644
--- a/server/test/com/cloud/vm/VirtualMachineManagerImplTest.java
+++ b/server/test/com/cloud/vm/VirtualMachineManagerImplTest.java
@@ -279,7 +279,7 @@ public class VirtualMachineManagerImplTest {
                 newServiceOffering.getLimitCpuUse());
         Answer answer = new ScaleVmAnswer(reconfigureCmd, true, "details");
         when(_agentMgr.send(2l, reconfigureCmd)).thenReturn(null);
-        _vmMgr.reConfigureVm(_vmInstance, getSvcoffering(256), false);
+        _vmMgr.reConfigureVm(_vmInstance.getUuid(), getSvcoffering(256), false);
 
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4ba359c3/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
index 5439b07..ce2660f 100644
--- a/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
+++ b/server/test/com/cloud/vpc/MockNetworkManagerImpl.java
@@ -17,6 +17,7 @@
 package com.cloud.vpc;
 
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -738,7 +739,7 @@ public class MockNetworkManagerImpl extends ManagerBase implements NetworkManage
      * @see com.cloud.network.NetworkManager#allocate(com.cloud.vm.VirtualMachineProfile,
java.util.List)
      */
     @Override
-    public void allocate(VirtualMachineProfile vm, List<Pair<NetworkVO, NicProfile>>
networks)
+    public void allocate(VirtualMachineProfile vm, LinkedHashMap<? extends Network, ?
extends NicProfile> networks)
             throws InsufficientCapacityException, ConcurrentOperationException {
         // TODO Auto-generated method stub
         


Mime
View raw message