@Test public void testFindOrDeployVirtualRouter() throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException { final RouterDeploymentDefinition deploymentUT = Mockito.spy(deployment); doNothing().when(deploymentUT).findOrDeployVirtualRouter(); deploymentUT.deployVirtualRouter(); verify(mockNetworkHelper, times(1)).startRouters(deploymentUT); }
@DB protected void findOrDeployVirtualRouter() throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException { if (!isRouterDeployed()) { try { lock(); routers.clear(); checkPreconditions(); final List<DeployDestination> destinations = findDestinations(); for (final DeployDestination destination : destinations) { dest = destination; generateDeploymentPlan(); executeDeployment(); } } finally { unlock(); } } }
RouterDeploymentDefinition { @DB protected void findOrDeployVirtualRouter() throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException { if (!isRouterDeployed()) { try { lock(); routers.clear(); checkPreconditions(); final List<DeployDestination> destinations = findDestinations(); for (final DeployDestination destination : destinations) { dest = destination; generateDeploymentPlan(); executeDeployment(); } } finally { unlock(); } } } }
RouterDeploymentDefinition { @DB protected void findOrDeployVirtualRouter() throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException { if (!isRouterDeployed()) { try { lock(); routers.clear(); checkPreconditions(); final List<DeployDestination> destinations = findDestinations(); for (final DeployDestination destination : destinations) { dest = destination; generateDeploymentPlan(); executeDeployment(); } } finally { unlock(); } } } protected  RouterDeploymentDefinition(final Network guestNetwork, final DeployDestination dest, final Account owner, final Map<Param, Object> params); }
RouterDeploymentDefinition { @DB protected void findOrDeployVirtualRouter() throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException { if (!isRouterDeployed()) { try { lock(); routers.clear(); checkPreconditions(); final List<DeployDestination> destinations = findDestinations(); for (final DeployDestination destination : destinations) { dest = destination; generateDeploymentPlan(); executeDeployment(); } } finally { unlock(); } } } protected  RouterDeploymentDefinition(final Network guestNetwork, final DeployDestination dest, final Account owner, final Map<Param, Object> params); Long getServiceOfferingId(); Long getSecondaryServiceOfferingId(); Vpc getVpc(); Network getGuestNetwork(); DeployDestination getDest(); Account getOwner(); Map<Param, Object> getParams(); boolean isRedundant(); DeploymentPlan getPlan(); boolean isVpcRouter(); Pod getPod(); Long getPodId(); List<DomainRouterVO> getRouters(); VirtualRouterProvider getVirtualProvider(); boolean isBasic(); boolean isPublicNetwork(); PublicIp getSourceNatIP(); boolean needsPublicNic(); boolean hasSourceNatService(); boolean hasGatewayService(); List<DomainRouterVO> deployVirtualRouter(); }
RouterDeploymentDefinition { @DB protected void findOrDeployVirtualRouter() throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException { if (!isRouterDeployed()) { try { lock(); routers.clear(); checkPreconditions(); final List<DeployDestination> destinations = findDestinations(); for (final DeployDestination destination : destinations) { dest = destination; generateDeploymentPlan(); executeDeployment(); } } finally { unlock(); } } } protected  RouterDeploymentDefinition(final Network guestNetwork, final DeployDestination dest, final Account owner, final Map<Param, Object> params); Long getServiceOfferingId(); Long getSecondaryServiceOfferingId(); Vpc getVpc(); Network getGuestNetwork(); DeployDestination getDest(); Account getOwner(); Map<Param, Object> getParams(); boolean isRedundant(); DeploymentPlan getPlan(); boolean isVpcRouter(); Pod getPod(); Long getPodId(); List<DomainRouterVO> getRouters(); VirtualRouterProvider getVirtualProvider(); boolean isBasic(); boolean isPublicNetwork(); PublicIp getSourceNatIP(); boolean needsPublicNic(); boolean hasSourceNatService(); boolean hasGatewayService(); List<DomainRouterVO> deployVirtualRouter();  }