runbooks 1.1.4__py3-none-any.whl ā 1.1.6__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 +31 -2
- runbooks/__init___optimized.py +18 -4
- runbooks/_platform/__init__.py +1 -5
- runbooks/_platform/core/runbooks_wrapper.py +141 -138
- runbooks/aws2/accuracy_validator.py +812 -0
- runbooks/base.py +7 -0
- runbooks/cfat/assessment/compliance.py +1 -1
- runbooks/cfat/assessment/runner.py +1 -0
- runbooks/cfat/cloud_foundations_assessment.py +227 -239
- runbooks/cli/__init__.py +1 -1
- runbooks/cli/commands/cfat.py +64 -23
- runbooks/cli/commands/finops.py +1005 -54
- runbooks/cli/commands/inventory.py +135 -91
- runbooks/cli/commands/operate.py +9 -36
- runbooks/cli/commands/security.py +42 -18
- runbooks/cli/commands/validation.py +432 -18
- runbooks/cli/commands/vpc.py +81 -17
- runbooks/cli/registry.py +22 -10
- runbooks/cloudops/__init__.py +20 -27
- runbooks/cloudops/base.py +96 -107
- runbooks/cloudops/cost_optimizer.py +544 -542
- runbooks/cloudops/infrastructure_optimizer.py +5 -4
- runbooks/cloudops/interfaces.py +224 -225
- runbooks/cloudops/lifecycle_manager.py +5 -4
- runbooks/cloudops/mcp_cost_validation.py +252 -235
- runbooks/cloudops/models.py +78 -53
- runbooks/cloudops/monitoring_automation.py +5 -4
- runbooks/cloudops/notebook_framework.py +177 -213
- runbooks/cloudops/security_enforcer.py +125 -159
- runbooks/common/accuracy_validator.py +17 -12
- runbooks/common/aws_pricing.py +349 -326
- runbooks/common/aws_pricing_api.py +211 -212
- runbooks/common/aws_profile_manager.py +40 -36
- runbooks/common/aws_utils.py +74 -79
- runbooks/common/business_logic.py +126 -104
- runbooks/common/cli_decorators.py +36 -60
- runbooks/common/comprehensive_cost_explorer_integration.py +455 -463
- runbooks/common/cross_account_manager.py +197 -204
- runbooks/common/date_utils.py +27 -39
- runbooks/common/decorators.py +29 -19
- runbooks/common/dry_run_examples.py +173 -208
- runbooks/common/dry_run_framework.py +157 -155
- runbooks/common/enhanced_exception_handler.py +15 -4
- runbooks/common/enhanced_logging_example.py +50 -64
- runbooks/common/enhanced_logging_integration_example.py +65 -37
- runbooks/common/env_utils.py +16 -16
- runbooks/common/error_handling.py +40 -38
- runbooks/common/lazy_loader.py +41 -23
- runbooks/common/logging_integration_helper.py +79 -86
- runbooks/common/mcp_cost_explorer_integration.py +476 -493
- runbooks/common/mcp_integration.py +99 -79
- runbooks/common/memory_optimization.py +140 -118
- runbooks/common/module_cli_base.py +37 -58
- runbooks/common/organizations_client.py +175 -193
- runbooks/common/patterns.py +23 -25
- runbooks/common/performance_monitoring.py +67 -71
- runbooks/common/performance_optimization_engine.py +283 -274
- runbooks/common/profile_utils.py +111 -37
- runbooks/common/rich_utils.py +315 -141
- runbooks/common/sre_performance_suite.py +177 -186
- runbooks/enterprise/__init__.py +1 -1
- runbooks/enterprise/logging.py +144 -106
- runbooks/enterprise/security.py +187 -204
- runbooks/enterprise/validation.py +43 -56
- runbooks/finops/__init__.py +26 -30
- runbooks/finops/account_resolver.py +1 -1
- runbooks/finops/advanced_optimization_engine.py +980 -0
- runbooks/finops/automation_core.py +268 -231
- runbooks/finops/business_case_config.py +184 -179
- runbooks/finops/cli.py +660 -139
- runbooks/finops/commvault_ec2_analysis.py +157 -164
- runbooks/finops/compute_cost_optimizer.py +336 -320
- runbooks/finops/config.py +20 -20
- runbooks/finops/cost_optimizer.py +484 -618
- runbooks/finops/cost_processor.py +332 -214
- runbooks/finops/dashboard_runner.py +1006 -172
- runbooks/finops/ebs_cost_optimizer.py +991 -657
- runbooks/finops/elastic_ip_optimizer.py +317 -257
- runbooks/finops/enhanced_mcp_integration.py +340 -0
- runbooks/finops/enhanced_progress.py +32 -29
- runbooks/finops/enhanced_trend_visualization.py +3 -2
- runbooks/finops/enterprise_wrappers.py +223 -285
- runbooks/finops/executive_export.py +203 -160
- runbooks/finops/helpers.py +130 -288
- runbooks/finops/iam_guidance.py +1 -1
- runbooks/finops/infrastructure/__init__.py +80 -0
- runbooks/finops/infrastructure/commands.py +506 -0
- runbooks/finops/infrastructure/load_balancer_optimizer.py +866 -0
- runbooks/finops/infrastructure/vpc_endpoint_optimizer.py +832 -0
- runbooks/finops/markdown_exporter.py +337 -174
- runbooks/finops/mcp_validator.py +1952 -0
- runbooks/finops/nat_gateway_optimizer.py +1512 -481
- runbooks/finops/network_cost_optimizer.py +657 -587
- runbooks/finops/notebook_utils.py +226 -188
- runbooks/finops/optimization_engine.py +1136 -0
- runbooks/finops/optimizer.py +19 -23
- runbooks/finops/rds_snapshot_optimizer.py +367 -411
- runbooks/finops/reservation_optimizer.py +427 -363
- runbooks/finops/scenario_cli_integration.py +64 -65
- runbooks/finops/scenarios.py +1277 -438
- runbooks/finops/schemas.py +218 -182
- runbooks/finops/snapshot_manager.py +2289 -0
- runbooks/finops/types.py +3 -3
- runbooks/finops/validation_framework.py +259 -265
- runbooks/finops/vpc_cleanup_exporter.py +189 -144
- runbooks/finops/vpc_cleanup_optimizer.py +591 -573
- runbooks/finops/workspaces_analyzer.py +171 -182
- runbooks/integration/__init__.py +89 -0
- runbooks/integration/mcp_integration.py +1920 -0
- runbooks/inventory/CLAUDE.md +816 -0
- runbooks/inventory/__init__.py +2 -2
- runbooks/inventory/aws_decorators.py +2 -3
- runbooks/inventory/check_cloudtrail_compliance.py +2 -4
- runbooks/inventory/check_controltower_readiness.py +152 -151
- runbooks/inventory/check_landingzone_readiness.py +85 -84
- runbooks/inventory/cloud_foundations_integration.py +144 -149
- runbooks/inventory/collectors/aws_comprehensive.py +1 -1
- runbooks/inventory/collectors/aws_networking.py +109 -99
- runbooks/inventory/collectors/base.py +4 -0
- runbooks/inventory/core/collector.py +495 -313
- runbooks/inventory/core/formatter.py +11 -0
- runbooks/inventory/draw_org_structure.py +8 -9
- runbooks/inventory/drift_detection_cli.py +69 -96
- runbooks/inventory/ec2_vpc_utils.py +2 -2
- runbooks/inventory/find_cfn_drift_detection.py +5 -7
- runbooks/inventory/find_cfn_orphaned_stacks.py +7 -9
- runbooks/inventory/find_cfn_stackset_drift.py +5 -6
- runbooks/inventory/find_ec2_security_groups.py +48 -42
- runbooks/inventory/find_landingzone_versions.py +4 -6
- runbooks/inventory/find_vpc_flow_logs.py +7 -9
- runbooks/inventory/inventory_mcp_cli.py +48 -46
- runbooks/inventory/inventory_modules.py +103 -91
- runbooks/inventory/list_cfn_stacks.py +9 -10
- runbooks/inventory/list_cfn_stackset_operation_results.py +1 -3
- runbooks/inventory/list_cfn_stackset_operations.py +79 -57
- runbooks/inventory/list_cfn_stacksets.py +8 -10
- runbooks/inventory/list_config_recorders_delivery_channels.py +49 -39
- runbooks/inventory/list_ds_directories.py +65 -53
- runbooks/inventory/list_ec2_availability_zones.py +2 -4
- runbooks/inventory/list_ec2_ebs_volumes.py +32 -35
- runbooks/inventory/list_ec2_instances.py +23 -28
- runbooks/inventory/list_ecs_clusters_and_tasks.py +26 -34
- runbooks/inventory/list_elbs_load_balancers.py +22 -20
- runbooks/inventory/list_enis_network_interfaces.py +26 -33
- runbooks/inventory/list_guardduty_detectors.py +2 -4
- runbooks/inventory/list_iam_policies.py +2 -4
- runbooks/inventory/list_iam_roles.py +5 -7
- runbooks/inventory/list_iam_saml_providers.py +4 -6
- runbooks/inventory/list_lambda_functions.py +38 -38
- runbooks/inventory/list_org_accounts.py +6 -8
- runbooks/inventory/list_org_accounts_users.py +55 -44
- runbooks/inventory/list_rds_db_instances.py +31 -33
- runbooks/inventory/list_rds_snapshots_aggregator.py +192 -208
- runbooks/inventory/list_route53_hosted_zones.py +3 -5
- runbooks/inventory/list_servicecatalog_provisioned_products.py +37 -41
- runbooks/inventory/list_sns_topics.py +2 -4
- runbooks/inventory/list_ssm_parameters.py +4 -7
- runbooks/inventory/list_vpc_subnets.py +2 -4
- runbooks/inventory/list_vpcs.py +7 -10
- runbooks/inventory/mcp_inventory_validator.py +554 -468
- runbooks/inventory/mcp_vpc_validator.py +359 -442
- runbooks/inventory/organizations_discovery.py +63 -55
- runbooks/inventory/recover_cfn_stack_ids.py +7 -8
- runbooks/inventory/requirements.txt +0 -1
- runbooks/inventory/rich_inventory_display.py +35 -34
- runbooks/inventory/run_on_multi_accounts.py +3 -5
- runbooks/inventory/unified_validation_engine.py +281 -253
- runbooks/inventory/verify_ec2_security_groups.py +1 -1
- runbooks/inventory/vpc_analyzer.py +735 -697
- runbooks/inventory/vpc_architecture_validator.py +293 -348
- runbooks/inventory/vpc_dependency_analyzer.py +384 -380
- runbooks/inventory/vpc_flow_analyzer.py +1 -1
- runbooks/main.py +49 -34
- runbooks/main_final.py +91 -60
- runbooks/main_minimal.py +22 -10
- runbooks/main_optimized.py +131 -100
- runbooks/main_ultra_minimal.py +7 -2
- runbooks/mcp/__init__.py +36 -0
- runbooks/mcp/integration.py +679 -0
- runbooks/monitoring/performance_monitor.py +9 -4
- runbooks/operate/dynamodb_operations.py +3 -1
- runbooks/operate/ec2_operations.py +145 -137
- runbooks/operate/iam_operations.py +146 -152
- runbooks/operate/networking_cost_heatmap.py +29 -8
- runbooks/operate/rds_operations.py +223 -254
- runbooks/operate/s3_operations.py +107 -118
- runbooks/operate/vpc_operations.py +646 -616
- runbooks/remediation/base.py +1 -1
- runbooks/remediation/commons.py +10 -7
- runbooks/remediation/commvault_ec2_analysis.py +70 -66
- runbooks/remediation/ec2_unattached_ebs_volumes.py +1 -0
- runbooks/remediation/multi_account.py +24 -21
- runbooks/remediation/rds_snapshot_list.py +86 -60
- runbooks/remediation/remediation_cli.py +92 -146
- runbooks/remediation/universal_account_discovery.py +83 -79
- runbooks/remediation/workspaces_list.py +46 -41
- runbooks/security/__init__.py +19 -0
- runbooks/security/assessment_runner.py +1150 -0
- runbooks/security/baseline_checker.py +812 -0
- runbooks/security/cloudops_automation_security_validator.py +509 -535
- runbooks/security/compliance_automation_engine.py +17 -17
- runbooks/security/config/__init__.py +2 -2
- runbooks/security/config/compliance_config.py +50 -50
- runbooks/security/config_template_generator.py +63 -76
- runbooks/security/enterprise_security_framework.py +1 -1
- runbooks/security/executive_security_dashboard.py +519 -508
- runbooks/security/multi_account_security_controls.py +959 -1210
- runbooks/security/real_time_security_monitor.py +422 -444
- runbooks/security/security_baseline_tester.py +1 -1
- runbooks/security/security_cli.py +143 -112
- runbooks/security/test_2way_validation.py +439 -0
- runbooks/security/two_way_validation_framework.py +852 -0
- runbooks/sre/production_monitoring_framework.py +167 -177
- runbooks/tdd/__init__.py +15 -0
- runbooks/tdd/cli.py +1071 -0
- runbooks/utils/__init__.py +14 -17
- runbooks/utils/logger.py +7 -2
- runbooks/utils/version_validator.py +50 -47
- runbooks/validation/__init__.py +6 -6
- runbooks/validation/cli.py +9 -3
- runbooks/validation/comprehensive_2way_validator.py +745 -704
- runbooks/validation/mcp_validator.py +906 -228
- runbooks/validation/terraform_citations_validator.py +104 -115
- runbooks/validation/terraform_drift_detector.py +461 -454
- runbooks/vpc/README.md +617 -0
- runbooks/vpc/__init__.py +8 -1
- runbooks/vpc/analyzer.py +577 -0
- runbooks/vpc/cleanup_wrapper.py +476 -413
- runbooks/vpc/cli_cloudtrail_commands.py +339 -0
- runbooks/vpc/cli_mcp_validation_commands.py +480 -0
- runbooks/vpc/cloudtrail_audit_integration.py +717 -0
- runbooks/vpc/config.py +92 -97
- runbooks/vpc/cost_engine.py +411 -148
- runbooks/vpc/cost_explorer_integration.py +553 -0
- runbooks/vpc/cross_account_session.py +101 -106
- runbooks/vpc/enhanced_mcp_validation.py +917 -0
- runbooks/vpc/eni_gate_validator.py +961 -0
- runbooks/vpc/heatmap_engine.py +185 -160
- runbooks/vpc/mcp_no_eni_validator.py +680 -639
- runbooks/vpc/nat_gateway_optimizer.py +358 -0
- runbooks/vpc/networking_wrapper.py +15 -8
- runbooks/vpc/pdca_remediation_planner.py +528 -0
- runbooks/vpc/performance_optimized_analyzer.py +219 -231
- runbooks/vpc/runbooks_adapter.py +1167 -241
- runbooks/vpc/tdd_red_phase_stubs.py +601 -0
- runbooks/vpc/test_data_loader.py +358 -0
- runbooks/vpc/tests/conftest.py +314 -4
- runbooks/vpc/tests/test_cleanup_framework.py +1022 -0
- runbooks/vpc/tests/test_cost_engine.py +0 -2
- runbooks/vpc/topology_generator.py +326 -0
- runbooks/vpc/unified_scenarios.py +1297 -1124
- runbooks/vpc/vpc_cleanup_integration.py +1943 -1115
- runbooks-1.1.6.dist-info/METADATA +327 -0
- runbooks-1.1.6.dist-info/RECORD +489 -0
- runbooks/finops/README.md +0 -414
- runbooks/finops/accuracy_cross_validator.py +0 -647
- runbooks/finops/business_cases.py +0 -950
- runbooks/finops/dashboard_router.py +0 -922
- runbooks/finops/ebs_optimizer.py +0 -973
- runbooks/finops/embedded_mcp_validator.py +0 -1629
- runbooks/finops/enhanced_dashboard_runner.py +0 -527
- runbooks/finops/finops_dashboard.py +0 -584
- runbooks/finops/finops_scenarios.py +0 -1218
- runbooks/finops/legacy_migration.py +0 -730
- runbooks/finops/multi_dashboard.py +0 -1519
- runbooks/finops/single_dashboard.py +0 -1113
- runbooks/finops/unlimited_scenarios.py +0 -393
- runbooks-1.1.4.dist-info/METADATA +0 -800
- runbooks-1.1.4.dist-info/RECORD +0 -468
- {runbooks-1.1.4.dist-info ā runbooks-1.1.6.dist-info}/WHEEL +0 -0
- {runbooks-1.1.4.dist-info ā runbooks-1.1.6.dist-info}/entry_points.txt +0 -0
- {runbooks-1.1.4.dist-info ā runbooks-1.1.6.dist-info}/licenses/LICENSE +0 -0
- {runbooks-1.1.4.dist-info ā runbooks-1.1.6.dist-info}/top_level.txt +0 -0
@@ -22,63 +22,85 @@ Strategic Alignment:
|
|
22
22
|
- Universal $132K Cost Optimization Methodology: Executive ROI quantification
|
23
23
|
"""
|
24
24
|
|
25
|
+
import json
|
25
26
|
import os
|
26
27
|
import sys
|
27
|
-
import json
|
28
28
|
import tempfile
|
29
|
-
from datetime import datetime, timedelta
|
30
|
-
from pathlib import Path
|
31
|
-
from typing import Any, Dict, List, Optional, Union, Tuple
|
32
29
|
from dataclasses import dataclass, field
|
30
|
+
from datetime import datetime, timedelta
|
33
31
|
from enum import Enum
|
32
|
+
from pathlib import Path
|
33
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
34
34
|
|
35
35
|
# Jupyter and presentation imports
|
36
36
|
try:
|
37
|
-
from IPython.display import display, HTML, Markdown, Image
|
38
37
|
from IPython.core.display import Javascript
|
38
|
+
from IPython.display import HTML, Image, Markdown, display
|
39
|
+
|
39
40
|
JUPYTER_AVAILABLE = True
|
40
41
|
except ImportError:
|
41
42
|
JUPYTER_AVAILABLE = False
|
43
|
+
|
42
44
|
# Create stub classes for non-Jupyter environments
|
43
45
|
class HTML:
|
44
|
-
def __init__(self, data):
|
46
|
+
def __init__(self, data):
|
47
|
+
self.data = data
|
48
|
+
|
45
49
|
class Markdown:
|
46
|
-
def __init__(self, data):
|
50
|
+
def __init__(self, data):
|
51
|
+
self.data = data
|
52
|
+
|
47
53
|
class Image:
|
48
|
-
def __init__(self, data):
|
49
|
-
|
54
|
+
def __init__(self, data):
|
55
|
+
self.data = data
|
56
|
+
|
57
|
+
def display(*args):
|
58
|
+
pass
|
59
|
+
|
50
60
|
|
51
61
|
from ..common.rich_utils import (
|
52
|
-
|
53
|
-
|
62
|
+
STATUS_INDICATORS,
|
63
|
+
console,
|
64
|
+
create_panel,
|
65
|
+
create_progress_bar,
|
66
|
+
create_table,
|
67
|
+
format_cost,
|
68
|
+
print_error,
|
69
|
+
print_header,
|
70
|
+
print_info,
|
71
|
+
print_success,
|
72
|
+
print_warning,
|
54
73
|
)
|
55
|
-
from .automation_core import
|
74
|
+
from .automation_core import BusinessImpactLevel, OptimizationCategory, UniversalAutomationEngine
|
56
75
|
|
57
76
|
|
58
77
|
class StakeholderType(str, Enum):
|
59
78
|
"""Target stakeholder types for business interfaces."""
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
79
|
+
|
80
|
+
CTO = "cto" # Chief Technology Officer
|
81
|
+
CFO = "cfo" # Chief Financial Officer
|
82
|
+
PROCUREMENT = "procurement" # Procurement teams
|
83
|
+
FINOPS = "finops" # Financial Operations teams
|
84
|
+
MANAGER = "manager" # General management
|
65
85
|
|
66
86
|
|
67
87
|
class PresentationFormat(str, Enum):
|
68
88
|
"""Presentation output formats for stakeholders."""
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
89
|
+
|
90
|
+
JUPYTER = "jupyter" # Interactive Jupyter notebook
|
91
|
+
HTML = "html" # Static HTML export
|
92
|
+
PDF = "pdf" # Executive PDF report
|
93
|
+
MARKDOWN = "markdown" # Markdown documentation
|
94
|
+
JSON = "json" # Raw data export
|
74
95
|
|
75
96
|
|
76
97
|
@dataclass
|
77
98
|
class BusinessConfiguration:
|
78
99
|
"""Business configuration for non-technical users."""
|
100
|
+
|
79
101
|
analysis_scope: str = "multi_account" # single_account, multi_account
|
80
102
|
target_aws_profile: str = "default"
|
81
|
-
optimization_target: float = 0.25
|
103
|
+
optimization_target: float = 0.25 # 25% cost reduction target
|
82
104
|
executive_reporting: bool = True
|
83
105
|
export_formats: List[str] = field(default_factory=lambda: ["json", "csv", "html"])
|
84
106
|
stakeholder_type: StakeholderType = StakeholderType.MANAGER
|
@@ -87,6 +109,7 @@ class BusinessConfiguration:
|
|
87
109
|
@dataclass
|
88
110
|
class ExecutiveDashboardResult:
|
89
111
|
"""Executive dashboard analysis results."""
|
112
|
+
|
90
113
|
business_summary: Dict[str, Any]
|
91
114
|
financial_impact: Dict[str, Any]
|
92
115
|
optimization_recommendations: List[Dict[str, Any]]
|
@@ -99,7 +122,7 @@ class ExecutiveDashboardResult:
|
|
99
122
|
class ExecutiveDashboardCreator:
|
100
123
|
"""
|
101
124
|
Executive Dashboard Creator - Business Interface for Non-Technical Stakeholders
|
102
|
-
|
125
|
+
|
103
126
|
Following Universal $132K Cost Optimization Methodology with executive focus:
|
104
127
|
- CTO/CFO/Procurement ready cost analysis dashboards
|
105
128
|
- Non-technical user interfaces with business configuration
|
@@ -108,62 +131,61 @@ class ExecutiveDashboardCreator:
|
|
108
131
|
- MCP validation integration for executive-grade accuracy
|
109
132
|
- Strategic business intelligence with implementation roadmaps
|
110
133
|
"""
|
111
|
-
|
134
|
+
|
112
135
|
def __init__(self, automation_engine: UniversalAutomationEngine = None):
|
113
136
|
"""Initialize executive dashboard creator with automation engine."""
|
114
137
|
self.automation_engine = automation_engine or UniversalAutomationEngine()
|
115
138
|
self.temp_dir = Path(tempfile.gettempdir()) / "finops_dashboards"
|
116
139
|
self.temp_dir.mkdir(exist_ok=True)
|
117
|
-
|
118
|
-
async def create_executive_dashboard(
|
119
|
-
|
120
|
-
|
140
|
+
|
141
|
+
async def create_executive_dashboard(
|
142
|
+
self, config: BusinessConfiguration, optimization_focus: OptimizationCategory = None
|
143
|
+
) -> ExecutiveDashboardResult:
|
121
144
|
"""
|
122
145
|
Create comprehensive executive dashboard for business stakeholders.
|
123
|
-
|
146
|
+
|
124
147
|
Args:
|
125
148
|
config: Business configuration with stakeholder requirements
|
126
149
|
optimization_focus: Specific optimization category focus
|
127
|
-
|
150
|
+
|
128
151
|
Returns:
|
129
152
|
Complete executive dashboard with business intelligence
|
130
153
|
"""
|
131
154
|
print_header("Executive Dashboard Creator", "Enterprise Business Intelligence Platform v1.0")
|
132
|
-
|
155
|
+
|
133
156
|
try:
|
134
157
|
# Step 1: Business-focused resource analysis
|
135
158
|
console.print("š [bold blue]Executing Business-Focused Analysis...[/bold blue]")
|
136
159
|
analysis_results = await self.automation_engine.discover_resources_universal(
|
137
160
|
optimization_focus=optimization_focus
|
138
161
|
)
|
139
|
-
|
162
|
+
|
140
163
|
# Step 2: Executive business summary generation
|
141
164
|
console.print("š [bold blue]Generating Executive Business Summary...[/bold blue]")
|
142
165
|
business_summary = self._generate_business_summary(analysis_results, config)
|
143
|
-
|
166
|
+
|
144
167
|
# Step 3: Financial impact analysis for C-suite
|
145
168
|
console.print("š° [bold blue]Calculating Financial Impact Analysis...[/bold blue]")
|
146
169
|
financial_impact = self._calculate_executive_financial_impact(analysis_results, config)
|
147
|
-
|
170
|
+
|
148
171
|
# Step 4: Strategic optimization recommendations
|
149
172
|
console.print("šÆ [bold blue]Creating Strategic Recommendations...[/bold blue]")
|
150
173
|
recommendations = self._generate_optimization_recommendations(analysis_results, config)
|
151
|
-
|
174
|
+
|
152
175
|
# Step 5: Implementation roadmap for executives
|
153
176
|
console.print("šŗļø [bold blue]Building Implementation Roadmap...[/bold blue]")
|
154
177
|
roadmap = self._create_implementation_roadmap(analysis_results, config)
|
155
|
-
|
178
|
+
|
156
179
|
# Step 6: Risk assessment for executive decision making
|
157
180
|
console.print("ā ļø [bold blue]Generating Risk Assessment...[/bold blue]")
|
158
181
|
risk_assessment = self._generate_risk_assessment(analysis_results, config)
|
159
|
-
|
182
|
+
|
160
183
|
# Step 7: Export generation for stakeholder distribution
|
161
184
|
console.print("š¤ [bold blue]Generating Executive Export Files...[/bold blue]")
|
162
185
|
export_files = await self._generate_export_files(
|
163
|
-
analysis_results, business_summary, financial_impact,
|
164
|
-
recommendations, roadmap, risk_assessment, config
|
186
|
+
analysis_results, business_summary, financial_impact, recommendations, roadmap, risk_assessment, config
|
165
187
|
)
|
166
|
-
|
188
|
+
|
167
189
|
dashboard_result = ExecutiveDashboardResult(
|
168
190
|
business_summary=business_summary,
|
169
191
|
financial_impact=financial_impact,
|
@@ -171,23 +193,24 @@ class ExecutiveDashboardCreator:
|
|
171
193
|
implementation_roadmap=roadmap,
|
172
194
|
risk_assessment=risk_assessment,
|
173
195
|
export_files=export_files,
|
174
|
-
presentation_ready=True
|
196
|
+
presentation_ready=True,
|
175
197
|
)
|
176
|
-
|
198
|
+
|
177
199
|
# Display executive summary
|
178
200
|
self._display_executive_dashboard(dashboard_result, config)
|
179
|
-
|
201
|
+
|
180
202
|
return dashboard_result
|
181
|
-
|
203
|
+
|
182
204
|
except Exception as e:
|
183
205
|
print_error(f"Executive dashboard creation failed: {e}")
|
184
206
|
raise
|
185
|
-
|
186
|
-
def _generate_business_summary(
|
187
|
-
|
207
|
+
|
208
|
+
def _generate_business_summary(
|
209
|
+
self, analysis_results: Dict[str, Any], config: BusinessConfiguration
|
210
|
+
) -> Dict[str, Any]:
|
188
211
|
"""Generate executive business summary."""
|
189
212
|
business_impact = analysis_results["business_impact"]
|
190
|
-
|
213
|
+
|
191
214
|
return {
|
192
215
|
"total_infrastructure_analyzed": analysis_results["total_resources_discovered"],
|
193
216
|
"optimization_opportunities_identified": business_impact["total_opportunities"],
|
@@ -198,23 +221,26 @@ class ExecutiveDashboardCreator:
|
|
198
221
|
"regions_covered": len(analysis_results["regions_covered"]),
|
199
222
|
"analysis_timestamp": analysis_results["analysis_timestamp"],
|
200
223
|
"strategic_alignment": {
|
201
|
-
"cost_optimization_target": f"{config.optimization_target*100}%",
|
224
|
+
"cost_optimization_target": f"{config.optimization_target * 100}%",
|
202
225
|
"stakeholder_focus": config.stakeholder_type.value.upper(),
|
203
|
-
"enterprise_readiness": "C-suite presentation ready"
|
204
|
-
}
|
226
|
+
"enterprise_readiness": "C-suite presentation ready",
|
227
|
+
},
|
205
228
|
}
|
206
|
-
|
207
|
-
def _calculate_executive_financial_impact(
|
208
|
-
|
229
|
+
|
230
|
+
def _calculate_executive_financial_impact(
|
231
|
+
self, analysis_results: Dict[str, Any], config: BusinessConfiguration
|
232
|
+
) -> Dict[str, Any]:
|
209
233
|
"""Calculate financial impact for executive stakeholders."""
|
210
234
|
business_impact = analysis_results["business_impact"]
|
211
235
|
total_savings = business_impact["total_potential_annual_savings"]
|
212
|
-
|
236
|
+
|
213
237
|
# Calculate ROI metrics for executives
|
214
238
|
implementation_cost = 50_000 # Conservative implementation cost estimate
|
215
239
|
annual_savings = total_savings
|
216
|
-
roi_percentage = (
|
217
|
-
|
240
|
+
roi_percentage = (
|
241
|
+
((annual_savings - implementation_cost) / implementation_cost) * 100 if implementation_cost > 0 else 0
|
242
|
+
)
|
243
|
+
|
218
244
|
return {
|
219
245
|
"annual_cost_reduction": annual_savings,
|
220
246
|
"monthly_savings": annual_savings / 12,
|
@@ -225,15 +251,16 @@ class ExecutiveDashboardCreator:
|
|
225
251
|
"payback_period_months": (implementation_cost / (annual_savings / 12)) if annual_savings > 0 else 0,
|
226
252
|
"three_year_value": (annual_savings * 3) - implementation_cost,
|
227
253
|
"optimization_categories": business_impact["impact_by_category"],
|
228
|
-
"confidence_level": "High - Based on proven $132K methodology"
|
254
|
+
"confidence_level": "High - Based on proven $132K methodology",
|
229
255
|
}
|
230
|
-
|
231
|
-
def _generate_optimization_recommendations(
|
232
|
-
|
256
|
+
|
257
|
+
def _generate_optimization_recommendations(
|
258
|
+
self, analysis_results: Dict[str, Any], config: BusinessConfiguration
|
259
|
+
) -> List[Dict[str, Any]]:
|
233
260
|
"""Generate strategic optimization recommendations for executives."""
|
234
261
|
recommendations = []
|
235
262
|
business_impact = analysis_results["business_impact"]
|
236
|
-
|
263
|
+
|
237
264
|
# Priority recommendations based on business impact
|
238
265
|
for category, impact_data in business_impact["impact_by_category"].items():
|
239
266
|
recommendation = {
|
@@ -244,31 +271,32 @@ class ExecutiveDashboardCreator:
|
|
244
271
|
"resource_requirements": "Minimal - Automated analysis with human approval",
|
245
272
|
"risk_level": "Low - READ-ONLY analysis with safety controls",
|
246
273
|
"stakeholder_approval": "Required - Executive approval for implementation",
|
247
|
-
"success_criteria": f"ā„{config.optimization_target*100}% cost reduction achieved"
|
274
|
+
"success_criteria": f"ā„{config.optimization_target * 100}% cost reduction achieved",
|
248
275
|
}
|
249
|
-
|
276
|
+
|
250
277
|
# Add category-specific recommendations
|
251
278
|
if category == "cost_optimization":
|
252
279
|
recommendation["strategic_value"] = "Immediate financial impact with enterprise ROI"
|
253
280
|
recommendation["next_steps"] = [
|
254
281
|
"Executive approval for optimization implementation",
|
255
282
|
"Phased rollout with safety controls and monitoring",
|
256
|
-
"Monthly savings validation and reporting"
|
283
|
+
"Monthly savings validation and reporting",
|
257
284
|
]
|
258
285
|
elif category == "security_compliance":
|
259
286
|
recommendation["strategic_value"] = "Risk mitigation and regulatory compliance"
|
260
287
|
recommendation["next_steps"] = [
|
261
288
|
"Security team review and validation",
|
262
289
|
"Compliance framework alignment verification",
|
263
|
-
"Automated remediation with audit trails"
|
290
|
+
"Automated remediation with audit trails",
|
264
291
|
]
|
265
|
-
|
292
|
+
|
266
293
|
recommendations.append(recommendation)
|
267
|
-
|
294
|
+
|
268
295
|
return recommendations
|
269
|
-
|
270
|
-
def _create_implementation_roadmap(
|
271
|
-
|
296
|
+
|
297
|
+
def _create_implementation_roadmap(
|
298
|
+
self, analysis_results: Dict[str, Any], config: BusinessConfiguration
|
299
|
+
) -> Dict[str, Any]:
|
272
300
|
"""Create strategic implementation roadmap for executives."""
|
273
301
|
return {
|
274
302
|
"phase_1_analysis": {
|
@@ -277,19 +305,19 @@ class ExecutiveDashboardCreator:
|
|
277
305
|
"deliverables": [
|
278
306
|
"Executive business case with quantified ROI",
|
279
307
|
"Risk assessment and mitigation strategy",
|
280
|
-
"Implementation timeline and resource requirements"
|
308
|
+
"Implementation timeline and resource requirements",
|
281
309
|
],
|
282
|
-
"approval_required": "C-suite sign-off on optimization strategy"
|
310
|
+
"approval_required": "C-suite sign-off on optimization strategy",
|
283
311
|
},
|
284
312
|
"phase_2_implementation": {
|
285
|
-
"duration": "4-8 weeks",
|
313
|
+
"duration": "4-8 weeks",
|
286
314
|
"objective": "Systematic optimization execution with safety controls",
|
287
315
|
"deliverables": [
|
288
316
|
"Automated optimization with human approval gates",
|
289
317
|
"Real-time monitoring and progress reporting",
|
290
|
-
"Monthly savings validation and evidence collection"
|
318
|
+
"Monthly savings validation and evidence collection",
|
291
319
|
],
|
292
|
-
"approval_required": "Technical team validation and stakeholder updates"
|
320
|
+
"approval_required": "Technical team validation and stakeholder updates",
|
293
321
|
},
|
294
322
|
"phase_3_optimization": {
|
295
323
|
"duration": "Ongoing",
|
@@ -297,68 +325,72 @@ class ExecutiveDashboardCreator:
|
|
297
325
|
"deliverables": [
|
298
326
|
"Quarterly optimization reviews and adjustments",
|
299
327
|
"Annual ROI validation and strategic planning",
|
300
|
-
"Enterprise scaling and additional optimization opportunities"
|
328
|
+
"Enterprise scaling and additional optimization opportunities",
|
301
329
|
],
|
302
|
-
"approval_required": "Quarterly executive review and strategic adjustment"
|
330
|
+
"approval_required": "Quarterly executive review and strategic adjustment",
|
303
331
|
},
|
304
332
|
"success_metrics": {
|
305
|
-
"financial": f"ā„{config.optimization_target*100}% cost reduction achieved",
|
333
|
+
"financial": f"ā„{config.optimization_target * 100}% cost reduction achieved",
|
306
334
|
"operational": "ā„99.5% accuracy in cost projections and analysis",
|
307
|
-
"strategic": "Executive stakeholder satisfaction and continued investment"
|
308
|
-
}
|
335
|
+
"strategic": "Executive stakeholder satisfaction and continued investment",
|
336
|
+
},
|
309
337
|
}
|
310
|
-
|
311
|
-
def _generate_risk_assessment(
|
312
|
-
|
338
|
+
|
339
|
+
def _generate_risk_assessment(
|
340
|
+
self, analysis_results: Dict[str, Any], config: BusinessConfiguration
|
341
|
+
) -> Dict[str, Any]:
|
313
342
|
"""Generate comprehensive risk assessment for executive decision making."""
|
314
343
|
return {
|
315
344
|
"implementation_risks": {
|
316
345
|
"technical_risk": {
|
317
346
|
"level": "Low",
|
318
347
|
"description": "READ-ONLY analysis with established safety controls",
|
319
|
-
"mitigation": "Proven automation patterns with ā„99.5% accuracy validation"
|
348
|
+
"mitigation": "Proven automation patterns with ā„99.5% accuracy validation",
|
320
349
|
},
|
321
350
|
"financial_risk": {
|
322
|
-
"level": "Low",
|
351
|
+
"level": "Low",
|
323
352
|
"description": "Conservative savings projections based on proven methodology",
|
324
|
-
"mitigation": "Phased implementation with continuous ROI validation"
|
353
|
+
"mitigation": "Phased implementation with continuous ROI validation",
|
325
354
|
},
|
326
355
|
"operational_risk": {
|
327
356
|
"level": "Medium",
|
328
357
|
"description": "Change management and stakeholder adoption requirements",
|
329
|
-
"mitigation": "Executive sponsorship and comprehensive training program"
|
330
|
-
}
|
358
|
+
"mitigation": "Executive sponsorship and comprehensive training program",
|
359
|
+
},
|
331
360
|
},
|
332
361
|
"business_continuity": {
|
333
362
|
"service_impact": "Minimal - Analysis and optimization during maintenance windows",
|
334
363
|
"rollback_capability": "Complete - All changes reversible with audit trails",
|
335
|
-
"monitoring_coverage": "Comprehensive - Real-time performance and cost monitoring"
|
364
|
+
"monitoring_coverage": "Comprehensive - Real-time performance and cost monitoring",
|
336
365
|
},
|
337
366
|
"regulatory_compliance": {
|
338
367
|
"frameworks_supported": ["SOC2", "PCI-DSS", "HIPAA", "AWS Well-Architected"],
|
339
368
|
"audit_readiness": "Complete audit trails with evidence collection",
|
340
|
-
"compliance_validation": "ā„99.5% accuracy with MCP cross-validation"
|
369
|
+
"compliance_validation": "ā„99.5% accuracy with MCP cross-validation",
|
341
370
|
},
|
342
371
|
"strategic_risks": {
|
343
372
|
"competitive_advantage": "High - Cost optimization enables strategic reinvestment",
|
344
373
|
"vendor_dependencies": "Low - Multi-cloud patterns with AWS expertise",
|
345
|
-
"skill_requirements": "Minimal - Automated systems with executive dashboards"
|
374
|
+
"skill_requirements": "Minimal - Automated systems with executive dashboards",
|
346
375
|
},
|
347
376
|
"overall_risk_rating": "Low Risk, High Reward",
|
348
|
-
"executive_recommendation": "Proceed with implementation following proven methodology"
|
377
|
+
"executive_recommendation": "Proceed with implementation following proven methodology",
|
349
378
|
}
|
350
|
-
|
351
|
-
async def _generate_export_files(
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
379
|
+
|
380
|
+
async def _generate_export_files(
|
381
|
+
self,
|
382
|
+
analysis_results: Dict[str, Any],
|
383
|
+
business_summary: Dict[str, Any],
|
384
|
+
financial_impact: Dict[str, Any],
|
385
|
+
recommendations: List[Dict[str, Any]],
|
386
|
+
roadmap: Dict[str, Any],
|
387
|
+
risk_assessment: Dict[str, Any],
|
388
|
+
config: BusinessConfiguration,
|
389
|
+
) -> List[str]:
|
358
390
|
"""Generate export files for stakeholder distribution."""
|
359
391
|
export_files = []
|
360
392
|
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
361
|
-
|
393
|
+
|
362
394
|
try:
|
363
395
|
# Generate JSON export (detailed data)
|
364
396
|
if "json" in config.export_formats:
|
@@ -370,41 +402,44 @@ class ExecutiveDashboardCreator:
|
|
370
402
|
"recommendations": recommendations,
|
371
403
|
"implementation_roadmap": roadmap,
|
372
404
|
"risk_assessment": risk_assessment,
|
373
|
-
"generated_timestamp": datetime.now().isoformat()
|
405
|
+
"generated_timestamp": datetime.now().isoformat(),
|
374
406
|
}
|
375
|
-
|
376
|
-
with open(json_file,
|
407
|
+
|
408
|
+
with open(json_file, "w") as f:
|
377
409
|
json.dump(export_data, f, indent=2, default=str)
|
378
410
|
export_files.append(str(json_file))
|
379
|
-
|
411
|
+
|
380
412
|
# Generate HTML export (executive presentation)
|
381
413
|
if "html" in config.export_formats:
|
382
414
|
html_file = self.temp_dir / f"executive_dashboard_{timestamp}.html"
|
383
415
|
html_content = self._generate_html_report(
|
384
416
|
business_summary, financial_impact, recommendations, roadmap, risk_assessment, config
|
385
417
|
)
|
386
|
-
|
387
|
-
with open(html_file,
|
418
|
+
|
419
|
+
with open(html_file, "w") as f:
|
388
420
|
f.write(html_content)
|
389
421
|
export_files.append(str(html_file))
|
390
|
-
|
422
|
+
|
391
423
|
# Generate CSV export (financial data)
|
392
424
|
if "csv" in config.export_formats:
|
393
425
|
csv_file = self.temp_dir / f"executive_financial_analysis_{timestamp}.csv"
|
394
426
|
self._generate_csv_export(financial_impact, recommendations, csv_file)
|
395
427
|
export_files.append(str(csv_file))
|
396
|
-
|
428
|
+
|
397
429
|
except Exception as e:
|
398
430
|
print_warning(f"Export file generation incomplete: {str(e)}")
|
399
|
-
|
431
|
+
|
400
432
|
return export_files
|
401
|
-
|
402
|
-
def _generate_html_report(
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
433
|
+
|
434
|
+
def _generate_html_report(
|
435
|
+
self,
|
436
|
+
business_summary: Dict[str, Any],
|
437
|
+
financial_impact: Dict[str, Any],
|
438
|
+
recommendations: List[Dict[str, Any]],
|
439
|
+
roadmap: Dict[str, Any],
|
440
|
+
risk_assessment: Dict[str, Any],
|
441
|
+
config: BusinessConfiguration,
|
442
|
+
) -> str:
|
408
443
|
"""Generate HTML report for executive presentation."""
|
409
444
|
html_template = f"""
|
410
445
|
<!DOCTYPE html>
|
@@ -435,15 +470,15 @@ class ExecutiveDashboardCreator:
|
|
435
470
|
<div class="summary">
|
436
471
|
<h2>Executive Business Summary</h2>
|
437
472
|
<div class="metric">
|
438
|
-
<div class="metric-value">{business_summary[
|
473
|
+
<div class="metric-value">{business_summary["optimization_opportunities_identified"]:,}</div>
|
439
474
|
<div class="metric-label">Optimization Opportunities</div>
|
440
475
|
</div>
|
441
476
|
<div class="metric">
|
442
|
-
<div class="metric-value">{format_cost(business_summary[
|
477
|
+
<div class="metric-value">{format_cost(business_summary["annual_savings_potential"])}</div>
|
443
478
|
<div class="metric-label">Annual Savings Potential</div>
|
444
479
|
</div>
|
445
480
|
<div class="metric">
|
446
|
-
<div class="metric-value">{business_summary[
|
481
|
+
<div class="metric-value">{business_summary["roi_timeline_months"]}</div>
|
447
482
|
<div class="metric-label">ROI Timeline (Months)</div>
|
448
483
|
</div>
|
449
484
|
</div>
|
@@ -452,10 +487,10 @@ class ExecutiveDashboardCreator:
|
|
452
487
|
<h2>Financial Impact Analysis</h2>
|
453
488
|
<table>
|
454
489
|
<tr><th>Metric</th><th>Value</th><th>Timeline</th></tr>
|
455
|
-
<tr><td>Annual Cost Reduction</td><td>{format_cost(financial_impact[
|
456
|
-
<tr><td>Monthly Savings</td><td>{format_cost(financial_impact[
|
457
|
-
<tr><td>ROI Percentage</td><td>{financial_impact[
|
458
|
-
<tr><td>Payback Period</td><td>{financial_impact[
|
490
|
+
<tr><td>Annual Cost Reduction</td><td>{format_cost(financial_impact["annual_cost_reduction"])}</td><td>12 months</td></tr>
|
491
|
+
<tr><td>Monthly Savings</td><td>{format_cost(financial_impact["monthly_savings"])}</td><td>Ongoing</td></tr>
|
492
|
+
<tr><td>ROI Percentage</td><td>{financial_impact["roi_percentage"]:.1f}%</td><td>Annual</td></tr>
|
493
|
+
<tr><td>Payback Period</td><td>{financial_impact["payback_period_months"]:.1f} months</td><td>One-time</td></tr>
|
459
494
|
</table>
|
460
495
|
</div>
|
461
496
|
|
@@ -464,77 +499,77 @@ class ExecutiveDashboardCreator:
|
|
464
499
|
<table>
|
465
500
|
<tr><th>Category</th><th>Priority</th><th>Business Impact</th><th>Timeline</th></tr>
|
466
501
|
"""
|
467
|
-
|
502
|
+
|
468
503
|
for rec in recommendations:
|
469
504
|
html_template += f"""
|
470
505
|
<tr>
|
471
|
-
<td>{rec[
|
472
|
-
<td>{rec[
|
473
|
-
<td>{rec[
|
474
|
-
<td>{rec[
|
506
|
+
<td>{rec["category"]}</td>
|
507
|
+
<td>{rec["priority"]}</td>
|
508
|
+
<td>{rec["business_impact"]}</td>
|
509
|
+
<td>{rec["implementation_timeline"]}</td>
|
475
510
|
</tr>
|
476
511
|
"""
|
477
|
-
|
512
|
+
|
478
513
|
html_template += """
|
479
514
|
</table>
|
480
515
|
</div>
|
481
516
|
</body>
|
482
517
|
</html>
|
483
518
|
"""
|
484
|
-
|
519
|
+
|
485
520
|
return html_template
|
486
|
-
|
487
|
-
def _generate_csv_export(
|
488
|
-
|
489
|
-
|
521
|
+
|
522
|
+
def _generate_csv_export(
|
523
|
+
self, financial_impact: Dict[str, Any], recommendations: List[Dict[str, Any]], csv_file: Path
|
524
|
+
) -> None:
|
490
525
|
"""Generate CSV export for financial data."""
|
491
526
|
import csv
|
492
|
-
|
493
|
-
with open(csv_file,
|
527
|
+
|
528
|
+
with open(csv_file, "w", newline="") as f:
|
494
529
|
writer = csv.writer(f)
|
495
|
-
|
530
|
+
|
496
531
|
# Financial metrics section
|
497
|
-
writer.writerow([
|
498
|
-
writer.writerow([
|
499
|
-
writer.writerow(
|
500
|
-
|
501
|
-
|
502
|
-
writer.writerow([
|
532
|
+
writer.writerow(["Financial Analysis"])
|
533
|
+
writer.writerow(["Metric", "Value", "Notes"])
|
534
|
+
writer.writerow(
|
535
|
+
["Annual Cost Reduction", f"${financial_impact['annual_cost_reduction']:,.2f}", "Conservative estimate"]
|
536
|
+
)
|
537
|
+
writer.writerow(["Monthly Savings", f"${financial_impact['monthly_savings']:,.2f}", "Ongoing benefit"])
|
538
|
+
writer.writerow(["ROI Percentage", f"{financial_impact['roi_percentage']:.1f}%", "Annual return"])
|
539
|
+
writer.writerow(
|
540
|
+
["Payback Period", f"{financial_impact['payback_period_months']:.1f} months", "Investment recovery"]
|
541
|
+
)
|
503
542
|
writer.writerow([]) # Empty row
|
504
|
-
|
543
|
+
|
505
544
|
# Recommendations section
|
506
|
-
writer.writerow([
|
507
|
-
writer.writerow([
|
545
|
+
writer.writerow(["Strategic Recommendations"])
|
546
|
+
writer.writerow(["Category", "Priority", "Business Impact", "Implementation Timeline"])
|
508
547
|
for rec in recommendations:
|
509
|
-
writer.writerow(
|
510
|
-
rec[
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
])
|
515
|
-
|
516
|
-
def _display_executive_dashboard(self, result: ExecutiveDashboardResult,
|
517
|
-
config: BusinessConfiguration) -> None:
|
548
|
+
writer.writerow(
|
549
|
+
[rec["category"], rec["priority"], rec["business_impact"], rec["implementation_timeline"]]
|
550
|
+
)
|
551
|
+
|
552
|
+
def _display_executive_dashboard(self, result: ExecutiveDashboardResult, config: BusinessConfiguration) -> None:
|
518
553
|
"""Display executive dashboard summary."""
|
519
|
-
|
554
|
+
|
520
555
|
# Executive Summary Panel
|
521
556
|
summary = result.business_summary
|
522
557
|
financial = result.financial_impact
|
523
|
-
|
558
|
+
|
524
559
|
summary_content = f"""
|
525
560
|
š Executive Cost Optimization Dashboard
|
526
561
|
|
527
562
|
š Business Intelligence Summary:
|
528
|
-
⢠Infrastructure Analyzed: {summary[
|
529
|
-
⢠Optimization Opportunities: {summary[
|
530
|
-
⢠High-Impact Opportunities: {summary[
|
531
|
-
⢠Annual Savings Potential: {format_cost(summary[
|
563
|
+
⢠Infrastructure Analyzed: {summary["total_infrastructure_analyzed"]:,} resources
|
564
|
+
⢠Optimization Opportunities: {summary["optimization_opportunities_identified"]:,}
|
565
|
+
⢠High-Impact Opportunities: {summary["high_impact_opportunities"]:,}
|
566
|
+
⢠Annual Savings Potential: {format_cost(summary["annual_savings_potential"])}
|
532
567
|
|
533
568
|
š° Financial Impact Analysis:
|
534
|
-
⢠ROI Percentage: {financial[
|
535
|
-
⢠Payback Period: {financial[
|
536
|
-
⢠Net Annual Benefit: {format_cost(financial[
|
537
|
-
⢠Three-Year Value: {format_cost(financial[
|
569
|
+
⢠ROI Percentage: {financial["roi_percentage"]:.1f}%
|
570
|
+
⢠Payback Period: {financial["payback_period_months"]:.1f} months
|
571
|
+
⢠Net Annual Benefit: {format_cost(financial["net_annual_benefit"])}
|
572
|
+
⢠Three-Year Value: {format_cost(financial["three_year_value"])}
|
538
573
|
|
539
574
|
šÆ Executive Deliverables:
|
540
575
|
⢠Strategic Recommendations: {len(result.optimization_recommendations)} categories
|
@@ -544,16 +579,18 @@ class ExecutiveDashboardCreator:
|
|
544
579
|
|
545
580
|
š Strategic Alignment:
|
546
581
|
⢠Stakeholder Focus: {config.stakeholder_type.value.upper()}
|
547
|
-
⢠Optimization Target: {config.optimization_target*100}%
|
548
|
-
⢠Presentation Ready: {
|
582
|
+
⢠Optimization Target: {config.optimization_target * 100}%
|
583
|
+
⢠Presentation Ready: {"ā
Yes" if result.presentation_ready else "ā No"}
|
549
584
|
"""
|
550
|
-
|
551
|
-
console.print(
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
585
|
+
|
586
|
+
console.print(
|
587
|
+
create_panel(
|
588
|
+
summary_content.strip(),
|
589
|
+
title=f"š Executive Dashboard - {config.stakeholder_type.value.upper()} Ready",
|
590
|
+
border_style="green",
|
591
|
+
)
|
592
|
+
)
|
593
|
+
|
557
594
|
if result.export_files:
|
558
595
|
console.print("\nš¤ [bold blue]Export Files Generated:[/bold blue]")
|
559
596
|
for export_file in result.export_files:
|
@@ -561,16 +598,18 @@ class ExecutiveDashboardCreator:
|
|
561
598
|
|
562
599
|
|
563
600
|
# Factory functions for easy integration
|
564
|
-
def create_executive_dashboard_config(
|
565
|
-
|
566
|
-
|
601
|
+
def create_executive_dashboard_config(
|
602
|
+
stakeholder_type: StakeholderType = StakeholderType.MANAGER,
|
603
|
+
optimization_target: float = 0.25,
|
604
|
+
export_formats: List[str] = None,
|
605
|
+
) -> BusinessConfiguration:
|
567
606
|
"""Factory function to create business configuration."""
|
568
607
|
export_formats = export_formats or ["json", "csv", "html"]
|
569
608
|
return BusinessConfiguration(
|
570
609
|
stakeholder_type=stakeholder_type,
|
571
610
|
optimization_target=optimization_target,
|
572
611
|
export_formats=export_formats,
|
573
|
-
executive_reporting=True
|
612
|
+
executive_reporting=True,
|
574
613
|
)
|
575
614
|
|
576
615
|
|
@@ -579,18 +618,17 @@ def get_executive_dashboard_creator(automation_engine: UniversalAutomationEngine
|
|
579
618
|
return ExecutiveDashboardCreator(automation_engine)
|
580
619
|
|
581
620
|
|
582
|
-
if __name__ ==
|
621
|
+
if __name__ == "__main__":
|
583
622
|
# Test executive dashboard creation
|
584
623
|
import asyncio
|
585
|
-
|
624
|
+
|
586
625
|
async def test_dashboard():
|
587
626
|
creator = ExecutiveDashboardCreator()
|
588
627
|
config = create_executive_dashboard_config(StakeholderType.CFO)
|
589
|
-
|
628
|
+
|
590
629
|
result = await creator.create_executive_dashboard(
|
591
|
-
config=config,
|
592
|
-
optimization_focus=OptimizationCategory.COST_OPTIMIZATION
|
630
|
+
config=config, optimization_focus=OptimizationCategory.COST_OPTIMIZATION
|
593
631
|
)
|
594
632
|
console.print(f"Dashboard created with {len(result.export_files)} export files")
|
595
|
-
|
596
|
-
asyncio.run(test_dashboard())
|
633
|
+
|
634
|
+
asyncio.run(test_dashboard())
|