runbooks 0.9.2__py3-none-any.whl → 0.9.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.
Files changed (46) hide show
  1. runbooks/__init__.py +15 -6
  2. runbooks/cfat/__init__.py +3 -1
  3. runbooks/cloudops/__init__.py +3 -1
  4. runbooks/common/aws_utils.py +367 -0
  5. runbooks/common/enhanced_logging_example.py +239 -0
  6. runbooks/common/enhanced_logging_integration_example.py +257 -0
  7. runbooks/common/logging_integration_helper.py +344 -0
  8. runbooks/common/profile_utils.py +8 -6
  9. runbooks/common/rich_utils.py +347 -3
  10. runbooks/enterprise/logging.py +400 -38
  11. runbooks/finops/README.md +262 -406
  12. runbooks/finops/__init__.py +2 -1
  13. runbooks/finops/accuracy_cross_validator.py +12 -3
  14. runbooks/finops/commvault_ec2_analysis.py +415 -0
  15. runbooks/finops/cost_processor.py +718 -42
  16. runbooks/finops/dashboard_router.py +44 -22
  17. runbooks/finops/dashboard_runner.py +302 -39
  18. runbooks/finops/embedded_mcp_validator.py +358 -48
  19. runbooks/finops/finops_scenarios.py +771 -0
  20. runbooks/finops/multi_dashboard.py +30 -15
  21. runbooks/finops/single_dashboard.py +386 -58
  22. runbooks/finops/types.py +29 -4
  23. runbooks/inventory/__init__.py +2 -1
  24. runbooks/main.py +522 -29
  25. runbooks/operate/__init__.py +3 -1
  26. runbooks/remediation/__init__.py +3 -1
  27. runbooks/remediation/commons.py +55 -16
  28. runbooks/remediation/commvault_ec2_analysis.py +259 -0
  29. runbooks/remediation/rds_snapshot_list.py +267 -102
  30. runbooks/remediation/workspaces_list.py +182 -31
  31. runbooks/security/__init__.py +3 -1
  32. runbooks/sre/__init__.py +2 -1
  33. runbooks/utils/__init__.py +81 -6
  34. runbooks/utils/version_validator.py +241 -0
  35. runbooks/vpc/__init__.py +2 -1
  36. {runbooks-0.9.2.dist-info → runbooks-0.9.4.dist-info}/METADATA +98 -60
  37. {runbooks-0.9.2.dist-info → runbooks-0.9.4.dist-info}/RECORD +41 -38
  38. {runbooks-0.9.2.dist-info → runbooks-0.9.4.dist-info}/entry_points.txt +1 -0
  39. runbooks/inventory/cloudtrail.md +0 -727
  40. runbooks/inventory/discovery.md +0 -81
  41. runbooks/remediation/CLAUDE.md +0 -100
  42. runbooks/remediation/DOME9.md +0 -218
  43. runbooks/security/ENTERPRISE_SECURITY_FRAMEWORK.md +0 -506
  44. {runbooks-0.9.2.dist-info → runbooks-0.9.4.dist-info}/WHEEL +0 -0
  45. {runbooks-0.9.2.dist-info → runbooks-0.9.4.dist-info}/licenses/LICENSE +0 -0
  46. {runbooks-0.9.2.dist-info → runbooks-0.9.4.dist-info}/top_level.txt +0 -0
runbooks/finops/types.py CHANGED
@@ -19,6 +19,7 @@ class CostData(TypedDict):
19
19
  current_month: float
20
20
  last_month: float
21
21
  current_month_cost_by_service: List[Dict]
22
+ costs_by_service: Dict[str, float] # Service name to cost mapping for table display
22
23
  budgets: List[BudgetInfo]
23
24
  current_period_name: str
24
25
  previous_period_name: str
@@ -30,14 +31,38 @@ class CostData(TypedDict):
30
31
  monthly_costs: Optional[List[Tuple[str, float]]]
31
32
 
32
33
 
34
+ class DualMetricResult(TypedDict):
35
+ """Type for dual-metric cost analysis results."""
36
+
37
+ unblended_costs: Dict[str, float] # UnblendedCost data (technical perspective)
38
+ amortized_costs: Dict[str, float] # AmortizedCost data (financial perspective)
39
+ technical_total: float # Total UnblendedCost
40
+ financial_total: float # Total AmortizedCost
41
+ variance: float # Absolute difference between metrics
42
+ variance_percentage: float # Percentage variance
43
+ period_start: str
44
+ period_end: str
45
+ service_breakdown_unblended: List[Tuple[str, float]] # Technical service costs
46
+ service_breakdown_amortized: List[Tuple[str, float]] # Financial service costs
47
+
48
+
33
49
  class ProfileData(TypedDict):
34
- """Type for processed profile data."""
50
+ """Type for processed profile data with dual-metric support."""
35
51
 
36
- profile: str
52
+ profile_name: str # Updated field name for consistency
37
53
  account_id: str
38
- last_month: float
39
- current_month: float
54
+ current_month: float # Primary metric: UnblendedCost (technical accuracy)
55
+ previous_month: float # Updated field name for consistency
56
+ current_month_formatted: str # Formatted display for primary metric
57
+ previous_month_formatted: str # Formatted display for primary metric
58
+ # Dual-metric architecture foundation
59
+ current_month_amortized: Optional[float] # Secondary metric: AmortizedCost (financial accuracy)
60
+ previous_month_amortized: Optional[float] # Secondary metric: AmortizedCost (financial accuracy)
61
+ current_month_amortized_formatted: Optional[str] # Formatted display for secondary metric
62
+ previous_month_amortized_formatted: Optional[str] # Formatted display for secondary metric
63
+ metric_context: Optional[str] # "technical" or "financial" or "dual" context indicator
40
64
  service_costs: List[Tuple[str, float]]
65
+ service_costs_amortized: Optional[List[Tuple[str, float]]] # AmortizedCost service breakdown
41
66
  service_costs_formatted: List[str]
42
67
  budget_info: List[str]
43
68
  ec2_summary: Dict[str, int]
@@ -35,7 +35,8 @@ from runbooks.inventory.utils.aws_helpers import get_boto3_session, validate_aws
35
35
  # Utilities
36
36
  from runbooks.inventory.utils.validation import validate_aws_account_id, validate_resource_types
37
37
 
38
- __version__ = "1.0.0"
38
+ # Import centralized version from main runbooks package
39
+ from runbooks import __version__
39
40
 
40
41
  __all__ = [
41
42
  # Core functionality