Skip to content

Commit 35463fa

Browse files
authored
Merge branch 'main' into cdossa/fix-natgwv2-comma-separated
2 parents 290e215 + 9fe5585 commit 35463fa

45 files changed

Lines changed: 3022 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/aks-preview/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Pending
1616
+++++++
1717
* [Breaking Change] `az aks create/update`: Change `--nat-gateway-outbound-ips` and `--nat-gateway-outbound-ip-prefixes` to use comma-separated values, consistent with load balancer outbound IP parameters.
1818

19+
19.0.0b30
20+
+++++++
21+
* Add option `AzureContainerLinux` to `--os-sku` for `az aks create`, `az aks nodepool add`, and `az aks nodepool update`.
22+
1923
19.0.0b29
2024
+++++++
2125
* Add MIG (Multi-Instance GPU) strategy option to node pool property in `az aks nodepool add` and `az aks nodepool update`.

src/aks-preview/azext_aks_preview/_consts.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
CONST_OS_SKU_UBUNTU2404 = "Ubuntu2404"
4646
CONST_OS_SKU_AZURELINUXOSGUARD = "AzureLinuxOSGuard"
4747
CONST_OS_SKU_AZURELINUX3OSGUARD = "AzureLinux3OSGuard"
48+
CONST_OS_SKU_AZURECONTAINERLINUX = "AzureContainerLinux"
4849

4950
# vm set type
5051
CONST_VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets"

src/aks-preview/azext_aks_preview/_help.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
short-summary: The ID of a PPG.
280280
- name: --os-sku
281281
type: string
282-
short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, CBLMariner, AzureLinux, AzureLinux3, AzureLinuxOSGuard, AzureLinux3OSGuard, or Flatcar when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022, Windows2025, or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set.
282+
short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, CBLMariner, AzureLinux, AzureLinux3, AzureLinuxOSGuard, AzureLinux3OSGuard, AzureContainerLinux, or Flatcar when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022, Windows2025, or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set.
283283
- name: --enable-fips-image
284284
type: bool
285285
short-summary: Use FIPS-enabled OS on agent nodes.
@@ -2112,7 +2112,7 @@
21122112
short-summary: The OS Type. Linux or Windows. Windows not supported yet for "VirtualMachines" VM set type.
21132113
- name: --os-sku
21142114
type: string
2115-
short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, CBLMariner, AzureLinux, AzureLinux3, AzureLinuxOSGuard, AzureLinux3OSGuard, or Flatcar when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022, Windows2025, or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set.
2115+
short-summary: The os-sku of the agent node pool. Ubuntu, Ubuntu2204, Ubuntu2404, CBLMariner, AzureLinux, AzureLinux3, AzureLinuxOSGuard, AzureLinux3OSGuard, AzureContainerLinux, or Flatcar when os-type is Linux, default is Ubuntu if not set; Windows2019, Windows2022, Windows2025, or WindowsAnnual when os-type is Windows, the current default is Windows2022 if not set.
21162116
- name: --enable-fips-image
21172117
type: bool
21182118
short-summary: Use FIPS-enabled OS on agent nodes.

src/aks-preview/azext_aks_preview/_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
CONST_OS_SKU_MARINER,
103103
CONST_OS_SKU_AZURELINUXOSGUARD,
104104
CONST_OS_SKU_AZURELINUX3OSGUARD,
105+
CONST_OS_SKU_AZURECONTAINERLINUX,
105106
CONST_OS_SKU_UBUNTU,
106107
CONST_OS_SKU_UBUNTU2204,
107108
CONST_OS_SKU_UBUNTU2404,
@@ -302,6 +303,7 @@
302303
CONST_OS_SKU_UBUNTU2404,
303304
CONST_OS_SKU_AZURELINUXOSGUARD,
304305
CONST_OS_SKU_AZURELINUX3OSGUARD,
306+
CONST_OS_SKU_AZURECONTAINERLINUX,
305307
]
306308
node_os_skus_add = node_os_skus_create + [
307309
CONST_OS_SKU_WINDOWS2019,
@@ -318,6 +320,7 @@
318320
CONST_OS_SKU_UBUNTU2404,
319321
CONST_OS_SKU_AZURELINUXOSGUARD,
320322
CONST_OS_SKU_AZURELINUX3OSGUARD,
323+
CONST_OS_SKU_AZURECONTAINERLINUX,
321324
]
322325
scale_down_modes = [CONST_SCALE_DOWN_MODE_DELETE, CONST_SCALE_DOWN_MODE_DEALLOCATE]
323326
workload_runtimes = [

src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3360,6 +3360,101 @@ def test_aks_nodepool_add_with_ossku_azurelinux3(self, resource_group, resource_
33603360
self.cmd(
33613361
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
33623362

3363+
# live only because AzureContainerLinux RP changes have not rolled out yet,
3364+
# so recordings cannot be created and playback would fail.
3365+
@live_only()
3366+
@AllowLargeResponse()
3367+
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
3368+
def test_aks_nodepool_add_with_ossku_azurecontainerlinux(self, resource_group, resource_group_location):
3369+
aks_name = self.create_random_name('cliakstest', 16)
3370+
node_pool_name = self.create_random_name('c', 6)
3371+
node_pool_name_second = self.create_random_name('c', 6)
3372+
self.kwargs.update({
3373+
'resource_group': resource_group,
3374+
'name': aks_name,
3375+
'node_pool_name': node_pool_name,
3376+
'node_pool_name_second': node_pool_name_second,
3377+
'ssh_key_value': self.generate_ssh_keys()
3378+
})
3379+
3380+
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \
3381+
'--nodepool-name {node_pool_name} -c 1 ' \
3382+
'--ssh-key-value={ssh_key_value}'
3383+
self.cmd(create_cmd, checks=[
3384+
self.check('provisioningState', 'Succeeded'),
3385+
])
3386+
3387+
# nodepool add with AzureContainerLinux os-sku
3388+
self.cmd('aks nodepool add '
3389+
'--resource-group={resource_group} '
3390+
'--cluster-name={name} '
3391+
'--name={node_pool_name_second} '
3392+
'--node-vm-size Standard_D2s_v5 '
3393+
'--os-sku AzureContainerLinux '
3394+
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureContainerLinuxPreview',
3395+
checks=[
3396+
self.check('provisioningState', 'Succeeded'),
3397+
self.check('osSku', 'AzureContainerLinux'),
3398+
])
3399+
3400+
# delete
3401+
self.cmd(
3402+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
3403+
3404+
# live only because AzureContainerLinux RP changes have not rolled out yet,
3405+
# so recordings cannot be created and playback would fail.
3406+
@live_only()
3407+
@AllowLargeResponse()
3408+
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
3409+
def test_aks_nodepool_update_with_ossku_azurecontainerlinux(self, resource_group, resource_group_location):
3410+
aks_name = self.create_random_name('cliakstest', 16)
3411+
node_pool_name = self.create_random_name('c', 6)
3412+
node_pool_name_second = self.create_random_name('c', 6)
3413+
self.kwargs.update({
3414+
'resource_group': resource_group,
3415+
'name': aks_name,
3416+
'node_pool_name': node_pool_name,
3417+
'node_pool_name_second': node_pool_name_second,
3418+
'ssh_key_value': self.generate_ssh_keys()
3419+
})
3420+
3421+
create_cmd = 'aks create --resource-group={resource_group} --name={name} ' \
3422+
'--nodepool-name {node_pool_name} -c 1 ' \
3423+
'--ssh-key-value={ssh_key_value}'
3424+
self.cmd(create_cmd, checks=[
3425+
self.check('provisioningState', 'Succeeded'),
3426+
])
3427+
3428+
# add a second nodepool
3429+
self.cmd('aks nodepool add '
3430+
'--resource-group={resource_group} '
3431+
'--cluster-name={name} '
3432+
'--name={node_pool_name_second} '
3433+
'--node-vm-size Standard_D2s_v5 '
3434+
'--os-sku AzureLinux',
3435+
checks=[
3436+
self.check('provisioningState', 'Succeeded'),
3437+
self.check('osSku', 'AzureLinux'),
3438+
])
3439+
3440+
# nodepool update to AzureContainerLinux os-sku
3441+
self.cmd('aks nodepool update '
3442+
'--resource-group={resource_group} '
3443+
'--cluster-name={name} '
3444+
'--name={node_pool_name_second} '
3445+
'--os-sku AzureContainerLinux '
3446+
'--enable-secure-boot '
3447+
'--enable-vtpm '
3448+
'--aks-custom-headers AKSHTTPCustomFeatures=Microsoft.ContainerService/AzureContainerLinuxPreview',
3449+
checks=[
3450+
self.check('provisioningState', 'Succeeded'),
3451+
self.check('osSku', 'AzureContainerLinux'),
3452+
])
3453+
3454+
# delete
3455+
self.cmd(
3456+
'aks delete -g {resource_group} -n {name} --yes --no-wait', checks=[self.is_empty()])
3457+
33633458
@AllowLargeResponse()
33643459
@AKSCustomResourceGroupPreparer(random_name_length=17, name_prefix='clitest', location='eastus2euap')
33653460
def test_aks_nodepool_add_with_ossku_flatcar(self, resource_group, resource_group_location):

src/computelimit/HISTORY.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
1.0.0b1
7+
++++++
8+
* Initial release.
9+
* Add shared-limit commands (add, remove, show, list).
10+
* Add guest-subscription commands (add, remove, show, list).

src/computelimit/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Azure CLI Computelimit Extension #
2+
This is an extension to Azure CLI to manage Computelimit resources.
3+
4+
## How to use ##
5+
Install the Computelimit extension using the CLI command below
6+
7+
```
8+
az extension add --name computelimit
9+
```
10+
11+
### Included features ###
12+
There are 2 groups of compute limit operations that customers can perform on their host subscription
13+
14+
**Guest Subscription Operations:** These type of operations are to add/remove/get guest subscriptions that are added to the host subscription to shared compute limits.
15+
16+
**Shared Limit Operations:** These type of operations are to enable/disable/get compute limits that are enabled for sharing with the guest subscriptions.
17+
18+
#### Add a subscription as a guest to the host subscription. ####
19+
20+
```bash
21+
az computelimit guest-subscription add --location eastus --guest-subscription-id 11111111-1111-1111-1111-111111111111
22+
```
23+
24+
#### Remove a subscription as a guest to the host subscription. ####
25+
26+
```bash
27+
az computelimit guest-subscription remove --location eastus --guest-subscription-id 11111111-1111-1111-1111-111111111111
28+
```
29+
30+
#### Get a guest subscription added to the host subscription. ####
31+
32+
```bash
33+
az computelimit guest-subscription show --location eastus --guest-subscription-id 11111111-1111-1111-1111-111111111111
34+
```
35+
36+
#### List all guest subscriptions added to the host subscription. ####
37+
38+
```bash
39+
az computelimit guest-subscription list --location eastus
40+
```
41+
42+
#### Enable a compute limit to be shared by the host subscription with its guest subscriptions. ####
43+
44+
```bash
45+
az computelimit shared-limit add --location eastus --name StandardDSv3Family
46+
```
47+
48+
#### Disable sharing of a compute limit by the host subscription with its guest subscriptions. ####
49+
50+
```bash
51+
az computelimit shared-limit remove --location eastus --name StandardDSv3Family
52+
```
53+
54+
#### Get a compute limit shared by the host subscription with its guest subscriptions. ####
55+
56+
```bash
57+
az computelimit shared-limit show --location eastus --name StandardDSv3Family
58+
```
59+
60+
#### List all compute limits shared by the host subscription with its guest subscriptions. ####
61+
62+
```bash
63+
az computelimit shared-limit list --location eastus
64+
```
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
from azure.cli.core import AzCommandsLoader
9+
from azext_computelimit._help import helps # pylint: disable=unused-import
10+
11+
12+
class ComputelimitCommandsLoader(AzCommandsLoader):
13+
14+
def __init__(self, cli_ctx=None):
15+
from azure.cli.core.commands import CliCommandType
16+
custom_command_type = CliCommandType(
17+
operations_tmpl='azext_computelimit.custom#{}')
18+
super().__init__(cli_ctx=cli_ctx,
19+
custom_command_type=custom_command_type)
20+
21+
def load_command_table(self, args):
22+
from azext_computelimit.commands import load_command_table
23+
from azure.cli.core.aaz import load_aaz_command_table
24+
try:
25+
from . import aaz
26+
except ImportError:
27+
aaz = None
28+
if aaz:
29+
load_aaz_command_table(
30+
loader=self,
31+
aaz_pkg_name=aaz.__name__,
32+
args=args
33+
)
34+
load_command_table(self, args)
35+
return self.command_table
36+
37+
def load_arguments(self, command):
38+
from azext_computelimit._params import load_arguments
39+
load_arguments(self, command)
40+
41+
42+
COMMAND_LOADER_CLS = ComputelimitCommandsLoader
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: disable=line-too-long
9+
# pylint: disable=too-many-lines
10+
11+
from knack.help_files import helps # pylint: disable=unused-import
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: disable=too-many-lines
9+
# pylint: disable=too-many-statements
10+
11+
12+
def load_arguments(self, _): # pylint: disable=unused-argument
13+
pass

0 commit comments

Comments
 (0)