config ip to dataplane after install os
Change-Id: Ib5f51fd23e50f776b084321b3992f4ea6dbe8659
This commit is contained in:
parent
903a28a995
commit
28f7ee6482
@ -266,8 +266,6 @@ def multi_plane(interface):
|
|||||||
|
|
||||||
def plane_overlapping_check(interface):
|
def plane_overlapping_check(interface):
|
||||||
plane_num = len(interface['assigned_networks'])
|
plane_num = len(interface['assigned_networks'])
|
||||||
if interface.get('vswitch_type', None) == 'dvs':
|
|
||||||
return
|
|
||||||
if plane_num == 0 and not update_network_mode:
|
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"),
|
print "%s %s is not belong to any physnet planes" % (datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S:%f"),
|
||||||
interface['name'])
|
interface['name'])
|
||||||
|
@ -476,6 +476,14 @@ def _get_host_interfaces(host_info):
|
|||||||
# remove duplicates assigned networks
|
# remove duplicates assigned networks
|
||||||
if assigned_network.get('ip') not in no_dup_networks.keys() \
|
if assigned_network.get('ip') not in no_dup_networks.keys() \
|
||||||
or assigned_network.get('network_type') == 'MANAGEMENT':
|
or assigned_network.get('network_type') == 'MANAGEMENT':
|
||||||
|
# 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
|
no_dup_networks[assigned_network['ip']] = assigned_network
|
||||||
if no_dup_networks:
|
if no_dup_networks:
|
||||||
interface['assigned_networks'] = no_dup_networks.values()
|
interface['assigned_networks'] = no_dup_networks.values()
|
||||||
|
Loading…
Reference in New Issue
Block a user