Align parameter name in 'fuel2 graph *' command

Now fuel2 graph download and upload commands contain wrong
parameter name that doesn't meet Fuel Graph Concept Extension
And Usage specification I1d0b9844a2603774f261b7d933e0c720ecd0e112.
This patch replaces '--type' name parameter with respective
'--graph-type' one according to the spec above

Change-Id: I3f1665c807614107883415fb9291a921d780f535
Closes-Bug: 1618449
This commit is contained in:
tivaliy 2016-09-29 07:50:03 +03:00 committed by Vitalii Kulanov
parent 496968758f
commit 0260c9bcbd
2 changed files with 6 additions and 6 deletions

View File

@ -115,7 +115,7 @@ class GraphUpload(base.BaseCommand, FileMethodsMixin):
help='Id of the plugin')
parser.add_argument('-t',
'--type',
'--graph-type',
required=True,
help='Type of the deployment graph')
@ -153,7 +153,7 @@ class GraphUpload(base.BaseCommand, FileMethodsMixin):
data=data,
related_model=graph_class,
related_id=model_id,
graph_type=args.type
graph_type=args.graph_type
)
break
@ -237,7 +237,7 @@ class GraphDownload(base.BaseCommand):
help='Download release-specific tasks')
parser.add_argument('-t',
'--type',
'--graph-type',
type=str,
default=None,
required=False,
@ -278,7 +278,7 @@ class GraphDownload(base.BaseCommand):
tasks_data = self.client.download(
env_id=args.env,
level=tasks_level_name,
graph_type=args.type
graph_type=args.graph_type
)
break

View File

@ -92,7 +92,7 @@ class TestGraphActions(test_engine.BaseCLITest):
)
self._test_cmd(
'upload',
'--plugin 1 --file tasks.yaml --type custom_type',
'--plugin 1 --file tasks.yaml --graph-type custom_type',
dict(
data=yaml.load(TASKS_YAML),
related_model='plugins',
@ -277,7 +277,7 @@ class TestGraphActions(test_engine.BaseCLITest):
self._test_cmd(
'download',
'--env 1 --all --file existing_graph.yaml --type custom_graph',
'--env 1 --all --file existing_graph.yaml -t custom_graph',
dict(
env_id=1,
level='all',