Refresh option in validation result page
[sdc.git] / openecomp-ui / test-utils / factories / softwareProduct / SoftwareProductValidationResultsFactory.js
1 /**
2  * Copyright (c) 2019 Vodafone Group
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 import { Factory } from 'rosie';
17
18 export const VSPTestResultKeysFactory = new Factory().attrs({
19      testResultKeys: {
20             requestId: "1",
21             endPoints: ["vtp"]
22         }
23 })
24 export const VSPTestResultsFailureFactory = new Factory().attrs({
25
26     vspTestResults: [
27         {
28             scenario: 'certification',
29             description: 'Other Certifications',
30             testCaseName: 'certification.certificationtests.certquery',
31             testSuiteName: 'certificationtests',
32             executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
33             parameters: {
34                 vspId: 'uuidval',
35                 vspVersion: 'ver',
36                 other: 'values'
37             },
38             results: {
39                 UnknownObject: {
40                     someKeyanotherobject2: 'someValue',
41                     someKey1: 'someValue',
42                     someKey2: 'someValue',
43                     someKey3: 'someValue',
44                     someKey4: 'someValue',
45                     someKey5: 'someValue',
46                     someKey21: 'someValue11',
47                     someKey111: 'someValue11',
48                     someKey222: 'someValue'
49                 },
50                 StringResult: 'String Value of Result',
51                 EmptyObject: {},
52                 EmptyArray: []
53             },
54             status: 'COMPLETED',
55             startTime: '2019-02-19T11:17:05.670',
56             endTime: '2019-02-19T11:17:05.683'
57         },
58         {
59             scenario: 'compliance',
60             testCaseName: 'compliance.compliancetests.sriov',
61             description: 'Allow_SR-IOV',
62             testSuiteName: 'compliancetests',
63             executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
64             parameters: {
65                 vspId: 'uuidval',
66                 vspVersion: 'ver',
67                 other: 'values'
68             },
69             results: {
70                 errors: [
71                     {
72                         attribute: '',
73                         reason: 'Record Not Found',
74                         advice:
75                             'User must query with (vspId, vspVersion) values for a certifications record that is present in the Repository',
76                         code: 40
77                     },
78                     {
79                         attribute: '',
80                         reason: 'Record Not Found',
81                         advice:
82                             'User must query with (vspId, vspVersion) values for a certifications record that is present in the Repository',
83                         code: 40
84                     }
85                 ]
86             },
87             status: 'FAILED',
88             startTime: '2019-02-19T11:17:05.670',
89             endTime: '2019-02-19T11:17:05.683'
90         },
91         {
92             scenario: 'compliance',
93             testCaseName: ' compliance.compliancetests.computeflavours',
94             description: 'Allow  SR-IOV ',
95             testSuiteName: 'compliancetests',
96             executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
97             parameters: {
98                 vspId: 'uuidval',
99                 vspVersion: 'ver',
100                 other: 'values'
101             },
102             results: {},
103             status: 'COMPLETED',
104             startTime: '2019-02-19T11:17:05.670',
105             endTime: '2019-02-19T11:17:05.683'
106         },
107         {
108             code: '500',
109             message: 'VTP Test(s) could not be completed',
110             httpStatus: 500
111         }
112     ]
113 });
114
115 export const VSPTestResultsSuccessFactory = new Factory().attrs({
116     vspTestResults: [
117       {
118         "scenario": "onap-dublin",
119         "testCaseName": "vsp-package",
120         "testSuiteName": "sdc.onboarding",
121         "executionId": "onap-dublin",
122         "parameters": {
123           "vsp-id": "0cf7923588df4877989d8c01243e1e69",
124           "host-password": "demo123456!",
125           "vsp-version": "b19f1f74b5874127bb7778a84eadd99b",
126           "host-url": "http://192.168.209.129:30280",
127           "host-username": "cs0008"
128         },
129         "results": [
130           {}
131         ],
132         "status": "completed",
133         "startTime": "2019-09-24T08:35:09.000",
134         "endTime": "2019-09-24T08:35:10.000"
135       },
136       {
137         "scenario": "onap-dublin",
138         "testCaseName": "customer-create",
139         "testSuiteName": "aai",
140         "executionId": "onap-dublin",
141         "parameters": {
142           "host-password": "AAI",
143           "subscriber-name": "ovp-uygCLjl9",
144           "customer-name": "ovp-uygCLjl9",
145           "host-url": "https://192.168.209.129:30233",
146           "host-username": "AAI"
147         },
148         "results": [
149           {}
150         ],
151         "status": "in-progress",
152         "startTime": "2019-09-24T08:34:33.000",
153         "endTime": "2019-09-24T08:34:33.000"
154       },
155       {
156         "scenario": "onap-dublin",
157         "testCaseName": "vnf-tosca-provision",
158         "testSuiteName": "vnf-validation",
159         "executionId": "uygCLjl9-1569314036837",
160         "parameters": {
161           "mode": "validate",
162           "vsp": "/tmp/data/vtp-tmp-files/1569313993969.csar",
163           "vnfm-driver": "gvnfmdriver",
164           "config-json": "/opt/oclip/conf/vnf-tosca-provision.json",
165           "vnf-vendor-name": "VM",
166           "ns-csar": "/tmp/data/vtp-tmp-files/1569314002901.csar",
167           "onap-objects": "{}",
168           "timeout": "600000",
169           "vnf-name": "SWITCH",
170           "vnf-csar": "/tmp/data/vtp-tmp-files/1569313997224.csar"
171         },
172         "results": {
173           "error": "1::0x6001::Command vnf-tosca-provision failed to execute, "
174         },
175         "status": "failed",
176         "startTime": "2019-09-24T08:33:56.000",
177         "endTime": "2019-09-24T08:35:13.000"
178       },
179       {
180         "scenario": "onap-dublin",
181         "testCaseName": "vlm-submit",
182         "testSuiteName": "sdc.onboarding",
183         "executionId": "onap-dublin",
184         "parameters": {
185           "vlm-version": "115d4d29994a41a38c2ed2bf75c93f5d",
186           "vlm-id": "7fbb14e88d9e45c48021e96f35970419",
187           "host-password": "demo123456!",
188           "host-url": "http://192.168.209.129:30280",
189           "host-username": "cs0008"
190         },
191         "results": [
192           {}
193         ],
194         "status": "completed",
195         "startTime": "2019-09-24T08:34:13.000",
196         "endTime": "2019-09-24T08:34:13.000"
197       },
198       {
199         "scenario": "onap-dublin",
200         "testCaseName": "vsp-validate",
201         "testSuiteName": "sdc.onboarding",
202         "executionId": "onap-dublin",
203         "parameters": {
204           "vsp-id": "0cf7923588df4877989d8c01243e1e69",
205           "host-password": "demo123456!",
206           "vsp-version": "b19f1f74b5874127bb7778a84eadd99b",
207           "host-url": "http://192.168.209.129:30280",
208           "host-username": "cs0008"
209         },
210         "results": {
211           "errors": {},
212           "status": "Success"
213         },
214         "status": "completed",
215         "startTime": "2019-09-24T08:34:58.000",
216         "endTime": "2019-09-24T08:34:59.000"
217       },
218       {
219         "scenario": "onap-dublin",
220         "testCaseName": "vlm-feature-group-create",
221         "testSuiteName": "sdc.onboarding",
222         "executionId": "onap-dublin",
223         "parameters": {
224           "vlm-entitle-pool-id": "fa33494286004b4ebec6703da43f92a5",
225           "vlm-id": "7fbb14e88d9e45c48021e96f35970419",
226           "vlm-version": "115d4d29994a41a38c2ed2bf75c93f5d",
227           "part-number": "1000VM00",
228           "host-password": "demo123456!",
229           "vlm-key-group-id": "ea95efa4ccb149d49640166972a4e8f8",
230           "name": "VM-uygCLjl9 Feature group",
231           "host-url": "http://192.168.209.129:30280",
232           "host-username": "cs0008"
233         },
234         "results": {
235           "id": "4dc4f39e28ea488b946aedb0f74c436a"
236         },
237         "status": "completed",
238         "startTime": "2019-09-24T08:34:08.000",
239         "endTime": "2019-09-24T08:34:08.000"
240       } ,
241       {
242         "scenario": "onap-dublin",
243         "testCaseName": "subscription-list",
244         "testSuiteName": "aai",
245         "executionId": "onap-dublin",
246         "parameters": {
247           "host-password": "AAI",
248           "customer-name": "ovp-uygCLjl9",
249           "host-url": "https://192.168.209.129:30233",
250           "host-username": "AAI"
251         },
252         "results": [
253           {
254             "resource-version": "1569314083390",
255             "service-type": "tosca_vnf_validation-uygCLjl9"
256           }
257         ],
258         "status": "completed",
259         "startTime": "2019-09-24T08:34:45.000",
260         "endTime": "2019-09-24T08:34:46.000"
261       }
262     ]
263 });