libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ken huang (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (LIBCLOUD-974) The api-version '2015-06-15' is invalid when connect to AzureChinaCloud
Date Tue, 23 Jan 2018 09:03:00 GMT

     [ https://issues.apache.org/jira/browse/LIBCLOUD-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

ken huang closed LIBCLOUD-974.
------------------------------
    Resolution: Not A Bug

should use string (resource name), it's not a bug

> The api-version '2015-06-15' is invalid when connect to AzureChinaCloud
> -----------------------------------------------------------------------
>
>                 Key: LIBCLOUD-974
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-974
>             Project: Libcloud
>          Issue Type: Bug
>          Components: Compute
>    Affects Versions: 0.13.3
>         Environment: LibCloud: 2.2.1 release.
> IDE: Pycharm
> System: MacOS High Sierra
>            Reporter: ken huang
>            Priority: Major
>
> Code:
> {code:java}
> from pprint import pprint
> from libcloud.compute.types import Provider
> from libcloud.compute.providers import get_driver
> cls = get_driver(Provider.AZURE_ARM)
> driver = cls(tenant_id='tenant_id',subscription_id='subscription_id',key='application_id',
secret='password', cloud_environment='AzureChinaCloud')
> resources = driver.ex_list_resource_groups()
> for resource in resources:
>     securitys = driver.ex_list_network_security_groups(resource) #[InvalidApiVersionParameter]
The api-version '2015-06-15' is invalid
>     for security in securitys:
>         print resource.name, security.name
>     print resource.name
> print "===resource group===\n"
> for resource in resources:
>     nodes = driver.list_nodes(resource) #[InvalidApiVersionParameter] The api-version
'2015-06-15' is invalid
>     for node in nodes:
>         print node.name
> print "===node===\n"
> {code}
> Trace:
> {code:java}
> Traceback (most recent call last):
> File "/Users/kaixuanhuang/PycharmProjects/Test/libcloud/AzureARMComputeDemo.py", line
36, in <module>
> nodes = driver.list_nodes(resource) #[InvalidApiVersionParameter] The api-version '2015-06-15'
is invalid
> File "/Library/Python/2.7/site-packages/libcloud/compute/drivers/azure_arm.py", line
387, in list_nodes
> params={"api-version": "2015-06-15"})
> File "/Library/Python/2.7/site-packages/libcloud/common/azure_arm.py", line 228, in request
> method=method, raw=raw)
> File "/Library/Python/2.7/site-packages/libcloud/common/base.py", line 637, in request
> response = responseCls(**kwargs)
> File "/Library/Python/2.7/site-packages/libcloud/common/base.py", line 157, in __init__
> message=self.parse_error())
> libcloud.common.exceptions.BaseHTTPError: [InvalidApiVersionParameter] The api-version
'2015-06-15' is invalid. The supported versions are '2017-08-01,2017-06-01,2017-05-10,2017-05-01,2017-03-01,2016-09-01,2016-07-01,2016-06-01,2016-02-01,2015-11-01,2015-01-01,2014-04-01-preview,2014-04-01,2014-01-01,2013-03-01,2014-02-26,2014-04'.
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message