From 26001955b49c5141745a65fd395e1370f9addebd Mon Sep 17 00:00:00 2001 From: tivaliy Date: Thu, 29 Sep 2016 07:50:03 +0300 Subject: [PATCH] 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 --- fuelclient/commands/graph.py | 8 ++++---- fuelclient/tests/unit/v2/cli/test_deployment_graph.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fuelclient/commands/graph.py b/fuelclient/commands/graph.py index 9c1866e9..89ee3e9f 100644 --- a/fuelclient/commands/graph.py +++ b/fuelclient/commands/graph.py @@ -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 diff --git a/fuelclient/tests/unit/v2/cli/test_deployment_graph.py b/fuelclient/tests/unit/v2/cli/test_deployment_graph.py index 1477f9d1..eb443043 100644 --- a/fuelclient/tests/unit/v2/cli/test_deployment_graph.py +++ b/fuelclient/tests/unit/v2/cli/test_deployment_graph.py @@ -94,7 +94,7 @@ class TestGraphActions(test_engine.BaseCLITest): ) self._test_cmd( 'upload', - '--plugin 1 --file new_graph.yaml --type custom_type', + '--plugin 1 --file tasks.yaml --graph-type custom_type', dict( data=yaml.load(TASKS_YAML), related_model='plugins', @@ -279,7 +279,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',