diff options
34 files changed, 132 insertions, 64 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java index 6e971f215d..b9956063d6 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/AssetsDataServlet.java @@ -243,8 +243,13 @@ public class AssetsDataServlet extends AbstractValidationsServlet { ComponentTypeEnum componentType = ComponentTypeEnum.findByParamName(assetType); additionalParam.put(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID, instanceIdHeader); additionalParam.put(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_RESOURCE_URL, requestURI); - additionalParam.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, componentType.getValue()); additionalParam.put(AuditingFieldsKeysEnum.AUDIT_SERVICE_INSTANCE_ID, uuid); + if (componentType == null) { + log.debug("getMetaData: assetType parameter {} is not valid", assetType); + responseFormat = getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT); + return buildErrorResponse(responseFormat); + } + additionalParam.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, componentType.getValue()); // Mandatory if (instanceIdHeader == null || instanceIdHeader.isEmpty()) { @@ -331,8 +336,15 @@ public class AssetsDataServlet extends AbstractValidationsServlet { EnumMap<AuditingFieldsKeysEnum, Object> additionalParam = new EnumMap<AuditingFieldsKeysEnum, Object>(AuditingFieldsKeysEnum.class); additionalParam.put(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_CONSUMER_ID, instanceIdHeader); additionalParam.put(AuditingFieldsKeysEnum.AUDIT_DISTRIBUTION_RESOURCE_URL, url); - additionalParam.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, componentType.getValue()); additionalParam.put(AuditingFieldsKeysEnum.AUDIT_SERVICE_INSTANCE_ID, uuid); + + if (componentType == null) { + log.debug("getToscaModel: assetType parameter {} is not valid", assetType); + responseFormat = getComponentsUtils().getResponseFormat(ActionStatus.INVALID_CONTENT); + return buildErrorResponse(responseFormat); + } + additionalParam.put(AuditingFieldsKeysEnum.AUDIT_RESOURCE_TYPE, componentType.getValue()); + if (instanceIdHeader == null || instanceIdHeader.isEmpty()) { log.debug("getToscaModel: Missing X-ECOMP-InstanceID header"); diff --git a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeTypes.py b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeTypes.py index d47c0b8073..1f523858b6 100644 --- a/catalog-be/src/main/resources/scripts/import/tosca/importNormativeTypes.py +++ b/catalog-be/src/main/resources/scripts/import/tosca/importNormativeTypes.py @@ -84,7 +84,7 @@ def usage(): def importNormativeTypes(beHost, bePort, adminUser, fileDir, updateversion): - normativeTypes = [ "root", "compute", "softwareComponent", "webServer", "webApplication", "DBMS", "database", "objectStorage", "blockStorage", "containerRuntime", "containerApplication", "loadBalancer", "port", "network"] + normativeTypes = [ "root", "compute", "softwareComponent", "webServer", "webApplication", "DBMS", "database", "objectStorage", "blockStorage", "containerRuntime", "containerApplication", "loadBalancer", "port", "network", "allottedResource"] #normativeTypes = [ "root" ] responseCodes = [200, 201] diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/TranslationContext.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/TranslationContext.java index a0034a3828..ddbcaf72b9 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/TranslationContext.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/TranslationContext.java @@ -25,14 +25,12 @@ import org.openecomp.config.api.ConfigurationManager; import org.openecomp.core.utilities.CommonMethods; import org.openecomp.core.utilities.file.FileContentHandler; import org.openecomp.sdc.common.errors.CoreException; -import org.openecomp.sdc.common.errors.ErrorCode; import org.openecomp.sdc.common.utils.SdcCommon; import org.openecomp.sdc.datatypes.configuration.ImplementationConfiguration; import org.openecomp.sdc.heat.datatypes.manifest.FileData; import org.openecomp.sdc.heat.datatypes.manifest.ManifestFile; import org.openecomp.sdc.heat.datatypes.model.Resource; import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate; -import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment; import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate; import org.openecomp.sdc.tosca.services.ToscaUtil; import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource; @@ -42,6 +40,7 @@ import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolida import org.openecomp.sdc.translator.services.heattotosca.ConfigConstants; import org.openecomp.sdc.translator.services.heattotosca.Constants; import org.openecomp.sdc.translator.services.heattotosca.NameExtractor; +import org.openecomp.sdc.translator.services.heattotosca.errors.DuplicateResourceIdsInDifferentFilesErrorBuilder; import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator; import java.io.InputStream; @@ -385,10 +384,7 @@ public class TranslationContext { } if(nodeAbstractNodeTemplateIdMap.containsKey(originalNodeTemplateId)){ - throw new CoreException((new ErrorCode.ErrorCodeBuilder()) - .withMessage("Resource with id " - + originalNodeTemplateId + " occures more than once in different addOn files") - .build()); + throw new CoreException(new DuplicateResourceIdsInDifferentFilesErrorBuilder(originalNodeTemplateId).build()); } nodeAbstractNodeTemplateIdMap.put(originalNodeTemplateId, abstractNodeTemplateId); this.getUnifiedSubstitutionData().get(serviceTemplateFileName).setNodesRelatedAbstractNode( diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationDataUtil.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationDataUtil.java index b86038d175..5d1bb1c61e 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationDataUtil.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationDataUtil.java @@ -31,6 +31,7 @@ import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolida import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.PortTemplateConsolidationData; import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.RequirementAssignmentData; import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.TypeComputeConsolidationData; +import org.openecomp.sdc.translator.services.heattotosca.errors.DuplicateResourceIdsInDifferentFilesErrorBuilder; import java.util.ArrayList; import java.util.Collection; @@ -154,10 +155,7 @@ public class ConsolidationDataUtil { if(isNestedResourceIdOccuresInDifferentNestedFiles(context, nestedHeatFileName, nestedNodeTemplateId)){ - throw new CoreException((new ErrorCode.ErrorCodeBuilder()) - .withMessage("Resource with id " - + nestedNodeTemplateId + " occures more than once in different addOn " - + "files").build()); + throw new CoreException(new DuplicateResourceIdsInDifferentFilesErrorBuilder(nestedNodeTemplateId).build()); } ConsolidationData consolidationData = context.getConsolidationData(); diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationService.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationService.java index 16a6301968..d3f2a721c9 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationService.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/ConsolidationService.java @@ -24,6 +24,7 @@ import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolida import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.PortTemplateConsolidationData; import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.RequirementAssignmentData; import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.TypeComputeConsolidationData; +import org.openecomp.sdc.translator.services.heattotosca.errors.DuplicateResourceIdsInDifferentFilesErrorBuilder; import java.util.ArrayList; import java.util.Collection; @@ -637,20 +638,16 @@ public class ConsolidationService { NodeTemplate startingPortNodeTemplate = nodeTemplates.get(portNodeTemplateIdList.get(0)); if (Objects.isNull(startingPortNodeTemplate)) { - throw new CoreException((new ErrorCode.ErrorCodeBuilder()) - .withMessage("Resource with id " - + portNodeTemplateIdList.get(0) + " occures more than once in different addOn files") - .build()); + throw new CoreException( + new DuplicateResourceIdsInDifferentFilesErrorBuilder(portNodeTemplateIdList.get(0)).build()); } for (int i = 1; i < portNodeTemplateIdList.size(); i++) { NodeTemplate portNodeTemplate = nodeTemplates.get(portNodeTemplateIdList.get(i)); if (Objects.isNull(portNodeTemplate)) { - throw new CoreException((new ErrorCode.ErrorCodeBuilder()) - .withMessage("Resource with id " - + portNodeTemplateIdList.get(i) + " occures more than once in different addOn " - + "files").build()); + throw new CoreException( + new DuplicateResourceIdsInDifferentFilesErrorBuilder(portNodeTemplateIdList.get(i)).build()); } if (!isPropertySimilarBetweenNodeTemplates(propertyToCheck, portNodeTemplateIdList, nodeTemplates)) { @@ -695,9 +692,8 @@ public class ConsolidationService { for (int i = 1; i < entityNodeTemplateIds.size(); i++) { NodeTemplate currentNodeTemplate = idToNodeTemplate.get(entityNodeTemplateIds.get(i)); if (Objects.isNull(currentNodeTemplate)) { - throw new CoreException((new ErrorCode.ErrorCodeBuilder()) - .withMessage("Resource with id " - + entityNodeTemplateIds.get(i) + " occures more than once in different addOn files").build()); + throw new CoreException( + new DuplicateResourceIdsInDifferentFilesErrorBuilder(entityNodeTemplateIds.get(i)).build()); } if(propertyExistCondition != isPropertyExistInNodeTemplate(propertyToCheck, currentNodeTemplate)){ return false; diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/DuplicateResourceIdsInDifferentFilesErrorBuilder.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/DuplicateResourceIdsInDifferentFilesErrorBuilder.java new file mode 100644 index 0000000000..a75e8b391d --- /dev/null +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/DuplicateResourceIdsInDifferentFilesErrorBuilder.java @@ -0,0 +1,16 @@ +package org.openecomp.sdc.translator.services.heattotosca.errors; + +import org.openecomp.sdc.common.errors.BaseErrorBuilder; +import org.openecomp.sdc.common.errors.ErrorCategory; + +public final class DuplicateResourceIdsInDifferentFilesErrorBuilder extends BaseErrorBuilder { + + private static final String DUPLICATE_RESOURCE_ID_MSG = "Resource with id %s occurs more than once in " + + "different addOn files"; + + public DuplicateResourceIdsInDifferentFilesErrorBuilder(String resourceId) { + getErrorCodeBuilder().withId(TranslatorErrorCodes.DUPLICATE_RESOURCE_ID_IN_DIFFERENT_FILES) + .withCategory(ErrorCategory.APPLICATION) + .withMessage(String.format(DUPLICATE_RESOURCE_ID_MSG, resourceId)); + } +} diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/TranslatorErrorCodes.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/TranslatorErrorCodes.java index bfcf834ae1..5afb1ae3c2 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/TranslatorErrorCodes.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/errors/TranslatorErrorCodes.java @@ -29,4 +29,5 @@ public class TranslatorErrorCodes { "REFERENCE_TO_UNSUPPORTED_RESOURCE"; public static final String NOT_IN_SYNC_NUMBER_OF_INTERFACES = "NOT_IN_SYNC_NUMBER_OF_INTERFACES"; public static final String INVALID_PROPERTY_VALUE = "INVALID_PROPERTY_VALUE"; + public static final String DUPLICATE_RESOURCE_ID_IN_DIFFERENT_FILES = "DUPLICATE_RESOURCE_ID_IN_DIFFERENT_FILES"; } diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionMixPatternFullTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionMixPatternFullTest.java index b1946b3f9b..9399b91ce1 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionMixPatternFullTest.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/test/java/org/openecomp/sdc/translator/services/heattotosca/impl/fulltest/UnifiedCompositionMixPatternFullTest.java @@ -2,7 +2,10 @@ package org.openecomp.sdc.translator.services.heattotosca.impl.fulltest; import org.junit.Assert; import org.junit.Before; +import org.junit.Rule; import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.openecomp.sdc.common.errors.CoreException; import org.openecomp.sdc.logging.api.Logger; import org.openecomp.sdc.logging.api.LoggerFactory; import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseFullTranslationTest; @@ -19,6 +22,9 @@ public class UnifiedCompositionMixPatternFullTest extends BaseFullTranslationTes // do not delete this function. it prevents the superclass setup from running } + @Rule + public ExpectedException exception = ExpectedException.none(); + @Test public void testMixPatterns() throws IOException { inputFilesPath = @@ -52,16 +58,13 @@ public class UnifiedCompositionMixPatternFullTest extends BaseFullTranslationTes @Test public void testDuplicateResourceIdsInDiffAddOnFiles() throws IOException { + exception.expect(CoreException.class); + exception.expectMessage("Resource with id lb_0_int_oam_int_0_port occurs more " + + "than once in different addOn files"); + inputFilesPath = "/mock/services/heattotosca/fulltest/mixPatterns/duplicateResourceIdsInDiffAddOnFiles/in"; - - try { - testTranslationWithInit(); - }catch(Exception e){ - log.debug("",e); - Assert.assertEquals(e.getMessage(), "Resource with id lb_0_int_oam_int_0_port occures more " + - "than once in different addOn files"); - } + testTranslationWithInit(); } @Test diff --git a/openecomp-ui/src/nfvo-components/modal/GlobalModal.js b/openecomp-ui/src/nfvo-components/modal/GlobalModal.js index f282046125..4e7a1a16a4 100644 --- a/openecomp-ui/src/nfvo-components/modal/GlobalModal.js +++ b/openecomp-ui/src/nfvo-components/modal/GlobalModal.js @@ -114,7 +114,9 @@ export class GlobalModalView extends React.Component { <Modal.Body> {ComponentToRender ? <ComponentToRender {...modalComponentProps}/> : - <div> {msg && msg.split('\n').map(txt => <span> {txt} <br/> </span>)} </div> + msg && typeof msg === 'string' ? + <div> {msg.split('\n').map(txt => <span> {txt} <br/> </span>)} </div> : + msg } </Modal.Body> {(onConfirmed || onDeclined || type !== typeEnum.DEFAULT) && diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx index aa1321c24a..8473c1a2be 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsEditorView.jsx @@ -245,6 +245,7 @@ class EntitlementPoolsEditorView extends React.Component { <Tab disabled={isTabsDisabled} tabId={tabIds.SP_LIMITS} data-test-id='sp-limits-tab' title={i18n('SP Limits')}> {selectedTab === tabIds.SP_LIMITS && <EntitlementPoolsLimits + isReadOnlyMode={isReadOnlyMode} limitType={limitType.SERVICE_PROVIDER} limitsList={limitsList.filter(item => item.type === limitType.SERVICE_PROVIDER)} selectedLimit={this.state.selectedLimit} @@ -254,19 +255,33 @@ class EntitlementPoolsEditorView extends React.Component { <Tab disabled={isTabsDisabled} tabId={tabIds.VENDOR_LIMITS} data-test-id='vendor-limits-tab' title={i18n('Vendor Limits')}> {selectedTab === tabIds.VENDOR_LIMITS && <EntitlementPoolsLimits + isReadOnlyMode={isReadOnlyMode} limitType={limitType.VENDOR} limitsList={limitsList.filter(item => item.type === limitType.VENDOR)} selectedLimit={this.state.selectedLimit} onCloseLimitEditor={() => this.onCloseLimitEditor()} onSelectLimit={limit => this.onSelectLimit(limit)}/>} </Tab> - {selectedTab !== tabIds.GENERAL ? - <Button disabled={this.state.selectedLimit} className='add-limit-button' tabId={tabIds.ADD_LIMIT_BUTTON} btnType='link' iconName='plus'>{i18n('Add Limit')}</Button> : + { + selectedTab !== tabIds.GENERAL ? + <Button + disabled={this.state.selectedLimit || isReadOnlyMode} + className='add-limit-button' + tabId={tabIds.ADD_LIMIT_BUTTON} + btnType='link' + iconName='plus'> + {i18n('Add Limit')} + </Button> + : <div></div> // Render empty div to not break tabs } </Tabs> <GridSection className='license-model-modal-buttons entitlement-pools-editor-buttons'> - {!this.state.selectedLimit && <Button btnType='default' disabled={!this.props.isFormValid} onClick={() => this.submit()} type='reset'>{i18n('Save')}</Button>} + {!this.state.selectedLimit && + <Button btnType='default' disabled={!this.props.isFormValid || isReadOnlyMode} onClick={() => this.submit()} type='reset'> + {i18n('Save')} + </Button> + } <Button btnType={this.state.selectedLimit ? 'default' : 'outline'} onClick={() => this.props.onCancel()} type='reset'> {i18n('Cancel')} </Button> diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsLimits.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsLimits.js index ae53a753c0..1eb6eebff8 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsLimits.js +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsLimits.js @@ -44,7 +44,7 @@ const mapActionsToProps = (dispatch) => { data:{ msg: i18n(`Are you sure you want to delete ${limit.name}?`), confirmationButtonText: i18n('Delete'), - title: i18n('Warning'), + title: i18n('Delete'), onConfirmed: ()=> EntitlementPoolsActionHelper.deleteLimit(dispatch, {limit, entitlementPool: parent, licenseModelId, version}).then(() => selectedLimit === limit.id && onCloseLimitEditor() ) diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsListEditor.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsListEditor.js index 62c6663833..fa21109541 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsListEditor.js +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/entitlementPools/EntitlementPoolsListEditor.js @@ -43,8 +43,9 @@ const mapActionsToProps = (dispatch, {licenseModelId, version}) => { onDeleteEntitlementPool: entitlementPool => dispatch({ type: globalMoadlActions.GLOBAL_MODAL_WARNING, data:{ - msg: generateConfirmationMsg(entitlementPool), - title: i18n('Warning'), + msg: generateConfirmationMsg(entitlementPool), + confirmationButtonText: i18n('Delete'), + title: i18n('Delete'), onConfirmed: ()=>EntitlementPoolsActionHelper.deleteEntitlementPool(dispatch, { licenseModelId, entitlementPoolId: entitlementPool.id, diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupListEditor.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupListEditor.js index 83473a30bb..fc892387c6 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupListEditor.js +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupListEditor.js @@ -44,7 +44,8 @@ const mapActionsToProps = (dispatch, {licenseModelId}) => { type: globalMoadlActions.GLOBAL_MODAL_WARNING, data:{ msg: generateConfirmationMsg(featureGroup), - title: i18n('Warning'), + confirmationButtonText: i18n('Delete'), + title: i18n('Delete'), onConfirmed: ()=>FeatureGroupsActionHelper.deleteFeatureGroup(dispatch, {featureGroupId: featureGroup.id, licenseModelId, version}) } }), diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementListEditor.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementListEditor.js index 72a99e26ce..92c2550c1c 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementListEditor.js +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseAgreement/LicenseAgreementListEditor.js @@ -45,7 +45,8 @@ const mapActionsToProps = (dispatch, {licenseModelId}) => { type: globalMoadlActions.GLOBAL_MODAL_WARNING, data:{ msg: i18n(`Are you sure you want to delete "${licenseAgreement.name}"?`), - title: i18n('Warning'), + confirmationButtonText: i18n('Delete'), + title: i18n('Delete'), onConfirmed: ()=>LicenseAgreementActionHelper.deleteLicenseAgreement(dispatch, {licenseModelId, licenseAgreementId: licenseAgreement.id, version}) } }) diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx index 647e205cb5..70fb43ee88 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsEditorView.jsx @@ -269,7 +269,8 @@ class LicenseKeyGroupsEditorView extends React.Component { limitsList={limitsList.filter(item => item.type === limitType.SERVICE_PROVIDER)} selectedLimit={this.state.selectedLimit} onCloseLimitEditor={() => this.onCloseLimitEditor()} - onSelectLimit={limit => this.onSelectLimit(limit)}/>} + onSelectLimit={limit => this.onSelectLimit(limit)} + isReadOnlyMode={isReadOnlyMode} />} </Tab> <Tab tabId={tabIds.VENDOR_LIMITS} disabled={isTabsDisabled} data-test-id='general-tab' title={i18n('Vendor Limits')}> {selectedTab === tabIds.VENDOR_LIMITS && @@ -278,16 +279,29 @@ class LicenseKeyGroupsEditorView extends React.Component { limitsList={limitsList.filter(item => item.type === limitType.VENDOR)} selectedLimit={this.state.selectedLimit} onCloseLimitEditor={() => this.onCloseLimitEditor()} - onSelectLimit={limit => this.onSelectLimit(limit)}/>} + onSelectLimit={limit => this.onSelectLimit(limit)} + isReadOnlyMode={isReadOnlyMode} />} </Tab> {selectedTab !== tabIds.GENERAL ? - <Button disabled={this.state.selectedLimit} className='add-limit-button' tabId={tabIds.ADD_LIMIT_BUTTON} btnType='link' iconName='plus'>{i18n('Add Limit')}</Button> : + <Button + className='add-limit-button' + tabId={tabIds.ADD_LIMIT_BUTTON} + btnType='link' + iconName='plus' + disabled={this.state.selectedLimit || isReadOnlyMode}> + {i18n('Add Limit')} + </Button> + : <div></div> // Render empty div to not break tabs } </Tabs> <GridSection className='license-model-modal-buttons license-key-group-editor-buttons'> - {!this.state.selectedLimit && <Button btnType='default' disabled={!this.props.isFormValid} onClick={() => this.submit()} type='reset'>{i18n('Save')}</Button>} + {!this.state.selectedLimit && + <Button btnType='default' disabled={!this.props.isFormValid || isReadOnlyMode} onClick={() => this.submit()} type='reset'> + {i18n('Save')} + </Button> + } <Button btnType={this.state.selectedLimit ? 'default' : 'outline'} onClick={() => this.props.onCancel()} type='reset'> {i18n('Cancel')} </Button> diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsLimits.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsLimits.js index 7745a12fec..0e20a6a486 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsLimits.js +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsLimits.js @@ -45,7 +45,7 @@ const mapActionsToProps = (dispatch) => { data:{ msg: i18n(`Are you sure you want to delete ${limit.name}?`), confirmationButtonText: i18n('Delete'), - title: i18n('Warning'), + title: i18n('Delete'), onConfirmed: ()=> LicenseKeyGroupsActionHelper.deleteLimit(dispatch, {limit, licenseKeyGroup: parent, licenseModelId, version}).then(() => selectedLimit === limit.id && onCloseLimitEditor() ) diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsListEditor.js b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsListEditor.js index a8cf1eb0a1..c1d937394a 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsListEditor.js +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/licenseKeyGroups/LicenseKeyGroupsListEditor.js @@ -42,8 +42,9 @@ const mapActionsToProps = (dispatch, {licenseModelId, version}) => { onDeleteLicenseKeyGroupClick: licenseKeyGroup => dispatch({ type: globalMoadlActions.GLOBAL_MODAL_WARNING, data:{ - msg: generateConfirmationMsg(licenseKeyGroup), - title: i18n('Warning'), + msg: generateConfirmationMsg(licenseKeyGroup), + confirmationButtonText: i18n('Delete'), + title: i18n('Delete'), onConfirmed: ()=>LicenseKeyGroupsActionHelper.deleteLicenseKeyGroup(dispatch, {licenseModelId, licenseKeyGroupId:licenseKeyGroup.id, version}) } }) diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx index d4b7e5c898..110e5137e1 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/LimitEditor.jsx @@ -179,7 +179,7 @@ class LimitEditor extends React.Component { </GridItem> </GridSection> <GridSection className='limit-editor-buttons'> - <Button btnType='outline' disabled={!isFormValid} onClick={() => this.submit()} type='reset'>{i18n('Save')}</Button> + <Button btnType='outline' disabled={!isFormValid || isReadOnlyMode} onClick={() => this.submit()} type='reset'>{i18n('Save')}</Button> <Button btnType='outline' color='gray' onClick={onCancel} type='reset'>{i18n('Cancel')}</Button> </GridSection> </Form> diff --git a/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/Limits.jsx b/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/Limits.jsx index b144f63968..4841d0335c 100644 --- a/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/Limits.jsx +++ b/openecomp-ui/src/sdc-app/onboarding/licenseModel/limits/Limits.jsx @@ -61,10 +61,9 @@ class Limits extends React.Component { } return ( <div className='license-model-limits-view'> - <ListEditorView - isReadOnlyMode={isReadOnlyMode}> + <ListEditorView isReadOnlyMode={isReadOnlyMode}> {this.props.selectedLimit === NEW_LIMIT_TEMP_ID && limitEditor.data && - <LimitEditor limitsNames={limitsNames} onCancel={onCloseLimitEditor} onSubmit={ () => this.submit()}/> + <LimitEditor limitsNames={limitsNames} onCancel={onCloseLimitEditor} onSubmit={ () => this.submit()} isReadOnlyMode={isReadOnlyMode}/> } {limitsList.length === 0 && !limitEditor.data && <div className='no-limits-text'>{i18n('There are no limits')}</div>} {limitsList.map(limit => @@ -75,7 +74,13 @@ class Limits extends React.Component { clickable={!selectedLimit} isReadOnlyMode={isReadOnlyMode} limit={limit}/> - {limit.id === selectedLimit && limitEditor.data && <LimitEditor limitsNames={limitsNames} onCancel={onCloseLimitEditor} onSubmit={ () => this.submit()}/>} + {limit.id === selectedLimit && limitEditor.data && + <LimitEditor + limitsNames={limitsNames} + onCancel={onCloseLimitEditor} + onSubmit={ () => this.submit()} + isReadOnlyMode={isReadOnlyMode} /> + } </div> )} </ListEditorView> diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentProcessesList.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentProcessesList.js index 826201162c..8c359db869 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentProcessesList.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/components/processes/SoftwareProductComponentProcessesList.js @@ -48,6 +48,8 @@ const mapActionsToProps = (dispatch, {componentId, softwareProductId}) => { type: modalActionTypes.GLOBAL_MODAL_WARNING, data:{ msg: i18n(`Are you sure you want to delete "${process.name}"?`), + confirmationButtonText: i18n('Delete'), + title: i18n('Delete'), onConfirmed: ()=> SoftwareProductComponentProcessesActionHelper.deleteProcess(dispatch, {process, softwareProductId, version, componentId}) } diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcesses.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcesses.js index afd6331324..c70452919b 100644 --- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcesses.js +++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/processes/SoftwareProductProcesses.js @@ -43,6 +43,8 @@ const mapActionsToProps = (dispatch, {softwareProductId}) => { type: modalActionTypes.GLOBAL_MODAL_WARNING, data:{ msg: i18n(`Are you sure you want to delete "${process.name}"?`), + confirmationButtonText: i18n('Delete'), + title: i18n('Delete'), onConfirmed: ()=> SoftwareProductProcessesActionHelper.deleteProcess(dispatch, {process, softwareProductId, version}) } @@ -85,7 +85,7 @@ <extentreports.version>3.0.3</extentreports.version> <!-- parser--> - <sdc-tosca-parser.version>1.1.34</sdc-tosca-parser.version> + <sdc-tosca-parser.version>1.1.32</sdc-tosca-parser.version> <!--JaCoCO --> <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin> @@ -408,7 +408,7 @@ <artifact-generator-api.version>1710.0.0</artifact-generator-api.version> <artifact-generator-core.version>1710.0.0</artifact-generator-core.version> <dox-common-lib.version>1710.0.0</dox-common-lib.version> - <sdc-tosca-parser.version>1.1.34</sdc-tosca-parser.version> + <sdc-tosca-parser.version>1.1.32</sdc-tosca-parser.version> </properties> </profile> diff --git a/sdc-os-chef/scripts/docker_run.sh b/sdc-os-chef/scripts/docker_run.sh index 3b68bb9afb..963b2fcf14 100755 --- a/sdc-os-chef/scripts/docker_run.sh +++ b/sdc-os-chef/scripts/docker_run.sh @@ -17,16 +17,16 @@ function cleanup { function dir_perms { - mkdir -p /data/logs/BE/ASDC/ASDC-BE - mkdir -p /data/logs/FE/ASDC/ASDC-FE + mkdir -p /data/logs/BE/SDC/SDC-BE + mkdir -p /data/logs/FE/SDC/SDC-FE chmod -R 777 /data/logs } function monitor_docker { echo monitor $1 Docker - -TIME_OUT=180 +sleep 5 +TIME_OUT=600 INTERVAL=20 TIME=0 while [ "$TIME" -lt "$TIME_OUT" ]; do diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/recipes/import_Normatives.rb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/recipes/import_Normatives.rb index 58a3ef70af..ba72dab34b 100644 --- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/recipes/import_Normatives.rb +++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/recipes/import_Normatives.rb @@ -11,7 +11,7 @@ bash "import-normatives" do cd normatives/scripts/import/tosca/ /bin/chmod +x importNormativeAll.py # add --debug=true to the importNormativeAll.py arguments to enable debug - python importNormativeAll.py --debug=true -i localhost > /var/lib/jetty/logs/importNormativeAll.log + python importNormativeAll.py -i localhost > /var/lib/jetty/logs/importNormativeAll.log EOH end diff --git a/sdc-os-chef/sdc-backend/startup.sh b/sdc-os-chef/sdc-backend/startup.sh index 87f4ae674d..8e5926cdc4 100644 --- a/sdc-os-chef/sdc-backend/startup.sh +++ b/sdc-os-chef/sdc-backend/startup.sh @@ -37,7 +37,9 @@ else chef-solo -c normatives.rb fi +echo "###### DOCKER STARTED #####" + while true; do sleep 2; done -echo "###### DOCKER STARTED #####" + diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/Huawei_vSPGW.csar b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/Huawei_vSPGW.csar Binary files differnew file mode 100644 index 0000000000..8beae6e74a --- /dev/null +++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/Huawei_vSPGW.csar diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/ZteEpcSpgwVf-csar.csar b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/ZteEpcSpgwVf-csar.csar Binary files differnew file mode 100644 index 0000000000..0eacd74655 --- /dev/null +++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/ZteEpcSpgwVf-csar.csar diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/cscf_si_fixed.csar b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/cscf_si_fixed.csar Binary files differnew file mode 100644 index 0000000000..bc8397a86e --- /dev/null +++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/cscf_si_fixed.csar diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/ntas.csar b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/ntas.csar Binary files differnew file mode 100644 index 0000000000..6b6f7c4d8c --- /dev/null +++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/ntas.csar diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/resource-ZteEpcMmeVf-csar_fix.csar b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/resource-ZteEpcMmeVf-csar_fix.csar Binary files differnew file mode 100644 index 0000000000..bf0e775102 --- /dev/null +++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/resource-ZteEpcMmeVf-csar_fix.csar diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vCSCF_v3.0.csar b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vCSCF_v3.0.csar Binary files differnew file mode 100644 index 0000000000..1c52cca12d --- /dev/null +++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/Files/VNFs/vCSCF_v3.0.csar diff --git a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb index 690559a74d..c4323c233f 100644 --- a/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb +++ b/sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/recipes/sanityTests_3_sanity_execution.rb @@ -6,7 +6,7 @@ cwd "#{tests_base}" code <<-EOH cd "#{tests_base}" jar_file=`ls test-apis*-jar-with-dependencies.jar` - nohup ./startTest.sh $jar_file #{ci_test_suite} & + ./startTest.sh $jar_file #{ci_test_suite} > #{tests_base}/target/startTest.out 2>&1 echo "return code from startTest.sh = [$?]" EOH timeout 72000 diff --git a/sdc-os-chef/sdc-sanity/startup.sh b/sdc-os-chef/sdc-sanity/startup.sh index d4316c383f..e4edfc67e6 100644 --- a/sdc-os-chef/sdc-sanity/startup.sh +++ b/sdc-os-chef/sdc-sanity/startup.sh @@ -14,7 +14,7 @@ rc=$? # exit 0 #fi -while true; do sleep 2; done +#while true; do sleep 2; done ##/docker-entrypoint.sh diff --git a/test-apis-ci/src/main/resources/ci/testSuites/onap.xml b/test-apis-ci/src/main/resources/ci/testSuites/onap.xml index c075f10b11..1d5bc4b1bf 100644 --- a/test-apis-ci/src/main/resources/ci/testSuites/onap.xml +++ b/test-apis-ci/src/main/resources/ci/testSuites/onap.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> -<suite name="externalApis" configfailurepolicy="continue" verbose="2" parallel="methods" thread-count="2" data-provider-thread-count="2"> +<suite name="externalApis" configfailurepolicy="continue" verbose="2" parallel="methods" thread-count="1" data-provider-thread-count="1"> <test name="ExternalApis"> <classes> |