Python boto.ec2 模块,delete_volume() 实例源码

我们从Python开源项目中,提取了以下7个代码示例,用于说明如何使用boto.ec2.delete_volume()

项目:cuny-bdif    作者:aristotle-tek    | 项目源码 | 文件源码
def delete(self, delete_ebs_volume=False):
        if delete_ebs_volume:
            self.detach()
            ec2 = self.get_ec2_connection()
            ec2.delete_volume(self.volume_id)
        super(Volume, self).delete()
项目:DevOps    作者:YoLoveLife    | 项目源码 | 文件源码
def delete_volume(module, ec2):
    volume_id = module.params['id']
    try:
        ec2.delete_volume(volume_id)
        module.exit_json(changed=True)
    except boto.exception.EC2ResponseError as ec2_error:
        if ec2_error.code == 'InvalidVolume.NotFound':
            module.exit_json(changed=False)
        module.fail_json(msg=ec2_error.message)
项目:learneveryword    作者:karan    | 项目源码 | 文件源码
def delete(self, delete_ebs_volume=False):
        if delete_ebs_volume:
            self.detach()
            ec2 = self.get_ec2_connection()
            ec2.delete_volume(self.volume_id)
        super(Volume, self).delete()
项目:Chromium_DepotTools    作者:p07r0457    | 项目源码 | 文件源码
def delete(self, delete_ebs_volume=False):
        if delete_ebs_volume:
            self.detach()
            ec2 = self.get_ec2_connection()
            ec2.delete_volume(self.volume_id)
        Model.delete(self)
项目:node-gn    作者:Shouqun    | 项目源码 | 文件源码
def delete(self, delete_ebs_volume=False):
        if delete_ebs_volume:
            self.detach()
            ec2 = self.get_ec2_connection()
            ec2.delete_volume(self.volume_id)
        Model.delete(self)
项目:alfred-ec2    作者:SoMuchToGrok    | 项目源码 | 文件源码
def delete(self, delete_ebs_volume=False):
        if delete_ebs_volume:
            self.detach()
            ec2 = self.get_ec2_connection()
            ec2.delete_volume(self.volume_id)
        super(Volume, self).delete()
项目:depot_tools    作者:webrtc-uwp    | 项目源码 | 文件源码
def delete(self, delete_ebs_volume=False):
        if delete_ebs_volume:
            self.detach()
            ec2 = self.get_ec2_connection()
            ec2.delete_volume(self.volume_id)
        Model.delete(self)