#NEWLINE# def get_attributes( name , region = None , key = None , keyid = None , profile = None ) : #NEWLINE# #INDENT# '\n    Check to see if attributes are set on an ELB.\n\n    CLI example:\n\n    .. code-block:: bash\n\n        salt myminion boto_elb.get_attributes myelb\n    ' #NEWLINE# conn = _get_conn ( region = region , key = key , keyid = keyid , profile = profile ) #NEWLINE# try : #NEWLINE# #INDENT# lbattrs = conn . get_all_lb_attributes ( name ) #NEWLINE# ret = odict . OrderedDict ( ) #NEWLINE# ret [ 'access_log' ] = odict . OrderedDict ( ) #NEWLINE# ret [ 'cross_zone_load_balancing' ] = odict . OrderedDict ( ) #NEWLINE# ret [ 'connection_draining' ] = odict . OrderedDict ( ) #NEWLINE# ret [ 'connecting_settings' ] = odict . OrderedDict ( ) #NEWLINE# al = lbattrs . access_log #NEWLINE# czlb = lbattrs . cross_zone_load_balancing #NEWLINE# cd = lbattrs . connection_draining #NEWLINE# cs = lbattrs . connecting_settings #NEWLINE# ret [ 'access_log' ] [ 'enabled' ] = al . enabled #NEWLINE# ret [ 'access_log' ] [ 's3_bucket_name' ] = al . s3_bucket_name #NEWLINE# ret [ 'access_log' ] [ 's3_bucket_prefix' ] = al . s3_bucket_prefix #NEWLINE# ret [ 'access_log' ] [ 'emit_interval' ] = al . emit_interval #NEWLINE# ret [ 'cross_zone_load_balancing' ] [ 'enabled' ] = czlb . enabled #NEWLINE# ret [ 'connection_draining' ] [ 'enabled' ] = cd . enabled #NEWLINE# ret [ 'connection_draining' ] [ 'timeout' ] = cd . timeout #NEWLINE# ret [ 'connecting_settings' ] [ 'idle_timeout' ] = cs . idle_timeout #NEWLINE# return ret #NEWLINE# #UNINDENT# except boto . exception . BotoServerError as error : #NEWLINE# #INDENT# log . debug ( error ) #NEWLINE# log . error ( 'ELB {0} does not exist: {1}' . format ( name , error ) ) #NEWLINE# return { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# }