�
��Xc@sRddljjZddlmZddlmZmZdefd��YZ dS(i����N(tArg(t S3Requesttvalidate_generic_bucket_nametCreateBucketcBsPeZdZeddd 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
SubElementttexttlentgetchildrenttostringtlogtdebugtbody(R t cb_configtlconstrainttcb_lconstrainttcb_xml((sF/usr/lib/python2.7/site-packages/euca2ools/commands/s3/createbucket.pyt
preprocess-s N(t__name__t
__module__tDESCRIPTIONRtNonetARGSRR#(((sF/usr/lib/python2.7/site-packages/euca2ools/commands/s3/createbucket.pyR!s (
txml.etree.ElementTreetetreetElementTreeRtrequestbuilderRteuca2ools.commands.s3RRR(((sF/usr/lib/python2.7/site-packages/euca2ools/commands/s3/createbucket.pyt<module>s |