Viewing File: /usr/lib/python2.7/site-packages/euca2ools/commands/s3/postobject.pyo

ó
¡ôXc@sddlZddlZddlZddlmZmZddlmZddlZddl	m
Z
ddlmZdefd„ƒYZ
dS(iÿÿÿÿN(tArgtMutuallyExclusiveArgList(t
ArgumentError(tb64encoded_file_contents(t	S3Requestt
PostObjectcBsUeZdZd.Zeddddd.ddƒeddddd.dd	ƒeed
ddddd
ejddƒedddddd
e	ddƒƒj
ƒeddddeddƒedddddeddddƒeddddej
dej
ƒeddej
dd/dd'ƒed(dd)dej
dd*ƒgZd+Zd,„Zd-„ZRS(0såUpload an object to the server using an upload policy

Note that uploading a large file to a region other than the one the bucket is may result in "Broken pipe" errors or other connection problems that this program cannot detect.tsourcetmetavartFILEtroute_tothelpsfile to upload (required)tdests
BUCKET/KEYs6bucket and key name to upload the object to (required)s--policytPolicytPOLICYttypes&upload policy to use for authorizations
--policy-filesNfile containing the
                    upload policy to use for authorizations--policy-signaturet	Signaturetrequireds*signature for the upload policy (required)s-Is--access-key-idtAWSAccessKeyIdtKEY_IDsMID of the access key that signed the
                upload policy (required)s--security-tokensx-amz-security-tokentdefaults--acltchoicestprivatespublic-readspublic-read-writesauthenticated-readsbucket-owner-readsbucket-owner-full-controls
aws-exec-readsec2-bundle-reads¡the ACL the object should have
                once uploaded.  Take care to ensure this satisfies any
                restrictions the upload policy may contain.s--mime-typesContent-Types%MIME type for the file being uploadedtPOSTcCsÊtj|ƒ|jddkr3tj|jd<nJt|jdtjƒrit	|jdƒ|jd<n|jd|jd<|jdj
dƒ\}}}|s±tdƒ‚n|sÆtdƒ‚ndS(NRt-tfileRt/s)destination bucket name must be non-emptys&destination key name must be non-empty(Rt	configuretargstsyststdintfilest
isinstancetsixtstring_typestopent	partitionR(tselftbuckett_tkey((sD/usr/lib/python2.7/site-packages/euca2ools/commands/s3/postobject.pyRPs
cCsB|jdjdƒ\|_}|jd<|j|_d|_dS(NRRR'(RR#tpathtparamstbodytNone(R$R&((sD/usr/lib/python2.7/site-packages/euca2ools/commands/s3/postobject.pyt
preprocess`s
)N(Rspublic-readspublic-read-writesauthenticated-readsbucket-owner-readsbucket-owner-full-controls
aws-exec-readsec2-bundle-read(t__name__t
__module__tDESCRIPTIONR+t
AUTH_CLASSRRtbase64t	b64encodeRRtTruetargparsetSUPPRESStARGStMETHODRR,(((sD/usr/lib/python2.7/site-packages/euca2ools/commands/s3/postobject.pyR&s>		(R4R1RtrequestbuilderRRtrequestbuilder.exceptionsRR teuca2ools.commands.argtypesRteuca2ools.commands.s3RR(((sD/usr/lib/python2.7/site-packages/euca2ools/commands/s3/postobject.pyt<module>s
Back to Directory File Manager