diff options
Diffstat (limited to 'catalog-be/src')
3 files changed, 10 insertions, 4 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java index 9a8c181377..dd55ae8612 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogic.java @@ -210,9 +210,6 @@ public class ServiceImportBusinessLogic { service.setVersion(INITIAL_VERSION); service.setConformanceLevel(ConfigurationManager.getConfigurationManager().getConfiguration().getToscaConformanceLevel()); service.setDistributionStatus(DistributionStatusEnum.DISTRIBUTION_NOT_APPROVED); - service.setInstantiationType("A-la-carte"); - service.setEnvironmentContext("General_Revenue-Bearing"); - service.setEcompGeneratedNaming(true); try { serviceBusinessLogic.validateServiceBeforeCreate(service, user, auditingAction); log.debug("enter createService,validateServiceBeforeCreate success"); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportManager.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportManager.java index 7958efa3de..6f10aaea9c 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportManager.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceImportManager.java @@ -71,7 +71,15 @@ public class ServiceImportManager { ServiceMetadataDataDefinition serviceMetadataDataDefinition = (ServiceMetadataDataDefinition) service.getComponentMetadataDefinition() .getMetadataDataDefinition(); serviceMetadataDataDefinition.getServiceVendorModelNumber(); - service.setServiceType(""); + service.setServiceType(serviceMetaData.getServiceType()); + service.setServiceRole(serviceMetaData.getServiceRole()); + service.setNamingPolicy(serviceMetaData.getNamingPolicy()); + boolean ecompGeneratedNaming = serviceMetaData.getEcompGeneratedNaming() == null + || serviceMetaData.getEcompGeneratedNaming().equals("true"); + service.setEcompGeneratedNaming(ecompGeneratedNaming); + service.setServiceFunction(serviceMetaData.getServiceFunction()); + service.setInstantiationType(serviceMetaData.getInstantiationType()); + service.setEnvironmentContext(serviceMetaData.getEnvironmentContext()); service.setProjectCode(serviceMetaData.getProjectCode()); service.setModel(serviceMetaData.getModel()); if (serviceMetaData.getVendorName() != null) { diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java index 586b9f66b9..91d2bd5336 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/ToscaExportHandler.java @@ -510,6 +510,7 @@ public class ToscaExportHandler { toscaMetadata.put(JsonPresentationFields.DESCRIPTION.getPresentation(), component.getDescription()); List<CategoryDefinition> categories = component.getCategories(); CategoryDefinition categoryDefinition = categories.get(0); + toscaMetadata.put(JsonPresentationFields.MODEL.getPresentation(), component.getModel()); toscaMetadata.put(JsonPresentationFields.CATEGORY.getPresentation(), categoryDefinition.getName()); if (isInstance) { toscaMetadata.put(JsonPresentationFields.VERSION.getPresentation(), component.getVersion()); |