Add azure image module support create and delete (#32589)

* Add azure image module support create and delete

* Add os_type description

* fix lint

* fix lint

* fix lint

* fix line ending

* add enum_modules for serialize

* update for python3

* Fix mirror

* fix lint

* fix as pr comments

* fix name

* fix syntax

* fix

* none check

* fix test

* fix syntax

* fix example

* return only id in the top level

* doc

* doc

* fix

* fix test
This commit is contained in:
Yuwei Zhou 2017-12-21 05:05:36 +08:00 committed by Jordan Borean
parent 0c7c30b47a
commit 37ce7ef0db
5 changed files with 485 additions and 0 deletions

View file

@ -111,6 +111,7 @@ except ImportError as exc:
try:
from enum import Enum
from msrestazure.azure_exceptions import CloudError
from msrestazure.tools import resource_id, is_valid_resource_id
from msrestazure import azure_cloud
from azure.mgmt.network.models import PublicIPAddress, NetworkSecurityGroup, SecurityRule, NetworkInterface, \
NetworkInterfaceIPConfiguration, Subnet
@ -152,6 +153,13 @@ def azure_id_to_dict(id):
return result
def format_resource_id(val, subscription_id, namespace, types, resource_group):
return resource_id(name=val,
resource_group=resource_group,
namespace=namespace,
type=types,
subscription=subscription_id) if not is_valid_resource_id(val) else val
AZURE_PKG_VERSIONS = {
StorageManagementClient.__name__: {
'package_name': 'storage',