Skip to content

Commit 36f0ea9

Browse files
authored
Merge branch 'main' into managed-gpu2
2 parents 4b4f6d0 + fb5c19f commit 36f0ea9

9 files changed

Lines changed: 203 additions & 6 deletions

File tree

src/aks-preview/HISTORY.rst

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

1212
Pending
1313
+++++++
14+
15+
19.0.0b28
16+
+++++++
1417
* Fix `match_condition` kwarg leaking to HTTP transport by overriding `put_mc` and `add_agentpool` to pass `if_match` / `if_none_match` directly to the vendored SDK. This change fixes the compatibility issue as azure-cli/acs module adopts TypeSpec emitted SDKs while azure-cli-extensions/aks-preview still uses the autorest emitted SDK.
1518
+ `az aks list-vm-skus`: New command to list available VM SKUs for AKS clusters in a given region.
1619
* `az aks create/update`: Add `--enable-service-account-image-pull`, `--disable-service-account-image-pull`, and `--service-account-image-pull-default-managed-identity-id` parameters to manage service account based image pull settings.
1720
* `az aks list-vm-skus`: New command to list available VM SKUs for AKS clusters in a given region.
1821
* Add managed GPU enablement option to node pool property in `az aks nodepool add` and `az aks nodepool update`.
22+
* `az aks namespace update`: Fix location should use existing namespace location.
1923
* Add MIG (Multi-Instance GPU) strategy option to node pool property in `az aks nodepool add` and `az aks nodepool update`.
2024

2125
19.0.0b27

src/aks-preview/azext_aks_preview/managednamespace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def aks_managed_namespace_update(cmd, client, raw_parameters, headers, existedNa
201201
namespace_name = raw_parameters.get("name")
202202

203203
namespace_config = updateNamespace(cmd, raw_parameters, existedNamespace)
204-
namespace_config.location = get_cluster_location(cmd, resource_group_name, cluster_name)
204+
namespace_config.location = existedNamespace.location
205205

206206
return sdk_no_wait(
207207
no_wait,

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

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,52 @@ def test_update_managed_namespace_with_invalid_delete_policy(self, mock_get_clie
287287
ns.aks_managed_namespace_update(cmd, None, raw_parameters, None, None, False)
288288
self.assertIn(err, str(cm.exception))
289289

290+
def test_update_managed_namespace_sets_location_from_existing_namespace(self, mock_get_client):
291+
register_aks_preview_resource_type()
292+
cli_ctx = MockCLI()
293+
cmd = MockCmd(cli_ctx)
294+
295+
mock_client = Mock()
296+
297+
existing_ns = Mock()
298+
existing_ns.name = "test_managed_namespace"
299+
existing_ns.location = "westus2"
300+
existing_ns.properties.default_resource_quota.cpu_request = "300m"
301+
existing_ns.properties.default_resource_quota.cpu_limit = "500m"
302+
existing_ns.properties.default_resource_quota.memory_request = "1Gi"
303+
existing_ns.properties.default_resource_quota.memory_limit = "2Gi"
304+
existing_ns.properties.default_network_policy.ingress = "DenyAll"
305+
existing_ns.properties.default_network_policy.egress = "AllowAll"
306+
existing_ns.properties.adoption_policy = "Never"
307+
existing_ns.properties.delete_policy = "Keep"
308+
309+
raw_parameters = {
310+
"resource_group_name": "test_rg",
311+
"cluster_name": "test_cluster",
312+
"name": "test_managed_namespace",
313+
"tags": {},
314+
"labels": None,
315+
"annotations": ["a=c"],
316+
"cpu_request": None,
317+
"cpu_limit": None,
318+
"memory_request": None,
319+
"memory_limit": None,
320+
"ingress_policy": None,
321+
"egress_policy": None,
322+
"adoption_policy": None,
323+
"delete_policy": None,
324+
}
325+
326+
ns.aks_managed_namespace_update(cmd, mock_client, raw_parameters, None, existing_ns, False)
327+
328+
# The namespace passed to begin_create_or_update should carry the existing location
329+
call_args = mock_client.begin_create_or_update.call_args
330+
namespace_config = call_args[0][3] # 4th positional arg
331+
self.assertEqual(namespace_config.location, "westus2")
332+
333+
# No managed cluster GET should be needed for the update path
334+
mock_get_client.assert_not_called()
335+
290336

291337
if __name__ == "__main__":
292338
unittest.main()

src/aks-preview/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from setuptools import find_packages, setup
1111

12-
VERSION = "19.0.0b27"
12+
VERSION = "19.0.0b28"
1313

1414
CLASSIFIERS = [
1515
"Development Status :: 4 - Beta",

src/aosm/HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
33
Release History
44
===============
5+
2.0.0b6
6+
++++++++
7+
* Updating genson dependency to 1.3.0 to fix update/install issues with azure cli version 2.84.0.
8+
* This version requires a minimum of 2.78.0 Azure core CLI. See install instructions: https://github.com/MicrosoftDocs/azure-docs-cli/blob/main/docs-ref-conceptual/Latest-version/install-azure-cli.md
9+
510
2.0.0b5
611
++++++++
712
* Remove `__import__('pkg_resources').declare_namespace(__name__)` from `vendored_sdks/azure_storagev2/__init__.py` to fix the namespace package issue.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"azext.isPreview": true,
3-
"azext.minCliCoreVersion": "2.70.0"
3+
"azext.minCliCoreVersion": "2.78.0"
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# --------------------------------------------------------------------------------------------
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# Licensed under the MIT License. See License.txt in the project root for license information.
4-
# --------------------------------------------------------------------------------------------
4+
# --------------------------------------------------------------------------------------------

src/aosm/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# Confirm this is the right version number you want and it matches your
1919
# HISTORY.rst entry.
20-
VERSION = "2.0.0b5"
20+
VERSION = "2.0.0b6"
2121

2222

2323
# The full list of classifiers is available at
@@ -36,7 +36,7 @@
3636
DEPENDENCIES = [
3737
"oras==0.1.30",
3838
"jinja2==3.1.6",
39-
"genson==1.2.2",
39+
"genson==1.3.0",
4040
"ruamel.yaml==0.18.6",
4141
]
4242

src/index.json

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18045,6 +18045,49 @@
1804518045
"version": "19.0.0b27"
1804618046
},
1804718047
"sha256Digest": "85e78f0f78a6b367b04be226ab0e1eef296e88f422f5f992c694db34c2212c18"
18048+
},
18049+
{
18050+
"downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aks_preview-19.0.0b28-py2.py3-none-any.whl",
18051+
"filename": "aks_preview-19.0.0b28-py2.py3-none-any.whl",
18052+
"metadata": {
18053+
"azext.isPreview": true,
18054+
"azext.minCliCoreVersion": "2.73.0",
18055+
"classifiers": [
18056+
"Development Status :: 4 - Beta",
18057+
"Intended Audience :: Developers",
18058+
"Intended Audience :: System Administrators",
18059+
"Programming Language :: Python",
18060+
"Programming Language :: Python :: 3",
18061+
"Programming Language :: Python :: 3.6",
18062+
"Programming Language :: Python :: 3.7",
18063+
"Programming Language :: Python :: 3.8",
18064+
"License :: OSI Approved :: MIT License"
18065+
],
18066+
"extensions": {
18067+
"python.details": {
18068+
"contacts": [
18069+
{
18070+
"email": "azpycli@microsoft.com",
18071+
"name": "Microsoft Corporation",
18072+
"role": "author"
18073+
}
18074+
],
18075+
"document_names": {
18076+
"description": "DESCRIPTION.rst"
18077+
},
18078+
"project_urls": {
18079+
"Home": "https://github.com/Azure/azure-cli-extensions/tree/main/src/aks-preview"
18080+
}
18081+
}
18082+
},
18083+
"generator": "bdist_wheel (0.30.0)",
18084+
"license": "MIT",
18085+
"metadata_version": "2.0",
18086+
"name": "aks-preview",
18087+
"summary": "Provides a preview for upcoming AKS features",
18088+
"version": "19.0.0b28"
18089+
},
18090+
"sha256Digest": "0add7b23459a628a40238ed303059561e3294dfeb70887af0e783f3cf01e2d6e"
1804818091
}
1804918092
],
1805018093
"aksarc": [
@@ -22024,6 +22067,63 @@
2202422067
"version": "2.0.0b5"
2202522068
},
2202622069
"sha256Digest": "4115f3d7954614bdeec68001f6f95d2608db3c17ad2215f86d237d0642ebd8e3"
22070+
},
22071+
{
22072+
"downloadUrl": "https://azcliprod.blob.core.windows.net/cli-extensions/aosm-2.0.0b6-py3-none-any.whl",
22073+
"filename": "aosm-2.0.0b6-py3-none-any.whl",
22074+
"metadata": {
22075+
"azext.isPreview": true,
22076+
"azext.minCliCoreVersion": "2.78.0",
22077+
"classifiers": [
22078+
"Development Status :: 4 - Beta",
22079+
"Intended Audience :: Developers",
22080+
"Intended Audience :: System Administrators",
22081+
"Programming Language :: Python",
22082+
"Programming Language :: Python :: 3",
22083+
"Programming Language :: Python :: 3.7",
22084+
"Programming Language :: Python :: 3.8",
22085+
"License :: OSI Approved :: MIT License"
22086+
],
22087+
"extensions": {
22088+
"python.details": {
22089+
"contacts": [
22090+
{
22091+
"email": "azpycli@microsoft.com",
22092+
"name": "Microsoft Corporation",
22093+
"role": "author"
22094+
}
22095+
],
22096+
"document_names": {
22097+
"description": "DESCRIPTION.rst"
22098+
},
22099+
"project_urls": {
22100+
"Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/aosm"
22101+
}
22102+
}
22103+
},
22104+
"extras": [],
22105+
"generator": "bdist_wheel (0.30.0)",
22106+
"license": "MIT",
22107+
"metadata_version": "2.0",
22108+
"name": "aosm",
22109+
"run_requires": [
22110+
{
22111+
"requires": [
22112+
"genson (==1.3.0)",
22113+
"genson==1.3.0",
22114+
"jinja2 (==3.1.6)",
22115+
"jinja2==3.1.6",
22116+
"oras (==0.1.30)",
22117+
"oras==0.1.30",
22118+
"ruamel.yaml (==0.18.6)",
22119+
"ruamel.yaml==0.18.6"
22120+
]
22121+
}
22122+
],
22123+
"summary": "Microsoft Azure Command-Line Tools Aosm Extension",
22124+
"version": "2.0.0b6"
22125+
},
22126+
"sha256Digest": "6be24263f6d15c425cfaedc6a436e464c027123f4725ec3b6c2ef038d426603a"
2202722127
}
2202822128
],
2202922129
"apic-extension": [
@@ -108115,6 +108215,48 @@
108115108215
"version": "1.12.3"
108116108216
},
108117108217
"sha256Digest": "82e15e31d8ebad4b2c829772cd5285175567fc2f9ecb4437385a1a94bf16bff6"
108218+
},
108219+
{
108220+
"downloadUrl": "https://hciarcvmsstorage.z13.web.core.windows.net/cli-extensions/stack_hci_vm-1.13.0-py3-none-any.whl",
108221+
"filename": "stack_hci_vm-1.13.0-py3-none-any.whl",
108222+
"metadata": {
108223+
"azext.minCliCoreVersion": "2.15.0",
108224+
"classifiers": [
108225+
"Development Status :: 4 - Beta",
108226+
"Intended Audience :: Developers",
108227+
"Intended Audience :: System Administrators",
108228+
"Programming Language :: Python",
108229+
"Programming Language :: Python :: 3",
108230+
"Programming Language :: Python :: 3.6",
108231+
"Programming Language :: Python :: 3.7",
108232+
"Programming Language :: Python :: 3.8",
108233+
"License :: OSI Approved :: MIT License"
108234+
],
108235+
"extensions": {
108236+
"python.details": {
108237+
"contacts": [
108238+
{
108239+
"email": "azpycli@microsoft.com",
108240+
"name": "Microsoft Corporation",
108241+
"role": "author"
108242+
}
108243+
],
108244+
"document_names": {
108245+
"description": "DESCRIPTION.rst"
108246+
},
108247+
"project_urls": {
108248+
"Home": "https://github.com/Azure/azure-cli-extensions/tree/master/src/stack-hci-vm"
108249+
}
108250+
}
108251+
},
108252+
"generator": "bdist_wheel (0.30.0)",
108253+
"license": "MIT",
108254+
"metadata_version": "2.0",
108255+
"name": "stack-hci-vm",
108256+
"summary": "Microsoft Azure Command-Line Tools Stack-HCi-VM Extension",
108257+
"version": "1.13.0"
108258+
},
108259+
"sha256Digest": "fc6289cbbfa24f7ddebe767852935707d18d056b622c83895e1939559a30228b"
108118108260
}
108119108261
],
108120108262
"standbypool": [

0 commit comments

Comments
 (0)