runbooks 1.1.3__py3-none-any.whl → 1.1.4__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/cfat/WEIGHT_CONFIG_README.md +1 -1
- runbooks/cfat/assessment/compliance.py +7 -7
- runbooks/cfat/models.py +6 -2
- runbooks/cfat/tests/__init__.py +6 -1
- runbooks/cli/__init__.py +13 -0
- runbooks/cli/commands/cfat.py +233 -0
- runbooks/cli/commands/finops.py +213 -0
- runbooks/cli/commands/inventory.py +276 -0
- runbooks/cli/commands/operate.py +266 -0
- runbooks/cli/commands/security.py +224 -0
- runbooks/cli/commands/validation.py +411 -0
- runbooks/cli/commands/vpc.py +246 -0
- runbooks/cli/registry.py +95 -0
- runbooks/cloudops/__init__.py +3 -3
- runbooks/cloudops/cost_optimizer.py +6 -6
- runbooks/cloudops/interfaces.py +2 -2
- runbooks/cloudops/mcp_cost_validation.py +3 -3
- runbooks/cloudops/notebook_framework.py +2 -2
- runbooks/common/aws_profile_manager.py +337 -0
- runbooks/common/aws_utils.py +1 -1
- runbooks/common/business_logic.py +3 -3
- runbooks/common/comprehensive_cost_explorer_integration.py +1 -1
- runbooks/common/cross_account_manager.py +1 -1
- runbooks/common/decorators.py +225 -0
- runbooks/common/mcp_cost_explorer_integration.py +2 -2
- runbooks/common/organizations_client.py +1 -1
- runbooks/common/patterns.py +206 -0
- runbooks/common/profile_utils.py +149 -14
- runbooks/common/rich_utils.py +502 -11
- runbooks/finops/README.md +8 -8
- runbooks/finops/__init__.py +4 -4
- runbooks/finops/business_cases.py +3 -3
- runbooks/finops/cost_optimizer.py +4 -4
- runbooks/finops/dashboard_router.py +2 -2
- runbooks/finops/ebs_cost_optimizer.py +4 -4
- runbooks/finops/ebs_optimizer.py +19 -2
- runbooks/finops/enhanced_progress.py +8 -8
- runbooks/finops/enterprise_wrappers.py +7 -7
- runbooks/finops/finops_scenarios.py +11 -11
- runbooks/finops/legacy_migration.py +8 -8
- runbooks/finops/markdown_exporter.py +2 -2
- runbooks/finops/multi_dashboard.py +1 -1
- runbooks/finops/nat_gateway_optimizer.py +1 -1
- runbooks/finops/optimizer.py +6 -6
- runbooks/finops/rds_snapshot_optimizer.py +2 -2
- runbooks/finops/scenario_cli_integration.py +13 -13
- runbooks/finops/scenarios.py +16 -16
- runbooks/finops/single_dashboard.py +10 -10
- runbooks/finops/tests/test_finops_dashboard.py +3 -3
- runbooks/finops/tests/test_reference_images_validation.py +2 -2
- runbooks/finops/tests/test_single_account_features.py +17 -17
- runbooks/finops/tests/validate_test_suite.py +1 -1
- runbooks/finops/validation_framework.py +5 -5
- runbooks/finops/vpc_cleanup_exporter.py +3 -3
- runbooks/finops/vpc_cleanup_optimizer.py +2 -2
- runbooks/finops/workspaces_analyzer.py +1 -1
- runbooks/hitl/enhanced_workflow_engine.py +1 -1
- runbooks/inventory/README.md +3 -3
- runbooks/inventory/Tests/common_test_data.py +30 -30
- runbooks/inventory/collectors/aws_comprehensive.py +28 -11
- runbooks/inventory/collectors/aws_networking.py +2 -2
- runbooks/inventory/discovery.md +2 -2
- runbooks/inventory/find_ec2_security_groups.py +1 -1
- runbooks/inventory/organizations_discovery.py +1 -1
- runbooks/inventory/vpc_analyzer.py +1 -1
- runbooks/inventory/vpc_flow_analyzer.py +2 -2
- runbooks/main.py +143 -9153
- runbooks/metrics/dora_metrics_engine.py +2 -2
- runbooks/operate/mcp_integration.py +1 -1
- runbooks/operate/networking_cost_heatmap.py +4 -2
- runbooks/operate/privatelink_operations.py +1 -1
- runbooks/operate/vpc_endpoints.py +1 -1
- runbooks/operate/vpc_operations.py +2 -2
- runbooks/remediation/commvault_ec2_analysis.py +1 -1
- runbooks/remediation/rds_snapshot_list.py +5 -5
- runbooks/remediation/workspaces_list.py +5 -5
- runbooks/security/integration_test_enterprise_security.py +5 -3
- runbooks/security/run_script.py +1 -1
- runbooks/sre/mcp_reliability_engine.py +6 -6
- runbooks/utils/version_validator.py +1 -1
- runbooks/validation/comprehensive_2way_validator.py +9 -4
- runbooks/vpc/heatmap_engine.py +7 -4
- runbooks/vpc/mcp_no_eni_validator.py +1 -1
- runbooks/vpc/unified_scenarios.py +7 -7
- {runbooks-1.1.3.dist-info → runbooks-1.1.4.dist-info}/METADATA +53 -52
- {runbooks-1.1.3.dist-info → runbooks-1.1.4.dist-info}/RECORD +90 -78
- {runbooks-1.1.3.dist-info → runbooks-1.1.4.dist-info}/WHEEL +0 -0
- {runbooks-1.1.3.dist-info → runbooks-1.1.4.dist-info}/entry_points.txt +0 -0
- {runbooks-1.1.3.dist-info → runbooks-1.1.4.dist-info}/licenses/LICENSE +0 -0
- {runbooks-1.1.3.dist-info → runbooks-1.1.4.dist-info}/top_level.txt +0 -0
@@ -100,7 +100,7 @@ class AWSCostOptimizer:
|
|
100
100
|
Returns:
|
101
101
|
Tuple (success, list_of_idle_instances)
|
102
102
|
"""
|
103
|
-
print_header("Cost Optimizer - Idle Instance Detection", "
|
103
|
+
print_header("Cost Optimizer - Idle Instance Detection", "latest version")
|
104
104
|
|
105
105
|
result = []
|
106
106
|
regions_to_check = [region] if region else self._get_all_regions()
|
@@ -409,7 +409,7 @@ class AWSCostOptimizer:
|
|
409
409
|
Returns:
|
410
410
|
Tuple (success, list_of_low_usage_volumes)
|
411
411
|
"""
|
412
|
-
print_header("Cost Optimizer - Low Usage EBS Volume Detection", "
|
412
|
+
print_header("Cost Optimizer - Low Usage EBS Volume Detection", "latest version")
|
413
413
|
|
414
414
|
result = []
|
415
415
|
regions_to_check = [region] if region else self._get_all_regions()
|
@@ -739,7 +739,7 @@ class AWSCostOptimizer:
|
|
739
739
|
Returns:
|
740
740
|
Tuple (success, list_of_unused_nat_gateways)
|
741
741
|
"""
|
742
|
-
print_header("Cost Optimizer - Unused NAT Gateway Detection", "
|
742
|
+
print_header("Cost Optimizer - Unused NAT Gateway Detection", "latest version")
|
743
743
|
|
744
744
|
result = []
|
745
745
|
regions_to_check = [region] if region else self._get_all_regions()
|
@@ -1206,7 +1206,7 @@ def comprehensive_cost_optimization(
|
|
1206
1206
|
- AWS_Delete_EBS_Volumes_With_Low_Usage.ipynb
|
1207
1207
|
"""
|
1208
1208
|
|
1209
|
-
print_header("Comprehensive AWS Cost Optimization", "
|
1209
|
+
print_header("Comprehensive AWS Cost Optimization", "latest version")
|
1210
1210
|
|
1211
1211
|
total_monthly_savings = 0.0
|
1212
1212
|
total_annual_savings = 0.0
|
@@ -283,7 +283,7 @@ class DashboardRouter:
|
|
283
283
|
int: Exit code (0 for success, 1 for failure)
|
284
284
|
"""
|
285
285
|
try:
|
286
|
-
print_header("FinOps Dashboard Router", "
|
286
|
+
print_header("FinOps Dashboard Router", "latest version")
|
287
287
|
|
288
288
|
# Detect use-case and route appropriately
|
289
289
|
use_case, routing_config = self.detect_use_case(args)
|
@@ -551,7 +551,7 @@ class DashboardRouter:
|
|
551
551
|
- Smooth progress tracking (no 0%→100% jumps)
|
552
552
|
"""
|
553
553
|
try:
|
554
|
-
print_header("Service-Per-Row Dashboard", "
|
554
|
+
print_header("Service-Per-Row Dashboard", "latest version")
|
555
555
|
print_info("🎯 Focus: TOP 10 Services with optimization insights")
|
556
556
|
|
557
557
|
# Get profile for analysis
|
@@ -16,7 +16,7 @@ Business Focus: CFO/Financial stakeholder optimization with quantified ROI analy
|
|
16
16
|
and enterprise-grade safety controls for multi-account EBS portfolio management.
|
17
17
|
|
18
18
|
Author: Enterprise Agile Team (6-Agent Coordination)
|
19
|
-
Version:
|
19
|
+
Version: latest version - Cost Optimization Portfolio
|
20
20
|
"""
|
21
21
|
|
22
22
|
import os
|
@@ -154,7 +154,7 @@ class EBSCostOptimizer:
|
|
154
154
|
Strategic Focus: Complete EBS portfolio analysis with quantified business impact
|
155
155
|
for enterprise financial decision making.
|
156
156
|
"""
|
157
|
-
print_header("EBS Volume Cost Optimization Engine", "Comprehensive Analysis
|
157
|
+
print_header("EBS Volume Cost Optimization Engine", "Comprehensive Analysis latest version")
|
158
158
|
|
159
159
|
regions = regions or ["us-east-1", "us-west-2", "eu-west-1"]
|
160
160
|
|
@@ -254,7 +254,7 @@ class EBSCostOptimizer:
|
|
254
254
|
Business Focus: 20% cost reduction with enhanced performance for GP2 volumes
|
255
255
|
Enterprise Value: $1.5M-$9.3M savings potential across large environments
|
256
256
|
"""
|
257
|
-
print_header("GP2 to GP3 Conversion Analysis", "Cost Optimization Engine
|
257
|
+
print_header("GP2 to GP3 Conversion Analysis", "Cost Optimization Engine latest version")
|
258
258
|
|
259
259
|
regions = regions or ["us-east-1", "us-west-2"]
|
260
260
|
|
@@ -329,7 +329,7 @@ EBS GP2 to GP3 Conversion Analysis Summary:
|
|
329
329
|
Business Focus: Eliminate ongoing costs for unused storage resources
|
330
330
|
Safety Focus: Comprehensive safety checks before cleanup recommendations
|
331
331
|
"""
|
332
|
-
print_header("Unattached EBS Volume Cleanup Analysis", "Resource Cleanup
|
332
|
+
print_header("Unattached EBS Volume Cleanup Analysis", "Resource Cleanup latest version")
|
333
333
|
|
334
334
|
regions = regions or ["us-east-1", "us-west-2"]
|
335
335
|
|
runbooks/finops/ebs_optimizer.py
CHANGED
@@ -513,8 +513,25 @@ class EBSOptimizer:
|
|
513
513
|
metrics = usage_metrics.get(volume.volume_id)
|
514
514
|
instance_state = getattr(volume, 'instance_state', None)
|
515
515
|
|
516
|
-
# Calculate current monthly cost
|
517
|
-
|
516
|
+
# Calculate current monthly cost using dynamic pricing (enterprise compliance)
|
517
|
+
volume_pricing = self.ebs_pricing.get(volume.volume_type)
|
518
|
+
if volume_pricing is None:
|
519
|
+
# Dynamic fallback for unknown volume types - no hardcoded values
|
520
|
+
try:
|
521
|
+
from ..common.aws_pricing import get_aws_pricing_engine
|
522
|
+
pricing_engine = get_aws_pricing_engine(profile=self.profile_name, enable_fallback=True)
|
523
|
+
volume_pricing_result = pricing_engine.get_ebs_pricing(volume.volume_type, "us-east-1")
|
524
|
+
volume_pricing = volume_pricing_result.monthly_cost_per_gb
|
525
|
+
print_info(f"Dynamic pricing resolved for {volume.volume_type}: ${volume_pricing:.4f}/GB/month")
|
526
|
+
except Exception as e:
|
527
|
+
print_error(f"ENTERPRISE COMPLIANCE VIOLATION: Cannot determine pricing for {volume.volume_type}: {e}")
|
528
|
+
print_warning("Universal compatibility requires dynamic pricing - hardcoded values not permitted")
|
529
|
+
raise RuntimeError(
|
530
|
+
f"Universal compatibility mode requires dynamic AWS pricing for volume type '{volume.volume_type}'. "
|
531
|
+
f"Please ensure your AWS profile has pricing:GetProducts permissions."
|
532
|
+
)
|
533
|
+
|
534
|
+
monthly_cost = volume.size * volume_pricing
|
518
535
|
annual_cost = monthly_cost * 12
|
519
536
|
|
520
537
|
# Initialize optimization analysis
|
@@ -327,7 +327,7 @@ def create_progress_tracker(console: Optional[Console] = None) -> EnhancedProgre
|
|
327
327
|
return EnhancedProgressTracker(console=console)
|
328
328
|
|
329
329
|
|
330
|
-
#
|
330
|
+
# Phase 2 Enhancements: Optimized Progress Tracking with Caching
|
331
331
|
|
332
332
|
|
333
333
|
class BusinessContextEnhancer:
|
@@ -369,8 +369,8 @@ class OptimizedProgressTracker(EnhancedProgressTracker):
|
|
369
369
|
"""
|
370
370
|
Optimized progress tracker with message caching and context enhancement.
|
371
371
|
|
372
|
-
|
373
|
-
context intelligence while preserving all
|
372
|
+
Phase 2 Enhancement: Adds 82% message caching efficiency and business
|
373
|
+
context intelligence while preserving all Phase 1 functionality.
|
374
374
|
|
375
375
|
Features:
|
376
376
|
- Message caching to reduce redundant generation by 82%
|
@@ -383,7 +383,7 @@ class OptimizedProgressTracker(EnhancedProgressTracker):
|
|
383
383
|
# Preserve all existing functionality
|
384
384
|
super().__init__(console)
|
385
385
|
|
386
|
-
#
|
386
|
+
# Phase 2 enhancements
|
387
387
|
self.message_cache = {} if enable_message_caching else None
|
388
388
|
self.context_enhancer = BusinessContextEnhancer()
|
389
389
|
self.audit_trail = []
|
@@ -444,7 +444,7 @@ class OptimizedProgressTracker(EnhancedProgressTracker):
|
|
444
444
|
"""
|
445
445
|
Create optimized progress context with caching and business intelligence.
|
446
446
|
|
447
|
-
Enhanced with
|
447
|
+
Enhanced with Phase 2 improvements while preserving all Phase 1 functionality.
|
448
448
|
"""
|
449
449
|
timing_info = self.operation_timing.get(operation_type, {"steps": 5, "estimated_seconds": 8})
|
450
450
|
|
@@ -481,7 +481,7 @@ class OptimizedProgressTracker(EnhancedProgressTracker):
|
|
481
481
|
|
482
482
|
class OptimizedProgressContext(ProgressContext):
|
483
483
|
"""
|
484
|
-
Optimized progress context with
|
484
|
+
Optimized progress context with Phase 2 enhancements.
|
485
485
|
|
486
486
|
Preserves all ProgressContext functionality while adding:
|
487
487
|
- Message caching integration
|
@@ -501,12 +501,12 @@ class OptimizedProgressContext(ProgressContext):
|
|
501
501
|
"""
|
502
502
|
Enhanced update_step with caching and business context.
|
503
503
|
|
504
|
-
Preserves all original functionality while adding
|
504
|
+
Preserves all original functionality while adding Phase 2 optimizations.
|
505
505
|
"""
|
506
506
|
if self.task_id is None:
|
507
507
|
return
|
508
508
|
|
509
|
-
#
|
509
|
+
# Phase 2 Enhancement: Generate cache key for message optimization
|
510
510
|
# Use operation_type and step_name only (not current_step) for better caching
|
511
511
|
cache_key = f"{self.operation_type}_{step_name}"
|
512
512
|
|
@@ -17,7 +17,7 @@ Key Features:
|
|
17
17
|
- Business stakeholder interface adapters
|
18
18
|
|
19
19
|
Author: Enterprise Agile Team (6-Agent Coordination)
|
20
|
-
Version:
|
20
|
+
Version: latest version - Distributed Architecture Framework
|
21
21
|
"""
|
22
22
|
|
23
23
|
import os
|
@@ -272,7 +272,7 @@ class CostOptimizationWrapper(EnterpriseWrapper):
|
|
272
272
|
) -> WrapperResult:
|
273
273
|
"""Execute EBS volume optimization with enterprise patterns."""
|
274
274
|
|
275
|
-
print_header("EBS Volume Cost Optimization", "Enterprise Wrapper
|
275
|
+
print_header("EBS Volume Cost Optimization", "Enterprise Wrapper latest version")
|
276
276
|
|
277
277
|
# Enterprise-specific profile resolution
|
278
278
|
aws_profile = self._resolve_enterprise_profile("cost_optimization")
|
@@ -372,7 +372,7 @@ class CostOptimizationWrapper(EnterpriseWrapper):
|
|
372
372
|
) -> WrapperResult:
|
373
373
|
"""Execute NAT Gateway consolidation with enterprise patterns."""
|
374
374
|
|
375
|
-
print_header("NAT Gateway Cost Optimization", "Enterprise Wrapper
|
375
|
+
print_header("NAT Gateway Cost Optimization", "Enterprise Wrapper latest version")
|
376
376
|
|
377
377
|
aws_profile = self._resolve_enterprise_profile("network_optimization")
|
378
378
|
operation_name = self.generate_faang_naming("nat_gateway", "consolidation_engine")
|
@@ -424,7 +424,7 @@ class CostOptimizationWrapper(EnterpriseWrapper):
|
|
424
424
|
) -> WrapperResult:
|
425
425
|
"""Execute Elastic IP cleanup with enterprise patterns."""
|
426
426
|
|
427
|
-
print_header("Elastic IP Resource Optimization", "Enterprise Wrapper
|
427
|
+
print_header("Elastic IP Resource Optimization", "Enterprise Wrapper latest version")
|
428
428
|
|
429
429
|
aws_profile = self._resolve_enterprise_profile("resource_cleanup")
|
430
430
|
operation_name = self.generate_faang_naming("elastic_ip", "efficiency_analyzer")
|
@@ -615,7 +615,7 @@ class SecurityComplianceWrapper(EnterpriseWrapper):
|
|
615
615
|
) -> WrapperResult:
|
616
616
|
"""Execute S3 encryption automation with compliance validation."""
|
617
617
|
|
618
|
-
print_header("S3 Bucket Encryption Automation", "Security Wrapper
|
618
|
+
print_header("S3 Bucket Encryption Automation", "Security Wrapper latest version")
|
619
619
|
|
620
620
|
aws_profile = self._resolve_enterprise_profile("security_analysis")
|
621
621
|
operation_name = self.generate_faang_naming("s3_security", "encryption_automation")
|
@@ -664,7 +664,7 @@ class SecurityComplianceWrapper(EnterpriseWrapper):
|
|
664
664
|
) -> WrapperResult:
|
665
665
|
"""Execute IAM security baseline assessment."""
|
666
666
|
|
667
|
-
print_header("IAM Security Baseline Assessment", "Security Wrapper
|
667
|
+
print_header("IAM Security Baseline Assessment", "Security Wrapper latest version")
|
668
668
|
|
669
669
|
aws_profile = self._resolve_enterprise_profile("security_analysis")
|
670
670
|
operation_name = self.generate_faang_naming("iam_security", "baseline_assessment")
|
@@ -833,7 +833,7 @@ def main():
|
|
833
833
|
risk_tolerance="medium"
|
834
834
|
)
|
835
835
|
|
836
|
-
print_header("Enterprise Wrapper Demo", "
|
836
|
+
print_header("Enterprise Wrapper Demo", "latest version")
|
837
837
|
|
838
838
|
# Demo cost optimization wrapper
|
839
839
|
cost_wrapper = create_enterprise_wrapper("cost_optimization", demo_config)
|
@@ -66,7 +66,7 @@ def create_business_scenarios_validated(profile_name: Optional[str] = None) -> D
|
|
66
66
|
'generated_at': datetime.now().isoformat(),
|
67
67
|
'data_source': 'Real AWS APIs via runbooks',
|
68
68
|
'validation_method': 'Direct API integration',
|
69
|
-
'version': '
|
69
|
+
'version': 'latest version'
|
70
70
|
}
|
71
71
|
}
|
72
72
|
|
@@ -83,12 +83,12 @@ def create_business_scenarios_validated(profile_name: Optional[str] = None) -> D
|
|
83
83
|
return {
|
84
84
|
'workspaces': {
|
85
85
|
'title': workspaces_scenario.display_name if workspaces_scenario else 'WorkSpaces Resource Optimization',
|
86
|
-
'savings_range': workspaces_scenario.savings_range_display if workspaces_scenario else '
|
86
|
+
'savings_range': workspaces_scenario.savings_range_display if workspaces_scenario else 'measurable range/year',
|
87
87
|
'risk_level': workspaces_scenario.risk_level if workspaces_scenario else 'Low'
|
88
88
|
},
|
89
89
|
'rds_snapshots': {
|
90
90
|
'title': rds_scenario.display_name if rds_scenario else 'RDS Storage Optimization',
|
91
|
-
'savings_range': rds_scenario.savings_range_display if rds_scenario else '
|
91
|
+
'savings_range': rds_scenario.savings_range_display if rds_scenario else 'measurable range/year',
|
92
92
|
'risk_level': rds_scenario.risk_level if rds_scenario else 'Medium'
|
93
93
|
},
|
94
94
|
'backup_investigation': {
|
@@ -100,7 +100,7 @@ def create_business_scenarios_validated(profile_name: Optional[str] = None) -> D
|
|
100
100
|
'generated_at': datetime.now().isoformat(),
|
101
101
|
'data_source': 'Dynamic business case configuration',
|
102
102
|
'validation_method': 'Template-based business scenarios',
|
103
|
-
'version': '
|
103
|
+
'version': 'latest version'
|
104
104
|
}
|
105
105
|
}
|
106
106
|
|
@@ -232,8 +232,8 @@ class FinOpsBusinessScenarios:
|
|
232
232
|
Manager Priority Business Scenarios - Executive Cost Optimization Framework
|
233
233
|
|
234
234
|
Proven Results:
|
235
|
-
- FinOps-24:
|
236
|
-
- FinOps-23:
|
235
|
+
- FinOps-24: significant annual savings savings (104% target achievement)
|
236
|
+
- FinOps-23: significant annual savings savings (498% target achievement)
|
237
237
|
- FinOps-25: Investigation framework ready for deployment
|
238
238
|
|
239
239
|
Total Achievement: $132,720+ annual savings (380-757% above original targets)
|
@@ -294,7 +294,7 @@ class FinOpsBusinessScenarios:
|
|
294
294
|
# Call proven workspaces_list module for technical analysis
|
295
295
|
print_info("Executing FinOps-24: WorkSpaces cleanup analysis...")
|
296
296
|
|
297
|
-
# Business insight: Target
|
297
|
+
# Business insight: Target significant annual savings savings
|
298
298
|
target_savings = self.finops_targets["finops_24"]["target"]
|
299
299
|
|
300
300
|
# Technical implementation note: This would call workspaces_list.analyze_workspaces()
|
@@ -321,7 +321,7 @@ class FinOpsBusinessScenarios:
|
|
321
321
|
# Call proven rds_snapshot_list module for technical analysis
|
322
322
|
print_info("Executing FinOps-23: RDS snapshots optimization...")
|
323
323
|
|
324
|
-
# Business insight: Target
|
324
|
+
# Business insight: Target measurable range annual savings
|
325
325
|
target_min = self.finops_targets["finops_23"]["target_min"]
|
326
326
|
target_max = self.finops_targets["finops_23"]["target_max"]
|
327
327
|
|
@@ -507,7 +507,7 @@ class FinOpsBusinessScenarios:
|
|
507
507
|
"""
|
508
508
|
FinOps-24: WorkSpaces cleanup detailed analysis.
|
509
509
|
|
510
|
-
Proven Result:
|
510
|
+
Proven Result: significant annual savings savings (104% target achievement)
|
511
511
|
Technical Foundation: Enhanced workspaces_list.py module
|
512
512
|
"""
|
513
513
|
print_header("FinOps-24", "WorkSpaces Cleanup Analysis")
|
@@ -774,7 +774,7 @@ def analyze_finops_24_workspaces(profile: Optional[str] = None) -> Dict[str, any
|
|
774
774
|
"""
|
775
775
|
FinOps-24: WorkSpaces cleanup detailed analysis wrapper.
|
776
776
|
|
777
|
-
Proven Result:
|
777
|
+
Proven Result: significant annual savings savings (104% target achievement)
|
778
778
|
Business Focus: Executive presentation with technical validation
|
779
779
|
"""
|
780
780
|
scenarios = FinOpsBusinessScenarios(profile_name=profile)
|
@@ -785,7 +785,7 @@ def analyze_finops_23_rds_snapshots(profile: Optional[str] = None) -> Dict[str,
|
|
785
785
|
"""
|
786
786
|
FinOps-23: RDS snapshots optimization detailed analysis wrapper.
|
787
787
|
|
788
|
-
Proven Result:
|
788
|
+
Proven Result: significant annual savings savings (498% target achievement)
|
789
789
|
Business Focus: Executive presentation with technical validation
|
790
790
|
"""
|
791
791
|
scenarios = FinOpsBusinessScenarios(profile_name=profile)
|
@@ -18,7 +18,7 @@ Key Features:
|
|
18
18
|
- Legacy deprecation strategies (Phase 3C)
|
19
19
|
|
20
20
|
Author: Enterprise Agile Team (6-Agent Coordination)
|
21
|
-
Version:
|
21
|
+
Version: latest version - Distributed Architecture Framework
|
22
22
|
"""
|
23
23
|
|
24
24
|
import os
|
@@ -146,7 +146,7 @@ class LegacyMigrationAnalyzer:
|
|
146
146
|
Returns:
|
147
147
|
List of discovered legacy notebooks with initial analysis
|
148
148
|
"""
|
149
|
-
print_header("Legacy Notebook Discovery", "Migration Analyzer
|
149
|
+
print_header("Legacy Notebook Discovery", "Migration Analyzer latest version")
|
150
150
|
|
151
151
|
discovered_notebooks = []
|
152
152
|
|
@@ -177,7 +177,7 @@ class LegacyMigrationAnalyzer:
|
|
177
177
|
Returns:
|
178
178
|
Dependency graph mapping notebook dependencies
|
179
179
|
"""
|
180
|
-
print_header("Dependency Analysis", "Migration Analyzer
|
180
|
+
print_header("Dependency Analysis", "Migration Analyzer latest version")
|
181
181
|
|
182
182
|
dependency_graph = {}
|
183
183
|
|
@@ -202,7 +202,7 @@ class LegacyMigrationAnalyzer:
|
|
202
202
|
|
203
203
|
Strategic Output: Executive-ready migration roadmap with phases and timelines
|
204
204
|
"""
|
205
|
-
print_header("Migration Planning", "Strategic Roadmap
|
205
|
+
print_header("Migration Planning", "Strategic Roadmap latest version")
|
206
206
|
|
207
207
|
if not self.analyzed_notebooks:
|
208
208
|
self.discover_legacy_notebooks()
|
@@ -297,7 +297,7 @@ class LegacyMigrationAnalyzer:
|
|
297
297
|
Returns:
|
298
298
|
Comprehensive validation report
|
299
299
|
"""
|
300
|
-
print_header("Migration Validation", "Integrity Check
|
300
|
+
print_header("Migration Validation", "Integrity Check latest version")
|
301
301
|
|
302
302
|
validation_report = {
|
303
303
|
"validation_timestamp": datetime.now().isoformat(),
|
@@ -334,7 +334,7 @@ class LegacyMigrationAnalyzer:
|
|
334
334
|
|
335
335
|
Strategic Focus: Safe deprecation of legacy notebooks with complete audit trail
|
336
336
|
"""
|
337
|
-
print_header("Legacy Deprecation Planning", "Phase 3C Strategy
|
337
|
+
print_header("Legacy Deprecation Planning", "Phase 3C Strategy latest version")
|
338
338
|
|
339
339
|
# Ensure all migrations are complete before deprecation
|
340
340
|
incomplete_migrations = [n for n in self.analyzed_notebooks
|
@@ -450,7 +450,7 @@ class LegacyMigrationAnalyzer:
|
|
450
450
|
"""Estimate savings from migrating this notebook."""
|
451
451
|
|
452
452
|
if business_function == "Cost Optimization":
|
453
|
-
return "
|
453
|
+
return "significant value range annual optimization potential"
|
454
454
|
elif business_function == "Security & Compliance":
|
455
455
|
return "Risk mitigation + compliance cost reduction"
|
456
456
|
else:
|
@@ -696,7 +696,7 @@ def create_migration_analyzer(legacy_path: str) -> LegacyMigrationAnalyzer:
|
|
696
696
|
def main():
|
697
697
|
"""Demo legacy migration framework."""
|
698
698
|
|
699
|
-
print_header("Legacy Migration Framework Demo", "
|
699
|
+
print_header("Legacy Migration Framework Demo", "latest version")
|
700
700
|
|
701
701
|
# Create migration analyzer
|
702
702
|
analyzer = create_migration_analyzer("README/CloudOps-Automation")
|
@@ -452,7 +452,7 @@ class MarkdownExporter:
|
|
452
452
|
"",
|
453
453
|
f"**Generated**: {timestamp}",
|
454
454
|
f"**Total VPC Candidates**: {len(vpc_candidates)}",
|
455
|
-
f"**Analysis Source**: CloudOps Runbooks VPC Module
|
455
|
+
f"**Analysis Source**: CloudOps Runbooks VPC Module latest version",
|
456
456
|
"",
|
457
457
|
"## VPC Cleanup Decision Table",
|
458
458
|
"",
|
@@ -639,7 +639,7 @@ class MarkdownExporter:
|
|
639
639
|
"4. **Review Required**: VPCs with unclear ownership or business impact",
|
640
640
|
"",
|
641
641
|
"---",
|
642
|
-
f"*Generated by CloudOps Runbooks VPC Module
|
642
|
+
f"*Generated by CloudOps Runbooks VPC Module latest version at {timestamp}*"
|
643
643
|
])
|
644
644
|
|
645
645
|
return "\n".join(markdown_lines)
|
@@ -161,7 +161,7 @@ class MultiAccountDashboard:
|
|
161
161
|
int: Exit code (0 for success, 1 for failure)
|
162
162
|
"""
|
163
163
|
try:
|
164
|
-
print_header("Multi-Account Financial Dashboard", "
|
164
|
+
print_header("Multi-Account Financial Dashboard", "latest version")
|
165
165
|
|
166
166
|
# Configuration display
|
167
167
|
top_accounts = getattr(args, "top_accounts", 5)
|
@@ -875,7 +875,7 @@ class EnhancedVPCCostOptimizer:
|
|
875
875
|
regions = ["us-east-1", "us-west-2", "eu-west-1"]
|
876
876
|
|
877
877
|
analysis_profile = profile or self.profile
|
878
|
-
print_header("Enhanced VPC Cost Optimization Analysis", "
|
878
|
+
print_header("Enhanced VPC Cost Optimization Analysis", "latest version")
|
879
879
|
print_info(f"Profile: {analysis_profile}")
|
880
880
|
print_info(f"Regions: {', '.join(regions)}")
|
881
881
|
|
runbooks/finops/optimizer.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"""
|
2
2
|
Cost Optimization Engine for 60-Account AWS Organization
|
3
|
-
|
3
|
+
Phase 1-3: Achieve 40% cost reduction ($1.4M annually)
|
4
4
|
"""
|
5
5
|
|
6
6
|
import json
|
@@ -424,16 +424,16 @@ class CostOptimizer:
|
|
424
424
|
"""Save cost optimization report to artifacts."""
|
425
425
|
import os
|
426
426
|
|
427
|
-
os.makedirs("artifacts/
|
427
|
+
os.makedirs("artifacts/phase-1/finops", exist_ok=True)
|
428
428
|
|
429
429
|
# Save JSON report
|
430
|
-
with open("artifacts/
|
430
|
+
with open("artifacts/phase-1/finops/cost-optimization-report.json", "w") as f:
|
431
431
|
json.dump(report, f, indent=2, default=str)
|
432
432
|
|
433
433
|
# Save CSV summary
|
434
434
|
import csv
|
435
435
|
|
436
|
-
with open("artifacts/
|
436
|
+
with open("artifacts/phase-1/finops/savings-opportunities.csv", "w", newline="") as f:
|
437
437
|
writer = csv.writer(f)
|
438
438
|
writer.writerow(
|
439
439
|
[
|
@@ -461,8 +461,8 @@ class CostOptimizer:
|
|
461
461
|
)
|
462
462
|
|
463
463
|
print("💰 Cost optimization report saved:")
|
464
|
-
print(" - artifacts/
|
465
|
-
print(" - artifacts/
|
464
|
+
print(" - artifacts/phase-1/finops/cost-optimization-report.json")
|
465
|
+
print(" - artifacts/phase-1/finops/savings-opportunities.csv")
|
466
466
|
|
467
467
|
# Helper methods
|
468
468
|
def _get_all_accounts(self) -> List[str]:
|
@@ -1240,7 +1240,7 @@ def optimize_rds_snapshots(
|
|
1240
1240
|
if profile.isdigit() and len(profile) == 12:
|
1241
1241
|
target_account_id = profile
|
1242
1242
|
# Use management profile for authentication when targeting specific account
|
1243
|
-
auth_profile = os.getenv('MANAGEMENT_PROFILE') or '
|
1243
|
+
auth_profile = os.getenv('MANAGEMENT_PROFILE') or '${MANAGEMENT_PROFILE}'
|
1244
1244
|
print_info(f"🎯 Target account analysis: {target_account_id}")
|
1245
1245
|
print_info(f"🔐 Authentication via: {auth_profile}")
|
1246
1246
|
else:
|
@@ -1358,7 +1358,7 @@ def export_results(snapshots: List[Dict], output_file: str, optimization_results
|
|
1358
1358
|
|
1359
1359
|
|
1360
1360
|
def validate_jira_targets(optimization_results: Dict) -> None:
|
1361
|
-
"""Validate against JIRA FinOps-23 targets (
|
1361
|
+
"""Validate against JIRA FinOps-23 targets (measurable range annual savings)"""
|
1362
1362
|
target_min = 5000.0
|
1363
1363
|
target_max = 24000.0
|
1364
1364
|
actual_savings = optimization_results['potential_annual_savings']
|
@@ -28,7 +28,7 @@ class SimplifiedScenarioMessaging:
|
|
28
28
|
"""
|
29
29
|
Simplified scenario messaging system for 75% console operation reduction.
|
30
30
|
|
31
|
-
|
31
|
+
Phase 2 Enhancement: Consolidates multiple console operations into
|
32
32
|
template-based single panel displays while preserving all information content.
|
33
33
|
|
34
34
|
Target: 75% reduction in console operations through panel consolidation.
|
@@ -101,7 +101,7 @@ class SimplifiedScenarioMessaging:
|
|
101
101
|
self.console.print(suggestion_panel)
|
102
102
|
|
103
103
|
def get_consolidation_metrics(self) -> Dict[str, Any]:
|
104
|
-
"""Get consolidation efficiency metrics for
|
104
|
+
"""Get consolidation efficiency metrics for Phase 2 validation."""
|
105
105
|
if self.operation_count == 0:
|
106
106
|
return {"efficiency": 0.0, "operations_saved": 0}
|
107
107
|
|
@@ -157,7 +157,7 @@ class ScenarioCliHelper:
|
|
157
157
|
"""
|
158
158
|
CLI integration helper for business scenario intelligence.
|
159
159
|
|
160
|
-
|
160
|
+
Phase 2 Enhanced: Integrates SimplifiedScenarioMessaging for 75% console
|
161
161
|
operation reduction while providing intelligent parameter recommendations.
|
162
162
|
"""
|
163
163
|
|
@@ -167,7 +167,7 @@ class ScenarioCliHelper:
|
|
167
167
|
self.business_config = get_business_case_config()
|
168
168
|
self.scenario_matrix = get_business_scenario_matrix()
|
169
169
|
|
170
|
-
#
|
170
|
+
# Phase 2 Enhancement: Integrate simplified messaging system
|
171
171
|
self.simplified_messaging = SimplifiedScenarioMessaging(self.console)
|
172
172
|
self.audit_trail = []
|
173
173
|
|
@@ -184,7 +184,7 @@ class ScenarioCliHelper:
|
|
184
184
|
"""
|
185
185
|
Display detailed help for a single scenario using simplified messaging.
|
186
186
|
|
187
|
-
|
187
|
+
Phase 2 Enhancement: Uses simplified messaging to reduce console operations
|
188
188
|
by 75% while preserving all information content.
|
189
189
|
"""
|
190
190
|
scenario_config = self.business_config.get_scenario(scenario_key)
|
@@ -192,13 +192,13 @@ class ScenarioCliHelper:
|
|
192
192
|
print_warning(f"Unknown scenario: {scenario_key}")
|
193
193
|
return
|
194
194
|
|
195
|
-
#
|
195
|
+
# Phase 2: Use simplified messaging for scenario overview (5 prints → 1 panel)
|
196
196
|
self.simplified_messaging.display_scenario_overview(scenario_config)
|
197
197
|
|
198
198
|
# Display parameter recommendations using simplified messaging
|
199
199
|
recommendations = self.scenario_matrix.get_parameter_recommendations(scenario_key)
|
200
200
|
if recommendations:
|
201
|
-
#
|
201
|
+
# Phase 2: Use simplified messaging for parameters (multiple prints → 1 panel)
|
202
202
|
self.simplified_messaging.display_parameter_recommendations(recommendations)
|
203
203
|
|
204
204
|
# Display optimal command in consolidated format
|
@@ -212,7 +212,7 @@ class ScenarioCliHelper:
|
|
212
212
|
else:
|
213
213
|
print_info("Using standard parameters for this scenario")
|
214
214
|
|
215
|
-
# Audit trail for
|
215
|
+
# Audit trail for Phase 2 compliance
|
216
216
|
self.audit_trail.append({
|
217
217
|
"action": "single_scenario_help",
|
218
218
|
"scenario": scenario_key,
|
@@ -318,12 +318,12 @@ class ScenarioCliHelper:
|
|
318
318
|
"""
|
319
319
|
Validate and provide suggestions using simplified messaging.
|
320
320
|
|
321
|
-
|
321
|
+
Phase 2 Enhancement: Uses simplified messaging to consolidate suggestion display.
|
322
322
|
"""
|
323
323
|
suggestions = self.scenario_matrix.validate_parameters_for_scenario(scenario_key, provided_params)
|
324
324
|
|
325
325
|
if suggestions:
|
326
|
-
#
|
326
|
+
# Phase 2: Use simplified messaging for suggestions
|
327
327
|
self.simplified_messaging.display_optimization_suggestions(scenario_key, suggestions)
|
328
328
|
|
329
329
|
# Audit trail
|
@@ -344,9 +344,9 @@ class ScenarioCliHelper:
|
|
344
344
|
base_help = self.business_config.get_scenario_help_text()
|
345
345
|
return f"{base_help}\n\nUse --scenario [scenario-name] for specific optimization analysis."
|
346
346
|
|
347
|
-
def
|
347
|
+
def get_console_performance_metrics(self) -> Dict[str, Any]:
|
348
348
|
"""
|
349
|
-
Get
|
349
|
+
Get Phase 2 performance metrics for enterprise audit compliance.
|
350
350
|
|
351
351
|
Returns consolidated metrics for:
|
352
352
|
- Message simplification efficiency (75% target)
|
@@ -356,7 +356,7 @@ class ScenarioCliHelper:
|
|
356
356
|
messaging_metrics = self.simplified_messaging.get_consolidation_metrics()
|
357
357
|
|
358
358
|
return {
|
359
|
-
"
|
359
|
+
"console_enhancement": "Console log improvements with message simplification",
|
360
360
|
"message_consolidation": messaging_metrics,
|
361
361
|
"audit_trail": {
|
362
362
|
"total_operations": len(self.audit_trail),
|