ó ¡ôXc@sRddljjZddlmZddlmZmZdefd„ƒYZ dS(iÿÿÿÿN(tArg(t S3Requesttvalidate_generic_bucket_namet CreateBucketcBsPeZdZeddd ddƒeddd ddƒgZd„Zd„ZRS( sCreate a new buckettbuckettroute_tothelpsname of the new buckets --locations¤location constraint to configure the bucket with (default: inferred from s3-location-constraint in configuration, or otherwise none)cCs"tj|ƒt|jdƒdS(NR(Rt configureRtargs(tself((sF/usr/lib/python2.7/site-packages/euca2ools/commands/s3/createbucket.pyR)s cCsÄd|_|jd|_tjdƒ}|jddƒ|jjdƒpY|jjdƒ}|r€tj |dƒ}||_ nt |j ƒƒrÀtj |ƒ}|jjd |ƒ||_ndS( NtPUTRtCreateBucketConfigurationtxmlnss&http://doc.s3.amazonaws.com/2006-03-01tlocationss3-location-constrainttLocationConstraintsbucket configuration: %s(tmethodRtpathtETtElementtsettgettconfigtget_region_optiont SubElementttexttlent getchildrenttostringtlogtdebugtbody(R t cb_configt lconstrainttcb_lconstrainttcb_xml((sF/usr/lib/python2.7/site-packages/euca2ools/commands/s3/createbucket.pyt preprocess-s  N(t__name__t __module__t DESCRIPTIONRtNonetARGSRR#(((sF/usr/lib/python2.7/site-packages/euca2ools/commands/s3/createbucket.pyR!s   ( txml.etree.ElementTreetetreet ElementTreeRtrequestbuilderRteuca2ools.commands.s3RRR(((sF/usr/lib/python2.7/site-packages/euca2ools/commands/s3/createbucket.pyts