From ae24e28cda8247fdce38330356b63db1377be58f Mon Sep 17 00:00:00 2001 From: vasraz Date: Mon, 22 Aug 2022 19:43:16 +0100 Subject: Fix 'Wrong Inputs creation on (Add Service)' Signed-off-by: Vasyl Razinkov Change-Id: Iadfe03718066dafe5a438020c488f5b242fe6a41 Issue-ID: SDC-4097 --- .../be/components/impl/InputsBusinessLogic.java | 8 +- .../be/components/impl/ServiceBusinessLogic.java | 110 ++++++++++++++------- .../property/DefaultPropertyDeclarator.java | 48 +++++---- .../openecomp/sdc/be/tosca/ToscaExportHandler.java | 20 ++-- .../sdc/be/tosca/utils/InputConverter.java | 2 +- 5 files changed, 111 insertions(+), 77 deletions(-) (limited to 'catalog-be/src/main/java') diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java index bca901ee8b..763552fcf3 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java @@ -213,7 +213,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { } component = getComponentEither.left().value(); Optional op = component.getInputs().stream().filter(in -> in.getUniqueId().equals(inputId)).findFirst(); - if (!op.isPresent()) { + if (op.isEmpty()) { ActionStatus actionStatus = componentsUtils.convertFromStorageResponse(getComponentEither.right().value()); log.debug(FAILED_TO_FOUND_INPUT_UNDER_COMPONENT_ERROR, inputId, parentId, actionStatus); return Either.right(componentsUtils.getResponseFormat(actionStatus)); @@ -369,7 +369,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { } component = getComponentEither.left().value(); Optional op = component.getInputs().stream().filter(in -> in.getUniqueId().equals(inputId)).findFirst(); - if (!op.isPresent()) { + if (op.isEmpty()) { ActionStatus actionStatus = componentsUtils.convertFromStorageResponse(getComponentEither.right().value()); log.debug(FAILED_TO_FOUND_INPUT_UNDER_COMPONENT_ERROR, inputId, componentId, actionStatus); return Either.right(componentsUtils.getResponseFormat(actionStatus)); @@ -664,7 +664,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { filter(input -> input.getUniqueId().equals(inputId)). // Get the input findAny(); - if (!optionalInput.isPresent()) { + if (optionalInput.isEmpty()) { throw new ByActionStatusComponentException(ActionStatus.INPUT_IS_NOT_CHILD_OF_COMPONENT, inputId, componentId); } InputDefinition inputForDelete = optionalInput.get(); @@ -770,7 +770,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { } Component component = getComponentEither.left().value(); Optional op = component.getInputs().stream().filter(in -> in.getUniqueId().equals(inputId)).findFirst(); - if (!op.isPresent()) { + if (op.isEmpty()) { ActionStatus actionStatus = componentsUtils.convertFromStorageResponse(getComponentEither.right().value()); log.debug(FAILED_TO_FOUND_INPUT_UNDER_COMPONENT_ERROR, inputId, componentId, actionStatus); return Either.right(componentsUtils.getResponseFormat(actionStatus)); diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java index 2cccc31ded..577d1f5e32 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogic.java @@ -109,8 +109,10 @@ import org.openecomp.sdc.be.impl.WebAppContextWrapper; import org.openecomp.sdc.be.model.ArtifactDefinition; import org.openecomp.sdc.be.model.CapabilityDefinition; import org.openecomp.sdc.be.model.Component; +import org.openecomp.sdc.be.model.ComponentInstInputsMap; import org.openecomp.sdc.be.model.ComponentInstance; import org.openecomp.sdc.be.model.ComponentInstanceInterface; +import org.openecomp.sdc.be.model.ComponentInstancePropInput; import org.openecomp.sdc.be.model.ComponentInstanceProperty; import org.openecomp.sdc.be.model.ComponentParametersView; import org.openecomp.sdc.be.model.DistributionStatusEnum; @@ -189,13 +191,12 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { private final ServiceInstantiationTypeValidator serviceInstantiationTypeValidator; private final ServiceCategoryValidator serviceCategoryValidator; private final ServiceValidator serviceValidator; - private final PolicyBusinessLogic policyBusinessLogic; - private final GroupBusinessLogic groupBusinessLogic; private ForwardingPathOperation forwardingPathOperation; private AuditCassandraDao auditCassandraDao; private ServiceTypeValidator serviceTypeValidator; private List serviceCreationPluginList; private ServiceFunctionValidator serviceFunctionValidator; + private final InputsBusinessLogic inputsBusinessLogic; public ServiceBusinessLogic(IElementOperation elementDao, IGroupOperation groupOperation, IGroupInstanceOperation groupInstanceOperation, IGroupTypeOperation groupTypeOperation, GroupBusinessLogic groupBusinessLogic, InterfaceOperation interfaceOperation, @@ -210,7 +211,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { final ServiceRoleValidator serviceRoleValidator, final ServiceInstantiationTypeValidator serviceInstantiationTypeValidator, final ServiceCategoryValidator serviceCategoryValidator, final ServiceValidator serviceValidator, - final PolicyBusinessLogic policyBusinessLogic) { + final InputsBusinessLogic inputsBusinessLogic) { super(elementDao, groupOperation, groupInstanceOperation, groupTypeOperation, groupBusinessLogic, interfaceOperation, interfaceLifecycleTypeOperation, artifactsBusinessLogic, artifactToscaOperation, componentContactIdValidator, componentNameValidator, componentTagsValidator, componentValidator, componentIconValidator, componentProjectCodeValidator, componentDescriptionValidator); @@ -224,8 +225,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { this.serviceInstantiationTypeValidator = serviceInstantiationTypeValidator; this.serviceCategoryValidator = serviceCategoryValidator; this.serviceValidator = serviceValidator; - this.policyBusinessLogic = policyBusinessLogic; - this.groupBusinessLogic = groupBusinessLogic; + this.inputsBusinessLogic = inputsBusinessLogic; } @Autowired @@ -311,7 +311,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { } Optional serviceInstanceCandidate = componentInstances.stream() .filter(instance -> instance.getUniqueId().equals(serviceInstanceId)).findAny(); - if (!serviceInstanceCandidate.isPresent()) { + if (serviceInstanceCandidate.isEmpty()) { return Either.right(componentsUtils.getResponseFormat(ActionStatus.INTERFACE_OPERATION_NOT_FOUND, serviceInstanceId)); } Map> componentInstancesInterfaces = parentService.getComponentInstancesInterfaces(); @@ -324,7 +324,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { } ComponentInstance serviceInstance = serviceInstanceCandidate.get(); Optional interfaceCandidate = InterfaceOperationUtils.getInterfaceDefinitionFromOperationId(interfaces, operationId); - if (!interfaceCandidate.isPresent()) { + if (interfaceCandidate.isEmpty()) { return Either.right(componentsUtils.getResponseFormat(ActionStatus.INTERFACE_OPERATION_NOT_FOUND, serviceInstanceId)); } InterfaceDefinition interfaceDefinition = interfaceCandidate.get(); @@ -336,7 +336,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { Either operationEither = Either.left(operation); ListDataDefinition inputs = operation.getInputs(); Optional inputCandidate = getOperationInputByInputId(serviceConsumptionData, inputs); - if (!inputCandidate.isPresent()) { + if (inputCandidate.isEmpty()) { return Either.right(new ResponseFormat(HttpStatus.NOT_FOUND.value())); } OperationInputDefinition operationInputDefinition = inputCandidate.get(); @@ -419,7 +419,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { .getListToscaDataDefinition(); } else { Optional getComponentInstance = containerService.getComponentInstanceById(source); - if (!getComponentInstance.isPresent()) { + if (getComponentInstance.isEmpty()) { return Either.right(componentsUtils.getResponseFormat(ActionStatus.COMPONENT_INSTANCE_NOT_FOUND_ON_CONTAINER, source)); } ComponentInstance componentInstance = getComponentInstance.get(); @@ -692,7 +692,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { private Either createServiceByDao(final Service service, final User user) { log.debug("send service {} to dao for create", service.getComponentMetadataDefinition().getMetadataDataDefinition().getName()); - Either lockResult = lockComponentByName(service.getSystemName(), service, "Create Service"); + final Either lockResult = lockComponentByName(service.getSystemName(), service, "Create Service"); if (lockResult.isRight()) { ResponseFormat responseFormat = lockResult.right().value(); componentsUtils.auditComponentAdmin(responseFormat, user, service, AuditingActionEnum.CREATE_RESOURCE, ComponentTypeEnum.SERVICE); @@ -710,25 +710,64 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { generateAndAddInputsFromGenericTypeProperties(service, genericType); } beforeCreate(service); - Either dataModelResponse = toscaOperationFacade.createToscaComponent(service); - if (dataModelResponse.isLeft()) { - log.debug("Service '{}' created successfully", service.getName()); - ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.CREATED); + final Either dataModelResponse = toscaOperationFacade.createToscaComponent(service); + if (dataModelResponse.isRight()) { + ResponseFormat responseFormat = componentsUtils + .getResponseFormatByComponent(componentsUtils.convertFromStorageResponse(dataModelResponse.right().value()), service, + ComponentTypeEnum.SERVICE); + log.debug(AUDIT_BEFORE_SENDING_RESPONSE); componentsUtils.auditComponentAdmin(responseFormat, user, service, AuditingActionEnum.CREATE_RESOURCE, ComponentTypeEnum.SERVICE); - ASDCKpiApi.countCreatedServicesKPI(); - return Either.left(dataModelResponse.left().value()); + return Either.right(responseFormat); } - ResponseFormat responseFormat = componentsUtils - .getResponseFormatByComponent(componentsUtils.convertFromStorageResponse(dataModelResponse.right().value()), service, - ComponentTypeEnum.SERVICE); - log.debug(AUDIT_BEFORE_SENDING_RESPONSE); - componentsUtils.auditComponentAdmin(responseFormat, user, service, AuditingActionEnum.CREATE_RESOURCE, ComponentTypeEnum.SERVICE); - return Either.right(responseFormat); + final Service createdService = dataModelResponse.left().value(); + if (createdService.isSubstituteCandidate() || genericTypeBusinessLogic.hasMandatorySubstitutionType(createdService)) { + updateInputs(createdService); + } + log.debug("Service '{}' created successfully", createdService.getName()); + final ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.CREATED); + componentsUtils.auditComponentAdmin(responseFormat, user, createdService, AuditingActionEnum.CREATE_RESOURCE, ComponentTypeEnum.SERVICE); + ASDCKpiApi.countCreatedServicesKPI(); + return Either.left(createdService); } finally { graphLockOperation.unlockComponentByName(service.getSystemName(), service.getUniqueId(), NodeTypeEnum.Service); } } + private void updateInputs(final Service service) { + final List genericTypeInputs = service.getInputs(); + final Either, ResponseFormat> inputs = inputsBusinessLogic.getInputs(service.getCreatorUserId(), service.getUniqueId()); + if (inputs.isRight() || CollectionUtils.isEmpty(inputs.left().value())) { + log.warn("Failed to declare Generic Type Properties as Inputs"); + service.setInputs(null); + return; + } + inputs.left().value().forEach( + inputDefinition -> inputsBusinessLogic.deleteInput(service.getUniqueId(), service.getCreatorUserId(), inputDefinition.getUniqueId())); + + service.setInputs(null); + if (CollectionUtils.isNotEmpty(genericTypeInputs)) { + // From SELF + final ComponentInstInputsMap componentInstInputsMap = new ComponentInstInputsMap(); + final List componentInstancePropInputs = genericTypeInputs.stream() + .map(prop -> { + prop.setInstanceUniqueId(service.getUniqueId()); + prop.setParentUniqueId(service.getUniqueId()); + return new ComponentInstancePropInput(new ComponentInstanceProperty(prop)); + } + ).collect(Collectors.toList()); + componentInstInputsMap.setServiceProperties(Collections.singletonMap(service.getUniqueId(), componentInstancePropInputs)); + + final Either, ResponseFormat> listResponseFormatEither = inputsBusinessLogic.declareProperties( + service.getCreatorUserId(), service.getUniqueId(), ComponentTypeEnum.SERVICE, componentInstInputsMap); + if (listResponseFormatEither.isRight()) { + log.warn("Failed to declare Generic Type Properties as Inputs"); + service.setInputs(null); + return; + } + service.setInputs(listResponseFormatEither.left().value()); + } + } + private void beforeCreate(final Service service) { if (CollectionUtils.isEmpty(serviceCreationPluginList)) { return; @@ -745,10 +784,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { @SuppressWarnings("unchecked") private void createServiceApiArtifactsData(Service service, User user) { // create mandatory artifacts - - // TODO it must be removed after that artifact uniqueId creation will be - - // moved to ArtifactOperation + // TODO it must be removed after that artifact uniqueId creation will be moved to ArtifactOperation String serviceUniqueId = service.getUniqueId(); Map artifactMap = service.getServiceApiArtifacts(); if (artifactMap == null) { @@ -1630,13 +1666,13 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { BeEcompErrorManager.getInstance() .logBeComponentMissingError("markDistributionAsDeployed", ComponentTypeEnum.SERVICE.getValue(), serviceId); log.debug("service {} not found", serviceId); - ResponseFormat responseFormat = auditDeployError(did, user, auditAction, null, + ResponseFormat responseFormat = auditDeployError(did, user, null, componentsUtils.convertFromStorageResponse(getServiceResponse.right().value(), ComponentTypeEnum.SERVICE), ""); return Either.right(responseFormat); } Service service = getServiceResponse.left().value(); user = validateRoleForDeploy(did, user, auditAction, service); - return checkDistributionAndDeploy(did, user, auditAction, service); + return checkDistributionAndDeploy(did, user, service); } public Either generateVfModuleArtifacts(Service service, User modifier, boolean shouldLock, boolean inTransaction) { @@ -1710,13 +1746,13 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { return null; } - private synchronized Either checkDistributionAndDeploy(String distributionId, User user, AuditingActionEnum auditAction, + private synchronized Either checkDistributionAndDeploy(String distributionId, User user, Service service) { boolean isDeployed = isDistributionDeployed(distributionId); if (isDeployed) { return Either.left(service); } - Either distributionSuccess = checkDistributionSuccess(distributionId, user, auditAction, service); + Either distributionSuccess = checkDistributionSuccess(distributionId, user, service); if (distributionSuccess.isRight()) { return Either.right(distributionSuccess.right().value()); } @@ -1739,20 +1775,20 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { return isDeployed; } - protected Either checkDistributionSuccess(String did, User user, AuditingActionEnum auditAction, Service service) { + protected Either checkDistributionSuccess(String did, User user, Service service) { log.trace("checkDistributionSuccess"); // get all "DRequest" records for this distribution Either, ActionStatus> distRequestsResponse = auditCassandraDao .getDistributionRequest(did, AuditingActionEnum.DISTRIBUTION_STATE_CHANGE_REQUEST.getName()); if (distRequestsResponse.isRight()) { - ResponseFormat error = auditDeployError(did, user, auditAction, service, distRequestsResponse.right().value()); + ResponseFormat error = auditDeployError(did, user, service, distRequestsResponse.right().value()); return Either.right(error); } List distributionRequests = distRequestsResponse.left().value(); if (distributionRequests.isEmpty()) { BeEcompErrorManager.getInstance().logBeDistributionMissingError("markDistributionAsDeployed", did); log.info("distribution {} is not found", did); - ResponseFormat error = auditDeployError(did, user, auditAction, service, ActionStatus.DISTRIBUTION_REQUESTED_NOT_FOUND); + ResponseFormat error = auditDeployError(did, user, service, ActionStatus.DISTRIBUTION_REQUESTED_NOT_FOUND); return Either.right(error); } boolean isRequestSucceeded = false; @@ -1767,7 +1803,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { Either, ActionStatus> distNotificationsResponse = auditCassandraDao .getDistributionNotify(did, AuditingActionEnum.DISTRIBUTION_NOTIFY.getName()); if (distNotificationsResponse.isRight()) { - ResponseFormat error = auditDeployError(did, user, auditAction, service, distNotificationsResponse.right().value()); + ResponseFormat error = auditDeployError(did, user, service, distNotificationsResponse.right().value()); return Either.right(error); } List distributionNotifications = distNotificationsResponse.left().value(); @@ -1783,13 +1819,13 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { if (!(isRequestSucceeded && isNotificationsSucceeded)) { log.info("distribution {} has failed", did); ResponseFormat error = componentsUtils.getResponseFormat(ActionStatus.DISTRIBUTION_REQUESTED_FAILED, did); - auditDeployError(did, user, auditAction, service, ActionStatus.DISTRIBUTION_REQUESTED_FAILED, did); + auditDeployError(did, user, service, ActionStatus.DISTRIBUTION_REQUESTED_FAILED, did); return Either.right(error); } return Either.left(true); } - private ResponseFormat auditDeployError(String did, User user, AuditingActionEnum auditAction, Service service, ActionStatus status, + private ResponseFormat auditDeployError(String did, User user, Service service, ActionStatus status, String... params) { ResponseFormat error = componentsUtils.getResponseFormat(status, params); String message = ""; @@ -1817,7 +1853,7 @@ public class ServiceBusinessLogic extends ComponentBusinessLogic { validateUserRole(user, service, roles, auditAction, null); } catch (ByActionStatusComponentException e) { log.info("role {} is not allowed to perform this action", user.getRole()); - auditDeployError(did, user, auditAction, service, e.getActionStatus()); + auditDeployError(did, user, service, e.getActionStatus()); throw e; } return user; diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/property/DefaultPropertyDeclarator.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/property/DefaultPropertyDeclarator.java index 0412516390..07d5ba0f24 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/property/DefaultPropertyDeclarator.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/property/DefaultPropertyDeclarator.java @@ -126,7 +126,7 @@ public abstract class DefaultPropertyDeclarator, StorageOperationStatus> declarePropertiesAsPolicies(Component component, PROPERTYOWNER propertiesOwner, List propsToDeclare) { - PropertiesDeclarationData policyProperties = createPoliciesAndOverridePropertiesValues(propertiesOwner.getUniqueId(), propertiesOwner, + PropertiesDeclarationData policyProperties = createPoliciesAndOverridePropertiesValues(propertiesOwner.getUniqueId(), propsToDeclare); return updatePropertiesValues(component, propertiesOwner.getUniqueId(), policyProperties.getPropertiesToUpdate()).left() .map(updatePropsRes -> policyProperties.getPoliciesToCreate()); @@ -144,8 +144,7 @@ public abstract class DefaultPropertyDeclarator inputsProperties.getInputsToCreate()); } - private PropertiesDeclarationData createPoliciesAndOverridePropertiesValues(String componentId, PROPERTYOWNER propertiesOwner, - List propsToDeclare) { + private PropertiesDeclarationData createPoliciesAndOverridePropertiesValues(String componentId, List propsToDeclare) { List declaredProperties = new ArrayList<>(); List policies = new ArrayList<>(); propsToDeclare.forEach(property -> policies.add(declarePropertyPolicy(componentId, declaredProperties, property))); @@ -250,7 +249,7 @@ public abstract class DefaultPropertyDeclarator mappedToscaTemplate = (Map) objValue; + final Map mappedToscaTemplate = (Map) objValue; createInputValue(mappedToscaTemplate, 1, parsedPropNames, inputName); - String json = gson.toJson(mappedToscaTemplate); + final String json = gson.toJson(mappedToscaTemplate); prop.setValue(json); } } else { - jsonObject.put(GET_INPUT, input.getName()); + jsonObject.put(GET_INPUT, inputName); prop.setValue(jsonObject.toJSONString()); } } if (CollectionUtils.isEmpty(prop.getGetInputValues())) { prop.setGetInputValues(new ArrayList<>()); } - List getInputValues = prop.getGetInputValues(); - GetInputValueDataDefinition getInputValueDataDefinition = new GetInputValueDataDefinition(); + final List getInputValues = prop.getGetInputValues(); + final GetInputValueDataDefinition getInputValueDataDefinition = new GetInputValueDataDefinition(); getInputValueDataDefinition.setInputId(input.getUniqueId()); - getInputValueDataDefinition.setInputName(input.getName()); + getInputValueDataDefinition.setInputName(inputName); getInputValues.add(getInputValueDataDefinition); } @@ -460,8 +460,7 @@ public abstract class DefaultPropertyDeclarator " + result.right().value() - .toString()); //continue, don't break operation + log.warn("Map cleanup failed -> {}", result.right().value()); //continue, don't break operation } value = gson.toJson(modifiedMappedToscaTemplate); } @@ -546,11 +545,10 @@ public abstract class DefaultPropertyDeclarator properties = component.getProperties(); Map convertedProperties = properties.stream() - .map(propertyDefinition -> resolvePropertyValueFromInput(propertyDefinition, component.getInputs())).collect(Collectors - .toMap(PropertyDataDefinition::getName, - property -> propertyConvertor.convertProperty(dataTypes, property, PropertyConvertor.PropertyType.PROPERTY))); + .map(propertyDefinition -> resolvePropertyValueFromInput(propertyDefinition, component.getInputs())) + .collect(Collectors.toMap(PropertyDataDefinition::getName, + property -> propertyConvertor.convertProperty(dataTypes, property, PropertyConvertor.PropertyType.PROPERTY))); // merge component properties and inputs properties - mergedProperties.putAll(convertedProperties); + convertedProperties.forEach((k, v) -> mergedProperties.putIfAbsent(k, v)); } if (MapUtils.isNotEmpty(mergedProperties)) { toscaNodeType.setProperties(mergedProperties); @@ -938,7 +938,7 @@ public class ToscaExportHandler { nodeTemplate.setType(componentInstance.getToscaComponentName()); nodeTemplate.setDirectives(componentInstance.getDirectives()); NodeFilter nodeFilter = convertToNodeTemplateNodeFilterComponent(componentInstance.getNodeFilter()); - if(nodeFilter != null && nodeFilter.hasData()){ + if (nodeFilter != null && nodeFilter.hasData()) { nodeTemplate.setNode_filter(nodeFilter); } final Either originComponentRes = capabilityRequirementConverter @@ -1767,7 +1767,7 @@ public class ToscaExportHandler { } private Map convertInputsToProperties(Map dataTypes, List componentInputs, - String componentUniqueId) { + String componentUniqueId) { if (CollectionUtils.isEmpty(componentInputs)) { return new HashMap<>(); } @@ -1788,6 +1788,10 @@ public class ToscaExportHandler { .ofNullable(interfacesOperationsConverter.getInterfacesMap(proxyComponent, null, proxyComponentInterfaces, dataTypes, false, false)); } + private Configuration getConfiguration() { + return ConfigurationManager.getConfigurationManager().getConfiguration(); + } + private static class CustomRepresenter extends Representer { CustomRepresenter() { @@ -1943,8 +1947,4 @@ public class ToscaExportHandler { } } - private Configuration getConfiguration() { - return ConfigurationManager.getConfigurationManager().getConfiguration(); - } - } diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/utils/InputConverter.java b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/utils/InputConverter.java index 55de9e5028..b94a32291e 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/utils/InputConverter.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/tosca/utils/InputConverter.java @@ -56,7 +56,7 @@ public class InputConverter { * description * list of properties */ public Map convertInputs(List inputDef, Map dataTypes) { - log.debug("convert inputs to to tosca "); + log.debug("convert inputs to tosca"); Map inputs = new HashMap<>(); if (inputDef != null) { inputDef.forEach(i -> { -- cgit 1.2.3-korg