kwargs["auth"] = HTTPBasicAuth(settings.SLA_COLLECTOR_USER,
settings.SLA_COLLECTOR_PASSWORD)
- result = requests.post(url, data, **kwargs)
+ result = requests.post(url, data, verify=False, **kwargs)
location = result.headers["location"] \
if "location" in result.headers else "<null>"
print "POST {} {} - Location: {}".format(
c = restclient.Templates(SLA_COLLECTOR_URL)
testbed = kwargs.get('testbed', None)
- #logger.debug("AAAAA testbed: {}".format(testbed))
-
templates, response = c.getall(testbed)
service_level_objectives = []
- #logger.debug("BBBBB templates: {}".format(templates))
-
for template in templates:
service_level_objectives.append(
[v.servicelevelobjective for v in template.guaranteeterms.values()])
- logger.debug("CCCCC slo: {}".format(service_level_objectives))
-
return HttpResponse(service_level_objectives, content_type="application/json", status=response.status_code)
class CreateAgreement(LoginRequiredView, ThemeView):
dt = datetime.fromtimestamp(float(tstmp))
# gmt_2 = pytz.timezone("Etc/GMT-2")
# dlocal = gmt_2.localize(dt).isoformat()
- dlocal = dt.isoformat() + "CET" # FIXME: hardcoded for demo purposes
+ dlocal = dt.isoformat() + "CET"
data["SLIVER_INFO_EXPIRATION"] = dlocal
# logger.debug("SLA Agreement parameters: {}".format(data.dict()))