Beispiel #1
0
def delete_backend(uri, backend_id, cookie=None, csrf=None):
    req = MyRequests(uri=uri + '/backends/' + backend_id,
                     cookie=cookie,
                     csrf=csrf)
    response = req.delete()
    assert response.ok, u'\nGot %d Response Status: %s \n%s' % (
        response.status_code, response.reason, response.text)

    print "Deleted Backend with id: %s" % backend_id
Beispiel #2
0
def delete_key(uri, key_id, cookie=None):
    req = MyRequests(uri=uri+"/keys/"+key_id, cookie=cookie)
    response = req.delete()
    assert response.ok, u'\nGot %d Response Status: %s \n%s' % (response.status_code, response.reason, response.text)

    try:
        params = response.json()
        print "Deleted Key: %s" % key_id
        return params
    except Exception as e:
        assert False, u'Exception: %s' %e
Beispiel #3
0
def delete_key(uri, key_id, cookie=None, csrf=None):
    req = MyRequests(uri=uri + "/keys/" + key_id, cookie=cookie, csrf=csrf)
    response = req.delete()
    assert response.ok, u'\nGot %d Response Status: %s \n%s' % (
        response.status_code, response.reason, response.text)

    try:
        params = response.json()
        print "Deleted Key: %s" % key_id
        return params
    except Exception as e:
        assert False, u'Exception: %s' % e
Beispiel #4
0
def delete_cloud(uri, cloud_id, cookie=None, csrf=None):
    req = MyRequests(uri=uri+'/clouds/'+cloud_id, cookie=cookie, csrf=csrf)
    response = req.delete()
    assert response.ok, u'\nGot %d Response Status: %s \n%s' % (response.status_code, response.reason, response.text)

    print "Deleted Cloud with id: %s" % cloud_id
Beispiel #5
0
def delete_backend(uri, backend_id, cookie=None, csrf=None):
    req = MyRequests(uri=uri+'/backends/'+backend_id, cookie=cookie, csrf=csrf)
    response = req.delete()
    assert response.ok, u'\nGot %d Response Status: %s \n%s' % (response.status_code, response.reason, response.text)

    print "Deleted Backend with id: %s" % backend_id