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
@@ -21,34 +21,40 @@ Strategic Alignment:
|
|
21
21
|
"""
|
22
22
|
|
23
23
|
import csv
|
24
|
-
import json
|
25
24
|
import hashlib
|
26
|
-
|
27
|
-
from pathlib import Path
|
28
|
-
from typing import Dict, List, Optional, Any, Tuple, Union
|
29
|
-
import tempfile
|
25
|
+
import json
|
30
26
|
import os
|
27
|
+
import tempfile
|
28
|
+
from datetime import date, datetime
|
29
|
+
from pathlib import Path
|
30
|
+
from typing import Any, Dict, List, Optional, Tuple, Union
|
31
31
|
|
32
32
|
from rich.console import Console
|
33
|
-
from rich.table import Table
|
34
33
|
from rich.panel import Panel
|
34
|
+
from rich.table import Table
|
35
35
|
from rich.text import Text
|
36
36
|
|
37
|
+
from ..common.rich_utils import console as rich_console
|
37
38
|
from ..common.rich_utils import (
|
38
|
-
|
39
|
-
|
40
|
-
|
39
|
+
create_panel,
|
40
|
+
create_table,
|
41
|
+
format_cost,
|
42
|
+
print_error,
|
43
|
+
print_header,
|
44
|
+
print_info,
|
45
|
+
print_success,
|
46
|
+
print_warning,
|
41
47
|
)
|
42
48
|
|
43
49
|
|
44
50
|
class ExecutiveReportGenerator:
|
45
51
|
"""
|
46
52
|
Professional executive report generator with multi-format support.
|
47
|
-
|
53
|
+
|
48
54
|
This class creates board-ready reports with executive-appropriate formatting,
|
49
55
|
business metrics, and compliance documentation suitable for C-level presentation.
|
50
56
|
"""
|
51
|
-
|
57
|
+
|
52
58
|
def __init__(self, console: Optional[Console] = None):
|
53
59
|
"""Initialize executive report generator."""
|
54
60
|
self.console = console or rich_console
|
@@ -56,103 +62,100 @@ class ExecutiveReportGenerator:
|
|
56
62
|
"generation_timestamp": datetime.now().isoformat(),
|
57
63
|
"generator_version": "1.0.0",
|
58
64
|
"compliance_frameworks": ["SOX", "SOC2", "Enterprise_Governance"],
|
59
|
-
"executive_ready": True
|
65
|
+
"executive_ready": True,
|
60
66
|
}
|
61
|
-
|
67
|
+
|
62
68
|
def generate_comprehensive_executive_package(
|
63
|
-
self,
|
64
|
-
analysis_results: Dict[str, Any],
|
65
|
-
output_dir: Union[str, Path],
|
66
|
-
include_formats: List[str] = None
|
69
|
+
self, analysis_results: Dict[str, Any], output_dir: Union[str, Path], include_formats: List[str] = None
|
67
70
|
) -> Dict[str, str]:
|
68
71
|
"""
|
69
72
|
Generate comprehensive executive package with all report formats.
|
70
|
-
|
73
|
+
|
71
74
|
Args:
|
72
75
|
analysis_results: Complete analysis results with validation and business metrics
|
73
76
|
output_dir: Directory to save generated reports
|
74
77
|
include_formats: List of formats to generate (defaults to all)
|
75
|
-
|
78
|
+
|
76
79
|
Returns:
|
77
80
|
Dictionary mapping format names to generated file paths
|
78
81
|
"""
|
79
82
|
output_path = Path(output_dir)
|
80
83
|
output_path.mkdir(parents=True, exist_ok=True)
|
81
|
-
|
84
|
+
|
82
85
|
if include_formats is None:
|
83
86
|
include_formats = ["html", "pdf", "csv", "json", "markdown", "executive_summary"]
|
84
|
-
|
87
|
+
|
85
88
|
generated_reports = {}
|
86
|
-
|
89
|
+
|
87
90
|
# Generate SHA256 verification for package integrity
|
88
91
|
package_verification = self._generate_package_verification(analysis_results)
|
89
|
-
|
92
|
+
|
90
93
|
try:
|
91
94
|
self.console.print(f"\n[bright_cyan]📊 Generating Executive Report Package[/]")
|
92
|
-
|
95
|
+
|
93
96
|
# HTML Executive Dashboard
|
94
97
|
if "html" in include_formats:
|
95
98
|
html_path = self._generate_html_executive_dashboard(analysis_results, output_path)
|
96
99
|
generated_reports["html"] = str(html_path)
|
97
100
|
self.console.print(f"[green]✅ HTML Executive Dashboard: {html_path.name}[/]")
|
98
|
-
|
101
|
+
|
99
102
|
# PDF Executive Summary
|
100
103
|
if "pdf" in include_formats:
|
101
104
|
pdf_path = self._generate_pdf_executive_report(analysis_results, output_path)
|
102
105
|
generated_reports["pdf"] = str(pdf_path)
|
103
106
|
self.console.print(f"[green]✅ PDF Executive Report: {pdf_path.name}[/]")
|
104
|
-
|
107
|
+
|
105
108
|
# CSV Financial Data
|
106
109
|
if "csv" in include_formats:
|
107
110
|
csv_path = self._generate_csv_financial_data(analysis_results, output_path)
|
108
111
|
generated_reports["csv"] = str(csv_path)
|
109
112
|
self.console.print(f"[green]✅ CSV Financial Data: {csv_path.name}[/]")
|
110
|
-
|
113
|
+
|
111
114
|
# JSON Structured Data
|
112
115
|
if "json" in include_formats:
|
113
116
|
json_path = self._generate_json_structured_data(analysis_results, output_path, package_verification)
|
114
117
|
generated_reports["json"] = str(json_path)
|
115
118
|
self.console.print(f"[green]✅ JSON Structured Data: {json_path.name}[/]")
|
116
|
-
|
119
|
+
|
117
120
|
# Markdown Documentation
|
118
121
|
if "markdown" in include_formats:
|
119
122
|
md_path = self._generate_markdown_documentation(analysis_results, output_path)
|
120
123
|
generated_reports["markdown"] = str(md_path)
|
121
124
|
self.console.print(f"[green]✅ Markdown Documentation: {md_path.name}[/]")
|
122
|
-
|
125
|
+
|
123
126
|
# Executive Summary (Text)
|
124
127
|
if "executive_summary" in include_formats:
|
125
128
|
summary_path = self._generate_executive_text_summary(analysis_results, output_path)
|
126
129
|
generated_reports["executive_summary"] = str(summary_path)
|
127
130
|
self.console.print(f"[green]✅ Executive Summary: {summary_path.name}[/]")
|
128
|
-
|
131
|
+
|
129
132
|
# Package integrity verification file
|
130
133
|
verification_path = output_path / "package_verification.json"
|
131
|
-
with open(verification_path,
|
134
|
+
with open(verification_path, "w") as f:
|
132
135
|
json.dump(package_verification, f, indent=2, default=str)
|
133
136
|
generated_reports["verification"] = str(verification_path)
|
134
|
-
|
137
|
+
|
135
138
|
# Display package summary
|
136
139
|
self._display_package_summary(generated_reports, output_path)
|
137
|
-
|
140
|
+
|
138
141
|
return generated_reports
|
139
|
-
|
142
|
+
|
140
143
|
except Exception as e:
|
141
144
|
print_error(f"Executive report generation failed: {str(e)}")
|
142
145
|
return {"error": str(e)}
|
143
|
-
|
146
|
+
|
144
147
|
def _generate_html_executive_dashboard(self, analysis_results: Dict, output_path: Path) -> Path:
|
145
148
|
"""Generate interactive HTML executive dashboard."""
|
146
149
|
html_file = output_path / "executive_cost_optimization_dashboard.html"
|
147
|
-
|
150
|
+
|
148
151
|
# Extract key metrics
|
149
|
-
executive_summary = analysis_results.get(
|
150
|
-
validation_results = analysis_results.get(
|
151
|
-
|
152
|
-
annual_savings = executive_summary.get(
|
153
|
-
roi_percentage = executive_summary.get(
|
154
|
-
confidence_level = executive_summary.get(
|
155
|
-
|
152
|
+
executive_summary = analysis_results.get("executive_summary", {})
|
153
|
+
validation_results = analysis_results.get("validation_results", {})
|
154
|
+
|
155
|
+
annual_savings = executive_summary.get("total_annual_opportunity", 0)
|
156
|
+
roi_percentage = executive_summary.get("roi_percentage", 0)
|
157
|
+
confidence_level = executive_summary.get("confidence_level", 0)
|
158
|
+
|
156
159
|
html_content = f"""
|
157
160
|
<!DOCTYPE html>
|
158
161
|
<html lang="en">
|
@@ -301,7 +304,7 @@ class ExecutiveReportGenerator:
|
|
301
304
|
<div class="header">
|
302
305
|
<h1>💼 Executive Cost Optimization Dashboard</h1>
|
303
306
|
<p>Board-Ready Financial Analysis & Strategic Recommendations</p>
|
304
|
-
<p>Generated: {datetime.now().strftime(
|
307
|
+
<p>Generated: {datetime.now().strftime("%B %d, %Y at %I:%M %p")}</p>
|
305
308
|
</div>
|
306
309
|
|
307
310
|
<div class="metrics-grid">
|
@@ -319,7 +322,7 @@ class ExecutiveReportGenerator:
|
|
319
322
|
</div>
|
320
323
|
<div class="metric-card">
|
321
324
|
<div class="metric-label">Payback Period</div>
|
322
|
-
<div class="metric-value">{executive_summary.get(
|
325
|
+
<div class="metric-value">{executive_summary.get("payback_period_months", 12):.1f} Mo</div>
|
323
326
|
</div>
|
324
327
|
</div>
|
325
328
|
|
@@ -380,7 +383,7 @@ class ExecutiveReportGenerator:
|
|
380
383
|
<div class="section">
|
381
384
|
<h2>📋 Risk Assessment & Mitigation</h2>
|
382
385
|
<div class="recommendations">
|
383
|
-
<h4>Risk Level: {executive_summary.get(
|
386
|
+
<h4>Risk Level: {executive_summary.get("risk_assessment", "Medium").title()}</h4>
|
384
387
|
<p>Implementation approach balanced for optimal savings with minimal operational disruption.</p>
|
385
388
|
|
386
389
|
<h4>Mitigation Strategies</h4>
|
@@ -410,25 +413,25 @@ class ExecutiveReportGenerator:
|
|
410
413
|
</body>
|
411
414
|
</html>
|
412
415
|
"""
|
413
|
-
|
414
|
-
with open(html_file,
|
416
|
+
|
417
|
+
with open(html_file, "w") as f:
|
415
418
|
f.write(html_content)
|
416
|
-
|
419
|
+
|
417
420
|
return html_file
|
418
|
-
|
421
|
+
|
419
422
|
def _generate_pdf_executive_report(self, analysis_results: Dict, output_path: Path) -> Path:
|
420
423
|
"""Generate PDF executive report (placeholder - would use reportlab in production)."""
|
421
424
|
pdf_file = output_path / "executive_cost_optimization_report.pdf"
|
422
|
-
|
425
|
+
|
423
426
|
# For now, create a detailed markdown that can be converted to PDF
|
424
427
|
markdown_content = self._create_pdf_content_markdown(analysis_results)
|
425
|
-
|
428
|
+
|
426
429
|
# Write as PDF-ready markdown (in production, would use reportlab or weasyprint)
|
427
|
-
with open(pdf_file.with_suffix(
|
430
|
+
with open(pdf_file.with_suffix(".md"), "w") as f:
|
428
431
|
f.write(markdown_content)
|
429
|
-
|
432
|
+
|
430
433
|
# Create placeholder PDF indicator
|
431
|
-
with open(pdf_file,
|
434
|
+
with open(pdf_file, "w") as f:
|
432
435
|
f.write(f"""PDF Executive Report Placeholder
|
433
436
|
|
434
437
|
Generated: {datetime.now().isoformat()}
|
@@ -436,102 +439,144 @@ Content: Executive Cost Optimization Analysis
|
|
436
439
|
Status: Ready for PDF conversion
|
437
440
|
|
438
441
|
To generate actual PDF:
|
439
|
-
1. Use pandoc: pandoc {pdf_file.with_suffix(
|
440
|
-
2. Or use weasyprint: weasyprint {pdf_file.with_suffix(
|
442
|
+
1. Use pandoc: pandoc {pdf_file.with_suffix(".md")} -o {pdf_file}
|
443
|
+
2. Or use weasyprint: weasyprint {pdf_file.with_suffix(".md")} {pdf_file}
|
441
444
|
3. Or integrate reportlab for native PDF generation
|
442
445
|
""")
|
443
|
-
|
446
|
+
|
444
447
|
return pdf_file
|
445
|
-
|
448
|
+
|
446
449
|
def _generate_csv_financial_data(self, analysis_results: Dict, output_path: Path) -> Path:
|
447
450
|
"""Generate CSV financial data export."""
|
448
451
|
csv_file = output_path / "executive_financial_data.csv"
|
449
|
-
|
450
|
-
executive_summary = analysis_results.get(
|
451
|
-
|
452
|
+
|
453
|
+
executive_summary = analysis_results.get("executive_summary", {})
|
454
|
+
|
452
455
|
# Create comprehensive financial data export
|
453
456
|
financial_data = [
|
454
457
|
["Metric", "Value", "Unit", "Confidence", "Notes"],
|
455
|
-
[
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
458
|
+
[
|
459
|
+
"Annual Savings Opportunity",
|
460
|
+
f"{executive_summary.get('total_annual_opportunity', 0):.2f}",
|
461
|
+
"USD",
|
462
|
+
f"{executive_summary.get('confidence_level', 0):.1f}%",
|
463
|
+
"Total projected annual cost reduction",
|
464
|
+
],
|
465
|
+
[
|
466
|
+
"Monthly Savings",
|
467
|
+
f"{executive_summary.get('total_annual_opportunity', 0) / 12:.2f}",
|
468
|
+
"USD",
|
469
|
+
f"{executive_summary.get('confidence_level', 0):.1f}%",
|
470
|
+
"Average monthly cost reduction",
|
471
|
+
],
|
472
|
+
[
|
473
|
+
"ROI Percentage",
|
474
|
+
f"{executive_summary.get('roi_percentage', 0):.1f}",
|
475
|
+
"Percent",
|
476
|
+
f"{executive_summary.get('confidence_level', 0):.1f}%",
|
477
|
+
"Return on investment percentage",
|
478
|
+
],
|
479
|
+
[
|
480
|
+
"Payback Period",
|
481
|
+
f"{executive_summary.get('payback_period_months', 12):.1f}",
|
482
|
+
"Months",
|
483
|
+
f"{executive_summary.get('confidence_level', 0):.1f}%",
|
484
|
+
"Time to recover implementation investment",
|
485
|
+
],
|
486
|
+
[
|
487
|
+
"Implementation Cost",
|
488
|
+
f"{executive_summary.get('total_annual_opportunity', 0) * 0.15:.2f}",
|
489
|
+
"USD",
|
490
|
+
"Estimated",
|
491
|
+
"15% of annual savings (industry standard)",
|
492
|
+
],
|
493
|
+
[
|
494
|
+
"Quick Wins Value",
|
495
|
+
f"{executive_summary.get('quick_wins_annual_value', 0):.2f}",
|
496
|
+
"USD",
|
497
|
+
"High",
|
498
|
+
"Immediate implementation opportunities",
|
499
|
+
],
|
500
|
+
[
|
501
|
+
"Quick Wins Count",
|
502
|
+
f"{executive_summary.get('quick_wins_count', 0)}",
|
503
|
+
"Count",
|
504
|
+
"High",
|
505
|
+
"Number of quick-win scenarios identified",
|
506
|
+
],
|
462
507
|
]
|
463
|
-
|
464
|
-
with open(csv_file,
|
508
|
+
|
509
|
+
with open(csv_file, "w", newline="") as f:
|
465
510
|
writer = csv.writer(f)
|
466
511
|
writer.writerows(financial_data)
|
467
|
-
|
512
|
+
|
468
513
|
return csv_file
|
469
|
-
|
514
|
+
|
470
515
|
def _generate_json_structured_data(self, analysis_results: Dict, output_path: Path, verification: Dict) -> Path:
|
471
516
|
"""Generate JSON structured data export with verification."""
|
472
517
|
json_file = output_path / "executive_cost_optimization_data.json"
|
473
|
-
|
518
|
+
|
474
519
|
# Create comprehensive structured data
|
475
520
|
structured_data = {
|
476
521
|
"report_metadata": self.report_metadata,
|
477
|
-
"executive_summary": analysis_results.get(
|
522
|
+
"executive_summary": analysis_results.get("executive_summary", {}),
|
478
523
|
"financial_metrics": {
|
479
|
-
"annual_opportunity": analysis_results.get(
|
480
|
-
"roi_percentage": analysis_results.get(
|
481
|
-
"confidence_level": analysis_results.get(
|
482
|
-
"payback_months": analysis_results.get(
|
524
|
+
"annual_opportunity": analysis_results.get("executive_summary", {}).get("total_annual_opportunity", 0),
|
525
|
+
"roi_percentage": analysis_results.get("executive_summary", {}).get("roi_percentage", 0),
|
526
|
+
"confidence_level": analysis_results.get("executive_summary", {}).get("confidence_level", 0),
|
527
|
+
"payback_months": analysis_results.get("executive_summary", {}).get("payback_period_months", 12),
|
483
528
|
},
|
484
|
-
"business_impact": analysis_results.get(
|
485
|
-
"validation_results": analysis_results.get(
|
486
|
-
"recommendations": analysis_results.get(
|
529
|
+
"business_impact": analysis_results.get("executive_summary", {}).get("business_impact_summary", {}),
|
530
|
+
"validation_results": analysis_results.get("validation_results", {}),
|
531
|
+
"recommendations": analysis_results.get("executive_summary", {}).get("recommended_next_steps", []),
|
487
532
|
"compliance_status": {
|
488
533
|
"sox_compliant": True,
|
489
534
|
"soc2_ready": True,
|
490
535
|
"enterprise_governance": True,
|
491
|
-
"audit_trail_complete": True
|
536
|
+
"audit_trail_complete": True,
|
492
537
|
},
|
493
538
|
"package_verification": verification,
|
494
|
-
"export_timestamp": datetime.now().isoformat()
|
539
|
+
"export_timestamp": datetime.now().isoformat(),
|
495
540
|
}
|
496
|
-
|
497
|
-
with open(json_file,
|
541
|
+
|
542
|
+
with open(json_file, "w") as f:
|
498
543
|
json.dump(structured_data, f, indent=2, default=str)
|
499
|
-
|
544
|
+
|
500
545
|
return json_file
|
501
|
-
|
546
|
+
|
502
547
|
def _generate_markdown_documentation(self, analysis_results: Dict, output_path: Path) -> Path:
|
503
548
|
"""Generate markdown documentation."""
|
504
549
|
md_file = output_path / "executive_cost_optimization_documentation.md"
|
505
|
-
|
506
|
-
executive_summary = analysis_results.get(
|
507
|
-
|
550
|
+
|
551
|
+
executive_summary = analysis_results.get("executive_summary", {})
|
552
|
+
|
508
553
|
markdown_content = f"""# 💼 Executive Cost Optimization Analysis
|
509
554
|
|
510
555
|
## Executive Summary
|
511
556
|
|
512
|
-
**Generated:** {datetime.now().strftime(
|
557
|
+
**Generated:** {datetime.now().strftime("%B %d, %Y")}
|
513
558
|
|
514
|
-
**Annual Cost Savings Opportunity:** ${executive_summary.get(
|
559
|
+
**Annual Cost Savings Opportunity:** ${executive_summary.get("total_annual_opportunity", 0):,.0f}
|
515
560
|
|
516
|
-
**Return on Investment:** {executive_summary.get(
|
561
|
+
**Return on Investment:** {executive_summary.get("roi_percentage", 0):.0f}%
|
517
562
|
|
518
|
-
**Confidence Level:** {executive_summary.get(
|
563
|
+
**Confidence Level:** {executive_summary.get("confidence_level", 0):.1f}%
|
519
564
|
|
520
|
-
**Payback Period:** {executive_summary.get(
|
565
|
+
**Payback Period:** {executive_summary.get("payback_period_months", 12):.1f} months
|
521
566
|
|
522
567
|
---
|
523
568
|
|
524
569
|
## Financial Impact Analysis
|
525
570
|
|
526
571
|
### Annual Financial Benefits
|
527
|
-
- **Total Annual Savings:** ${executive_summary.get(
|
528
|
-
- **Monthly Cost Reduction:** ${executive_summary.get(
|
529
|
-
- **Implementation Investment:** ${executive_summary.get(
|
530
|
-
- **Net Annual Benefit:** ${executive_summary.get(
|
572
|
+
- **Total Annual Savings:** ${executive_summary.get("total_annual_opportunity", 0):,.0f}
|
573
|
+
- **Monthly Cost Reduction:** ${executive_summary.get("total_annual_opportunity", 0) / 12:,.0f}
|
574
|
+
- **Implementation Investment:** ${executive_summary.get("total_annual_opportunity", 0) * 0.15:,.0f}
|
575
|
+
- **Net Annual Benefit:** ${executive_summary.get("total_annual_opportunity", 0) * 0.85:,.0f}
|
531
576
|
|
532
577
|
### Quick Wins Portfolio
|
533
|
-
- **Quick Wins Value:** ${executive_summary.get(
|
534
|
-
- **Quick Wins Count:** {executive_summary.get(
|
578
|
+
- **Quick Wins Value:** ${executive_summary.get("quick_wins_annual_value", 0):,.0f}
|
579
|
+
- **Quick Wins Count:** {executive_summary.get("quick_wins_count", 0)} opportunities
|
535
580
|
- **Implementation Timeline:** 30-60 days
|
536
581
|
|
537
582
|
---
|
@@ -539,17 +584,17 @@ To generate actual PDF:
|
|
539
584
|
## Strategic Recommendations
|
540
585
|
|
541
586
|
### Immediate Actions (Next 30 Days)
|
542
|
-
{chr(10).join([f"- {step}" for step in executive_summary.get(
|
587
|
+
{chr(10).join([f"- {step}" for step in executive_summary.get("recommended_next_steps", [])])}
|
543
588
|
|
544
589
|
### Priority Scenarios
|
545
|
-
{chr(10).join([f"- {scenario}" for scenario in executive_summary.get(
|
590
|
+
{chr(10).join([f"- {scenario}" for scenario in executive_summary.get("priority_scenarios", [])])}
|
546
591
|
|
547
592
|
---
|
548
593
|
|
549
594
|
## Risk Assessment & Compliance
|
550
595
|
|
551
596
|
### Risk Profile
|
552
|
-
- **Risk Level:** {executive_summary.get(
|
597
|
+
- **Risk Level:** {executive_summary.get("risk_assessment", "Medium").title()}
|
553
598
|
- **Implementation Approach:** Phased with validation checkpoints
|
554
599
|
- **Operational Impact:** Minimal disruption with proper planning
|
555
600
|
|
@@ -567,15 +612,15 @@ This analysis provides comprehensive cost optimization recommendations with vali
|
|
567
612
|
financial projections suitable for board presentation and executive decision-making.
|
568
613
|
|
569
614
|
**Key Decision Points:**
|
570
|
-
- Approve ${executive_summary.get(
|
615
|
+
- Approve ${executive_summary.get("total_annual_opportunity", 0) * 0.15:,.0f} implementation budget
|
571
616
|
- Establish cloud cost optimization team (3-5 FTE)
|
572
617
|
- Set quarterly cost reduction targets
|
573
618
|
- Integrate optimization KPIs into executive dashboards
|
574
619
|
|
575
620
|
**Expected Outcomes:**
|
576
|
-
- ${executive_summary.get(
|
577
|
-
- {executive_summary.get(
|
578
|
-
- {executive_summary.get(
|
621
|
+
- ${executive_summary.get("total_annual_opportunity", 0):,.0f} annual cost reduction
|
622
|
+
- {executive_summary.get("roi_percentage", 0):.0f}% return on investment
|
623
|
+
- {executive_summary.get("payback_period_months", 12):.1f} month payback period
|
579
624
|
- Sustainable cost management framework
|
580
625
|
|
581
626
|
---
|
@@ -585,29 +630,29 @@ financial projections suitable for board presentation and executive decision-mak
|
|
585
630
|
- Generated: `{datetime.now().isoformat()}`
|
586
631
|
- Status: ✅ Verified
|
587
632
|
"""
|
588
|
-
|
589
|
-
with open(md_file,
|
633
|
+
|
634
|
+
with open(md_file, "w") as f:
|
590
635
|
f.write(markdown_content)
|
591
|
-
|
636
|
+
|
592
637
|
return md_file
|
593
|
-
|
638
|
+
|
594
639
|
def _generate_executive_text_summary(self, analysis_results: Dict, output_path: Path) -> Path:
|
595
640
|
"""Generate executive text summary."""
|
596
641
|
summary_file = output_path / "executive_summary.txt"
|
597
|
-
|
598
|
-
executive_summary = analysis_results.get(
|
599
|
-
|
642
|
+
|
643
|
+
executive_summary = analysis_results.get("executive_summary", {})
|
644
|
+
|
600
645
|
summary_content = f"""EXECUTIVE COST OPTIMIZATION SUMMARY
|
601
646
|
====================================
|
602
647
|
|
603
|
-
Generated: {datetime.now().strftime(
|
648
|
+
Generated: {datetime.now().strftime("%B %d, %Y at %I:%M %p")}
|
604
649
|
|
605
650
|
FINANCIAL IMPACT
|
606
651
|
----------------
|
607
|
-
Annual Savings Opportunity: ${executive_summary.get(
|
608
|
-
Return on Investment: {executive_summary.get(
|
609
|
-
Confidence Level: {executive_summary.get(
|
610
|
-
Payback Period: {executive_summary.get(
|
652
|
+
Annual Savings Opportunity: ${executive_summary.get("total_annual_opportunity", 0):,.0f}
|
653
|
+
Return on Investment: {executive_summary.get("roi_percentage", 0):.0f}%
|
654
|
+
Confidence Level: {executive_summary.get("confidence_level", 0):.1f}%
|
655
|
+
Payback Period: {executive_summary.get("payback_period_months", 12):.1f} months
|
611
656
|
|
612
657
|
BOARD RECOMMENDATION
|
613
658
|
--------------------
|
@@ -616,7 +661,7 @@ and validated implementation approach.
|
|
616
661
|
|
617
662
|
IMMEDIATE ACTIONS REQUIRED
|
618
663
|
--------------------------
|
619
|
-
{chr(10).join([f"• {step}" for step in executive_summary.get(
|
664
|
+
{chr(10).join([f"• {step}" for step in executive_summary.get("recommended_next_steps", [])])}
|
620
665
|
|
621
666
|
COMPLIANCE STATUS
|
622
667
|
-----------------
|
@@ -627,20 +672,20 @@ Audit Trail: COMPLETE
|
|
627
672
|
|
628
673
|
BOARD PRESENTATION STATUS: READY FOR IMMEDIATE PRESENTATION
|
629
674
|
"""
|
630
|
-
|
631
|
-
with open(summary_file,
|
675
|
+
|
676
|
+
with open(summary_file, "w") as f:
|
632
677
|
f.write(summary_content)
|
633
|
-
|
678
|
+
|
634
679
|
return summary_file
|
635
|
-
|
680
|
+
|
636
681
|
def _create_pdf_content_markdown(self, analysis_results: Dict) -> str:
|
637
682
|
"""Create PDF-ready markdown content."""
|
638
|
-
executive_summary = analysis_results.get(
|
639
|
-
|
683
|
+
executive_summary = analysis_results.get("executive_summary", {})
|
684
|
+
|
640
685
|
return f"""---
|
641
686
|
title: Executive Cost Optimization Report
|
642
687
|
author: CloudOps-Runbooks Enterprise Platform
|
643
|
-
date: {datetime.now().strftime(
|
688
|
+
date: {datetime.now().strftime("%B %d, %Y")}
|
644
689
|
geometry: margin=1in
|
645
690
|
fontsize: 11pt
|
646
691
|
---
|
@@ -649,28 +694,28 @@ fontsize: 11pt
|
|
649
694
|
|
650
695
|
## Executive Summary
|
651
696
|
|
652
|
-
This comprehensive analysis identifies **${executive_summary.get(
|
697
|
+
This comprehensive analysis identifies **${executive_summary.get("total_annual_opportunity", 0):,.0f}** in annual cost savings opportunities with **{executive_summary.get("roi_percentage", 0):.0f}%** return on investment and **{executive_summary.get("confidence_level", 0):.1f}%** confidence level.
|
653
698
|
|
654
699
|
## Key Financial Metrics
|
655
700
|
|
656
701
|
| Metric | Value | Impact |
|
657
702
|
|--------|-------|---------|
|
658
|
-
| Annual Savings Opportunity | ${executive_summary.get(
|
659
|
-
| Return on Investment | {executive_summary.get(
|
660
|
-
| Payback Period | {executive_summary.get(
|
661
|
-
| Implementation Cost | ${executive_summary.get(
|
703
|
+
| Annual Savings Opportunity | ${executive_summary.get("total_annual_opportunity", 0):,.0f} | Direct P&L improvement |
|
704
|
+
| Return on Investment | {executive_summary.get("roi_percentage", 0):.0f}% | Investment efficiency |
|
705
|
+
| Payback Period | {executive_summary.get("payback_period_months", 12):.1f} months | Time to break-even |
|
706
|
+
| Implementation Cost | ${executive_summary.get("total_annual_opportunity", 0) * 0.15:,.0f} | Required investment |
|
662
707
|
|
663
708
|
## Strategic Recommendations
|
664
709
|
|
665
710
|
### Immediate Actions (30-60 Days)
|
666
|
-
{chr(10).join([f"- {step}" for step in executive_summary.get(
|
711
|
+
{chr(10).join([f"- {step}" for step in executive_summary.get("recommended_next_steps", [])])}
|
667
712
|
|
668
713
|
### Priority Implementation Areas
|
669
|
-
{chr(10).join([f"- {scenario}" for scenario in executive_summary.get(
|
714
|
+
{chr(10).join([f"- {scenario}" for scenario in executive_summary.get("priority_scenarios", [])])}
|
670
715
|
|
671
716
|
## Risk Assessment
|
672
717
|
|
673
|
-
**Risk Level:** {executive_summary.get(
|
718
|
+
**Risk Level:** {executive_summary.get("risk_assessment", "Medium").title()}
|
674
719
|
|
675
720
|
**Mitigation Strategy:** Phased implementation with comprehensive validation at each stage.
|
676
721
|
|
@@ -683,23 +728,23 @@ This comprehensive analysis identifies **${executive_summary.get('total_annual_o
|
|
683
728
|
|
684
729
|
## Board Decision Requirements
|
685
730
|
|
686
|
-
**Budget Approval:** ${executive_summary.get(
|
731
|
+
**Budget Approval:** ${executive_summary.get("total_annual_opportunity", 0) * 0.15:,.0f} for implementation
|
687
732
|
|
688
733
|
**Team Authorization:** 3-5 FTE cloud cost optimization team
|
689
734
|
|
690
735
|
**Timeline:** 90-day implementation for Phase 1 quick wins
|
691
736
|
|
692
|
-
**Expected ROI:** {executive_summary.get(
|
737
|
+
**Expected ROI:** {executive_summary.get("roi_percentage", 0):.0f}% return within {executive_summary.get("payback_period_months", 12):.1f} months
|
693
738
|
|
694
739
|
---
|
695
740
|
|
696
741
|
**Document Integrity:** SHA256 verified | **Status:** Board presentation ready
|
697
742
|
"""
|
698
|
-
|
743
|
+
|
699
744
|
def _calculate_content_hash(self, content: str) -> str:
|
700
745
|
"""Calculate SHA256 hash of content for verification."""
|
701
746
|
return hashlib.sha256(content.encode()).hexdigest()
|
702
|
-
|
747
|
+
|
703
748
|
def _generate_package_verification(self, analysis_results: Dict) -> Dict[str, Any]:
|
704
749
|
"""Generate package verification data with SHA256 hashes."""
|
705
750
|
verification_data = {
|
@@ -707,24 +752,24 @@ This comprehensive analysis identifies **${executive_summary.get('total_annual_o
|
|
707
752
|
"generation_timestamp": datetime.now().isoformat(),
|
708
753
|
"analysis_data_hash": self._calculate_content_hash(str(analysis_results)),
|
709
754
|
"compliance_frameworks": ["SOX", "SOC2", "Enterprise_Governance"],
|
710
|
-
"executive_ready": True
|
755
|
+
"executive_ready": True,
|
711
756
|
},
|
712
757
|
"financial_validation": {
|
713
|
-
"annual_savings": analysis_results.get(
|
714
|
-
"roi_percentage": analysis_results.get(
|
715
|
-
"confidence_level": analysis_results.get(
|
716
|
-
"validation_method": "embedded_mcp_enterprise_validation"
|
758
|
+
"annual_savings": analysis_results.get("executive_summary", {}).get("total_annual_opportunity", 0),
|
759
|
+
"roi_percentage": analysis_results.get("executive_summary", {}).get("roi_percentage", 0),
|
760
|
+
"confidence_level": analysis_results.get("executive_summary", {}).get("confidence_level", 0),
|
761
|
+
"validation_method": "embedded_mcp_enterprise_validation",
|
717
762
|
},
|
718
763
|
"integrity_verification": {
|
719
764
|
"sha256_enabled": True,
|
720
765
|
"tamper_detection": "ACTIVE",
|
721
766
|
"audit_trail": "COMPLETE",
|
722
|
-
"regulatory_compliance": "VERIFIED"
|
723
|
-
}
|
767
|
+
"regulatory_compliance": "VERIFIED",
|
768
|
+
},
|
724
769
|
}
|
725
|
-
|
770
|
+
|
726
771
|
return verification_data
|
727
|
-
|
772
|
+
|
728
773
|
def _display_package_summary(self, generated_reports: Dict[str, str], output_path: Path):
|
729
774
|
"""Display package generation summary."""
|
730
775
|
summary_panel = create_panel(
|
@@ -743,9 +788,9 @@ This comprehensive analysis identifies **${executive_summary.get('total_annual_o
|
|
743
788
|
|
744
789
|
⏰ **Recommended Review Timeline:** 24-48 hours for board preparation""",
|
745
790
|
title="Executive Package Complete",
|
746
|
-
border_style="bright_green"
|
791
|
+
border_style="bright_green",
|
747
792
|
)
|
748
|
-
|
793
|
+
|
749
794
|
self.console.print(summary_panel)
|
750
795
|
|
751
796
|
|
@@ -758,11 +803,11 @@ def create_executive_report_generator(console: Optional[Console] = None) -> Exec
|
|
758
803
|
def generate_executive_reports(analysis_results: Dict, output_dir: str) -> Dict[str, str]:
|
759
804
|
"""
|
760
805
|
Convenience function to generate executive reports.
|
761
|
-
|
806
|
+
|
762
807
|
Args:
|
763
808
|
analysis_results: Complete analysis results with business metrics
|
764
809
|
output_dir: Directory to save generated reports
|
765
|
-
|
810
|
+
|
766
811
|
Returns:
|
767
812
|
Dictionary mapping format names to generated file paths
|
768
813
|
"""
|
@@ -773,17 +818,15 @@ def generate_executive_reports(analysis_results: Dict, output_dir: str) -> Dict[
|
|
773
818
|
def generate_board_presentation_package(analysis_results: Dict, output_dir: str) -> Dict[str, str]:
|
774
819
|
"""
|
775
820
|
Generate board presentation package with essential formats.
|
776
|
-
|
821
|
+
|
777
822
|
Args:
|
778
823
|
analysis_results: Complete analysis results
|
779
824
|
output_dir: Directory to save reports
|
780
|
-
|
825
|
+
|
781
826
|
Returns:
|
782
827
|
Dictionary mapping format names to generated file paths
|
783
828
|
"""
|
784
829
|
generator = create_executive_report_generator()
|
785
830
|
return generator.generate_comprehensive_executive_package(
|
786
|
-
analysis_results,
|
787
|
-
|
788
|
-
include_formats=["html", "pdf", "executive_summary", "json", "verification"]
|
789
|
-
)
|
831
|
+
analysis_results, output_dir, include_formats=["html", "pdf", "executive_summary", "json", "verification"]
|
832
|
+
)
|