Unify ssh_command. Allow remote ssh with paramiko and localhost with subprocess
Get real IP address from name for the vxlan remote_ip
Change-Id: I8363654e6402b81c2e7ac513ab32e6a5aa325b56
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
diff --git a/openvimd b/openvimd
index b50187d..b4f6283 100755
--- a/openvimd
+++ b/openvimd
@@ -232,11 +232,11 @@
exit(1)
if config_dic['network_type'] == 'ovs' \
- and config_dic['ovs_controller_ip'] == 'localhost' \
- and not (config_dic['mode'] == 'test' or config_dic['mode'] == "OF only"):
+ and config_dic['ovs_controller_ip'][:4] == '127.':
+ # and not (config_dic['mode'] == 'test' or config_dic['mode'] == "OF only"):
- error_msg = "Error: invalid value '{}' for ovs_controller_ip at {}. " \
- "Use a valid IP address".format(config_dic['ovs_controller_ip'], config_file)
+ error_msg = "Error: invalid value '{}' for ovs_controller_ip at {}. Use 'localhost' word instead "\
+ "of a loopback IP address".format(config_dic['ovs_controller_ip'], config_file)
print ("!! {} ".format(error_msg))
logger.error(error_msg)