Ejemplo n.º 1
0
Archivo: image.py Proyecto: B-Rich/DOPY
    def destroy(self):

        destroy_image_response = utils.delete_request("images/{0}".format(self.id), self.authentication_token)

        if not destroy_image_response.ok:

            raise Exception("Could not destroy image! See error message: {0}".format(destroy_image_response.json()["message"]))
Ejemplo n.º 2
0
    def delete(self):

        delete_domain_response = utils.delete_request("domains/{0}".format(self.name), self.authentication_token)
        if not delete_domain_response.ok:

            raise Exception("Failed to delete domain! See error message: {0}".format(delete_domain_response.json()["message"]))
Ejemplo n.º 3
0
    def delete(self):

        response = utils.delete_request("droplets/{0}".format(self.id), self.authentication_token)
        if not response.ok:

            raise Exception("Failed to Delete Droplet! Message Returned: {0}".response.json()["message"])
Ejemplo n.º 4
0
    def delete(self):

        delete_domain_record_response = utils.delete_request("domains/{0}/records/{1}"
                .format(self.domain_name, self.id), self.authentication_token)