labpack/authentication/aws/iam.py
def list_roles(self):
    
        '''
            a method to retrieve a list of server certificates

        :return: list with certificate name strings
        '''

        title = '%s.list_certificates' % self.__class__.__name__

    # send request for list of certificates
        self.printer('Querying AWS for iam roles.')
        try:
            response = self.connection.list_roles()
        except:
            raise AWSConnectionError(title)

    # construct certificate list from response
        role_list = []
        if 'Roles' in response.keys():
            for role in response['Roles']:
                role_list.append(role['RoleName'])

    # report results and return list
        if role_list:
            print_out = 'Found iam roles'
            if len(role_list) > 1:
                print_out += 's'
            from labpack.parsing.grammar import join_words
            print_out += ' %s.' % join_words(role_list)
            self.printer(print_out)
        else:
            self.printer('No iam roles found.')

        self.role_list = role_list
        
        return self.role_list

            a method to retrieve a list of server certificates

        :return: list with certificate name strings
        
a method to retrieve a list of server certificates
a method to retrieve a list of server certificates
def list_roles(self):
        title = '%s.list_certificates' % self.__class__.__name__
        self.printer('Querying AWS for iam roles.')
        try:
            response = self.connection.list_roles()
        except:
            raise AWSConnectionError(title)
        role_list = []
        if 'Roles' in response.keys():
            for role in response['Roles']:
                role_list.append(role['RoleName'])
        if role_list:
            print_out = 'Found iam roles'
            if len(role_list) > 1:
                print_out += 's'
            from labpack.parsing.grammar import join_words
            print_out += ' %s.' % join_words(role_list)
            self.printer(print_out)
        else:
            self.printer('No iam roles found.')
        self.role_list = role_list
        return self.role_list
def list_roles ( self ) : title = '%s.list_certificates' % self . __class__ . __name__ self . printer ( 'Querying AWS for iam roles.' ) try : response = self . connection . list_roles ( ) except : raise AWSConnectionError ( title ) role_list = [ ] if 'Roles' in response . keys ( ) : for role in response [ 'Roles' ] : role_list . append ( role [ 'RoleName' ] ) if role_list : print_out = 'Found iam roles' if len ( role_list ) > 1 : print_out += 's' from labpack . parsing . grammar import join_words print_out += ' %s.' % join_words ( role_list ) self . printer ( print_out ) else : self . printer ( 'No iam roles found.' ) self . role_list = role_list return self . role_list
a method to retrieve a list of server certificates
a method to retrieve a list of server certificates
'''
            a method to retrieve a list of server certificates

        :return: list with certificate name strings
        ''' # send request for list of certificates # construct certificate list from response # report results and return list
list with certificate name strings
list with certificate name strings
self