Skip to content

Commit 346a20a

Browse files
Merge branch 'Azure:main' into main
2 parents 2a917a0 + 00aa9cc commit 346a20a

File tree

6 files changed

+629
-6034
lines changed

6 files changed

+629
-6034
lines changed

src/aks-preview/azext_aks_preview/managednamespace.py

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,29 @@
44
# Licensed under the MIT License. See License.txt in the project root for license information.
55
# --------------------------------------------------------------------------------------------
66

7-
from azure.cli.core.azclierror import (
8-
InvalidArgumentValueError,
9-
RequiredArgumentMissingError,
7+
from azext_aks_preview._client_factory import (
8+
CUSTOM_MGMT_AKS_PREVIEW,
9+
get_container_service_client,
1010
)
11-
12-
from azure.cli.core.util import (
13-
sdk_no_wait,
14-
)
15-
from azure.cli.core.commands.client_factory import get_mgmt_service_client
16-
from azure.mgmt.containerservice import ContainerServiceClient
17-
1811
from azext_aks_preview._consts import (
19-
CONST_NAMESPACE_NETWORK_POLICY_RULE_DENYALL,
20-
CONST_NAMESPACE_NETWORK_POLICY_RULE_ALLOWALL,
21-
CONST_NAMESPACE_NETWORK_POLICY_RULE_ALLOWSAMENAMESPACE,
22-
CONST_NAMESPACE_ADOPTION_POLICY_NEVER,
23-
CONST_NAMESPACE_ADOPTION_POLICY_IFIDENTICAL,
2412
CONST_NAMESPACE_ADOPTION_POLICY_ALWAYS,
13+
CONST_NAMESPACE_ADOPTION_POLICY_IFIDENTICAL,
14+
CONST_NAMESPACE_ADOPTION_POLICY_NEVER,
15+
CONST_NAMESPACE_DELETE_POLICY_DELETE,
2516
CONST_NAMESPACE_DELETE_POLICY_KEEP,
26-
CONST_NAMESPACE_DELETE_POLICY_DELETE
17+
CONST_NAMESPACE_NETWORK_POLICY_RULE_ALLOWALL,
18+
CONST_NAMESPACE_NETWORK_POLICY_RULE_ALLOWSAMENAMESPACE,
19+
CONST_NAMESPACE_NETWORK_POLICY_RULE_DENYALL,
2720
)
28-
29-
from azext_aks_preview._client_factory import CUSTOM_MGMT_AKS_PREVIEW
21+
from azure.cli.core.azclierror import (
22+
InvalidArgumentValueError,
23+
RequiredArgumentMissingError,
24+
)
25+
from azure.cli.core.util import sdk_no_wait
3026

3127

3228
def get_cluster_location(cmd, resource_group_name, cluster_name):
33-
containerservice_client = get_mgmt_service_client(cmd.cli_ctx, ContainerServiceClient)
29+
containerservice_client = get_container_service_client(cmd.cli_ctx)
3430
cluster = containerservice_client.managed_clusters.get(resource_group_name, cluster_name)
3531
return cluster.location
3632

src/aks-preview/azext_aks_preview/tests/latest/recordings/test_aks_approuting_enable_with_keyvault_secrets_provider_addon_and_keyvault_id.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interactions:
1515
User-Agent:
1616
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1019-azure-x86_64-with-glibc2.29)
1717
method: GET
18-
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2023-02-01
18+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2024-11-01
1919
response:
2020
body:
2121
string: '{"error":{"code":"ResourceNotFound","message":"The Resource ''Microsoft.KeyVault/vaults/cliakstestkv000002''
@@ -70,7 +70,7 @@ interactions:
7070
User-Agent:
7171
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1019-azure-x86_64-with-glibc2.29)
7272
method: PUT
73-
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2023-02-01
73+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2024-11-01
7474
response:
7575
body:
7676
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002","name":"cliakstestkv000002","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"systemData":{"createdBy":"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d","createdByType":"Application","createdAt":"2024-03-11T07:38:10.965Z","lastModifiedBy":"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d","lastModifiedByType":"Application","lastModifiedAt":"2024-03-11T07:38:10.965Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":true,"vaultUri":"https://cliakstestkv000002.vault.azure.net","provisioningState":"RegisteringDns","publicNetworkAccess":"Enabled"}}'
@@ -120,7 +120,7 @@ interactions:
120120
User-Agent:
121121
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1019-azure-x86_64-with-glibc2.29)
122122
method: GET
123-
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2023-02-01
123+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2024-11-01
124124
response:
125125
body:
126126
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002","name":"cliakstestkv000002","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"systemData":{"createdBy":"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d","createdByType":"Application","createdAt":"2024-03-11T07:38:10.965Z","lastModifiedBy":"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d","lastModifiedByType":"Application","lastModifiedAt":"2024-03-11T07:38:10.965Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":true,"vaultUri":"https://cliakstestkv000002.vault.azure.net/","provisioningState":"RegisteringDns","publicNetworkAccess":"Enabled"}}'
@@ -168,7 +168,7 @@ interactions:
168168
User-Agent:
169169
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1019-azure-x86_64-with-glibc2.29)
170170
method: GET
171-
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2023-02-01
171+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2024-11-01
172172
response:
173173
body:
174174
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002","name":"cliakstestkv000002","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"systemData":{"createdBy":"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d","createdByType":"Application","createdAt":"2024-03-11T07:38:10.965Z","lastModifiedBy":"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d","lastModifiedByType":"Application","lastModifiedAt":"2024-03-11T07:38:10.965Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":true,"vaultUri":"https://cliakstestkv000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}'
@@ -1551,7 +1551,7 @@ interactions:
15511551
User-Agent:
15521552
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1019-azure-x86_64-with-glibc2.29)
15531553
method: GET
1554-
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2023-02-01
1554+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2024-11-01
15551555
response:
15561556
body:
15571557
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002","name":"cliakstestkv000002","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"systemData":{"createdBy":"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d","createdByType":"Application","createdAt":"2024-03-11T07:38:10.965Z","lastModifiedBy":"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d","lastModifiedByType":"Application","lastModifiedAt":"2024-03-11T07:38:10.965Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":true,"vaultUri":"https://cliakstestkv000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}'
@@ -1700,7 +1700,7 @@ interactions:
17001700
User-Agent:
17011701
- AZURECLI/2.58.0 azsdk-python-core/1.28.0 Python/3.8.10 (Linux-6.2.0-1019-azure-x86_64-with-glibc2.29)
17021702
method: GET
1703-
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2023-02-01
1703+
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002?api-version=2024-11-01
17041704
response:
17051705
body:
17061706
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000001/providers/Microsoft.KeyVault/vaults/cliakstestkv000002","name":"cliakstestkv000002","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"systemData":{"createdBy":"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d","createdByType":"Application","createdAt":"2024-03-11T07:38:10.965Z","lastModifiedBy":"3fac8b4e-cd90-4baa-a5d2-66d52bc8349d","lastModifiedByType":"Application","lastModifiedAt":"2024-03-11T07:38:10.965Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[],"enabledForDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":true,"vaultUri":"https://cliakstestkv000002.vault.azure.net/","provisioningState":"Succeeded","publicNetworkAccess":"Enabled"}}'

0 commit comments

Comments
 (0)