- url = _buildpath_(self.rooturl, path)
- kwargs["auth"] = HTTPBasicAuth(settings.SLA_MANAGER_USER, settings.SLA_MANAGER_PASSWORD)
- result = requests.get(url, **kwargs)
- print "GET {} {} {}".format(
- result.url, result.status_code, result.text[0:70])
+ url = _buildpath(self.rooturl, path)
+ if "testbed" in kwargs:
+ url = url + "?testbed=" + kwargs["testbed"]
+
+ if "headers" not in kwargs:
+ kwargs["headers"] = {"accept": "application/xml"}
+
+
+ kwargs["auth"] = HTTPBasicAuth(settings.SLA_COLLECTOR_USER,
+ settings.SLA_COLLECTOR_PASSWORD)
+
+ # for key, values in kwargs.iteritems():
+ # print key, values
+
+ 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])
+ # print result.encoding
+