runbooks 0.9.6__py3-none-any.whl → 0.9.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. runbooks/__init__.py +1 -1
  2. runbooks/_platform/__init__.py +19 -0
  3. runbooks/_platform/core/runbooks_wrapper.py +478 -0
  4. runbooks/cloudops/cost_optimizer.py +330 -0
  5. runbooks/cloudops/interfaces.py +3 -3
  6. runbooks/common/mcp_integration.py +174 -0
  7. runbooks/common/performance_monitor.py +4 -4
  8. runbooks/enterprise/__init__.py +18 -10
  9. runbooks/enterprise/security.py +708 -0
  10. runbooks/finops/README.md +1 -1
  11. runbooks/finops/automation_core.py +643 -0
  12. runbooks/finops/business_cases.py +414 -16
  13. runbooks/finops/cli.py +23 -0
  14. runbooks/finops/compute_cost_optimizer.py +865 -0
  15. runbooks/finops/ebs_cost_optimizer.py +718 -0
  16. runbooks/finops/ebs_optimizer.py +909 -0
  17. runbooks/finops/elastic_ip_optimizer.py +675 -0
  18. runbooks/finops/embedded_mcp_validator.py +330 -14
  19. runbooks/finops/enhanced_dashboard_runner.py +2 -1
  20. runbooks/finops/enterprise_wrappers.py +827 -0
  21. runbooks/finops/finops_dashboard.py +322 -11
  22. runbooks/finops/legacy_migration.py +730 -0
  23. runbooks/finops/nat_gateway_optimizer.py +1160 -0
  24. runbooks/finops/network_cost_optimizer.py +1387 -0
  25. runbooks/finops/notebook_utils.py +596 -0
  26. runbooks/finops/reservation_optimizer.py +956 -0
  27. runbooks/finops/single_dashboard.py +16 -16
  28. runbooks/finops/validation_framework.py +753 -0
  29. runbooks/finops/vpc_cleanup_optimizer.py +817 -0
  30. runbooks/finops/workspaces_analyzer.py +1 -1
  31. runbooks/inventory/__init__.py +7 -0
  32. runbooks/inventory/collectors/aws_networking.py +357 -6
  33. runbooks/inventory/mcp_vpc_validator.py +1091 -0
  34. runbooks/inventory/vpc_analyzer.py +1107 -0
  35. runbooks/inventory/vpc_architecture_validator.py +939 -0
  36. runbooks/inventory/vpc_dependency_analyzer.py +845 -0
  37. runbooks/main.py +487 -40
  38. runbooks/operate/vpc_operations.py +1485 -16
  39. runbooks/remediation/commvault_ec2_analysis.py +1 -1
  40. runbooks/remediation/dynamodb_optimize.py +2 -2
  41. runbooks/remediation/rds_instance_list.py +1 -1
  42. runbooks/remediation/rds_snapshot_list.py +1 -1
  43. runbooks/remediation/workspaces_list.py +2 -2
  44. runbooks/security/compliance_automation.py +2 -2
  45. runbooks/vpc/__init__.py +12 -0
  46. runbooks/vpc/cleanup_wrapper.py +757 -0
  47. runbooks/vpc/cost_engine.py +527 -3
  48. runbooks/vpc/networking_wrapper.py +29 -29
  49. runbooks/vpc/runbooks_adapter.py +479 -0
  50. runbooks/vpc/tests/test_config.py +2 -2
  51. runbooks/vpc/vpc_cleanup_integration.py +2629 -0
  52. {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/METADATA +1 -1
  53. {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/RECORD +57 -34
  54. {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/WHEEL +0 -0
  55. {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/entry_points.txt +0 -0
  56. {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/licenses/LICENSE +0 -0
  57. {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/top_level.txt +0 -0
@@ -117,9 +117,9 @@ class SingleAccountDashboard:
117
117
 
118
118
  # Show detailed configuration only for CLI users
119
119
  if self.context_console.config.show_technical_details:
120
- self.console.print(f"[info]🎯 Analysis Focus:[/] [highlight]TOP {top_services} Services[/]")
121
- self.console.print(f"[dim]• Optimization Target: Service-level insights[/]")
122
- self.console.print(f"[dim]• User Profile: Technical teams[/]\n")
120
+ print_info(f"🎯 Analysis Focus: TOP {top_services} Services")
121
+ print_info("• Optimization Target: Service-level insights")
122
+ print_info("• User Profile: Technical teams\n")
123
123
 
124
124
  # Get profile for analysis
125
125
  profile = self._determine_analysis_profile(args)
@@ -316,7 +316,7 @@ class SingleAccountDashboard:
316
316
  if EMBEDDED_MCP_AVAILABLE:
317
317
  self._run_embedded_mcp_validation([profile], cost_data, service_list, args)
318
318
  else:
319
- self.console.print(f"[yellow]⚠️ MCP validation requested but not available - check MCP server configuration[/]")
319
+ print_warning("MCP validation requested but not available - check MCP server configuration")
320
320
 
321
321
  return 0
322
322
 
@@ -638,7 +638,7 @@ class SingleAccountDashboard:
638
638
  style="dim",
639
639
  )
640
640
 
641
- self.console.print(table)
641
+ console.print(table)
642
642
 
643
643
  # Summary panel (using filtered services for consistent analysis)
644
644
  total_current = sum(filtered_current_services.values())
@@ -681,7 +681,7 @@ class SingleAccountDashboard:
681
681
  • Services Analyzed: {len(all_services)}{period_info}
682
682
  """
683
683
 
684
- self.console.print(Panel(summary_text.strip(), title="📊 Analysis Summary", style="info"))
684
+ console.print(Panel(summary_text.strip(), title="📊 Analysis Summary", style="info"))
685
685
 
686
686
  def _export_service_analysis(
687
687
  self, args: argparse.Namespace, cost_data: Dict[str, Any], service_costs: List[str], account_id: str
@@ -818,7 +818,7 @@ class SingleAccountDashboard:
818
818
  f.write("\n".join(lines))
819
819
 
820
820
  print_success(f"Markdown export saved to: {file_path}")
821
- self.console.print("[cyan]📋 Ready for GitHub/MkDocs documentation[/]")
821
+ print_info("📋 Ready for GitHub/MkDocs documentation")
822
822
 
823
823
  except Exception as e:
824
824
  print_warning(f"Markdown export failed: {str(e)[:50]}")
@@ -854,7 +854,7 @@ class SingleAccountDashboard:
854
854
  hasattr(args, 'report_type') and args.report_type):
855
855
  return
856
856
 
857
- self.console.print(f"[cyan]📊 Processing export requests...[/]")
857
+ print_info("📊 Processing export requests...")
858
858
 
859
859
  # Convert service data to ProfileData format compatible with existing export functions
860
860
  from .types import ProfileData
@@ -890,7 +890,7 @@ class SingleAccountDashboard:
890
890
  export_count = 0
891
891
  for report_type in args.report_type:
892
892
  if report_type == "pdf":
893
- self.console.print(f"[cyan]Generating PDF export...[/]")
893
+ print_info("Generating PDF export...")
894
894
  pdf_path = export_cost_dashboard_to_pdf(
895
895
  export_data,
896
896
  args.report_name,
@@ -902,10 +902,10 @@ class SingleAccountDashboard:
902
902
  print_success(f"PDF export completed: {pdf_path}")
903
903
  export_count += 1
904
904
  else:
905
- self.console.print(f"[red]PDF export failed[/]")
905
+ print_error("PDF export failed")
906
906
 
907
907
  elif report_type == "csv":
908
- self.console.print(f"[cyan]Generating CSV export...[/]")
908
+ print_info("Generating CSV export...")
909
909
  from .cost_processor import export_to_csv
910
910
  csv_path = export_to_csv(
911
911
  export_data,
@@ -919,7 +919,7 @@ class SingleAccountDashboard:
919
919
  export_count += 1
920
920
 
921
921
  elif report_type == "json":
922
- self.console.print(f"[cyan]Generating JSON export...[/]")
922
+ print_info("Generating JSON export...")
923
923
  from .cost_processor import export_to_json
924
924
  json_path = export_to_json(export_data, args.report_name, getattr(args, 'dir', None))
925
925
  if json_path:
@@ -927,7 +927,7 @@ class SingleAccountDashboard:
927
927
  export_count += 1
928
928
 
929
929
  elif report_type == "markdown":
930
- self.console.print(f"[cyan]Generating Markdown export...[/]")
930
+ print_info("Generating Markdown export...")
931
931
  # Use existing markdown export functionality
932
932
  self._export_service_table_to_markdown(
933
933
  services_data[:10], {}, {}, # Simplified data structure
@@ -939,12 +939,12 @@ class SingleAccountDashboard:
939
939
  export_count += 1
940
940
 
941
941
  if export_count > 0:
942
- self.console.print(f"[bright_green]✅ {export_count} exports completed successfully[/]")
942
+ print_success(f"{export_count} exports completed successfully")
943
943
  else:
944
- self.console.print(f"[yellow]⚠️ No exports were generated[/]")
944
+ print_warning("No exports were generated")
945
945
 
946
946
  except Exception as e:
947
- self.console.print(f"[red]❌ Export failed: {str(e)}[/]")
947
+ print_error(f"Export failed: {str(e)}")
948
948
  import traceback
949
949
  self.console.print(f"[red]Details: {traceback.format_exc()}[/]")
950
950