diff --git a/SAS/TMSS/client/lib/tmss_http_rest_client.py b/SAS/TMSS/client/lib/tmss_http_rest_client.py index 5b89c36049361afc1269ad2002a36f642c3ac0af..555761c2d5ae088ad374b817e269d019eb57a390 100644 --- a/SAS/TMSS/client/lib/tmss_http_rest_client.py +++ b/SAS/TMSS/client/lib/tmss_http_rest_client.py @@ -263,12 +263,13 @@ class TMSSsession(object): content = response.content.decode('utf-8') raise Exception("Could not set status with url %s - %s %s - %s" % (response.request.url, response.status_code, responses.get(response.status_code), content)) - def post_template(self, template_path:str, name: str, description: str, version: str, schema: str): + def post_template(self, template_path:str, name: str, description: str, version: str, schema: str, **kwargs): '''POST a template at <BASE_URL>/<template_path> with the given name, description and version''' json_data = {'name': name, 'description': description, 'version': version, 'schema': json.loads(schema) if isinstance(schema, str) else schema} + json_data.update(**kwargs) response = self.session.post(url='%s/%s/' % (self.base_url, template_path), json=json_data) if response.status_code == 201: