From 1338d5d2ddf58aafaf9c972203236ec2c884af49 Mon Sep 17 00:00:00 2001 From: Yuvaraja Mariappan Date: Mon, 11 May 2015 16:32:27 -0700 Subject: [PATCH] fab network in dvs switch is done for vcenter and not for the openstack. It is missed to take care openstack part when we added the support in vcenter Closes-Bug: #1452647 Change-Id: I94aae748b5e7787094e6758597a9a6501ab0bfad --- fabfile/tasks/provision.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/fabfile/tasks/provision.py b/fabfile/tasks/provision.py index 54e547c65..0cae6ecf1 100644 --- a/fabfile/tasks/provision.py +++ b/fabfile/tasks/provision.py @@ -1928,14 +1928,17 @@ def prov_esxi(*args): for host in host_list: with settings(host=host): if host in esxi_info.keys(): - if 'dv_switch_fab' in vcenter_info.keys(): - if not 'fabric_vswitch' in esxi_info[host].keys(): - dv_switch_fab = True - std_switch = False + if orch == 'openstack': + std_switch = True + if orch == 'vcenter': + if 'dv_switch_fab' in vcenter_info.keys(): + if not 'fabric_vswitch' in esxi_info[host].keys(): + dv_switch_fab = True + std_switch = False + else: + std_switch = True else: std_switch = True - else: - std_switch = True if (std_switch == True): apply_esxi_defaults(esxi_info[host]) configure_esxi_network(esxi_info[host]) @@ -1945,7 +1948,7 @@ def prov_esxi(*args): esxi_info[host]['fabric_vswitch'] = None power_on = False if orch == 'openstack': - create_esxi_compute_vm(esxi_info[host], None) + create_esxi_compute_vm(esxi_info[host], None, power_on) if orch == 'vcenter': create_esxi_compute_vm(esxi_info[host], vcenter_info, power_on) else: