Skip to content

Commit

Permalink
Merge "When mgmt ip and control_data ip is different control_data ip …
Browse files Browse the repository at this point in the history
…should be added to gateway_server_ip_list" into R3.1
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Nov 4, 2016
2 parents 321af1a + 6606e9e commit 9731a13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions fabfile/utils/cluster.py
Expand Up @@ -5,7 +5,7 @@
from fabos import detect_ostype, get_release, get_build
from fabfile.config import *
from fabfile.utils.config import get_value

from fabfile.utils.interface import get_data_ip

def get_all_hostnames():
if isinstance(env.hostnames.get('all', None), list):
Expand Down Expand Up @@ -115,7 +115,7 @@ def get_compute_as_gateway_list():
if gateway_mode_info:
for host in gateway_mode_info.keys():
if( gateway_mode_info[host] == 'server' ):
gateway_server_ip_list.append(host.split('@')[1])
gateway_server_ip_list.append(get_data_ip(host)[0])
return gateway_server_ip_list

def get_vmware_details(compute_host_string):
Expand Down
5 changes: 2 additions & 3 deletions fabfile/utils/interface.py
Expand Up @@ -4,7 +4,6 @@
from fabric.api import *

from fabfile.config import testbed
from fabfile.utils.host import hstr_to_ip
from fabric.exceptions import CommandTimeout

@task
Expand Down Expand Up @@ -40,9 +39,9 @@ def get_data_ip(host_str):
tgt_ip = str(IPNetwork(data_ip_info[host_str]['ip']).ip)
tgt_gw = data_ip_info[host_str]['gw']
else:
tgt_ip = hstr_to_ip(host_str)
tgt_ip = host_str.split('@')[1]
else:
tgt_ip = hstr_to_ip(host_str)
tgt_ip = host_str.split('@')[1]

return (tgt_ip, tgt_gw)
#end get_data_ip
Expand Down

0 comments on commit 9731a13

Please sign in to comment.