ADD UT for ns_sfcs Issue-ID: VFC-1429 Signed-off-by: zhuerlei <zhu.erlei@zte.com.cn>
[vfc/nfvo/lcm.git] / lcm / ns_sfcs / tests / test_data.py
1 # Copyright 2016 ZTE Corporation.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 nsd_model = {
16     "metadata": {
17         "id": "nsd_demo",
18         "vendor": "zte",
19         "version": "1.1.0",
20         "name": "testNSD",
21         "description": "demo nsd",
22     },
23
24     "inputs": {
25         "param1": "11",
26         "param2": "22",
27     },
28
29     "vnfs": [
30         {
31             "type": "tosca.nodes.nfv.ext.VNF.FireWall",
32             "vnf_id": "vnf_1",
33             "description": "",
34             "properties": {
35                 "id": "vnfd_1",
36                 "vendor": "zte",
37                 "version": "1.2.0",
38                 "vnfd_version": "1.1.0",
39                 "vnf_type": "vnf1",
40                 "domain_type": "CN",
41                 "name": "vnf1",
42                 "is_shared": False,
43                 "cross_dc": False,
44                 "request_reclassification": False,
45                 "nsh_aware": False,
46                 "custom_properties": {
47                     "key1": "value1",
48                     "keyN": "valueN",
49                 },
50             },
51             "dependencies": [
52                 "vnf_id1", "vnf_id2"
53             ],
54             "networks": [
55                 {
56                     "key_name": "virtualLink1",
57                     "vl_id": "vl_id1",
58                 },
59             ],
60         },
61         {
62             "type": "tosca.nodes.nfv.ext.VNF.FireWall",
63             "vnf_id": "vnf_2",
64             "description": "",
65             "properties": {
66                 "id": "vnfd_2",
67                 "vendor": "zte",
68                 "version": "1.2.0",
69                 "vnfd_version": "1.1.0",
70                 "vnf_type": "vnf2",
71                 "domain_type": "CN",
72                 "name": "vnf1",
73                 "is_shared": False,
74                 "cross_dc": False,
75                 "request_reclassification": False,
76                 "nsh_aware": False,
77                 "custom_properties": {
78                     "key1": "value1",
79                     "keyN": "valueN",
80                 },
81             },
82             "dependencies": [
83                 "vnf_id1", "vnf_id2"
84             ],
85             "networks": [
86                 {
87                     "key_name": "virtualLink1",
88                     "vl_id": "vl_id1",
89                 },
90             ],
91         }
92     ],
93
94     "pnfs": [
95         {
96             "pnf_id": "pnf1",
97             "description": "",
98             "properties": {
99                 "id": "pnf1",
100                 "vendor": "zte",
101                 "version": "1.1.0",
102                 "pnf_type": "TTGW",
103                 "request_reclassification": False,
104                 "nsh_aware": False,
105                 "management_address": "10.34.45.67"
106             },
107             "cps": [
108                 "cpd_1", "cpd_22",
109             ]
110         }
111     ],
112
113     "nested_ns": [
114         {
115             "ns_id": "ns2",
116             "description": "",
117             "properties": {
118                 "id": "ns2_demo",
119                 "vendor": "zte",
120                 "version": "1.1.0",
121                 "name": "NSD2",
122             },
123             "networks": [
124                 {
125                     "key_name": "virtualLink1",
126                     "vl_id": "vl_id1",
127                 },
128             ],
129         }
130     ],
131
132     "vls": [
133         {
134             "vl_id": "vldId1",
135             "description": "",
136             "properties": {
137                 "name": "umac_241_control",
138                 "network_id": "fgdhsj434hfjdfd",
139                 "network_name": "umac_control",
140                 "vendor": "zte",
141                 "mtu": 1500,
142                 "network_type": "vlan",
143                 "physical_network": "phynet01",
144                 "segmentation_id": "30",
145                 "vlan_transparent": False,
146                 "vds_name": "vds1",
147                 "cidr": "192.168.199.0/24",
148                 "ip_version": 4,
149                 "gateway_ip": "192.168.199.1",
150                 "dhcp_enabled": False,
151                 "dns_nameservers": ["192.168.0.4", "192.168.0.10"],
152                 "start_ip": "192.168.199.2",
153                 "end_ip": "192.168.199.254",
154                 "host_routes": [
155                     {
156                         "destination": "10.43.26.0/24",
157                         "nexthop": "10.41.23.1",
158                     },
159                 ],
160                 "location_info": {
161                     "vimId": "vimid",
162                     "tenant": "tenantname",
163                 },
164                 "vlan_transparent": False,
165             },
166         },
167     ],
168
169     "cps": [
170         {
171             "cp_id": "cpd_1",
172             "description": "",
173             "properties": {
174                 "mac_address": "00:d9:00:82:11:e1",
175                 "ip_address": "192.168.1.21",
176                 "ip_range_start": "192.168.1.20",
177                 "ip_range_end": "192.168.1.29",
178                 "floating_ip_address": {
179                     "external_network": "extnet01",
180                     "ip_address": "10.43.53.23",
181                 },
182                 "service_ip_address": "192.168.1.23",
183                 "order": 1,
184                 "bandwidth": 1000,
185                 "vnic_type": "normal",
186                 "allowed_address_pairs": [
187                     {
188                         "ip": "192.168.1.13",
189                         "mac": "00:f3:43:20:a2:a3"
190                     },
191                 ],
192                 "bond": "none",
193                 "macbond": "00:d9:00:82:11:d1",
194                 "sfc_encapsulation": "",
195                 "direction": "",
196             },
197             "vl_id": "vlid1",
198             "pnf_id": "pnf1",
199         },
200
201         {
202             "cp_id": "forwarder_brasDP_dcPort",
203             "description": "",
204             "properties": {
205                 "mac_address": "00:d9:00:82:14:e1",
206                 "ip_address": "192.168.1.24",
207                 "ip_range_start": "192.168.1.20",
208                 "ip_range_end": "192.168.1.29",
209                 "floating_ip_address": {
210                     "external_network": "extnet01",
211                     "ip_address": "10.43.53.23",
212                 },
213                 "service_ip_address": "192.168.1.23",
214                 "order": 1,
215                 "bandwidth": 1000,
216                 "vnic_type": "normal",
217                 "allowed_address_pairs": [
218                     {
219                         "ip": "192.168.1.13",
220                         "mac": "00:f3:43:20:a2:a3"
221                     },
222                 ],
223                 "bond": "none",
224                 "macbond": "00:d9:00:82:11:d1",
225                 "sfc_encapsulation": "",
226                 "direction": "",
227             },
228             "vl_id": "vlid1",
229             "pnf_id": "pnf1",
230         },
231         {
232             "cp_id": "forwarder_brasDP_internetPort",
233             "description": "",
234             "properties": {
235                 "mac_address": "00:d9:00:82:15:e1",
236                 "ip_address": "192.168.1.25",
237                 "ip_range_start": "192.168.1.20",
238                 "ip_range_end": "192.168.1.29",
239                 "floating_ip_address": {
240                     "external_network": "extnet01",
241                     "ip_address": "10.43.53.23",
242                 },
243                 "service_ip_address": "192.168.1.23",
244                 "order": 1,
245                 "bandwidth": 1000,
246                 "vnic_type": "normal",
247                 "allowed_address_pairs": [
248                     {
249                         "ip": "192.168.1.13",
250                         "mac": "00:f3:43:20:a2:a3"
251                     },
252                 ],
253                 "bond": "none",
254                 "macbond": "00:d9:00:82:11:d1",
255                 "sfc_encapsulation": "",
256                 "direction": "",
257             },
258             "vl_id": "vlid1",
259             "pnf_id": "pnf1",
260         },
261
262     ],
263
264     "fps": [
265         {
266             "fp_id": "fpd_1",
267             "description": "",
268             "properties": {
269                 "policy": {
270                     "type": "ACL",
271                     "criteria": {
272                         "dest_port_range": [80, 1024],
273                         "source_port_range": [80, 1024],
274                         "ip_protocol": "tcp",
275                         "dest_ip_range": ["192.168.1.2", "192.168.1.100"],
276                         "source_ip_range": ["192.168.1.2", "192.168.1.100"],
277                         "dscp": 100,
278                     },
279                 },
280                 "symmetric": True,
281             },
282             "forwarder_list": [
283                 {
284                     "type": "cp",
285                     "node_name": "cpd_1",
286                     "capability": "",
287                 },
288                 {
289                     "type": "cp",
290                     "node_name": "forwarder_brasDP_dcPort",
291                     "capability": "",
292                 },
293                 {
294                     "type": "vnf",
295                     "node_name": "vnf_1",
296                     "capability": "forwarder1",
297                 },
298                 {
299                     "type": "vnf",
300                     "node_name": "vnf_2",
301                     "capability": "forwarder2",
302                 },
303                 {
304                     "type": "vnf",
305                     "node_name": "vnf_2",
306                     "capability": "forwarder3",
307                 },
308                 {
309                     "type": "cp",
310                     "node_name": "forwarder_brasDP_dcPort",
311                     "capability": "",
312                 },
313                 {
314                     "type": "cp",
315                     "node_name": "forwarder_brasDP_internetPort",
316                     "capability": "",
317                 },
318             ],
319         },
320
321         {
322             "fp_id": "fpd_2",
323             "description": "",
324             "properties": {
325                 "policy": {
326                     "type": "ACL",
327                     "criteria": {
328                         "dest_port_range": [80, 1024],
329                         "source_port_range": [80, 1024],
330                         "ip_protocol": "tcp",
331                         "dest_ip_range": ["192.168.1.2", "192.168.1.100"],
332                         "source_ip_range": ["192.168.1.2", "192.168.1.100"],
333                         "dscp": 100,
334                     },
335                 },
336                 "symmetric": True,
337             },
338             "forwarder_list": [
339
340                 {
341                     "type": "cp",
342                     "node_name": "forwarder_brasDP_internetPort",
343                     "capability": "",
344                 },
345                 {
346                     "type": "cp",
347                     "node_name": "forwarder_brasDP_dcPort",
348                     "capability": "",
349                 },
350                 {
351                     "type": "vnf",
352                     "node_name": "vnf_2",
353                     "capability": "forwarder2",
354                 },
355
356             ],
357         },
358     ],
359
360     "vnffgs": [
361         {
362             "vnffg_id": "vnffg_id1",
363             "description": "",
364             "properties": {
365                 "vendor": "zte",
366                 "version": "1.1.2",
367                 "number_of_endpoints": 7,
368                 "dependent_virtual_link": ["vldId1"],
369                 "connection_point": ["CP01", "CP02"],
370                 "constituent_vnfs": ["vnf_id1", "vnf_id2"],
371                 "constituent_pnfs": ["pnf1", "pnf2"],
372             },
373             "members": ["fpd_1", "fpd_2"],
374         }
375     ],
376
377     "server_groups": [
378         {
379             "group_id": "",
380             "description": "",
381             "properties": {
382                 "name": "server_group1",
383                 "affinity_antiaffinity": "anti-affinity",
384                 "scope": "host",
385             },
386             "members": ["vnf1", "vnf2"],
387         },
388     ],
389
390     "ns_exposed": {
391         "external_cps": [
392             {
393                 "key_name": "virtualLink1",
394                 "cp_id": "cp1",
395             },
396         ],
397         "forward_cps": [
398             {
399                 "key_name": "forwarder_brasDP_userPort",
400                 "cp_id": "cpd_1",
401             },
402             {
403                 "key_name": "forwarder_brasDP_internetPort",
404                 "cp_id": "cpd_4",
405             },
406             {
407                 "key_name": "forwarder_brasDP_dcPort",
408                 "cp_id": "cpd_5",
409             },
410
411         ],
412     },
413
414     "policies": [
415         {
416             "scaling": [
417                 {
418                     "policy_id": "id1",
419                     "description": "",
420                     "properties": {
421                         "policy_file": "Policies/ns1-policy.xml",
422                     },
423                     "targets": ['pfu_vm'],
424                 },
425             ],
426         },
427     ],
428
429     "ns_flavours": [
430         {
431             "flavour_id": "flavour1",
432             "description": "",
433             "vnf_profiles": [
434                 {
435                     "vnf_id": "vnf1",
436                     "flavour_id": "flavour1",
437                     "instances_minimum_number": 1,
438                     "instances_maximum_number": 4,
439                     "local_affinity_antiaffinity_rule": [
440                         {
441                             "affinity_antiaffinity": "affinity",
442                             "scope": "node",
443                         }
444                     ]
445                 },
446             ],
447             "pnf_profiles": [
448                 {
449                     "pnf_id": "pnf1",
450                 },
451             ],
452             "vl_profiles": [
453                 {
454                     "vl_id": "vlid1",
455                     "bitrate_requirements": {
456                         "root": 1000,
457                         "leaf": 100
458                     },
459                     "qos": {
460                         "maximum_latency": "1 ms",
461                         "maximum_jitter": "10 ms",
462                         "maximum_packet_loss_ratio": 0.5
463                     },
464                 }
465             ],
466             "instantiation_levels": [
467                 {
468                     "id": "instLevel1",
469                     "description": "",
470                     "vnf_levels": [
471                         {
472                             "vnf_id": "",
473                             "vnf_instantiation_level": "small",
474                             "instances_number": 1
475                         },
476                     ],
477                     "scale_level_id": "scaleLevel1",
478                 }
479             ],
480             "default_instantiation_level": "instLevel1",
481             "scale_levels": [
482                 {
483                     "id": "scaleLevel1",
484                     "order": 1,
485                     "vnf_levels": [
486                         {
487                             "vnf_id": "",
488                             "vnf_instantiation_level": "small",
489                             "instances_number": 1
490                         },
491                     ],
492                 },
493             ],
494             "supported_operations": ["Scale", "Heal"],
495             "affinity_antiaffinity_groups": [
496                 {
497                     "group_id": "group1Id",
498                     "name": "groupName",
499                     "affinity_antiaffinity": "affinity",
500                     "scope": "node",
501                     "members": [
502                         "vnfId1", "vnfIdN",
503                     ],
504                 },
505             ],
506         },
507     ],
508 }
509 vnfd_model_dict1 = {
510
511     'vdus': [
512         {
513             'volumn_storages': [
514
515             ],
516             'nfv_compute': {
517                 'mem_size': '',
518                 'num_cpus': '2'
519             },
520             'local_storages': [
521
522             ],
523             'vdu_id': 'vdu_omm.001',
524             'image_file': 'opencos_sss_omm_img_release_20150723-1-disk1',
525             'dependencies': [
526
527             ],
528             'vls': [
529
530             ],
531             'cps': [
532
533             ],
534             'properties': {
535                 'key_vdu': '',
536                 'support_scaling': False,
537                 'vdu_type': '',
538                 'name': '',
539                 'storage_policy': '',
540                 'location_info': {
541                     'vimId': '',
542                     'availability_zone': '',
543                     'region': '',
544                     'dc': '',
545                     'host': '',
546                     'tenant': ''
547                 },
548                 'inject_data_list': [
549
550                 ],
551                 'watchdog': {
552                     'action': '',
553                     'enabledelay': ''
554                 },
555                 'local_affinity_antiaffinity_rule': {
556
557                 },
558                 'template_id': 'omm.001',
559                 'manual_scale_select_vim': False
560             },
561             'description': 'singleommvm'
562         },
563         {
564             'volumn_storages': [
565
566             ],
567             'nfv_compute': {
568                 'mem_size': '',
569                 'num_cpus': '4'
570             },
571             'local_storages': [
572
573             ],
574             'vdu_id': 'vdu_1',
575             'image_file': 'sss',
576             'dependencies': [
577
578             ],
579             'vls': [
580
581             ],
582             'cps': [
583
584             ],
585             'properties': {
586                 'key_vdu': '',
587                 'support_scaling': False,
588                 'vdu_type': '',
589                 'name': '',
590                 'storage_policy': '',
591                 'location_info': {
592                     'vimId': '',
593                     'availability_zone': '',
594                     'region': '',
595                     'dc': '',
596                     'host': '',
597                     'tenant': ''
598                 },
599                 'inject_data_list': [
600
601                 ],
602                 'watchdog': {
603                     'action': '',
604                     'enabledelay': ''
605                 },
606                 'local_affinity_antiaffinity_rule': {
607
608                 },
609                 'template_id': '1',
610                 'manual_scale_select_vim': False
611             },
612             'description': 'ompvm'
613         },
614         {
615             'volumn_storages': [
616
617             ],
618             'nfv_compute': {
619                 'mem_size': '',
620                 'num_cpus': '14'
621             },
622             'local_storages': [
623
624             ],
625             'vdu_id': 'vdu_2',
626             'image_file': 'sss',
627             'dependencies': [
628
629             ],
630             'vls': [
631
632             ],
633             'cps': [
634
635             ],
636             'properties': {
637                 'key_vdu': '',
638                 'support_scaling': False,
639                 'vdu_type': '',
640                 'name': '',
641                 'storage_policy': '',
642                 'location_info': {
643                     'vimId': '',
644                     'availability_zone': '',
645                     'region': '',
646                     'dc': '',
647                     'host': '',
648                     'tenant': ''
649                 },
650                 'inject_data_list': [
651
652                 ],
653                 'watchdog': {
654                     'action': '',
655                     'enabledelay': ''
656                 },
657                 'local_affinity_antiaffinity_rule': {
658
659                 },
660                 'template_id': '2',
661                 'manual_scale_select_vim': False
662             },
663             'description': 'ompvm'
664         },
665         {
666             'volumn_storages': [
667
668             ],
669             'nfv_compute': {
670                 'mem_size': '',
671                 'num_cpus': '14'
672             },
673             'local_storages': [
674
675             ],
676             'vdu_id': 'vdu_3',
677             'image_file': 'sss',
678             'dependencies': [
679
680             ],
681             'vls': [
682
683             ],
684             'cps': [
685
686             ],
687             'properties': {
688                 'key_vdu': '',
689                 'support_scaling': False,
690                 'vdu_type': '',
691                 'name': '',
692                 'storage_policy': '',
693                 'location_info': {
694                     'vimId': '',
695                     'availability_zone': '',
696                     'region': '',
697                     'dc': '',
698                     'host': '',
699                     'tenant': ''
700                 },
701                 'inject_data_list': [
702
703                 ],
704                 'watchdog': {
705                     'action': '',
706                     'enabledelay': ''
707                 },
708                 'local_affinity_antiaffinity_rule': {
709
710                 },
711                 'template_id': '3',
712                 'manual_scale_select_vim': False
713             },
714             'description': 'ompvm'
715         },
716         {
717             'volumn_storages': [
718
719             ],
720             'nfv_compute': {
721                 'mem_size': '',
722                 'num_cpus': '4'
723             },
724             'local_storages': [
725
726             ],
727             'vdu_id': 'vdu_10',
728             'image_file': 'sss',
729             'dependencies': [
730
731             ],
732             'vls': [
733
734             ],
735             'cps': [
736
737             ],
738             'properties': {
739                 'key_vdu': '',
740                 'support_scaling': False,
741                 'vdu_type': '',
742                 'name': '',
743                 'storage_policy': '',
744                 'location_info': {
745                     'vimId': '',
746                     'availability_zone': '',
747                     'region': '',
748                     'dc': '',
749                     'host': '',
750                     'tenant': ''
751                 },
752                 'inject_data_list': [
753
754                 ],
755                 'watchdog': {
756                     'action': '',
757                     'enabledelay': ''
758                 },
759                 'local_affinity_antiaffinity_rule': {
760
761                 },
762                 'template_id': '10',
763                 'manual_scale_select_vim': False
764             },
765             'description': 'ppvm'
766         },
767         {
768             'volumn_storages': [
769
770             ],
771             'nfv_compute': {
772                 'mem_size': '',
773                 'num_cpus': '14'
774             },
775             'local_storages': [
776
777             ],
778             'vdu_id': 'vdu_11',
779             'image_file': 'sss',
780             'dependencies': [
781
782             ],
783             'vls': [
784
785             ],
786             'cps': [
787
788             ],
789             'properties': {
790                 'key_vdu': '',
791                 'support_scaling': False,
792                 'vdu_type': '',
793                 'name': '',
794                 'storage_policy': '',
795                 'location_info': {
796                     'vimId': '',
797                     'availability_zone': '',
798                     'region': '',
799                     'dc': '',
800                     'host': '',
801                     'tenant': ''
802                 },
803                 'inject_data_list': [
804
805                 ],
806                 'watchdog': {
807                     'action': '',
808                     'enabledelay': ''
809                 },
810                 'local_affinity_antiaffinity_rule': {
811
812                 },
813                 'template_id': '11',
814                 'manual_scale_select_vim': False
815             },
816             'description': 'ppvm'
817         },
818         {
819             'volumn_storages': [
820
821             ],
822             'nfv_compute': {
823                 'mem_size': '',
824                 'num_cpus': '14'
825             },
826             'local_storages': [
827
828             ],
829             'vdu_id': 'vdu_12',
830             'image_file': 'sss',
831             'dependencies': [
832
833             ],
834             'vls': [
835
836             ],
837             'cps': [
838
839             ],
840             'properties': {
841                 'key_vdu': '',
842                 'support_scaling': False,
843                 'vdu_type': '',
844                 'name': '',
845                 'storage_policy': '',
846                 'location_info': {
847                     'vimId': '',
848                     'availability_zone': '',
849                     'region': '',
850                     'dc': '',
851                     'host': '',
852                     'tenant': ''
853                 },
854                 'inject_data_list': [
855
856                 ],
857                 'watchdog': {
858                     'action': '',
859                     'enabledelay': ''
860                 },
861                 'local_affinity_antiaffinity_rule': {
862
863                 },
864                 'template_id': '12',
865                 'manual_scale_select_vim': False
866             },
867             'description': 'ppvm'
868         }
869     ],
870     'volumn_storages': [
871
872     ],
873     'policies': {
874         'scaling': {
875             'targets': {
876
877             },
878             'policy_id': 'policy_scale_sss-vnf-template',
879             'properties': {
880                 'policy_file': '*-vnfd.zip/*-vnf-policy.xml'
881             },
882             'description': ''
883         }
884     },
885     'image_files': [
886         {
887             'description': '',
888             'properties': {
889                 'name': 'opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
890                 'checksum': '',
891                 'disk_format': 'VMDK',
892                 'file_url': './zte-cn-sss-main-image/OMM/opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
893                 'container_type': 'vm',
894                 'version': '',
895                 'hypervisor_type': 'kvm'
896             },
897             'image_file_id': 'opencos_sss_omm_img_release_20150723-1-disk1'
898         },
899         {
900             'description': '',
901             'properties': {
902                 'name': 'sss.vmdk',
903                 'checksum': '',
904                 'disk_format': 'VMDK',
905                 'file_url': './zte-cn-sss-main-image/NE/sss.vmdk',
906                 'container_type': 'vm',
907                 'version': '',
908                 'hypervisor_type': 'kvm'
909             },
910             'image_file_id': 'sss'
911         }
912     ],
913     'vls': [
914
915     ],
916     'cps': [
917         {'cp_id': 'cpd_1',
918          "description": "",
919          "properties": {
920              "mac_address": "00:d9:00:82:11:e1",
921              "ip_address": "10.43.25.2",
922              "ip_range_start": "192.168.1.20",
923              "ip_range_end": "192.168.1.29",
924              "sfc_encapsulation": ""
925          }
926          },
927     ],
928     'metadata': {
929         'vendor': 'zte',
930         'is_shared': False,
931         'description': '',
932         'domain_type': 'CN',
933         'version': 'v4.14.10',
934         'vmnumber_overquota_alarm': False,
935         'cross_dc': False,
936         'vnf_type': 'SSS',
937         'vnfd_version': 'V00000001',
938         'id': 'vnfd_2',
939         'name': 'sss-vnf-template'
940     },
941
942     'vnf_exposed': {
943         "external_cps": [
944             {
945                 "key_name": "virtualLink1",
946                 "cp_id": "cp1",
947             },
948         ],
949         "forward_cps": [
950             {
951                 "key_name": "forwarder1",
952                 "cp_id": "cpd_1",
953             },
954             {
955                 "key_name": "forwarder2",
956                 "cp_id": "cpd_2",
957             },
958         ],
959     }
960 }
961 vnfd_model_dict2 = {
962     'local_storages': [
963
964     ],
965     'vdus': [
966         {
967             'volumn_storages': [
968
969             ],
970             'nfv_compute': {
971                 'mem_size': '',
972                 'num_cpus': '2'
973             },
974             'local_storages': [
975
976             ],
977             'vdu_id': 'vdu_omm.001',
978             'image_file': 'opencos_sss_omm_img_release_20150723-1-disk1',
979             'dependencies': [
980
981             ],
982             'vls': [
983
984             ],
985             'cps': [
986
987             ],
988             'properties': {
989                 'key_vdu': '',
990                 'support_scaling': False,
991                 'vdu_type': '',
992                 'name': '',
993                 'storage_policy': '',
994                 'location_info': {
995                     'vimId': '',
996                     'availability_zone': '',
997                     'region': '',
998                     'dc': '',
999                     'host': '',
1000                     'tenant': ''
1001                 },
1002                 'inject_data_list': [
1003
1004                 ],
1005                 'watchdog': {
1006                     'action': '',
1007                     'enabledelay': ''
1008                 },
1009                 'local_affinity_antiaffinity_rule': {
1010
1011                 },
1012                 'template_id': 'omm.001',
1013                 'manual_scale_select_vim': False
1014             },
1015             'description': 'singleommvm'
1016         },
1017         {
1018             'volumn_storages': [
1019
1020             ],
1021             'nfv_compute': {
1022                 'mem_size': '',
1023                 'num_cpus': '4'
1024             },
1025             'local_storages': [
1026
1027             ],
1028             'vdu_id': 'vdu_1',
1029             'image_file': 'sss',
1030             'dependencies': [
1031
1032             ],
1033             'vls': [
1034
1035             ],
1036             'cps': [
1037
1038             ],
1039             'properties': {
1040                 'key_vdu': '',
1041                 'support_scaling': False,
1042                 'vdu_type': '',
1043                 'name': '',
1044                 'storage_policy': '',
1045                 'location_info': {
1046                     'vimId': '',
1047                     'availability_zone': '',
1048                     'region': '',
1049                     'dc': '',
1050                     'host': '',
1051                     'tenant': ''
1052                 },
1053                 'inject_data_list': [
1054
1055                 ],
1056                 'watchdog': {
1057                     'action': '',
1058                     'enabledelay': ''
1059                 },
1060                 'local_affinity_antiaffinity_rule': {
1061
1062                 },
1063                 'template_id': '1',
1064                 'manual_scale_select_vim': False
1065             },
1066             'description': 'ompvm'
1067         },
1068         {
1069             'volumn_storages': [
1070
1071             ],
1072             'nfv_compute': {
1073                 'mem_size': '',
1074                 'num_cpus': '14'
1075             },
1076             'local_storages': [
1077
1078             ],
1079             'vdu_id': 'vdu_2',
1080             'image_file': 'sss',
1081             'dependencies': [
1082
1083             ],
1084             'vls': [
1085
1086             ],
1087             'cps': [
1088
1089             ],
1090             'properties': {
1091                 'key_vdu': '',
1092                 'support_scaling': False,
1093                 'vdu_type': '',
1094                 'name': '',
1095                 'storage_policy': '',
1096                 'location_info': {
1097                     'vimId': '',
1098                     'availability_zone': '',
1099                     'region': '',
1100                     'dc': '',
1101                     'host': '',
1102                     'tenant': ''
1103                 },
1104                 'inject_data_list': [
1105
1106                 ],
1107                 'watchdog': {
1108                     'action': '',
1109                     'enabledelay': ''
1110                 },
1111                 'local_affinity_antiaffinity_rule': {
1112
1113                 },
1114                 'template_id': '2',
1115                 'manual_scale_select_vim': False
1116             },
1117             'description': 'ompvm'
1118         },
1119         {
1120             'volumn_storages': [
1121
1122             ],
1123             'nfv_compute': {
1124                 'mem_size': '',
1125                 'num_cpus': '14'
1126             },
1127             'local_storages': [
1128
1129             ],
1130             'vdu_id': 'vdu_3',
1131             'image_file': 'sss',
1132             'dependencies': [
1133
1134             ],
1135             'vls': [
1136
1137             ],
1138             'cps': [
1139
1140             ],
1141             'properties': {
1142                 'key_vdu': '',
1143                 'support_scaling': False,
1144                 'vdu_type': '',
1145                 'name': '',
1146                 'storage_policy': '',
1147                 'location_info': {
1148                     'vimId': '',
1149                     'availability_zone': '',
1150                     'region': '',
1151                     'dc': '',
1152                     'host': '',
1153                     'tenant': ''
1154                 },
1155                 'inject_data_list': [
1156
1157                 ],
1158                 'watchdog': {
1159                     'action': '',
1160                     'enabledelay': ''
1161                 },
1162                 'local_affinity_antiaffinity_rule': {
1163
1164                 },
1165                 'template_id': '3',
1166                 'manual_scale_select_vim': False
1167             },
1168             'description': 'ompvm'
1169         },
1170         {
1171             'volumn_storages': [
1172
1173             ],
1174             'nfv_compute': {
1175                 'mem_size': '',
1176                 'num_cpus': '4'
1177             },
1178             'local_storages': [
1179
1180             ],
1181             'vdu_id': 'vdu_10',
1182             'image_file': 'sss',
1183             'dependencies': [
1184
1185             ],
1186             'vls': [
1187
1188             ],
1189             'cps': [
1190
1191             ],
1192             'properties': {
1193                 'key_vdu': '',
1194                 'support_scaling': False,
1195                 'vdu_type': '',
1196                 'name': '',
1197                 'storage_policy': '',
1198                 'location_info': {
1199                     'vimId': '',
1200                     'availability_zone': '',
1201                     'region': '',
1202                     'dc': '',
1203                     'host': '',
1204                     'tenant': ''
1205                 },
1206                 'inject_data_list': [
1207
1208                 ],
1209                 'watchdog': {
1210                     'action': '',
1211                     'enabledelay': ''
1212                 },
1213                 'local_affinity_antiaffinity_rule': {
1214
1215                 },
1216                 'template_id': '10',
1217                 'manual_scale_select_vim': False
1218             },
1219             'description': 'ppvm'
1220         },
1221         {
1222             'volumn_storages': [
1223
1224             ],
1225             'nfv_compute': {
1226                 'mem_size': '',
1227                 'num_cpus': '14'
1228             },
1229             'local_storages': [
1230
1231             ],
1232             'vdu_id': 'vdu_11',
1233             'image_file': 'sss',
1234             'dependencies': [
1235
1236             ],
1237             'vls': [
1238
1239             ],
1240             'cps': [
1241
1242             ],
1243             'properties': {
1244                 'key_vdu': '',
1245                 'support_scaling': False,
1246                 'vdu_type': '',
1247                 'name': '',
1248                 'storage_policy': '',
1249                 'location_info': {
1250                     'vimId': '',
1251                     'availability_zone': '',
1252                     'region': '',
1253                     'dc': '',
1254                     'host': '',
1255                     'tenant': ''
1256                 },
1257                 'inject_data_list': [
1258
1259                 ],
1260                 'watchdog': {
1261                     'action': '',
1262                     'enabledelay': ''
1263                 },
1264                 'local_affinity_antiaffinity_rule': {
1265
1266                 },
1267                 'template_id': '11',
1268                 'manual_scale_select_vim': False
1269             },
1270             'description': 'ppvm'
1271         },
1272         {
1273             'volumn_storages': [
1274
1275             ],
1276             'nfv_compute': {
1277                 'mem_size': '',
1278                 'num_cpus': '14'
1279             },
1280             'local_storages': [
1281
1282             ],
1283             'vdu_id': 'vdu_12',
1284             'image_file': 'sss',
1285             'dependencies': [
1286
1287             ],
1288             'vls': [
1289
1290             ],
1291             'cps': [
1292
1293             ],
1294             'properties': {
1295                 'key_vdu': '',
1296                 'support_scaling': False,
1297                 'vdu_type': '',
1298                 'name': '',
1299                 'storage_policy': '',
1300                 'location_info': {
1301                     'vimId': '',
1302                     'availability_zone': '',
1303                     'region': '',
1304                     'dc': '',
1305                     'host': '',
1306                     'tenant': ''
1307                 },
1308                 'inject_data_list': [
1309
1310                 ],
1311                 'watchdog': {
1312                     'action': '',
1313                     'enabledelay': ''
1314                 },
1315                 'local_affinity_antiaffinity_rule': {
1316
1317                 },
1318                 'template_id': '12',
1319                 'manual_scale_select_vim': False
1320             },
1321             'description': 'ppvm'
1322         }
1323     ],
1324     'volumn_storages': [
1325
1326     ],
1327     'policies': {
1328         'scaling': {
1329             'targets': {
1330
1331             },
1332             'policy_id': 'policy_scale_sss-vnf-template',
1333             'properties': {
1334                 'policy_file': '*-vnfd.zip/*-vnf-policy.xml'
1335             },
1336             'description': ''
1337         }
1338     },
1339     'image_files': [
1340         {
1341             'description': '',
1342             'properties': {
1343                 'name': 'opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
1344                 'checksum': '',
1345                 'disk_format': 'VMDK',
1346                 'file_url': './zte-cn-sss-main-image/OMM/opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
1347                 'container_type': 'vm',
1348                 'version': '',
1349                 'hypervisor_type': 'kvm'
1350             },
1351             'image_file_id': 'opencos_sss_omm_img_release_20150723-1-disk1'
1352         },
1353         {
1354             'description': '',
1355             'properties': {
1356                 'name': 'sss.vmdk',
1357                 'checksum': '',
1358                 'disk_format': 'VMDK',
1359                 'file_url': './zte-cn-sss-main-image/NE/sss.vmdk',
1360                 'container_type': 'vm',
1361                 'version': '',
1362                 'hypervisor_type': 'kvm'
1363             },
1364             'image_file_id': 'sss'
1365         }
1366     ],
1367     'vls': [
1368
1369     ],
1370     'cps': [
1371         {'cp_id': 'cpd_2',
1372          "description": "",
1373          "properties": {
1374              "mac_address": "00:d9:00:82:11:e2",
1375              "ip_address": "10.43.25.3",
1376              "ip_range_start": "192.168.1.20",
1377              "ip_range_end": "192.168.1.29",
1378              "sfc_encapsulation": ""
1379          }
1380          },
1381     ],
1382     'metadata': {
1383         'vendor': 'zte',
1384         'is_shared': False,
1385         'description': '',
1386         'domain_type': 'CN',
1387         'version': 'v4.14.10',
1388         'vmnumber_overquota_alarm': False,
1389         'cross_dc': False,
1390         'vnf_type': 'SSS',
1391         'vnfd_version': 'V00000001',
1392         'id': 'sss-vnf-template',
1393         'name': 'vnfd_2'
1394     },
1395     'vnf_exposed': {
1396         "external_cps": [
1397             {
1398                 "key_name": "virtualLink1",
1399                 "cp_id": "cp1",
1400             },
1401         ],
1402         "forward_cps": [
1403             {
1404                 "key_name": "forwarder2",
1405                 "cp_id": "cpd_2",
1406             },
1407             {
1408                 "key_name": "forwarder3",
1409                 "cp_id": "cpd_2",
1410             },
1411         ],
1412     }
1413 }