Skip to content

Commit

Permalink
Merge "Bringing in code to create ESXiToVRouterIp.map file This is a …
Browse files Browse the repository at this point in the history
…missing commit, being ported from R2.20"
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Oct 8, 2015
2 parents 03b2cbc + 7dd68ca commit e98878c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fabfile/tasks/provision.py
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 e98878c

Please sign in to comment.