Merge "config ip to dataplane after install os"

This commit is contained in:
Zuul 2017-12-26 09:05:07 +00:00 committed by Gerrit Code Review
commit 146c2e2cc2
2 changed files with 9 additions and 3 deletions

View File

@ -266,8 +266,6 @@ def multi_plane(interface):
def plane_overlapping_check(interface):
plane_num = len(interface['assigned_networks'])
if interface.get('vswitch_type', None) == 'dvs':
return
if plane_num == 0 and not update_network_mode:
print "%s %s is not belong to any physnet planes" % (datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S:%f"),
interface['name'])

View File

@ -476,7 +476,15 @@ def _get_host_interfaces(host_info):
# remove duplicates assigned networks
if assigned_network.get('ip') not in no_dup_networks.keys() \
or assigned_network.get('network_type') == 'MANAGEMENT':
no_dup_networks[assigned_network['ip']] = assigned_network
# when diff network assigned to same interface,we just use
# first assign network to call daisy.py to config env network.
# If in some case we get external instead of dataplane,
# it will not config ip to interrface according to daisy.py.
if assigned_network.get('network_type') == 'EXTERNAL' and \
len(interface['assigned_networks']) > 1:
continue
else:
no_dup_networks[assigned_network['ip']] = assigned_network
if no_dup_networks:
interface['assigned_networks'] = no_dup_networks.values()
return interfaces