summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation
diff options
context:
space:
mode:
authorVodafone <onap@vodafone.com>2019-04-05 15:49:06 +0530
committerOren Kleks <orenkle@amdocs.com>2019-04-10 06:41:37 +0000
commit18750938b1513ee32d4d68f0871ec90efdf3ddfd (patch)
treefae174b2b4d42cf5fa60312c78ced935c318cd25 /openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation
parentef0e8be1453e3959b38c9832e3e729e4e86a9e04 (diff)
VSP Compliance Check for Compute Flavor
Change-Id: I04768a20413393026606a3f5b200e959e37c1410 Issue-ID: SDC-2051 Co-authored-by: rahul.ghugikar@vodafone.com, soumyarup.paul@vodafone.com Signed-off-by: Vodafone <onap@vodafone.com>
Diffstat (limited to 'openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation')
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/SoftwareProductValidationActionHelper.js2
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/SoftwareProductValidationView.jsx24
-rw-r--r--openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/inputs/VspValidationInputsView.jsx4
3 files changed, 24 insertions, 6 deletions
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/SoftwareProductValidationActionHelper.js b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/SoftwareProductValidationActionHelper.js
index d19416a2aa..1ebb94b77c 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/SoftwareProductValidationActionHelper.js
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/SoftwareProductValidationActionHelper.js
@@ -32,7 +32,7 @@ function postVSPCertificationChecks(tests) {
function fetchVspChecks() {
const restPrefix = Configuration.get('restPrefix');
- return RestAPIUtil.get(`${restPrefix}/v1.0/externaltesting/testcasetree`);
+ return RestAPIUtil.fetch(`${restPrefix}/v1.0/externaltesting/testcasetree`);
}
const SoftwareProductValidationActionHelper = {
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/SoftwareProductValidationView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/SoftwareProductValidationView.jsx
index 8611c41937..a8ea3804b4 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/SoftwareProductValidationView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/SoftwareProductValidationView.jsx
@@ -210,7 +210,10 @@ class SoftwareProductValidation extends Component {
softwareProductValidation.vspChecks
);
}
- this.setState({ activeTab: tabsMapping.SETUP });
+ this.setState({
+ activeTab: tabsMapping.SETUP,
+ goToValidationInput: false
+ });
setActiveTab({ activeTab: tabsMapping.SETUP });
}
}
@@ -269,6 +272,20 @@ class SoftwareProductValidation extends Component {
}
}
+ fetchDefaultValue(value) {
+ let { softwareProductId, version } = this.props;
+ let versionName = parseFloat(version.name).toFixed(1),
+ versionNumber =
+ versionName > 1 ? (versionName - 1).toFixed(1) : versionName,
+ versionUUID = version.id;
+ value =
+ value === '$vspid'
+ ? softwareProductId
+ : value === '$vspPreviousVersion' ? versionNumber : value;
+ value = value === '$vspVersionUUID' ? versionUUID : value || '';
+ return value;
+ }
+
formTestsRequest(item, testsRequest) {
let { vspTestsMap } = this.props.softwareProductValidation;
testsRequest[item] = {
@@ -279,8 +296,9 @@ class SoftwareProductValidation extends Component {
endpoint: vspTestsMap[item]['endpoint']
};
vspTestsMap[item].parameters.forEach(parameter => {
- testsRequest[item].parameters[parameter.name] =
- parameter.defaultValue || '';
+ testsRequest[item].parameters[
+ parameter.name
+ ] = this.fetchDefaultValue(parameter.defaultValue);
});
return testsRequest;
}
diff --git a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/inputs/VspValidationInputsView.jsx b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/inputs/VspValidationInputsView.jsx
index c2990a2058..26a6003b5a 100644
--- a/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/inputs/VspValidationInputsView.jsx
+++ b/openecomp-ui/src/sdc-app/onboarding/softwareProduct/validation/inputs/VspValidationInputsView.jsx
@@ -284,8 +284,8 @@ class VspValidationInputs extends Component {
size="default"
data-test-id="proceed-to-validation-results-btn"
disabled={false}
- className="proceed-to-validation-monitor-btn"
- onClick={() => this.performVSPTests()}>
+ type="submit"
+ className="proceed-to-validation-monitor-btn">
{i18n('Submit')}
</Button>
</Form>