Remove validate_not_empty from validate_multi_ssh
This patch removes the validate_not_empty call from the validate_multi_ssh validator. As a result, validate_multi_ssh will succeed for null parameter. The validate_not_empty validator should be added to a parameters list of validators as needed. This allows validation to be more flexible. Change-Id: I4668f9d4fd8f57f78183ee24842cbfbb6ee979a5
This commit is contained in:
@@ -232,7 +232,5 @@ def validate_multi_ssh(param, options=None):
|
||||
in param do not listen on port 22.
|
||||
"""
|
||||
options = options or []
|
||||
# TO-DO: to be more flexible, remove this and exit in case param is empty
|
||||
validate_not_empty(param)
|
||||
for host in param.split(","):
|
||||
validate_ssh(host)
|
||||
|
||||
@@ -64,7 +64,7 @@ def initConfig(controllerObject):
|
||||
"USAGE" : "A comma separated list of IP addresses on which to install the Nova Compute services",
|
||||
"PROMPT" : "Enter a comma separated list of IP addresses on which to install the Nova Compute services",
|
||||
"OPTION_LIST" : [],
|
||||
"VALIDATORS" : [validators.validate_multi_ssh],
|
||||
"VALIDATORS" : [validators.validate_not_empty, validators.validate_multi_ssh],
|
||||
"DEFAULT_VALUE" : utils.get_localhost_ip(),
|
||||
"MASK_INPUT" : False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
|
||||
Reference in New Issue
Block a user