Small improvments

o lamda not needed, VALIDATORS doesn't need to be present
o check is host contains data befor adding it
o only remove cinder-volumes if there was an error creating it,
  no if we failed to connect with ssh

Change-Id: I4728373b7dfa9f3b7470daa9ec546608219bc0de
This commit is contained in:
Derek Higgins
2013-02-12 06:54:59 -05:00
parent 183723918c
commit e6de6a0933
3 changed files with 3 additions and 12 deletions

View File

@@ -72,13 +72,13 @@ def gethostlist(CONF):
for key, value in CONF.items():
if key.endswith("_HOST"):
value = value.split('/')[0]
if value not in hosts and value:
if value and value not in hosts:
hosts.append(value)
if key.endswith("_HOSTS"):
for host in value.split(","):
host = host.strip()
host = host.split('/')[0]
if host not in hosts and host:
if host and host not in hosts:
hosts.append(host)
return hosts