summaryrefslogtreecommitdiff
path: root/ironic_python_agent/agent.py
diff options
context:
space:
mode:
authorJulia Kreger <juliaashleykreger@gmail.com>2016-08-24 13:16:32 -0400
committerJulia Kreger <juliaashleykreger@gmail.com>2016-08-26 12:53:30 +0000
commit95f31be108f6f1a259d64535967d796a25e4d7cd (patch)
tree890aab3ebc0620739d56c3223891d3f42c281bc1 /ironic_python_agent/agent.py
parente3c7f7c7cc1c55bdc53933d0fdcf46288c372d57 (diff)
downloadironic-python-agent-95f31be108f6f1a259d64535967d796a25e4d7cd.tar.gz
Re-use API client for Heartbeat operations
Re-initialization of the API client causes the identification of an older ironic API to be forgotten. As such, we need to re-use the API client from the initial lookup for the heartbeat. Tested with current master branch and stable/mitaka ipa in noauth mode, and was able to deploy without any issues. Closes-Bug: #1616461 Change-Id: I3ae1e2ce83f614b5b936a3cbb1b9587c6c55a89a
Diffstat (limited to 'ironic_python_agent/agent.py')
-rw-r--r--ironic_python_agent/agent.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/ironic_python_agent/agent.py b/ironic_python_agent/agent.py
index 569b2d41..bbf1e71c 100644
--- a/ironic_python_agent/agent.py
+++ b/ironic_python_agent/agent.py
@@ -88,8 +88,7 @@ class IronicPythonAgentHeartbeater(threading.Thread):
"""
super(IronicPythonAgentHeartbeater, self).__init__()
self.agent = agent
- self.api = ironic_api_client.APIClient(agent.api_url,
- agent.driver_name)
+ self.api = agent.api_client
self.error_delay = self.initial_delay
self.reader = None
self.writer = None