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

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

项目:cuny-bdif    作者:aristotle-tek    | 项目源码 | 文件源码
def detach(self, force=False):
        state = self.attachment_state
        if state == 'available' or state is None or state == 'detaching':
            print('already detached')
            return None
        ec2 = self.get_ec2_connection()
        ec2.detach_volume(self.volume_id, self.server.instance_id, self.device, force)
        self.server = None
        self.put()
项目:learneveryword    作者:karan    | 项目源码 | 文件源码
def detach(self, force=False):
        state = self.attachment_state
        if state == 'available' or state is None or state == 'detaching':
            print('already detached')
            return None
        ec2 = self.get_ec2_connection()
        ec2.detach_volume(self.volume_id, self.server.instance_id, self.device, force)
        self.server = None
        self.put()
项目:Chromium_DepotTools    作者:p07r0457    | 项目源码 | 文件源码
def detach(self, force=False):
        state = self.attachment_state
        if state == 'available' or state == None or state == 'detaching':
            print 'already detached'
            return None
        ec2 = self.get_ec2_connection()
        ec2.detach_volume(self.volume_id, self.server.instance_id, self.device, force)
        self.server = None
        self.put()
项目:node-gn    作者:Shouqun    | 项目源码 | 文件源码
def detach(self, force=False):
        state = self.attachment_state
        if state == 'available' or state == None or state == 'detaching':
            print 'already detached'
            return None
        ec2 = self.get_ec2_connection()
        ec2.detach_volume(self.volume_id, self.server.instance_id, self.device, force)
        self.server = None
        self.put()
项目:alfred-ec2    作者:SoMuchToGrok    | 项目源码 | 文件源码
def detach(self, force=False):
        state = self.attachment_state
        if state == 'available' or state is None or state == 'detaching':
            print('already detached')
            return None
        ec2 = self.get_ec2_connection()
        ec2.detach_volume(self.volume_id, self.server.instance_id, self.device, force)
        self.server = None
        self.put()
项目:depot_tools    作者:webrtc-uwp    | 项目源码 | 文件源码
def detach(self, force=False):
        state = self.attachment_state
        if state == 'available' or state == None or state == 'detaching':
            print 'already detached'
            return None
        ec2 = self.get_ec2_connection()
        ec2.detach_volume(self.volume_id, self.server.instance_id, self.device, force)
        self.server = None
        self.put()