mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Add support for Azure 2.0.0 (#27920)
* Adapt azure_rm_resource_group to azure 2.0.0 + azure Cli support * Fix exceptions in Azure ARM plugins * update azure_rm_networkinterface documention to reflect required params * change state param to not required for docs in azure_rm_subnet * fix import to reflect azure==2.0.0 changes * add aliases and fix docs for azure_rm_storageblob * add resource_group_name alias to azure_rm_storageaccount_facts * fix import bug due to change in azure==2.0.0 * fix args bug and enum modules issue * update docs to reflect azure==2.0.0 * pin management clients to a specific api_version * update docs to reflect the new azure-ansible-base python package * add fallback for older api resource group listing * rework azure dependencies installation * refactor path joining to a cross-plat solution
This commit is contained in:
parent
1b9d9376e2
commit
e4cd899363
17 changed files with 151 additions and 51 deletions
|
@ -416,8 +416,8 @@ try:
|
|||
from azure.mgmt.network.models import PublicIPAddress, NetworkSecurityGroup, NetworkInterface, \
|
||||
NetworkInterfaceIPConfiguration, Subnet
|
||||
from azure.mgmt.storage.models import StorageAccountCreateParameters, Sku
|
||||
from azure.mgmt.storage.models.storage_management_client_enums import Kind, SkuTier, SkuName
|
||||
from azure.mgmt.compute.models.compute_management_client_enums import VirtualMachineSizeTypes, DiskCreateOptionTypes
|
||||
from azure.mgmt.storage.models import Kind, SkuTier, SkuName
|
||||
from azure.mgmt.compute.models import VirtualMachineSizeTypes, DiskCreateOptionTypes
|
||||
except ImportError:
|
||||
# This is handled in azure_rm_common
|
||||
pass
|
||||
|
@ -427,7 +427,7 @@ from ansible.module_utils.azure_rm_common import AzureRMModuleBase, azure_id_to_
|
|||
|
||||
AZURE_OBJECT_CLASS = 'VirtualMachine'
|
||||
|
||||
AZURE_ENUM_MODULES = ['azure.mgmt.compute.models.compute_management_client_enums']
|
||||
AZURE_ENUM_MODULES = ['azure.mgmt.compute.models']
|
||||
|
||||
|
||||
def extract_names_from_blob_uri(blob_uri):
|
||||
|
@ -711,9 +711,9 @@ class AzureRMVirtualMachine(AzureRMModuleBase):
|
|||
),
|
||||
storage_profile=StorageProfile(
|
||||
os_disk=OSDisk(
|
||||
self.storage_blob_name,
|
||||
vhd,
|
||||
DiskCreateOptionTypes.from_image,
|
||||
name=self.storage_blob_name,
|
||||
vhd=vhd,
|
||||
create_option=DiskCreateOptionTypes.from_image,
|
||||
caching=self.os_disk_caching,
|
||||
),
|
||||
image_reference=ImageReference(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue