Example #1
0
 def test__get_eth_link_physical(self):
     expected_link = {
         'id': 'interface1',
         'vif_id': 1,
         'type': 'phy',
         'ethernet_mac_address': 'aa:aa:aa:aa:aa:aa',
         'mtu': 1500
     }
     link = netutils._get_eth_link(self.netinfo[0], 1)
     self.assertEqual(expected_link, link)
Example #2
0
 def test__get_eth_link_physical(self):
     expected_link = {
         'id': 'interface1',
         'vif_id': 1,
         'type': 'phy',
         'ethernet_mac_address': 'aa:aa:aa:aa:aa:aa',
         'mtu': 1500
     }
     link = netutils._get_eth_link(self.netinfo[0], 1)
     self.assertEqual(expected_link, link)
Example #3
0
 def test__get_eth_link(self):
     expected_link = {
         'id': 'interface0',
         'vif_id': 1,
         'type': 'vif',
         'ethernet_mac_address': 'aa:aa:aa:aa:aa:aa',
         'mtu': 1500
     }
     self.netinfo[0]['type'] = 'vif'
     link = netutils._get_eth_link(self.netinfo[0], 0)
     self.assertEqual(expected_link, link)
Example #4
0
 def test__get_eth_link(self):
     expected_link = {
         'id': 'interface0',
         'vif_id': 1,
         'type': 'vif',
         'ethernet_mac_address': 'aa:aa:aa:aa:aa:aa',
         'mtu': 1500
     }
     self.netinfo[0]['type'] = 'vif'
     link = netutils._get_eth_link(self.netinfo[0], 0)
     self.assertEqual(expected_link, link)