Skip to content

Commit

Permalink
Bringing in code to create ESXiToVRouterIp.map file
Browse files Browse the repository at this point in the history
This is a missing commit, being ported from R2.20

Partial-Bug: #1504231

Change-Id: If5c60ccfd4996ec7b49d05272c867dc2809647af
  • Loading branch information
a committed Oct 8, 2015
1 parent a4aa17a commit 7dd68ca
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fabfile/tasks/provision.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,17 @@ def setup_cfgm_node(*args):

orch = get_orchestrator()
if orch == 'vcenter' or 'vcenter_compute' in env.roledefs:
#create the static esxi:vrouter map file
esxi_info = getattr(testbed, 'esxi_hosts', None)
tmp_fname = "/tmp/ESXiToVRouterIp-%s" %(host_string)
for esxi_host in esxi_info:
esxi_ip = esxi_info[esxi_host]['ip']
vrouter_ip_string = esxi_info[esxi_host]['contrail_vm']['host']
vrouter_ip = hstr_to_ip(vrouter_ip_string)
local("echo '%s:%s' >> %s" %(esxi_ip, vrouter_ip, tmp_fname))
put(tmp_fname, "/etc/contrail/ESXiToVRouterIp.map", use_sudo=True)
local("rm %s" %(tmp_fname))

# Frame the command to provision vcenter-plugin
vcenter_info = getattr(env, 'vcenter', None)
if not vcenter_info:
Expand Down

0 comments on commit 7dd68ca

Please sign in to comment.