Search in sources :

Example 1 with ModelInfoGenericVnf

use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf in project so by onap.

the class BuildingBlockTestDataSetup method buildGenericVnf.

public GenericVnf buildGenericVnf() {
    genericVnfCounter++;
    GenericVnf genericVnf = new GenericVnf();
    genericVnf.setVnfId("testVnfId" + genericVnfCounter);
    genericVnf.setVnfName("testVnfName" + genericVnfCounter);
    genericVnf.setVnfType("testVnfType" + genericVnfCounter);
    Platform platform = new Platform();
    platform.setPlatformName("testPlatformName");
    genericVnf.setPlatform(platform);
    LineOfBusiness lob = new LineOfBusiness();
    lob.setLineOfBusinessName("testLineOfBusinessName");
    genericVnf.setLineOfBusiness(lob);
    ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
    modelInfoGenericVnf.setModelName("testModelName" + genericVnfCounter);
    modelInfoGenericVnf.setModelCustomizationUuid("testModelCustomizationUUID" + genericVnfCounter);
    modelInfoGenericVnf.setModelInvariantUuid("testModelInvariantUUID" + genericVnfCounter);
    modelInfoGenericVnf.setModelVersion("testModelVersion" + genericVnfCounter);
    modelInfoGenericVnf.setModelUuid("testModelUUID" + genericVnfCounter);
    modelInfoGenericVnf.setModelInstanceName("testModelInstanceName" + genericVnfCounter);
    genericVnf.setModelInfoGenericVnf(modelInfoGenericVnf);
    return genericVnf;
}
Also used : ModelInfoGenericVnf(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf) GenericVnf(org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf) Platform(org.onap.so.bpmn.servicedecomposition.bbobjects.Platform) ModelInfoGenericVnf(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf) LineOfBusiness(org.onap.so.bpmn.servicedecomposition.bbobjects.LineOfBusiness)

Example 2 with ModelInfoGenericVnf

use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf in project so by onap.

the class BBInputSetupTest method testMapCatalogVnf.

@Test
public void testMapCatalogVnf() {
    ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
    GenericVnf genericVnf = new GenericVnf();
    RequestDetails requestDetails = new RequestDetails();
    ModelInfo modelInfo = new ModelInfo();
    modelInfo.setModelCustomizationUuid("modelCustomizationUUID");
    requestDetails.setModelInfo(modelInfo);
    Service service = new Service();
    VnfResourceCustomization resourceCust = new VnfResourceCustomization();
    resourceCust.setModelCustomizationUUID("vnfModelCustomizationUUID");
    service.getVnfCustomizations().add(resourceCust);
    resourceCust.setModelCustomizationUUID("modelCustomizationUUID");
    doReturn(modelInfoGenericVnf).when(bbInputSetupMapperLayer).mapCatalogVnfToVnf(resourceCust);
    SPY_bbInputSetup.mapCatalogVnf(genericVnf, modelInfo, service);
    assertEquals(modelInfoGenericVnf, genericVnf.getModelInfoGenericVnf());
}
Also used : ModelInfo(org.onap.so.serviceinstancebeans.ModelInfo) ModelInfoGenericVnf(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf) GenericVnf(org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf) ModelInfoGenericVnf(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf) Service(org.onap.so.db.catalog.beans.Service) RequestDetails(org.onap.so.serviceinstancebeans.RequestDetails) VnfResourceCustomization(org.onap.so.db.catalog.beans.VnfResourceCustomization) Test(org.junit.Test)

Example 3 with ModelInfoGenericVnf

use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf in project so by onap.

the class ConfigAssignVnfTest method createGenericVnf.

private GenericVnf createGenericVnf() {
    GenericVnf genericVnf = new GenericVnf();
    genericVnf.setVnfId(GENERIC_VNF_ID);
    genericVnf.setVnfName(GENERIC_VNF_NAME);
    ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
    modelInfoGenericVnf.setModelCustomizationUuid(TARGET_VNF_MODEL_CUSTOMIZATION_UUID);
    modelInfoGenericVnf.setBlueprintName("blueprintTest");
    modelInfoGenericVnf.setBlueprintVersion("blueprintVerTest");
    genericVnf.setModelInfoGenericVnf(modelInfoGenericVnf);
    return genericVnf;
}
Also used : ModelInfoGenericVnf(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf) GenericVnf(org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf) ModelInfoGenericVnf(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf)

Example 4 with ModelInfoGenericVnf

use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf in project so by onap.

the class VnfmAdapterCreateVnfTaskTest method getModelInfoGenericVnf.

private ModelInfoGenericVnf getModelInfoGenericVnf() {
    final ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
    modelInfoGenericVnf.setModelInstanceName(MODEL_INSTANCE_NAME);
    return modelInfoGenericVnf;
}
Also used : ModelInfoGenericVnf(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf)

Example 5 with ModelInfoGenericVnf

use of org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf in project so by onap.

the class SdncInputParametersProviderImplTest method getGenericVnf.

private GenericVnf getGenericVnf() {
    final GenericVnf genericVnf = getGenericVnf(GENERIC_VNF_TYPE);
    final ModelInfoGenericVnf modelInfoGenericVnf = new ModelInfoGenericVnf();
    modelInfoGenericVnf.setModelName(MODEL_NAME);
    genericVnf.setModelInfoGenericVnf(modelInfoGenericVnf);
    return genericVnf;
}
Also used : ModelInfoGenericVnf(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf) GenericVnf(org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf) ModelInfoGenericVnf(org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf)

Aggregations

ModelInfoGenericVnf (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoGenericVnf)36 GenericVnf (org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf)32 Test (org.junit.Test)27 CloudRegion (org.onap.so.bpmn.servicedecomposition.bbobjects.CloudRegion)17 ServiceInstance (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance)16 VfModule (org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule)16 RequestContext (org.onap.so.bpmn.servicedecomposition.generalobjects.RequestContext)16 ModelInfoServiceInstance (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoServiceInstance)16 ModelInfoVfModule (org.onap.so.bpmn.servicedecomposition.modelinfo.ModelInfoVfModule)16 HashMap (java.util.HashMap)15 OrchestrationContext (org.onap.so.bpmn.servicedecomposition.generalobjects.OrchestrationContext)11 CreateVfModuleRequest (org.onap.so.adapters.vnfrest.CreateVfModuleRequest)10 BaseTaskTest (org.onap.so.bpmn.BaseTaskTest)7 BuildingBlockDetail (org.onap.so.db.catalog.beans.BuildingBlockDetail)7 OrchestrationStatusStateTransitionDirective (org.onap.so.db.catalog.beans.OrchestrationStatusStateTransitionDirective)7 InfraActiveRequests (org.onap.so.db.request.beans.InfraActiveRequests)6 URI (java.net.URI)5 Customer (org.onap.so.bpmn.servicedecomposition.bbobjects.Customer)5 ServiceSubscription (org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription)5 ArrayList (java.util.ArrayList)4