From 5d6673e343a47fc4cf90e53b2e6e9fa37d7f601c Mon Sep 17 00:00:00 2001 From: Ifat Afek Date: Tue, 5 Mar 2019 16:54:56 +0000 Subject: [PATCH] Bugfix in add template: the new template_str argument must be last Change-Id: Icf67750226d379c20dbe9d93df18eeabf88aadfa --- vitrageclient/v1/template.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vitrageclient/v1/template.py b/vitrageclient/v1/template.py index 66f5c5a..e317ddf 100644 --- a/vitrageclient/v1/template.py +++ b/vitrageclient/v1/template.py @@ -35,18 +35,18 @@ class Template(object): url = self.url + uuid return self.api.get(url).json() - def add(self, path=None, template_str=None, - template_type=None, params=None): + def add(self, path=None, template_type=None, + params=None, template_str=None): """Add a new template :param path: (optional) The template file path or templates dir path + :param template_type: (optional) The template type, in case it is not + written inside the template metadata section + :param params: (optional) Actual values for the template parameters :param template_str: (optional) A string representation of the template yaml Either path or template_str must exist (but not both) - :param template_type: (optional) The template type, in case it is not - written inside the template metadata section - :param params: (optional) Actual values for the template parameters :return: """ files_content = \ @@ -61,8 +61,8 @@ class Template(object): params = dict(uuid=uuid) return self.api.delete(self.url, json=params).json() - def validate(self, path=None, template_str=None, - template_type=None, params=None): + def validate(self, path=None, template_type=None, + params=None, template_str=None): """Template validation Make sure that the template file is correct in terms of syntax @@ -72,13 +72,13 @@ class Template(object): directory must contain only templates) :param path: (optional) The template file path or templates dir path + :param template_type: (optional) The template type, in case it is not + written inside the template metadata section + :param params: (optional) Actual values for the template parameters :param template_str: (optional) A string representation of the template yaml Either path or template_str must exist (but not both) - :param template_type: (optional) The template type, in case it is not - written inside the template metadata section - :param params: (optional) Actual values for the template parameters :return: """ files_content = \