2020-04-07 14:14:01 +02:00
|
|
|
From c9538180f4dd8875ab57dfa3f51ff59608d2481b Mon Sep 17 00:00:00 2001
|
2019-01-17 10:18:02 +01:00
|
|
|
From: Joachim Gleissner <jgleissner@suse.com>
|
|
|
|
Date: Tue, 18 Sep 2018 15:07:13 +0200
|
|
|
|
Subject: [PATCH] loosen azure sdk dependencies in azurearm cloud driver
|
|
|
|
|
|
|
|
Remove dependency to azure-cli, which is not used at all.
|
|
|
|
Use azure-storage-sdk as fallback if multiapi version is not available.
|
|
|
|
|
|
|
|
remove unused import from azurearm driver
|
|
|
|
---
|
2019-04-12 11:57:21 +02:00
|
|
|
salt/cloud/clouds/azurearm.py | 6 ++++++
|
|
|
|
1 file changed, 6 insertions(+)
|
2019-01-17 10:18:02 +01:00
|
|
|
|
|
|
|
diff --git a/salt/cloud/clouds/azurearm.py b/salt/cloud/clouds/azurearm.py
|
2020-04-07 14:14:01 +02:00
|
|
|
index 2c1fa04ae8..d5757c6d28 100644
|
2019-01-17 10:18:02 +01:00
|
|
|
--- a/salt/cloud/clouds/azurearm.py
|
|
|
|
+++ b/salt/cloud/clouds/azurearm.py
|
2019-04-12 11:57:21 +02:00
|
|
|
@@ -104,6 +104,7 @@ import time
|
|
|
|
|
|
|
|
# Salt libs
|
|
|
|
from salt.ext import six
|
2019-01-17 10:18:02 +01:00
|
|
|
+import pkgutil
|
|
|
|
import salt.cache
|
|
|
|
import salt.config as config
|
2019-04-12 11:57:21 +02:00
|
|
|
import salt.loader
|
|
|
|
@@ -126,6 +127,11 @@ try:
|
|
|
|
import azure.mgmt.network.models as network_models
|
|
|
|
from azure.storage.blob.blockblobservice import BlockBlobService
|
2019-01-17 10:18:02 +01:00
|
|
|
from msrestazure.azure_exceptions import CloudError
|
|
|
|
+ if pkgutil.find_loader('azure.multiapi'):
|
|
|
|
+ # use multiapi version if available
|
|
|
|
+ from azure.multiapi.storage.v2016_05_31 import CloudStorageAccount
|
|
|
|
+ else:
|
|
|
|
+ from azure.storage import CloudStorageAccount
|
2019-04-12 11:57:21 +02:00
|
|
|
HAS_LIBS = True
|
2019-01-17 10:18:02 +01:00
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
--
|
2019-11-28 16:41:55 +01:00
|
|
|
2.16.4
|
2019-01-17 10:18:02 +01:00
|
|
|
|
|
|
|
|