VSP Compliance Check for Compute Flavor
[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 VSPTestResultsFailureFactory = new Factory().attrs({
19     vspTestResults: [
20         {
21             scenario: 'certification',
22             description: 'Other Certifications',
23             testCaseName: 'certification.certificationtests.certquery',
24             testSuiteName: 'certificationtests',
25             executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
26             parameters: {
27                 vspId: 'uuidval',
28                 vspVersion: 'ver',
29                 other: 'values'
30             },
31             results: {
32                 UnknownObject: {
33                     someKeyanotherobject2: 'someValue',
34                     someKey1: 'someValue',
35                     someKey2: 'someValue',
36                     someKey3: 'someValue',
37                     someKey4: 'someValue',
38                     someKey5: 'someValue',
39                     someKey21: 'someValue11',
40                     someKey111: 'someValue11',
41                     someKey222: 'someValue'
42                 },
43                 StringResult: 'String Value of Result',
44                 EmptyObject: {},
45                 EmptyArray: []
46             },
47             status: 'COMPLETED',
48             startTime: '2019-02-19T11:17:05.670',
49             endTime: '2019-02-19T11:17:05.683'
50         },
51         {
52             scenario: 'compliance',
53             testCaseName: 'compliance.compliancetests.sriov',
54             description: 'Allow_SR-IOV',
55             testSuiteName: 'compliancetests',
56             executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
57             parameters: {
58                 vspId: 'uuidval',
59                 vspVersion: 'ver',
60                 other: 'values'
61             },
62             results: {
63                 errors: [
64                     {
65                         attribute: '',
66                         reason: 'Record Not Found',
67                         advice:
68                             'User must query with (vspId, vspVersion) values for a certifications record that is present in the Repository',
69                         code: 40
70                     },
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             },
80             status: 'FAILED',
81             startTime: '2019-02-19T11:17:05.670',
82             endTime: '2019-02-19T11:17:05.683'
83         },
84         {
85             scenario: 'compliance',
86             testCaseName: ' compliance.compliancetests.computeflavours',
87             description: 'Allow  SR-IOV ',
88             testSuiteName: 'compliancetests',
89             executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
90             parameters: {
91                 vspId: 'uuidval',
92                 vspVersion: 'ver',
93                 other: 'values'
94             },
95             results: {},
96             status: 'COMPLETED',
97             startTime: '2019-02-19T11:17:05.670',
98             endTime: '2019-02-19T11:17:05.683'
99         },
100         {
101             code: '500',
102             message: 'VTP Test(s) could not be completed',
103             httpStatus: 500
104         }
105     ]
106 });
107
108 export const VSPTestResultsSuccessFactory = new Factory().attrs({
109     vspTestResults: [
110         {
111             scenario: 'certification',
112             description: 'Other Certifications',
113             testCaseName: 'certification.certificationtests.certquery',
114             testSuiteName: 'certificationtests',
115             executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
116             parameters: {
117                 vspId: 'uuidval',
118                 vspVersion: 'ver',
119                 other: 'values'
120             },
121             results: {
122                 testResults: {
123                     complianceTests: [
124                         {
125                             testName: 'Compute Flavors',
126                             testResult: 'Pass',
127                             notes:
128                                 'Diagnostic: test performed against GSMA NFVI Abstraction and Profiling Version 0.1 profiles.'
129                         },
130                         {
131                             testName: 'SR-IOV',
132                             testResult: 'Fail',
133                             notes:
134                                 'Diagnostic: SR-IOV found in VNF Template. User advice: VNF binary and VNF Template must be modified to not require SR-IOV.'
135                         },
136                         {
137                             testName: 'Heat',
138                             testResult: 'Pass',
139                             notes: ''
140                         },
141                         {
142                             testName: 'TOSCA',
143                             testResult: 'Pass',
144                             notes:
145                                 'Diagnostic: test performed for ETSI GS NFV-SOL001v0.10.0.'
146                         }
147                     ],
148                     validationTests: [
149                         {
150                             testName: 'OpenStack',
151                             testResult: 'Pass',
152                             notes:
153                                 'Diagnostic: test performed for OpenStack Rocky.'
154                         },
155                         {
156                             testName: 'VMware',
157                             testResult: 'Fail',
158                             notes:
159                                 'Diagnostic: VMware compatible template not found. User advice: add a VMware compatible template to the VSP.'
160                         },
161                         {
162                             testName: 'Kubernetes',
163                             testResult: 'Fail',
164                             notes:
165                                 'Diagnostic: Kubernetes compatible template not found. User advice: add a Kubernetes compatible template, such as Helm Chart, to the VSP.'
166                         }
167                     ],
168                     performanceTests: [
169                         {
170                             testName: 'Max Throughput',
171                             testResult: 'Pass',
172                             notes: ''
173                         },
174                         {
175                             testName: 'Latency',
176                             testResult: 'Fail',
177                             notes:
178                                 'Diagnostic: maximum latency threshold of 20ms signalling response time exceededUser advice: consider increasing VDU compute resource.'
179                         }
180                     ]
181                 }
182             },
183
184             status: 'COMPLETED',
185             startTime: '2019-02-19T11:17:05.670',
186             endTime: '2019-02-19T11:17:05.683'
187         },
188         {
189             scenario: 'compliance',
190             testCaseName: 'compliance.compliancetests.sriov',
191             description: 'Allow_SR-IOV',
192             testSuiteName: 'compliancetests',
193             executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
194             parameters: {
195                 vspId: 'uuidval',
196                 vspVersion: 'ver',
197                 other: 'values'
198             },
199             results: {
200                 errors: [
201                     {
202                         attribute: '',
203                         reason: 'Record Not Found',
204                         advice:
205                             'User must query with (vspId, vspVersion) values for a certifications record that is present in the Repository',
206                         code: 40
207                     },
208                     {
209                         attribute: '',
210                         reason: 'Record Not Found',
211                         advice:
212                             'User must query with (vspId, vspVersion) values for a certifications record that is present in the Repository',
213                         code: 40
214                     }
215                 ]
216             },
217             status: 'FAILED',
218             startTime: '2019-02-19T11:17:05.670',
219             endTime: '2019-02-19T11:17:05.683'
220         },
221         {
222             scenario: 'compliance',
223             testCaseName: ' compliance.compliancetests.computeflavours',
224             description: 'Allow  SR-IOV ',
225             testSuiteName: 'compliancetests',
226             executionId: 'ebaa5f21-ed68-4098-97a9-775ac8800f09-1550575025614',
227             parameters: {
228                 vspId: 'uuidval',
229                 vspVersion: 'ver',
230                 other: 'values'
231             },
232             results: {},
233             status: 'COMPLETED',
234             startTime: '2019-02-19T11:17:05.670',
235             endTime: '2019-02-19T11:17:05.683'
236         },
237         {
238             code: '500',
239             message: 'VTP Test(s) could not be completed',
240             httpStatus: 500
241         }
242     ]
243 });