Skip to content

Commit

Permalink
[AutoPR compute/resource-manager] Dev/ccelik/dedicatedhostswagger (#6339
Browse files Browse the repository at this point in the history
)

* Generated from 4e21b51a1eb644bbed2b7d1d7016490b8d54cdf0

Update compute.json

Documentation changes and marked required fields

* Generated from 007443c407844b7e8d76bdb617fa2b1b21a26a04

Use min max

* Generated from 124f9aa0504f60c88ea83ae34cd2404627c240b1

Removed availableVCpus
  • Loading branch information
AutorestCI authored and Zim Kalinowski committed Jul 20, 2019
1 parent a3ccbbf commit 44bbe97
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 127 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from ._models_py3 import DedicatedHost
from ._models_py3 import DedicatedHostAllocatableVM
from ._models_py3 import DedicatedHostAvailableCapacity
from ._models_py3 import DedicatedHostCapacity
from ._models_py3 import DedicatedHostGroup
from ._models_py3 import DedicatedHostGroupUpdate
from ._models_py3 import DedicatedHostInstanceView
Expand Down Expand Up @@ -199,7 +198,6 @@
from ._models import DedicatedHost
from ._models import DedicatedHostAllocatableVM
from ._models import DedicatedHostAvailableCapacity
from ._models import DedicatedHostCapacity
from ._models import DedicatedHostGroup
from ._models import DedicatedHostGroupUpdate
from ._models import DedicatedHostInstanceView
Expand Down Expand Up @@ -429,7 +427,6 @@
'DedicatedHost',
'DedicatedHostAllocatableVM',
'DedicatedHostAvailableCapacity',
'DedicatedHostCapacity',
'DedicatedHostGroup',
'DedicatedHostGroupUpdate',
'DedicatedHostInstanceView',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,15 +651,16 @@ class DedicatedHost(Resource):
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
:param platform_fault_domain: Fault domain of the host within a group.
Supported values 0,1,2.
:param platform_fault_domain: Fault domain of the dedicated host within a
dedicated host group.
:type platform_fault_domain: int
:param auto_replace_on_failure: Whether the host should be replaced
automatically in case of a failure. The value is defaulted to true when
not provided.
:param auto_replace_on_failure: Specifies whether the dedicated host
should be replaced automatically in case of a failure. The value is
defaulted to 'true' when not provided.
:type auto_replace_on_failure: bool
:ivar host_id: A unique id generated and assigned to the dedicated host by
the platform.
the platform. <br><br> Does not change throughout the lifetime of the
host.
:vartype host_id: str
:ivar virtual_machines: A list of references to all virtual machines in
the Dedicated Host.
Expand All @@ -672,17 +673,17 @@ class DedicatedHost(Resource):
include: 'None', 'Windows_Server_Hybrid', 'Windows_Server_Perpetual'
:type license_type: str or
~azure.mgmt.compute.v2019_03_01.models.DedicatedHostLicenseTypes
:ivar provisioning_time: The date when the host was first created.
:ivar provisioning_time: The date when the host was first provisioned.
:vartype provisioning_time: datetime
:ivar provisioning_state: The provisioning state, which only appears in
the response.
:vartype provisioning_state: str
:ivar instance_view: The dedicated host instance view.
:vartype instance_view:
~azure.mgmt.compute.v2019_03_01.models.DedicatedHostInstanceView
:param sku: Sku of the dedicated host for Hardware Generation and VM
family, The only name is required to be set. See DedicatedHostSkuTypes for
possible set of values.
:param sku: Required. SKU of the dedicated host for Hardware Generation
and VM family. Only name is required to be set. List Microsoft.Compute
SKUs for a list of possible values.
:type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku
"""

Expand All @@ -691,11 +692,13 @@ class DedicatedHost(Resource):
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'platform_fault_domain': {'maximum': 2, 'minimum': 0},
'host_id': {'readonly': True},
'virtual_machines': {'readonly': True},
'provisioning_time': {'readonly': True},
'provisioning_state': {'readonly': True},
'instance_view': {'readonly': True},
'sku': {'required': True},
}

_attribute_map = {
Expand Down Expand Up @@ -754,8 +757,6 @@ def __init__(self, **kwargs):
class DedicatedHostAvailableCapacity(Model):
"""Dedicated host unutilized capacity.
:param available_vcpus: The total number of CPUs.
:type available_vcpus: float
:param allocatable_vms: The unutilized capacity of the dedicated host
represented in terms of each VM size that is allowed to be deployed to the
dedicated host.
Expand All @@ -764,41 +765,19 @@ class DedicatedHostAvailableCapacity(Model):
"""

_attribute_map = {
'available_vcpus': {'key': 'availableVCpus', 'type': 'float'},
'allocatable_vms': {'key': 'allocatableVMs', 'type': '[DedicatedHostAllocatableVM]'},
}

def __init__(self, **kwargs):
super(DedicatedHostAvailableCapacity, self).__init__(**kwargs)
self.available_vcpus = kwargs.get('available_vcpus', None)
self.allocatable_vms = kwargs.get('allocatable_vms', None)


class DedicatedHostCapacity(Model):
"""Dedicated host total capacity.
:param total_cores: The total number of cores.
:type total_cores: float
:param total_vcpus: The total number of CPUs.
:type total_vcpus: float
"""

_attribute_map = {
'total_cores': {'key': 'totalCores', 'type': 'float'},
'total_vcpus': {'key': 'totalVCpus', 'type': 'float'},
}

def __init__(self, **kwargs):
super(DedicatedHostCapacity, self).__init__(**kwargs)
self.total_cores = kwargs.get('total_cores', None)
self.total_vcpus = kwargs.get('total_vcpus', None)


class DedicatedHostGroup(Resource):
"""Specifies information about the dedicated host group that the dedicated
hosts should be assigned to. <br><br> Currently, a Dedicated host can only
be added to Dedicated Host Group at creation time. An existing Dedicated
Host cannot be added to a dedicated host group.
hosts should be assigned to. <br><br> Currently, a dedicated host can only
be added to a dedicated host group at creation time. An existing dedicated
host cannot be added to another dedicated host group.
Variables are only populated by the server, and will be ignored when
sending a request.
Expand All @@ -815,17 +794,17 @@ class DedicatedHostGroup(Resource):
:type location: str
:param tags: Resource tags
:type tags: dict[str, str]
:param platform_fault_domain_count: Number of fault domains that the host
group can span. Supported values 1,2,3.
:param platform_fault_domain_count: Required. Number of fault domains that
the host group can span.
:type platform_fault_domain_count: int
:ivar hosts: A list of references to all dedicated hosts in the dedicated
host group.
:vartype hosts:
list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly]
:param zones: Availability Zone to use for this host group � only single
zone is supported. The zone can be assigned only during creation. If not
provided, the group supports all zones in the region. If provided, enforce
each host in the group is in the same zone.
provided, the group supports all zones in the region. If provided,
enforces each host in the group to be in the same zone.
:type zones: list[str]
"""

Expand All @@ -834,6 +813,7 @@ class DedicatedHostGroup(Resource):
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'platform_fault_domain_count': {'required': True, 'maximum': 3, 'minimum': 1},
'hosts': {'readonly': True},
}

Expand Down Expand Up @@ -862,23 +842,26 @@ class DedicatedHostGroupUpdate(UpdateResource):
Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.
:param tags: Resource tags
:type tags: dict[str, str]
:param platform_fault_domain_count: Number of fault domains that the host
group can span. Supported values 1,2,3.
:param platform_fault_domain_count: Required. Number of fault domains that
the host group can span.
:type platform_fault_domain_count: int
:ivar hosts: A list of references to all dedicated hosts in the dedicated
host group.
:vartype hosts:
list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly]
:param zones: Availability Zone to use for this host group � only single
zone is supported. The zone can be assigned only during creation. If not
provided, the group supports all zones in the region. If provided, enforce
each host in the group is in the same zone.
provided, the group supports all zones in the region. If provided,
enforces each host in the group to be in the same zone.
:type zones: list[str]
"""

_validation = {
'platform_fault_domain_count': {'required': True, 'maximum': 3, 'minimum': 1},
'hosts': {'readonly': True},
}

Expand All @@ -902,12 +885,9 @@ class DedicatedHostInstanceView(Model):
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar asset_id: Specifies the unique of the dedicated physical machine on
which the dedicated host resides.
:ivar asset_id: Specifies the unique id of the dedicated physical machine
on which the dedicated host resides.
:vartype asset_id: str
:param capacity: The total capacity of the dedicated host.
:type capacity:
~azure.mgmt.compute.v2019_03_01.models.DedicatedHostCapacity
:param available_capacity: Unutilized capacity of the dedicated host.
:type available_capacity:
~azure.mgmt.compute.v2019_03_01.models.DedicatedHostAvailableCapacity
Expand All @@ -922,15 +902,13 @@ class DedicatedHostInstanceView(Model):

_attribute_map = {
'asset_id': {'key': 'assetId', 'type': 'str'},
'capacity': {'key': 'capacity', 'type': 'DedicatedHostCapacity'},
'available_capacity': {'key': 'availableCapacity', 'type': 'DedicatedHostAvailableCapacity'},
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
}

def __init__(self, **kwargs):
super(DedicatedHostInstanceView, self).__init__(**kwargs)
self.asset_id = None
self.capacity = kwargs.get('capacity', None)
self.available_capacity = kwargs.get('available_capacity', None)
self.statuses = kwargs.get('statuses', None)

Expand All @@ -944,15 +922,16 @@ class DedicatedHostUpdate(UpdateResource):
:param tags: Resource tags
:type tags: dict[str, str]
:param platform_fault_domain: Fault domain of the host within a group.
Supported values 0,1,2.
:param platform_fault_domain: Fault domain of the dedicated host within a
dedicated host group.
:type platform_fault_domain: int
:param auto_replace_on_failure: Whether the host should be replaced
automatically in case of a failure. The value is defaulted to true when
not provided.
:param auto_replace_on_failure: Specifies whether the dedicated host
should be replaced automatically in case of a failure. The value is
defaulted to 'true' when not provided.
:type auto_replace_on_failure: bool
:ivar host_id: A unique id generated and assigned to the dedicated host by
the platform.
the platform. <br><br> Does not change throughout the lifetime of the
host.
:vartype host_id: str
:ivar virtual_machines: A list of references to all virtual machines in
the Dedicated Host.
Expand All @@ -965,7 +944,7 @@ class DedicatedHostUpdate(UpdateResource):
include: 'None', 'Windows_Server_Hybrid', 'Windows_Server_Perpetual'
:type license_type: str or
~azure.mgmt.compute.v2019_03_01.models.DedicatedHostLicenseTypes
:ivar provisioning_time: The date when the host was first created.
:ivar provisioning_time: The date when the host was first provisioned.
:vartype provisioning_time: datetime
:ivar provisioning_state: The provisioning state, which only appears in
the response.
Expand All @@ -976,6 +955,7 @@ class DedicatedHostUpdate(UpdateResource):
"""

_validation = {
'platform_fault_domain': {'maximum': 2, 'minimum': 0},
'host_id': {'readonly': True},
'virtual_machines': {'readonly': True},
'provisioning_time': {'readonly': True},
Expand Down
Loading

0 comments on commit 44bbe97

Please sign in to comment.