@@ -219,7 +219,7 @@ public boolean implement(final Network network, final NetworkOffering offering,
219219 return false ;
220220 }
221221
222- final Map <VirtualMachineProfile .Param , Object > params = new HashMap <VirtualMachineProfile . Param , Object >(1 );
222+ final Map <VirtualMachineProfile .Param , Object > params = new HashMap <>(1 );
223223 params .put (VirtualMachineProfile .Param .ReProgramGuestNetworks , true );
224224
225225 if (network .isRollingRestart ()) {
@@ -264,27 +264,13 @@ public boolean prepare(final Network network, final NicProfile nic, final Virtua
264264 return false ;
265265 }
266266
267- final NetworkOfferingVO offering = _networkOfferingDao .findById (network .getNetworkOfferingId ());
268- if (offering .isSystemOnly ()) {
269- return false ;
270- }
271267 if (!_networkMdl .isProviderEnabledInPhysicalNetwork (_networkMdl .getPhysicalNetworkId (network ), getProvider ().getName ())) {
272268 return false ;
273269 }
274270
275- final RouterDeploymentDefinition routerDeploymentDefinition =
276- routerDeploymentDefinitionBuilder .create ()
277- .setGuestNetwork (network )
278- .setDeployDestination (dest )
279- .setAccountOwner (_accountMgr .getAccount (network .getAccountId ()))
280- .setParams (vm .getParameters ())
281- .build ();
282-
283- final List <DomainRouterVO > routers = routerDeploymentDefinition .deployVirtualRouter ();
271+ final NetworkOfferingVO offering = _networkOfferingDao .findById (network .getNetworkOfferingId ());
272+ implement (network , offering , dest , context );
284273
285- if (routers == null || routers .size () == 0 ) {
286- throw new ResourceUnavailableException ("Can't find at least one running router!" , DataCenter .class , network .getDataCenterId ());
287- }
288274 return true ;
289275 }
290276
0 commit comments