コード例 #1
0
 def test___init__(self, *args):
     _epc_vnf = epc_vnf.EPCVnf(NAME, self.vnfd)
     for x in {'user', 'password', 'ip'}:
         self.assertEqual(self.vnfd['mgmt-interface'][x],
                          _epc_vnf.vnfd_helper.mgmt_interface[x])
     self.assertEqual(NAME, _epc_vnf.name)
     self.assertEqual([], _epc_vnf.kpi)
     self.assertEqual({}, _epc_vnf.config)
     self.assertFalse(_epc_vnf.runs_traffic)
コード例 #2
0
 def test___init__missing_ip(self, *args):
     _vnfd = copy.deepcopy(self.vnfd)
     _vnfd['mgmt-interface'].pop('ip')
     _epc_vnf = epc_vnf.EPCVnf(NAME, _vnfd)
     for x in {'user', 'password'}:
         self.assertEqual(_vnfd['mgmt-interface'][x],
                          _epc_vnf.vnfd_helper.mgmt_interface[x])
     self.assertNotIn('ip', _epc_vnf.vnfd_helper.mgmt_interface)
     self.assertEqual(NAME, _epc_vnf.name)
     self.assertEqual([], _epc_vnf.kpi)
     self.assertEqual({}, _epc_vnf.config)
     self.assertFalse(_epc_vnf.runs_traffic)
コード例 #3
0
 def setUp(self):
     self.vnfd = VNFD['vnfd:vnfd-catalog']['vnfd'][0]
     self.epc_vnf = epc_vnf.EPCVnf(NAME, self.vnfd)
コード例 #4
0
 def setUp(self):
     self._id = uuid.uuid1().int
     self.vnfd = VNFD['vnfd:vnfd-catalog']['vnfd'][0]
     self.epc_vnf = epc_vnf.EPCVnf(NAME, self.vnfd, self._id)