summaryrefslogtreecommitdiff
path: root/saharaclient/api/plugins.py
diff options
context:
space:
mode:
authorJamie Lennox <jamielennox@redhat.com>2015-01-16 16:07:32 +1000
committerJamie Lennox <jamielennox@redhat.com>2015-01-16 16:11:38 +1000
commit1e99c7ed93f068efd460259ad9f03b88736967c8 (patch)
treeaa161f206d1e909daecb920af5a82e1b03c9d7f8 /saharaclient/api/plugins.py
parentb5c60118edbaa8a04b33aed521b1bbe81c9a274f (diff)
downloadpython-saharaclient-1e99c7ed93f068efd460259ad9f03b88736967c8.tar.gz
Remove cyclic dependency
The cyclical dependency from client to manager then back on client has caused problems in other projects as the client doesn't always get properly destroyed which can lead to it holding open network connections. Remove this dependency and instead simply pass the constructed HTTPClient to the managers. Change-Id: Id112ab366ad19bc6ae239cfcadb5eb98f6cb8abf
Diffstat (limited to 'saharaclient/api/plugins.py')
-rw-r--r--saharaclient/api/plugins.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/saharaclient/api/plugins.py b/saharaclient/api/plugins.py
index 0e877a4..9399ace 100644
--- a/saharaclient/api/plugins.py
+++ b/saharaclient/api/plugins.py
@@ -44,11 +44,11 @@ class PluginManager(base.ResourceManager):
def convert_to_cluster_template(self, plugin_name, hadoop_version,
template_name, filecontent):
- resp = self.api.client.post('/plugins/%s/%s/convert-config/%s' %
- (plugin_name,
- hadoop_version,
- urlparse.quote(template_name)),
- filecontent)
+ resp = self.api.post('/plugins/%s/%s/convert-config/%s' %
+ (plugin_name,
+ hadoop_version,
+ urlparse.quote(template_name)),
+ filecontent)
if resp.status_code != 202:
raise RuntimeError('Failed to upload template file for plugin "%s"'
' and version "%s"' %