GitHub user net613 opened a pull request:

    https://github.com/apache/libcloud/pull/800

    Fix aliyun ecs driver: version mismatch error

    Currently for Aliyun ECS, we encounter version mismatch error when we run 
example_aliyun_ecs.py
    
-----------------------------------------------------------------------------------------------------------------------------
      File "example_aliyun_ecs.py", line 28, in <module>
        sizes = ecs.list_sizes()
      File 
"/usr/lib/python2.7/site-packages/apache_libcloud-1.0.0_rc2-py2.7.egg/libcloud/compute/drivers/ecs.py",
 line 540, in list_sizes
        resp_body = self.connection.request(self.path, params).object
      File 
"/usr/lib/python2.7/site-packages/apache_libcloud-1.0.0_rc2-py2.7.egg/libcloud/common/base.py",
 line 862, in request
        response = responseCls(**kwargs)
      File 
"/usr/lib/python2.7/site-packages/apache_libcloud-1.0.0_rc2-py2.7.egg/libcloud/common/base.py",
 line 179, in __init__
        headers=self.headers)
    libcloud.common.exceptions.BaseHTTPError: {'host_id': 'ecs.aliyuncs.com', 
'message': 'The specified parameter "Action or Version" is not valid.', 'code': 
'InvalidParameter', 'request_id': '8DE2CC6D-1FD5-4A71-8FFF-66253E0BA5CE'}
    
-----------------------------------------------------------------------------------------------------------------------------
    
    We find the aliyun.py code passed the wrong parameter
    
    self.signer = signer_cls(access_key=self.user_id,
                                     access_secret=self.key,
                                     version)
    
    Actually, parameter version should be ECS_API_VERSION, but not 
DEFAULT_SIGNATURE_VERSION

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/net613/libcloud trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/libcloud/pull/800.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #800
    
----
commit 6b95cb33f97eeae35b218ffc529a57c33c5f4761
Author: net613 <[email protected]>
Date:   2016-06-06T04:11:31Z

    Fix aliyun ecs driver: version mismatch error

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to