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

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

项目:cuny-bdif    作者:aristotle-tek    | 项目源码 | 文件源码
def attach(self, server=None):
        if self.attachment_state == 'attached':
            print('already attached')
            return None
        if server:
            self.server = server
            self.put()
        ec2 = self.get_ec2_connection()
        ec2.attach_volume(self.volume_id, self.server.instance_id, self.device)
项目:learneveryword    作者:karan    | 项目源码 | 文件源码
def attach(self, server=None):
        if self.attachment_state == 'attached':
            print('already attached')
            return None
        if server:
            self.server = server
            self.put()
        ec2 = self.get_ec2_connection()
        ec2.attach_volume(self.volume_id, self.server.instance_id, self.device)
项目:Chromium_DepotTools    作者:p07r0457    | 项目源码 | 文件源码
def attach(self, server=None):
        if self.attachment_state == 'attached':
            print 'already attached'
            return None
        if server:
            self.server = server
            self.put()
        ec2 = self.get_ec2_connection()
        ec2.attach_volume(self.volume_id, self.server.instance_id, self.device)
项目:node-gn    作者:Shouqun    | 项目源码 | 文件源码
def attach(self, server=None):
        if self.attachment_state == 'attached':
            print 'already attached'
            return None
        if server:
            self.server = server
            self.put()
        ec2 = self.get_ec2_connection()
        ec2.attach_volume(self.volume_id, self.server.instance_id, self.device)
项目:alfred-ec2    作者:SoMuchToGrok    | 项目源码 | 文件源码
def attach(self, server=None):
        if self.attachment_state == 'attached':
            print('already attached')
            return None
        if server:
            self.server = server
            self.put()
        ec2 = self.get_ec2_connection()
        ec2.attach_volume(self.volume_id, self.server.instance_id, self.device)
项目:depot_tools    作者:webrtc-uwp    | 项目源码 | 文件源码
def attach(self, server=None):
        if self.attachment_state == 'attached':
            print 'already attached'
            return None
        if server:
            self.server = server
            self.put()
        ec2 = self.get_ec2_connection()
        ec2.attach_volume(self.volume_id, self.server.instance_id, self.device)