@Test public void testFindSourceNatIPPublicNw() throws InsufficientAddressCapacityException, ConcurrentOperationException { final PublicIp sourceNatIp = mock(PublicIp.class); when(mockIpAddrMgr.assignSourceNatIpAddressToGuestNetwork(mockOwner, mockNw)).thenReturn(sourceNatIp); deployment.isPublicNetwork = true; assertNull(deployment.sourceNatIp); deployment.findSourceNatIP(); assertEquals("SourceNatIP was not correctly found and set", sourceNatIp, deployment.sourceNatIp); }
protected void findSourceNatIP() throws InsufficientAddressCapacityException, ConcurrentOperationException { sourceNatIp = null; if (isPublicNetwork) { sourceNatIp = ipAddrMgr.assignSourceNatIpAddressToGuestNetwork(owner, guestNetwork); } }
RouterDeploymentDefinition { protected void findSourceNatIP() throws InsufficientAddressCapacityException, ConcurrentOperationException { sourceNatIp = null; if (isPublicNetwork) { sourceNatIp = ipAddrMgr.assignSourceNatIpAddressToGuestNetwork(owner, guestNetwork); } } }
RouterDeploymentDefinition { protected void findSourceNatIP() throws InsufficientAddressCapacityException, ConcurrentOperationException { sourceNatIp = null; if (isPublicNetwork) { sourceNatIp = ipAddrMgr.assignSourceNatIpAddressToGuestNetwork(owner, guestNetwork); } } protected  RouterDeploymentDefinition(final Network guestNetwork, final DeployDestination dest, final Account owner, final Map<Param, Object> params); }
RouterDeploymentDefinition { protected void findSourceNatIP() throws InsufficientAddressCapacityException, ConcurrentOperationException { sourceNatIp = null; if (isPublicNetwork) { sourceNatIp = ipAddrMgr.assignSourceNatIpAddressToGuestNetwork(owner, guestNetwork); } } 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 { protected void findSourceNatIP() throws InsufficientAddressCapacityException, ConcurrentOperationException { sourceNatIp = null; if (isPublicNetwork) { sourceNatIp = ipAddrMgr.assignSourceNatIpAddressToGuestNetwork(owner, guestNetwork); } } 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();  }