diff --git a/src/aks-preview/HISTORY.rst b/src/aks-preview/HISTORY.rst index a4b99484d4a..696f43fde91 100644 --- a/src/aks-preview/HISTORY.rst +++ b/src/aks-preview/HISTORY.rst @@ -17,6 +17,7 @@ Pending * Move Azure KeyVault KMS to GA. * Support disabling Azure KeyVault KMS. +* Update to use 2022-06-02-preview api version. 0.5.91 ++++++ diff --git a/src/aks-preview/azcli_aks_live_test/configs/cli_matrix_default.json b/src/aks-preview/azcli_aks_live_test/configs/cli_matrix_default.json index b6b4b2045d8..4e92de9dceb 100644 --- a/src/aks-preview/azcli_aks_live_test/configs/cli_matrix_default.json +++ b/src/aks-preview/azcli_aks_live_test/configs/cli_matrix_default.json @@ -10,13 +10,13 @@ ], "need feature registration": [ "test_aks_create_enable_encryption", - "test_aks_create_edge_zone", + "test_aks_create_edge_zone" + ], + "need namespace registration (AME)": [ "test_aks_create_with_monitoring_aad_auth_msi", "test_aks_create_with_monitoring_aad_auth_uai", "test_aks_enable_monitoring_with_aad_auth_msi", - "test_aks_enable_monitoring_with_aad_auth_uai", - "test_aks_create_with_defender", - "test_aks_update_with_defender" + "test_aks_enable_monitoring_with_aad_auth_uai" ] } } \ No newline at end of file diff --git a/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json index 99724539e38..1a9bc7674e5 100644 --- a/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json +++ b/src/aks-preview/azcli_aks_live_test/configs/ext_matrix_default.json @@ -16,10 +16,6 @@ "test_aks_create_with_pod_identity_enabled", "test_aks_create_using_azurecni_with_pod_identity_enabled", "test_aks_pod_identity_usage", - "test_aks_create_with_monitoring_aad_auth_msi", - "test_aks_create_with_monitoring_aad_auth_uai", - "test_aks_enable_monitoring_with_aad_auth_msi", - "test_aks_enable_monitoring_with_aad_auth_uai", "test_aks_nodepool_add_with_workload_runtime", "test_aks_nodepool_add_with_gpu_instance_profile", "test_aks_create_with_crg_id", @@ -29,9 +25,19 @@ "test_list_trustedaccess_roles", "test_aks_custom_ca_trust_flow", "test_aks_create_with_csi_driver_v2", - "test_aks_create_and_update_csi_driver_to_v2", + "test_aks_create_and_update_csi_driver_to_v2" + ], + "toggle": [ "test_aks_create_with_azurekeyvaultkms_private_key_vault", - "test_aks_update_with_azurekeyvaultkms_private_key_vault" + "test_aks_update_with_azurekeyvaultkms_private_key_vault", + "test_aks_create_with_azurekeyvaultkms_public_key_vault", + "test_aks_create_with_azurekeyvaultkms_private_cluster_v1_private_key_vault" + ], + "need namespace registration (AME)": [ + "test_aks_create_with_monitoring_aad_auth_msi", + "test_aks_create_with_monitoring_aad_auth_uai", + "test_aks_enable_monitoring_with_aad_auth_msi", + "test_aks_enable_monitoring_with_aad_auth_uai" ] } } \ No newline at end of file diff --git a/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_list_trustedaccess_roles.yaml b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_list_trustedaccess_roles.yaml new file mode 100644 index 00000000000..709470fd682 --- /dev/null +++ b/src/aks-preview/azext_aks_preview/tests/latest/recordings/test_list_trustedaccess_roles.yaml @@ -0,0 +1,117 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - aks trustedaccess role list + Connection: + - keep-alive + ParameterSetName: + - -l + User-Agent: + - AZURECLI/2.38.0 azsdk-python-azure-mgmt-containerservice/20.0.0b Python/3.8.10 + (Linux-5.15.0-1014-azure-x86_64-with-glibc2.29) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.ContainerService/locations/eastus2euap/trustedAccessRoles?api-version=2022-06-02-preview + response: + body: + string: "{\n \"value\": [\n {\n \"sourceResourceType\": \"Microsoft.Compute/virtualMachineScaleSets\",\n + \ \"name\": \"test-node-reader\",\n \"rules\": [\n {\n \"verbs\": + [\n \"list\"\n ],\n \"apiGroups\": [\n \"\"\n ],\n + \ \"resources\": [\n \"nodes\"\n ]\n }\n ]\n },\n + \ {\n \"sourceResourceType\": \"Microsoft.Compute/virtualMachineScaleSets\",\n + \ \"name\": \"test-pod-reader\",\n \"rules\": [\n {\n \"verbs\": + [\n \"list\"\n ],\n \"apiGroups\": [\n \"\"\n ],\n + \ \"resources\": [\n \"pods\"\n ]\n }\n ]\n },\n {\n + \ \"sourceResourceType\": \"Microsoft.Compute/virtualMachineScaleSets\",\n + \ \"name\": \"test-admin\",\n \"rules\": [\n {\n \"verbs\": + [\n \"*\"\n ],\n \"apiGroups\": [\n \"\"\n ],\n + \ \"resources\": [\n \"*\"\n ]\n }\n ]\n },\n {\n + \ \"sourceResourceType\": \"Microsoft.DataProtection/BackupVaults\",\n \"name\": + \"pvbackup\",\n \"rules\": [\n {\n \"verbs\": [\n \"list\"\n + \ ],\n \"apiGroups\": [\n \"\"\n ],\n \"resources\": + [\n \"events\"\n ]\n },\n {\n \"verbs\": [\n \"get\",\n + \ \"list\"\n ],\n \"apiGroups\": [\n \"\"\n ],\n + \ \"resources\": [\n \"namespaces\",\n \"deployments\",\n + \ \"statefulsets\",\n \"replicasets\",\n \"daemonsets\"\n + \ ]\n },\n {\n \"verbs\": [\n \"create\",\n \"get\",\n + \ \"list\",\n \"patch\",\n \"update\",\n \"delete\"\n + \ ],\n \"apiGroups\": [\n \"\"\n ],\n \"resources\": + [\n \"persistentvolumes\",\n \"persistentvolumeclaims\"\n ]\n + \ },\n {\n \"verbs\": [\n \"get\",\n \"list\"\n ],\n + \ \"apiGroups\": [\n \"storage.k8s.io\"\n ],\n \"resources\": + [\n \"csidrivers\"\n ]\n },\n {\n \"verbs\": [\n \"create\",\n + \ \"get\",\n \"list\",\n \"patch\",\n \"update\"\n + \ ],\n \"apiGroups\": [\n \"storage.k8s.io\"\n ],\n \"resources\": + [\n \"storageclasses\",\n \"volumeattachments\"\n ]\n },\n + \ {\n \"verbs\": [\n \"create\",\n \"get\",\n \"list\",\n + \ \"patch\",\n \"update\",\n \"delete\"\n ],\n \"apiGroups\": + [\n \"snapshot.storage.k8s.io\"\n ],\n \"resources\": [\n + \ \"volumesnapshots\",\n \"volumesnapshotcontents\",\n \"volumesnapshotclasses\"\n + \ ]\n }\n ]\n },\n {\n \"sourceResourceType\": \"Microsoft.MachineLearningServices/workspaces\",\n + \ \"name\": \"training\",\n \"rules\": [\n {\n \"verbs\": [\n + \ \"create\",\n \"get\",\n \"list\",\n \"patch\",\n + \ \"update\",\n \"delete\"\n ],\n \"apiGroups\": [\n + \ \"\"\n ],\n \"resources\": [\n \"services\",\n \"services/proxy\"\n + \ ]\n }\n ]\n },\n {\n \"sourceResourceType\": \"Microsoft.MachineLearningServices/workspaces\",\n + \ \"name\": \"inferenceV2\",\n \"rules\": [\n {\n \"verbs\": + [\n \"create\",\n \"get\",\n \"list\",\n \"patch\",\n + \ \"update\",\n \"delete\"\n ],\n \"apiGroups\": [\n + \ \"\"\n ],\n \"resources\": [\n \"services\",\n \"services/proxy\"\n + \ ]\n }\n ]\n },\n {\n \"sourceResourceType\": \"Microsoft.MachineLearningServices/workspaces\",\n + \ \"name\": \"inferenceV1\",\n \"rules\": [\n {\n \"verbs\": + [\n \"list\"\n ],\n \"apiGroups\": [\n \"\"\n ],\n + \ \"resources\": [\n \"events\",\n \"nodes\"\n ]\n },\n + \ {\n \"verbs\": [\n \"create\",\n \"get\",\n \"list\",\n + \ \"patch\",\n \"update\",\n \"delete\"\n ],\n \"apiGroups\": + [\n \"\"\n ],\n \"resources\": [\n \"persistentvolumes\",\n + \ \"persistentvolumeclaims\"\n ]\n },\n {\n \"verbs\": + [\n \"create\",\n \"get\",\n \"list\",\n \"patch\",\n + \ \"update\",\n \"delete\"\n ],\n \"apiGroups\": [\n + \ \"\"\n ],\n \"resources\": [\n \"namespaces\",\n \"pods\",\n + \ \"configmaps\",\n \"secrets\",\n \"services\",\n \"services/proxy\",\n + \ \"serviceaccounts\"\n ]\n },\n {\n \"verbs\": [\n + \ \"create\",\n \"get\",\n \"list\",\n \"patch\",\n + \ \"update\",\n \"delete\"\n ],\n \"apiGroups\": [\n + \ \"\"\n ],\n \"resources\": [\n \"deployments\",\n \"replicasets\",\n + \ \"daemonsets\"\n ]\n },\n {\n \"verbs\": [\n \"create\",\n + \ \"get\",\n \"list\"\n ],\n \"apiGroups\": [\n \"\"\n + \ ],\n \"resources\": [\n \"jobs\"\n ]\n },\n {\n + \ \"verbs\": [\n \"create\",\n \"get\",\n \"list\",\n + \ \"patch\",\n \"update\",\n \"delete\"\n ],\n \"apiGroups\": + [\n \"storage.k8s.io\"\n ],\n \"resources\": [\n \"csidrivers\"\n + \ ]\n },\n {\n \"verbs\": [\n \"create\",\n \"get\",\n + \ \"list\",\n \"update\"\n ],\n \"apiGroups\": [\n \"rbac.authorization.k8s.io\"\n + \ ],\n \"resources\": [\n \"clusterroles\",\n \"clusterrolebindings\"\n + \ ]\n }\n ]\n }\n ]\n }" + headers: + cache-control: + - no-cache + content-length: + - '4926' + content-type: + - application/json + date: + - Tue, 26 Jul 2022 07:07:41 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - nginx + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py index 9d2c21f522f..835a77d0914 100644 --- a/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py +++ b/src/aks-preview/azext_aks_preview/tests/latest/test_aks_commands.py @@ -4977,13 +4977,11 @@ def test_aks_update_with_keda(self, resource_group, resource_group_location): self.is_empty(), ]) - @live_only() # live only is required for test environment setup like `az login` @AllowLargeResponse() def test_list_trustedaccess_roles(self): cmd = 'aks trustedaccess role list -l eastus2euap' self.cmd(cmd, checks=[ - self.check( - 'type', 'Microsoft.ContainerService/locations/trustedaccessroles') + self.exists('[0].sourceResourceType') ]) @live_only() # this test requires live_only because a binary is downloaded