Skip to content

Commit 7abadd8

Browse files
authored
[AKS] clean up some dead code (#9768)
1 parent 907df21 commit 7abadd8

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

src/aks-preview/HISTORY.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ To release a new version, please select a new version number (usually plus 1 to
1111

1212
Pending
1313
+++++++
14+
* `az aks nodepool update`: clean up some useless code in the update managed gpu function.
1415
* `az aks machine add`: Add `--spot-max-price` flag support to set the max price (in US Dollars) you are willing to pay for spot instances on a machine.
1516
* `az aks machine add`: Add `--eviction-policy` flag support to set the eviction policy for a machine.
1617
* `az aks machine add`: Add `--enable-ultra-ssd` flag support to enable ultra ssd on a machine.

src/aks-preview/azext_aks_preview/agentpool_decorator.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,16 +1826,10 @@ def update_managed_gpu(self, agentpool: AgentPool) -> AgentPool:
18261826
agentpool.gpu_profile = self.models.GPUProfile() # pylint: disable=no-member
18271827
if agentpool.gpu_profile.nvidia is None:
18281828
agentpool.gpu_profile.nvidia = self.models.NvidiaGPUProfile() # pylint: disable=no-member
1829-
# Check if already set to the desired value to avoid API error
1830-
if agentpool.gpu_profile.nvidia.management_mode == CONST_GPU_MANAGEMENT_MODE_MANAGED:
1831-
return agentpool
18321829
agentpool.gpu_profile.nvidia.management_mode = CONST_GPU_MANAGEMENT_MODE_MANAGED
18331830
agentpool.gpu_profile.driver = CONST_GPU_DRIVER_INSTALL
18341831
else:
18351832
if agentpool.gpu_profile and agentpool.gpu_profile.nvidia:
1836-
# Check if already set to the desired value to avoid API error
1837-
if agentpool.gpu_profile.nvidia.management_mode == CONST_GPU_MANAGEMENT_MODE_UNMANAGED:
1838-
return agentpool
18391833
agentpool.gpu_profile.nvidia.management_mode = CONST_GPU_MANAGEMENT_MODE_UNMANAGED
18401834

18411835
return agentpool

0 commit comments

Comments
 (0)