summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/cloud
diff options
context:
space:
mode:
authorZhijun Zhao <zhijzhao@Zhijuns-MacBook-Pro.local>2017-12-25 15:58:26 +0800
committerMatt Davis <mrd@redhat.com>2018-01-09 23:18:23 -0800
commitc6531ad5564c39917c19dcff54c20fe739e94f03 (patch)
treeed651e68e1c619aedd21e0c97cc696d45f61fb3e /lib/ansible/modules/cloud
parent6f8d3ad70d86682253f6a2c145249e2735cab06f (diff)
downloadansible-c6531ad5564c39917c19dcff54c20fe739e94f03.tar.gz
pin api version of azure storage models
Diffstat (limited to 'lib/ansible/modules/cloud')
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py
index 9ac237ed5f..df66d0c368 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py
@@ -606,8 +606,6 @@ try:
DiskCreateOptionTypes, Plan, SubResource
from azure.mgmt.network.models import PublicIPAddress, NetworkSecurityGroup, NetworkInterface, \
NetworkInterfaceIPConfiguration, Subnet
- from azure.mgmt.storage.models import StorageAccountCreateParameters, Sku
- from azure.mgmt.storage.models import Kind, SkuTier, SkuName
except ImportError:
# This is handled in azure_rm_common
pass
@@ -1530,10 +1528,10 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
self.log("Storage account {0} found.".format(storage_account_name))
self.check_provisioning_state(account)
return account
- sku = Sku(SkuName.standard_lrs)
- Sku.tier = SkuTier.standard
- kind = Kind.storage
- parameters = StorageAccountCreateParameters(sku, kind, self.location)
+ sku = self.storage_accounts_models.Sku(self.storage_accounts_models.SkuName.standard_lrs)
+ sku.tier = self.storage_accounts_models.SkuTier.standard
+ kind = self.storage_accounts_models.Kind.storage
+ parameters = self.storage_accounts_models.StorageAccountCreateParameters(sku, kind, self.location)
self.log("Creating storage account {0} in location {1}".format(storage_account_name, self.location))
self.results['actions'].append("Created storage account {0}".format(storage_account_name))
try: