Skip to content

Commit c741a4f

Browse files
authored
[AutoPR compute/resource-manager] Dev/ccelik/dedicatedhostswagger (#6339)
* Generated from 4e21b51a1eb644bbed2b7d1d7016490b8d54cdf0 Update compute.json Documentation changes and marked required fields * Generated from 007443c407844b7e8d76bdb617fa2b1b21a26a04 Use min max * Generated from 124f9aa0504f60c88ea83ae34cd2404627c240b1 Removed availableVCpus
1 parent a27c006 commit c741a4f

File tree

4 files changed

+84
-127
lines changed

4 files changed

+84
-127
lines changed

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
from ._models_py3 import DedicatedHost
2828
from ._models_py3 import DedicatedHostAllocatableVM
2929
from ._models_py3 import DedicatedHostAvailableCapacity
30-
from ._models_py3 import DedicatedHostCapacity
3130
from ._models_py3 import DedicatedHostGroup
3231
from ._models_py3 import DedicatedHostGroupUpdate
3332
from ._models_py3 import DedicatedHostInstanceView
@@ -199,7 +198,6 @@
199198
from ._models import DedicatedHost
200199
from ._models import DedicatedHostAllocatableVM
201200
from ._models import DedicatedHostAvailableCapacity
202-
from ._models import DedicatedHostCapacity
203201
from ._models import DedicatedHostGroup
204202
from ._models import DedicatedHostGroupUpdate
205203
from ._models import DedicatedHostInstanceView
@@ -429,7 +427,6 @@
429427
'DedicatedHost',
430428
'DedicatedHostAllocatableVM',
431429
'DedicatedHostAvailableCapacity',
432-
'DedicatedHostCapacity',
433430
'DedicatedHostGroup',
434431
'DedicatedHostGroupUpdate',
435432
'DedicatedHostInstanceView',

sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/_models.py

Lines changed: 39 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -651,15 +651,16 @@ class DedicatedHost(Resource):
651651
:type location: str
652652
:param tags: Resource tags
653653
:type tags: dict[str, str]
654-
:param platform_fault_domain: Fault domain of the host within a group.
655-
Supported values 0,1,2.
654+
:param platform_fault_domain: Fault domain of the dedicated host within a
655+
dedicated host group.
656656
:type platform_fault_domain: int
657-
:param auto_replace_on_failure: Whether the host should be replaced
658-
automatically in case of a failure. The value is defaulted to true when
659-
not provided.
657+
:param auto_replace_on_failure: Specifies whether the dedicated host
658+
should be replaced automatically in case of a failure. The value is
659+
defaulted to 'true' when not provided.
660660
:type auto_replace_on_failure: bool
661661
:ivar host_id: A unique id generated and assigned to the dedicated host by
662-
the platform.
662+
the platform. <br><br> Does not change throughout the lifetime of the
663+
host.
663664
:vartype host_id: str
664665
:ivar virtual_machines: A list of references to all virtual machines in
665666
the Dedicated Host.
@@ -672,17 +673,17 @@ class DedicatedHost(Resource):
672673
include: 'None', 'Windows_Server_Hybrid', 'Windows_Server_Perpetual'
673674
:type license_type: str or
674675
~azure.mgmt.compute.v2019_03_01.models.DedicatedHostLicenseTypes
675-
:ivar provisioning_time: The date when the host was first created.
676+
:ivar provisioning_time: The date when the host was first provisioned.
676677
:vartype provisioning_time: datetime
677678
:ivar provisioning_state: The provisioning state, which only appears in
678679
the response.
679680
:vartype provisioning_state: str
680681
:ivar instance_view: The dedicated host instance view.
681682
:vartype instance_view:
682683
~azure.mgmt.compute.v2019_03_01.models.DedicatedHostInstanceView
683-
:param sku: Sku of the dedicated host for Hardware Generation and VM
684-
family, The only name is required to be set. See DedicatedHostSkuTypes for
685-
possible set of values.
684+
:param sku: Required. SKU of the dedicated host for Hardware Generation
685+
and VM family. Only name is required to be set. List Microsoft.Compute
686+
SKUs for a list of possible values.
686687
:type sku: ~azure.mgmt.compute.v2019_03_01.models.Sku
687688
"""
688689

@@ -691,11 +692,13 @@ class DedicatedHost(Resource):
691692
'name': {'readonly': True},
692693
'type': {'readonly': True},
693694
'location': {'required': True},
695+
'platform_fault_domain': {'maximum': 2, 'minimum': 0},
694696
'host_id': {'readonly': True},
695697
'virtual_machines': {'readonly': True},
696698
'provisioning_time': {'readonly': True},
697699
'provisioning_state': {'readonly': True},
698700
'instance_view': {'readonly': True},
701+
'sku': {'required': True},
699702
}
700703

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

766767
_attribute_map = {
767-
'available_vcpus': {'key': 'availableVCpus', 'type': 'float'},
768768
'allocatable_vms': {'key': 'allocatableVMs', 'type': '[DedicatedHostAllocatableVM]'},
769769
}
770770

771771
def __init__(self, **kwargs):
772772
super(DedicatedHostAvailableCapacity, self).__init__(**kwargs)
773-
self.available_vcpus = kwargs.get('available_vcpus', None)
774773
self.allocatable_vms = kwargs.get('allocatable_vms', None)
775774

776775

777-
class DedicatedHostCapacity(Model):
778-
"""Dedicated host total capacity.
779-
780-
:param total_cores: The total number of cores.
781-
:type total_cores: float
782-
:param total_vcpus: The total number of CPUs.
783-
:type total_vcpus: float
784-
"""
785-
786-
_attribute_map = {
787-
'total_cores': {'key': 'totalCores', 'type': 'float'},
788-
'total_vcpus': {'key': 'totalVCpus', 'type': 'float'},
789-
}
790-
791-
def __init__(self, **kwargs):
792-
super(DedicatedHostCapacity, self).__init__(**kwargs)
793-
self.total_cores = kwargs.get('total_cores', None)
794-
self.total_vcpus = kwargs.get('total_vcpus', None)
795-
796-
797776
class DedicatedHostGroup(Resource):
798777
"""Specifies information about the dedicated host group that the dedicated
799-
hosts should be assigned to. <br><br> Currently, a Dedicated host can only
800-
be added to Dedicated Host Group at creation time. An existing Dedicated
801-
Host cannot be added to a dedicated host group.
778+
hosts should be assigned to. <br><br> Currently, a dedicated host can only
779+
be added to a dedicated host group at creation time. An existing dedicated
780+
host cannot be added to another dedicated host group.
802781
803782
Variables are only populated by the server, and will be ignored when
804783
sending a request.
@@ -815,17 +794,17 @@ class DedicatedHostGroup(Resource):
815794
:type location: str
816795
:param tags: Resource tags
817796
:type tags: dict[str, str]
818-
:param platform_fault_domain_count: Number of fault domains that the host
819-
group can span. Supported values 1,2,3.
797+
:param platform_fault_domain_count: Required. Number of fault domains that
798+
the host group can span.
820799
:type platform_fault_domain_count: int
821800
:ivar hosts: A list of references to all dedicated hosts in the dedicated
822801
host group.
823802
:vartype hosts:
824803
list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly]
825804
:param zones: Availability Zone to use for this host group � only single
826805
zone is supported. The zone can be assigned only during creation. If not
827-
provided, the group supports all zones in the region. If provided, enforce
828-
each host in the group is in the same zone.
806+
provided, the group supports all zones in the region. If provided,
807+
enforces each host in the group to be in the same zone.
829808
:type zones: list[str]
830809
"""
831810

@@ -834,6 +813,7 @@ class DedicatedHostGroup(Resource):
834813
'name': {'readonly': True},
835814
'type': {'readonly': True},
836815
'location': {'required': True},
816+
'platform_fault_domain_count': {'required': True, 'maximum': 3, 'minimum': 1},
837817
'hosts': {'readonly': True},
838818
}
839819

@@ -862,23 +842,26 @@ class DedicatedHostGroupUpdate(UpdateResource):
862842
Variables are only populated by the server, and will be ignored when
863843
sending a request.
864844
845+
All required parameters must be populated in order to send to Azure.
846+
865847
:param tags: Resource tags
866848
:type tags: dict[str, str]
867-
:param platform_fault_domain_count: Number of fault domains that the host
868-
group can span. Supported values 1,2,3.
849+
:param platform_fault_domain_count: Required. Number of fault domains that
850+
the host group can span.
869851
:type platform_fault_domain_count: int
870852
:ivar hosts: A list of references to all dedicated hosts in the dedicated
871853
host group.
872854
:vartype hosts:
873855
list[~azure.mgmt.compute.v2019_03_01.models.SubResourceReadOnly]
874856
:param zones: Availability Zone to use for this host group � only single
875857
zone is supported. The zone can be assigned only during creation. If not
876-
provided, the group supports all zones in the region. If provided, enforce
877-
each host in the group is in the same zone.
858+
provided, the group supports all zones in the region. If provided,
859+
enforces each host in the group to be in the same zone.
878860
:type zones: list[str]
879861
"""
880862

881863
_validation = {
864+
'platform_fault_domain_count': {'required': True, 'maximum': 3, 'minimum': 1},
882865
'hosts': {'readonly': True},
883866
}
884867

@@ -902,12 +885,9 @@ class DedicatedHostInstanceView(Model):
902885
Variables are only populated by the server, and will be ignored when
903886
sending a request.
904887
905-
:ivar asset_id: Specifies the unique of the dedicated physical machine on
906-
which the dedicated host resides.
888+
:ivar asset_id: Specifies the unique id of the dedicated physical machine
889+
on which the dedicated host resides.
907890
:vartype asset_id: str
908-
:param capacity: The total capacity of the dedicated host.
909-
:type capacity:
910-
~azure.mgmt.compute.v2019_03_01.models.DedicatedHostCapacity
911891
:param available_capacity: Unutilized capacity of the dedicated host.
912892
:type available_capacity:
913893
~azure.mgmt.compute.v2019_03_01.models.DedicatedHostAvailableCapacity
@@ -922,15 +902,13 @@ class DedicatedHostInstanceView(Model):
922902

923903
_attribute_map = {
924904
'asset_id': {'key': 'assetId', 'type': 'str'},
925-
'capacity': {'key': 'capacity', 'type': 'DedicatedHostCapacity'},
926905
'available_capacity': {'key': 'availableCapacity', 'type': 'DedicatedHostAvailableCapacity'},
927906
'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'},
928907
}
929908

930909
def __init__(self, **kwargs):
931910
super(DedicatedHostInstanceView, self).__init__(**kwargs)
932911
self.asset_id = None
933-
self.capacity = kwargs.get('capacity', None)
934912
self.available_capacity = kwargs.get('available_capacity', None)
935913
self.statuses = kwargs.get('statuses', None)
936914

@@ -944,15 +922,16 @@ class DedicatedHostUpdate(UpdateResource):
944922
945923
:param tags: Resource tags
946924
:type tags: dict[str, str]
947-
:param platform_fault_domain: Fault domain of the host within a group.
948-
Supported values 0,1,2.
925+
:param platform_fault_domain: Fault domain of the dedicated host within a
926+
dedicated host group.
949927
:type platform_fault_domain: int
950-
:param auto_replace_on_failure: Whether the host should be replaced
951-
automatically in case of a failure. The value is defaulted to true when
952-
not provided.
928+
:param auto_replace_on_failure: Specifies whether the dedicated host
929+
should be replaced automatically in case of a failure. The value is
930+
defaulted to 'true' when not provided.
953931
:type auto_replace_on_failure: bool
954932
:ivar host_id: A unique id generated and assigned to the dedicated host by
955-
the platform.
933+
the platform. <br><br> Does not change throughout the lifetime of the
934+
host.
956935
:vartype host_id: str
957936
:ivar virtual_machines: A list of references to all virtual machines in
958937
the Dedicated Host.
@@ -965,7 +944,7 @@ class DedicatedHostUpdate(UpdateResource):
965944
include: 'None', 'Windows_Server_Hybrid', 'Windows_Server_Perpetual'
966945
:type license_type: str or
967946
~azure.mgmt.compute.v2019_03_01.models.DedicatedHostLicenseTypes
968-
:ivar provisioning_time: The date when the host was first created.
947+
:ivar provisioning_time: The date when the host was first provisioned.
969948
:vartype provisioning_time: datetime
970949
:ivar provisioning_state: The provisioning state, which only appears in
971950
the response.
@@ -976,6 +955,7 @@ class DedicatedHostUpdate(UpdateResource):
976955
"""
977956

978957
_validation = {
958+
'platform_fault_domain': {'maximum': 2, 'minimum': 0},
979959
'host_id': {'readonly': True},
980960
'virtual_machines': {'readonly': True},
981961
'provisioning_time': {'readonly': True},

0 commit comments

Comments
 (0)