summaryrefslogtreecommitdiffstats
path: root/catalog/packages/tests/const.py
blob: a67dbef5b9594b8091d63973e4a1072fecdda2b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
# Copyright 2018 ZTE Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

vnfd_data = {
    "volume_storages": [
        {
            "properties": {
                "size_of_storage": {
                    "factor": 10,
                    "value": 10000000000,
                    "unit": "GB",
                    "unit_size": 1000000000
                },
                "type_of_storage": "volume",
                "rdma_enabled": False,
                "size": "10 GB"
            },
            "volume_storage_id": "vNAT_Storage_6wdgwzedlb6sq18uzrr41sof7",
            "description": ""
        }
    ],
    "inputs": {},
    "vdus": [
        {
            "volume_storages": [
                "vNAT_Storage_6wdgwzedlb6sq18uzrr41sof7"
            ],
            "description": "",
            "dependencies": [],
            "vls": [],
            "properties": {
                "name": "vNat",
                "configurable_properties": {
                    "test": {
                        "additional_vnfc_configurable_properties": {
                            "aaa": "1",
                            "bbb": "2",
                            "ccc": "3"
                        }
                    }
                },
                "description": "the virtual machine of vNat",
                "nfvi_constraints": [
                    "test"
                ],
                "boot_order": [
                    "vNAT_Storage"
                ]
            },
            "vdu_id": "vdu_vNat",
            "artifacts": [
                {
                    "artifact_name": "vNatVNFImage",
                    "type": "tosca.artifacts.nfv.SwImage",
                    "properties": {
                        "operating_system": "linux",
                        "sw_image": "/swimages/vRouterVNF_ControlPlane.qcow2",
                        "name": "vNatVNFImage",
                        "container_format": "bare",
                        "min_ram": "1 GB",
                        "disk_format": "qcow2",
                        "supported_virtualisation_environments": [
                            "test_0"
                        ],
                        "version": "1.0",
                        "checksum": "5000",
                        "min_disk": "10 GB",
                        "size": "10 GB"
                    },
                    "file": "/swimages/vRouterVNF_ControlPlane.qcow2"
                }
            ],
            "nfv_compute": {
                "flavor_extra_specs": {
                    "hw:cpu_sockets": "2",
                    "sw:ovs_dpdk": "true",
                    "hw:cpu_threads": "2",
                    "hw:numa_mem.1": "3072",
                    "hw:numa_mem.0": "1024",
                    "hw:numa_nodes": "2",
                    "hw:numa_cpus.0": "0,1",
                    "hw:numa_cpus.1": "2,3,4,5",
                    "hw:cpu_cores": "2",
                    "hw:cpu_threads_policy": "isolate"
                },
                "cpu_frequency": "2.4 GHz",
                "num_cpus": 2,
                "mem_size": "10 GB"
            },
            "local_storages": [],
            "image_file": "vNatVNFImage",
            "cps": []
        }
    ],
    "image_files": [
        {
            "properties": {
                "operating_system": "linux",
                "sw_image": "/swimages/vRouterVNF_ControlPlane.qcow2",
                "name": "vNatVNFImage",
                "container_format": "bare",
                "min_ram": "1 GB",
                "disk_format": "qcow2",
                "supported_virtualisation_environments": [
                    "test_0"
                ],
                "version": "1.0",
                "checksum": "5000",
                "min_disk": "10 GB",
                "size": "10 GB"
            },
            "image_file_id": "vNatVNFImage",
            "description": ""
        }
    ],
    "routers": [],
    "local_storages": [],
    "vnf_exposed": {
        "external_cps": [
            {
                "key_name": "sriov_plane",
                "cp_id": "SRIOV_Port"
            }
        ],
        "forward_cps": []
    },
    "vls": [
        {
            "route_id": "",
            "vl_id": "sriov_link",
            "route_external": False,
            "description": "",
            "properties": {
                "vl_flavours": {
                    "vl_id": "aaaa"
                },
                "connectivity_type": {
                    "layer_protocol": "ipv4",
                    "flow_pattern": "flat"
                },
                "description": "sriov_link",
                "test_access": [
                    "test"
                ]
            }
        }
    ],
    "cps": [
        {
            "vl_id": "sriov_link",
            "vdu_id": "vdu_vNat",
            "description": "",
            "cp_id": "SRIOV_Port",
            "properties": {
                "address_data": [
                    {
                        "address_type": "ip_address",
                        "l3_address_data": {
                            "ip_address_type": "ipv4",
                            "floating_ip_activated": False,
                            "number_of_ip_address": 1,
                            "ip_address_assignment": True
                        }
                    }
                ],
                "description": "sriov port",
                "layer_protocol": "ipv4",
                "virtual_network_interface_requirements": [
                    {
                        "requirement": {
                            "SRIOV": "true"
                        },
                        "support_mandatory": False,
                        "name": "sriov",
                        "description": "sriov"
                    },
                    {
                        "requirement": {
                            "SRIOV": "False"
                        },
                        "support_mandatory": False,
                        "name": "normal",
                        "description": "normal"
                    }
                ],
                "role": "root",
                "bitrate_requirement": 10
            }
        }
    ],
    "metadata": {
        "vnfSoftwareVersion": "1.0.0",
        "vnfProductName": "zte",
        "localizationLanguage": [
            "english",
            "chinese"
        ],
        "vnfProvider": "zte",
        "vnfmInfo": "zte",
        "defaultLocalizationLanguage": "english",
        "vnfdId": "00342b18-a5c7-11e8-998c-bf1755941f12",
        "id": "zte-hss-1.0",
        "vnfProductInfoDescription": "hss",
        "vnfdVersion": "1.0.0",
        "vnfProductInfoName": "hss"
    },
    "vnf": {
        "properties": {
            "descriptor_id": "00342b18-a5c7-11e8-998c-bf1755941f12",
            "descriptor_version": "1.0.0",
            "software_version": "1.0.0",
            "provider": "zte"
        },
        "metadata": {
        }
    }
}

nsd_data = {"vnffgs": [{"vnffg_id": "vnffg1",
                        "description": "",
                        "members": ["path1",
                                    "path2"],
                        "properties": {"vendor": "zte",
                                       "connection_point": ["m6000_data_in",
                                                            "m600_tunnel_cp",
                                                            "m6000_data_out"],
                                       "version": "1.0",
                                       "constituent_vnfs": ["VFW",
                                                            "VNAT"],
                                       "number_of_endpoints": 3,
                                       "dependent_virtual_link": ["sfc_data_network",
                                                                  "ext_datanet_net",
                                                                  "ext_mnet_net"]}}],
            "inputs": {"sfc_data_network": {"type": "string",
                                            "value": "sfc_data_network"},
                       "externalDataNetworkName": {"type": "string",
                                                   "value": "vlan_4004_tunnel_net"},
                       "externalManageNetworkName": {"type": "string",
                                                     "value": "vlan_4008_mng_net"},
                       "NatIpRange": {"type": "string",
                                      "value": "192.167.0.10-192.168.0.20"},
                       "externalPluginManageNetworkName": {"type": "string",
                                                           "value": "vlan_4007_plugin_net"}},
            "pnfs": [{"pnf_id": "m6000_s",
                      "cps": [],
                      "description": "",
                      "properties": {"vendor": "zte",
                                     "request_reclassification": False,
                                     "pnf_type": "m6000s",
                                     "version": "1.0",
                                     "management_address": "111111",
                                     "id": "m6000_s",
                                     "nsh_aware": False}}],
            "fps": [{"properties": {"symmetric": False,
                                    "policy": {"type": "ACL",
                                               "criteria": {"dest_port_range": "1-100",
                                                            "ip_protocol": "tcp",
                                                            "source_ip_range": ["119.1.1.1-119.1.1.10"],
                                                            "dest_ip_range": [{"get_input": "NatIpRange"}],
                                                            "dscp": 0,
                                                            "source_port_range": "1-100"}}},
                     "forwarder_list": [{"capability": "",
                                         "type": "cp",
                                         "node_name": "m6000_data_out"},
                                        {"capability": "",
                                         "type": "cp",
                                         "node_name": "m600_tunnel_cp"},
                                        {"capability": "vnat_fw_inout",
                                         "type": "vnf",
                                         "node_name": "VNAT"}],
                     "description": "",
                     "fp_id": "path2"},
                    {"properties": {"symmetric": True,
                                    "policy": {"type": "ACL",
                                               "criteria": {"dest_port_range": "1-100",
                                                            "ip_protocol": "tcp",
                                                            "source_ip_range": ["1-100"],
                                                            "dest_ip_range": ["1-100"],
                                                            "dscp": 4,
                                                            "source_port_range": "1-100"}}},
                     "forwarder_list": [{"capability": "",
                                         "type": "cp",
                                         "node_name": "m6000_data_in"},
                                        {"capability": "",
                                         "type": "cp",
                                         "node_name": "m600_tunnel_cp"},
                                        {"capability": "vfw_fw_inout",
                                         "type": "vnf",
                                         "node_name": "VFW"},
                                        {"capability": "vnat_fw_inout",
                                         "type": "vnf",
                                         "node_name": "VNAT"},
                                        {"capability": "",
                                         "type": "cp",
                                         "node_name": "m600_tunnel_cp"},
                                        {"capability": "",
                                         "type": "cp",
                                         "node_name": "m6000_data_out"}],
                     "description": "",
                     "fp_id": "path1"}],
            "routers": [],
            "vnfs": [{"vnf_id": "VFW",
                      "description": "",
                      "properties": {"plugin_info": "vbrasplugin_1.0",
                                     "vendor": "zte",
                                     "is_shared": False,
                                     "adjust_vnf_capacity": True,
                                     "name": "VFW",
                                     "vnf_extend_type": "driver",
                                     "csarVersion": "v1.0",
                                     "csarType": "NFAR",
                                     "csarProvider": "ZTE",
                                     "version": "1.0",
                                     "nsh_aware": True,
                                     "cross_dc": False,
                                     "vnf_type": "VFW",
                                     "vmnumber_overquota_alarm": True,
                                     "vnfd_version": "1.0.0",
                                     "externalPluginManageNetworkName": "vlan_4007_plugin_net",
                                     "id": "vcpe_vfw_zte_1_0",
                                     "request_reclassification": False},
                      "dependencies": [{"key_name": "vfw_ctrl_by_manager_cp",
                                        "vl_id": "ext_mnet_net"},
                                       {"key_name": "vfw_data_cp",
                                        "vl_id": "sfc_data_network"}],
                      "type": "tosca.nodes.nfv.ext.zte.VNF.VFW",
                      "networks": []}],
            "ns_exposed": {"external_cps": [],
                           "forward_cps": []},
            "policies": [{"file_url": "policies/abc.drl",
                          "name": "aaa"}],
            "vls": [{"route_id": "",
                     "vl_id": "ext_mnet_net",
                     "route_external": False,
                     "description": "",
                     "properties": {"name": "vlan_4008_mng_net",
                                    "mtu": 1500,
                                    "location_info": {"tenant": "admin",
                                                      "vimid": 2,
                                                      "availability_zone": "nova"},
                                    "ip_version": 4,
                                    "dhcp_enabled": True,
                                    "network_name": "vlan_4008_mng_net",
                                    "network_type": "vlan"}},
                    {"route_id": "",
                     "vl_id": "ext_datanet_net",
                     "route_external": False,
                     "description": "",
                     "properties": {"name": "vlan_4004_tunnel_net",
                                    "mtu": 1500,
                                    "location_info": {"tenant": "admin",
                                                      "vimid": 2,
                                                      "availability_zone": "nova"},
                                    "ip_version": 4,
                                    "dhcp_enabled": True,
                                    "network_name": "vlan_4004_tunnel_net",
                                    "network_type": "vlan"}},
                    {"route_id": "",
                     "vl_id": "sfc_data_network",
                     "route_external": False,
                     "description": "",
                     "properties": {"name": "sfc_data_network",
                                    "dhcp_enabled": True,
                                    "is_predefined": False,
                                    "location_info": {"tenant": "admin",
                                                      "vimid": 2,
                                                      "availability_zone": "nova"},
                                    "ip_version": 4,
                                    "mtu": 1500,
                                    "network_name": "sfc_data_network",
                                    "network_type": "vlan"}}],
            "cps": [{"pnf_id": "m6000_s",
                     "vl_id": "path2",
                     "description": "",
                     "cp_id": "m6000_data_out",
                     "properties": {"direction": "bidirectional",
                                    "vnic_type": "normal",
                                    "bandwidth": 0,
                                    "mac_address": "11-22-33-22-11-44",
                                    "interface_name": "xgei-0/4/1/5",
                                    "ip_address": "176.1.1.2",
                                    "order": 0,
                                    "sfc_encapsulation": "mac"}},
                    {"pnf_id": "m6000_s",
                     "vl_id": "ext_datanet_net",
                     "description": "",
                     "cp_id": "m600_tunnel_cp",
                     "properties": {"direction": "bidirectional",
                                    "vnic_type": "normal",
                                    "bandwidth": 0,
                                    "mac_address": "00-11-00-22-33-00",
                                    "interface_name": "gei-0/4/0/13",
                                    "ip_address": "191.167.100.5",
                                    "order": 0,
                                    "sfc_encapsulation": "mac"}},
                    {"pnf_id": "m6000_s",
                     "vl_id": "path2",
                     "description": "",
                     "cp_id": "m6000_data_in",
                     "properties": {"direction": "bidirectional",
                                    "vnic_type": "normal",
                                    "bandwidth": 0,
                                    "mac_address": "11-22-33-22-11-41",
                                    "interface_name": "gei-0/4/0/7",
                                    "ip_address": "1.1.1.1",
                                    "order": 0,
                                    "sfc_encapsulation": "mac",
                                    "bond": "none"}},
                    {"pnf_id": "m6000_s",
                     "vl_id": "ext_mnet_net",
                     "description": "",
                     "cp_id": "m600_mnt_cp",
                     "properties": {"direction": "bidirectional",
                                    "vnic_type": "normal",
                                    "bandwidth": 0,
                                    "mac_address": "00-11-00-22-33-11",
                                    "interface_name": "gei-0/4/0/1",
                                    "ip_address": "10.46.244.51",
                                    "order": 0,
                                    "sfc_encapsulation": "mac",
                                    "bond": "none"}}],
            "metadata": {"invariant_id": "vcpe_ns_sff_1",
                         "name": "VCPE_NS",
                         "csarVersion": "v1.0",
                         "csarType": "NSAR",
                         "csarProvider": "ZTE",
                         "version": 1,
                         "vendor": "ZTE",
                         "id": "VCPE_NS",
                         "description": "vcpe_ns"},
            "ns": {
                "properties": {
                    # "descriptor_id": "VCPE_NS",
                    "descriptor_id": "b632bddc-bccd-4180-bd8d-4e8a9578eff7",
                    "version": 1,
                    "name": "VCPE_NS",
                    "desginer": "ZTE",
                    "invariant_id": "vcpe_ns_sff_1"
                }
}
}

pnfd_data = {
    "metadata": {
        "id": "zte-1.0",
    }
}

sd_data = {
    "inputs": {
        "sdwanvpnresource_list": [
            {
                "sdwanvpn_topology": "",
                "required": True,
                "type": "string"
            }
        ]
    },
    "pnfs": [
        {
            "pnf_id": "m6000_s",
            "cps": [],
            "description": "",
            "properties": {
                "vendor": "zte",
                "request_reclassification": False,
                "pnf_type": "m6000s",
                "version": "1.0",
                "management_address": "111111",
                "id": "m6000_s",
                "nsh_aware": False
            }
        }
    ],
    "description": "",
    "vnfs": [
        {
            "vnf_id": "sdwansiteresource",
            "description": "",
            "properties": {
                "sdwandevice_type": "",
                "sdwandevice_class": "PNF",
                "multi_stage_design": "false",
                "min_instances": "1",
                "sdwansite_controlPoint": "",
                "id": "cd557883-ac4b-462d-aa01-421b5fa606b1",
                "sdwansite_longitude": "",
                "sdwansite_latitude": "",
                "sdwansite_postcode": "",
                "sdwansite_type": "",
                "nf_naming": {
                    "ecomp_generated_naming": True
                },
                "sdwansite_emails": "",
                "sdwansite_role": "",
                "vnfm_info": "",
                "sdwansite_address": "",
                "sdwansite_description": "",
                "availability_zone_max_count": "1",
                "sdwansite_name": ""
            }
        }
    ],
    "service": {
        "type": "org.openecomp.service.EnhanceService",
        "properties": {
            "descriptor_id": "49ee73f4-1e31-4054-b871-eb9b1c29999b",
            "designer": "",
            "invariant_id": "5de07996-7ff0-4ec1-b93c-e3a00bb3f207",
            "name": "Enhance_Service",
            "verison": ""
        },
        "metadata": {
            "category": "E2E Service",
            "serviceType": "",
            "description": "Enhance_Service",
            "instantiationType": "A-la-carte",
            "type": "Service",
            "environmentContext": "General_Revenue-Bearing",
            "serviceEcompNaming": True,
            "UUID": "49ee73f4-1e31-4054-b871-eb9b1c29999b",
            "ecompGeneratedNaming": True,
            "serviceRole": "",
            "invariantUUID": "5de07996-7ff0-4ec1-b93c-e3a00bb3f207",
            "namingPolicy": "",
            "name": "Enhance_Service"
        }
    },
    "metadata": {
        "category": "E2E Service",
        "serviceType": "",
        "description": "Enhance_Service",
        "instantiationType": "A-la-carte",
        "type": "Service",
        "environmentContext": "General_Revenue-Bearing",
        "serviceEcompNaming": True,
        "UUID": "49ee73f4-1e31-4054-b871-eb9b1c29999b",
        "ecompGeneratedNaming": True,
        "serviceRole": "",
        "invariantUUID": "5de07996-7ff0-4ec1-b93c-e3a00bb3f207",
        "namingPolicy": "",
        "name": "Enhance_Service"
    }
}

vnf_subscription_data = {
    "filters": {
        "notificationTypes": [
            "VnfPackageOnboardingNotification"
        ],
        "vnfProductsFromProviders": [{
            "vnfProvider": "string",
            "vnfProducts": {
                "vnfProductName": "string",
                "versions": {
                    "vnfSoftwareVersion": "string",
                    "vnfdVersions": [
                        "string"
                    ]
                }
            }
        }],
        "vnfdId": [
            "00342b18-a5c7-11e8-998c-bf1755941f12"
        ],
        "vnfPkgId": [
            "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ],
        "operationalState": [
            "ENABLED"
        ],
        "usageState": [
            "IN_USE"
        ]
    },
    "callbackUri": "http://www.vnf1.com/notification",
    "authentication": {
        "authType": [
            "BASIC"
        ],
        "paramsBasic": {
            "userName": "string",
            "password": "string"
        }
    }
}