use of com.cloud.legacymodel.network.Network.Service in project cosmic by MissionCriticalCloud.
the class VpcManagerImplTest method prepareVpcManagerForCheckingCapabilityPerService.
protected Set<Network.Provider> prepareVpcManagerForCheckingCapabilityPerService(final Service service, final Map<Capability, String> capabilities) {
final Set<Network.Provider> providers = new HashSet<>();
providers.add(Provider.VPCVirtualRouter);
final NetworkElement nwElement1 = mock(NetworkElement.class);
this.manager._ntwkModel = mock(NetworkModel.class);
when(this.manager._ntwkModel.getElementImplementingProvider(Provider.VPCVirtualRouter.getName())).thenReturn(nwElement1);
final Map<Service, Map<Network.Capability, String>> capabilitiesService1 = new HashMap<>();
when(nwElement1.getCapabilities()).thenReturn(capabilitiesService1);
capabilitiesService1.put(service, capabilities);
return providers;
}
use of com.cloud.legacymodel.network.Network.Service in project cosmic by MissionCriticalCloud.
the class CreateNetworkOfferingTest method createIsolatedNtwkOffWithSpecifyIpRangesAndNoSourceNat.
@Test
public void createIsolatedNtwkOffWithSpecifyIpRangesAndNoSourceNat() {
final Map<Service, Set<Provider>> serviceProviderMap = new HashMap<>();
final Set<Network.Provider> vrProvider = new HashSet<>();
final NetworkOfferingVO off = configMgr.createNetworkOffering("isolated", "isolated", TrafficType.Guest, null, false, Availability.Optional, 200, serviceProviderMap, false, GuestType.Isolated, false, null, null, false, null, true, false, null, false, null, true);
assertNotNull("Isolated network offering with specifyIpRanges=true and with no sourceNatService, failed to create", off);
}
Aggregations