On Tue, 2011-03-29 at 17:08 -0700, Sang-Min Park wrote:
> I guess the clients set the header for switching the driver, right?
>
> How's the header for EC2 looks like? EC2 also has separate URL for EC2 and
> S3 endpoints.
For EC2, this is hidden behind symbolic names for the regions, e.g.
eu-west-1 and us-east-1.
> If I understand this correctly, the eucalyptus driver should be able to
> parse "env['HTTP_X_DELTACLOUD_PROVIDER']" and set the endpoint
> accordingly..right?
Some of that is done by some rack middleware magic. The EC2 driver gets
the provider (~ region) with this code:
endpoint = (Thread.current[:provider] || ENV['API_PROVIDER'] ||
DEFAULT_REGION)
though we should probably hide that behind some helper for drivers;
David