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.
- runbooks/__init__.py +1 -1
- runbooks/_platform/__init__.py +19 -0
- runbooks/_platform/core/runbooks_wrapper.py +478 -0
- runbooks/cloudops/cost_optimizer.py +330 -0
- runbooks/cloudops/interfaces.py +3 -3
- runbooks/common/mcp_integration.py +174 -0
- runbooks/common/performance_monitor.py +4 -4
- runbooks/enterprise/__init__.py +18 -10
- runbooks/enterprise/security.py +708 -0
- runbooks/finops/README.md +1 -1
- runbooks/finops/automation_core.py +643 -0
- runbooks/finops/business_cases.py +414 -16
- runbooks/finops/cli.py +23 -0
- runbooks/finops/compute_cost_optimizer.py +865 -0
- runbooks/finops/ebs_cost_optimizer.py +718 -0
- runbooks/finops/ebs_optimizer.py +909 -0
- runbooks/finops/elastic_ip_optimizer.py +675 -0
- runbooks/finops/embedded_mcp_validator.py +330 -14
- runbooks/finops/enhanced_dashboard_runner.py +2 -1
- runbooks/finops/enterprise_wrappers.py +827 -0
- runbooks/finops/finops_dashboard.py +322 -11
- runbooks/finops/legacy_migration.py +730 -0
- runbooks/finops/nat_gateway_optimizer.py +1160 -0
- runbooks/finops/network_cost_optimizer.py +1387 -0
- runbooks/finops/notebook_utils.py +596 -0
- runbooks/finops/reservation_optimizer.py +956 -0
- runbooks/finops/single_dashboard.py +16 -16
- runbooks/finops/validation_framework.py +753 -0
- runbooks/finops/vpc_cleanup_optimizer.py +817 -0
- runbooks/finops/workspaces_analyzer.py +1 -1
- runbooks/inventory/__init__.py +7 -0
- runbooks/inventory/collectors/aws_networking.py +357 -6
- runbooks/inventory/mcp_vpc_validator.py +1091 -0
- runbooks/inventory/vpc_analyzer.py +1107 -0
- runbooks/inventory/vpc_architecture_validator.py +939 -0
- runbooks/inventory/vpc_dependency_analyzer.py +845 -0
- runbooks/main.py +487 -40
- runbooks/operate/vpc_operations.py +1485 -16
- runbooks/remediation/commvault_ec2_analysis.py +1 -1
- runbooks/remediation/dynamodb_optimize.py +2 -2
- runbooks/remediation/rds_instance_list.py +1 -1
- runbooks/remediation/rds_snapshot_list.py +1 -1
- runbooks/remediation/workspaces_list.py +2 -2
- runbooks/security/compliance_automation.py +2 -2
- runbooks/vpc/__init__.py +12 -0
- runbooks/vpc/cleanup_wrapper.py +757 -0
- runbooks/vpc/cost_engine.py +527 -3
- runbooks/vpc/networking_wrapper.py +29 -29
- runbooks/vpc/runbooks_adapter.py +479 -0
- runbooks/vpc/tests/test_config.py +2 -2
- runbooks/vpc/vpc_cleanup_integration.py +2629 -0
- {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/METADATA +1 -1
- {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/RECORD +57 -34
- {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/WHEEL +0 -0
- {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/entry_points.txt +0 -0
- {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/licenses/LICENSE +0 -0
- {runbooks-0.9.6.dist-info → runbooks-0.9.8.dist-info}/top_level.txt +0 -0
@@ -60,7 +60,7 @@ def calculate_ec2_cost_impact(instances_data: List[Dict]) -> Dict[str, float]:
|
|
60
60
|
|
61
61
|
|
62
62
|
@click.command()
|
63
|
-
@click.option("--output-file", default="
|
63
|
+
@click.option("--output-file", default="./tmp/commvault_ec2_investigation.csv", help="Output CSV file path")
|
64
64
|
@click.option("--account", default="637423383469", help="Commvault backup account ID (JIRA FinOps-25)")
|
65
65
|
@click.option("--investigate-utilization", is_flag=True, help="Investigate EC2 utilization patterns")
|
66
66
|
@click.option("--days", default=7, help="Number of days to analyze for utilization metrics")
|
@@ -114,8 +114,8 @@ def analyze_table(table_name):
|
|
114
114
|
|
115
115
|
@click.command()
|
116
116
|
@click.option("--apply", "-a", is_flag=True, help="Apply suggested optimizations")
|
117
|
-
@click.option("--output", "-o", default="
|
118
|
-
def dynamodb_analyze(apply=False, output="
|
117
|
+
@click.option("--output", "-o", default="./tmp/dynamodb_analysis.csv", help="Output CSV file path")
|
118
|
+
def dynamodb_analyze(apply=False, output="./tmp/dynamodb_analysis.csv"):
|
119
119
|
"""Analyze DynamoDB tables and suggest cost optimizations."""
|
120
120
|
logger.info(f"Analyzing DynamoDB tables in {display_aws_account_info()}")
|
121
121
|
|
@@ -58,7 +58,7 @@ def get_cloudwatch_metrics(cloudwatch, instance_id, metric_name, days=7):
|
|
58
58
|
|
59
59
|
|
60
60
|
@click.command()
|
61
|
-
@click.option("--output-file", default="
|
61
|
+
@click.option("--output-file", default="./tmp/rds_cost_optimization.csv", help="Output CSV file path")
|
62
62
|
@click.option("--days", default=7, help="Number of days for CloudWatch metrics analysis")
|
63
63
|
@click.option("--include-storage", is_flag=True, help="Include detailed storage analysis")
|
64
64
|
def get_rds_list(output_file, days, include_storage):
|
@@ -86,7 +86,7 @@ def calculate_manual_snapshot_savings(snapshots_data: List[Dict]) -> Dict[str, f
|
|
86
86
|
|
87
87
|
|
88
88
|
@click.command()
|
89
|
-
@click.option("--output-file", default="
|
89
|
+
@click.option("--output-file", default="./tmp/rds_snapshots.csv", help="Output CSV file path")
|
90
90
|
@click.option("--old-days", default=30, help="Days threshold for considering snapshots old")
|
91
91
|
@click.option("--include-cost", is_flag=True, help="Include estimated cost analysis")
|
92
92
|
@click.option("--snapshot-type", help="Filter by snapshot type (automated, manual)")
|
@@ -93,7 +93,7 @@ def get_workspace_usage_by_hours(workspace_id, start_time, end_time):
|
|
93
93
|
|
94
94
|
|
95
95
|
@click.command()
|
96
|
-
@click.option("--output-file", default="
|
96
|
+
@click.option("--output-file", default="./tmp/workspaces.csv", help="Output CSV file path")
|
97
97
|
@click.option("--days", default=30, help="Number of days to analyze for usage metrics")
|
98
98
|
@click.option("--delete-unused", is_flag=True, help="🚨 HIGH-RISK: Delete unused WorkSpaces")
|
99
99
|
@click.option("--unused-days", default=90, help="Days threshold for considering WorkSpace unused")
|
@@ -102,7 +102,7 @@ def get_workspace_usage_by_hours(workspace_id, start_time, end_time):
|
|
102
102
|
@click.option("--analyze", is_flag=True, help="Perform detailed cost analysis")
|
103
103
|
@click.option("--dry-run", is_flag=True, default=True, help="Preview actions without execution")
|
104
104
|
def get_workspaces(
|
105
|
-
output_file: str = "
|
105
|
+
output_file: str = "./tmp/workspaces.csv",
|
106
106
|
days: int = 30,
|
107
107
|
delete_unused: bool = False,
|
108
108
|
unused_days: int = 90,
|
@@ -144,7 +144,7 @@ class ComplianceAutomation:
|
|
144
144
|
tester = SecurityBaselineTester(
|
145
145
|
profile=self.profile,
|
146
146
|
lang_code=language,
|
147
|
-
output_dir=f"
|
147
|
+
output_dir=f"./tmp/compliance_{datetime.now().strftime('%Y%m%d_%H%M%S')}",
|
148
148
|
)
|
149
149
|
|
150
150
|
# Execute assessment
|
@@ -492,7 +492,7 @@ class ComplianceAutomation:
|
|
492
492
|
else:
|
493
493
|
raise ValueError(f"Unsupported format: {format}")
|
494
494
|
|
495
|
-
dashboard_path = f"
|
495
|
+
dashboard_path = f"./tmp/{filename}"
|
496
496
|
with open(dashboard_path, "w") as f:
|
497
497
|
f.write(dashboard_content)
|
498
498
|
|
runbooks/vpc/__init__.py
CHANGED
@@ -22,6 +22,9 @@ from .heatmap_engine import NetworkingCostHeatMapEngine
|
|
22
22
|
from .manager_interface import BusinessRecommendation, ManagerDashboardConfig, VPCManagerInterface
|
23
23
|
from .networking_wrapper import VPCNetworkingWrapper
|
24
24
|
from .rich_formatters import display_cost_table, display_heatmap, display_optimization_recommendations
|
25
|
+
from .vpc_cleanup_integration import VPCCleanupFramework, VPCCleanupCandidate, VPCCleanupRisk, VPCCleanupPhase
|
26
|
+
from .cleanup_wrapper import VPCCleanupCLI, analyze_cleanup_candidates, validate_cleanup_safety, generate_business_report
|
27
|
+
from .runbooks_adapter import RunbooksAdapter
|
25
28
|
|
26
29
|
__all__ = [
|
27
30
|
"VPCNetworkingWrapper",
|
@@ -33,6 +36,15 @@ __all__ = [
|
|
33
36
|
"display_cost_table",
|
34
37
|
"display_heatmap",
|
35
38
|
"display_optimization_recommendations",
|
39
|
+
"VPCCleanupFramework",
|
40
|
+
"VPCCleanupCandidate",
|
41
|
+
"VPCCleanupRisk",
|
42
|
+
"VPCCleanupPhase",
|
43
|
+
"VPCCleanupCLI",
|
44
|
+
"analyze_cleanup_candidates",
|
45
|
+
"validate_cleanup_safety",
|
46
|
+
"generate_business_report",
|
47
|
+
"RunbooksAdapter",
|
36
48
|
]
|
37
49
|
|
38
50
|
# Import centralized version from main runbooks package
|