示例#1
0
文件: image.py 项目: 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"]))
示例#2
0
文件: domain.py 项目: B-Rich/DOPY
    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"]))
示例#3
0
文件: droplet.py 项目: B-Rich/DOPY
    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"])
示例#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)