From 7b884b1455bff7011a74ee236c53532f9706afbe Mon Sep 17 00:00:00 2001 From: Andrew Lazarev Date: Tue, 6 Jan 2015 10:28:47 -0800 Subject: [PATCH] Fixed topology parameters help in config There is no way to make multi-line help for config parameters. Official documentation contains description of required format for the files. Removing this information from config parameters description. Change-Id: I32682b1ecf951d0c6990e06325ef29fb30b3ca54 Closes-Bug: #1407837 --- etc/sahara/sahara.conf.sample | 25 ++++++++++------------- sahara/topology/topology_helper.py | 32 ++++++++++++------------------ 2 files changed, 23 insertions(+), 34 deletions(-) diff --git a/etc/sahara/sahara.conf.sample b/etc/sahara/sahara.conf.sample index 17ce1ada..f580ff66 100644 --- a/etc/sahara/sahara.conf.sample +++ b/etc/sahara/sahara.conf.sample @@ -337,27 +337,22 @@ # when returning it. (list value) #plugins = vanilla,hdp,spark -# Enables data locality for hadoop cluster. Also -# enables data locality for Swift used by hadoop. If -# enabled, 'compute_topology' and 'swift_topology' -# configuration parameters should point to OpenStack and Swift -# topology correspondingly. (boolean value) +# Enables data locality for hadoop cluster. Also enables data locality +# for Swift used by hadoop. If enabled, 'compute_topology' and +# 'swift_topology' configuration parameters should point to OpenStack +# and Swift topology correspondingly. (boolean value) #enable_data_locality = false -# Enables four-level topology for data locality. Works -# only if corresponding plugin supports such mode. (boolean value) +# Enables four-level topology for data locality. Works only if +# corresponding plugin supports such mode. (boolean value) #enable_hypervisor_awareness = true -# File with nova compute topology. It should contain -# mapping between nova computes and racks. File -# format: compute1 /rack1 compute2 -# /rack2 compute3 /rack2 (string value) +# File with nova compute topology. It should contain mapping between +# nova computes and racks. (string value) #compute_topology_file = etc/sahara/compute.topology -# File with Swift topology. It should contain mapping -# between Swift nodes and racks. File format: -# node1 /rack1 node2 /rack2 node3 -# /rack2 (string value) +# File with Swift topology.It should contain mapping between Swift +# nodes and racks. (string value) #swift_topology_file = etc/sahara/swift.topology # Notification level for outgoing notifications (string value) diff --git a/sahara/topology/topology_helper.py b/sahara/topology/topology_helper.py index be187b91..aec5b62d 100644 --- a/sahara/topology/topology_helper.py +++ b/sahara/topology/topology_helper.py @@ -38,31 +38,25 @@ LOG = log.getLogger(__name__) opts = [ cfg.BoolOpt('enable_data_locality', default=False, - help="""Enables data locality for hadoop cluster. - Also enables data locality for Swift used by hadoop. - If enabled, 'compute_topology' and 'swift_topology' - configuration parameters should point to OpenStack and Swift - topology correspondingly."""), + help="Enables data locality for hadoop cluster. " + "Also enables data locality for Swift used by hadoop. " + "If enabled, 'compute_topology' and 'swift_topology' " + "configuration parameters should point to OpenStack and " + "Swift topology correspondingly."), cfg.BoolOpt('enable_hypervisor_awareness', default=True, - help="""Enables four-level topology for data locality. - Works only if corresponding plugin supports such mode."""), + help="Enables four-level topology for data locality. " + "Works only if corresponding plugin supports such mode."), cfg.StrOpt('compute_topology_file', default='etc/sahara/compute.topology', - help="""File with nova compute topology. - It should contain mapping between nova computes and racks. - File format: - compute1 /rack1 - compute2 /rack2 - compute3 /rack2"""), + help="File with nova compute topology. " + "It should contain mapping between nova computes and " + "racks."), cfg.StrOpt('swift_topology_file', default='etc/sahara/swift.topology', - help="""File with Swift topology. - It should contain mapping between Swift nodes and racks. - File format: - node1 /rack1 - node2 /rack2 - node3 /rack2""") + help="File with Swift topology." + "It should contain mapping between Swift nodes and " + "racks.") ] CONF = cfg.CONF