Merge "Hot-fix: do not share Admin interface w/ any net"

This commit is contained in:
Jenkins 2014-02-11 13:03:43 +00:00 committed by Gerrit Code Review
commit a88ce37dc1
5 changed files with 19 additions and 22 deletions

View File

@ -15,7 +15,8 @@
"render_addr_mask": null, "render_addr_mask": null,
"map_priority": 0, "map_priority": 0,
"unmovable": true, "unmovable": true,
"assign_vip": false "assign_vip": false,
"dedicated_nic": true
} }
} }
}, },

View File

@ -497,7 +497,7 @@ class TestNeutronManager(BaseIntegrationTest):
other_nic, empty_nic = None, None other_nic, empty_nic = None, None
for nic in other_nics: for nic in other_nics:
names = [n.name for n in nic.assigned_networks_list] names = [n.name for n in nic.assigned_networks_list]
if names == ['public']: if 'public' in names:
other_nic = nic other_nic = nic
other_nets = names other_nets = names
elif names == []: elif names == []:

View File

@ -185,7 +185,6 @@ class TestNovaHandlers(TestNetworkChecking):
'interfaces. Affected:\n', 'interfaces. Affected:\n',
task['message']) task['message'])
self.assertIn('"management"', task['message']) self.assertIn('"management"', task['message'])
self.assertIn('"admin (PXE)"', task['message'])
self.assertIn(' networks at node "Untitled', task['message']) self.assertIn(' networks at node "Untitled', task['message'])
def test_network_checking_fails_if_networks_cidr_range_intersection(self): def test_network_checking_fails_if_networks_cidr_range_intersection(self):

View File

@ -202,10 +202,10 @@ class TestNodeHandlers(BaseIntegrationTest):
headers=self.default_headers) headers=self.default_headers)
self.assertEquals(resp.status, 200) self.assertEquals(resp.status, 200)
response = json.loads(resp.body) response = json.loads(resp.body)
net_name_per_nic = [['fuelweb_admin', 'storage', 'fixed'], net_name_per_nic = [['fuelweb_admin'],
['public', 'floating'], ['public', 'floating', 'storage', 'fixed'],
['management']] ['management']]
for i, nic in enumerate(response): for i, nic in enumerate(sorted(response, key=lambda x: x['name'])):
net_names = set([net['name'] for net in nic['assigned_networks']]) net_names = set([net['name'] for net in nic['assigned_networks']])
self.assertEqual(set(net_name_per_nic[i]), net_names) self.assertEqual(set(net_name_per_nic[i]), net_names)
@ -239,10 +239,11 @@ class TestNodeHandlers(BaseIntegrationTest):
headers=self.default_headers) headers=self.default_headers)
self.assertEquals(resp.status, 200) self.assertEquals(resp.status, 200)
response = json.loads(resp.body) response = json.loads(resp.body)
net_name_per_nic = [['fuelweb_admin', 'storage', 'fixed', net_name_per_nic = [['fuelweb_admin'],
'public', 'floating', 'management'], ['storage', 'fixed', 'public', 'floating',
[], []] 'management'],
for i, nic in enumerate(response): []]
for i, nic in enumerate(sorted(response, key=lambda x: x['name'])):
net_names = set([net['name'] for net in nic['assigned_networks']]) net_names = set([net['name'] for net in nic['assigned_networks']])
self.assertEqual(set(net_name_per_nic[i]), net_names) self.assertEqual(set(net_name_per_nic[i]), net_names)
@ -280,10 +281,10 @@ class TestNodeHandlers(BaseIntegrationTest):
headers=self.default_headers) headers=self.default_headers)
self.assertEquals(resp.status, 200) self.assertEquals(resp.status, 200)
response = json.loads(resp.body) response = json.loads(resp.body)
net_name_per_nic = [['fuelweb_admin', 'storage', 'private'], net_name_per_nic = [['fuelweb_admin'],
['public'], ['public', 'storage', 'private'],
['management']] ['management']]
for i, nic in enumerate(response): for i, nic in enumerate(sorted(response, key=lambda x: x['name'])):
net_names = set([net['name'] for net in nic['assigned_networks']]) net_names = set([net['name'] for net in nic['assigned_networks']])
self.assertEqual(set(net_name_per_nic[i]), net_names) self.assertEqual(set(net_name_per_nic[i]), net_names)
@ -317,10 +318,10 @@ class TestNodeHandlers(BaseIntegrationTest):
headers=self.default_headers) headers=self.default_headers)
self.assertEquals(resp.status, 200) self.assertEquals(resp.status, 200)
response = json.loads(resp.body) response = json.loads(resp.body)
net_name_per_nic = [['fuelweb_admin', 'storage', 'public', net_name_per_nic = [['fuelweb_admin'],
'management', 'private'], ['storage', 'public', 'management', 'private'],
[], []] []]
for i, nic in enumerate(response): for i, nic in enumerate(sorted(response, key=lambda x: x['name'])):
net_names = set([net['name'] for net in nic['assigned_networks']]) net_names = set([net['name'] for net in nic['assigned_networks']])
self.assertEqual(set(net_name_per_nic[i]), net_names) self.assertEqual(set(net_name_per_nic[i]), net_names)

View File

@ -130,11 +130,7 @@ class TestVerifyNetworkTaskManagers(BaseIntegrationTest):
task.message task.message
) )
for n in self.env.nodes: for n in self.env.nodes:
self.assertIn( self.assertIn('"storage"', task.message)
'"admin (PXE)", "storage" networks '
'at node "{0}"'.format(n.name),
task.message
)
self.assertEquals(mocked_rpc.called, False) self.assertEquals(mocked_rpc.called, False)
@fake_tasks() @fake_tasks()