1 # Copyright 2016-2017 ZTE Corporation.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
18 from django.test import TestCase, Client
19 from rest_framework import status
21 from lcm.ns.vnfs import create_vnfs
22 from lcm.ns.vnfs.const import VNF_STATUS, INST_TYPE
23 from lcm.ns.vnfs.create_vnfs import CreateVnfs
24 from lcm.ns.vnfs.heal_vnfs import NFHealService
25 from lcm.ns.vnfs.scale_vnfs import NFManualScaleService
26 from lcm.ns.vnfs.terminate_nfs import TerminateVnfs
27 from lcm.pub.database.models import NfInstModel, JobModel, NSInstModel, VmInstModel
28 from lcm.pub.exceptions import NSLCMException
29 from lcm.pub.utils import restcall
30 from lcm.pub.utils.jobutil import JOB_MODEL_STATUS
31 from lcm.pub.utils.jobutil import JobUtil, JOB_TYPE
32 from lcm.pub.utils.timeutil import now_time
33 from lcm.pub.utils.values import ignore_case_get
36 class TestGetVnfViews(TestCase):
38 self.client = Client()
39 self.nf_inst_id = str(uuid.uuid4())
40 NfInstModel(nfinstid=self.nf_inst_id, nf_name='vnf1', vnfm_inst_id='1', vnf_id='vnf_id1',
41 status=VNF_STATUS.ACTIVE, create_time=now_time(), lastuptime=now_time()).save()
44 NfInstModel.objects.all().delete()
46 def test_get_vnf(self):
47 response = self.client.get("/api/nslcm/v1/ns/vnfs/%s" % self.nf_inst_id)
48 self.failUnlessEqual(status.HTTP_200_OK, response.status_code)
49 context = json.loads(response.content)
50 self.failUnlessEqual(self.nf_inst_id, context['vnfInstId'])
53 class TestCreateVnfViews(TestCase):
55 self.ns_inst_id = str(uuid.uuid4())
56 self.job_id = str(uuid.uuid4())
58 "nsInstanceId": self.ns_inst_id,
59 "additionalParamForNs": {
60 "inputs": json.dumps({
64 "additionalParamForVnf": [
66 "vnfprofileid": "VBras",
68 "inputs": json.dumps({
72 "vnfminstanceid": "1",
79 self.client = Client()
80 NSInstModel(id=self.ns_inst_id, name='ns', nspackage_id='1', nsd_id='nsd_id', description='description',
81 status='instantiating', nsd_model=json.dumps(nsd_model_dict), create_time=now_time(),
82 lastuptime=now_time()).save()
85 NfInstModel.objects.all().delete()
86 JobModel.objects.all().delete()
88 @mock.patch.object(CreateVnfs, 'run')
89 def test_create_vnf(self, mock_run):
90 response = self.client.post("/api/nslcm/v1/ns/vnfs", data=self.data)
91 self.failUnlessEqual(status.HTTP_202_ACCEPTED, response.status_code)
92 context = json.loads(response.content)
93 self.assertTrue(NfInstModel.objects.filter(nfinstid=context['vnfInstId']).exists())
95 @mock.patch.object(restcall, 'call_req')
96 def test_create_vnf_thread(self, mock_call_req):
97 nf_inst_id, job_id = create_vnfs.prepare_create_params()
99 "/api/ztevnfmdriver/v1/1/vnfs":
100 [0, json.JSONEncoder().encode({"jobId": self.job_id, "vnfInstanceId": 3}), '200'],
101 "/api/catalog/v1/vnfpackages/zte_vbras":
102 [0, json.JSONEncoder().encode(nf_package_info), '200'],
103 "/external-system/esr-vnfm-list/esr-vnfm/1?depth=all":
104 [0, json.JSONEncoder().encode(vnfm_info), '200'],
105 "/api/resmgr/v1/vnf":
106 [0, json.JSONEncoder().encode({}), '200'],
107 "/api/resmgr/v1/vnfinfo":
108 [0, json.JSONEncoder().encode({}), '200'],
109 "/network/generic-vnfs/generic-vnf/%s" % nf_inst_id:
110 [0, json.JSONEncoder().encode({}), '201'],
111 "/cloud-infrastructure/cloud-regions/cloud-region/zte/test?depth=all":
112 [0, json.JSONEncoder().encode(vim_info), '201'],
113 "/cloud-infrastructure/cloud-regions/cloud-region/zte/test/tenants/tenant/admin/vservers/vserver/1":
114 [0, json.JSONEncoder().encode({}), '201'],
115 "/api/ztevnfmdriver/v1/1/jobs/" + self.job_id + "?responseId=0":
116 [0, json.JSONEncoder().encode({"jobid": self.job_id,
117 "responsedescriptor": {"progress": "100",
118 "status": JOB_MODEL_STATUS.FINISHED,
120 "statusdescription": "creating",
122 "responsehistorylist": [
124 "status": JOB_MODEL_STATUS.PROCESSING,
126 "statusdescription": "creating",
127 "errorcode": "0"}]}}), '200']}
129 def side_effect(*args):
130 return mock_vals[args[4]]
131 mock_call_req.side_effect = side_effect
133 'ns_instance_id': ignore_case_get(self.data, 'nsInstanceId'),
134 'additional_param_for_ns': ignore_case_get(self.data, 'additionalParamForNs'),
135 'additional_param_for_vnf': ignore_case_get(self.data, 'additionalParamForVnf'),
136 'vnf_index': ignore_case_get(self.data, 'vnfIndex')
138 CreateVnfs(data, nf_inst_id, job_id).run()
139 self.assertTrue(NfInstModel.objects.get(nfinstid=nf_inst_id).status, VNF_STATUS.ACTIVE)
142 class TestTerminateVnfViews(TestCase):
144 self.client = Client()
145 self.ns_inst_id = str(uuid.uuid4())
146 self.nf_inst_id = '1'
147 self.vnffg_id = str(uuid.uuid4())
148 self.vim_id = str(uuid.uuid4())
149 self.job_id = str(uuid.uuid4())
151 self.tenant = "tenantname"
155 "vnfdName": "PGW001",
156 "vnfProvider": "zte",
157 "vnfdVersion": "V00001",
158 "vnfVersion": "V5.10.20",
161 "description": "PGW VNFD description",
163 "vnfExtendType": "driver"
166 NSInstModel.objects.all().delete()
167 NfInstModel.objects.all().delete()
168 VmInstModel.objects.all().delete()
169 NSInstModel(id=self.ns_inst_id, name="ns_name").save()
170 NfInstModel.objects.create(nfinstid=self.nf_inst_id,
174 ns_inst_id='111,2-2-2',
181 mnfinstid=self.nf_uuid,
183 vnfd_model=self.vnfd_model)
184 VmInstModel.objects.create(vmid="1",
187 insttype=INST_TYPE.VNF,
188 instid=self.nf_inst_id,
193 NSInstModel.objects.all().delete()
194 NfInstModel.objects.all().delete()
196 @mock.patch.object(TerminateVnfs, 'run')
197 def test_terminate_vnf_url(self, mock_run):
199 "terminationType": "forceful",
200 "gracefulTerminationTimeout": "600"}
202 response = self.client.post("/api/nslcm/v1/ns/vnfs/%s" % self.nf_inst_id, data=req_data)
203 self.failUnlessEqual(status.HTTP_201_CREATED, response.status_code)
205 @mock.patch.object(restcall, 'call_req')
206 def test_terminate_vnf(self, mock_call_req):
207 job_id = JobUtil.create_job("VNF", JOB_TYPE.TERMINATE_VNF, self.nf_inst_id)
209 nfinst = NfInstModel.objects.filter(nfinstid=self.nf_inst_id)
211 self.failUnlessEqual(1, 1)
213 self.failUnlessEqual(1, 0)
216 "vnf-id": "vnf-id-test111",
217 "vnf-name": "vnf-name-test111",
218 "vnf-type": "vnf-type-test111",
220 "is-closed-loop-disabled": False,
221 "resource-version": "1505465356262"
225 "responsedescriptor": {
227 "status": JOB_MODEL_STATUS.FINISHED,
229 "statusdescription": "creating",
231 "responsehistorylist": [
234 "status": JOB_MODEL_STATUS.PROCESSING,
236 "statusdescription": "creating",
244 "/external-system/esr-vnfm-list/esr-vnfm/1?depth=all":
245 [0, json.JSONEncoder().encode(vnfm_info), '200'],
246 "/api/ztevnfmdriver/v1/1/vnfs/111/terminate":
247 [0, json.JSONEncoder().encode({"jobId": job_id}), '200'],
248 "/api/resmgr/v1/vnf/1":
249 [0, json.JSONEncoder().encode({"jobId": job_id}), '200'],
250 "/cloud-infrastructure/cloud-regions/cloud-region/zte/test?depth=all":
251 [0, json.JSONEncoder().encode(vim_info), '201'],
252 "/cloud-infrastructure/cloud-regions/cloud-region/zte/test/tenants/tenant/admin/vservers/vserver/1?depth=all":
253 [0, json.JSONEncoder().encode(vserver_info), '201'],
254 "/cloud-infrastructure/cloud-regions/cloud-region/zte/test/tenants/tenant/admin/vservers/vserver/1?resource-version=1505465356263":
255 [0, json.JSONEncoder().encode({}), '200'],
256 "/api/ztevnfmdriver/v1/1/jobs/" + job_id + "?responseId=0":
257 [0, json.JSONEncoder().encode(job_info), '200'],
258 "/network/generic-vnfs/generic-vnf/1?depth=all":
259 [0, json.JSONEncoder().encode(vnf_info), '200'],
260 "/network/generic-vnfs/generic-vnf/1?resource-version=1505465356262":
261 [0, json.JSONEncoder().encode({}), '200']
264 def side_effect(*args):
265 return mock_vals[args[4]]
266 mock_call_req.side_effect = side_effect
269 "terminationType": "forceful",
270 "gracefulTerminationTimeout": "600"
273 TerminateVnfs(req_data, self.nf_inst_id, job_id).run()
274 nfinst = NfInstModel.objects.filter(nfinstid=self.nf_inst_id)
276 self.failUnlessEqual(1, 0)
278 self.failUnlessEqual(1, 1)
281 class TestScaleVnfViews(TestCase):
283 self.client = Client()
284 self.ns_inst_id = str(uuid.uuid4())
285 self.nf_inst_id = str(uuid.uuid4())
286 self.vnffg_id = str(uuid.uuid4())
287 self.vim_id = str(uuid.uuid4())
288 self.job_id = str(uuid.uuid4())
290 self.tenant = "tenantname"
291 NSInstModel(id=self.ns_inst_id, name="ns_name").save()
292 NfInstModel.objects.create(nfinstid=self.nf_inst_id, nf_name='name_1', vnf_id='1',
293 vnfm_inst_id='1', ns_inst_id='111,2-2-2',
294 max_cpu='14', max_ram='12296', max_hd='101', max_shd="20", max_net=10,
295 status='active', mnfinstid=self.nf_uuid, package_id='pkg1',
296 vnfd_model='{"metadata": {"vnfdId": "1","vnfdName": "PGW001",'
297 '"vnfProvider": "zte","vnfdVersion": "V00001","vnfVersion": "V5.10.20",'
298 '"productType": "CN","vnfType": "PGW",'
299 '"description": "PGW VNFD description",'
300 '"isShared":true,"vnfExtendType":"driver"}}')
303 NSInstModel.objects.all().delete()
304 NfInstModel.objects.all().delete()
306 def test_scale_vnf(self):
309 "flavour_id": "flavour1",
314 "instances_minimum_number": 1,
315 "instances_maximum_number": 4,
316 "local_affinity_antiaffinity_rule": [
318 "affinity_antiaffinity": "affinity",
327 "name": "demo_aspect",
328 "description": "demo_aspect",
329 "associated_group": "elementGroup1",
335 "group_id": "elementGroup1",
338 "name": "elementGroup1",
340 "members": ["gsu_vm", "pfu_vm"]
348 "aspectId": "demo_aspect1",
350 "additionalParam": vnfd_info
354 "aspectId": "demo_aspect2",
356 "additionalParam": vnfd_info
361 NFManualScaleService(self.nf_inst_id, req_data).run()
362 nsIns = NfInstModel.objects.filter(nfinstid=self.nf_inst_id)
363 self.assertIsNotNone(nsIns)
365 @mock.patch.object(NFManualScaleService, "send_nf_scaling_request")
366 def test_scale_vnf_success(self, mock_send_nf_scaling_request):
369 "flavour_id": "flavour1",
374 "instances_minimum_number": 1,
375 "instances_maximum_number": 4,
376 "local_affinity_antiaffinity_rule": [
378 "affinity_antiaffinity": "affinity",
387 "name": "demo_aspect",
388 "description": "demo_aspect",
389 "associated_group": "elementGroup1",
395 "group_id": "elementGroup1",
398 "name": "elementGroup1",
400 "members": ["gsu_vm", "pfu_vm"]
408 "aspectId": "demo_aspect1",
410 "additionalParam": vnfd_info
414 "aspectId": "demo_aspect2",
416 "additionalParam": vnfd_info
420 scale_service = NFManualScaleService(self.nf_inst_id, req_data)
422 nsIns = NfInstModel.objects.filter(nfinstid=self.nf_inst_id)
423 self.assertIsNotNone(nsIns)
425 jobs = JobModel.objects.filter(jobid=scale_service.job_id)
426 self.assertIsNotNone(100, jobs[0].progress)
429 class TestHealVnfViews(TestCase):
431 self.client = Client()
432 self.ns_inst_id = str(uuid.uuid4())
433 self.nf_inst_id = str(uuid.uuid4())
436 self.job_id = JobUtil.create_job("VNF", JOB_TYPE.HEAL_VNF, self.nf_inst_id)
438 NSInstModel(id=self.ns_inst_id, name="ns_name").save()
439 NfInstModel.objects.create(nfinstid=self.nf_inst_id, nf_name='name_1', vnf_id='1',
440 vnfm_inst_id='1', ns_inst_id='111,2-2-2',
441 max_cpu='14', max_ram='12296', max_hd='101', max_shd="20", max_net=10,
442 status='active', mnfinstid=self.nf_uuid, package_id='pkg1',
443 vnfd_model='{"metadata": {"vnfdId": "1","vnfdName": "PGW001",'
444 '"vnfProvider": "zte","vnfdVersion": "V00001","vnfVersion": "V5.10.20",'
445 '"productType": "CN","vnfType": "PGW",'
446 '"description": "PGW VNFD description",'
447 '"isShared":true,"vnfExtendType":"driver"}}')
450 NSInstModel.objects.all().delete()
451 NfInstModel.objects.all().delete()
453 @mock.patch.object(restcall, "call_req")
454 def test_heal_vnf(self, mock_call_req):
457 "/api/ztevnfmdriver/v1/1/vnfs/111/heal":
458 [0, json.JSONEncoder().encode({"jobId": self.job_id}), '200'],
459 "/external-system/esr-vnfm-list/esr-vnfm/1":
460 [0, json.JSONEncoder().encode(vnfm_info), '200'],
461 "/api/resmgr/v1/vnf/1":
462 [0, json.JSONEncoder().encode({"jobId": self.job_id}), '200'],
463 "/api/ztevnfmdriver/v1/1/jobs/" + self.job_id + "?responseId=0":
464 [0, json.JSONEncoder().encode({"jobId": self.job_id,
465 "responsedescriptor": {"progress": "100",
466 "status": JOB_MODEL_STATUS.FINISHED,
468 "statusdescription": "creating",
470 "responsehistorylist": [
472 "status": JOB_MODEL_STATUS.PROCESSING,
474 "statusdescription": "creating",
475 "errorcode": "0"}]}}), '200']}
477 def side_effect(*args):
478 return mock_vals[args[4]]
480 mock_call_req.side_effect = side_effect
491 NFHealService(self.nf_inst_id, req_data).run()
493 self.assertEqual(NfInstModel.objects.get(nfinstid=self.nf_inst_id).status, VNF_STATUS.ACTIVE)
495 @mock.patch.object(NFHealService, "run")
496 def test_heal_vnf_non_existing_vnf(self, mock_biz):
497 mock_biz.side_effect = NSLCMException("VNF Not Found")
510 self.assertRaises(NSLCMException, NFHealService(nf_inst_id, req_data).run)
511 self.assertEqual(len(NfInstModel.objects.filter(nfinstid=nf_inst_id)), 0)
514 class TestGetVnfmInfoViews(TestCase):
516 self.client = Client()
517 self.vnfm_id = str(uuid.uuid4())
522 @mock.patch.object(restcall, "call_req")
523 def test_get_vnfm_info(self, mock_call_req):
525 "vnfm-id": "example-vnfm-id-val-62576",
526 "vim-id": "example-vim-id-val-35114",
527 "certificate-url": "example-certificate-url-val-90242",
528 "esr-system-info-list": {
531 "esr-system-info-id": "example-esr-system-info-id-val-78484",
532 "system-name": "example-system-name-val-23790",
533 "type": "example-type-val-52596",
534 "vendor": "example-vendor-val-47399",
535 "version": "example-version-val-42051",
536 "service-url": "example-service-url-val-10731",
537 "user-name": "example-user-name-val-65946",
538 "password": "example-password-val-22505",
539 "system-type": "example-system-type-val-27221",
540 "protocal": "example-protocal-val-54632",
541 "ssl-cacert": "example-ssl-cacert-val-45965",
542 "ssl-insecure": True,
543 "ip-address": "example-ip-address-val-19212",
544 "port": "example-port-val-57641",
545 "cloud-domain": "example-cloud-domain-val-26296",
546 "default-tenant": "example-default-tenant-val-87724"
551 r1 = [0, json.JSONEncoder().encode(vnfm_info_aai), '200']
552 mock_call_req.side_effect = [r1]
553 esr_system_info = ignore_case_get(ignore_case_get(vnfm_info_aai, "esr-system-info-list"), "esr-system-info")
555 "vnfmId": vnfm_info_aai["vnfm-id"],
556 "name": vnfm_info_aai["vnfm-id"],
557 "type": ignore_case_get(esr_system_info[0], "type"),
558 "vimId": vnfm_info_aai["vim-id"],
559 "vendor": ignore_case_get(esr_system_info[0], "vendor"),
560 "version": ignore_case_get(esr_system_info[0], "version"),
561 "description": "vnfm",
562 "certificateUrl": vnfm_info_aai["certificate-url"],
563 "url": ignore_case_get(esr_system_info[0], "service-url"),
564 "userName": ignore_case_get(esr_system_info[0], "user-name"),
565 "password": ignore_case_get(esr_system_info[0], "password"),
569 response = self.client.get("/api/nslcm/v1/vnfms/%s" % self.vnfm_id)
570 self.failUnlessEqual(status.HTTP_200_OK, response.status_code, response.content)
571 context = json.loads(response.content)
572 self.assertEqual(expect_data, context)
575 class TestGetVimInfoViews(TestCase):
577 self.client = Client()
578 self.vim_id = "zte_test"
583 @mock.patch.object(restcall, "call_req")
584 def test_get_vim_info(self, mock_call_req):
585 r1 = [0, json.JSONEncoder().encode(vim_info), '200']
586 mock_call_req.side_effect = [r1]
587 esr_system_info = ignore_case_get(ignore_case_get(vim_info, "esr-system-info-list"), "esr-system-info")
589 "vimId": self.vim_id,
591 "url": ignore_case_get(esr_system_info[0], "service-url"),
592 "userName": ignore_case_get(esr_system_info[0], "user-name"),
593 "password": ignore_case_get(esr_system_info[0], "password"),
594 # "tenant": ignore_case_get(tenants[0], "tenant-id"),
595 "tenant": ignore_case_get(esr_system_info[0], "default-tenant"),
596 "vendor": ignore_case_get(esr_system_info[0], "vendor"),
597 "version": ignore_case_get(esr_system_info[0], "version"),
598 "description": "vim",
600 "type": ignore_case_get(esr_system_info[0], "type"),
604 response = self.client.get("/api/nslcm/v1/vims/%s" % self.vim_id)
605 self.failUnlessEqual(status.HTTP_200_OK, response.status_code)
606 context = json.loads(response.content)
607 self.assertEqual(expect_data["url"], context["url"])
611 'local_storages': [],
624 'vdu_id': u'vdu_omm.001',
625 'image_file': u'opencos_sss_omm_img_release_20150723-1-disk1',
637 'support_scaling': False,
640 'storage_policy': '',
643 'availability_zone': '',
649 'inject_data_list': [
656 'local_affinity_antiaffinity_rule': {
659 'template_id': u'omm.001',
660 'manual_scale_select_vim': False
662 'description': u'singleommvm'
676 'image_file': u'sss',
688 'support_scaling': False,
691 'storage_policy': '',
694 'availability_zone': '',
700 'inject_data_list': [
707 'local_affinity_antiaffinity_rule': {
711 'manual_scale_select_vim': False
713 'description': u'ompvm'
727 'image_file': u'sss',
739 'support_scaling': False,
742 'storage_policy': '',
745 'availability_zone': '',
751 'inject_data_list': [
758 'local_affinity_antiaffinity_rule': {
762 'manual_scale_select_vim': False
764 'description': u'ompvm'
778 'image_file': u'sss',
790 'support_scaling': False,
793 'storage_policy': '',
796 'availability_zone': '',
802 'inject_data_list': [
809 'local_affinity_antiaffinity_rule': {
813 'manual_scale_select_vim': False
815 'description': u'ompvm'
829 'image_file': u'sss',
841 'support_scaling': False,
844 'storage_policy': '',
847 'availability_zone': '',
853 'inject_data_list': [
860 'local_affinity_antiaffinity_rule': {
863 'template_id': u'10',
864 'manual_scale_select_vim': False
866 'description': u'ppvm'
880 'image_file': u'sss',
892 'support_scaling': False,
895 'storage_policy': '',
898 'availability_zone': '',
904 'inject_data_list': [
911 'local_affinity_antiaffinity_rule': {
914 'template_id': u'11',
915 'manual_scale_select_vim': False
917 'description': u'ppvm'
931 'image_file': u'sss',
943 'support_scaling': False,
946 'storage_policy': '',
949 'availability_zone': '',
955 'inject_data_list': [
962 'local_affinity_antiaffinity_rule': {
965 'template_id': u'12',
966 'manual_scale_select_vim': False
968 'description': u'ppvm'
979 'policy_id': u'policy_scale_sss-vnf-template',
981 'policy_file': '*-vnfd.zip/*-vnf-policy.xml'
990 'name': u'opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
992 'disk_format': u'VMDK',
993 'file_url': u'./zte-cn-sss-main-image/OMM/opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
994 'container_type': 'vm',
996 'hypervisor_type': 'kvm'
998 'image_file_id': u'opencos_sss_omm_img_release_20150723-1-disk1'
1003 'name': u'sss.vmdk',
1005 'disk_format': u'VMDK',
1006 'file_url': u'./zte-cn-sss-main-image/NE/sss.vmdk',
1007 'container_type': 'vm',
1009 'hypervisor_type': 'kvm'
1011 'image_file_id': u'sss'
1024 'domain_type': u'CN',
1025 'version': u'v4.14.10',
1026 'vmnumber_overquota_alarm': False,
1029 'vnfd_version': u'V00000001',
1030 'id': u'sss-vnf-template',
1031 'name': u'sss-vnf-template'
1040 "externalDataNetworkName": {
1064 "plugin_info": "vbrasplugin_1.0",
1066 "is_shared": "False",
1067 "request_reclassification": "False",
1068 "vnfd_version": "1.0.0",
1070 "nsh_aware": "True",
1071 "cross_dc": "False",
1072 "externalDataNetworkName": {
1073 "get_input": "externalDataNetworkName"
1095 "vl_id": "ext_mnet_network",
1098 "network_type": "vlan",
1099 "name": "externalMNetworkName",
1100 "dhcp_enabled": False,
1108 "end_ip": "190.168.100.100",
1109 "gateway_ip": "190.168.100.1",
1110 "start_ip": "190.168.100.2",
1111 "cidr": "190.168.100.0/24",
1113 "network_name": "sub_mnet",
1125 "invariant_id": "vbras_ns",
1126 "description": "vbras_ns",
1135 "vserver-id": "example-vserver-id-val-70924",
1136 "vserver-name": "example-vserver-name-val-61674",
1137 "vserver-name2": "example-vserver-name2-val-19234",
1138 "prov-status": "example-prov-status-val-94916",
1139 "vserver-selflink": "example-vserver-selflink-val-26562",
1141 "is-closed-loop-disabled": True,
1142 "resource-version": "1505465356263",
1146 "volume-id": "example-volume-id-val-71854",
1147 "volume-selflink": "example-volume-selflink-val-22433"
1154 "interface-name": "example-interface-name-val-24351",
1155 "interface-role": "example-interface-role-val-43242",
1156 "v6-wan-link-ip": "example-v6-wan-link-ip-val-4196",
1157 "selflink": "example-selflink-val-61295",
1158 "interface-id": "example-interface-id-val-95879",
1159 "macaddr": "example-macaddr-val-37302",
1160 "network-name": "example-network-name-val-44254",
1161 "management-option": "example-management-option-val-49009",
1162 "interface-description": "example-interface-description-val-99923",
1163 "is-port-mirrored": True,
1165 "prov-status": "example-prov-status-val-4698",
1166 "is-ip-unnumbered": True,
1167 "allowed-address-pairs": "example-allowed-address-pairs-val-5762",
1171 "vlan-interface": "example-vlan-interface-val-58193",
1172 "vlan-id-inner": 54452151,
1173 "vlan-id-outer": 70239293,
1174 "speed-value": "example-speed-value-val-18677",
1175 "speed-units": "example-speed-units-val-46185",
1176 "vlan-description": "example-vlan-description-val-81675",
1177 "backdoor-connection": "example-backdoor-connection-val-44608",
1178 "vpn-key": "example-vpn-key-val-7946",
1179 "orchestration-status": "example-orchestration-status-val-33611",
1181 "prov-status": "example-prov-status-val-8288",
1182 "is-ip-unnumbered": True,
1183 "l3-interface-ipv4-address-list": [
1185 "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-25520",
1186 "l3-interface-ipv4-prefix-length": 69931928,
1187 "vlan-id-inner": 86628520,
1188 "vlan-id-outer": 62729236,
1189 "is-floating": True,
1190 "neutron-network-id": "example-neutron-network-id-val-64021",
1191 "neutron-subnet-id": "example-neutron-subnet-id-val-95049"
1194 "l3-interface-ipv6-address-list": [
1196 "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-64310",
1197 "l3-interface-ipv6-prefix-length": 57919834,
1198 "vlan-id-inner": 79150122,
1199 "vlan-id-outer": 59789973,
1200 "is-floating": True,
1201 "neutron-network-id": "example-neutron-network-id-val-31713",
1202 "neutron-subnet-id": "example-neutron-subnet-id-val-89568"
1211 "pci-id": "example-pci-id-val-16747",
1212 "vf-vlan-filter": "example-vf-vlan-filter-val-4613",
1213 "vf-mac-filter": "example-vf-mac-filter-val-68168",
1214 "vf-vlan-strip": True,
1215 "vf-vlan-anti-spoof-check": True,
1216 "vf-mac-anti-spoof-check": True,
1217 "vf-mirrors": "example-vf-mirrors-val-6270",
1218 "vf-broadcast-allow": True,
1219 "vf-unknown-multicast-allow": True,
1220 "vf-unknown-unicast-allow": True,
1221 "vf-insert-stag": True,
1222 "vf-link-status": "example-vf-link-status-val-49266",
1223 "neutron-network-id": "example-neutron-network-id-val-29493"
1230 "interface-name": "example-interface-name-val-98222",
1231 "interface-role": "example-interface-role-val-78360",
1232 "v6-wan-link-ip": "example-v6-wan-link-ip-val-76921",
1233 "selflink": "example-selflink-val-27117",
1234 "interface-id": "example-interface-id-val-11260",
1235 "macaddr": "example-macaddr-val-60378",
1236 "network-name": "example-network-name-val-16258",
1237 "management-option": "example-management-option-val-35097",
1238 "interface-description": "example-interface-description-val-10475",
1239 "is-port-mirrored": True,
1241 "prov-status": "example-prov-status-val-65203",
1242 "is-ip-unnumbered": True,
1243 "allowed-address-pairs": "example-allowed-address-pairs-val-65028"
1247 "l3-interface-ipv4-address-list": [
1249 "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-72779",
1250 "l3-interface-ipv4-prefix-length": 55956636,
1251 "vlan-id-inner": 98174431,
1252 "vlan-id-outer": 20372128,
1253 "is-floating": True,
1254 "neutron-network-id": "example-neutron-network-id-val-39596",
1255 "neutron-subnet-id": "example-neutron-subnet-id-val-51109"
1258 "l3-interface-ipv6-address-list": [
1260 "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-95203",
1261 "l3-interface-ipv6-prefix-length": 57454747,
1262 "vlan-id-inner": 53421060,
1263 "vlan-id-outer": 16006050,
1264 "is-floating": True,
1265 "neutron-network-id": "example-neutron-network-id-val-54216",
1266 "neutron-subnet-id": "example-neutron-subnet-id-val-1841"
1276 "vnfm-id": "example-vnfm-id-val-97336",
1277 "vim-id": "zte_test",
1278 "certificate-url": "example-certificate-url-val-18046",
1279 "resource-version": "example-resource-version-val-42094",
1280 "esr-system-info-list": {
1281 "esr-system-info": [
1283 "esr-system-info-id": "example-esr-system-info-id-val-7713",
1284 "system-name": "example-system-name-val-19801",
1285 "type": "ztevnfmdriver",
1286 "vendor": "example-vendor-val-50079",
1287 "version": "example-version-val-93146",
1288 "service-url": "example-service-url-val-68090",
1289 "user-name": "example-user-name-val-14470",
1290 "password": "example-password-val-84190",
1291 "system-type": "example-system-type-val-42773",
1292 "protocal": "example-protocal-val-85736",
1293 "ssl-cacert": "example-ssl-cacert-val-33989",
1294 "ssl-insecure": True,
1295 "ip-address": "example-ip-address-val-99038",
1296 "port": "example-port-val-27323",
1297 "cloud-domain": "example-cloud-domain-val-55163",
1298 "default-tenant": "example-default-tenant-val-99383",
1299 "resource-version": "example-resource-version-val-15424"
1306 "cloud-owner": "example-cloud-owner-val-97336",
1307 "cloud-region-id": "example-cloud-region-id-val-35532",
1308 "cloud-type": "example-cloud-type-val-18046",
1309 "owner-defined-type": "example-owner-defined-type-val-9413",
1310 "cloud-region-version": "example-cloud-region-version-val-85706",
1311 "identity-url": "example-identity-url-val-71252",
1312 "cloud-zone": "example-cloud-zone-val-27112",
1313 "complex-name": "example-complex-name-val-85283",
1314 "sriov-automation": True,
1315 "cloud-extra-info": "example-cloud-extra-info-val-90854",
1316 "cloud-epa-caps": "example-cloud-epa-caps-val-2409",
1317 "resource-version": "example-resource-version-val-42094",
1318 "esr-system-info-list": {
1319 "esr-system-info": [
1321 "esr-system-info-id": "example-esr-system-info-id-val-7713",
1322 "system-name": "example-system-name-val-19801",
1323 "type": "example-type-val-24477",
1324 "vendor": "example-vendor-val-50079",
1325 "version": "example-version-val-93146",
1326 "service-url": "example-service-url-val-68090",
1327 "user-name": "example-user-name-val-14470",
1328 "password": "example-password-val-84190",
1329 "system-type": "example-system-type-val-42773",
1330 "protocal": "example-protocal-val-85736",
1331 "ssl-cacert": "example-ssl-cacert-val-33989",
1332 "ssl-insecure": True,
1333 "ip-address": "example-ip-address-val-99038",
1334 "port": "example-port-val-27323",
1335 "cloud-domain": "example-cloud-domain-val-55163",
1336 "default-tenant": "admin",
1337 "resource-version": "example-resource-version-val-15424"
1344 "csarId": "zte_vbras",
1347 "vnfPackageId": "zte_vbras",
1348 "vnfdProvider": "1",
1352 "vnfdModel": vnfd_model_dict,