diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index cbee2a5c87e..db09ab2f56d 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -13,6 +13,7 @@ Pending +++++++ * GA file, blob csi driver and snapshot controller. +* GA Azure Dedicated Host. 0.5.119 +++++++ diff --git a/src/aks-preview/azext_aks_preview/_params.py b/src/aks-preview/azext_aks_preview/_params.py index 5a895ff8594..07a7b04abdb 100644 --- a/src/aks-preview/azext_aks_preview/_params.py +++ b/src/aks-preview/azext_aks_preview/_params.py @@ -341,7 +341,7 @@ def load_arguments(self, _): c.argument('enable_node_restriction', action='store_true', is_preview=True, help="enable node restriction for cluster") c.argument('enable_cilium_dataplane', action='store_true', is_preview=True) # nodepool - c.argument('host_group_id', validator=validate_host_group_id, is_preview=True) + c.argument('host_group_id', validator=validate_host_group_id) c.argument('crg_id', validator=validate_crg_id, is_preview=True) # no validation for aks create because it already only supports Linux. c.argument('message_of_the_day') @@ -515,7 +515,7 @@ def load_arguments(self, _): c.argument('linux_os_config') c.argument('aks_custom_headers') # extensions - c.argument('host_group_id', validator=validate_host_group_id, is_preview=True) + c.argument('host_group_id', validator=validate_host_group_id) c.argument('crg_id', validator=validate_crg_id, is_preview=True) c.argument('message_of_the_day', validator=validate_message_of_the_day) c.argument('workload_runtime', arg_type=get_enum_type(workload_runtimes), default=CONST_WORKLOAD_RUNTIME_OCI_CONTAINER) diff --git a/src/aks-preview/azext_aks_preview/agentpool_decorator.py b/src/aks-preview/azext_aks_preview/agentpool_decorator.py index d3a9c569006..e2e5bc03bf4 100644 --- a/src/aks-preview/azext_aks_preview/agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/agentpool_decorator.py @@ -81,24 +81,6 @@ def get_zones(self) -> Union[List[str], None]: # read the original value passed by the command return self.raw_param.get("node_zones") - def get_host_group_id(self) -> Union[str, None]: - """Obtain the value of host_group_id. - - :return: string or None - """ - # read the original value passed by the command - host_group_id = self.raw_param.get("host_group_id") - # try to read the property value corresponding to the parameter from the `agentpool` object - if ( - self.agentpool and - self.agentpool.host_group_id is not None - ): - host_group_id = self.agentpool.host_group_id - - # this parameter does not need dynamic completion - # this parameter does not need validation - return host_group_id - def get_crg_id(self) -> Union[str, None]: """Obtain the value of crg_id. @@ -357,7 +339,6 @@ def set_up_preview_vm_properties(self, agentpool: AgentPool) -> AgentPool: """ self._ensure_agentpool(agentpool) - agentpool.host_group_id = self.context.get_host_group_id() agentpool.capacity_reservation_group_id = self.context.get_crg_id() return agentpool diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py index 1f5be78e186..e80d85a8ccc 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_agentpool_decorator.py @@ -98,20 +98,6 @@ def common_get_zones(self): ) self.assertEqual(ctx_2.get_zones(), "test_zones") - def common_get_host_group_id(self): - # default - ctx_1 = AKSPreviewAgentPoolContext( - self.cmd, - AKSAgentPoolParamDict({"host_group_id": None}), - self.models, - DecoratorMode.CREATE, - self.agentpool_decorator_mode, - ) - self.assertEqual(ctx_1.get_host_group_id(), None) - agentpool_1 = self.create_initialized_agentpool_instance(host_group_id="test_host_group_id") - ctx_1.attach_agentpool(agentpool_1) - self.assertEqual(ctx_1.get_host_group_id(), "test_host_group_id") - def common_get_crg_id(self): # default ctx_1 = AKSPreviewAgentPoolContext( @@ -271,9 +257,6 @@ def setUp(self): def test_get_zones(self): self.common_get_zones() - def test_get_host_group_id(self): - self.common_get_host_group_id() - def test_get_crg_id(self): self.common_get_crg_id() @@ -306,9 +289,6 @@ def setUp(self): def test_get_zones(self): self.common_get_zones() - def test_get_host_group_id(self): - self.common_get_host_group_id() - def test_get_crg_id(self): self.common_get_crg_id() @@ -373,7 +353,7 @@ def common_set_up_preview_vm_properties(self): dec_1 = AKSPreviewAgentPoolAddDecorator( self.cmd, self.client, - {"host_group_id": "test_host_group_id", "crg_id": "test_crg_id"}, + {"crg_id": "test_crg_id"}, self.resource_type, self.agentpool_decorator_mode, ) @@ -385,7 +365,7 @@ def common_set_up_preview_vm_properties(self): dec_agentpool_1 = dec_1.set_up_preview_vm_properties(agentpool_1) dec_agentpool_1 = self._restore_defaults_in_agentpool(dec_agentpool_1) ground_truth_agentpool_1 = self.create_initialized_agentpool_instance( - host_group_id="test_host_group_id", capacity_reservation_group_id="test_crg_id" + capacity_reservation_group_id="test_crg_id" ) self.assertEqual(dec_agentpool_1, ground_truth_agentpool_1)