-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[DNC] Update version to 2023-05-18-preview, migrate to use AAZ #6554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
f93b71e
[dnc] init AAZ Dev Tool CLI generation
jackieluc 97fd8e4
[dnc] fix: controller tests
jackieluc e59b783
[dnc] feat: add unit tests and parity subnet and orchestrator CLI arg…
jackieluc fcce1c9
[dnc] fix: use centraluseuap RM
jackieluc 8414265
[dnc] chore: update setup.py with version info
jackieluc eee1ea7
[dnc] chore: add short summary for resource_group
jackieluc a46c0ef
[dnc] chore: recreate test recordings
jackieluc 16c2a4a
[dnc] fix: tests to use management.azure.com
jackieluc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,83 +1,14 @@ | ||
| # Azure CLI dnc Extension # | ||
| This is the extension for dnc | ||
| # Azure CLI Dnc Extension # | ||
| This is an extension to Azure CLI to manage DNC resources. | ||
|
|
||
| ## How to use ## | ||
|
|
||
| ### How to use ### | ||
| Install this extension using the below CLI command | ||
| ``` | ||
| az extension add --name dnc | ||
| ``` | ||
|
|
||
| ### Included Features ### | ||
| #### dnc controller #### | ||
| ##### Create ##### | ||
| ``` | ||
| az dnc controller create --location "eastus2euap" --resource-group "TestRG" --resource-name "testcontroller" | ||
| ``` | ||
| ##### Patch ##### | ||
| ``` | ||
| az dnc controller patch --tags key="value" --resource-group "TestRG" --resource-name "testcontroller" | ||
| ``` | ||
| ##### Show-detail ##### | ||
| ``` | ||
| az dnc controller show-detail --resource-group "TestRG" --resource-name "testcontroller" | ||
| ``` | ||
| ##### Delete ##### | ||
| ``` | ||
| az dnc controller delete --resource-group "TestRG" --resource-name "testcontroller" | ||
| ``` | ||
| #### dnc delegated-network #### | ||
| ##### List ##### | ||
| ``` | ||
| az dnc delegated-network list --resource-group "testRG" | ||
| ``` | ||
| #### dnc orchestrator-instance-service #### | ||
| ##### Create ##### | ||
| ``` | ||
| az dnc orchestrator-instance-service create --type "SystemAssigned" --location "eastus2euap" \ | ||
| --api-server-endpoint "https://testk8s.cloudapp.net" --cluster-root-ca "ddsadsad344mfdsfdl" \ | ||
| --id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/testcontroller" \ | ||
| --orchestrator-app-id "546192d7-503f-477a-9cfe-4efc3ee2b6e1" \ | ||
| --orchestrator-tenant-id "da6192d7-503f-477a-9cfe-4efc3ee2b6c3" \ | ||
| --private-link-resource-id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Network/privateLinkServices/plresource1" \ | ||
| --resource-group "TestRG" --resource-name "testk8s1" | ||
| ``` | ||
| ##### List ##### | ||
| ``` | ||
| az dnc orchestrator-instance-service list --resource-group "testRG" | ||
| ``` | ||
| ##### Patch ##### | ||
| ``` | ||
| az dnc orchestrator-instance-service patch --tags key="value" --resource-group "TestRG" --resource-name "testk8s1" | ||
| ``` | ||
| ##### Show-detail ##### | ||
| ``` | ||
| az dnc orchestrator-instance-service show-detail --resource-group "TestRG" --resource-name "testk8s1" | ||
| ``` | ||
| ##### Delete ##### | ||
| ``` | ||
| az dnc orchestrator-instance-service delete --resource-group "TestRG" --resource-name "k8stest1" | ||
| ``` | ||
| #### dnc delegated-subnet-service #### | ||
| ##### Put-detail ##### | ||
| ``` | ||
| az dnc delegated-subnet-service put-detail --location "eastus2euap" \ | ||
| --id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.DelegatedNetwork/controller/dnctestcontroller" \ | ||
| --subnet-details-id "/subscriptions/613192d7-503f-477a-9cfe-4efc3ee2bd60/resourceGroups/TestRG/providers/Microsoft.Network/virtualNetworks/testvnet/subnets/testsubnet" \ | ||
| --resource-group "TestRG" --resource-name "delegated1" | ||
| ``` | ||
| ##### Patch-detail ##### | ||
| ``` | ||
| az dnc delegated-subnet-service patch-detail --tags key="value" --resource-group "TestRG" --resource-name "delegated1" | ||
| ``` | ||
| ##### List ##### | ||
| ``` | ||
| az dnc delegated-subnet-service list --resource-group "testRG" | ||
| ``` | ||
| ##### Show-detail ##### | ||
| ``` | ||
| az dnc delegated-subnet-service show-detail --resource-group "TestRG" --resource-name "delegated1" | ||
| ``` | ||
| ##### Delete ##### | ||
| ## Included Features ## | ||
| ``` | ||
| az dnc delegated-subnet-service delete --resource-group "TestRG" --resource-name "delegated1" | ||
| az dnc --help | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,50 +1,42 @@ | ||
| # -------------------------------------------------------------------------- | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for | ||
| # license information. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is | ||
| # regenerated. | ||
| # -------------------------------------------------------------------------- | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| from azure.cli.core import AzCommandsLoader | ||
| from azext_dnc.generated._help import helps # pylint: disable=unused-import | ||
| try: | ||
| from azext_dnc.manual._help import helps # pylint: disable=reimported | ||
| except ImportError: | ||
| pass | ||
| from azext_dnc._help import helps # pylint: disable=unused-import | ||
|
|
||
|
|
||
| class DNCCommandsLoader(AzCommandsLoader): | ||
| class DncCommandsLoader(AzCommandsLoader): | ||
|
|
||
| def __init__(self, cli_ctx=None): | ||
| from azure.cli.core.commands import CliCommandType | ||
| from azext_dnc.generated._client_factory import cf_dnc_cl | ||
| dnc_custom = CliCommandType( | ||
| operations_tmpl='azext_dnc.custom#{}', | ||
| client_factory=cf_dnc_cl) | ||
| parent = super(DNCCommandsLoader, self) | ||
| parent.__init__(cli_ctx=cli_ctx, custom_command_type=dnc_custom) | ||
| custom_command_type = CliCommandType( | ||
| operations_tmpl='azext_dnc.custom#{}') | ||
| super().__init__(cli_ctx=cli_ctx, | ||
| custom_command_type=custom_command_type) | ||
|
|
||
| def load_command_table(self, args): | ||
| from azext_dnc.generated.commands import load_command_table | ||
| load_command_table(self, args) | ||
| from azext_dnc.commands import load_command_table | ||
| from azure.cli.core.aaz import load_aaz_command_table | ||
| try: | ||
| from azext_dnc.manual.commands import load_command_table as load_command_table_manual | ||
| load_command_table_manual(self, args) | ||
| from . import aaz | ||
| except ImportError: | ||
| pass | ||
| aaz = None | ||
| if aaz: | ||
| load_aaz_command_table( | ||
| loader=self, | ||
| aaz_pkg_name=aaz.__name__, | ||
| args=args | ||
| ) | ||
| load_command_table(self, args) | ||
| return self.command_table | ||
|
|
||
| def load_arguments(self, command): | ||
| from azext_dnc.generated._params import load_arguments | ||
| from azext_dnc._params import load_arguments | ||
| load_arguments(self, command) | ||
| try: | ||
| from azext_dnc.manual._params import load_arguments as load_arguments_manual | ||
| load_arguments_manual(self, command) | ||
| except ImportError: | ||
| pass | ||
|
|
||
|
|
||
| COMMAND_LOADER_CLS = DNCCommandsLoader | ||
| COMMAND_LOADER_CLS = DncCommandsLoader | ||
11 changes: 5 additions & 6 deletions
11
src/dnc/azext_dnc/manual/_help.py → src/dnc/azext_dnc/_help.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,11 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
| # pylint: disable=too-many-lines | ||
|
|
||
| from knack.help_files import helps | ||
| # pylint: disable=line-too-long | ||
| # pylint: disable=too-many-lines | ||
|
|
||
| helps['dnc'] = """ | ||
| type: group | ||
| short-summary: Manage Delegated Network | ||
| """ | ||
| from knack.help_files import helps # pylint: disable=unused-import |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: disable=too-many-lines | ||
| # pylint: disable=too-many-statements | ||
|
|
||
|
|
||
| def load_arguments(self, _): # pylint: disable=unused-argument | ||
| pass |
12 changes: 4 additions & 8 deletions
12
...ext_dnc/vendored_sdks/dnc/aio/__init__.py → src/dnc/azext_dnc/aaz/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,6 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
|
|
||
| from ._dnc import DNC | ||
| __all__ = ['DNC'] | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- |
11 changes: 4 additions & 7 deletions
11
src/dnc/azext_dnc/manual/tests/__init__.py → src/dnc/azext_dnc/aaz/latest/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,6 @@ | ||
| # -------------------------------------------------------------------------- | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for | ||
| # license information. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is | ||
| # regenerated. | ||
| # -------------------------------------------------------------------------- | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from azure.cli.core.aaz import * | ||
|
|
||
|
|
||
| @register_command_group( | ||
| "dnc", | ||
| is_preview=True, | ||
| ) | ||
| class __CMDGroup(AAZCommandGroup): | ||
| """Manage Delegated Network. | ||
| """ | ||
| pass | ||
|
|
||
|
|
||
| __all__ = ["__CMDGroup"] |
14 changes: 8 additions & 6 deletions
14
...c/azext_dnc/vendored_sdks/dnc/_version.py → src/dnc/azext_dnc/aaz/latest/dnc/__init__.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,11 @@ | ||
| # coding=utf-8 | ||
| # -------------------------------------------------------------------------- | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is regenerated. | ||
| # -------------------------------------------------------------------------- | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| VERSION = "1.0.0b1" | ||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from .__cmd_group import * |
24 changes: 24 additions & 0 deletions
24
src/dnc/azext_dnc/aaz/latest/dnc/controller/__cmd_group.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from azure.cli.core.aaz import * | ||
|
|
||
|
|
||
| @register_command_group( | ||
| "dnc controller", | ||
| is_preview=True, | ||
| ) | ||
| class __CMDGroup(AAZCommandGroup): | ||
| """Manage controller with dnc. | ||
| """ | ||
| pass | ||
|
|
||
|
|
||
| __all__ = ["__CMDGroup"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # | ||
| # Code generated by aaz-dev-tools | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| # pylint: skip-file | ||
| # flake8: noqa | ||
|
|
||
| from .__cmd_group import * | ||
| from ._create import * | ||
| from ._delete import * | ||
| from ._show import * | ||
| from ._wait import * |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.