FRTc@sddlmZmZddlmZmZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZ ddlmZddlmZdZeZejjdddee je je jfZeZe jd Ze jd Ze jd Ze jd Ze j j!e j j"e#d Z$dZ%de j&fdYZ'e j(da)e j(dZ*t)j+e'e*j+e'e%e j,ddZ.e j/ddZ0dddZ1dddZ2dddZ3dddZ4dddZ5dddZ6dddZ7dddZ8dddZ9dddZ:dddZ;ddd Z<ddd!Z=ddd"Z>ddd#Z?ddd$Z@ddd%ZAddd&ZBddd'ZCdddd(d)eDd*ZEddd+ZFddd,ZGdddd(d-eDd.ZHddd/ZIddd0ZJddeDd1ZKddd2ZLddd3ZMddd4ZNddd5ZOddd6ZPddd7ZQddd8ZRddd9ZSddd:ZTddd;ZUddd<ZVddd=ZWddd>ZXddd?ZYddd@ZZdddAZ[dBdCe\ee\eDdDZ]dEZ^ej_j`edS(Fi(tConfigtBotoConfigLocations(tBucketStorageUritFileStorageUriN(turlparse(tInvalidUriErrors2.34.0tsBoto/%s Python/%s %s/%ss.^[a-zA-Z0-9][a-zA-Z0-9\._-]{1,253}[a-zA-Z0-9]$s[-_a-z0-9]{64}s3(?P.+)#(?P[0-9]+)$s/(?P.+)#(?P.+)$sendpoints.jsoncCs?x8tD]0}y tjjtjj|WqqXqWdS(N(Rtloggingtconfigt fileConfigtostpatht expanduser(tfile((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt init_loggingAs   t NullHandlercBseZdZRS(cCsdS(N((tselftrecord((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytemitJs(t__name__t __module__R(((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyRIstbotos boto.perfcCsz|sd}ntj|}|j|tj|}|j|tj|}|j||j||adS(Ns0%(asctime)s %(name)s [%(levelname)s]:%(message)s(Rt getLoggertsetLevelt FileHandlert Formattert setFormattert addHandlertlog(tnametfilepathtlevelt format_stringtloggertfht formatter((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytset_file_loggerVs     cCsw|sd}ntj|}|j|tj}|j|tj|}|j||j||adS(Ns0%(asctime)s %(name)s [%(levelname)s]:%(message)s(RRRt StreamHandlerRRRR(RRR R!R"R#((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytset_stream_loggerds      cKs ddlm}||||S(s& :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.sqs.connection.SQSConnection` :return: A connection to Amazon's SQS i(t SQSConnection(tboto.sqs.connectionR'(taws_access_key_idtaws_secret_access_keytkwargsR'((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_sqsrs cKs ddlm}||||S(s# :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.s3.connection.S3Connection` :return: A connection to Amazon's S3 i(t S3Connection(tboto.s3.connectionR-(R)R*R+R-((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_s3s cKs ddlm}||||S(sV @type gs_access_key_id: string @param gs_access_key_id: Your Google Cloud Storage Access Key ID @type gs_secret_access_key: string @param gs_secret_access_key: Your Google Cloud Storage Secret Access Key @rtype: L{GSConnection} @return: A connection to Google's Storage service i(t GSConnection(tboto.gs.connectionR0(tgs_access_key_idtgs_secret_access_keyR+R0((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_gss cKs ddlm}||||S(s& :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ec2.connection.EC2Connection` :return: A connection to Amazon's EC2 i(t EC2Connection(tboto.ec2.connectionR5(R)R*R+R5((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_ec2s cKs ddlm}||||S(s2 :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ec2.elb.ELBConnection` :return: A connection to Amazon's Load Balancing Service i(t ELBConnection(t boto.ec2.elbR8(R)R*R+R8((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_elbs cKs ddlm}||||S(s :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ec2.autoscale.AutoScaleConnection` :return: A connection to Amazon's Auto Scaling Service :type use_block_device_types bool :param use_block_device_types: Specifies whether to return described Launch Configs with block device mappings containing block device types, or a list of old style block device mappings (deprecated). This defaults to false for compatability with the old incorrect style. i(tAutoScaleConnection(tboto.ec2.autoscaleR;(R)R*R+R;((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_autoscales cKs ddlm}||||S(s@ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ec2.cloudwatch.CloudWatchConnection` :return: A connection to Amazon's EC2 Monitoring service i(tCloudWatchConnection(tboto.ec2.cloudwatchR>(R)R*R+R>((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_cloudwatchs  cKs ddlm}||||S(s& :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.sdb.connection.SDBConnection` :return: A connection to Amazon's SDB i(t SDBConnection(tboto.sdb.connectionRA(R)R*R+RA((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_sdbs cKs ddlm}||||S(s :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.fps.connection.FPSConnection` :return: A connection to FPS i(t FPSConnection(tboto.fps.connectionRD(R)R*R+RD((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_fpss cKs ddlm}||||S(s# :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.mturk.connection.MTurkConnection` :return: A connection to MTurk i(tMTurkConnection(tboto.mturk.connectionRG(R)R*R+RG((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_mturks cKs ddlm}||||S(s :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.fps.connection.FPSConnection` :return: A connection to FPS i(tCloudFrontConnection(tboto.cloudfrontRJ(R)R*R+RJ((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_cloudfronts  cKs ddlm}||||S(s :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.vpc.VPCConnection` :return: A connection to VPC i(t VPCConnection(tboto.vpcRM(R)R*R+RM((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_vpc#s cKs ddlm}||||S(s :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.rds.RDSConnection` :return: A connection to RDS i(t RDSConnection(tboto.rdsRP(R)R*R+RP((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_rds2s cKs&ddlm}|d|d||S(s :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.rds2.layer1.RDSConnection` :return: A connection to RDS i(RPR)R*(tboto.rds2.layer1RP(R)R*R+RP((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_rds2As cKs ddlm}||||S(s  :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.emr.EmrConnection` :return: A connection to Elastic mapreduce i(t EmrConnection(tboto.emrRU(R)R*R+RU((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_emrTs cKs ddlm}||||S(s :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.sns.SNSConnection` :return: A connection to Amazon's SNS i(t SNSConnection(tboto.snsRX(R)R*R+RX((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_snscs cKs ddlm}||||S(s :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.iam.IAMConnection` :return: A connection to Amazon's IAM i(t IAMConnection(tboto.iamR[(R)R*R+R[((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_iamrs cKs ddlm}||||S(s/ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.dns.Route53Connection` :return: A connection to Amazon's Route53 DNS Service i(tRoute53Connection(t boto.route53R^(R)R*R+R^((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_route53s  cKs ddlm}||||S(sD :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.cloudformation.CloudFormationConnection` :return: A connection to Amazon's CloudFormation Service i(tCloudFormationConnection(tboto.cloudformationRa(R)R*R+Ra((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_cloudformations  iE"s/services/Eucalyptusc Ksddlm}ddlm}|s>tjddd}n|s\tjddd}n|sztjddd}n|d d d |} |||d | d |d|d||S(s Connect to a Eucalyptus service. :type host: string :param host: the host name or ip address of the Eucalyptus server :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ec2.connection.EC2Connection` :return: A connection to Eucalyptus server i(R5(t RegionInfot Credentialsteuca_access_key_idteuca_secret_access_keytBototeucalyptus_hostRt eucalyptustendpointtregiontportR t is_secureN(tboto.ec2R5tboto.ec2.regioninfoRdRtgettNone( thostR)R*RmR RnR+R5Rdtreg((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_eucas      cKs ddlm}||||S(s+ :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.glacier.layer2.Layer2` :return: A connection to Amazon's Glacier Service i(tLayer2(tboto.glacier.layer2Rv(R)R*R+Rv((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_glaciers  cKsddlm}t|}|j|d<|j|d<|j|dtjddd}n|s\tjddd}n|sztjddd}n|||d |d |d |d |d ||S(s Connect to a Walrus service. :type host: string :param host: the host name or ip address of the Walrus server :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.s3.connection.S3Connection` :return: A connection to Walrus i(R-(tOrdinaryCallingFormatReRfRgRht walrus_hostRsRmR tcalling_formatRnN(R.R-RRRqRr( RsR)R*RmR RnR+R-R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_walruss       cKs ddlm}||||S(s :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ses.SESConnection` :return: A connection to Amazon's SES i(t SESConnection(tboto.sesR(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_ses's cKs ddlm}||||S(s :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.sts.STSConnection` :return: A connection to Amazon's STS i(t STSConnection(tboto.stsR(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_sts6s c Ksoddlm}ddlm}tjdd|}tjdd|}|||ddd |d ||S( sh Connect to the Internet Archive via their S3-like API. :type ia_access_key_id: string :param ia_access_key_id: Your IA Access Key ID. This will also look in your boto config file for an entry in the Credentials section called "ia_access_key_id" :type ia_secret_access_key: string :param ia_secret_access_key: Your IA Secret Access Key. This will also look in your boto config file for an entry in the Credentials section called "ia_secret_access_key" :rtype: :class:`boto.s3.connection.S3Connection` :return: A connection to the Internet Archive i(R-(RRetia_access_key_idtia_secret_access_keyRsss3.us.archive.orgRRn(R.R-RRRq(RRRnR+R-Rt access_keyt secret_key((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_iaEs      cKs ddlm}||||S(s6 :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.dynamodb.layer2.Layer2` :return: A connection to the Layer2 interface for DynamoDB. i(Rv(tboto.dynamodb.layer2Rv(R)R*R+Rv((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_dynamodbes cKs ddlm}||||S(s, :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.swf.layer1.Layer1` :return: A connection to the Layer1 interface for SWF. i(tLayer1(tboto.swf.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_swfvs cKs ddlm}||||S(s3 :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.cloudsearch.layer2.Layer2` :return: A connection to Amazon's CloudSearch service i(Rv(tboto.cloudsearch.layer2Rv(R)R*R+Rv((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_cloudsearchs  cKs ddlm}||||S(s5 :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.cloudsearch2.layer2.Layer2` :return: A connection to Amazon's CloudSearch2 service i(Rv(tboto.cloudsearch2.layer2Rv(R)R*R+Rv((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_cloudsearch2s  cKs ddlm}||||S(s7 :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.beanstalk.layer1.Layer1` :return: A connection to Amazon's Elastic Beanstalk service i(R(tboto.beanstalk.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_beanstalks cKs&ddlm}|d|d||S(sG :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.ets.layer1.ElasticTranscoderConnection` :return: A connection to Amazon's Elastic Transcoder service i(tElasticTranscoderConnectionR)R*(tboto.elastictranscoder.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_elastictranscoders cKs&ddlm}|d|d||S(Ni(tOpsWorksConnectionR)R*(tboto.opsworks.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_opsworkss cKs&ddlm}|d|d||S(s9 :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.redshift.layer1.RedshiftConnection` :return: A connection to Amazon's Redshift service i(tRedshiftConnectionR)R*(tboto.redshift.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_redshifts cKs&ddlm}|d|d||S(s6 :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.support.layer1.SupportConnection` :return: A connection to Amazon's Support service i(tSupportConnectionR)R*(tboto.support.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_supports cKs&ddlm}|d|d||S(s] Connect to AWS CloudTrail :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.cloudtrail.layer1.CloudtrailConnection` :return: A connection to the AWS Cloudtrail service i(tCloudTrailConnectionR)R*(tboto.cloudtrail.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_cloudtrails cKs&ddlm}|d|d||S(si Connect to AWS DirectConnect :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key :rtype: :class:`boto.directconnect.layer1.DirectConnectConnection` :return: A connection to the AWS DirectConnect service i(tDirectConnectConnectionR)R*(tboto.directconnect.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_directconnects cKs&ddlm}|d|d||S(sV Connect to Amazon Kinesis :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key rtype: :class:`boto.kinesis.layer1.KinesisConnection` :return: A connection to the Amazon Kinesis service i(tKinesisConnectionR)R*(tboto.kinesis.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_kinesis1s cKs&ddlm}|d|d||S(sm Connect to Amazon CloudWatch Logs :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key rtype: :class:`boto.kinesis.layer1.CloudWatchLogsConnection` :return: A connection to the Amazon CloudWatch Logs service i(tCloudWatchLogsConnectionR)R*(tboto.logs.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt connect_logsGs cKs&ddlm}|d|d||S(sw Connect to Amazon Route 53 Domains :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key rtype: :class:`boto.route53.domains.layer1.Route53DomainsConnection` :return: A connection to the Amazon Route 53 Domains service i(tRoute53DomainsConnectionR)R*(tboto.route53.domains.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_route53domains^s cKs&ddlm}|d|d||S(sy Connect to Amazon Cognito Identity :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key rtype: :class:`boto.cognito.identity.layer1.CognitoIdentityConnection` :return: A connection to the Amazon Cognito Identity service i(tCognitoIdentityConnectionR)R*(tboto.cognito.identity.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_cognito_identityus cKs&ddlm}|d|d||S(si Connect to Amazon Cognito Sync :type aws_access_key_id: string :param aws_access_key_id: Your AWS Access Key ID :type aws_secret_access_key: string :param aws_secret_access_key: Your AWS Secret Access Key rtype: :class:`boto.cognito.sync.layer1.CognitoSyncConnection` :return: A connection to the Amazon Cognito Sync service i(tCognitoSyncConnectionR)R*(tboto.cognito.sync.layer1R(R)R*R+R((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytconnect_cognito_syncs R icCs)d}d}|jd} | dkr<|j} |} n!|d| !j} || d} | dkr|td| n| dkrt} | d krt} nt| || S| jd d } | d}d }|r|rtj | st j |rtd |n| dkrrt j | }|r|j }|d}|jd d } t|d}qni| dkrtj | }|r|j }|d}|jd d } |d}qntd| t| d kr| d }n|| |||d|d|d|d|SdS(sR Instantiate a StorageUri from a URI string. :type uri_str: string :param uri_str: URI naming bucket + optional object. :type default_scheme: string :param default_scheme: default scheme for scheme-less URIs. :type debug: int :param debug: debug level to pass in to boto connection (range 0..2). :type validate: bool :param validate: whether to check for bucket name validity. :type bucket_storage_uri_class: BucketStorageUri interface. :param bucket_storage_uri_class: Allows mocking for unit tests. :param suppress_consec_slashes: If provided, controls whether consecutive slashes will be suppressed in key paths. :type is_latest: bool :param is_latest: whether this versioned object represents the current version. We allow validate to be disabled to allow caller to implement bucket-level wildcarding (outside the boto library; see gsutil). :rtype: :class:`boto.StorageUri` subclass :return: StorageUri subclass for given URI. ``uri_str`` must be one of the following formats: * gs://bucket/name * gs://bucket/name#ver * s3://bucket/name * gs://bucket * s3://bucket * filename (which could be a Unix path like /a/b/c or a Windows path like C:\c) The last example uses the default scheme ('file', unless overridden). s://iiiR ts3tgssUnrecognized scheme "%s"t-t/iRsInvalid bucket name in URI "%s"tversionless_uri_strt generationt version_idtsuppress_consec_slashest is_latestN(sfiless3sgs(RrtfindtlowerRtFalsetTrueRtsplittBUCKET_NAME_REtmatchtTOO_LONG_DNS_NAME_COMPtsearcht GENERATION_REt groupdicttintt VERSION_REtlen(turi_strtdefault_schemetdebugtvalidatetbucket_storage_uri_classRRRRtend_scheme_idxR{R t is_streamt path_partst bucket_namet object_nameRtmdR((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyt storage_urisV)                cCsrt|tjjjs7tdtt|n|jj j j }d||jj |j f}t |S(sReturns a StorageUri for the given key. :type key: :class:`boto.s3.key.Key` or subclass :param key: URI naming bucket + optional object. s7Requested key (%s) is not a subclass of boto.s3.key.Keys %s://%s/%s(t isinstanceRRtkeytKeyRtstrttypetbuckett connectiontprovidertget_provider_nameRR(Rt prov_nameR((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pytstorage_uri_for_keys (atboto.pyami.configRRtboto.storage_uriRRt boto.pluginRtdatetimeR tplatformtretsysRtlogging.configt boto.compatRtboto.exceptionRt __version__tVersiontstrptimetpython_versiontsystemtreleaset UserAgentRtcompileRRRRR tjointdirnamet__file__tENDPOINTS_PATHRtHandlerRRRtperflogRtINFORrR$tDEBUGR&R,R/R4R7R:R=R@RCRFRIRLRORRRTRWRZR]R`RcRRuRxR~RRRRRRRRRRRRRRRRRRRRRRRtplugint load_plugins(((s:/opt/freeware/lib/python2.7/site-packages/boto/__init__.pyts           !  & #&                  c