From f469c8a1c8c8910adc7f77dadc6e72f21fae8644 Mon Sep 17 00:00:00 2001 From: Shixun Guan Date: Fri, 12 Jun 2020 03:21:33 +0000 Subject: [PATCH 1/6] release for mgmt vmware --- sdk/compute/azure-mgmt-vmware/CHANGELOG.md | 5 + sdk/compute/azure-mgmt-vmware/MANIFEST.in | 5 + sdk/compute/azure-mgmt-vmware/README.md | 21 + .../azure-mgmt-vmware/azure/__init__.py | 1 + .../azure-mgmt-vmware/azure/mgmt/__init__.py | 1 + .../azure/mgmt/vmware/__init__.py | 19 + .../mgmt/vmware/_azure_vmware_solution_api.py | 64 ++ .../azure/mgmt/vmware/_configuration.py | 48 ++ .../azure/mgmt/vmware/models/__init__.py | 91 +++ .../_azure_vmware_solution_api_enums.py | 48 ++ .../azure/mgmt/vmware/models/_models.py | 730 ++++++++++++++++++ .../azure/mgmt/vmware/models/_models_py3.py | 730 ++++++++++++++++++ .../azure/mgmt/vmware/models/_paged_models.py | 53 ++ .../azure/mgmt/vmware/operations/__init__.py | 22 + .../vmware/operations/_clusters_operations.py | 476 ++++++++++++ .../operations/_locations_operations.py | 153 ++++ .../mgmt/vmware/operations/_operations.py | 100 +++ .../operations/_private_clouds_operations.py | 580 ++++++++++++++ .../azure/mgmt/vmware/version.py | 13 + .../azure-mgmt-vmware/dev_requirements.txt | 4 + .../azure-mgmt-vmware/sdk_packaging.toml | 5 + sdk/compute/azure-mgmt-vmware/setup.cfg | 2 + sdk/compute/azure-mgmt-vmware/setup.py | 90 +++ 23 files changed, 3261 insertions(+) create mode 100644 sdk/compute/azure-mgmt-vmware/CHANGELOG.md create mode 100644 sdk/compute/azure-mgmt-vmware/MANIFEST.in create mode 100644 sdk/compute/azure-mgmt-vmware/README.md create mode 100644 sdk/compute/azure-mgmt-vmware/azure/__init__.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/__init__.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/__init__.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_azure_vmware_solution_api.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_configuration.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/__init__.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_azure_vmware_solution_api_enums.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models_py3.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_paged_models.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/__init__.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_clusters_operations.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_locations_operations.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_operations.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_private_clouds_operations.py create mode 100644 sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/version.py create mode 100644 sdk/compute/azure-mgmt-vmware/dev_requirements.txt create mode 100644 sdk/compute/azure-mgmt-vmware/sdk_packaging.toml create mode 100644 sdk/compute/azure-mgmt-vmware/setup.cfg create mode 100644 sdk/compute/azure-mgmt-vmware/setup.py diff --git a/sdk/compute/azure-mgmt-vmware/CHANGELOG.md b/sdk/compute/azure-mgmt-vmware/CHANGELOG.md new file mode 100644 index 000000000000..14d5e406e3c8 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 0.1.0 (2020-06-12) + +* Initial Release diff --git a/sdk/compute/azure-mgmt-vmware/MANIFEST.in b/sdk/compute/azure-mgmt-vmware/MANIFEST.in new file mode 100644 index 000000000000..a3cb07df8765 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/MANIFEST.in @@ -0,0 +1,5 @@ +recursive-include tests *.py *.yaml +include *.md +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/sdk/compute/azure-mgmt-vmware/README.md b/sdk/compute/azure-mgmt-vmware/README.md new file mode 100644 index 000000000000..e56a219987f4 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/README.md @@ -0,0 +1,21 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure Vmware Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) + + +# Usage + +For code examples, see [Vmware Management](https://docs.microsoft.com/python/api/overview/azure/vmware) +on docs.microsoft.com. + + +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) +section of the project. + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-vmware%2FREADME.png) diff --git a/sdk/compute/azure-mgmt-vmware/azure/__init__.py b/sdk/compute/azure-mgmt-vmware/azure/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/__init__.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/__init__.py new file mode 100644 index 000000000000..0260537a02bb --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/__init__.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/__init__.py new file mode 100644 index 000000000000..34570671746a --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/__init__.py @@ -0,0 +1,19 @@ +# 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 ._configuration import AzureVMwareSolutionAPIConfiguration +from ._azure_vmware_solution_api import AzureVMwareSolutionAPI +__all__ = ['AzureVMwareSolutionAPI', 'AzureVMwareSolutionAPIConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_azure_vmware_solution_api.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_azure_vmware_solution_api.py new file mode 100644 index 000000000000..a02f425ebc02 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_azure_vmware_solution_api.py @@ -0,0 +1,64 @@ +# 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 SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import AzureVMwareSolutionAPIConfiguration +from .operations import Operations +from .operations import LocationsOperations +from .operations import PrivateCloudsOperations +from .operations import ClustersOperations +from . import models + + +class AzureVMwareSolutionAPI(SDKClient): + """Azure VMware Solution API + + :ivar config: Configuration for client. + :vartype config: AzureVMwareSolutionAPIConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.vmware.operations.Operations + :ivar locations: Locations operations + :vartype locations: azure.mgmt.vmware.operations.LocationsOperations + :ivar private_clouds: PrivateClouds operations + :vartype private_clouds: azure.mgmt.vmware.operations.PrivateCloudsOperations + :ivar clusters: Clusters operations + :vartype clusters: azure.mgmt.vmware.operations.ClustersOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: Unique identifier for the Azure subscription + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = AzureVMwareSolutionAPIConfiguration(credentials, subscription_id, base_url) + super(AzureVMwareSolutionAPI, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-08-09-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.locations = LocationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.private_clouds = PrivateCloudsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.clusters = ClustersOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_configuration.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_configuration.py new file mode 100644 index 000000000000..5b50d5d39db9 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_configuration.py @@ -0,0 +1,48 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class AzureVMwareSolutionAPIConfiguration(AzureConfiguration): + """Configuration for AzureVMwareSolutionAPI + 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` + :param subscription_id: Unique identifier for the Azure subscription + :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(AzureVMwareSolutionAPIConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-vmware/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/__init__.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/__init__.py new file mode 100644 index 000000000000..3e9f3d9a7bf2 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/__init__.py @@ -0,0 +1,91 @@ +# 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 ._models_py3 import AdminCredentials + from ._models_py3 import ApiError, ApiErrorException + from ._models_py3 import ApiErrorBase + from ._models_py3 import Circuit + from ._models_py3 import Cluster + from ._models_py3 import ClusterProperties + from ._models_py3 import DefaultClusterProperties + from ._models_py3 import Endpoints + from ._models_py3 import ExpressRouteAuthorization + from ._models_py3 import IdentitySource + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PrivateCloud + from ._models_py3 import PrivateCloudProperties + from ._models_py3 import Quota + from ._models_py3 import Resource + from ._models_py3 import Sku + from ._models_py3 import TrackedResource + from ._models_py3 import Trial +except (SyntaxError, ImportError): + from ._models import AdminCredentials + from ._models import ApiError, ApiErrorException + from ._models import ApiErrorBase + from ._models import Circuit + from ._models import Cluster + from ._models import ClusterProperties + from ._models import DefaultClusterProperties + from ._models import Endpoints + from ._models import ExpressRouteAuthorization + from ._models import IdentitySource + from ._models import Operation + from ._models import OperationDisplay + from ._models import PrivateCloud + from ._models import PrivateCloudProperties + from ._models import Quota + from ._models import Resource + from ._models import Sku + from ._models import TrackedResource + from ._models import Trial +from ._paged_models import ClusterPaged +from ._paged_models import OperationPaged +from ._paged_models import PrivateCloudPaged +from ._azure_vmware_solution_api_enums import ( + QuotaEnabled, + SslEnum, + PrivateCloudProvisioningState, + InternetEnum, + ClusterProvisioningState, +) + +__all__ = [ + 'AdminCredentials', + 'ApiError', 'ApiErrorException', + 'ApiErrorBase', + 'Circuit', + 'Cluster', + 'ClusterProperties', + 'DefaultClusterProperties', + 'Endpoints', + 'ExpressRouteAuthorization', + 'IdentitySource', + 'Operation', + 'OperationDisplay', + 'PrivateCloud', + 'PrivateCloudProperties', + 'Quota', + 'Resource', + 'Sku', + 'TrackedResource', + 'Trial', + 'OperationPaged', + 'PrivateCloudPaged', + 'ClusterPaged', + 'QuotaEnabled', + 'SslEnum', + 'PrivateCloudProvisioningState', + 'InternetEnum', + 'ClusterProvisioningState', +] diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_azure_vmware_solution_api_enums.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_azure_vmware_solution_api_enums.py new file mode 100644 index 000000000000..bf53315dd149 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_azure_vmware_solution_api_enums.py @@ -0,0 +1,48 @@ +# 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 enum import Enum + + +class QuotaEnabled(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class SslEnum(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class PrivateCloudProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + cancelled = "Cancelled" + pending = "Pending" + building = "Building" + updating = "Updating" + + +class InternetEnum(str, Enum): + + enabled = "Enabled" + disabled = "Disabled" + + +class ClusterProvisioningState(str, Enum): + + succeeded = "Succeeded" + failed = "Failed" + cancelled = "Cancelled" + updating = "Updating" diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models.py new file mode 100644 index 000000000000..53fb5dd686da --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models.py @@ -0,0 +1,730 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class AdminCredentials(Model): + """Administrative credentials for accessing vCenter and NSX-T. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar nsxt_username: NSX-T Manager username + :vartype nsxt_username: str + :ivar nsxt_password: NSX-T Manager password + :vartype nsxt_password: str + :ivar vcenter_username: vCenter admin username + :vartype vcenter_username: str + :ivar vcenter_password: vCenter admin password + :vartype vcenter_password: str + """ + + _validation = { + 'nsxt_username': {'readonly': True}, + 'nsxt_password': {'readonly': True}, + 'vcenter_username': {'readonly': True}, + 'vcenter_password': {'readonly': True}, + } + + _attribute_map = { + 'nsxt_username': {'key': 'nsxtUsername', 'type': 'str'}, + 'nsxt_password': {'key': 'nsxtPassword', 'type': 'str'}, + 'vcenter_username': {'key': 'vcenterUsername', 'type': 'str'}, + 'vcenter_password': {'key': 'vcenterPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(AdminCredentials, self).__init__(**kwargs) + self.nsxt_username = None + self.nsxt_password = None + self.vcenter_username = None + self.vcenter_password = None + + +class ApiError(Model): + """API error response. + + :param error: An error returned by the API + :type error: ~azure.mgmt.vmware.models.ApiErrorBase + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ApiErrorBase'}, + } + + def __init__(self, **kwargs): + super(ApiError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ApiErrorException(HttpOperationError): + """Server responsed with exception of type: 'ApiError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) + + +class ApiErrorBase(Model): + """Api error. + + :param code: Error code + :type code: str + :param message: Error message + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApiErrorBase, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class Circuit(Model): + """An ExpressRoute Circuit. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_subnet: CIDR of primary subnet + :vartype primary_subnet: str + :ivar secondary_subnet: CIDR of secondary subnet + :vartype secondary_subnet: str + :ivar express_route_id: Identifier of the ExpressRoute (Microsoft Colo + only) + :vartype express_route_id: str + :param authorizations: Authorizations for the ExpressRoute (Microsoft Colo + only) + :type authorizations: + list[~azure.mgmt.vmware.models.ExpressRouteAuthorization] + :ivar express_route_private_peering_id: ExpressRoute private peering + identifier + :vartype express_route_private_peering_id: str + """ + + _validation = { + 'primary_subnet': {'readonly': True}, + 'secondary_subnet': {'readonly': True}, + 'express_route_id': {'readonly': True}, + 'express_route_private_peering_id': {'readonly': True}, + } + + _attribute_map = { + 'primary_subnet': {'key': 'primarySubnet', 'type': 'str'}, + 'secondary_subnet': {'key': 'secondarySubnet', 'type': 'str'}, + 'express_route_id': {'key': 'expressRouteID', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[ExpressRouteAuthorization]'}, + 'express_route_private_peering_id': {'key': 'expressRoutePrivatePeeringID', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Circuit, self).__init__(**kwargs) + self.primary_subnet = None + self.secondary_subnet = None + self.express_route_id = None + self.authorizations = kwargs.get('authorizations', None) + self.express_route_private_peering_id = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Cluster(Resource): + """A cluster resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param properties: The properties of a cluster resource + :type properties: ~azure.mgmt.vmware.models.ClusterProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClusterProperties'}, + } + + def __init__(self, **kwargs): + super(Cluster, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class DefaultClusterProperties(Model): + """The properties of a default cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar cluster_id: The identity + :vartype cluster_id: int + :param cluster_size: The cluster size + :type cluster_size: int + :ivar hosts: The hosts + :vartype hosts: list[str] + """ + + _validation = { + 'cluster_id': {'readonly': True}, + 'hosts': {'readonly': True}, + } + + _attribute_map = { + 'cluster_id': {'key': 'clusterId', 'type': 'int'}, + 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, + 'hosts': {'key': 'hosts', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(DefaultClusterProperties, self).__init__(**kwargs) + self.cluster_id = None + self.cluster_size = kwargs.get('cluster_size', None) + self.hosts = None + + +class ClusterProperties(DefaultClusterProperties): + """The properties of a cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar cluster_id: The identity + :vartype cluster_id: int + :param cluster_size: The cluster size + :type cluster_size: int + :ivar hosts: The hosts + :vartype hosts: list[str] + :ivar provisioning_state: The state of the cluster provisioning. Possible + values include: 'Succeeded', 'Failed', 'Cancelled', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.vmware.models.ClusterProvisioningState + """ + + _validation = { + 'cluster_id': {'readonly': True}, + 'hosts': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'cluster_id': {'key': 'clusterId', 'type': 'int'}, + 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, + 'hosts': {'key': 'hosts', 'type': '[str]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterProperties, self).__init__(**kwargs) + self.provisioning_state = None + + +class Endpoints(Model): + """Endpoint addresses. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar nsxt_manager: Endpoint for the NSX-T Data Center manager + :vartype nsxt_manager: str + :ivar vcsa: Endpoint for Virtual Center Server Appliance + :vartype vcsa: str + """ + + _validation = { + 'nsxt_manager': {'readonly': True}, + 'vcsa': {'readonly': True}, + } + + _attribute_map = { + 'nsxt_manager': {'key': 'nsxtManager', 'type': 'str'}, + 'vcsa': {'key': 'vcsa', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Endpoints, self).__init__(**kwargs) + self.nsxt_manager = None + self.vcsa = None + + +class ExpressRouteAuthorization(Model): + """Authorization for an ExpressRoute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The name of the ExpressRoute + :type name: str + :ivar id: The ID of the ExpressRoute + :vartype id: str + :ivar key: The key of the ExpressRoute + :vartype key: str + """ + + _validation = { + 'id': {'readonly': True}, + 'key': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ExpressRouteAuthorization, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = None + self.key = None + + +class IdentitySource(Model): + """vCenter Single Sign On Identity Source. + + :param name: The name of the identity source + :type name: str + :param alias: The domain's NetBIOS name + :type alias: str + :param domain: The domain's dns name + :type domain: str + :param base_user_dn: The base distinguished name for users + :type base_user_dn: str + :param base_group_dn: The base distinguished name for groups + :type base_group_dn: str + :param primary_server: Primary server URL + :type primary_server: str + :param secondary_server: Secondary server URL + :type secondary_server: str + :param ssl: Protect LDAP communication using SSL certificate (LDAPS). + Possible values include: 'Enabled', 'Disabled' + :type ssl: str or ~azure.mgmt.vmware.models.SslEnum + :param username: The ID of an Active Directory user with a minimum of + read-only access to Base DN for users and group + :type username: str + :param password: The password of the Active Directory user with a minimum + of read-only access to Base DN for users and groups. + :type password: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'alias': {'key': 'alias', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'base_user_dn': {'key': 'baseUserDN', 'type': 'str'}, + 'base_group_dn': {'key': 'baseGroupDN', 'type': 'str'}, + 'primary_server': {'key': 'primaryServer', 'type': 'str'}, + 'secondary_server': {'key': 'secondaryServer', 'type': 'str'}, + 'ssl': {'key': 'ssl', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentitySource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.alias = kwargs.get('alias', None) + self.domain = kwargs.get('domain', None) + self.base_user_dn = kwargs.get('base_user_dn', None) + self.base_group_dn = kwargs.get('base_group_dn', None) + self.primary_server = kwargs.get('primary_server', None) + self.secondary_server = kwargs.get('secondary_server', None) + self.ssl = kwargs.get('ssl', None) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + + +class Operation(Model): + """A REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the operation being performed on this object + :vartype name: str + :ivar display: Contains the localized display information for this + operation + :vartype display: ~azure.mgmt.vmware.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + + +class OperationDisplay(Model): + """Contains the localized display information for this operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Localized friendly form of the resource provider name + :vartype provider: str + :ivar resource: Localized friendly form of the resource type related to + this operation + :vartype resource: str + :ivar operation: Localized friendly name for the operation + :vartype operation: str + :ivar description: Localized friendly description for the operation + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class PrivateCloud(TrackedResource): + """A private cloud resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The private cloud SKU + :type sku: ~azure.mgmt.vmware.models.Sku + :param properties: The properties of a private cloud resource + :type properties: ~azure.mgmt.vmware.models.PrivateCloudProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'properties': {'key': 'properties', 'type': 'PrivateCloudProperties'}, + } + + def __init__(self, **kwargs): + super(PrivateCloud, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.properties = kwargs.get('properties', None) + + +class PrivateCloudProperties(Model): + """The properties of a private cloud resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: The provisioning state. Possible values include: + 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.vmware.models.PrivateCloudProvisioningState + :param circuit: An ExpressRoute Circuit + :type circuit: ~azure.mgmt.vmware.models.Circuit + :param cluster: The default cluster used for management + :type cluster: ~azure.mgmt.vmware.models.DefaultClusterProperties + :ivar clusters: The clusters + :vartype clusters: list[str] + :ivar endpoints: The endpoints + :vartype endpoints: ~azure.mgmt.vmware.models.Endpoints + :param internet: Connectivity to internet is enabled or disabled. Possible + values include: 'Enabled', 'Disabled' + :type internet: str or ~azure.mgmt.vmware.models.InternetEnum + :param identity_sources: vCenter Single Sign On Identity Sources + :type identity_sources: list[~azure.mgmt.vmware.models.IdentitySource] + :param network_block: The block of addresses should be unique across VNet + in your subscription as well as on-premise. Make sure the CIDR format is + conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is + between 0 and 22 + :type network_block: str + :ivar management_network: Network used to access vCenter Server and NSX-T + Manager + :vartype management_network: str + :ivar provisioning_network: Used for virtual machine cold migration, + cloning, and snapshot migration + :vartype provisioning_network: str + :ivar vmotion_network: Used for live migration of virtual machines + :vartype vmotion_network: str + :param vcenter_password: Optionally, set the vCenter admin password when + the private cloud is created + :type vcenter_password: str + :param nsxt_password: Optionally, set the NSX-T Manager password when the + private cloud is created + :type nsxt_password: str + :ivar vcenter_certificate_thumbprint: Thumbprint of the vCenter Server SSL + certificate + :vartype vcenter_certificate_thumbprint: str + :ivar nsxt_certificate_thumbprint: Thumbprint of the NSX-T Manager SSL + certificate + :vartype nsxt_certificate_thumbprint: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'clusters': {'readonly': True}, + 'endpoints': {'readonly': True}, + 'management_network': {'readonly': True}, + 'provisioning_network': {'readonly': True}, + 'vmotion_network': {'readonly': True}, + 'vcenter_certificate_thumbprint': {'readonly': True}, + 'nsxt_certificate_thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'circuit': {'key': 'circuit', 'type': 'Circuit'}, + 'cluster': {'key': 'cluster', 'type': 'DefaultClusterProperties'}, + 'clusters': {'key': 'clusters', 'type': '[str]'}, + 'endpoints': {'key': 'endpoints', 'type': 'Endpoints'}, + 'internet': {'key': 'internet', 'type': 'str'}, + 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, + 'network_block': {'key': 'networkBlock', 'type': 'str'}, + 'management_network': {'key': 'managementNetwork', 'type': 'str'}, + 'provisioning_network': {'key': 'provisioningNetwork', 'type': 'str'}, + 'vmotion_network': {'key': 'vmotionNetwork', 'type': 'str'}, + 'vcenter_password': {'key': 'vcenterPassword', 'type': 'str'}, + 'nsxt_password': {'key': 'nsxtPassword', 'type': 'str'}, + 'vcenter_certificate_thumbprint': {'key': 'vcenterCertificateThumbprint', 'type': 'str'}, + 'nsxt_certificate_thumbprint': {'key': 'nsxtCertificateThumbprint', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PrivateCloudProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.circuit = kwargs.get('circuit', None) + self.cluster = kwargs.get('cluster', None) + self.clusters = None + self.endpoints = None + self.internet = kwargs.get('internet', None) + self.identity_sources = kwargs.get('identity_sources', None) + self.network_block = kwargs.get('network_block', None) + self.management_network = None + self.provisioning_network = None + self.vmotion_network = None + self.vcenter_password = kwargs.get('vcenter_password', None) + self.nsxt_password = kwargs.get('nsxt_password', None) + self.vcenter_certificate_thumbprint = None + self.nsxt_certificate_thumbprint = None + + +class Quota(Model): + """Subscription quotas. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar hosts_remaining: Remaining hosts quota by sku type + :vartype hosts_remaining: dict[str, int] + :param quota_enabled: Host quota is active for current subscription. + Possible values include: 'Enabled', 'Disabled' + :type quota_enabled: str or ~azure.mgmt.vmware.models.QuotaEnabled + """ + + _validation = { + 'hosts_remaining': {'readonly': True}, + } + + _attribute_map = { + 'hosts_remaining': {'key': 'hostsRemaining', 'type': '{int}'}, + 'quota_enabled': {'key': 'quotaEnabled', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Quota, self).__init__(**kwargs) + self.hosts_remaining = None + self.quota_enabled = kwargs.get('quota_enabled', None) + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class Trial(Model): + """Subscription trial availability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: Trial status. Possible values include: 'TrialAvailable', + 'TrialUsed', 'TrialDisabled' + :vartype status: str or ~azure.mgmt.vmware.models.enum + :ivar available_hosts: Number of trial hosts available + :vartype available_hosts: int + """ + + _validation = { + 'status': {'readonly': True}, + 'available_hosts': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'available_hosts': {'key': 'availableHosts', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(Trial, self).__init__(**kwargs) + self.status = None + self.available_hosts = None diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models_py3.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models_py3.py new file mode 100644 index 000000000000..e456ab84dfde --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models_py3.py @@ -0,0 +1,730 @@ +# 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 +from msrest.exceptions import HttpOperationError + + +class AdminCredentials(Model): + """Administrative credentials for accessing vCenter and NSX-T. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar nsxt_username: NSX-T Manager username + :vartype nsxt_username: str + :ivar nsxt_password: NSX-T Manager password + :vartype nsxt_password: str + :ivar vcenter_username: vCenter admin username + :vartype vcenter_username: str + :ivar vcenter_password: vCenter admin password + :vartype vcenter_password: str + """ + + _validation = { + 'nsxt_username': {'readonly': True}, + 'nsxt_password': {'readonly': True}, + 'vcenter_username': {'readonly': True}, + 'vcenter_password': {'readonly': True}, + } + + _attribute_map = { + 'nsxt_username': {'key': 'nsxtUsername', 'type': 'str'}, + 'nsxt_password': {'key': 'nsxtPassword', 'type': 'str'}, + 'vcenter_username': {'key': 'vcenterUsername', 'type': 'str'}, + 'vcenter_password': {'key': 'vcenterPassword', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(AdminCredentials, self).__init__(**kwargs) + self.nsxt_username = None + self.nsxt_password = None + self.vcenter_username = None + self.vcenter_password = None + + +class ApiError(Model): + """API error response. + + :param error: An error returned by the API + :type error: ~azure.mgmt.vmware.models.ApiErrorBase + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ApiErrorBase'}, + } + + def __init__(self, *, error=None, **kwargs) -> None: + super(ApiError, self).__init__(**kwargs) + self.error = error + + +class ApiErrorException(HttpOperationError): + """Server responsed with exception of type: 'ApiError'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ApiErrorException, self).__init__(deserialize, response, 'ApiError', *args) + + +class ApiErrorBase(Model): + """Api error. + + :param code: Error code + :type code: str + :param message: Error message + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ApiErrorBase, self).__init__(**kwargs) + self.code = code + self.message = message + + +class Circuit(Model): + """An ExpressRoute Circuit. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar primary_subnet: CIDR of primary subnet + :vartype primary_subnet: str + :ivar secondary_subnet: CIDR of secondary subnet + :vartype secondary_subnet: str + :ivar express_route_id: Identifier of the ExpressRoute (Microsoft Colo + only) + :vartype express_route_id: str + :param authorizations: Authorizations for the ExpressRoute (Microsoft Colo + only) + :type authorizations: + list[~azure.mgmt.vmware.models.ExpressRouteAuthorization] + :ivar express_route_private_peering_id: ExpressRoute private peering + identifier + :vartype express_route_private_peering_id: str + """ + + _validation = { + 'primary_subnet': {'readonly': True}, + 'secondary_subnet': {'readonly': True}, + 'express_route_id': {'readonly': True}, + 'express_route_private_peering_id': {'readonly': True}, + } + + _attribute_map = { + 'primary_subnet': {'key': 'primarySubnet', 'type': 'str'}, + 'secondary_subnet': {'key': 'secondarySubnet', 'type': 'str'}, + 'express_route_id': {'key': 'expressRouteID', 'type': 'str'}, + 'authorizations': {'key': 'authorizations', 'type': '[ExpressRouteAuthorization]'}, + 'express_route_private_peering_id': {'key': 'expressRoutePrivatePeeringID', 'type': 'str'}, + } + + def __init__(self, *, authorizations=None, **kwargs) -> None: + super(Circuit, self).__init__(**kwargs) + self.primary_subnet = None + self.secondary_subnet = None + self.express_route_id = None + self.authorizations = authorizations + self.express_route_private_peering_id = None + + +class CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Cluster(Resource): + """A cluster resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param properties: The properties of a cluster resource + :type properties: ~azure.mgmt.vmware.models.ClusterProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClusterProperties'}, + } + + def __init__(self, *, properties=None, **kwargs) -> None: + super(Cluster, self).__init__(**kwargs) + self.properties = properties + + +class DefaultClusterProperties(Model): + """The properties of a default cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar cluster_id: The identity + :vartype cluster_id: int + :param cluster_size: The cluster size + :type cluster_size: int + :ivar hosts: The hosts + :vartype hosts: list[str] + """ + + _validation = { + 'cluster_id': {'readonly': True}, + 'hosts': {'readonly': True}, + } + + _attribute_map = { + 'cluster_id': {'key': 'clusterId', 'type': 'int'}, + 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, + 'hosts': {'key': 'hosts', 'type': '[str]'}, + } + + def __init__(self, *, cluster_size: int=None, **kwargs) -> None: + super(DefaultClusterProperties, self).__init__(**kwargs) + self.cluster_id = None + self.cluster_size = cluster_size + self.hosts = None + + +class ClusterProperties(DefaultClusterProperties): + """The properties of a cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar cluster_id: The identity + :vartype cluster_id: int + :param cluster_size: The cluster size + :type cluster_size: int + :ivar hosts: The hosts + :vartype hosts: list[str] + :ivar provisioning_state: The state of the cluster provisioning. Possible + values include: 'Succeeded', 'Failed', 'Cancelled', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.vmware.models.ClusterProvisioningState + """ + + _validation = { + 'cluster_id': {'readonly': True}, + 'hosts': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'cluster_id': {'key': 'clusterId', 'type': 'int'}, + 'cluster_size': {'key': 'clusterSize', 'type': 'int'}, + 'hosts': {'key': 'hosts', 'type': '[str]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, cluster_size: int=None, **kwargs) -> None: + super(ClusterProperties, self).__init__(cluster_size=cluster_size, **kwargs) + self.provisioning_state = None + + +class Endpoints(Model): + """Endpoint addresses. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar nsxt_manager: Endpoint for the NSX-T Data Center manager + :vartype nsxt_manager: str + :ivar vcsa: Endpoint for Virtual Center Server Appliance + :vartype vcsa: str + """ + + _validation = { + 'nsxt_manager': {'readonly': True}, + 'vcsa': {'readonly': True}, + } + + _attribute_map = { + 'nsxt_manager': {'key': 'nsxtManager', 'type': 'str'}, + 'vcsa': {'key': 'vcsa', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Endpoints, self).__init__(**kwargs) + self.nsxt_manager = None + self.vcsa = None + + +class ExpressRouteAuthorization(Model): + """Authorization for an ExpressRoute. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param name: The name of the ExpressRoute + :type name: str + :ivar id: The ID of the ExpressRoute + :vartype id: str + :ivar key: The key of the ExpressRoute + :vartype key: str + """ + + _validation = { + 'id': {'readonly': True}, + 'key': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, **kwargs) -> None: + super(ExpressRouteAuthorization, self).__init__(**kwargs) + self.name = name + self.id = None + self.key = None + + +class IdentitySource(Model): + """vCenter Single Sign On Identity Source. + + :param name: The name of the identity source + :type name: str + :param alias: The domain's NetBIOS name + :type alias: str + :param domain: The domain's dns name + :type domain: str + :param base_user_dn: The base distinguished name for users + :type base_user_dn: str + :param base_group_dn: The base distinguished name for groups + :type base_group_dn: str + :param primary_server: Primary server URL + :type primary_server: str + :param secondary_server: Secondary server URL + :type secondary_server: str + :param ssl: Protect LDAP communication using SSL certificate (LDAPS). + Possible values include: 'Enabled', 'Disabled' + :type ssl: str or ~azure.mgmt.vmware.models.SslEnum + :param username: The ID of an Active Directory user with a minimum of + read-only access to Base DN for users and group + :type username: str + :param password: The password of the Active Directory user with a minimum + of read-only access to Base DN for users and groups. + :type password: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'alias': {'key': 'alias', 'type': 'str'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'base_user_dn': {'key': 'baseUserDN', 'type': 'str'}, + 'base_group_dn': {'key': 'baseGroupDN', 'type': 'str'}, + 'primary_server': {'key': 'primaryServer', 'type': 'str'}, + 'secondary_server': {'key': 'secondaryServer', 'type': 'str'}, + 'ssl': {'key': 'ssl', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, alias: str=None, domain: str=None, base_user_dn: str=None, base_group_dn: str=None, primary_server: str=None, secondary_server: str=None, ssl=None, username: str=None, password: str=None, **kwargs) -> None: + super(IdentitySource, self).__init__(**kwargs) + self.name = name + self.alias = alias + self.domain = domain + self.base_user_dn = base_user_dn + self.base_group_dn = base_group_dn + self.primary_server = primary_server + self.secondary_server = secondary_server + self.ssl = ssl + self.username = username + self.password = password + + +class Operation(Model): + """A REST API operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: Name of the operation being performed on this object + :vartype name: str + :ivar display: Contains the localized display information for this + operation + :vartype display: ~azure.mgmt.vmware.models.OperationDisplay + """ + + _validation = { + 'name': {'readonly': True}, + 'display': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = None + self.display = None + + +class OperationDisplay(Model): + """Contains the localized display information for this operation. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provider: Localized friendly form of the resource provider name + :vartype provider: str + :ivar resource: Localized friendly form of the resource type related to + this operation + :vartype resource: str + :ivar operation: Localized friendly name for the operation + :vartype operation: str + :ivar description: Localized friendly description for the operation + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class PrivateCloud(TrackedResource): + """A private cloud resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param sku: The private cloud SKU + :type sku: ~azure.mgmt.vmware.models.Sku + :param properties: The properties of a private cloud resource + :type properties: ~azure.mgmt.vmware.models.PrivateCloudProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'properties': {'key': 'properties', 'type': 'PrivateCloudProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, sku=None, properties=None, **kwargs) -> None: + super(PrivateCloud, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.properties = properties + + +class PrivateCloudProperties(Model): + """The properties of a private cloud resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar provisioning_state: The provisioning state. Possible values include: + 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', 'Updating' + :vartype provisioning_state: str or + ~azure.mgmt.vmware.models.PrivateCloudProvisioningState + :param circuit: An ExpressRoute Circuit + :type circuit: ~azure.mgmt.vmware.models.Circuit + :param cluster: The default cluster used for management + :type cluster: ~azure.mgmt.vmware.models.DefaultClusterProperties + :ivar clusters: The clusters + :vartype clusters: list[str] + :ivar endpoints: The endpoints + :vartype endpoints: ~azure.mgmt.vmware.models.Endpoints + :param internet: Connectivity to internet is enabled or disabled. Possible + values include: 'Enabled', 'Disabled' + :type internet: str or ~azure.mgmt.vmware.models.InternetEnum + :param identity_sources: vCenter Single Sign On Identity Sources + :type identity_sources: list[~azure.mgmt.vmware.models.IdentitySource] + :param network_block: The block of addresses should be unique across VNet + in your subscription as well as on-premise. Make sure the CIDR format is + conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is + between 0 and 22 + :type network_block: str + :ivar management_network: Network used to access vCenter Server and NSX-T + Manager + :vartype management_network: str + :ivar provisioning_network: Used for virtual machine cold migration, + cloning, and snapshot migration + :vartype provisioning_network: str + :ivar vmotion_network: Used for live migration of virtual machines + :vartype vmotion_network: str + :param vcenter_password: Optionally, set the vCenter admin password when + the private cloud is created + :type vcenter_password: str + :param nsxt_password: Optionally, set the NSX-T Manager password when the + private cloud is created + :type nsxt_password: str + :ivar vcenter_certificate_thumbprint: Thumbprint of the vCenter Server SSL + certificate + :vartype vcenter_certificate_thumbprint: str + :ivar nsxt_certificate_thumbprint: Thumbprint of the NSX-T Manager SSL + certificate + :vartype nsxt_certificate_thumbprint: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'clusters': {'readonly': True}, + 'endpoints': {'readonly': True}, + 'management_network': {'readonly': True}, + 'provisioning_network': {'readonly': True}, + 'vmotion_network': {'readonly': True}, + 'vcenter_certificate_thumbprint': {'readonly': True}, + 'nsxt_certificate_thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'circuit': {'key': 'circuit', 'type': 'Circuit'}, + 'cluster': {'key': 'cluster', 'type': 'DefaultClusterProperties'}, + 'clusters': {'key': 'clusters', 'type': '[str]'}, + 'endpoints': {'key': 'endpoints', 'type': 'Endpoints'}, + 'internet': {'key': 'internet', 'type': 'str'}, + 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, + 'network_block': {'key': 'networkBlock', 'type': 'str'}, + 'management_network': {'key': 'managementNetwork', 'type': 'str'}, + 'provisioning_network': {'key': 'provisioningNetwork', 'type': 'str'}, + 'vmotion_network': {'key': 'vmotionNetwork', 'type': 'str'}, + 'vcenter_password': {'key': 'vcenterPassword', 'type': 'str'}, + 'nsxt_password': {'key': 'nsxtPassword', 'type': 'str'}, + 'vcenter_certificate_thumbprint': {'key': 'vcenterCertificateThumbprint', 'type': 'str'}, + 'nsxt_certificate_thumbprint': {'key': 'nsxtCertificateThumbprint', 'type': 'str'}, + } + + def __init__(self, *, circuit=None, cluster=None, internet=None, identity_sources=None, network_block: str=None, vcenter_password: str=None, nsxt_password: str=None, **kwargs) -> None: + super(PrivateCloudProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.circuit = circuit + self.cluster = cluster + self.clusters = None + self.endpoints = None + self.internet = internet + self.identity_sources = identity_sources + self.network_block = network_block + self.management_network = None + self.provisioning_network = None + self.vmotion_network = None + self.vcenter_password = vcenter_password + self.nsxt_password = nsxt_password + self.vcenter_certificate_thumbprint = None + self.nsxt_certificate_thumbprint = None + + +class Quota(Model): + """Subscription quotas. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar hosts_remaining: Remaining hosts quota by sku type + :vartype hosts_remaining: dict[str, int] + :param quota_enabled: Host quota is active for current subscription. + Possible values include: 'Enabled', 'Disabled' + :type quota_enabled: str or ~azure.mgmt.vmware.models.QuotaEnabled + """ + + _validation = { + 'hosts_remaining': {'readonly': True}, + } + + _attribute_map = { + 'hosts_remaining': {'key': 'hostsRemaining', 'type': '{int}'}, + 'quota_enabled': {'key': 'quotaEnabled', 'type': 'str'}, + } + + def __init__(self, *, quota_enabled=None, **kwargs) -> None: + super(Quota, self).__init__(**kwargs) + self.hosts_remaining = None + self.quota_enabled = quota_enabled + + +class Sku(Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__(self, *, name: str, **kwargs) -> None: + super(Sku, self).__init__(**kwargs) + self.name = name + + +class Trial(Model): + """Subscription trial availability. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: Trial status. Possible values include: 'TrialAvailable', + 'TrialUsed', 'TrialDisabled' + :vartype status: str or ~azure.mgmt.vmware.models.enum + :ivar available_hosts: Number of trial hosts available + :vartype available_hosts: int + """ + + _validation = { + 'status': {'readonly': True}, + 'available_hosts': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'available_hosts': {'key': 'availableHosts', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(Trial, self).__init__(**kwargs) + self.status = None + self.available_hosts = None diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_paged_models.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_paged_models.py new file mode 100644 index 000000000000..a2c16e61ee62 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_paged_models.py @@ -0,0 +1,53 @@ +# 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.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class PrivateCloudPaged(Paged): + """ + A paging container for iterating over a list of :class:`PrivateCloud ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PrivateCloud]'} + } + + def __init__(self, *args, **kwargs): + + super(PrivateCloudPaged, self).__init__(*args, **kwargs) +class ClusterPaged(Paged): + """ + A paging container for iterating over a list of :class:`Cluster ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Cluster]'} + } + + def __init__(self, *args, **kwargs): + + super(ClusterPaged, self).__init__(*args, **kwargs) diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/__init__.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/__init__.py new file mode 100644 index 000000000000..632207515508 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/__init__.py @@ -0,0 +1,22 @@ +# 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 ._operations import Operations +from ._locations_operations import LocationsOperations +from ._private_clouds_operations import PrivateCloudsOperations +from ._clusters_operations import ClustersOperations + +__all__ = [ + 'Operations', + 'LocationsOperations', + 'PrivateCloudsOperations', + 'ClustersOperations', +] diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_clusters_operations.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_clusters_operations.py new file mode 100644 index 000000000000..f33d8bdb9040 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_clusters_operations.py @@ -0,0 +1,476 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ClustersOperations(object): + """ClustersOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of Azure VMware Solution API to be used with the client request. Constant value: "2019-08-09-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-09-preview" + + self.config = config + + def list( + self, resource_group_name, private_cloud_name, custom_headers=None, raw=False, **operation_config): + """List clusters in a private cloud. + + :param resource_group_name: Name of the resource group within the + Azure subscription + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud + :type private_cloud_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Cluster + :rtype: + ~azure.mgmt.vmware.models.ClusterPaged[~azure.mgmt.vmware.models.Cluster] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.ClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters'} + + def get( + self, resource_group_name, private_cloud_name, cluster_name, custom_headers=None, raw=False, **operation_config): + """Get a cluster by name in a private cloud. + + :param resource_group_name: Name of the resource group within the + Azure subscription + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Cluster or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.vmware.models.Cluster or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} + + + def _create_or_update_initial( + self, resource_group_name, private_cloud_name, cluster_name, properties=None, custom_headers=None, raw=False, **operation_config): + cluster = models.Cluster(properties=properties) + + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(cluster, 'Cluster') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Cluster', response) + if response.status_code == 201: + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, private_cloud_name, cluster_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a cluster in a private cloud. + + :param resource_group_name: Name of the resource group within the + Azure subscription + :type resource_group_name: str + :param private_cloud_name: The name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud + :type cluster_name: str + :param properties: The properties of a cluster resource + :type properties: ~azure.mgmt.vmware.models.ClusterProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Cluster or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.vmware.models.Cluster] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.vmware.models.Cluster]] + :raises: + :class:`ApiErrorException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cluster_name=cluster_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} + + + def _update_initial( + self, resource_group_name, private_cloud_name, cluster_name, properties=None, custom_headers=None, raw=False, **operation_config): + cluster = models.Cluster(properties=properties) + + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(cluster, 'Cluster') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Cluster', response) + if response.status_code == 201: + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, private_cloud_name, cluster_name, properties=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a cluster in a private cloud. + + :param resource_group_name: Name of the resource group within the + Azure subscription + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud + :type cluster_name: str + :param properties: The properties of a cluster resource + :type properties: ~azure.mgmt.vmware.models.ClusterProperties + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Cluster or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.vmware.models.Cluster] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.vmware.models.Cluster]] + :raises: + :class:`ApiErrorException` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cluster_name=cluster_name, + properties=properties, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} + + + def _delete_initial( + self, resource_group_name, private_cloud_name, cluster_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, private_cloud_name, cluster_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a cluster in a private cloud. + + :param resource_group_name: Name of the resource group within the + Azure subscription + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ApiErrorException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cluster_name=cluster_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}'} diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_locations_operations.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_locations_operations.py new file mode 100644 index 000000000000..1e270278229c --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_locations_operations.py @@ -0,0 +1,153 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class LocationsOperations(object): + """LocationsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of Azure VMware Solution API to be used with the client request. Constant value: "2019-08-09-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-09-preview" + + self.config = config + + def check_trial_availability( + self, location, custom_headers=None, raw=False, **operation_config): + """Return trial status for subscription by region. + + :param location: Azure region + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Trial or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.vmware.models.Trial or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.check_trial_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Trial', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_trial_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkTrialAvailability'} + + def check_quota_availability( + self, location, custom_headers=None, raw=False, **operation_config): + """Return quota for subscription by region. + + :param location: Azure region + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Quota or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.vmware.models.Quota or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.check_quota_availability.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Quota', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + check_quota_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/locations/{location}/checkQuotaAvailability'} diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_operations.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_operations.py new file mode 100644 index 000000000000..66cc66d2716f --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_operations.py @@ -0,0 +1,100 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of Azure VMware Solution API to be used with the client request. Constant value: "2019-08-09-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-09-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.vmware.models.OperationPaged[~azure.mgmt.vmware.models.Operation] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.AVS/operations'} diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_private_clouds_operations.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_private_clouds_operations.py new file mode 100644 index 000000000000..dce319ce43f1 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_private_clouds_operations.py @@ -0,0 +1,580 @@ +# 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. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class PrivateCloudsOperations(object): + """PrivateCloudsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: Version of Azure VMware Solution API to be used with the client request. Constant value: "2019-08-09-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-08-09-preview" + + self.config = config + + def list( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List private clouds in a resource group. + + :param resource_group_name: Name of the resource group within the + Azure subscription + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateCloud + :rtype: + ~azure.mgmt.vmware.models.PrivateCloudPaged[~azure.mgmt.vmware.models.PrivateCloud] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateCloudPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds'} + + def list_in_subscription( + self, custom_headers=None, raw=False, **operation_config): + """List private clouds in a subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PrivateCloud + :rtype: + ~azure.mgmt.vmware.models.PrivateCloudPaged[~azure.mgmt.vmware.models.PrivateCloud] + :raises: + :class:`ApiErrorException` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_in_subscription.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.PrivateCloudPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_in_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.AVS/privateClouds'} + + def get( + self, resource_group_name, private_cloud_name, custom_headers=None, raw=False, **operation_config): + """Get a private cloud. + + :param resource_group_name: Name of the resource group within the + Azure subscription + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud + :type private_cloud_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateCloud or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.vmware.models.PrivateCloud or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateCloud', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} + + + def _create_or_update_initial( + self, resource_group_name, private_cloud_name, private_cloud, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_or_update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(private_cloud, 'PrivateCloud') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateCloud', response) + if response.status_code == 201: + deserialized = self._deserialize('PrivateCloud', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, private_cloud_name, private_cloud, custom_headers=None, raw=False, polling=True, **operation_config): + """Create or update a private cloud. + + :param resource_group_name: Name of the resource group within the + Azure subscription + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud + :type private_cloud_name: str + :param private_cloud: The private cloud + :type private_cloud: ~azure.mgmt.vmware.models.PrivateCloud + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns PrivateCloud or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.vmware.models.PrivateCloud] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.vmware.models.PrivateCloud]] + :raises: + :class:`ApiErrorException` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + private_cloud=private_cloud, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PrivateCloud', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} + + + def _update_initial( + self, resource_group_name, private_cloud_name, private_cloud, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(private_cloud, 'PrivateCloud') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 201]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateCloud', response) + if response.status_code == 201: + deserialized = self._deserialize('PrivateCloud', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def update( + self, resource_group_name, private_cloud_name, private_cloud, custom_headers=None, raw=False, polling=True, **operation_config): + """Update a private cloud. + + :param resource_group_name: Name of the resource group within the + Azure subscription + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud + :type private_cloud_name: str + :param private_cloud: The private cloud + :type private_cloud: ~azure.mgmt.vmware.models.PrivateCloud + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns PrivateCloud or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.vmware.models.PrivateCloud] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.vmware.models.PrivateCloud]] + :raises: + :class:`ApiErrorException` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + private_cloud=private_cloud, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('PrivateCloud', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} + + + def _delete_initial( + self, resource_group_name, private_cloud_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ApiErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, private_cloud_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Delete a private cloud. + + :param resource_group_name: Name of the resource group within the + Azure subscription + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud + :type private_cloud_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ApiErrorException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}'} + + def list_admin_credentials( + self, resource_group_name, private_cloud_name, custom_headers=None, raw=False, **operation_config): + """List the admin credentials for the private cloud. + + :param resource_group_name: Name of the resource group within the + Azure subscription + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud + :type private_cloud_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AdminCredentials or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.vmware.models.AdminCredentials or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ApiErrorException` + """ + # Construct URL + url = self.list_admin_credentials.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ApiErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AdminCredentials', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/listAdminCredentials'} diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/version.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/version.py new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + diff --git a/sdk/compute/azure-mgmt-vmware/dev_requirements.txt b/sdk/compute/azure-mgmt-vmware/dev_requirements.txt new file mode 100644 index 000000000000..2980bbe150be --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/dev_requirements.txt @@ -0,0 +1,4 @@ +-e ../../../tools/azure-sdk-tools +-e ../../authorization/azure-mgmt-authorization +-e ../../storage/azure-mgmt-storage +-e ../../network/azure-mgmt-network \ No newline at end of file diff --git a/sdk/compute/azure-mgmt-vmware/sdk_packaging.toml b/sdk/compute/azure-mgmt-vmware/sdk_packaging.toml new file mode 100644 index 000000000000..a29df275ee11 --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-vmware" +package_pprint_name = "Vmware Management" +package_doc_id = "vmware" +is_stable = false diff --git a/sdk/compute/azure-mgmt-vmware/setup.cfg b/sdk/compute/azure-mgmt-vmware/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/compute/azure-mgmt-vmware/setup.py b/sdk/compute/azure-mgmt-vmware/setup.py new file mode 100644 index 000000000000..8b8ae1e7b64e --- /dev/null +++ b/sdk/compute/azure-mgmt-vmware/setup.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-vmware" +PACKAGE_PPRINT_NAME = "Vmware Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + readme = f.read() +with open('CHANGELOG.md', encoding='utf-8') as f: + changelog = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + changelog, + long_description_content_type='text/markdown', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), + install_requires=[ + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', + 'azure-common~=1.1', + ], + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } +) From f4051a9b6a8070adc444339f7ad239621c08e86c Mon Sep 17 00:00:00 2001 From: Shixun Guan Date: Wed, 17 Jun 2020 08:53:34 +0000 Subject: [PATCH 2/6] change client name to AVSClient --- .../azure-mgmt-vmware/azure/mgmt/vmware/__init__.py | 6 +++--- .../{_azure_vmware_solution_api.py => _avs_client.py} | 10 +++++----- .../azure/mgmt/vmware/_configuration.py | 6 +++--- .../azure/mgmt/vmware/models/__init__.py | 2 +- ...ware_solution_api_enums.py => _avs_client_enums.py} | 0 5 files changed, 12 insertions(+), 12 deletions(-) rename sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/{_azure_vmware_solution_api.py => _avs_client.py} (87%) rename sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/{_azure_vmware_solution_api_enums.py => _avs_client_enums.py} (100%) diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/__init__.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/__init__.py index 34570671746a..658daba783e3 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/__init__.py +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/__init__.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- -from ._configuration import AzureVMwareSolutionAPIConfiguration -from ._azure_vmware_solution_api import AzureVMwareSolutionAPI -__all__ = ['AzureVMwareSolutionAPI', 'AzureVMwareSolutionAPIConfiguration'] +from ._configuration import AVSClientConfiguration +from ._avs_client import AVSClient +__all__ = ['AVSClient', 'AVSClientConfiguration'] from .version import VERSION diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_azure_vmware_solution_api.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_avs_client.py similarity index 87% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_azure_vmware_solution_api.py rename to sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_avs_client.py index a02f425ebc02..97ec170e8ea6 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_azure_vmware_solution_api.py +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_avs_client.py @@ -12,7 +12,7 @@ from msrest.service_client import SDKClient from msrest import Serializer, Deserializer -from ._configuration import AzureVMwareSolutionAPIConfiguration +from ._configuration import AVSClientConfiguration from .operations import Operations from .operations import LocationsOperations from .operations import PrivateCloudsOperations @@ -20,11 +20,11 @@ from . import models -class AzureVMwareSolutionAPI(SDKClient): +class AVSClient(SDKClient): """Azure VMware Solution API :ivar config: Configuration for client. - :vartype config: AzureVMwareSolutionAPIConfiguration + :vartype config: AVSClientConfiguration :ivar operations: Operations operations :vartype operations: azure.mgmt.vmware.operations.Operations @@ -46,8 +46,8 @@ class AzureVMwareSolutionAPI(SDKClient): def __init__( self, credentials, subscription_id, base_url=None): - self.config = AzureVMwareSolutionAPIConfiguration(credentials, subscription_id, base_url) - super(AzureVMwareSolutionAPI, self).__init__(self.config.credentials, self.config) + self.config = AVSClientConfiguration(credentials, subscription_id, base_url) + super(AVSClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2019-08-09-preview' diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_configuration.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_configuration.py index 5b50d5d39db9..a8c35b02924b 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_configuration.py +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_configuration.py @@ -13,8 +13,8 @@ from .version import VERSION -class AzureVMwareSolutionAPIConfiguration(AzureConfiguration): - """Configuration for AzureVMwareSolutionAPI +class AVSClientConfiguration(AzureConfiguration): + """Configuration for AVSClient Note that all parameters used to create this instance are saved as instance attributes. @@ -36,7 +36,7 @@ def __init__( if not base_url: base_url = 'https://management.azure.com' - super(AzureVMwareSolutionAPIConfiguration, self).__init__(base_url) + super(AVSClientConfiguration, self).__init__(base_url) # Starting Autorest.Python 4.0.64, make connection pool activated by default self.keep_alive = True diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/__init__.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/__init__.py index 3e9f3d9a7bf2..a3c8f5cc25ab 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/__init__.py +++ b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/__init__.py @@ -52,7 +52,7 @@ from ._paged_models import ClusterPaged from ._paged_models import OperationPaged from ._paged_models import PrivateCloudPaged -from ._azure_vmware_solution_api_enums import ( +from ._avs_client_enums import ( QuotaEnabled, SslEnum, PrivateCloudProvisioningState, diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_azure_vmware_solution_api_enums.py b/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_avs_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_azure_vmware_solution_api_enums.py rename to sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_avs_client_enums.py From ca5f0aed5a638f08baf3327ce36290f5737b7385 Mon Sep 17 00:00:00 2001 From: Shixun Guan Date: Thu, 18 Jun 2020 01:54:44 +0000 Subject: [PATCH 3/6] change package name to azure-mgmt-avs --- .../CHANGELOG.md | 0 .../MANIFEST.in | 0 .../README.md | 6 ++-- .../azure/__init__.py | 0 .../azure/mgmt/__init__.py | 0 .../azure/mgmt/avs}/__init__.py | 0 .../azure/mgmt/avs}/_avs_client.py | 8 ++--- .../azure/mgmt/avs}/_configuration.py | 2 +- .../azure/mgmt/avs}/models/__init__.py | 0 .../mgmt/avs}/models/_avs_client_enums.py | 0 .../azure/mgmt/avs}/models/_models.py | 32 ++++++++--------- .../azure/mgmt/avs}/models/_models_py3.py | 32 ++++++++--------- .../azure/mgmt/avs}/models/_paged_models.py | 6 ++-- .../azure/mgmt/avs}/operations/__init__.py | 0 .../avs}/operations/_clusters_operations.py | 26 +++++++------- .../avs}/operations/_locations_operations.py | 8 ++--- .../azure/mgmt/avs}/operations/_operations.py | 4 +-- .../operations/_private_clouds_operations.py | 34 +++++++++---------- .../azure/mgmt/avs}/version.py | 0 .../azure-mgmt-avs/dev_requirements.txt | 1 + sdk/compute/azure-mgmt-avs/sdk_packaging.toml | 5 +++ .../setup.cfg | 0 .../setup.py | 4 +-- .../azure-mgmt-vmware/dev_requirements.txt | 4 --- .../azure-mgmt-vmware/sdk_packaging.toml | 5 --- 25 files changed, 87 insertions(+), 90 deletions(-) rename sdk/compute/{azure-mgmt-vmware => azure-mgmt-avs}/CHANGELOG.md (100%) rename sdk/compute/{azure-mgmt-vmware => azure-mgmt-avs}/MANIFEST.in (100%) rename sdk/compute/{azure-mgmt-vmware => azure-mgmt-avs}/README.md (66%) rename sdk/compute/{azure-mgmt-vmware => azure-mgmt-avs}/azure/__init__.py (100%) rename sdk/compute/{azure-mgmt-vmware => azure-mgmt-avs}/azure/mgmt/__init__.py (100%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/__init__.py (100%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/_avs_client.py (89%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/_configuration.py (96%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/models/__init__.py (100%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/models/_avs_client_enums.py (100%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/models/_models.py (95%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/models/_models_py3.py (95%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/models/_paged_models.py (91%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/operations/__init__.py (100%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/operations/_clusters_operations.py (96%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/operations/_locations_operations.py (96%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/operations/_operations.py (95%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/operations/_private_clouds_operations.py (95%) rename sdk/compute/{azure-mgmt-vmware/azure/mgmt/vmware => azure-mgmt-avs/azure/mgmt/avs}/version.py (100%) create mode 100644 sdk/compute/azure-mgmt-avs/dev_requirements.txt create mode 100644 sdk/compute/azure-mgmt-avs/sdk_packaging.toml rename sdk/compute/{azure-mgmt-vmware => azure-mgmt-avs}/setup.cfg (100%) rename sdk/compute/{azure-mgmt-vmware => azure-mgmt-avs}/setup.py (97%) delete mode 100644 sdk/compute/azure-mgmt-vmware/dev_requirements.txt delete mode 100644 sdk/compute/azure-mgmt-vmware/sdk_packaging.toml diff --git a/sdk/compute/azure-mgmt-vmware/CHANGELOG.md b/sdk/compute/azure-mgmt-avs/CHANGELOG.md similarity index 100% rename from sdk/compute/azure-mgmt-vmware/CHANGELOG.md rename to sdk/compute/azure-mgmt-avs/CHANGELOG.md diff --git a/sdk/compute/azure-mgmt-vmware/MANIFEST.in b/sdk/compute/azure-mgmt-avs/MANIFEST.in similarity index 100% rename from sdk/compute/azure-mgmt-vmware/MANIFEST.in rename to sdk/compute/azure-mgmt-avs/MANIFEST.in diff --git a/sdk/compute/azure-mgmt-vmware/README.md b/sdk/compute/azure-mgmt-avs/README.md similarity index 66% rename from sdk/compute/azure-mgmt-vmware/README.md rename to sdk/compute/azure-mgmt-avs/README.md index e56a219987f4..d4f32600a2de 100644 --- a/sdk/compute/azure-mgmt-vmware/README.md +++ b/sdk/compute/azure-mgmt-avs/README.md @@ -1,13 +1,13 @@ # Microsoft Azure SDK for Python -This is the Microsoft Azure Vmware Management Client Library. +This is the Microsoft Azure Azure VMWare Solution Management Client Library. This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) # Usage -For code examples, see [Vmware Management](https://docs.microsoft.com/python/api/overview/azure/vmware) +For code examples, see [Azure VMWare Solution Management](https://docs.microsoft.com/python/api/overview/azure/) on docs.microsoft.com. @@ -18,4 +18,4 @@ If you encounter any bugs or have suggestions, please file an issue in the section of the project. -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-vmware%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-avs%2FREADME.png) diff --git a/sdk/compute/azure-mgmt-vmware/azure/__init__.py b/sdk/compute/azure-mgmt-avs/azure/__init__.py similarity index 100% rename from sdk/compute/azure-mgmt-vmware/azure/__init__.py rename to sdk/compute/azure-mgmt-avs/azure/__init__.py diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/__init__.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/__init__.py similarity index 100% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/__init__.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/__init__.py diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/__init__.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/__init__.py similarity index 100% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/__init__.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/__init__.py diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_avs_client.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_avs_client.py similarity index 89% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_avs_client.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_avs_client.py index 97ec170e8ea6..8646bf5bcf48 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_avs_client.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_avs_client.py @@ -27,13 +27,13 @@ class AVSClient(SDKClient): :vartype config: AVSClientConfiguration :ivar operations: Operations operations - :vartype operations: azure.mgmt.vmware.operations.Operations + :vartype operations: azure.mgmt.avs.operations.Operations :ivar locations: Locations operations - :vartype locations: azure.mgmt.vmware.operations.LocationsOperations + :vartype locations: azure.mgmt.avs.operations.LocationsOperations :ivar private_clouds: PrivateClouds operations - :vartype private_clouds: azure.mgmt.vmware.operations.PrivateCloudsOperations + :vartype private_clouds: azure.mgmt.avs.operations.PrivateCloudsOperations :ivar clusters: Clusters operations - :vartype clusters: azure.mgmt.vmware.operations.ClustersOperations + :vartype clusters: azure.mgmt.avs.operations.ClustersOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_configuration.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_configuration.py similarity index 96% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_configuration.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_configuration.py index a8c35b02924b..3e97aaba096c 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/_configuration.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_configuration.py @@ -41,7 +41,7 @@ def __init__( # Starting Autorest.Python 4.0.64, make connection pool activated by default self.keep_alive = True - self.add_user_agent('azure-mgmt-vmware/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-avs/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/__init__.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/__init__.py similarity index 100% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/__init__.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/__init__.py diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_avs_client_enums.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_avs_client_enums.py similarity index 100% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_avs_client_enums.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_avs_client_enums.py diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py similarity index 95% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py index 53fb5dd686da..cf6dddf052e1 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py @@ -55,7 +55,7 @@ class ApiError(Model): """API error response. :param error: An error returned by the API - :type error: ~azure.mgmt.vmware.models.ApiErrorBase + :type error: ~azure.mgmt.avs.models.ApiErrorBase """ _attribute_map = { @@ -115,7 +115,7 @@ class Circuit(Model): :param authorizations: Authorizations for the ExpressRoute (Microsoft Colo only) :type authorizations: - list[~azure.mgmt.vmware.models.ExpressRouteAuthorization] + list[~azure.mgmt.avs.models.ExpressRouteAuthorization] :ivar express_route_private_peering_id: ExpressRoute private peering identifier :vartype express_route_private_peering_id: str @@ -199,7 +199,7 @@ class Cluster(Resource): :ivar type: Resource type. :vartype type: str :param properties: The properties of a cluster resource - :type properties: ~azure.mgmt.vmware.models.ClusterProperties + :type properties: ~azure.mgmt.avs.models.ClusterProperties """ _validation = { @@ -267,7 +267,7 @@ class ClusterProperties(DefaultClusterProperties): :ivar provisioning_state: The state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Updating' :vartype provisioning_state: str or - ~azure.mgmt.vmware.models.ClusterProvisioningState + ~azure.mgmt.avs.models.ClusterProvisioningState """ _validation = { @@ -367,7 +367,7 @@ class IdentitySource(Model): :type secondary_server: str :param ssl: Protect LDAP communication using SSL certificate (LDAPS). Possible values include: 'Enabled', 'Disabled' - :type ssl: str or ~azure.mgmt.vmware.models.SslEnum + :type ssl: str or ~azure.mgmt.avs.models.SslEnum :param username: The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group :type username: str @@ -413,7 +413,7 @@ class Operation(Model): :vartype name: str :ivar display: Contains the localized display information for this operation - :vartype display: ~azure.mgmt.vmware.models.OperationDisplay + :vartype display: ~azure.mgmt.avs.models.OperationDisplay """ _validation = { @@ -526,9 +526,9 @@ class PrivateCloud(TrackedResource): :param tags: Resource tags :type tags: dict[str, str] :param sku: The private cloud SKU - :type sku: ~azure.mgmt.vmware.models.Sku + :type sku: ~azure.mgmt.avs.models.Sku :param properties: The properties of a private cloud resource - :type properties: ~azure.mgmt.vmware.models.PrivateCloudProperties + :type properties: ~azure.mgmt.avs.models.PrivateCloudProperties """ _validation = { @@ -562,20 +562,20 @@ class PrivateCloudProperties(Model): :ivar provisioning_state: The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', 'Updating' :vartype provisioning_state: str or - ~azure.mgmt.vmware.models.PrivateCloudProvisioningState + ~azure.mgmt.avs.models.PrivateCloudProvisioningState :param circuit: An ExpressRoute Circuit - :type circuit: ~azure.mgmt.vmware.models.Circuit + :type circuit: ~azure.mgmt.avs.models.Circuit :param cluster: The default cluster used for management - :type cluster: ~azure.mgmt.vmware.models.DefaultClusterProperties + :type cluster: ~azure.mgmt.avs.models.DefaultClusterProperties :ivar clusters: The clusters :vartype clusters: list[str] :ivar endpoints: The endpoints - :vartype endpoints: ~azure.mgmt.vmware.models.Endpoints + :vartype endpoints: ~azure.mgmt.avs.models.Endpoints :param internet: Connectivity to internet is enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type internet: str or ~azure.mgmt.vmware.models.InternetEnum + :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources - :type identity_sources: list[~azure.mgmt.vmware.models.IdentitySource] + :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] :param network_block: The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is @@ -661,7 +661,7 @@ class Quota(Model): :vartype hosts_remaining: dict[str, int] :param quota_enabled: Host quota is active for current subscription. Possible values include: 'Enabled', 'Disabled' - :type quota_enabled: str or ~azure.mgmt.vmware.models.QuotaEnabled + :type quota_enabled: str or ~azure.mgmt.avs.models.QuotaEnabled """ _validation = { @@ -709,7 +709,7 @@ class Trial(Model): :ivar status: Trial status. Possible values include: 'TrialAvailable', 'TrialUsed', 'TrialDisabled' - :vartype status: str or ~azure.mgmt.vmware.models.enum + :vartype status: str or ~azure.mgmt.avs.models.enum :ivar available_hosts: Number of trial hosts available :vartype available_hosts: int """ diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models_py3.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models_py3.py similarity index 95% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models_py3.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models_py3.py index e456ab84dfde..64318ee9b579 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models_py3.py @@ -55,7 +55,7 @@ class ApiError(Model): """API error response. :param error: An error returned by the API - :type error: ~azure.mgmt.vmware.models.ApiErrorBase + :type error: ~azure.mgmt.avs.models.ApiErrorBase """ _attribute_map = { @@ -115,7 +115,7 @@ class Circuit(Model): :param authorizations: Authorizations for the ExpressRoute (Microsoft Colo only) :type authorizations: - list[~azure.mgmt.vmware.models.ExpressRouteAuthorization] + list[~azure.mgmt.avs.models.ExpressRouteAuthorization] :ivar express_route_private_peering_id: ExpressRoute private peering identifier :vartype express_route_private_peering_id: str @@ -199,7 +199,7 @@ class Cluster(Resource): :ivar type: Resource type. :vartype type: str :param properties: The properties of a cluster resource - :type properties: ~azure.mgmt.vmware.models.ClusterProperties + :type properties: ~azure.mgmt.avs.models.ClusterProperties """ _validation = { @@ -267,7 +267,7 @@ class ClusterProperties(DefaultClusterProperties): :ivar provisioning_state: The state of the cluster provisioning. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Updating' :vartype provisioning_state: str or - ~azure.mgmt.vmware.models.ClusterProvisioningState + ~azure.mgmt.avs.models.ClusterProvisioningState """ _validation = { @@ -367,7 +367,7 @@ class IdentitySource(Model): :type secondary_server: str :param ssl: Protect LDAP communication using SSL certificate (LDAPS). Possible values include: 'Enabled', 'Disabled' - :type ssl: str or ~azure.mgmt.vmware.models.SslEnum + :type ssl: str or ~azure.mgmt.avs.models.SslEnum :param username: The ID of an Active Directory user with a minimum of read-only access to Base DN for users and group :type username: str @@ -413,7 +413,7 @@ class Operation(Model): :vartype name: str :ivar display: Contains the localized display information for this operation - :vartype display: ~azure.mgmt.vmware.models.OperationDisplay + :vartype display: ~azure.mgmt.avs.models.OperationDisplay """ _validation = { @@ -526,9 +526,9 @@ class PrivateCloud(TrackedResource): :param tags: Resource tags :type tags: dict[str, str] :param sku: The private cloud SKU - :type sku: ~azure.mgmt.vmware.models.Sku + :type sku: ~azure.mgmt.avs.models.Sku :param properties: The properties of a private cloud resource - :type properties: ~azure.mgmt.vmware.models.PrivateCloudProperties + :type properties: ~azure.mgmt.avs.models.PrivateCloudProperties """ _validation = { @@ -562,20 +562,20 @@ class PrivateCloudProperties(Model): :ivar provisioning_state: The provisioning state. Possible values include: 'Succeeded', 'Failed', 'Cancelled', 'Pending', 'Building', 'Updating' :vartype provisioning_state: str or - ~azure.mgmt.vmware.models.PrivateCloudProvisioningState + ~azure.mgmt.avs.models.PrivateCloudProvisioningState :param circuit: An ExpressRoute Circuit - :type circuit: ~azure.mgmt.vmware.models.Circuit + :type circuit: ~azure.mgmt.avs.models.Circuit :param cluster: The default cluster used for management - :type cluster: ~azure.mgmt.vmware.models.DefaultClusterProperties + :type cluster: ~azure.mgmt.avs.models.DefaultClusterProperties :ivar clusters: The clusters :vartype clusters: list[str] :ivar endpoints: The endpoints - :vartype endpoints: ~azure.mgmt.vmware.models.Endpoints + :vartype endpoints: ~azure.mgmt.avs.models.Endpoints :param internet: Connectivity to internet is enabled or disabled. Possible values include: 'Enabled', 'Disabled' - :type internet: str or ~azure.mgmt.vmware.models.InternetEnum + :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources - :type identity_sources: list[~azure.mgmt.vmware.models.IdentitySource] + :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] :param network_block: The block of addresses should be unique across VNet in your subscription as well as on-premise. Make sure the CIDR format is conformed to (A.B.C.D/X) where A,B,C,D are between 0 and 255, and X is @@ -661,7 +661,7 @@ class Quota(Model): :vartype hosts_remaining: dict[str, int] :param quota_enabled: Host quota is active for current subscription. Possible values include: 'Enabled', 'Disabled' - :type quota_enabled: str or ~azure.mgmt.vmware.models.QuotaEnabled + :type quota_enabled: str or ~azure.mgmt.avs.models.QuotaEnabled """ _validation = { @@ -709,7 +709,7 @@ class Trial(Model): :ivar status: Trial status. Possible values include: 'TrialAvailable', 'TrialUsed', 'TrialDisabled' - :vartype status: str or ~azure.mgmt.vmware.models.enum + :vartype status: str or ~azure.mgmt.avs.models.enum :ivar available_hosts: Number of trial hosts available :vartype available_hosts: int """ diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_paged_models.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_paged_models.py similarity index 91% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_paged_models.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_paged_models.py index a2c16e61ee62..93b7f7f420ce 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/models/_paged_models.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_paged_models.py @@ -14,7 +14,7 @@ class OperationPaged(Paged): """ - A paging container for iterating over a list of :class:`Operation ` object + A paging container for iterating over a list of :class:`Operation ` object """ _attribute_map = { @@ -27,7 +27,7 @@ def __init__(self, *args, **kwargs): super(OperationPaged, self).__init__(*args, **kwargs) class PrivateCloudPaged(Paged): """ - A paging container for iterating over a list of :class:`PrivateCloud ` object + A paging container for iterating over a list of :class:`PrivateCloud ` object """ _attribute_map = { @@ -40,7 +40,7 @@ def __init__(self, *args, **kwargs): super(PrivateCloudPaged, self).__init__(*args, **kwargs) class ClusterPaged(Paged): """ - A paging container for iterating over a list of :class:`Cluster ` object + A paging container for iterating over a list of :class:`Cluster ` object """ _attribute_map = { diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/__init__.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/__init__.py similarity index 100% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/__init__.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/__init__.py diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_clusters_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_clusters_operations.py similarity index 96% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_clusters_operations.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_clusters_operations.py index f33d8bdb9040..972c3b4f97bb 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_clusters_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_clusters_operations.py @@ -56,9 +56,9 @@ def list( overrides`. :return: An iterator like instance of Cluster :rtype: - ~azure.mgmt.vmware.models.ClusterPaged[~azure.mgmt.vmware.models.Cluster] + ~azure.mgmt.avs.models.ClusterPaged[~azure.mgmt.avs.models.Cluster] :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ def prepare_request(next_link=None): if not next_link: @@ -129,10 +129,10 @@ def get( :param operation_config: :ref:`Operation configuration overrides`. :return: Cluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.vmware.models.Cluster or + :rtype: ~azure.mgmt.avs.models.Cluster or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ # Construct URL url = self.get.metadata['url'] @@ -241,7 +241,7 @@ def create_or_update( :param cluster_name: Name of the cluster in the private cloud :type cluster_name: str :param properties: The properties of a cluster resource - :type properties: ~azure.mgmt.vmware.models.ClusterProperties + :type properties: ~azure.mgmt.avs.models.ClusterProperties :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -250,11 +250,11 @@ def create_or_update( :return: An instance of LROPoller that returns Cluster or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.vmware.models.Cluster] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.avs.models.Cluster] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.vmware.models.Cluster]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.avs.models.Cluster]] :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -349,7 +349,7 @@ def update( :param cluster_name: Name of the cluster in the private cloud :type cluster_name: str :param properties: The properties of a cluster resource - :type properties: ~azure.mgmt.vmware.models.ClusterProperties + :type properties: ~azure.mgmt.avs.models.ClusterProperties :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -358,11 +358,11 @@ def update( :return: An instance of LROPoller that returns Cluster or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.vmware.models.Cluster] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.avs.models.Cluster] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.vmware.models.Cluster]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.avs.models.Cluster]] :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ raw_result = self._update_initial( resource_group_name=resource_group_name, @@ -450,7 +450,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_locations_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_locations_operations.py similarity index 96% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_locations_operations.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_locations_operations.py index 1e270278229c..644da51d118b 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_locations_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_locations_operations.py @@ -50,10 +50,10 @@ def check_trial_availability( :param operation_config: :ref:`Operation configuration overrides`. :return: Trial or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.vmware.models.Trial or + :rtype: ~azure.mgmt.avs.models.Trial or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ # Construct URL url = self.check_trial_availability.metadata['url'] @@ -107,10 +107,10 @@ def check_quota_availability( :param operation_config: :ref:`Operation configuration overrides`. :return: Quota or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.vmware.models.Quota or + :rtype: ~azure.mgmt.avs.models.Quota or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ # Construct URL url = self.check_quota_availability.metadata['url'] diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_operations.py similarity index 95% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_operations.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_operations.py index 66cc66d2716f..c620297e1ee1 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_operations.py @@ -49,9 +49,9 @@ def list( overrides`. :return: An iterator like instance of Operation :rtype: - ~azure.mgmt.vmware.models.OperationPaged[~azure.mgmt.vmware.models.Operation] + ~azure.mgmt.avs.models.OperationPaged[~azure.mgmt.avs.models.Operation] :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ def prepare_request(next_link=None): if not next_link: diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_private_clouds_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_private_clouds_operations.py similarity index 95% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_private_clouds_operations.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_private_clouds_operations.py index dce319ce43f1..e7c3b0936b48 100644 --- a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/operations/_private_clouds_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_private_clouds_operations.py @@ -54,9 +54,9 @@ def list( overrides`. :return: An iterator like instance of PrivateCloud :rtype: - ~azure.mgmt.vmware.models.PrivateCloudPaged[~azure.mgmt.vmware.models.PrivateCloud] + ~azure.mgmt.avs.models.PrivateCloudPaged[~azure.mgmt.avs.models.PrivateCloud] :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ def prepare_request(next_link=None): if not next_link: @@ -120,9 +120,9 @@ def list_in_subscription( overrides`. :return: An iterator like instance of PrivateCloud :rtype: - ~azure.mgmt.vmware.models.PrivateCloudPaged[~azure.mgmt.vmware.models.PrivateCloud] + ~azure.mgmt.avs.models.PrivateCloudPaged[~azure.mgmt.avs.models.PrivateCloud] :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ def prepare_request(next_link=None): if not next_link: @@ -189,10 +189,10 @@ def get( :param operation_config: :ref:`Operation configuration overrides`. :return: PrivateCloud or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.vmware.models.PrivateCloud or + :rtype: ~azure.mgmt.avs.models.PrivateCloud or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ # Construct URL url = self.get.metadata['url'] @@ -295,7 +295,7 @@ def create_or_update( :param private_cloud_name: Name of the private cloud :type private_cloud_name: str :param private_cloud: The private cloud - :type private_cloud: ~azure.mgmt.vmware.models.PrivateCloud + :type private_cloud: ~azure.mgmt.avs.models.PrivateCloud :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -304,11 +304,11 @@ def create_or_update( :return: An instance of LROPoller that returns PrivateCloud or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.vmware.models.PrivateCloud] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.avs.models.PrivateCloud] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.vmware.models.PrivateCloud]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.avs.models.PrivateCloud]] :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -397,7 +397,7 @@ def update( :param private_cloud_name: Name of the private cloud :type private_cloud_name: str :param private_cloud: The private cloud - :type private_cloud: ~azure.mgmt.vmware.models.PrivateCloud + :type private_cloud: ~azure.mgmt.avs.models.PrivateCloud :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -406,11 +406,11 @@ def update( :return: An instance of LROPoller that returns PrivateCloud or ClientRawResponse if raw==True :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.vmware.models.PrivateCloud] + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.avs.models.PrivateCloud] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.vmware.models.PrivateCloud]] + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.avs.models.PrivateCloud]] :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ raw_result = self._update_initial( resource_group_name=resource_group_name, @@ -494,7 +494,7 @@ def delete( :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ raw_result = self._delete_initial( resource_group_name=resource_group_name, @@ -533,10 +533,10 @@ def list_admin_credentials( :param operation_config: :ref:`Operation configuration overrides`. :return: AdminCredentials or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.vmware.models.AdminCredentials or + :rtype: ~azure.mgmt.avs.models.AdminCredentials or ~msrest.pipeline.ClientRawResponse :raises: - :class:`ApiErrorException` + :class:`ApiErrorException` """ # Construct URL url = self.list_admin_credentials.metadata['url'] diff --git a/sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/version.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/version.py similarity index 100% rename from sdk/compute/azure-mgmt-vmware/azure/mgmt/vmware/version.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/version.py diff --git a/sdk/compute/azure-mgmt-avs/dev_requirements.txt b/sdk/compute/azure-mgmt-avs/dev_requirements.txt new file mode 100644 index 000000000000..6ccb7f031ddd --- /dev/null +++ b/sdk/compute/azure-mgmt-avs/dev_requirements.txt @@ -0,0 +1 @@ +-e ../../../tools/azure-sdk-tools diff --git a/sdk/compute/azure-mgmt-avs/sdk_packaging.toml b/sdk/compute/azure-mgmt-avs/sdk_packaging.toml new file mode 100644 index 000000000000..e4d8a8f552d5 --- /dev/null +++ b/sdk/compute/azure-mgmt-avs/sdk_packaging.toml @@ -0,0 +1,5 @@ +[packaging] +package_name = "azure-mgmt-avs" +package_pprint_name = "Azure VMWare Solution Management" +package_doc_id = "azurevmwaresolution" +is_stable = false diff --git a/sdk/compute/azure-mgmt-vmware/setup.cfg b/sdk/compute/azure-mgmt-avs/setup.cfg similarity index 100% rename from sdk/compute/azure-mgmt-vmware/setup.cfg rename to sdk/compute/azure-mgmt-avs/setup.cfg diff --git a/sdk/compute/azure-mgmt-vmware/setup.py b/sdk/compute/azure-mgmt-avs/setup.py similarity index 97% rename from sdk/compute/azure-mgmt-vmware/setup.py rename to sdk/compute/azure-mgmt-avs/setup.py index 8b8ae1e7b64e..6cd5349e19b3 100644 --- a/sdk/compute/azure-mgmt-vmware/setup.py +++ b/sdk/compute/azure-mgmt-avs/setup.py @@ -12,8 +12,8 @@ from setuptools import find_packages, setup # Change the PACKAGE_NAME only to change folder and different name -PACKAGE_NAME = "azure-mgmt-vmware" -PACKAGE_PPRINT_NAME = "Vmware Management" +PACKAGE_NAME = "azure-mgmt-avs" +PACKAGE_PPRINT_NAME = "Azure VMWare Solution Management" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') diff --git a/sdk/compute/azure-mgmt-vmware/dev_requirements.txt b/sdk/compute/azure-mgmt-vmware/dev_requirements.txt deleted file mode 100644 index 2980bbe150be..000000000000 --- a/sdk/compute/azure-mgmt-vmware/dev_requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ --e ../../../tools/azure-sdk-tools --e ../../authorization/azure-mgmt-authorization --e ../../storage/azure-mgmt-storage --e ../../network/azure-mgmt-network \ No newline at end of file diff --git a/sdk/compute/azure-mgmt-vmware/sdk_packaging.toml b/sdk/compute/azure-mgmt-vmware/sdk_packaging.toml deleted file mode 100644 index a29df275ee11..000000000000 --- a/sdk/compute/azure-mgmt-vmware/sdk_packaging.toml +++ /dev/null @@ -1,5 +0,0 @@ -[packaging] -package_name = "azure-mgmt-vmware" -package_pprint_name = "Vmware Management" -package_doc_id = "vmware" -is_stable = false From 886a515c79ef05b29d9087b13f9a6b47a07b2422 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot Date: Thu, 18 Jun 2020 01:57:55 +0000 Subject: [PATCH 4/6] Packaging update of azure-mgmt-avs --- sdk/compute/azure-mgmt-avs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/compute/azure-mgmt-avs/README.md b/sdk/compute/azure-mgmt-avs/README.md index d4f32600a2de..5c957cee4e9d 100644 --- a/sdk/compute/azure-mgmt-avs/README.md +++ b/sdk/compute/azure-mgmt-avs/README.md @@ -7,7 +7,7 @@ For a more complete view of Azure libraries, see the [Github repo](https://githu # Usage -For code examples, see [Azure VMWare Solution Management](https://docs.microsoft.com/python/api/overview/azure/) +For code examples, see [Azure VMWare Solution Management](https://docs.microsoft.com/python/api/overview/azure/azurevmwaresolution) on docs.microsoft.com. From b4619f32d84da648163bda95457606eee75fb63c Mon Sep 17 00:00:00 2001 From: Shixun Guan Date: Thu, 18 Jun 2020 02:21:58 +0000 Subject: [PATCH 5/6] update pprint name --- sdk/compute/azure-mgmt-avs/README.md | 4 ++-- sdk/compute/azure-mgmt-avs/sdk_packaging.toml | 4 ++-- sdk/compute/azure-mgmt-avs/setup.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sdk/compute/azure-mgmt-avs/README.md b/sdk/compute/azure-mgmt-avs/README.md index 5c957cee4e9d..5f51c3ed85c5 100644 --- a/sdk/compute/azure-mgmt-avs/README.md +++ b/sdk/compute/azure-mgmt-avs/README.md @@ -1,13 +1,13 @@ # Microsoft Azure SDK for Python -This is the Microsoft Azure Azure VMWare Solution Management Client Library. +This is the Microsoft Azure VMWare Solution Management Client Library. This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) # Usage -For code examples, see [Azure VMWare Solution Management](https://docs.microsoft.com/python/api/overview/azure/azurevmwaresolution) +For code examples, see [VMWare Solution Management](https://docs.microsoft.com/python/api/overview/azure/) on docs.microsoft.com. diff --git a/sdk/compute/azure-mgmt-avs/sdk_packaging.toml b/sdk/compute/azure-mgmt-avs/sdk_packaging.toml index e4d8a8f552d5..eaf776a95ed7 100644 --- a/sdk/compute/azure-mgmt-avs/sdk_packaging.toml +++ b/sdk/compute/azure-mgmt-avs/sdk_packaging.toml @@ -1,5 +1,5 @@ [packaging] package_name = "azure-mgmt-avs" -package_pprint_name = "Azure VMWare Solution Management" -package_doc_id = "azurevmwaresolution" +package_pprint_name = "VMWare Solution Management" +package_doc_id = "" is_stable = false diff --git a/sdk/compute/azure-mgmt-avs/setup.py b/sdk/compute/azure-mgmt-avs/setup.py index 6cd5349e19b3..824ca7162ac6 100644 --- a/sdk/compute/azure-mgmt-avs/setup.py +++ b/sdk/compute/azure-mgmt-avs/setup.py @@ -13,7 +13,7 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-avs" -PACKAGE_PPRINT_NAME = "Azure VMWare Solution Management" +PACKAGE_PPRINT_NAME = "VMWare Solution Management" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/') From 3baee24abac9442697c198a52c8486dce23dc0ed Mon Sep 17 00:00:00 2001 From: Shixun Guan Date: Fri, 19 Jun 2020 01:18:54 +0000 Subject: [PATCH 6/6] change VMWare to VMware --- sdk/compute/azure-mgmt-avs/README.md | 4 ++-- sdk/compute/azure-mgmt-avs/sdk_packaging.toml | 2 +- sdk/compute/azure-mgmt-avs/setup.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/compute/azure-mgmt-avs/README.md b/sdk/compute/azure-mgmt-avs/README.md index 5f51c3ed85c5..c9b2ac35de7b 100644 --- a/sdk/compute/azure-mgmt-avs/README.md +++ b/sdk/compute/azure-mgmt-avs/README.md @@ -1,13 +1,13 @@ # Microsoft Azure SDK for Python -This is the Microsoft Azure VMWare Solution Management Client Library. +This is the Microsoft Azure VMware Solution Management Client Library. This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) # Usage -For code examples, see [VMWare Solution Management](https://docs.microsoft.com/python/api/overview/azure/) +For code examples, see [VMware Solution Management](https://docs.microsoft.com/python/api/overview/azure/) on docs.microsoft.com. diff --git a/sdk/compute/azure-mgmt-avs/sdk_packaging.toml b/sdk/compute/azure-mgmt-avs/sdk_packaging.toml index eaf776a95ed7..74dd3199c709 100644 --- a/sdk/compute/azure-mgmt-avs/sdk_packaging.toml +++ b/sdk/compute/azure-mgmt-avs/sdk_packaging.toml @@ -1,5 +1,5 @@ [packaging] package_name = "azure-mgmt-avs" -package_pprint_name = "VMWare Solution Management" +package_pprint_name = "VMware Solution Management" package_doc_id = "" is_stable = false diff --git a/sdk/compute/azure-mgmt-avs/setup.py b/sdk/compute/azure-mgmt-avs/setup.py index 824ca7162ac6..54bd45fcfcc4 100644 --- a/sdk/compute/azure-mgmt-avs/setup.py +++ b/sdk/compute/azure-mgmt-avs/setup.py @@ -13,7 +13,7 @@ # Change the PACKAGE_NAME only to change folder and different name PACKAGE_NAME = "azure-mgmt-avs" -PACKAGE_PPRINT_NAME = "VMWare Solution Management" +PACKAGE_PPRINT_NAME = "VMware Solution Management" # a-b-c => a/b/c package_folder_path = PACKAGE_NAME.replace('-', '/')