mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #42840 from StreetHawkInc/update_azurearm
Update salt-cloud azurearm to work with latest sdk
This commit is contained in:
commit
a972c4fb8c
@ -15,9 +15,7 @@ More information about Azure is located at `http://www.windowsazure.com/
|
||||
|
||||
Dependencies
|
||||
============
|
||||
* `Microsoft Azure SDK for Python <https://pypi.python.org/pypi/azure>`_ >= 2.0rc6
|
||||
* `Microsoft Azure Storage SDK for Python <https://pypi.python.org/pypi/azure-storage>`_ >= 0.32
|
||||
* The python-requests library, for Python < 2.7.9.
|
||||
* Azure Cli ```pip install 'azure-cli>=2.0.12'```
|
||||
* A Microsoft Azure account
|
||||
* `Salt <https://github.com/saltstack/salt>`_
|
||||
|
||||
|
@ -617,6 +617,11 @@ Profitbricks Cloud Updated Dependency
|
||||
The minimum version of the ``profitbrick`` python package for the ``profitbricks``
|
||||
cloud driver has changed from 3.0.0 to 3.1.0.
|
||||
|
||||
Azure Cloud Updated Dependency
|
||||
------------------------------
|
||||
|
||||
The azure sdk used for the ``azurearm`` cloud driver now depends on ``azure-cli>=2.0.12``
|
||||
|
||||
Module Deprecations
|
||||
===================
|
||||
|
||||
|
@ -65,6 +65,7 @@ import salt.config as config
|
||||
import salt.utils
|
||||
import salt.utils.cloud
|
||||
import salt.utils.files
|
||||
from salt.utils.versions import LooseVersion
|
||||
from salt.ext import six
|
||||
import salt.version
|
||||
from salt.exceptions import (
|
||||
@ -79,7 +80,6 @@ HAS_LIBS = False
|
||||
try:
|
||||
import salt.utils.msazure
|
||||
from salt.utils.msazure import object_to_dict
|
||||
import azure.storage
|
||||
from azure.common.credentials import (
|
||||
UserPassCredentials,
|
||||
ServicePrincipalCredentials,
|
||||
@ -115,7 +115,9 @@ try:
|
||||
from azure.mgmt.storage import StorageManagementClient
|
||||
from azure.mgmt.web import WebSiteManagementClient
|
||||
from msrestazure.azure_exceptions import CloudError
|
||||
HAS_LIBS = True
|
||||
from azure.multiapi.storage.v2016_05_31 import CloudStorageAccount
|
||||
from azure.cli import core
|
||||
HAS_LIBS = LooseVersion(core.__version__) >= LooseVersion("2.0.12")
|
||||
except ImportError:
|
||||
pass
|
||||
# pylint: enable=wrong-import-position,wrong-import-order
|
||||
@ -1728,7 +1730,7 @@ def list_containers(call=None, kwargs=None): # pylint: disable=unused-argument
|
||||
if not storconn:
|
||||
storconn = get_conn(StorageManagementClient)
|
||||
|
||||
storageaccount = azure.storage.CloudStorageAccount(
|
||||
storageaccount = CloudStorageAccount(
|
||||
config.get_cloud_config_value(
|
||||
'storage_account',
|
||||
get_configured_provider(), __opts__, search_global=False
|
||||
@ -1769,7 +1771,7 @@ def list_blobs(call=None, kwargs=None): # pylint: disable=unused-argument
|
||||
'A container must be specified'
|
||||
)
|
||||
|
||||
storageaccount = azure.storage.CloudStorageAccount(
|
||||
storageaccount = CloudStorageAccount(
|
||||
config.get_cloud_config_value(
|
||||
'storage_account',
|
||||
get_configured_provider(), __opts__, search_global=False
|
||||
@ -1809,7 +1811,7 @@ def delete_blob(call=None, kwargs=None): # pylint: disable=unused-argument
|
||||
'A blob must be specified'
|
||||
)
|
||||
|
||||
storageaccount = azure.storage.CloudStorageAccount(
|
||||
storageaccount = CloudStorageAccount(
|
||||
config.get_cloud_config_value(
|
||||
'storage_account',
|
||||
get_configured_provider(), __opts__, search_global=False
|
||||
|
Loading…
Reference in New Issue
Block a user