Search in sources :

Example 6 with VpnBinding

use of org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding in project so by onap.

the class BuildingBlockTestDataSetup method buildVpnBinding.

public VpnBinding buildVpnBinding() {
    vpnBindingCounter++;
    VpnBinding vpnBinding = new VpnBinding();
    vpnBinding.setVpnId("testVpnId" + vpnBindingCounter);
    vpnBinding.setVpnName("testVpnName" + vpnBindingCounter);
    vpnBinding.setCustomerVpnId("testCustomerVpnId" + vpnBindingCounter);
    return vpnBinding;
}
Also used : VpnBinding(org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding)

Example 7 with VpnBinding

use of org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding in project so by onap.

the class BuildingBlockTestDataSetup method setVpnBinding.

public VpnBinding setVpnBinding() {
    VpnBinding vpnBinding = buildVpnBinding();
    Customer customer = gBBInput.getCustomer();
    if (customer == null) {
        customer = buildCustomer();
    }
    customer.getVpnBindings().add(vpnBinding);
    lookupKeyMap.put(ResourceKey.VPN_ID, vpnBinding.getVpnId());
    return vpnBinding;
}
Also used : VpnBinding(org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding) Customer(org.onap.so.bpmn.servicedecomposition.bbobjects.Customer)

Example 8 with VpnBinding

use of org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding in project so by onap.

the class AAIObjectMapperTest method mapVpnBindingTest.

@Test
public void mapVpnBindingTest() {
    VpnBinding vpnBinding = new VpnBinding();
    vpnBinding.setVpnId("testVpnId");
    vpnBinding.setVpnName("testVpn");
    vpnBinding.setVpnPlatform("AVPN");
    vpnBinding.setCustomerVpnId("testCustomerVpnId");
    vpnBinding.setVpnType("testVpnType");
    vpnBinding.setVpnRegion("testVpnRegion");
    vpnBinding.setRouteDistinguisher("testRD");
    RouteTarget routeTarget = new RouteTarget();
    routeTarget.setRouteTargetRole("testRtRole");
    routeTarget.setGlobalRouteTarget("testGrt");
    vpnBinding.getRouteTargets().add(routeTarget);
    org.onap.aai.domain.yang.VpnBinding expectedVpnBinding = new org.onap.aai.domain.yang.VpnBinding();
    expectedVpnBinding.setVpnId("testVpnId");
    expectedVpnBinding.setVpnName("testVpn");
    expectedVpnBinding.setVpnPlatform("AVPN");
    expectedVpnBinding.setCustomerVpnId("testCustomerVpnId");
    expectedVpnBinding.setVpnType("testVpnType");
    expectedVpnBinding.setVpnRegion("testVpnRegion");
    expectedVpnBinding.setRouteDistinguisher("testRD");
    org.onap.aai.domain.yang.RouteTarget expectedRouteTarget = new org.onap.aai.domain.yang.RouteTarget();
    expectedRouteTarget.setRouteTargetRole("testRtRole");
    expectedRouteTarget.setGlobalRouteTarget("testGrt");
    RouteTargets expectedRouteTargets = new RouteTargets();
    expectedRouteTargets.getRouteTarget().add(expectedRouteTarget);
    expectedVpnBinding.setRouteTargets(expectedRouteTargets);
    org.onap.aai.domain.yang.VpnBinding actualVpnBinding = aaiObjectMapper.mapVpnBinding(vpnBinding);
    assertThat(actualVpnBinding, sameBeanAs(expectedVpnBinding));
}
Also used : VpnBinding(org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding) RouteTarget(org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTarget) RouteTargets(org.onap.aai.domain.yang.RouteTargets) Test(org.junit.Test)

Example 9 with VpnBinding

use of org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding in project so by onap.

the class TestDataSetup method setVpnBinding.

public VpnBinding setVpnBinding() {
    VpnBinding vpnBinding = buildVpnBinding();
    Customer customer = gBBInput.getCustomer();
    if (customer == null) {
        customer = buildCustomer();
    }
    customer.getVpnBindings().add(vpnBinding);
    lookupKeyMap.put(ResourceKey.VPN_ID, vpnBinding.getVpnId());
    return vpnBinding;
}
Also used : VpnBinding(org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding) Customer(org.onap.so.bpmn.servicedecomposition.bbobjects.Customer)

Example 10 with VpnBinding

use of org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding in project so by onap.

the class TestDataSetup method buildVpnBinding.

public VpnBinding buildVpnBinding() {
    vpnBindingCounter++;
    VpnBinding vpnBinding = new VpnBinding();
    vpnBinding.setVpnId("testVpnId" + vpnBindingCounter);
    vpnBinding.setVpnName("testVpnName" + vpnBindingCounter);
    vpnBinding.setCustomerVpnId("testCustomerVpnId" + vpnBindingCounter);
    return vpnBinding;
}
Also used : VpnBinding(org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding)

Aggregations

VpnBinding (org.onap.so.bpmn.servicedecomposition.bbobjects.VpnBinding)10 Test (org.junit.Test)3 Customer (org.onap.so.bpmn.servicedecomposition.bbobjects.Customer)3 L3Network (org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network)2 RouteTarget (org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTarget)2 ServiceInstance (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 RouteTargets (org.onap.aai.domain.yang.RouteTargets)1 AAIResourceUri (org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri)1 AAIFluentTypeBuilder (org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder)1 ContrailNetwork (org.onap.so.adapters.nwrest.ContrailNetwork)1 ProviderVlanNetwork (org.onap.so.adapters.nwrest.ProviderVlanNetwork)1 UpdateNetworkRequest (org.onap.so.adapters.nwrest.UpdateNetworkRequest)1 BaseTaskTest (org.onap.so.bpmn.BaseTaskTest)1 HostRoute (org.onap.so.bpmn.servicedecomposition.bbobjects.HostRoute)1 NetworkPolicy (org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy)1 RouteTableReference (org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference)1 ServiceProxy (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceProxy)1 ServiceSubscription (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription)1