72f0b4301f05aa887fef19f0f4f3ff24f9a45070
[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": "cp",
305                     "node_name": "forwarder_brasDP_dcPort",
306                     "capability": "",
307                 },
308                 {
309                     "type": "cp",
310                     "node_name": "forwarder_brasDP_internetPort",
311                     "capability": "",
312                 },
313             ],
314         },
315
316         {
317             "fp_id": "fpd_2",
318             "description": "",
319             "properties": {
320                 "policy": {
321                     "type": "ACL",
322                     "criteria": {
323                         "dest_port_range": [80, 1024],
324                         "source_port_range": [80, 1024],
325                         "ip_protocol": "tcp",
326                         "dest_ip_range": ["192.168.1.2", "192.168.1.100"],
327                         "source_ip_range": ["192.168.1.2", "192.168.1.100"],
328                         "dscp": 100,
329                     },
330                 },
331                 "symmetric": True,
332             },
333             "forwarder_list": [
334
335                 {
336                     "type": "cp",
337                     "node_name": "forwarder_brasDP_internetPort",
338                     "capability": "",
339                 },
340                 {
341                     "type": "cp",
342                     "node_name": "forwarder_brasDP_dcPort",
343                     "capability": "",
344                 },
345                 {
346                     "type": "vnf",
347                     "node_name": "vnf_2",
348                     "capability": "forwarder2",
349                 },
350
351             ],
352         },
353     ],
354
355     "vnffgs": [
356         {
357             "vnffg_id": "vnffg_id1",
358             "description": "",
359             "properties": {
360                 "vendor": "zte",
361                 "version": "1.1.2",
362                 "number_of_endpoints": 7,
363                 "dependent_virtual_link": ["vldId1"],
364                 "connection_point": ["CP01", "CP02"],
365                 "constituent_vnfs": ["vnf_id1", "vnf_id2"],
366                 "constituent_pnfs": ["pnf1", "pnf2"],
367             },
368             "members": ["fpd_1", "fpd_2"],
369         }
370     ],
371
372     "server_groups": [
373         {
374             "group_id": "",
375             "description": "",
376             "properties": {
377                 "name": "server_group1",
378                 "affinity_antiaffinity": "anti-affinity",
379                 "scope": "host",
380             },
381             "members": ["vnf1", "vnf2"],
382         },
383     ],
384
385     "ns_exposed": {
386         "external_cps": [
387             {
388                 "key_name": "virtualLink1",
389                 "cp_id": "cp1",
390             },
391         ],
392         "forward_cps": [
393             {
394                 "key_name": "forwarder_brasDP_userPort",
395                 "cp_id": "cpd_1",
396             },
397             {
398                 "key_name": "forwarder_brasDP_internetPort",
399                 "cp_id": "cpd_4",
400             },
401             {
402                 "key_name": "forwarder_brasDP_dcPort",
403                 "cp_id": "cpd_5",
404             },
405
406         ],
407     },
408
409     "policies": [
410         {
411             "scaling": [
412                 {
413                     "policy_id": "id1",
414                     "description": "",
415                     "properties": {
416                         "policy_file": "Policies/ns1-policy.xml",
417                     },
418                     "targets": ['pfu_vm'],
419                 },
420             ],
421         },
422     ],
423
424     "ns_flavours": [
425         {
426             "flavour_id": "flavour1",
427             "description": "",
428             "vnf_profiles": [
429                 {
430                     "vnf_id": "vnf1",
431                     "flavour_id": "flavour1",
432                     "instances_minimum_number": 1,
433                     "instances_maximum_number": 4,
434                     "local_affinity_antiaffinity_rule": [
435                         {
436                             "affinity_antiaffinity": "affinity",
437                             "scope": "node",
438                         }
439                     ]
440                 },
441             ],
442             "pnf_profiles": [
443                 {
444                     "pnf_id": "pnf1",
445                 },
446             ],
447             "vl_profiles": [
448                 {
449                     "vl_id": "vlid1",
450                     "bitrate_requirements": {
451                         "root": 1000,
452                         "leaf": 100
453                     },
454                     "qos": {
455                         "maximum_latency": "1 ms",
456                         "maximum_jitter": "10 ms",
457                         "maximum_packet_loss_ratio": 0.5
458                     },
459                 }
460             ],
461             "instantiation_levels": [
462                 {
463                     "id": "instLevel1",
464                     "description": "",
465                     "vnf_levels": [
466                         {
467                             "vnf_id": "",
468                             "vnf_instantiation_level": "small",
469                             "instances_number": 1
470                         },
471                     ],
472                     "scale_level_id": "scaleLevel1",
473                 }
474             ],
475             "default_instantiation_level": "instLevel1",
476             "scale_levels": [
477                 {
478                     "id": "scaleLevel1",
479                     "order": 1,
480                     "vnf_levels": [
481                         {
482                             "vnf_id": "",
483                             "vnf_instantiation_level": "small",
484                             "instances_number": 1
485                         },
486                     ],
487                 },
488             ],
489             "supported_operations": ["Scale", "Heal"],
490             "affinity_antiaffinity_groups": [
491                 {
492                     "group_id": "group1Id",
493                     "name": "groupName",
494                     "affinity_antiaffinity": "affinity",
495                     "scope": "node",
496                     "members": [
497                         "vnfId1", "vnfIdN",
498                     ],
499                 },
500             ],
501         },
502     ],
503 }
504 vnfd_model_dict1 = {
505
506     'vdus': [
507         {
508             'volumn_storages': [
509
510             ],
511             'nfv_compute': {
512                 'mem_size': '',
513                 'num_cpus': u'2'
514             },
515             'local_storages': [
516
517             ],
518             'vdu_id': u'vdu_omm.001',
519             'image_file': u'opencos_sss_omm_img_release_20150723-1-disk1',
520             'dependencies': [
521
522             ],
523             'vls': [
524
525             ],
526             'cps': [
527
528             ],
529             'properties': {
530                 'key_vdu': '',
531                 'support_scaling': False,
532                 'vdu_type': '',
533                 'name': '',
534                 'storage_policy': '',
535                 'location_info': {
536                     'vimId': '',
537                     'availability_zone': '',
538                     'region': '',
539                     'dc': '',
540                     'host': '',
541                     'tenant': ''
542                 },
543                 'inject_data_list': [
544
545                 ],
546                 'watchdog': {
547                     'action': '',
548                     'enabledelay': ''
549                 },
550                 'local_affinity_antiaffinity_rule': {
551
552                 },
553                 'template_id': u'omm.001',
554                 'manual_scale_select_vim': False
555             },
556             'description': u'singleommvm'
557         },
558         {
559             'volumn_storages': [
560
561             ],
562             'nfv_compute': {
563                 'mem_size': '',
564                 'num_cpus': u'4'
565             },
566             'local_storages': [
567
568             ],
569             'vdu_id': u'vdu_1',
570             'image_file': u'sss',
571             'dependencies': [
572
573             ],
574             'vls': [
575
576             ],
577             'cps': [
578
579             ],
580             'properties': {
581                 'key_vdu': '',
582                 'support_scaling': False,
583                 'vdu_type': '',
584                 'name': '',
585                 'storage_policy': '',
586                 'location_info': {
587                     'vimId': '',
588                     'availability_zone': '',
589                     'region': '',
590                     'dc': '',
591                     'host': '',
592                     'tenant': ''
593                 },
594                 'inject_data_list': [
595
596                 ],
597                 'watchdog': {
598                     'action': '',
599                     'enabledelay': ''
600                 },
601                 'local_affinity_antiaffinity_rule': {
602
603                 },
604                 'template_id': u'1',
605                 'manual_scale_select_vim': False
606             },
607             'description': u'ompvm'
608         },
609         {
610             'volumn_storages': [
611
612             ],
613             'nfv_compute': {
614                 'mem_size': '',
615                 'num_cpus': u'14'
616             },
617             'local_storages': [
618
619             ],
620             'vdu_id': u'vdu_2',
621             'image_file': u'sss',
622             'dependencies': [
623
624             ],
625             'vls': [
626
627             ],
628             'cps': [
629
630             ],
631             'properties': {
632                 'key_vdu': '',
633                 'support_scaling': False,
634                 'vdu_type': '',
635                 'name': '',
636                 'storage_policy': '',
637                 'location_info': {
638                     'vimId': '',
639                     'availability_zone': '',
640                     'region': '',
641                     'dc': '',
642                     'host': '',
643                     'tenant': ''
644                 },
645                 'inject_data_list': [
646
647                 ],
648                 'watchdog': {
649                     'action': '',
650                     'enabledelay': ''
651                 },
652                 'local_affinity_antiaffinity_rule': {
653
654                 },
655                 'template_id': u'2',
656                 'manual_scale_select_vim': False
657             },
658             'description': u'ompvm'
659         },
660         {
661             'volumn_storages': [
662
663             ],
664             'nfv_compute': {
665                 'mem_size': '',
666                 'num_cpus': u'14'
667             },
668             'local_storages': [
669
670             ],
671             'vdu_id': u'vdu_3',
672             'image_file': u'sss',
673             'dependencies': [
674
675             ],
676             'vls': [
677
678             ],
679             'cps': [
680
681             ],
682             'properties': {
683                 'key_vdu': '',
684                 'support_scaling': False,
685                 'vdu_type': '',
686                 'name': '',
687                 'storage_policy': '',
688                 'location_info': {
689                     'vimId': '',
690                     'availability_zone': '',
691                     'region': '',
692                     'dc': '',
693                     'host': '',
694                     'tenant': ''
695                 },
696                 'inject_data_list': [
697
698                 ],
699                 'watchdog': {
700                     'action': '',
701                     'enabledelay': ''
702                 },
703                 'local_affinity_antiaffinity_rule': {
704
705                 },
706                 'template_id': u'3',
707                 'manual_scale_select_vim': False
708             },
709             'description': u'ompvm'
710         },
711         {
712             'volumn_storages': [
713
714             ],
715             'nfv_compute': {
716                 'mem_size': '',
717                 'num_cpus': u'4'
718             },
719             'local_storages': [
720
721             ],
722             'vdu_id': u'vdu_10',
723             'image_file': u'sss',
724             'dependencies': [
725
726             ],
727             'vls': [
728
729             ],
730             'cps': [
731
732             ],
733             'properties': {
734                 'key_vdu': '',
735                 'support_scaling': False,
736                 'vdu_type': '',
737                 'name': '',
738                 'storage_policy': '',
739                 'location_info': {
740                     'vimId': '',
741                     'availability_zone': '',
742                     'region': '',
743                     'dc': '',
744                     'host': '',
745                     'tenant': ''
746                 },
747                 'inject_data_list': [
748
749                 ],
750                 'watchdog': {
751                     'action': '',
752                     'enabledelay': ''
753                 },
754                 'local_affinity_antiaffinity_rule': {
755
756                 },
757                 'template_id': u'10',
758                 'manual_scale_select_vim': False
759             },
760             'description': u'ppvm'
761         },
762         {
763             'volumn_storages': [
764
765             ],
766             'nfv_compute': {
767                 'mem_size': '',
768                 'num_cpus': u'14'
769             },
770             'local_storages': [
771
772             ],
773             'vdu_id': u'vdu_11',
774             'image_file': u'sss',
775             'dependencies': [
776
777             ],
778             'vls': [
779
780             ],
781             'cps': [
782
783             ],
784             'properties': {
785                 'key_vdu': '',
786                 'support_scaling': False,
787                 'vdu_type': '',
788                 'name': '',
789                 'storage_policy': '',
790                 'location_info': {
791                     'vimId': '',
792                     'availability_zone': '',
793                     'region': '',
794                     'dc': '',
795                     'host': '',
796                     'tenant': ''
797                 },
798                 'inject_data_list': [
799
800                 ],
801                 'watchdog': {
802                     'action': '',
803                     'enabledelay': ''
804                 },
805                 'local_affinity_antiaffinity_rule': {
806
807                 },
808                 'template_id': u'11',
809                 'manual_scale_select_vim': False
810             },
811             'description': u'ppvm'
812         },
813         {
814             'volumn_storages': [
815
816             ],
817             'nfv_compute': {
818                 'mem_size': '',
819                 'num_cpus': u'14'
820             },
821             'local_storages': [
822
823             ],
824             'vdu_id': u'vdu_12',
825             'image_file': u'sss',
826             'dependencies': [
827
828             ],
829             'vls': [
830
831             ],
832             'cps': [
833
834             ],
835             'properties': {
836                 'key_vdu': '',
837                 'support_scaling': False,
838                 'vdu_type': '',
839                 'name': '',
840                 'storage_policy': '',
841                 'location_info': {
842                     'vimId': '',
843                     'availability_zone': '',
844                     'region': '',
845                     'dc': '',
846                     'host': '',
847                     'tenant': ''
848                 },
849                 'inject_data_list': [
850
851                 ],
852                 'watchdog': {
853                     'action': '',
854                     'enabledelay': ''
855                 },
856                 'local_affinity_antiaffinity_rule': {
857
858                 },
859                 'template_id': u'12',
860                 'manual_scale_select_vim': False
861             },
862             'description': u'ppvm'
863         }
864     ],
865     'volumn_storages': [
866
867     ],
868     'policies': {
869         'scaling': {
870             'targets': {
871
872             },
873             'policy_id': u'policy_scale_sss-vnf-template',
874             'properties': {
875                 'policy_file': '*-vnfd.zip/*-vnf-policy.xml'
876             },
877             'description': ''
878         }
879     },
880     'image_files': [
881         {
882             'description': '',
883             'properties': {
884                 'name': u'opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
885                 'checksum': '',
886                 'disk_format': u'VMDK',
887                 'file_url': u'./zte-cn-sss-main-image/OMM/opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
888                 'container_type': 'vm',
889                 'version': '',
890                 'hypervisor_type': 'kvm'
891             },
892             'image_file_id': u'opencos_sss_omm_img_release_20150723-1-disk1'
893         },
894         {
895             'description': '',
896             'properties': {
897                 'name': u'sss.vmdk',
898                 'checksum': '',
899                 'disk_format': u'VMDK',
900                 'file_url': u'./zte-cn-sss-main-image/NE/sss.vmdk',
901                 'container_type': 'vm',
902                 'version': '',
903                 'hypervisor_type': 'kvm'
904             },
905             'image_file_id': u'sss'
906         }
907     ],
908     'vls': [
909
910     ],
911     'cps': [
912         {'cp_id': 'cpd_1',
913          "description": "",
914          "properties": {
915              "mac_address": "00:d9:00:82:11:e1",
916              "ip_address": "10.43.25.2",
917              "ip_range_start": "192.168.1.20",
918              "ip_range_end": "192.168.1.29",
919              "sfc_encapsulation": ""
920          }
921          },
922     ],
923     'metadata': {
924         'vendor': u'zte',
925         'is_shared': False,
926         'description': '',
927         'domain_type': u'CN',
928         'version': u'v4.14.10',
929         'vmnumber_overquota_alarm': False,
930         'cross_dc': False,
931         'vnf_type': u'SSS',
932         'vnfd_version': u'V00000001',
933         'id': u'vnfd_2',
934         'name': u'sss-vnf-template'
935     },
936
937     'vnf_exposed': {
938         "external_cps": [
939             {
940                 "key_name": "virtualLink1",
941                 "cp_id": "cp1",
942             },
943         ],
944         "forward_cps": [
945             {
946                 "key_name": "forwarder1",
947                 "cp_id": "cpd_1",
948             },
949             {
950                 "key_name": "forwarder2",
951                 "cp_id": "cpd_2",
952             },
953         ],
954     }
955 }
956 vnfd_model_dict2 = {
957     'local_storages': [
958
959     ],
960     'vdus': [
961         {
962             'volumn_storages': [
963
964             ],
965             'nfv_compute': {
966                 'mem_size': '',
967                 'num_cpus': u'2'
968             },
969             'local_storages': [
970
971             ],
972             'vdu_id': u'vdu_omm.001',
973             'image_file': u'opencos_sss_omm_img_release_20150723-1-disk1',
974             'dependencies': [
975
976             ],
977             'vls': [
978
979             ],
980             'cps': [
981
982             ],
983             'properties': {
984                 'key_vdu': '',
985                 'support_scaling': False,
986                 'vdu_type': '',
987                 'name': '',
988                 'storage_policy': '',
989                 'location_info': {
990                     'vimId': '',
991                     'availability_zone': '',
992                     'region': '',
993                     'dc': '',
994                     'host': '',
995                     'tenant': ''
996                 },
997                 'inject_data_list': [
998
999                 ],
1000                 'watchdog': {
1001                     'action': '',
1002                     'enabledelay': ''
1003                 },
1004                 'local_affinity_antiaffinity_rule': {
1005
1006                 },
1007                 'template_id': u'omm.001',
1008                 'manual_scale_select_vim': False
1009             },
1010             'description': u'singleommvm'
1011         },
1012         {
1013             'volumn_storages': [
1014
1015             ],
1016             'nfv_compute': {
1017                 'mem_size': '',
1018                 'num_cpus': u'4'
1019             },
1020             'local_storages': [
1021
1022             ],
1023             'vdu_id': u'vdu_1',
1024             'image_file': u'sss',
1025             'dependencies': [
1026
1027             ],
1028             'vls': [
1029
1030             ],
1031             'cps': [
1032
1033             ],
1034             'properties': {
1035                 'key_vdu': '',
1036                 'support_scaling': False,
1037                 'vdu_type': '',
1038                 'name': '',
1039                 'storage_policy': '',
1040                 'location_info': {
1041                     'vimId': '',
1042                     'availability_zone': '',
1043                     'region': '',
1044                     'dc': '',
1045                     'host': '',
1046                     'tenant': ''
1047                 },
1048                 'inject_data_list': [
1049
1050                 ],
1051                 'watchdog': {
1052                     'action': '',
1053                     'enabledelay': ''
1054                 },
1055                 'local_affinity_antiaffinity_rule': {
1056
1057                 },
1058                 'template_id': u'1',
1059                 'manual_scale_select_vim': False
1060             },
1061             'description': u'ompvm'
1062         },
1063         {
1064             'volumn_storages': [
1065
1066             ],
1067             'nfv_compute': {
1068                 'mem_size': '',
1069                 'num_cpus': u'14'
1070             },
1071             'local_storages': [
1072
1073             ],
1074             'vdu_id': u'vdu_2',
1075             'image_file': u'sss',
1076             'dependencies': [
1077
1078             ],
1079             'vls': [
1080
1081             ],
1082             'cps': [
1083
1084             ],
1085             'properties': {
1086                 'key_vdu': '',
1087                 'support_scaling': False,
1088                 'vdu_type': '',
1089                 'name': '',
1090                 'storage_policy': '',
1091                 'location_info': {
1092                     'vimId': '',
1093                     'availability_zone': '',
1094                     'region': '',
1095                     'dc': '',
1096                     'host': '',
1097                     'tenant': ''
1098                 },
1099                 'inject_data_list': [
1100
1101                 ],
1102                 'watchdog': {
1103                     'action': '',
1104                     'enabledelay': ''
1105                 },
1106                 'local_affinity_antiaffinity_rule': {
1107
1108                 },
1109                 'template_id': u'2',
1110                 'manual_scale_select_vim': False
1111             },
1112             'description': u'ompvm'
1113         },
1114         {
1115             'volumn_storages': [
1116
1117             ],
1118             'nfv_compute': {
1119                 'mem_size': '',
1120                 'num_cpus': u'14'
1121             },
1122             'local_storages': [
1123
1124             ],
1125             'vdu_id': u'vdu_3',
1126             'image_file': u'sss',
1127             'dependencies': [
1128
1129             ],
1130             'vls': [
1131
1132             ],
1133             'cps': [
1134
1135             ],
1136             'properties': {
1137                 'key_vdu': '',
1138                 'support_scaling': False,
1139                 'vdu_type': '',
1140                 'name': '',
1141                 'storage_policy': '',
1142                 'location_info': {
1143                     'vimId': '',
1144                     'availability_zone': '',
1145                     'region': '',
1146                     'dc': '',
1147                     'host': '',
1148                     'tenant': ''
1149                 },
1150                 'inject_data_list': [
1151
1152                 ],
1153                 'watchdog': {
1154                     'action': '',
1155                     'enabledelay': ''
1156                 },
1157                 'local_affinity_antiaffinity_rule': {
1158
1159                 },
1160                 'template_id': u'3',
1161                 'manual_scale_select_vim': False
1162             },
1163             'description': u'ompvm'
1164         },
1165         {
1166             'volumn_storages': [
1167
1168             ],
1169             'nfv_compute': {
1170                 'mem_size': '',
1171                 'num_cpus': u'4'
1172             },
1173             'local_storages': [
1174
1175             ],
1176             'vdu_id': u'vdu_10',
1177             'image_file': u'sss',
1178             'dependencies': [
1179
1180             ],
1181             'vls': [
1182
1183             ],
1184             'cps': [
1185
1186             ],
1187             'properties': {
1188                 'key_vdu': '',
1189                 'support_scaling': False,
1190                 'vdu_type': '',
1191                 'name': '',
1192                 'storage_policy': '',
1193                 'location_info': {
1194                     'vimId': '',
1195                     'availability_zone': '',
1196                     'region': '',
1197                     'dc': '',
1198                     'host': '',
1199                     'tenant': ''
1200                 },
1201                 'inject_data_list': [
1202
1203                 ],
1204                 'watchdog': {
1205                     'action': '',
1206                     'enabledelay': ''
1207                 },
1208                 'local_affinity_antiaffinity_rule': {
1209
1210                 },
1211                 'template_id': u'10',
1212                 'manual_scale_select_vim': False
1213             },
1214             'description': u'ppvm'
1215         },
1216         {
1217             'volumn_storages': [
1218
1219             ],
1220             'nfv_compute': {
1221                 'mem_size': '',
1222                 'num_cpus': u'14'
1223             },
1224             'local_storages': [
1225
1226             ],
1227             'vdu_id': u'vdu_11',
1228             'image_file': u'sss',
1229             'dependencies': [
1230
1231             ],
1232             'vls': [
1233
1234             ],
1235             'cps': [
1236
1237             ],
1238             'properties': {
1239                 'key_vdu': '',
1240                 'support_scaling': False,
1241                 'vdu_type': '',
1242                 'name': '',
1243                 'storage_policy': '',
1244                 'location_info': {
1245                     'vimId': '',
1246                     'availability_zone': '',
1247                     'region': '',
1248                     'dc': '',
1249                     'host': '',
1250                     'tenant': ''
1251                 },
1252                 'inject_data_list': [
1253
1254                 ],
1255                 'watchdog': {
1256                     'action': '',
1257                     'enabledelay': ''
1258                 },
1259                 'local_affinity_antiaffinity_rule': {
1260
1261                 },
1262                 'template_id': u'11',
1263                 'manual_scale_select_vim': False
1264             },
1265             'description': u'ppvm'
1266         },
1267         {
1268             'volumn_storages': [
1269
1270             ],
1271             'nfv_compute': {
1272                 'mem_size': '',
1273                 'num_cpus': u'14'
1274             },
1275             'local_storages': [
1276
1277             ],
1278             'vdu_id': u'vdu_12',
1279             'image_file': u'sss',
1280             'dependencies': [
1281
1282             ],
1283             'vls': [
1284
1285             ],
1286             'cps': [
1287
1288             ],
1289             'properties': {
1290                 'key_vdu': '',
1291                 'support_scaling': False,
1292                 'vdu_type': '',
1293                 'name': '',
1294                 'storage_policy': '',
1295                 'location_info': {
1296                     'vimId': '',
1297                     'availability_zone': '',
1298                     'region': '',
1299                     'dc': '',
1300                     'host': '',
1301                     'tenant': ''
1302                 },
1303                 'inject_data_list': [
1304
1305                 ],
1306                 'watchdog': {
1307                     'action': '',
1308                     'enabledelay': ''
1309                 },
1310                 'local_affinity_antiaffinity_rule': {
1311
1312                 },
1313                 'template_id': u'12',
1314                 'manual_scale_select_vim': False
1315             },
1316             'description': u'ppvm'
1317         }
1318     ],
1319     'volumn_storages': [
1320
1321     ],
1322     'policies': {
1323         'scaling': {
1324             'targets': {
1325
1326             },
1327             'policy_id': u'policy_scale_sss-vnf-template',
1328             'properties': {
1329                 'policy_file': '*-vnfd.zip/*-vnf-policy.xml'
1330             },
1331             'description': ''
1332         }
1333     },
1334     'image_files': [
1335         {
1336             'description': '',
1337             'properties': {
1338                 'name': u'opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
1339                 'checksum': '',
1340                 'disk_format': u'VMDK',
1341                 'file_url': u'./zte-cn-sss-main-image/OMM/opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
1342                 'container_type': 'vm',
1343                 'version': '',
1344                 'hypervisor_type': 'kvm'
1345             },
1346             'image_file_id': u'opencos_sss_omm_img_release_20150723-1-disk1'
1347         },
1348         {
1349             'description': '',
1350             'properties': {
1351                 'name': u'sss.vmdk',
1352                 'checksum': '',
1353                 'disk_format': u'VMDK',
1354                 'file_url': u'./zte-cn-sss-main-image/NE/sss.vmdk',
1355                 'container_type': 'vm',
1356                 'version': '',
1357                 'hypervisor_type': 'kvm'
1358             },
1359             'image_file_id': u'sss'
1360         }
1361     ],
1362     'vls': [
1363
1364     ],
1365     'cps': [
1366         {'cp_id': 'cpd_2',
1367          "description": "",
1368          "properties": {
1369              "mac_address": "00:d9:00:82:11:e2",
1370              "ip_address": "10.43.25.3",
1371              "ip_range_start": "192.168.1.20",
1372              "ip_range_end": "192.168.1.29",
1373              "sfc_encapsulation": ""
1374          }
1375          },
1376     ],
1377     'metadata': {
1378         'vendor': u'zte',
1379         'is_shared': False,
1380         'description': '',
1381         'domain_type': u'CN',
1382         'version': u'v4.14.10',
1383         'vmnumber_overquota_alarm': False,
1384         'cross_dc': False,
1385         'vnf_type': u'SSS',
1386         'vnfd_version': u'V00000001',
1387         'id': u'sss-vnf-template',
1388         'name': u'vnfd_2'
1389     },
1390     'vnf_exposed': {
1391         "external_cps": [
1392             {
1393                 "key_name": "virtualLink1",
1394                 "cp_id": "cp1",
1395             },
1396         ],
1397         "forward_cps": [
1398             {
1399                 "key_name": "forwarder2",
1400                 "cp_id": "cpd_2",
1401             },
1402             {
1403                 "key_name": "forwarder3",
1404                 "cp_id": "cpd_2",
1405             },
1406         ],
1407     }
1408 }