summaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test-utils/factories
diff options
context:
space:
mode:
authoratulpurohit <atul.purohit1@vodafone.com>2019-11-05 14:31:56 +0530
committerOfir Sonsino <ofir.sonsino@intl.att.com>2020-01-13 09:33:40 +0000
commit8b346842194edb8a9e8c4cd2764ae8ebbce988f0 (patch)
tree3ea20981d4cdd5858c4a99eb49c0370503c3c6cb /openecomp-ui/test-utils/factories
parent0ef638b2eb44c9f473e5ad8bea119845d968fde7 (diff)
Refresh option in validation result page
Issue-ID: SDC-2585 Co-authored-by: nikhil.soni@vodafone.com Signed-off-by: atulpurohit <atul.purohit1@vodafone.com> Change-Id: I78f1385d219837c300cb33aff82b7459f137babb Signed-off-by: atulpurohit <atul.purohit1@vodafone.com>
Diffstat (limited to 'openecomp-ui/test-utils/factories')
-rw-r--r--openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductValidationFactory.js170
-rw-r--r--openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductValidationResultsFactory.js278
2 files changed, 317 insertions, 131 deletions
diff --git a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductValidationFactory.js b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductValidationFactory.js
index c763e9d3e7..336c435b45 100644
--- a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductValidationFactory.js
+++ b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductValidationFactory.js
@@ -18,7 +18,8 @@ import { Factory } from 'rosie';
export const VSPComplianceCheckedFactory = new Factory().attrs({
complianceChecked: [
'compliance.compliancetests.sriov',
- 'compliance.compliancetests.computeflavors'
+ 'compliance.compliancetests.computeflavors',
+ 'vnf-validation'
]
});
@@ -73,6 +74,20 @@ export const VSPGeneralInfoFactory = new Factory().attrs({
isValid: true,
errorText: ''
}
+ },
+ 'vnf-validation': {
+ 'vspId': {
+ isValid: true,
+ errorText: ''
+ },
+ 'host-password': {
+ isValid: true,
+ errorText: ''
+ },
+ 'vsp-csar': {
+ isValid: true,
+ errorText: ''
+ }
}
}
});
@@ -112,10 +127,43 @@ export const VSPTestsRequestFactory = new Factory().attrs({
testCaseName: 'certification.certificationtests.certquery',
testSuiteName: 'certificationtests',
endpoint: 'repository'
+ },
+ 'vnf-validation': {
+ parameters: {
+ 'vspId': 'abc',
+ 'host-password': '123',
+ 'vsp-csar': 'vsp.csar',
+ },
+ testCaseName: 'vnf-validation',
+ testSuiteName: 'vnf-validation',
+ scenario: 'onap-dublin',
+ endpoint: 'vtp'
}
}
});
+export const VSPTestRequestFactory = new Factory().attrs({
+ vspTestRequest: [
+ {
+ 'parameters': {
+ 'config-json': '/opt/oclip/conf/vnf-tosca-provision.json',
+ 'vsp': '',
+ 'vnf-csar': 'file://1574080373688.csar',
+ 'ns-csar': '',
+ 'vnfm-driver': 'gvnfmdriver ',
+ 'onap-objects': '{}',
+ 'mode': 'provision ',
+ 'vnf-name': 'ABC',
+ 'vnf-vendor-name': 'ABC',
+ 'timeout': '60000'
+ },
+ 'scenario': 'onap-dublin',
+ 'testCaseName': 'vnf-tosca-provision',
+ 'testSuiteName': 'vnf-validation',
+ 'endpoint': 'vtp'
+ }
+ ]
+ });
export const VSPTestsMapFactory = new Factory().attrs({
vspTestsMap: {
'compliance.compliancetests.sriov': {
@@ -288,7 +336,42 @@ export const VSPTestsMapFactory = new Factory().attrs({
testCaseName: 'certification.certificationtests.certquery',
testSuiteName: 'certificationtests',
scenario: 'certification'
- }
+ },
+ 'vnf-validation': {
+ title: 'vnf-validation',
+ parameters: [
+ {
+ name: 'vspId',
+ description: 'VSP ID',
+ type: 'text',
+ defaultValue: '$vspid',
+ isOptional: true,
+ metadata: {
+ maxLength: 36,
+ minLength: 1,
+ disabled: true
+ }
+ },
+ {
+ name: 'vsp-csar',
+ description: 'Vsp Csar',
+ type: 'binary',
+ defaultValue: '',
+ isOptional: true
+ },
+ {
+ name: 'host-password',
+ description: 'host-password',
+ type: 'binary',
+ defaultValue: '',
+ isOptional: true
+ }
+ ],
+ endpoint: 'vtp',
+ testCaseName: 'vnf-validation',
+ testSuiteName: 'vnf-validation',
+ scenario: 'onap-dublin'
+ }
}
});
@@ -493,6 +576,89 @@ export const VSPChecksFactory = new Factory().attrs({
]
}
]
+ },
+ {
+ 'name': 'onap-dublin',
+ 'children': [
+ {
+ 'name': 'vnf-validation',
+ 'tests': [
+ {
+ 'scenario': 'onap-dublin',
+ 'testCaseName': 'vnf-tosca-provision',
+ 'testSuiteName': 'vnf-validation',
+ 'description': 'ONAP TOSCA VNF validation',
+ 'author': 'ONAP VTP Team kanagaraj.manickam@huawei.com',
+ 'inputs': [
+ {
+ 'name': 'config-json',
+ 'description': 'Configuration file path',
+ 'type': 'string',
+ 'defaultValue': '$s{env:OPEN_CLI_HOME}/conf/vnf-tosca-provision.json',
+ 'isOptional': false
+ },
+ {
+ 'name': 'vsp',
+ 'description': 'Path to the ONAP vendor service product (VSP) for the VNF to provision',
+ 'type': 'binary',
+ 'isOptional': false
+ },
+ {
+ 'name': 'vnf-csar',
+ 'description': 'Path to the TOSCA CSAR for the VNF to provision',
+ 'type': 'binary',
+ 'isOptional': false
+ },
+ {
+ 'name': 'ns-csar',
+ 'description': 'Path to the TOSCA CSAR for the NS service to provision',
+ 'type': 'binary',
+ 'isOptional': true
+ },
+ {
+ 'name': 'vnfm-driver',
+ 'description': 'VNFM driver to use. One of gvnfmdriver or hwvnfmdriver',
+ 'type': 'string',
+ 'isOptional': false
+ },
+ {
+ 'name': 'onap-objects',
+ 'description': 'Existing ONAP object ids to use instead of creating them while running this task',
+ 'type': 'json',
+ 'isOptional': true
+ },
+ {
+ 'name': 'mode',
+ 'description': 'setup or standup or cleanup or provision or validate',
+ 'type': 'string',
+ 'defaultValue': 'checkup',
+ 'isOptional': true
+ },
+ {
+ 'name': 'vnf-name',
+ 'description': 'VNF Name',
+ 'type': 'string',
+ 'isOptional': false
+ },
+ {
+ 'name': 'vnf-vendor-name',
+ 'description': 'VNF Vendor Name',
+ 'type': 'string',
+ 'isOptional': false
+ },
+ {
+ 'name': 'timeout',
+ 'description': 'timeout for command to complete the given task in milliseconds',
+ 'type': 'string',
+ 'defaultValue': '60000',
+ 'isOptional': true
+ }
+ ],
+ 'endpoint': 'vtp'
+ }
+ ]
+ }
+ ]
}
]
});
diff --git a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductValidationResultsFactory.js b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductValidationResultsFactory.js
index a4a069e355..d204753b83 100644
--- a/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductValidationResultsFactory.js
+++ b/openecomp-ui/test-utils/factories/softwareProduct/SoftwareProductValidationResultsFactory.js
@@ -15,7 +15,14 @@
*/
import { Factory } from 'rosie';
+export const VSPTestResultKeysFactory = new Factory().attrs({
+ testResultKeys: {
+ requestId: "1",
+ endPoints: ["vtp"]
+ }
+})
export const VSPTestResultsFailureFactory = new Factory().attrs({
+
vspTestResults: [
{
scenario: 'certification',
@@ -107,137 +114,150 @@ export const VSPTestResultsFailureFactory = new Factory().attrs({
export const VSPTestResultsSuccessFactory = new Factory().attrs({
vspTestResults: [
- {
- scenario: 'certification',
- description: 'Other Certifications',
- testCaseName: 'certification.certificationtests.certquery',
- testSuiteName: 'certificationtests',
- executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
- parameters: {
- vspId: 'uuidval',
- vspVersion: 'ver',
- other: 'values'
- },
- results: {
- testResults: {
- complianceTests: [
- {
- testName: 'Compute Flavors',
- testResult: 'Pass',
- notes:
- 'Diagnostic: test performed against GSMA NFVI Abstraction and Profiling Version 0.1 profiles.'
- },
- {
- testName: 'SR-IOV',
- testResult: 'Fail',
- notes:
- 'Diagnostic: SR-IOV found in VNF Template. User advice: VNF binary and VNF Template must be modified to not require SR-IOV.'
- },
- {
- testName: 'Heat',
- testResult: 'Pass',
- notes: ''
- },
- {
- testName: 'TOSCA',
- testResult: 'Pass',
- notes:
- 'Diagnostic: test performed for ETSI GS NFV-SOL001v0.10.0.'
- }
- ],
- validationTests: [
- {
- testName: 'OpenStack',
- testResult: 'Pass',
- notes:
- 'Diagnostic: test performed for OpenStack Rocky.'
- },
- {
- testName: 'VMware',
- testResult: 'Fail',
- notes:
- 'Diagnostic: VMware compatible template not found. User advice: add a VMware compatible template to the VSP.'
- },
- {
- testName: 'Kubernetes',
- testResult: 'Fail',
- notes:
- 'Diagnostic: Kubernetes compatible template not found. User advice: add a Kubernetes compatible template, such as Helm Chart, to the VSP.'
- }
- ],
- performanceTests: [
- {
- testName: 'Max Throughput',
- testResult: 'Pass',
- notes: ''
- },
- {
- testName: 'Latency',
- testResult: 'Fail',
- notes:
- 'Diagnostic: maximum latency threshold of 20ms signalling response time exceededUser advice: consider increasing VDU compute resource.'
- }
- ]
- }
- },
-
- status: 'COMPLETED',
- startTime: '2019-02-19T11:17:05.670',
- endTime: '2019-02-19T11:17:05.683'
+ {
+ "scenario": "onap-dublin",
+ "testCaseName": "vsp-package",
+ "testSuiteName": "sdc.onboarding",
+ "executionId": "onap-dublin",
+ "parameters": {
+ "vsp-id": "0cf7923588df4877989d8c01243e1e69",
+ "host-password": "demo123456!",
+ "vsp-version": "b19f1f74b5874127bb7778a84eadd99b",
+ "host-url": "http://192.168.209.129:30280",
+ "host-username": "cs0008"
},
- {
- scenario: 'compliance',
- testCaseName: 'compliance.compliancetests.sriov',
- description: 'Allow_SR-IOV',
- testSuiteName: 'compliancetests',
- executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
- parameters: {
- vspId: 'uuidval',
- vspVersion: 'ver',
- other: 'values'
- },
- results: {
- errors: [
- {
- attribute: '',
- reason: 'Record Not Found',
- advice:
- 'User must query with (vspId, vspVersion) values for a certifications record that is present in the Repository',
- code: 40
- },
- {
- attribute: '',
- reason: 'Record Not Found',
- advice:
- 'User must query with (vspId, vspVersion) values for a certifications record that is present in the Repository',
- code: 40
- }
- ]
- },
- status: 'FAILED',
- startTime: '2019-02-19T11:17:05.670',
- endTime: '2019-02-19T11:17:05.683'
+ "results": [
+ {}
+ ],
+ "status": "completed",
+ "startTime": "2019-09-24T08:35:09.000",
+ "endTime": "2019-09-24T08:35:10.000"
+ },
+ {
+ "scenario": "onap-dublin",
+ "testCaseName": "customer-create",
+ "testSuiteName": "aai",
+ "executionId": "onap-dublin",
+ "parameters": {
+ "host-password": "AAI",
+ "subscriber-name": "ovp-uygCLjl9",
+ "customer-name": "ovp-uygCLjl9",
+ "host-url": "https://192.168.209.129:30233",
+ "host-username": "AAI"
},
- {
- scenario: 'compliance',
- testCaseName: ' compliance.compliancetests.computeflavours',
- description: 'Allow SR-IOV ',
- testSuiteName: 'compliancetests',
- executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
- parameters: {
- vspId: 'uuidval',
- vspVersion: 'ver',
- other: 'values'
- },
- results: {},
- status: 'COMPLETED',
- startTime: '2019-02-19T11:17:05.670',
- endTime: '2019-02-19T11:17:05.683'
+ "results": [
+ {}
+ ],
+ "status": "in-progress",
+ "startTime": "2019-09-24T08:34:33.000",
+ "endTime": "2019-09-24T08:34:33.000"
+ },
+ {
+ "scenario": "onap-dublin",
+ "testCaseName": "vnf-tosca-provision",
+ "testSuiteName": "vnf-validation",
+ "executionId": "uygCLjl9-1569314036837",
+ "parameters": {
+ "mode": "validate",
+ "vsp": "/tmp/data/vtp-tmp-files/1569313993969.csar",
+ "vnfm-driver": "gvnfmdriver",
+ "config-json": "/opt/oclip/conf/vnf-tosca-provision.json",
+ "vnf-vendor-name": "VM",
+ "ns-csar": "/tmp/data/vtp-tmp-files/1569314002901.csar",
+ "onap-objects": "{}",
+ "timeout": "600000",
+ "vnf-name": "SWITCH",
+ "vnf-csar": "/tmp/data/vtp-tmp-files/1569313997224.csar"
},
- {
- code: '500',
- message: 'VTP Test(s) could not be completed',
- httpStatus: 500
- }
+ "results": {
+ "error": "1::0x6001::Command vnf-tosca-provision failed to execute, "
+ },
+ "status": "failed",
+ "startTime": "2019-09-24T08:33:56.000",
+ "endTime": "2019-09-24T08:35:13.000"
+ },
+ {
+ "scenario": "onap-dublin",
+ "testCaseName": "vlm-submit",
+ "testSuiteName": "sdc.onboarding",
+ "executionId": "onap-dublin",
+ "parameters": {
+ "vlm-version": "115d4d29994a41a38c2ed2bf75c93f5d",
+ "vlm-id": "7fbb14e88d9e45c48021e96f35970419",
+ "host-password": "demo123456!",
+ "host-url": "http://192.168.209.129:30280",
+ "host-username": "cs0008"
+ },
+ "results": [
+ {}
+ ],
+ "status": "completed",
+ "startTime": "2019-09-24T08:34:13.000",
+ "endTime": "2019-09-24T08:34:13.000"
+ },
+ {
+ "scenario": "onap-dublin",
+ "testCaseName": "vsp-validate",
+ "testSuiteName": "sdc.onboarding",
+ "executionId": "onap-dublin",
+ "parameters": {
+ "vsp-id": "0cf7923588df4877989d8c01243e1e69",
+ "host-password": "demo123456!",
+ "vsp-version": "b19f1f74b5874127bb7778a84eadd99b",
+ "host-url": "http://192.168.209.129:30280",
+ "host-username": "cs0008"
+ },
+ "results": {
+ "errors": {},
+ "status": "Success"
+ },
+ "status": "completed",
+ "startTime": "2019-09-24T08:34:58.000",
+ "endTime": "2019-09-24T08:34:59.000"
+ },
+ {
+ "scenario": "onap-dublin",
+ "testCaseName": "vlm-feature-group-create",
+ "testSuiteName": "sdc.onboarding",
+ "executionId": "onap-dublin",
+ "parameters": {
+ "vlm-entitle-pool-id": "fa33494286004b4ebec6703da43f92a5",
+ "vlm-id": "7fbb14e88d9e45c48021e96f35970419",
+ "vlm-version": "115d4d29994a41a38c2ed2bf75c93f5d",
+ "part-number": "1000VM00",
+ "host-password": "demo123456!",
+ "vlm-key-group-id": "ea95efa4ccb149d49640166972a4e8f8",
+ "name": "VM-uygCLjl9 Feature group",
+ "host-url": "http://192.168.209.129:30280",
+ "host-username": "cs0008"
+ },
+ "results": {
+ "id": "4dc4f39e28ea488b946aedb0f74c436a"
+ },
+ "status": "completed",
+ "startTime": "2019-09-24T08:34:08.000",
+ "endTime": "2019-09-24T08:34:08.000"
+ } ,
+ {
+ "scenario": "onap-dublin",
+ "testCaseName": "subscription-list",
+ "testSuiteName": "aai",
+ "executionId": "onap-dublin",
+ "parameters": {
+ "host-password": "AAI",
+ "customer-name": "ovp-uygCLjl9",
+ "host-url": "https://192.168.209.129:30233",
+ "host-username": "AAI"
+ },
+ "results": [
+ {
+ "resource-version": "1569314083390",
+ "service-type": "tosca_vnf_validation-uygCLjl9"
+ }
+ ],
+ "status": "completed",
+ "startTime": "2019-09-24T08:34:45.000",
+ "endTime": "2019-09-24T08:34:46.000"
+ }
]
});