changed ename to name

fixed missed name

restored formatted printout in 'fuel node'

Change-Id: Ifdaafbe5d59315d31dc067726c8e39164e7193ae
This commit is contained in:
Alexandr Notchenko 2013-10-21 17:28:42 +04:00
parent dbe8c6c491
commit ecef18d829

View File

@ -345,11 +345,11 @@ def environment(params):
print(format_table(data, acceptable_keys=acceptable_keys,
subdict_keys=[("release", u"id")]))
elif params.create:
check_for_attributes(params, ["ename", "rel"])
check_for_attributes(params, ["name", "rel"])
data = {
"nodes": [],
"tasks": [],
"name": params.ename,
"name": params.name,
"release": int(params.rel)
}
if params.net.lower() == "nova":
@ -380,13 +380,13 @@ def environment(params):
)
elif params.set:
check_for_attributes(params, ["env"])
if params.mode or params.ename:
if params.mode or params.name:
data = {}
if params.mode:
data["mode"] = "ha_compact" \
if params.mode.lower() == "ha" else "multinode"
if params.ename:
data["name"] = params.ename
if params.name:
data["name"] = params.name
put_response = json_api_put_request(
"clusters/{0}/".format(params.env),
data
@ -394,12 +394,12 @@ def environment(params):
if JSON or YAML:
print_formatted(put_response)
else:
if params.ename:
if params.name:
print(
"Environment with id={0} was renamed to {1}"
.format(
params.env,
params.ename
params.name
)
)
if params.mode:
@ -519,9 +519,12 @@ def node(params):
lambda x: x[u"id"] in node_ids,
data
)
print(
format_table(data, acceptable_keys=acceptable_keys)
)
if JSON or YAML:
print_formatted(data)
else:
print(
format_table(data, acceptable_keys=acceptable_keys)
)
def quote_and_join(words):
@ -1287,7 +1290,7 @@ actions = {
}, {
"args": ["--name", "--env-name"],
"params": {
"dest": "ename",
"dest": "name",
"action": "store",
"type": str,
"help": "environment name",