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/ztevmanagerdriver/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/ztevmanagerdriver/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/ztevmanagerdriver/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/ztevmanagerdriver/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 @mock.patch.object(restcall, "call_req")
307 def test_scale_vnf(self, mock_call_req):
308 job_id = JobUtil.create_job("VNF", JOB_TYPE.TERMINATE_VNF, self.nf_inst_id)
312 "flavour_id": "flavour1",
317 "instances_minimum_number": 1,
318 "instances_maximum_number": 4,
319 "local_affinity_antiaffinity_rule": [
321 "affinity_antiaffinity": "affinity",
330 "name": "demo_aspect",
331 "description": "demo_aspect",
332 "associated_group": "elementGroup1",
338 "group_id": "elementGroup1",
341 "name": "elementGroup1",
343 "members": ["gsu_vm","pfu_vm"]
351 "aspectId":"demo_aspect1",
353 "additionalParam":vnfd_info
357 "aspectId":"demo_aspect2",
359 "additionalParam":vnfd_info
365 "/api/ztevmanagerdriver/v1/1/vnfs/111/terminate":
366 [0, json.JSONEncoder().encode({"jobId": job_id}), '200']
369 def side_effect(*args):
370 return mock_vals[args[4]]
372 mock_call_req.side_effect = side_effect
374 NFManualScaleService(self.nf_inst_id, req_data).run()
375 nsIns = NfInstModel.objects.filter(nfinstid=self.nf_inst_id)
377 self.failUnlessEqual(1, 1)
379 self.failUnlessEqual(1, 0)
382 class TestHealVnfViews(TestCase):
384 self.client = Client()
385 self.ns_inst_id = str(uuid.uuid4())
386 self.nf_inst_id = str(uuid.uuid4())
389 self.job_id = JobUtil.create_job("VNF", JOB_TYPE.HEAL_VNF, self.nf_inst_id)
391 NSInstModel(id=self.ns_inst_id, name="ns_name").save()
392 NfInstModel.objects.create(nfinstid=self.nf_inst_id, nf_name='name_1', vnf_id='1',
393 vnfm_inst_id='1', ns_inst_id='111,2-2-2',
394 max_cpu='14', max_ram='12296', max_hd='101', max_shd="20", max_net=10,
395 status='active', mnfinstid=self.nf_uuid, package_id='pkg1',
396 vnfd_model='{"metadata": {"vnfdId": "1","vnfdName": "PGW001",'
397 '"vnfProvider": "zte","vnfdVersion": "V00001","vnfVersion": "V5.10.20",'
398 '"productType": "CN","vnfType": "PGW",'
399 '"description": "PGW VNFD description",'
400 '"isShared":true,"vnfExtendType":"driver"}}')
403 NSInstModel.objects.all().delete()
404 NfInstModel.objects.all().delete()
406 @mock.patch.object(restcall, "call_req")
407 def test_heal_vnf(self, mock_call_req):
410 "/api/ztevmanagerdriver/v1/1/vnfs/111/heal":
411 [0, json.JSONEncoder().encode({"jobId": self.job_id}), '200'],
412 "/external-system/esr-vnfm-list/esr-vnfm/1":
413 [0, json.JSONEncoder().encode(vnfm_info), '200'],
414 "/api/resmgr/v1/vnf/1":
415 [0, json.JSONEncoder().encode({"jobId": self.job_id}), '200'],
416 "/api/ztevmanagerdriver/v1/1/jobs/" + self.job_id + "?responseId=0":
417 [0, json.JSONEncoder().encode({"jobId": self.job_id,
418 "responsedescriptor": {"progress": "100",
419 "status": JOB_MODEL_STATUS.FINISHED,
421 "statusdescription": "creating",
423 "responsehistorylist": [
425 "status": JOB_MODEL_STATUS.PROCESSING,
427 "statusdescription": "creating",
428 "errorcode": "0"}]}}), '200']}
430 def side_effect(*args):
431 return mock_vals[args[4]]
433 mock_call_req.side_effect = side_effect
444 NFHealService(self.nf_inst_id, req_data).run()
446 self.assertEqual(NfInstModel.objects.get(nfinstid=self.nf_inst_id).status, VNF_STATUS.ACTIVE)
448 @mock.patch.object(NFHealService, "run")
449 def test_heal_vnf_non_existing_vnf(self, mock_biz):
450 mock_biz.side_effect = NSLCMException("VNF Not Found")
463 self.assertRaises(NSLCMException, NFHealService(nf_inst_id, req_data).run)
464 self.assertEqual(len(NfInstModel.objects.filter(nfinstid=nf_inst_id)), 0)
467 class TestGetVnfmInfoViews(TestCase):
469 self.client = Client()
470 self.vnfm_id = str(uuid.uuid4())
475 @mock.patch.object(restcall, "call_req")
476 def test_get_vnfm_info(self, mock_call_req):
478 "vnfm-id": "example-vnfm-id-val-62576",
479 "vim-id": "example-vim-id-val-35114",
480 "certificate-url": "example-certificate-url-val-90242",
481 "esr-system-info-list": {
484 "esr-system-info-id": "example-esr-system-info-id-val-78484",
485 "system-name": "example-system-name-val-23790",
486 "type": "example-type-val-52596",
487 "vendor": "example-vendor-val-47399",
488 "version": "example-version-val-42051",
489 "service-url": "example-service-url-val-10731",
490 "user-name": "example-user-name-val-65946",
491 "password": "example-password-val-22505",
492 "system-type": "example-system-type-val-27221",
493 "protocal": "example-protocal-val-54632",
494 "ssl-cacert": "example-ssl-cacert-val-45965",
495 "ssl-insecure": True,
496 "ip-address": "example-ip-address-val-19212",
497 "port": "example-port-val-57641",
498 "cloud-domain": "example-cloud-domain-val-26296",
499 "default-tenant": "example-default-tenant-val-87724"
504 r1 = [0, json.JSONEncoder().encode(vnfm_info_aai), '200']
505 mock_call_req.side_effect = [r1]
506 esr_system_info = ignore_case_get(ignore_case_get(vnfm_info_aai, "esr-system-info-list"), "esr-system-info")
508 "vnfmId": vnfm_info_aai["vnfm-id"],
509 "name": vnfm_info_aai["vnfm-id"],
510 "type": ignore_case_get(esr_system_info[0], "type"),
511 "vimId": vnfm_info_aai["vim-id"],
512 "vendor": ignore_case_get(esr_system_info[0], "vendor"),
513 "version": ignore_case_get(esr_system_info[0], "version"),
514 "description": "vnfm",
515 "certificateUrl": vnfm_info_aai["certificate-url"],
516 "url": ignore_case_get(esr_system_info[0], "service-url"),
517 "userName": ignore_case_get(esr_system_info[0], "user-name"),
518 "password": ignore_case_get(esr_system_info[0], "password"),
519 "createTime": "2016-07-06 15:33:18"
522 response = self.client.get("/api/nslcm/v1/vnfms/%s" % self.vnfm_id)
523 self.failUnlessEqual(status.HTTP_200_OK, response.status_code)
524 context = json.loads(response.content)
525 self.assertEqual(expect_data, context)
528 class TestGetVimInfoViews(TestCase):
530 self.client = Client()
531 self.vim_id = "zte_test"
536 @mock.patch.object(restcall, "call_req")
537 def test_get_vim_info(self, mock_call_req):
538 r1 = [0, json.JSONEncoder().encode(vim_info), '200']
539 mock_call_req.side_effect = [r1]
540 esr_system_info = ignore_case_get(ignore_case_get(vim_info, "esr-system-info-list"), "esr-system-info")
542 "vimId": self.vim_id,
544 "url": ignore_case_get(esr_system_info[0], "service-url"),
545 "userName": ignore_case_get(esr_system_info[0], "user-name"),
546 "password": ignore_case_get(esr_system_info[0], "password"),
547 # "tenant": ignore_case_get(tenants[0], "tenant-id"),
548 "tenant": ignore_case_get(esr_system_info[0], "default-tenant"),
549 "vendor": ignore_case_get(esr_system_info[0], "vendor"),
550 "version": ignore_case_get(esr_system_info[0], "version"),
551 "description": "vim",
553 "type": ignore_case_get(esr_system_info[0], "type"),
554 "createTime": "2016-07-18 12:22:53"
557 response = self.client.get("/api/nslcm/v1/vims/%s" % self.vim_id)
558 self.failUnlessEqual(status.HTTP_200_OK, response.status_code)
559 context = json.loads(response.content)
560 self.assertEqual(expect_data["url"], context["url"])
564 'local_storages': [],
577 'vdu_id': u'vdu_omm.001',
578 'image_file': u'opencos_sss_omm_img_release_20150723-1-disk1',
590 'support_scaling': False,
593 'storage_policy': '',
596 'availability_zone': '',
602 'inject_data_list': [
609 'local_affinity_antiaffinity_rule': {
612 'template_id': u'omm.001',
613 'manual_scale_select_vim': False
615 'description': u'singleommvm'
629 'image_file': u'sss',
641 'support_scaling': False,
644 'storage_policy': '',
647 'availability_zone': '',
653 'inject_data_list': [
660 'local_affinity_antiaffinity_rule': {
664 'manual_scale_select_vim': False
666 'description': u'ompvm'
680 'image_file': u'sss',
692 'support_scaling': False,
695 'storage_policy': '',
698 'availability_zone': '',
704 'inject_data_list': [
711 'local_affinity_antiaffinity_rule': {
715 'manual_scale_select_vim': False
717 'description': u'ompvm'
731 'image_file': u'sss',
743 'support_scaling': False,
746 'storage_policy': '',
749 'availability_zone': '',
755 'inject_data_list': [
762 'local_affinity_antiaffinity_rule': {
766 'manual_scale_select_vim': False
768 'description': u'ompvm'
782 'image_file': u'sss',
794 'support_scaling': False,
797 'storage_policy': '',
800 'availability_zone': '',
806 'inject_data_list': [
813 'local_affinity_antiaffinity_rule': {
816 'template_id': u'10',
817 'manual_scale_select_vim': False
819 'description': u'ppvm'
833 'image_file': u'sss',
845 'support_scaling': False,
848 'storage_policy': '',
851 'availability_zone': '',
857 'inject_data_list': [
864 'local_affinity_antiaffinity_rule': {
867 'template_id': u'11',
868 'manual_scale_select_vim': False
870 'description': u'ppvm'
884 'image_file': u'sss',
896 'support_scaling': False,
899 'storage_policy': '',
902 'availability_zone': '',
908 'inject_data_list': [
915 'local_affinity_antiaffinity_rule': {
918 'template_id': u'12',
919 'manual_scale_select_vim': False
921 'description': u'ppvm'
932 'policy_id': u'policy_scale_sss-vnf-template',
934 'policy_file': '*-vnfd.zip/*-vnf-policy.xml'
943 'name': u'opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
945 'disk_format': u'VMDK',
946 'file_url': u'./zte-cn-sss-main-image/OMM/opencos_sss_omm_img_release_20150723-1-disk1.vmdk',
947 'container_type': 'vm',
949 'hypervisor_type': 'kvm'
951 'image_file_id': u'opencos_sss_omm_img_release_20150723-1-disk1'
958 'disk_format': u'VMDK',
959 'file_url': u'./zte-cn-sss-main-image/NE/sss.vmdk',
960 'container_type': 'vm',
962 'hypervisor_type': 'kvm'
964 'image_file_id': u'sss'
977 'domain_type': u'CN',
978 'version': u'v4.14.10',
979 'vmnumber_overquota_alarm': False,
982 'vnfd_version': u'V00000001',
983 'id': u'sss-vnf-template',
984 'name': u'sss-vnf-template'
993 "externalDataNetworkName": {
1017 "plugin_info": "vbrasplugin_1.0",
1019 "is_shared": "False",
1020 "request_reclassification": "False",
1021 "vnfd_version": "1.0.0",
1023 "nsh_aware": "True",
1024 "cross_dc": "False",
1025 "externalDataNetworkName": {
1026 "get_input": "externalDataNetworkName"
1048 "vl_id": "ext_mnet_network",
1051 "network_type": "vlan",
1052 "name": "externalMNetworkName",
1053 "dhcp_enabled": False,
1061 "end_ip": "190.168.100.100",
1062 "gateway_ip": "190.168.100.1",
1063 "start_ip": "190.168.100.2",
1064 "cidr": "190.168.100.0/24",
1066 "network_name": "sub_mnet",
1078 "invariant_id": "vbras_ns",
1079 "description": "vbras_ns",
1088 "vserver-id": "example-vserver-id-val-70924",
1089 "vserver-name": "example-vserver-name-val-61674",
1090 "vserver-name2": "example-vserver-name2-val-19234",
1091 "prov-status": "example-prov-status-val-94916",
1092 "vserver-selflink": "example-vserver-selflink-val-26562",
1094 "is-closed-loop-disabled": True,
1095 "resource-version": "1505465356263",
1099 "volume-id": "example-volume-id-val-71854",
1100 "volume-selflink": "example-volume-selflink-val-22433"
1107 "interface-name": "example-interface-name-val-24351",
1108 "interface-role": "example-interface-role-val-43242",
1109 "v6-wan-link-ip": "example-v6-wan-link-ip-val-4196",
1110 "selflink": "example-selflink-val-61295",
1111 "interface-id": "example-interface-id-val-95879",
1112 "macaddr": "example-macaddr-val-37302",
1113 "network-name": "example-network-name-val-44254",
1114 "management-option": "example-management-option-val-49009",
1115 "interface-description": "example-interface-description-val-99923",
1116 "is-port-mirrored": True,
1118 "prov-status": "example-prov-status-val-4698",
1119 "is-ip-unnumbered": True,
1120 "allowed-address-pairs": "example-allowed-address-pairs-val-5762",
1124 "vlan-interface": "example-vlan-interface-val-58193",
1125 "vlan-id-inner": 54452151,
1126 "vlan-id-outer": 70239293,
1127 "speed-value": "example-speed-value-val-18677",
1128 "speed-units": "example-speed-units-val-46185",
1129 "vlan-description": "example-vlan-description-val-81675",
1130 "backdoor-connection": "example-backdoor-connection-val-44608",
1131 "vpn-key": "example-vpn-key-val-7946",
1132 "orchestration-status": "example-orchestration-status-val-33611",
1134 "prov-status": "example-prov-status-val-8288",
1135 "is-ip-unnumbered": True,
1136 "l3-interface-ipv4-address-list": [
1138 "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-25520",
1139 "l3-interface-ipv4-prefix-length": 69931928,
1140 "vlan-id-inner": 86628520,
1141 "vlan-id-outer": 62729236,
1142 "is-floating": True,
1143 "neutron-network-id": "example-neutron-network-id-val-64021",
1144 "neutron-subnet-id": "example-neutron-subnet-id-val-95049"
1147 "l3-interface-ipv6-address-list": [
1149 "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-64310",
1150 "l3-interface-ipv6-prefix-length": 57919834,
1151 "vlan-id-inner": 79150122,
1152 "vlan-id-outer": 59789973,
1153 "is-floating": True,
1154 "neutron-network-id": "example-neutron-network-id-val-31713",
1155 "neutron-subnet-id": "example-neutron-subnet-id-val-89568"
1164 "pci-id": "example-pci-id-val-16747",
1165 "vf-vlan-filter": "example-vf-vlan-filter-val-4613",
1166 "vf-mac-filter": "example-vf-mac-filter-val-68168",
1167 "vf-vlan-strip": True,
1168 "vf-vlan-anti-spoof-check": True,
1169 "vf-mac-anti-spoof-check": True,
1170 "vf-mirrors": "example-vf-mirrors-val-6270",
1171 "vf-broadcast-allow": True,
1172 "vf-unknown-multicast-allow": True,
1173 "vf-unknown-unicast-allow": True,
1174 "vf-insert-stag": True,
1175 "vf-link-status": "example-vf-link-status-val-49266",
1176 "neutron-network-id": "example-neutron-network-id-val-29493"
1183 "interface-name": "example-interface-name-val-98222",
1184 "interface-role": "example-interface-role-val-78360",
1185 "v6-wan-link-ip": "example-v6-wan-link-ip-val-76921",
1186 "selflink": "example-selflink-val-27117",
1187 "interface-id": "example-interface-id-val-11260",
1188 "macaddr": "example-macaddr-val-60378",
1189 "network-name": "example-network-name-val-16258",
1190 "management-option": "example-management-option-val-35097",
1191 "interface-description": "example-interface-description-val-10475",
1192 "is-port-mirrored": True,
1194 "prov-status": "example-prov-status-val-65203",
1195 "is-ip-unnumbered": True,
1196 "allowed-address-pairs": "example-allowed-address-pairs-val-65028"
1200 "l3-interface-ipv4-address-list": [
1202 "l3-interface-ipv4-address": "example-l3-interface-ipv4-address-val-72779",
1203 "l3-interface-ipv4-prefix-length": 55956636,
1204 "vlan-id-inner": 98174431,
1205 "vlan-id-outer": 20372128,
1206 "is-floating": True,
1207 "neutron-network-id": "example-neutron-network-id-val-39596",
1208 "neutron-subnet-id": "example-neutron-subnet-id-val-51109"
1211 "l3-interface-ipv6-address-list": [
1213 "l3-interface-ipv6-address": "example-l3-interface-ipv6-address-val-95203",
1214 "l3-interface-ipv6-prefix-length": 57454747,
1215 "vlan-id-inner": 53421060,
1216 "vlan-id-outer": 16006050,
1217 "is-floating": True,
1218 "neutron-network-id": "example-neutron-network-id-val-54216",
1219 "neutron-subnet-id": "example-neutron-subnet-id-val-1841"
1229 "vnfm-id": "example-vnfm-id-val-97336",
1230 "vim-id": "zte_test",
1231 "certificate-url": "example-certificate-url-val-18046",
1232 "resource-version": "example-resource-version-val-42094",
1233 "esr-system-info-list": {
1234 "esr-system-info": [
1236 "esr-system-info-id": "example-esr-system-info-id-val-7713",
1237 "system-name": "example-system-name-val-19801",
1238 "type": "ztevmanagerdriver",
1239 "vendor": "example-vendor-val-50079",
1240 "version": "example-version-val-93146",
1241 "service-url": "example-service-url-val-68090",
1242 "user-name": "example-user-name-val-14470",
1243 "password": "example-password-val-84190",
1244 "system-type": "example-system-type-val-42773",
1245 "protocal": "example-protocal-val-85736",
1246 "ssl-cacert": "example-ssl-cacert-val-33989",
1247 "ssl-insecure": True,
1248 "ip-address": "example-ip-address-val-99038",
1249 "port": "example-port-val-27323",
1250 "cloud-domain": "example-cloud-domain-val-55163",
1251 "default-tenant": "example-default-tenant-val-99383",
1252 "resource-version": "example-resource-version-val-15424"
1259 "cloud-owner": "example-cloud-owner-val-97336",
1260 "cloud-region-id": "example-cloud-region-id-val-35532",
1261 "cloud-type": "example-cloud-type-val-18046",
1262 "owner-defined-type": "example-owner-defined-type-val-9413",
1263 "cloud-region-version": "example-cloud-region-version-val-85706",
1264 "identity-url": "example-identity-url-val-71252",
1265 "cloud-zone": "example-cloud-zone-val-27112",
1266 "complex-name": "example-complex-name-val-85283",
1267 "sriov-automation": True,
1268 "cloud-extra-info": "example-cloud-extra-info-val-90854",
1269 "cloud-epa-caps": "example-cloud-epa-caps-val-2409",
1270 "resource-version": "example-resource-version-val-42094",
1271 "esr-system-info-list": {
1272 "esr-system-info": [
1274 "esr-system-info-id": "example-esr-system-info-id-val-7713",
1275 "system-name": "example-system-name-val-19801",
1276 "type": "example-type-val-24477",
1277 "vendor": "example-vendor-val-50079",
1278 "version": "example-version-val-93146",
1279 "service-url": "example-service-url-val-68090",
1280 "user-name": "example-user-name-val-14470",
1281 "password": "example-password-val-84190",
1282 "system-type": "example-system-type-val-42773",
1283 "protocal": "example-protocal-val-85736",
1284 "ssl-cacert": "example-ssl-cacert-val-33989",
1285 "ssl-insecure": True,
1286 "ip-address": "example-ip-address-val-99038",
1287 "port": "example-port-val-27323",
1288 "cloud-domain": "example-cloud-domain-val-55163",
1289 "default-tenant": "admin",
1290 "resource-version": "example-resource-version-val-15424"
1297 "csarId": "zte_vbras",
1300 "vnfPackageId": "zte_vbras",
1301 "vnfdProvider": "1",
1305 "vnfdModel": vnfd_model_dict,