From dcb147e11b0fabcfe1acfbc44ca7503c5a717264 Mon Sep 17 00:00:00 2001 From: Ilya Kharin Date: Tue, 6 Sep 2016 23:16:08 +0300 Subject: [PATCH] Use graph_types to reflect changes in fuelclient The GraphClient.execute method was changed and this patch compensates such changes. The interface of GraphClient was changed by the next change request: Iafc59c60a1ebce4a360ce1faa00a27ab320fa90b Change-Id: I68523afe49de6da9f9792200419dcc35843b07d8 Closes-Bug: #1620809 --- octane/tests/test_util_deployment.py | 2 ++ octane/util/deployment.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/octane/tests/test_util_deployment.py b/octane/tests/test_util_deployment.py index 8f657689..012c3f20 100644 --- a/octane/tests/test_util_deployment.py +++ b/octane/tests/test_util_deployment.py @@ -109,6 +109,8 @@ def test_execute_graph_and_wait(mocker, statuses, graph_name, env_id, is_error, assert excinfo.exconly().startswith("Exception: Timeout waiting of") else: execute_graph() + mock_graph.return_value.execute.assert_called_once_with( + env_id, graph_types=[graph_name]) assert mock_status.call_count == attempts diff --git a/octane/util/deployment.py b/octane/util/deployment.py index 5c00c92b..8d6f95ce 100644 --- a/octane/util/deployment.py +++ b/octane/util/deployment.py @@ -75,7 +75,7 @@ def execute_graph_and_wait(graph_name, env_id, """Execute graph with fuelclient and wait until finished.""" client = graph.GraphClient() - graph_task = client.execute(env_id, None, graph_type=graph_name) + graph_task = client.execute(env_id, graph_types=[graph_name]) for i in xrange(attempts): status = graph_task.status if status == 'ready':