-
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.
[Virtual-wan] support
-o table
output for `az network vhub get-effe…
…ctive-routes` (#3426) * add table transformer for az network vhub get-effective-routes * add table transformer for az network vhub get-effective-routes * bump up version * fix ci issues * update recordings
- Loading branch information
Showing
7 changed files
with
192 additions
and
224 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from collections import OrderedDict | ||
|
||
|
||
def transform_effective_route_table(result): | ||
transformed = [] | ||
for item in result.get('value', []): | ||
transformed.append(OrderedDict([ | ||
('Address Prefix', ' '.join(item['addressPrefixes'] or [])), | ||
('Next Hop Type', item['nextHopType']), | ||
('Next Hop', ' '.join(item['nextHops'] or [])), | ||
('Route Origin', item['routeOrigin']) | ||
])) | ||
return transformed |
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
371 changes: 158 additions & 213 deletions
371
...ual-wan/azext_vwan/tests/latest/recordings/test_azure_vhub_connection_basic_scenario.yaml
Large diffs are not rendered by default.
Oops, something went wrong.
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