← Back to team overview

txawsteam team mailing list archive

Re: [Merge] lp:~oubiwann/txaws/416109-arbitrary-endpoints into lp:txaws


On Thu, 2009-08-20 at 19:25 +0000, Duncan McGreggor wrote:
> Duncan McGreggor has proposed merging
> lp:~oubiwann/txaws/416109-arbitrary-endpoints into lp:txaws.
> Requested reviews:
>     txAWS Team (txawsteam)
> This branch adds support for a service object that manages host
> endpoints as well as authorization keys (thus obviating the need for
> the AWSCredential object).

Lets be careful to keep space under storage, ec2 etc for server 
components. storage.service isn't really a storage service :) Lets call
the description of an end point AWSServiceEndpoint, or something like

local and credentials appear orthogonal to me - for instance, 
EC2 EU and EC2 US are different endpoints/services with common
credentials. I think conflating them is unnecessary and undesirable. 
Further  to that, the AWSCredentials are usable on related services in a
single region - EC2, S3 and so on, so when we're passing around a
description, we probably want to have a region that describes the
endpoints for a collection of services. The goal being able to have a
static object
AWS_US1 = #...
AWS_US2 = #...
and for people to make their own;
my_eucalyptus_region = #...

At runtime then, one would ask a region for a client of a particular
service, using some credentials.



We could do this without changing the existing clients at all, by just
storing scheme,host tuples in a AWSRegion - but I think it is cleaner to
do the sort of refactoring you have done. I think it would be best by
having an AWSServiceEndpoint which has the scheme and url, and keeping
the creds separate. For instance, 
class AWSServiceRegion:
    def make_ec2_client(self, creds=None):
        return EC2Client(creds=creds,  service_endpoint=self.ec2_endpoint)

Also a bit of detail review - 'default_schema = https' - in URL terms
(see http://www.ietf.org/rfc/rfc3986.txt) that is a _scheme_, not a

review needsfixing

Your team txAWS Team is subscribed to branch lp:txaws.

Follow ups