Merge "Fix network mtu in network_metadata"
This commit is contained in:
commit
e9b8f6da55
@ -865,7 +865,7 @@ class TestNetworkMetadata(test.NoDBTestCase):
|
|||||||
|
|
||||||
self.netinfo[0]['network']['subnets'][0] = ipv4_subnet
|
self.netinfo[0]['network']['subnets'][0] = ipv4_subnet
|
||||||
self.netinfo[0]['network']['subnets'][1] = ipv6_subnet
|
self.netinfo[0]['network']['subnets'][1] = ipv6_subnet
|
||||||
self.netinfo[0]['network']['mtu'] = 1500
|
self.netinfo[0]['network']['meta']['mtu'] = 1500
|
||||||
|
|
||||||
def test_get_network_metadata_json(self):
|
def test_get_network_metadata_json(self):
|
||||||
|
|
||||||
@ -1141,7 +1141,7 @@ class TestNetworkMetadata(test.NoDBTestCase):
|
|||||||
'11111111-1111-1111-1111-111111111111')
|
'11111111-1111-1111-1111-111111111111')
|
||||||
|
|
||||||
self.netinfo[1]['network']['subnets'][0] = ipv4_subnet
|
self.netinfo[1]['network']['subnets'][0] = ipv4_subnet
|
||||||
self.netinfo[1]['network']['mtu'] = 1500
|
self.netinfo[1]['network']['meta']['mtu'] = 1500
|
||||||
|
|
||||||
network_json = netutils.get_network_metadata(self.netinfo)
|
network_json = netutils.get_network_metadata(self.netinfo)
|
||||||
self.assertEqual(expected_json, network_json)
|
self.assertEqual(expected_json, network_json)
|
||||||
|
@ -257,7 +257,7 @@ def _get_eth_link(vif, ifc_num):
|
|||||||
'id': link_id,
|
'id': link_id,
|
||||||
'vif_id': vif['id'],
|
'vif_id': vif['id'],
|
||||||
'type': nic_type,
|
'type': nic_type,
|
||||||
'mtu': vif['network'].get('mtu'),
|
'mtu': vif['network']['meta'].get('mtu'),
|
||||||
'ethernet_mac_address': vif.get('address'),
|
'ethernet_mac_address': vif.get('address'),
|
||||||
}
|
}
|
||||||
return link
|
return link
|
||||||
|
Loading…
Reference in New Issue
Block a user