forked from Azure/azure-cli-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Network]Support p2s vpn gateway and vpn server configuration (Azure#…
- Loading branch information
1 parent
91fbfac
commit 32e83ad
Showing
13 changed files
with
22,040 additions
and
282 deletions.
There are no files selected for viewing
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
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
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,25 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
# pylint: disable=protected-access | ||
# pylint: disable=line-too-long | ||
# pylint: disable=too-few-public-methods | ||
import argparse | ||
from knack.util import CLIError | ||
from .profiles import CUSTOM_VHUB_ROUTE_TABLE | ||
|
||
|
||
class RadiusServerAddAction(argparse._AppendAction): | ||
|
||
def __call__(self, parser, namespace, values, keys=None, option_string=None): | ||
RadiusServer = namespace._cmd.get_models('RadiusServer', resource_type=CUSTOM_VHUB_ROUTE_TABLE) | ||
kwargs = {} | ||
for item in values: | ||
try: | ||
key, value = item.split('=', 1) | ||
kwargs['radius_server_' + key] = value | ||
except ValueError: | ||
raise CLIError('usage error: {} address=VALUE, score=VALUE, secret=VALUE'.format(option_string)) | ||
action = RadiusServer(**kwargs) | ||
super(RadiusServerAddAction, self).__call__(parser, namespace, action, option_string) |
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
Oops, something went wrong.