diff options
author | Nikita Konovalov <nkonovalov@mirantis.com> | 2013-09-26 18:20:18 +0400 |
---|---|---|
committer | Nikita Konovalov <nkonovalov@mirantis.com> | 2013-09-27 12:59:23 +0400 |
commit | 2554d3da7fcfdd725b379f3822212b708ac67501 (patch) | |
tree | f1734d851048d6251c9c4ddbeca97ef6ce0ccd40 /savannaclient/api/plugins.py | |
parent | 6389f8fb58d1949f195b9b1deac20fc022324cef (diff) | |
download | python-saharaclient-0.3a1.tar.gz |
Sync with dashboard0.3a1
All recent changes made to savanna-dashboard
applied to client.
This patch should be last sync between repositories.
Savanna Dashboard will be updated to use python-savannaclient
Change-Id: Ib9807c05ba5af650e1f668e8c642be58025b85ef
Diffstat (limited to 'savannaclient/api/plugins.py')
-rw-r--r-- | savannaclient/api/plugins.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/savannaclient/api/plugins.py b/savannaclient/api/plugins.py index b9c93ef..5f27f8d 100644 --- a/savannaclient/api/plugins.py +++ b/savannaclient/api/plugins.py @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +import urllib + from savannaclient.api import base @@ -36,10 +38,15 @@ class PluginManager(base.ResourceManager): 'plugin') def convert_to_cluster_template(self, plugin_name, hadoop_version, - filecontent): - resp = self.api.client.post('/plugins/%s/%s/convert-config' % - (plugin_name, hadoop_version), filecontent) + template_name, filecontent): + resp = self.api.client.post('/plugins/%s/%s/convert-config/%s' % + (plugin_name, + hadoop_version, + urllib.quote(template_name)), + filecontent) if resp.status_code != 202: raise RuntimeError('Failed to upload template file for plugin "%s"' ' and version "%s"' % (plugin_name, hadoop_version)) + else: + return base.get_json(resp)['cluster_template'] |