summaryrefslogtreecommitdiffstats
path: root/odl-pipeline/lib/odl_reinstaller
diff options
context:
space:
mode:
authorNikolas Hermanns <nikolas.hermanns@ericsson.com>2016-12-13 14:07:03 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-13 14:07:03 +0000
commit4a9cd22e5d4b44419721c4b7ef6c92c186963e4a (patch)
tree6e82b55c9a2b5b468b9b44e40faf68dd3c7d7760 /odl-pipeline/lib/odl_reinstaller
parent2dd53e9153a37a5a9f14a8772224dbdaa091bbfa (diff)
parenteea4d05fb495d9f7848489e238c6be2327ab34f3 (diff)
Merge "adding common/config"
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