Repository: libcloud Updated Branches: refs/heads/trunk 51e78e738 -> 2392f5d5c
amazon suggests using signature_version 4 for accessing the elasticloadbalancing api. Currently at least eu-central-1 requires using this version in my case. Closes #796 Signed-off-by: Tomaz Muraus <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/323473e1 Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/323473e1 Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/323473e1 Branch: refs/heads/trunk Commit: 323473e12b521460fd66718ca67e7d737e2e9008 Parents: 51e78e7 Author: Tobias Paepke <[email protected]> Authored: Fri May 27 15:16:00 2016 +0200 Committer: Tomaz Muraus <[email protected]> Committed: Sat May 28 13:17:27 2016 +0200 ---------------------------------------------------------------------- libcloud/loadbalancer/drivers/elb.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/libcloud/blob/323473e1/libcloud/loadbalancer/drivers/elb.py ---------------------------------------------------------------------- diff --git a/libcloud/loadbalancer/drivers/elb.py b/libcloud/loadbalancer/drivers/elb.py index f67a522..ffcab85 100644 --- a/libcloud/loadbalancer/drivers/elb.py +++ b/libcloud/loadbalancer/drivers/elb.py @@ -44,17 +44,19 @@ class ELBConnection(SignedAWSConnection): version = VERSION host = HOST responseCls = ELBResponse - service_name = 'elb' + service_name = 'elasticloadbalancing' class ElasticLBDriver(Driver): name = 'Amazon Elastic Load Balancing' website = 'http://aws.amazon.com/elasticloadbalancing/' connectionCls = ELBConnection + signature_version = '4' def __init__(self, access_id, secret, region): super(ElasticLBDriver, self).__init__(access_id, secret) self.region = region + self.region_name = region self.connection.host = HOST % (region) def list_protocols(self): @@ -349,3 +351,8 @@ class ElasticLBDriver(Driver): for index, item in enumerate(items): params[label % (index + 1)] = item return params + + def _ex_connection_class_kwargs(self): + kwargs = super(ElasticLBDriver, self)._ex_connection_class_kwargs() + kwargs['signature_version'] = self.signature_version + return kwargs \ No newline at end of file
