Align plugins filtering for 'fuel2 graph list' command

Change-Id: Iba533f795f78bcd74d5989eff9ed9342c66d05b0
Closes-Bug: 1638605
(cherry picked from commit 57bbc76a78)
This commit is contained in:
tivaliy
2016-11-03 07:39:13 +02:00
committed by Georgy Kibardin
parent e8f09541ab
commit 42eee1c80f
4 changed files with 5 additions and 5 deletions

View File

@@ -329,7 +329,7 @@ class GraphList(base.BaseListCommand):
'--plugins',
dest='filters',
action='append_const',
const='plugins',
const='plugin',
help='Include plugins-specific graphs'
)
parser.add_argument(

View File

@@ -354,9 +354,9 @@ class TestGraphActions(test_engine.BaseCLITest):
self.exec_command('graph list')
self.m_client.list.assert_has_calls([
mock.call(env_id=1, filters=['release', 'plugins', 'cluster']),
mock.call(env_id=1, filters=['release', 'plugin', 'cluster']),
mock.call(env_id=None, filters=['release']),
mock.call(env_id=None, filters=['plugins']),
mock.call(env_id=None, filters=['plugin']),
mock.call(env_id=None, filters=['cluster']),
mock.call(env_id=None, filters=None)
])

View File

@@ -274,7 +274,7 @@ class TestDeploymentGraphFacade(test_api.BaseLibTest):
self.assertItemsEqual(
enabled_plugin_graphs,
self.client.list(env_id, filters=['plugins'])
self.client.list(env_id, filters=['plugin'])
)
self.assertItemsEqual(

View File

@@ -264,7 +264,7 @@ class GraphClient(base_v1.BaseV1Client):
# we cannot use dict here, because order is important
handlers = (
('release', self.get_env_release_graphs_list),
('plugins', self.get_env_plugins_graphs_list),
('plugin', self.get_env_plugins_graphs_list),
('cluster', self.get_env_cluster_graphs_list)
)