-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Network Manager] Init network manager extension (#3946)
network manager extension
- Loading branch information
Showing
82 changed files
with
24,765 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains 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 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,8 @@ | ||
.. :changelog: | ||
Release History | ||
=============== | ||
|
||
0.1.0 | ||
++++++ | ||
* Initial release. |
This file contains 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 @@ | ||
# Azure CLI network Extension # | ||
This is the extension for network | ||
|
||
### How to use ### | ||
Install this extension using the below CLI command | ||
``` | ||
az extension add --name network-manager | ||
``` | ||
|
||
Then, call it as you would any other az command: | ||
``` | ||
az network manager -h | ||
``` |
This file contains 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,37 @@ | ||
# -------------------------------------------------------------------------- | ||
# 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 azure.cli.core import AzCommandsLoader | ||
import azext_network_manager._help | ||
|
||
|
||
class NetworkManagementClientCommandsLoader(AzCommandsLoader): | ||
|
||
def __init__(self, cli_ctx=None): | ||
from azure.cli.core.commands import CliCommandType | ||
from azext_network_manager._client_factory import cf_network_cl | ||
network_custom = CliCommandType( | ||
operations_tmpl='azext_network_manager.custom#{}', | ||
client_factory=cf_network_cl) | ||
super(NetworkManagementClientCommandsLoader, self).__init__( | ||
cli_ctx=cli_ctx, | ||
custom_command_type=network_custom) | ||
|
||
def load_command_table(self, args): | ||
from azext_network_manager.commands import load_command_table | ||
load_command_table(self, args) | ||
return self.command_table | ||
|
||
def load_arguments(self, command): | ||
from azext_network_manager._params import load_arguments | ||
load_arguments(self, command) | ||
|
||
|
||
COMMAND_LOADER_CLS = NetworkManagementClientCommandsLoader |
83 changes: 83 additions & 0 deletions
83
src/network-manager/azext_network_manager/_client_factory.py
This file contains 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,83 @@ | ||
# -------------------------------------------------------------------------- | ||
# 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. | ||
# -------------------------------------------------------------------------- | ||
|
||
|
||
def cf_network_cl(cli_ctx, *_): | ||
from azure.cli.core.commands.client_factory import get_mgmt_service_client | ||
from azext_network_manager.vendored_sdks import NetworkManagementClient | ||
return get_mgmt_service_client(cli_ctx, NetworkManagementClient) | ||
|
||
|
||
def cf_activeconnectivityconfiguration(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).active_connectivity_configurations | ||
|
||
|
||
def cf_activesecurityadminrule(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).active_security_admin_rules | ||
|
||
|
||
def cf_activesecurityuserrule(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).active_security_user_rules | ||
|
||
|
||
def cf_adminrulecollection(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).admin_rule_collections | ||
|
||
|
||
def cf_adminrule(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).admin_rules | ||
|
||
|
||
def cf_connectivityconfiguration(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).connectivity_configurations | ||
|
||
|
||
def cf_effectiveconnectivityconfiguration(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).effective_connectivity_configurations | ||
|
||
|
||
def cf_effectivevirtualnetwork(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).effective_virtual_networks | ||
|
||
|
||
def cf_networkgroup(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).network_groups | ||
|
||
|
||
def cf_networkmanagercommit(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).network_manager_commits | ||
|
||
|
||
def cf_networkmanagerdeploymentstatus(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).network_manager_deployment_status | ||
|
||
|
||
def cf_effectivesecurityadminrule(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).network_manager_effective_security_admin_rules | ||
|
||
|
||
def cf_networkmanager(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).network_managers | ||
|
||
|
||
def cf_securityadminconfiguration(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).security_admin_configurations | ||
|
||
|
||
def cf_securityuserconfiguration(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).security_user_configurations | ||
|
||
|
||
def cf_userrulecollection(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).user_rule_collections | ||
|
||
|
||
def cf_userrule(cli_ctx, *_): | ||
return cf_network_cl(cli_ctx).user_rules |
Oops, something went wrong.