Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib
/
python2.7
/
site-packages
/
boto
/
gs
/
File Content:
connection.pyo
� �Wc @ s� d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d e f d � � YZ d e f d � � YZ d S( i����( t Bucket( t S3Connection( t SubdomainCallingFormat( t check_lowercase_bucketname( t get_utf8_valuet Locationc B s e Z d Z d Z RS( t USt EU( t __name__t __module__t DEFAULTR ( ( ( s6 /usr/lib/python2.7/site-packages/boto/gs/connection.pyR s t GSConnectionc B sq e Z d Z d Z d d e d d d d d e d d e � d e d � Z d e j d d d � Z e d d � Z RS( s storage.googleapis.coms) Signature=%s&Expires=%d&GoogleAccessId=%si t /c C sJ t t | � j | | | | | | | | | | | | | d t d | �d S( Nt googlet suppress_consec_slashes( t superR t __init__R ( t selft gs_access_key_idt gs_secret_access_keyt is_securet portt proxyt proxy_portt proxy_usert proxy_passt hostt debugt https_connection_factoryt calling_formatt pathR ( ( s6 /usr/lib/python2.7/site-packages/boto/gs/connection.pyR % s t STANDARDc C s+ t | � | r? | r) | | | j j <q? i | | j j 6} n | sQ t j } n d | } | rn d | } n d } d | | f } | j d t | � d | d t | � �} | j � } | j d k r� | j j | j | j | � � n | j d k r | j | | � S| j j | j | j | � � d S( s� Creates a new bucket. By default it's located in the USA. You can pass Location.EU to create bucket in the EU. You can also pass a LocationConstraint for where the bucket should be located, and a StorageClass describing how the data should be stored. :type bucket_name: string :param bucket_name: The name of the new bucket. :type headers: dict :param headers: Additional headers to pass along with the request to GCS. :type location: :class:`boto.gs.connection.Location` :param location: The location of the new bucket. :type policy: :class:`boto.gs.acl.CannedACLStrings` :param policy: A canned ACL policy that will be applied to the new key in GCS. :type storage_class: string :param storage_class: Either 'STANDARD' or 'DURABLE_REDUCED_AVAILABILITY'. s+ <LocationConstraint>%s</LocationConstraint>s <StorageClass>%s</StorageClass>t s; <CreateBucketConfiguration>%s%s</CreateBucketConfiguration>t PUTt headerst datai� i� N( R t providert acl_headerR R t make_requestR t readt statust storage_create_errort reasont bucket_classt storage_response_error( R t bucket_nameR"