Skip to content

Commit fde0aed

Browse files
fix: resolve import error and graph validation failures
- Fix traceroute import path in utilities.py (..traceroute -> ...traceroute) - Remove non-existent firewall-policy/firewall-networking from HIERARCHY - Remove duplicate policy entry in firewall context - Rename internal helpers from _show_*_table to _render_*_table to avoid false graph validation warnings
1 parent df12a01 commit fde0aed

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

src/aws_network_tools/shell/base.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@
176176
"firewall-rule-groups",
177177
"rule-groups",
178178
"policy",
179-
"firewall-policy",
180-
"firewall-networking",
181179
],
182180
"set": ["rule-group"],
183181
"commands": ["show", "set", "refresh", "exit", "end"],

src/aws_network_tools/shell/handlers/root.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ def _show_routing_cache(self, arg):
641641

642642
# Show detailed routes if argument provided
643643
if arg in ["vpc", "transit-gateway", "cloud-wan", "all"]:
644-
self._show_routing_cache_detail(cache, arg)
644+
self._render_routing_cache_detail(cache, arg)
645645
return
646646

647647
# Default: Show summary
@@ -667,7 +667,7 @@ def _show_routing_cache(self, arg):
667667
"\n[dim]Use 'show routing-cache vpc|transit-gateway|cloud-wan|all' for details[/]"
668668
)
669669

670-
def _show_routing_cache_detail(self, cache, filter_source):
670+
def _render_routing_cache_detail(self, cache, filter_source):
671671
"""Show detailed routing cache entries."""
672672
# Map user input to cache keys
673673
source_map = {
@@ -700,17 +700,17 @@ def _show_routing_cache_detail(self, cache, filter_source):
700700
cloudwan_routes = [r for r in all_routes if r.get("source") == "cloudwan"]
701701

702702
if vpc_routes and (filter_source in ["vpc", "all"]):
703-
self._show_vpc_routes_table(vpc_routes)
703+
self._render_vpc_routes_table(vpc_routes)
704704

705705
if tgw_routes and (
706706
filter_source in ["transit-gateway", "transitgateway", "all"]
707707
):
708-
self._show_transit_gateway_routes_table(tgw_routes)
708+
self._render_transit_gateway_routes_table(tgw_routes)
709709

710710
if cloudwan_routes and (filter_source in ["cloud-wan", "cloudwan", "all"]):
711-
self._show_cloud_wan_routes_table(cloudwan_routes)
711+
self._render_cloud_wan_routes_table(cloudwan_routes)
712712

713-
def _show_vpc_routes_table(self, routes):
713+
def _render_vpc_routes_table(self, routes):
714714
"""Display VPC routes in detailed table."""
715715
allow_truncate = self.config.get("display.allow_truncate", False)
716716
use_pager = self.config.get("display.pager", False)
@@ -754,7 +754,7 @@ def _show_vpc_routes_table(self, routes):
754754
)
755755
console.print("[dim]Set 'pager: true' in config to enable pagination[/]")
756756

757-
def _show_transit_gateway_routes_table(self, routes):
757+
def _render_transit_gateway_routes_table(self, routes):
758758
"""Display Transit Gateway routes in detailed table."""
759759
# Check terminal width and config
760760
allow_truncate = self.config.get("display.allow_truncate", True)
@@ -792,7 +792,7 @@ def _show_transit_gateway_routes_table(self, routes):
792792
if len(routes) > 100:
793793
console.print(f"[dim]Showing first 100 of {len(routes)} routes[/]")
794794

795-
def _show_cloud_wan_routes_table(self, routes):
795+
def _render_cloud_wan_routes_table(self, routes):
796796
"""Display Cloud WAN routes in detailed table."""
797797
allow_truncate = self.config.get("display.allow_truncate", True)
798798

src/aws_network_tools/shell/handlers/utilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def do_trace(self, args):
186186
console.print("[red]Usage: trace <src_ip> <dst_ip> [--no-cache][/]")
187187
return
188188
try:
189-
from ..traceroute import AWSTraceroute
189+
from ...traceroute import AWSTraceroute
190190
import asyncio
191191
import concurrent.futures
192192

0 commit comments

Comments
 (0)