From eea4d05fb495d9f7848489e238c6be2327ab34f3 Mon Sep 17 00:00:00 2001 From: Nikolas Hermanns Date: Tue, 13 Dec 2016 13:37:23 +0100 Subject: adding common/config Change-Id: I2d96e6efa628f066e165a8e37d2604eb8f0634bd Signed-off-by: Nikolas Hermanns --- odl-pipeline/lib/odl_reinstaller/odl_reinstaller.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'odl-pipeline/lib/odl_reinstaller') diff --git a/odl-pipeline/lib/odl_reinstaller/odl_reinstaller.py b/odl-pipeline/lib/odl_reinstaller/odl_reinstaller.py index 190abcf..9eb2a70 100755 --- a/odl-pipeline/lib/odl_reinstaller/odl_reinstaller.py +++ b/odl-pipeline/lib/odl_reinstaller/odl_reinstaller.py @@ -4,15 +4,20 @@ from utils.utils_log import LOG, for_all_methods, log_enter_exit from utils.service import Service from utils.node_manager import NodeManager from utils.ssh_util import SSH_CONFIG +from common import config as CONFIG +from utils import utils_yaml @for_all_methods(log_enter_exit) class ODLReInstaller(Service): def run(self, sys_args, config): - SSH_CONFIG['ID_RSA_PATH'] = sys_args.id_rsa + cloner_info_path = sys_args.cloner_info + SSH_CONFIG['ID_RSA_PATH'] = cloner_info_path + CONFIG.ID_RSA_PATH + node_config = utils_yaml.read_dict_from_yaml( + cloner_info_path + CONFIG.NODE_YAML_PATH) # copy ODL to all nodes where it need to be copied - self.nodes = NodeManager(config['servers']).get_nodes() + self.nodes = NodeManager(node_config['servers']).get_nodes() for node in self.nodes: LOG.info('Disconnecting OpenVSwitch from controller on node %s' % node.name) @@ -64,17 +69,12 @@ class ODLReInstaller(Service): % ovs_controller, as_root=True) def create_cli_parser(self, parser): - parser.add_argument('-c', '--config', - help=("Give the path to the node config file " - "(node.yaml)"), + parser.add_argument('--cloner-info', + help=("Give the path to the clone info"), required=True) parser.add_argument('--odl-artifact', help=("Path to Opendaylight tarball"), required=True) - parser.add_argument('--id-rsa', - help=("Path to the identity file which can " - "be used to connect to the overcloud"), - required=True) return parser -- cgit 1.2.3-korg