Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,21 @@
from msrest import Serializer, Deserializer

from ._configuration import AzureVMwareSolutionbyVirtustreamAPIConfiguration
from .operations import AzureVMwareSolutionbyVirtustreamAPIOperationsMixin
from .operations import Operations
from .operations import QuotaOperations
from .operations import PrivateCloudsOperations
from .operations import ClustersOperations
from . import models


class AzureVMwareSolutionbyVirtustreamAPI(SDKClient):
class AzureVMwareSolutionbyVirtustreamAPI(AzureVMwareSolutionbyVirtustreamAPIOperationsMixin, SDKClient):
"""Azure VMware Solution by Virtustream API

:ivar config: Configuration for client.
:vartype config: AzureVMwareSolutionbyVirtustreamAPIConfiguration

:ivar operations: Operations operations
:vartype operations: azure.mgmt.vmwarevirtustream.operations.Operations
:ivar quota: Quota operations
:vartype quota: azure.mgmt.vmwarevirtustream.operations.QuotaOperations
:ivar private_clouds: PrivateClouds operations
:vartype private_clouds: azure.mgmt.vmwarevirtustream.operations.PrivateCloudsOperations
:ivar clusters: Clusters operations
Expand All @@ -56,8 +54,6 @@ def __init__(

self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
self.quota = QuotaOperations(
self._client, self.config, self._serialize, self._deserialize)
self.private_clouds = PrivateCloudsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from ._models_py3 import OperationDisplay
from ._models_py3 import PrivateCloud
from ._models_py3 import PrivateCloudProperties
from ._models_py3 import QuotaGet
from ._models_py3 import Quota
from ._models_py3 import Resource
from ._models_py3 import TrackedResource
except (SyntaxError, ImportError):
Expand All @@ -42,13 +42,14 @@
from ._models import OperationDisplay
from ._models import PrivateCloud
from ._models import PrivateCloudProperties
from ._models import QuotaGet
from ._models import Quota
from ._models import Resource
from ._models import TrackedResource
from ._paged_models import ClusterPaged
from ._paged_models import OperationPaged
from ._paged_models import PrivateCloudPaged
from ._azure_vmware_solutionby_virtustream_api_enums import (
QuotaEnabled,
SslEnum,
PrivateCloudProvisioningState,
InternetEnum,
Expand All @@ -70,12 +71,13 @@
'OperationDisplay',
'PrivateCloud',
'PrivateCloudProperties',
'QuotaGet',
'Quota',
'Resource',
'TrackedResource',
'OperationPaged',
'PrivateCloudPaged',
'ClusterPaged',
'QuotaEnabled',
'SslEnum',
'PrivateCloudProvisioningState',
'InternetEnum',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
from enum import Enum


class QuotaEnabled(str, Enum):

enabled = "Enabled"
disabled = "Disabled"


class SslEnum(str, Enum):

enabled = "Enabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,29 +638,30 @@ def __init__(self, **kwargs):
self.nsxt_password = kwargs.get('nsxt_password', None)


class QuotaGet(Model):
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]
:ivar quota_enabled: Host quota is active for current subscription
:vartype quota_enabled: bool
:param quota_enabled: Host quota is active for current subscription.
Possible values include: 'Enabled', 'Disabled'
:type quota_enabled: str or
~azure.mgmt.vmwarevirtustream.models.QuotaEnabled
"""

_validation = {
'hosts_remaining': {'readonly': True},
'quota_enabled': {'readonly': True},
}

_attribute_map = {
'hosts_remaining': {'key': 'hostsRemaining', 'type': '{int}'},
'quota_enabled': {'key': 'quotaEnabled', 'type': 'bool'},
'quota_enabled': {'key': 'quotaEnabled', 'type': 'str'},
}

def __init__(self, **kwargs):
super(QuotaGet, self).__init__(**kwargs)
super(Quota, self).__init__(**kwargs)
self.hosts_remaining = None
self.quota_enabled = None
self.quota_enabled = kwargs.get('quota_enabled', None)
Original file line number Diff line number Diff line change
Expand Up @@ -638,29 +638,30 @@ def __init__(self, *, circuit=None, cluster=None, internet=None, identity_source
self.nsxt_password = nsxt_password


class QuotaGet(Model):
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]
:ivar quota_enabled: Host quota is active for current subscription
:vartype quota_enabled: bool
:param quota_enabled: Host quota is active for current subscription.
Possible values include: 'Enabled', 'Disabled'
:type quota_enabled: str or
~azure.mgmt.vmwarevirtustream.models.QuotaEnabled
"""

_validation = {
'hosts_remaining': {'readonly': True},
'quota_enabled': {'readonly': True},
}

_attribute_map = {
'hosts_remaining': {'key': 'hostsRemaining', 'type': '{int}'},
'quota_enabled': {'key': 'quotaEnabled', 'type': 'bool'},
'quota_enabled': {'key': 'quotaEnabled', 'type': 'str'},
}

def __init__(self, **kwargs) -> None:
super(QuotaGet, self).__init__(**kwargs)
def __init__(self, *, quota_enabled=None, **kwargs) -> None:
super(Quota, self).__init__(**kwargs)
self.hosts_remaining = None
self.quota_enabled = None
self.quota_enabled = quota_enabled
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
# --------------------------------------------------------------------------

from ._operations import Operations
from ._quota_operations import QuotaOperations
from ._private_clouds_operations import PrivateCloudsOperations
from ._clusters_operations import ClustersOperations
from ._azure_vmware_solutionby_virtustream_api_operations import AzureVMwareSolutionbyVirtustreamAPIOperationsMixin

__all__ = [
'Operations',
'QuotaOperations',
'PrivateCloudsOperations',
'ClustersOperations',
'AzureVMwareSolutionbyVirtustreamAPIOperationsMixin',
]
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,16 @@
# regenerated.
# --------------------------------------------------------------------------

import uuid
from msrest.pipeline import ClientRawResponse

from msrest.polling import LROPoller, NoPolling
from msrestazure.polling.arm_polling import ARMPolling
from .. import models
import uuid


class QuotaOperations(object):
"""QuotaOperations 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 by Virtustream 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
class AzureVMwareSolutionbyVirtustreamAPIOperationsMixin(object):

def get(
def check_quota_availability(
self, location, custom_headers=None, raw=False, **operation_config):
"""Return quota for subscription by region.

Expand All @@ -49,14 +29,14 @@ def get(
deserialized response
:param operation_config: :ref:`Operation configuration
overrides<msrest:optionsforoperations>`.
:return: QuotaGet or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.vmwarevirtustream.models.QuotaGet or
:return: Quota or ClientRawResponse if raw=true
:rtype: ~azure.mgmt.vmwarevirtustream.models.Quota or
~msrest.pipeline.ClientRawResponse
:raises:
:class:`ApiErrorException<azure.mgmt.vmwarevirtustream.models.ApiErrorException>`
"""
# Construct URL
url = self.get.metadata['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')
Expand Down Expand Up @@ -86,11 +66,11 @@ def get(

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('QuotaGet', response)
deserialized = self._deserialize('Quota', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized
get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareVirtustream/locations/{location}/checkQuotaAvailability'}
check_quota_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.VMwareVirtustream/locations/{location}/checkQuotaAvailability'}