parameters: (self, bucket_blr, listing_style)
docstring: Print listing info for given bucket.
  
      Args:
        bucket_blr: BucketListingReference for the bucket being listed
        listing_style: ListingStyle enum describing type of output desired.
  
      Returns:
        Tuple (total objects, total bytes) in the bucket.
docstring_summary: Print listing info for given bucket.
docstring_tokens: Print listing info for given bucket .
function: def _PrintBucketInfo(self, bucket_blr, listing_style):
      """Print listing info for given bucket.
  
      Args:
        bucket_blr: BucketListingReference for the bucket being listed
        listing_style: ListingStyle enum describing type of output desired.
  
      Returns:
        Tuple (total objects, total bytes) in the bucket.
      """
      if (listing_style == ListingStyle.SHORT or
          listing_style == ListingStyle.LONG):
        print bucket_blr
        return
      # listing_style == ListingStyle.LONG_LONG:
      # We're guaranteed by the caller that the root object is populated.
      bucket = bucket_blr.root_object
      location_constraint = bucket.location
      storage_class = bucket.storageClass
      fields = {'bucket': bucket_blr.url_string,
                'storage_class': storage_class,
                'location_constraint': location_constraint,
                'acl': AclTranslation.JsonFromMessage(bucket.acl),
                'default_acl': AclTranslation.JsonFromMessage(
                    bucket.defaultObjectAcl)}
  
      fields['versioning'] = bucket.versioning and bucket.versioning.enabled
      fields['website_config'] = 'Present' if bucket.website else 'None'
      fields['logging_config'] = 'Present' if bucket.logging else 'None'
      fields['cors_config'] = 'Present' if bucket.cors else 'None'
      fields['lifecycle_config'] = 'Present' if bucket.lifecycle else 'None'
  
      # For field values that are multiline, add indenting to make it look
      # prettier.
      for key in fields:
        previous_value = fields[key]
        if (not isinstance(previous_value, basestring) or
            '\n' not in previous_value):
          continue
        new_value = previous_value.replace('\n', '\n\t  ')
        # Start multiline values on a new line if they aren't already.
        if not new_value.startswith('\n'):
          new_value = '\n\t  ' + new_value
        fields[key] = new_value
  
      print('{bucket} :\n'
            '\tStorage class:\t\t\t{storage_class}\n'
            '\tLocation constraint:\t\t{location_constraint}\n'
            '\tVersioning enabled:\t\t{versioning}\n'
            '\tLogging configuration:\t\t{logging_config}\n'
            '\tWebsite configuration:\t\t{website_config}\n'
            '\tCORS configuration: \t\t{cors_config}\n'
            '\tLifecycle configuration:\t{lifecycle_config}\n'
            '\tACL:\t\t\t\t{acl}\n'
            '\tDefault ACL:\t\t\t{default_acl}'.format(**fields))
      if bucket_blr.storage_url.scheme == 's3':
        print('Note: this is an S3 bucket so configuration values may be '
              'blank. To retrieve bucket configuration values, use '
              'individual configuration commands such as gsutil acl get '
              '<bucket>.')
function_tokens: def _PrintBucketInfo ( self , bucket_blr , listing_style ) : if ( listing_style == ListingStyle . SHORT or listing_style == ListingStyle . LONG ) : print bucket_blr return # listing_style == ListingStyle.LONG_LONG: # We're guaranteed by the caller that the root object is populated. bucket = bucket_blr . root_object location_constraint = bucket . location storage_class = bucket . storageClass fields = { 'bucket' : bucket_blr . url_string , 'storage_class' : storage_class , 'location_constraint' : location_constraint , 'acl' : AclTranslation . JsonFromMessage ( bucket . acl ) , 'default_acl' : AclTranslation . JsonFromMessage ( bucket . defaultObjectAcl ) } fields [ 'versioning' ] = bucket . versioning and bucket . versioning . enabled fields [ 'website_config' ] = 'Present' if bucket . website else 'None' fields [ 'logging_config' ] = 'Present' if bucket . logging else 'None' fields [ 'cors_config' ] = 'Present' if bucket . cors else 'None' fields [ 'lifecycle_config' ] = 'Present' if bucket . lifecycle else 'None' # For field values that are multiline, add indenting to make it look # prettier. for key in fields : previous_value = fields [ key ] if ( not isinstance ( previous_value , basestring ) or '\n' not in previous_value ) : continue new_value = previous_value . replace ( '\n' , '\n\t  ' ) # Start multiline values on a new line if they aren't already. if not new_value . startswith ( '\n' ) : new_value = '\n\t  ' + new_value fields [ key ] = new_value print ( '{bucket} :\n' '\tStorage class:\t\t\t{storage_class}\n' '\tLocation constraint:\t\t{location_constraint}\n' '\tVersioning enabled:\t\t{versioning}\n' '\tLogging configuration:\t\t{logging_config}\n' '\tWebsite configuration:\t\t{website_config}\n' '\tCORS configuration: \t\t{cors_config}\n' '\tLifecycle configuration:\t{lifecycle_config}\n' '\tACL:\t\t\t\t{acl}\n' '\tDefault ACL:\t\t\t{default_acl}' . format ( * * fields ) ) if bucket_blr . storage_url . scheme == 's3' : print ( 'Note: this is an S3 bucket so configuration values may be ' 'blank. To retrieve bucket configuration values, use ' 'individual configuration commands such as gsutil acl get ' '<bucket>.' )