-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from f2f595089c0038c9109c3221d2f04f8d0019a04e (#2164)
Plug disks 2018-04-01 for multi api versionning
- Loading branch information
1 parent
c8a4a92
commit 7c81b39
Showing
51 changed files
with
3,762 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from .compute_management_client import ComputeManagementClient | ||
from .version import VERSION | ||
|
||
__all__ = ['ComputeManagementClient'] | ||
|
||
__version__ = VERSION | ||
|
90 changes: 90 additions & 0 deletions
90
azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/compute_management_client.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.service_client import ServiceClient | ||
from msrest import Serializer, Deserializer | ||
from msrestazure import AzureConfiguration | ||
from .version import VERSION | ||
from .operations.disks_operations import DisksOperations | ||
from .operations.snapshots_operations import SnapshotsOperations | ||
from . import models | ||
|
||
|
||
class ComputeManagementClientConfiguration(AzureConfiguration): | ||
"""Configuration for ComputeManagementClient | ||
Note that all parameters used to create this instance are saved as instance | ||
attributes. | ||
:param credentials: Credentials needed for the client to connect to Azure. | ||
:type credentials: :mod:`A msrestazure Credentials | ||
object<msrestazure.azure_active_directory>` | ||
:param subscription_id: Subscription credentials which uniquely identify | ||
Microsoft Azure subscription. The subscription ID forms part of the URI | ||
for every service call. | ||
:type subscription_id: str | ||
:param str base_url: Service URL | ||
""" | ||
|
||
def __init__( | ||
self, credentials, subscription_id, base_url=None): | ||
|
||
if credentials is None: | ||
raise ValueError("Parameter 'credentials' must not be None.") | ||
if subscription_id is None: | ||
raise ValueError("Parameter 'subscription_id' must not be None.") | ||
if not base_url: | ||
base_url = 'https://management.azure.com' | ||
|
||
super(ComputeManagementClientConfiguration, self).__init__(base_url) | ||
|
||
self.add_user_agent('azure-mgmt-compute/{}'.format(VERSION)) | ||
self.add_user_agent('Azure-SDK-For-Python') | ||
|
||
self.credentials = credentials | ||
self.subscription_id = subscription_id | ||
|
||
|
||
class ComputeManagementClient(object): | ||
"""Compute Client | ||
:ivar config: Configuration for client. | ||
:vartype config: ComputeManagementClientConfiguration | ||
:ivar disks: Disks operations | ||
:vartype disks: azure.mgmt.compute.v2018_04_01.operations.DisksOperations | ||
:ivar snapshots: Snapshots operations | ||
:vartype snapshots: azure.mgmt.compute.v2018_04_01.operations.SnapshotsOperations | ||
:param credentials: Credentials needed for the client to connect to Azure. | ||
:type credentials: :mod:`A msrestazure Credentials | ||
object<msrestazure.azure_active_directory>` | ||
:param subscription_id: Subscription credentials which uniquely identify | ||
Microsoft Azure subscription. The subscription ID forms part of the URI | ||
for every service call. | ||
:type subscription_id: str | ||
:param str base_url: Service URL | ||
""" | ||
|
||
def __init__( | ||
self, credentials, subscription_id, base_url=None): | ||
|
||
self.config = ComputeManagementClientConfiguration(credentials, subscription_id, base_url) | ||
self._client = ServiceClient(self.config.credentials, self.config) | ||
|
||
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} | ||
self.api_version = '2018-04-01' | ||
self._serialize = Serializer(client_models) | ||
self._deserialize = Deserializer(client_models) | ||
|
||
self.disks = DisksOperations( | ||
self._client, self.config, self._serialize, self._deserialize) | ||
self.snapshots = SnapshotsOperations( | ||
self._client, self.config, self._serialize, self._deserialize) |
92 changes: 92 additions & 0 deletions
92
azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
try: | ||
from .resource_py3 import Resource | ||
from .disk_sku_py3 import DiskSku | ||
from .resource_update_py3 import ResourceUpdate | ||
from .image_disk_reference_py3 import ImageDiskReference | ||
from .creation_data_py3 import CreationData | ||
from .source_vault_py3 import SourceVault | ||
from .key_vault_and_secret_reference_py3 import KeyVaultAndSecretReference | ||
from .key_vault_and_key_reference_py3 import KeyVaultAndKeyReference | ||
from .encryption_settings_py3 import EncryptionSettings | ||
from .disk_py3 import Disk | ||
from .disk_update_py3 import DiskUpdate | ||
from .snapshot_sku_py3 import SnapshotSku | ||
from .grant_access_data_py3 import GrantAccessData | ||
from .access_uri_py3 import AccessUri | ||
from .snapshot_py3 import Snapshot | ||
from .snapshot_update_py3 import SnapshotUpdate | ||
from .api_error_base_py3 import ApiErrorBase | ||
from .inner_error_py3 import InnerError | ||
from .api_error_py3 import ApiError | ||
from .operation_status_response_py3 import OperationStatusResponse | ||
except (SyntaxError, ImportError): | ||
from .resource import Resource | ||
from .disk_sku import DiskSku | ||
from .resource_update import ResourceUpdate | ||
from .image_disk_reference import ImageDiskReference | ||
from .creation_data import CreationData | ||
from .source_vault import SourceVault | ||
from .key_vault_and_secret_reference import KeyVaultAndSecretReference | ||
from .key_vault_and_key_reference import KeyVaultAndKeyReference | ||
from .encryption_settings import EncryptionSettings | ||
from .disk import Disk | ||
from .disk_update import DiskUpdate | ||
from .snapshot_sku import SnapshotSku | ||
from .grant_access_data import GrantAccessData | ||
from .access_uri import AccessUri | ||
from .snapshot import Snapshot | ||
from .snapshot_update import SnapshotUpdate | ||
from .api_error_base import ApiErrorBase | ||
from .inner_error import InnerError | ||
from .api_error import ApiError | ||
from .operation_status_response import OperationStatusResponse | ||
from .disk_paged import DiskPaged | ||
from .snapshot_paged import SnapshotPaged | ||
from .compute_management_client_enums import ( | ||
StorageAccountTypes, | ||
OperatingSystemTypes, | ||
DiskCreateOption, | ||
SnapshotStorageAccountTypes, | ||
AccessLevel, | ||
) | ||
|
||
__all__ = [ | ||
'Resource', | ||
'DiskSku', | ||
'ResourceUpdate', | ||
'ImageDiskReference', | ||
'CreationData', | ||
'SourceVault', | ||
'KeyVaultAndSecretReference', | ||
'KeyVaultAndKeyReference', | ||
'EncryptionSettings', | ||
'Disk', | ||
'DiskUpdate', | ||
'SnapshotSku', | ||
'GrantAccessData', | ||
'AccessUri', | ||
'Snapshot', | ||
'SnapshotUpdate', | ||
'ApiErrorBase', | ||
'InnerError', | ||
'ApiError', | ||
'OperationStatusResponse', | ||
'DiskPaged', | ||
'SnapshotPaged', | ||
'StorageAccountTypes', | ||
'OperatingSystemTypes', | ||
'DiskCreateOption', | ||
'SnapshotStorageAccountTypes', | ||
'AccessLevel', | ||
] |
35 changes: 35 additions & 0 deletions
35
azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class AccessUri(Model): | ||
"""A disk access SAS uri. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
:ivar access_sas: A SAS uri for accessing a disk. | ||
:vartype access_sas: str | ||
""" | ||
|
||
_validation = { | ||
'access_sas': {'readonly': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(AccessUri, self).__init__(**kwargs) | ||
self.access_sas = None |
35 changes: 35 additions & 0 deletions
35
azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/access_uri_py3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class AccessUri(Model): | ||
"""A disk access SAS uri. | ||
Variables are only populated by the server, and will be ignored when | ||
sending a request. | ||
:ivar access_sas: A SAS uri for accessing a disk. | ||
:vartype access_sas: str | ||
""" | ||
|
||
_validation = { | ||
'access_sas': {'readonly': True}, | ||
} | ||
|
||
_attribute_map = { | ||
'access_sas': {'key': 'properties.output.accessSAS', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, **kwargs) -> None: | ||
super(AccessUri, self).__init__(**kwargs) | ||
self.access_sas = None |
44 changes: 44 additions & 0 deletions
44
azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/models/api_error.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# coding=utf-8 | ||
# -------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for | ||
# license information. | ||
# | ||
# Code generated by Microsoft (R) AutoRest Code Generator. | ||
# Changes may cause incorrect behavior and will be lost if the code is | ||
# regenerated. | ||
# -------------------------------------------------------------------------- | ||
|
||
from msrest.serialization import Model | ||
|
||
|
||
class ApiError(Model): | ||
"""Api error. | ||
:param details: The Api error details | ||
:type details: list[~azure.mgmt.compute.v2018_04_01.models.ApiErrorBase] | ||
:param innererror: The Api inner error | ||
:type innererror: ~azure.mgmt.compute.v2018_04_01.models.InnerError | ||
:param code: The error code. | ||
:type code: str | ||
:param target: The target of the particular error. | ||
:type target: str | ||
:param message: The error message. | ||
:type message: str | ||
""" | ||
|
||
_attribute_map = { | ||
'details': {'key': 'details', 'type': '[ApiErrorBase]'}, | ||
'innererror': {'key': 'innererror', 'type': 'InnerError'}, | ||
'code': {'key': 'code', 'type': 'str'}, | ||
'target': {'key': 'target', 'type': 'str'}, | ||
'message': {'key': 'message', 'type': 'str'}, | ||
} | ||
|
||
def __init__(self, **kwargs): | ||
super(ApiError, self).__init__(**kwargs) | ||
self.details = kwargs.get('details', None) | ||
self.innererror = kwargs.get('innererror', None) | ||
self.code = kwargs.get('code', None) | ||
self.target = kwargs.get('target', None) | ||
self.message = kwargs.get('message', None) |
Oops, something went wrong.