def test_get_vif_info(self, mock_get_network_ref):
     network_info = utils.get_test_network_info()
     vif_info = vif.get_vif_info('fake_session', 'fake_cluster',
                                 'is_neutron', 'fake_model', network_info)
     expected = [{'iface_id': 'vif-xxx-yyy-zzz',
                  'mac_address': 'fake',
                  'network_name': 'fake',
                  'network_ref': 'fake_ref',
                  'vif_model': 'fake_model'}]
     self.assertEqual(expected, vif_info)
Example #2
0
 def test_get_vif_info(self, mock_get_network_ref):
     network_info = utils.get_test_network_info()
     vif_info = vif.get_vif_info('fake_session', 'fake_cluster',
                                 'is_neutron', 'fake_model', network_info)
     expected = [{'iface_id': utils.FAKE_VIF_UUID,
                  'mac_address': utils.FAKE_VIF_MAC,
                  'network_name': utils.FAKE_NETWORK_BRIDGE,
                  'network_ref': 'fake_ref',
                  'vif_model': 'fake_model'}]
     self.assertEqual(expected, vif_info)
Example #3
0
 def test_get_vif_info(self, mock_get_network_ref):
     network_info = utils.get_test_network_info()
     vif_info = vif.get_vif_info('fake_session', 'fake_cluster',
                                 'is_neutron', 'fake_model', network_info)
     expected = [{'iface_id': 'vif-xxx-yyy-zzz',
                  'mac_address': 'fake',
                  'network_name': 'fake',
                  'network_ref': 'fake_ref',
                  'vif_model': 'fake_model'}]
     self.assertEqual(expected, vif_info)
Example #4
0
 def test_get_vif_info(self, mock_get_network_ref):
     network_info = utils.get_test_network_info()
     vif_info = vif.get_vif_info('fake_session', 'fake_cluster',
                                 'is_neutron', 'fake_model', network_info)
     expected = [{'iface_id': utils.FAKE_VIF_UUID,
                  'mac_address': utils.FAKE_VIF_MAC,
                  'network_name': utils.FAKE_NETWORK_BRIDGE,
                  'network_ref': 'fake_ref',
                  'vif_model': 'fake_model'}]
     self.assertEqual(expected, vif_info)
Example #5
0
 def test_get_vif_info_empty_list(self):
     vif_info = vif.get_vif_info('fake_session', 'fake_cluster',
                                 'is_neutron', 'fake_model', [])
     self.assertEqual([], vif_info)
Example #6
0
 def test_get_vif_info_none(self):
     vif_info = vif.get_vif_info('fake_session', 'fake_cluster',
                                 'is_neutron', 'fake_model', None)
     self.assertEqual([], vif_info)
 def test_get_vif_info_empty_list(self):
     vif_info = vif.get_vif_info('fake_session', 'fake_cluster',
                                 'is_neutron', 'fake_model', [])
     self.assertEqual([], vif_info)
 def test_get_vif_info_none(self):
     vif_info = vif.get_vif_info('fake_session', 'fake_cluster',
                                 'is_neutron', 'fake_model', None)
     self.assertEqual([], vif_info)