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:
Ryan O'Hara
2013-04-30 07:59:40 -05:00
parent 286cf54305
commit e2fc1f7627
2 changed files with 1 additions and 3 deletions

View File

@@ -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)

View File

@@ -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,