labpack/platforms/aws/ec2.py
def read_address(self, ip_address):
        
        '''
            a method to retrieve details about an elastic ip address associated with account on AWS
            
        :param ip_address: string with elastic ipv4 address on ec2 
        :return: dictionary with ip address details
        '''
        
        title = '%s.read_address' % self.__class__.__name__

    # validate inputs
        input_fields = {
            'ip_address': ip_address
        }
        for key, value in input_fields.items():
            if value:
                object_title = '%s(%s=%s)' % (title, key, str(value))
                self.fields.validate(value, '.%s' % key, object_title)
    
    # report query
        self.iam.printer('Querying AWS region %s for properties of elastic ip %s.' % (self.iam.region_name, ip_address))
        
    # discover details associated with instance id
        try:
            response = self.connection.describe_addresses(PublicIps=[ ip_address ])
            address_info = response['Addresses'][0]
        except:
            raise AWSConnectionError(title)

    # create dictionary of instance details
        address_details = {
            'instance_id': '',
            'public_ip': '',
            'allocation_id': '',
            'association_id': '',
            'domain': '',
            'network_interface_id': '',
            'network_interface_owner_id': '',
            'private_ip_address': '',
            'tags': [],
            'region': self.iam.region_name
        }
        address_details = self.iam.ingest(address_info, address_details)

        return address_details

            a method to retrieve details about an elastic ip address associated with account on AWS
            
        :param ip_address: string with elastic ipv4 address on ec2 
        :return: dictionary with ip address details
        
a method to retrieve details about an elastic ip address associated with account on AWS
a method to retrieve details about an elastic ip address associated with account on AWS
def read_address(self, ip_address):
        title = '%s.read_address' % self.__class__.__name__
        input_fields = {
            'ip_address': ip_address
        }
        for key, value in input_fields.items():
            if value:
                object_title = '%s(%s=%s)' % (title, key, str(value))
                self.fields.validate(value, '.%s' % key, object_title)
        self.iam.printer('Querying AWS region %s for properties of elastic ip %s.' % (self.iam.region_name, ip_address))
        try:
            response = self.connection.describe_addresses(PublicIps=[ ip_address ])
            address_info = response['Addresses'][0]
        except:
            raise AWSConnectionError(title)
        address_details = {
            'instance_id': '',
            'public_ip': '',
            'allocation_id': '',
            'association_id': '',
            'domain': '',
            'network_interface_id': '',
            'network_interface_owner_id': '',
            'private_ip_address': '',
            'tags': [],
            'region': self.iam.region_name
        }
        address_details = self.iam.ingest(address_info, address_details)
        return address_details
def read_address ( self , ip_address ) : title = '%s.read_address' % self . __class__ . __name__ input_fields = { 'ip_address' : ip_address } for key , value in input_fields . items ( ) : if value : object_title = '%s(%s=%s)' % ( title , key , str ( value ) ) self . fields . validate ( value , '.%s' % key , object_title ) self . iam . printer ( 'Querying AWS region %s for properties of elastic ip %s.' % ( self . iam . region_name , ip_address ) ) try : response = self . connection . describe_addresses ( PublicIps = [ ip_address ] ) address_info = response [ 'Addresses' ] [ 0 ] except : raise AWSConnectionError ( title ) address_details = { 'instance_id' : '' , 'public_ip' : '' , 'allocation_id' : '' , 'association_id' : '' , 'domain' : '' , 'network_interface_id' : '' , 'network_interface_owner_id' : '' , 'private_ip_address' : '' , 'tags' : [ ] , 'region' : self . iam . region_name } address_details = self . iam . ingest ( address_info , address_details ) return address_details
a method to retrieve details about an elastic ip address associated with account on AWS
a method to retrieve details about an elastic ip address associated with account on AWS
'''
            a method to retrieve details about an elastic ip address associated with account on AWS
            
        :param ip_address: string with elastic ipv4 address on ec2 
        :return: dictionary with ip address details
        ''' # validate inputs # report query # discover details associated with instance id # create dictionary of instance details
dictionary with ip address details
dictionary with ip address details
self
ip_address
string with elastic ipv4 address on ec2
string with elastic ipv4 address on ec2