summaryrefslogtreecommitdiffstats
path: root/odl-pipeline/lib/odl_reinstaller
diff options
context:
space:
mode:
authorNikolas Hermanns <nikolas.hermanns@ericsson.com>2016-12-13 13:37:23 +0100
committerNikolas Hermanns <nikolas.hermanns@ericsson.com>2016-12-13 15:05:54 +0100
commiteea4d05fb495d9f7848489e238c6be2327ab34f3 (patch)
treebdb14d47c7c39d55be548db3e3c879574b76f59a /odl-pipeline/lib/odl_reinstaller
parent416f9cf177801cecfe39f5249d73e3a4a85f0bbd (diff)
adding common/config
Change-Id: I2d96e6efa628f066e165a8e37d2604eb8f0634bd Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com>
Diffstat (limited to 'odl-pipeline/lib/odl_reinstaller')
-rwxr-xr-xodl-pipeline/lib/odl_reinstaller/odl_reinstaller.py18
1 files changed, 9 insertions, 9 deletions
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