SLA plugin: template integration with SLA Dashboard
[myslice.git] / sla / slaclient / restclient.py
index e6c516d..4b8614b 100755 (executable)
@@ -126,8 +126,7 @@ class Client(object):
         # for key, values in kwargs.iteritems():
         #     print key, values
 
-        logger.debug('SLA GET {}'.format(url))
-        result = requests.get(url, **kwargs)
+        result = requests.get(url, verify=False, **kwargs)
         logger.debug('SLA GET {} - result: {}'.format(result.url, result.status_code))
         # print "GET {} {} {}".format(
         #     result.url, result.status_code, result.text[0:70])
@@ -170,7 +169,7 @@ class Client(object):
         result = requests.post(url, data, **kwargs)
         location = result.headers["location"] \
             if "location" in result.headers else "<null>"
-        print "POST {} {} Location: {}".format(
+        print "POST {} {} Location: {}".format(
             result.url, result.status_code, location)
         return result
 
@@ -344,12 +343,12 @@ class Templates(object):
         converter = xmlconverter.AgreementConverter()
         self.res = _Resource(resourceurl, converter)
 
-    def getall(self):
+    def getall(self, provider_id):
         """ Get all templates
 
         :rtype : list[wsag_model.Template]
         """
-        return self.res.getall()
+        return self.res.get(path="", params={"testbed": provider_id})
 
     def getbyid(self, provider_id):
         """Get a template