Task arguments changed

To avoid failures of fuelclient code because of ambiguity of arguments
supplying, arguments declaration for task operation changed to more
obvious scheme.

Change-Id: I58d0b4a5245d15bcb7f4ff28c8048ebad39e43e2
Closes-Bug: #1364007
This commit is contained in:
Artem Roma
2014-09-30 15:44:28 +03:00
parent 613db7beb6
commit 51d2051775
3 changed files with 4 additions and 12 deletions

View File

@@ -43,10 +43,10 @@ class TaskAction(Action):
@check_all("task")
def delete(self, params):
"""To delete some tasks:
fuel task delete -t 1,2,3
fuel task delete --task-id 1,2,3
To delete some tasks forcefully (without considering their state):
fuel task delete -f -t 1,6
fuel task delete -f --tid 1,6
"""
tasks = Task.get_by_ids(params.task)
delete_response = map(
@@ -64,7 +64,7 @@ class TaskAction(Action):
fuel task
To display tasks with some ids:
fuel task -t 1,2,3
fuel task --tid 1,2,3
"""
acceptable_keys = ("id", "status", "name",
"cluster", "progress", "uuid")

View File

@@ -359,7 +359,7 @@ def get_node_arg(help_msg):
def get_task_arg(help_msg):
default_kwargs = {
"action": TaskAction,
"flags": ("-t", "--task-id", "--tid"),
"flags": ("--task-id", "--tid"),
"nargs": '+',
"type": lambda v: v.split(","),
"default": None,

View File

@@ -157,14 +157,6 @@ class TestHandlers(BaseTestCase):
],
check_errors=True
)
self.check_all_in_msg(
"task -t 1 --delete --debug",
[
"DELETE http://127.0.0.1",
"/api/v1/tasks/1/?force=0"
],
check_errors=True
)
self.check_all_in_msg(
"task --tid 1 --delete --debug",
[