replimap 0.4.0__tar.gz → 0.4.2__tar.gz
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.
- {replimap-0.4.0 → replimap-0.4.2}/.gitignore +7 -0
- {replimap-0.4.0 → replimap-0.4.2}/PKG-INFO +2 -5
- {replimap-0.4.0 → replimap-0.4.2}/README.md +1 -4
- replimap-0.4.2/docs/history/README.md +16 -0
- {replimap-0.4.0 → replimap-0.4.2}/pyproject.toml +1 -1
- {replimap-0.4.0 → replimap-0.4.2}/replimap/__init__.py +1 -1
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/license.py +6 -1
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/rightsizer.py +21 -383
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/__init__.py +1 -13
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/crypto/keys.py +1 -1
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/crypto/time_validator.py +2 -85
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/manager.py +179 -43
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/secure_models.py +10 -1
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/verifier.py +20 -1
- replimap-0.4.0/replimap/cli/utils/update_checker.py +0 -174
- replimap-0.4.0/replimap/licensing/developer.py +0 -272
- replimap-0.4.0/replimap/licensing/secure_manager.py +0 -961
- replimap-0.4.0/replimap/licensing/server/__init__.py +0 -17
- replimap-0.4.0/replimap/licensing/server/signer.py +0 -318
- replimap-0.4.0/replimap/licensing/version_check.py +0 -360
- {replimap-0.4.0 → replimap-0.4.2}/LICENSE +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/MANIFEST.in +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/docs/assets/demo.gif +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/api.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/apra_cps234_mapping.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/checkov_runner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/classifier.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/engine.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/exporters.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/fix_suggestions.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/hooks.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/models.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/nzism_mapping.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/rbnz_bs11_mapping.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/remediation/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/remediation/generator.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/remediation/models.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/remediation/templates/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/remediation/templates/ec2.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/remediation/templates/kms.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/remediation/templates/rds.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/remediation/templates/s3.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/renderer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/reporter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/soc2_mapping.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/templates/audit_report.html.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/terminal_reporter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/audit/trust_center.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cache/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cache/snapshots.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/analyze.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/audit.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/cache.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/clone.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/codify.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/completion.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/cost.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/deps.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/doctor.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/dr.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/drift.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/explain.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/graph.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/iam.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/load.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/profiles.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/remediate.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/residency.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/scan.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/snapshot.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/transfer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/trends.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/trust_center.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/unused.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/upgrade.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/commands/validate.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/common_options.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/completers.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/completion.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/config.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/context.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/error_catalog.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/error_renderer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/errors.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/output.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/params/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/params/definitions.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/params/registry.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/params/schema.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/state.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/telemetry.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/utils/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/utils/aws_session.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/utils/cache_resolution.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/utils/console.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/utils/console_links.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/utils/deprecation.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/utils/error_handler.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/utils/helpers.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/utils/options.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cli/utils/tips.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/empty_pruner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/generators/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/generators/backend.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/generators/hcl.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/generators/imports.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/generators/output.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/generators/readme.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/generators/variables.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/hcl_types.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/pipeline.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/schema_mapper.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/schema_rules.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/set_sorter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/base.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/cleanup_transformer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/data_source_filter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/default_filter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/global_filter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/iam_normalizer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/import_resolver.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/lifecycle_protector.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/managed_filter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/naming_transformer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/ref_transformer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/schema_filter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/secrets_transformer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transformers/sg_splitter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/transforms.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/type_caster.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/utils/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/codify/utils/config_integrity_checker.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/compliance/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/compliance/audit/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/compliance/audit/renderer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/compliance/codify_checker.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/compliance/compliance_tf_registry.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/compliance/data_residency.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/compliance/drift/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/compliance/drift/exemptions.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/compliance/drift/mapping.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/compliance/drift/report.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/compliance/drift/rules.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/analysis/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/analysis/centrality.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/async_aws.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/aws_config.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/bootstrap.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/browser.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/cache.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/cache_manager.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/circuit_breaker.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/concurrency.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/config.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/constants.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/context.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/enrichment/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/enrichment/enricher.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/enrichment/metadata_extractor.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/enrichment/network_analyzer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/errors.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/filters.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/first_run.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/formatters/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/formatters/sarif.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/graph/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/graph/algorithms.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/graph_engine.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/graph_tracer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/identity.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/identity_resolver.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/logging.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/models.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/naming.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/operations.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/pagination.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/pagination_config.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/rate_limiter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/resilience/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/resilience/circuit_breaker.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/resilience/errors/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/resilience/errors/classifier.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/resilience/errors/loader.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/resilience/errors/rules.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/retry.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/sanitizer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/scope.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/security/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/security/credential_checker.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/security/drift.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/security/global_sanitizer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/security/iam_generator.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/security/patterns.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/security/redactor.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/security/scrubber.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/security/session_manager.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/security/storage.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/selection.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/signals.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/state.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/storage.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/topology_constraints.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/unified_storage/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/unified_storage/adapter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/unified_storage/base.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/unified_storage/engine.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/unified_storage/migrate.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/core/unified_storage/sqlite_backend.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/constants.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/estimator.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/explorer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/local_rightsizer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/models.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/pricing.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/pricing_engine.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/reporter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/ri_aware.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/transfer_analyzer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/trends.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/cost/unused_detector.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/data/field_hints.yaml +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/data/schema_rules.yaml +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/decisions/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/decisions/cli.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/decisions/manager.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/decisions/models.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/dependencies/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/dependencies/graph_builder.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/dependencies/impact_calculator.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/dependencies/models.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/dependencies/reporter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/dependencies/weights.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/analyzers/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/analyzers/asg.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/analyzers/ec2.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/analyzers/elasticache.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/analyzers/elb.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/analyzers/graph_fallback.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/analyzers/iam_role.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/analyzers/lambda_func.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/analyzers/rds.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/analyzers/s3.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/analyzers/security_group.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/base_analyzer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/blast_radius.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/implicit_resolver.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/models.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/deps/reporter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/dr/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/dr/readiness.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/drift/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/drift/comparator.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/drift/engine.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/drift/ignore.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/drift/models.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/drift/normalizer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/drift/reporter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/drift/state_parser.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/drift/templates/drift_report.html.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/extraction/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/extraction/hints.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/aggregation.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/builder.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/cost_overlay.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/cross_region.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/drift.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/environment.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/filters.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/formatters/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/formatters/d3.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/formatters/json_format.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/formatters/mermaid.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/global_context.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/grouper.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/layout.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/link_classification.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/multi_region.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/naming.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/orphan_detection.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/summary_links.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/templates/graph.html.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/tool_modes.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/views.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/graph/visualizer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/cache.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/ci_adapter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/crypto/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/fingerprint.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/gates.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/models.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/prompts.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/licensing/tracker.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/main.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/mcp_server.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/migrations/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/migrations/sanitize_cache.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/patterns/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/patterns/local_module.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/recovery/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/recovery/actions.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/recovery/engine.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/recovery/gray_zone.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/audit_annotator.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/backend.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/base.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/cloudformation.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/file_router.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/import_generator.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/name_generator.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/preloader.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/pulumi.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/refactoring.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/terraform.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/terraform_v2.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/renderers/variable_extractor.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/async_base.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/async_vpc_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/base.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/compute_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/ec2_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/elasticache_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/iam_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/implementations/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/implementations/s3_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/implementations/vpc_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/incremental.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/legacy_adapter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/messaging_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/monitoring_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/networking_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/rds_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/s3_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/storage_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/unified_base.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/unified_scanners.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/scanners/vpc_scanner.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/snapshot/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/snapshot/differ.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/snapshot/models.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/snapshot/reporter.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/snapshot/store.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/autoscaling_group.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/db_parameter_group.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/db_subnet_group.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/ebs_volume.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/ec2_instance.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/elasticache_cluster.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/elasticache_subnet_group.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/internet_gateway.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/launch_template.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/lb.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/lb_listener.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/lb_target_group.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/nat_gateway.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/network_acl.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/rds_instance.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/route_table.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/s3_bucket.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/s3_bucket_policy.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/security_group.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/sns_topic.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/sqs_queue.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/subnet.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/vpc.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/templates/vpc_endpoint.tf.j2 +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/transformers/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/transformers/base.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/transformers/downsizer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/transformers/network_remapper.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/transformers/renamer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/transformers/sanitizer.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/ui/__init__.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/ui/console.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/ui/rich_output.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/ui/snapshot_panels.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/replimap/ui/snapshot_tables.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/scripts/check_stdout_hygiene.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/scripts/record_cassettes.py +0 -0
- {replimap-0.4.0 → replimap-0.4.2}/scripts/verify_compliance_tf_subdomains.py +0 -0
|
@@ -83,3 +83,10 @@ CLAUDE.md
|
|
|
83
83
|
.claude/
|
|
84
84
|
.agents/
|
|
85
85
|
skills-lock.json
|
|
86
|
+
|
|
87
|
+
# Local-only review/scratch artifacts (may contain sensitive demo-account data)
|
|
88
|
+
CLI_REVIEW.md
|
|
89
|
+
|
|
90
|
+
# Unpublished marketing collateral — does not belong in the code repo's history.
|
|
91
|
+
# Relocate to a dedicated content store (Notion / content repo), not here.
|
|
92
|
+
docs/twitter-content-inventory.md
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: replimap
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: AWS Infrastructure Intelligence Engine — Scan, Understand, Transform
|
|
5
5
|
Project-URL: Homepage, https://replimap.com
|
|
6
6
|
Project-URL: Documentation, https://replimap.com/docs
|
|
@@ -378,9 +378,6 @@ pytest
|
|
|
378
378
|
|
|
379
379
|
## Documentation
|
|
380
380
|
|
|
381
|
-
- [Installation Guide](docs/installation.md)
|
|
382
|
-
- [Quick Start Tutorial](docs/quickstart.md)
|
|
383
|
-
- [CLI Reference](docs/cli-reference.md)
|
|
384
381
|
- [IAM Policy](IAM_POLICY.md)
|
|
385
382
|
|
|
386
383
|
## Support
|
|
@@ -396,7 +393,7 @@ pytest
|
|
|
396
393
|
|
|
397
394
|
## License
|
|
398
395
|
|
|
399
|
-
RepliMap is licensed under the [Business Source License 1.1](LICENSE
|
|
396
|
+
RepliMap is licensed under the [Business Source License 1.1](LICENSE).
|
|
400
397
|
|
|
401
398
|
[View full pricing](https://replimap.com/pricing)
|
|
402
399
|
|
|
@@ -326,9 +326,6 @@ pytest
|
|
|
326
326
|
|
|
327
327
|
## Documentation
|
|
328
328
|
|
|
329
|
-
- [Installation Guide](docs/installation.md)
|
|
330
|
-
- [Quick Start Tutorial](docs/quickstart.md)
|
|
331
|
-
- [CLI Reference](docs/cli-reference.md)
|
|
332
329
|
- [IAM Policy](IAM_POLICY.md)
|
|
333
330
|
|
|
334
331
|
## Support
|
|
@@ -344,7 +341,7 @@ pytest
|
|
|
344
341
|
|
|
345
342
|
## License
|
|
346
343
|
|
|
347
|
-
RepliMap is licensed under the [Business Source License 1.1](LICENSE
|
|
344
|
+
RepliMap is licensed under the [Business Source License 1.1](LICENSE).
|
|
348
345
|
|
|
349
346
|
[View full pricing](https://replimap.com/pricing)
|
|
350
347
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Development History
|
|
2
|
+
|
|
3
|
+
This directory archives point-in-time development logs and decision memos from the July 2026 fix and consolidation batches. They are retained for historical reference — each one is a snapshot of the reasoning, before/after verification, and test results for a specific past change, not a living document that gets updated as the code evolves. For current behavior, see the code and `CHANGELOG.md`; use these logs only to understand why a change was made.
|
|
4
|
+
|
|
5
|
+
- `CODIFY_FIX_LOG.md` — Codify (Terraform generation pipeline) fixes: HCL rendering, `${...}` reference handling, and schema/policy mapping correctness
|
|
6
|
+
- `COMPLIANCE_COST_FIX_LOG.md` — Compliance evidence rendering and cost estimation correctness fixes
|
|
7
|
+
- `COST_PRICING_CONSOLIDATION_LOG.md` — Execution log for consolidating the duplicate cost pricing tables onto `pricing.py` as the single source of truth (Plan A)
|
|
8
|
+
- `COST_PRICING_CONSOLIDATION_MEMO.md` — Pre-execution decision memo on the duplicate cost pricing tables
|
|
9
|
+
- `DEAD_CODE_CLEANUP_LOG.md` — Removal of two dead-code sites flagged (and deferred) during the drift/blast radius consolidation
|
|
10
|
+
- `DRIFT_BLAST_CONSOLIDATION_LOG.md` — Execution log for consolidating the drift engines (track D1) and converging blast radius weighting (track B1)
|
|
11
|
+
- `DRIFT_BLAST_CONSOLIDATION_MEMO.md` — Pre-execution decision memo on the three drift engines and blast radius weighting
|
|
12
|
+
- `DR_AGGREGATION_SNAPSHOT_FIX_LOG.md` — DR readiness assessment, graph aggregation, and snapshot diff correctness fixes
|
|
13
|
+
- `GRAPH_ENGINE_FIX_LOG.md` — Core graph engine correctness and concurrency fixes
|
|
14
|
+
- `INTEGRATION_VERIFICATION_LOG.md` — Integration verification of the merged codify and graph engine fix tracks (D+E)
|
|
15
|
+
- `PERF_COVERAGE_FIX_LOG.md` — Performance fixes and test coverage backfill for IAM generation, centrality, selection, and cross-region views
|
|
16
|
+
- `SECURITY_FIX_LOG.md` — Two independent security-related defect fixes
|
|
@@ -179,7 +179,7 @@ ignore = [
|
|
|
179
179
|
# Allow print() in migration/utility scripts
|
|
180
180
|
"replimap/core/unified_storage/migrate.py" = ["T201"]
|
|
181
181
|
"replimap/licensing/crypto/keys.py" = ["T201"]
|
|
182
|
-
"
|
|
182
|
+
"tests/fixtures/license_signer.py" = ["T201"]
|
|
183
183
|
"replimap/migrations/sanitize_cache.py" = ["T201"]
|
|
184
184
|
|
|
185
185
|
[tool.ruff.lint.isort]
|
|
@@ -22,6 +22,7 @@ from replimap.cli.errors import (
|
|
|
22
22
|
from replimap.licensing import Feature, LicenseStatus, LicenseValidationError
|
|
23
23
|
from replimap.licensing.manager import get_license_manager
|
|
24
24
|
from replimap.licensing.tracker import get_usage_tracker
|
|
25
|
+
from replimap.licensing.verifier import LicenseVerificationError
|
|
25
26
|
|
|
26
27
|
if TYPE_CHECKING:
|
|
27
28
|
from replimap.cli.context import GlobalContext
|
|
@@ -82,7 +83,11 @@ def create_license_app() -> typer.Typer:
|
|
|
82
83
|
"expires": expires,
|
|
83
84
|
}
|
|
84
85
|
)
|
|
85
|
-
except LicenseValidationError as e:
|
|
86
|
+
except (LicenseValidationError, LicenseVerificationError) as e:
|
|
87
|
+
# LicenseVerificationError covers signature/format/time/machine
|
|
88
|
+
# rejections from the signed-blob verification path (contract
|
|
89
|
+
# §7) — a distinct hierarchy from LicenseValidationError, but
|
|
90
|
+
# the same user-facing treatment: clear message, no traceback.
|
|
86
91
|
output.panel(
|
|
87
92
|
f"[red]License activation failed:[/]\n{e}",
|
|
88
93
|
title="Activation Error",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Right-Sizer Module.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
Computes optimization suggestions locally and generates a Terraform
|
|
5
|
+
.auto.tfvars file for applying overrides.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
Seven Laws of Sovereign Code:
|
|
9
|
-
1. Operate Autonomously - The tool
|
|
7
|
+
Right-sizing suggestions are always computed by the local rule engine
|
|
8
|
+
per the Seven Laws of Sovereign Code:
|
|
9
|
+
1. Operate Autonomously - The tool works fully offline
|
|
10
10
|
3. Simplicity is the Ultimate Sophistication - Minimal dependencies
|
|
11
11
|
|
|
12
12
|
CRITICAL: Uses replimap.core.naming to ensure variable names match Generator.
|
|
@@ -14,14 +14,12 @@ CRITICAL: Uses replimap.core.naming to ensure variable names match Generator.
|
|
|
14
14
|
|
|
15
15
|
from __future__ import annotations
|
|
16
16
|
|
|
17
|
-
import json
|
|
18
17
|
import logging
|
|
19
18
|
import os
|
|
20
19
|
from dataclasses import dataclass, field
|
|
21
20
|
from enum import Enum
|
|
22
21
|
from typing import Any
|
|
23
22
|
|
|
24
|
-
import httpx
|
|
25
23
|
from rich.console import Console
|
|
26
24
|
from rich.panel import Panel
|
|
27
25
|
from rich.table import Table
|
|
@@ -36,15 +34,6 @@ from replimap.cost.local_rightsizer import (
|
|
|
36
34
|
|
|
37
35
|
logger = logging.getLogger(__name__)
|
|
38
36
|
|
|
39
|
-
# API Configuration
|
|
40
|
-
REPLIMAP_API_BASE = os.environ.get(
|
|
41
|
-
"REPLIMAP_API_URL",
|
|
42
|
-
"https://replimap-api.davidlu1001.workers.dev",
|
|
43
|
-
)
|
|
44
|
-
RIGHTSIZER_ENDPOINT = f"{REPLIMAP_API_BASE}/v1/rightsizer/suggestions"
|
|
45
|
-
API_TIMEOUT = 30.0
|
|
46
|
-
MAX_RESOURCES_PER_REQUEST = 100 # Backend limit
|
|
47
|
-
|
|
48
37
|
console = Console()
|
|
49
38
|
|
|
50
39
|
|
|
@@ -67,7 +56,7 @@ RESOURCE_SIZE_ATTRIBUTE: dict[str, str] = {
|
|
|
67
56
|
|
|
68
57
|
@dataclass
|
|
69
58
|
class ResourceSummary:
|
|
70
|
-
"""Resource metadata
|
|
59
|
+
"""Resource metadata used for right-sizing analysis."""
|
|
71
60
|
|
|
72
61
|
resource_id: str
|
|
73
62
|
resource_type: str
|
|
@@ -78,24 +67,6 @@ class ResourceSummary:
|
|
|
78
67
|
storage_size_gb: int | None = None
|
|
79
68
|
iops: int | None = None
|
|
80
69
|
|
|
81
|
-
def to_api_dict(self) -> dict[str, Any]:
|
|
82
|
-
"""Convert to API request format (metadata only, no secrets)."""
|
|
83
|
-
data: dict[str, Any] = {
|
|
84
|
-
"resource_id": self.resource_id,
|
|
85
|
-
"resource_type": self.resource_type,
|
|
86
|
-
"instance_type": self.instance_type,
|
|
87
|
-
"region": self.region,
|
|
88
|
-
}
|
|
89
|
-
if self.multi_az is not None:
|
|
90
|
-
data["multi_az"] = self.multi_az
|
|
91
|
-
if self.storage_type:
|
|
92
|
-
data["storage_type"] = self.storage_type
|
|
93
|
-
if self.storage_size_gb:
|
|
94
|
-
data["storage_size_gb"] = self.storage_size_gb
|
|
95
|
-
if self.iops:
|
|
96
|
-
data["iops"] = self.iops
|
|
97
|
-
return data
|
|
98
|
-
|
|
99
70
|
|
|
100
71
|
@dataclass
|
|
101
72
|
class SavingsBreakdown:
|
|
@@ -108,7 +79,7 @@ class SavingsBreakdown:
|
|
|
108
79
|
|
|
109
80
|
@dataclass
|
|
110
81
|
class ResourceSuggestion:
|
|
111
|
-
"""Single resource optimization suggestion
|
|
82
|
+
"""Single resource optimization suggestion."""
|
|
112
83
|
|
|
113
84
|
resource_id: str
|
|
114
85
|
resource_type: str
|
|
@@ -139,7 +110,7 @@ class SkippedResource:
|
|
|
139
110
|
|
|
140
111
|
@dataclass
|
|
141
112
|
class RightSizerResult:
|
|
142
|
-
"""Complete result from Right-Sizer
|
|
113
|
+
"""Complete result from a Right-Sizer analysis."""
|
|
143
114
|
|
|
144
115
|
success: bool
|
|
145
116
|
suggestions: list[ResourceSuggestion]
|
|
@@ -159,12 +130,10 @@ class RightSizerResult:
|
|
|
159
130
|
|
|
160
131
|
class RightSizerClient:
|
|
161
132
|
"""
|
|
162
|
-
Client for
|
|
133
|
+
Client for right-sizing suggestions.
|
|
163
134
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
2. Falls back to local rule engine if API is unavailable
|
|
167
|
-
3. Supports offline-only mode via prefer_local flag
|
|
135
|
+
Right-sizing suggestions are always computed by the local rule engine
|
|
136
|
+
(`LocalRightSizer`) — there is no remote/API path.
|
|
168
137
|
"""
|
|
169
138
|
|
|
170
139
|
SUPPORTED_RESOURCE_TYPES = {
|
|
@@ -172,32 +141,16 @@ class RightSizerClient:
|
|
|
172
141
|
"aws_db_instance",
|
|
173
142
|
"aws_elasticache_cluster",
|
|
174
143
|
"aws_elasticache_replication_group",
|
|
175
|
-
# Note: aws_launch_template is NOT supported by the backend API
|
|
176
144
|
}
|
|
177
145
|
|
|
178
|
-
def __init__(self
|
|
179
|
-
"""
|
|
180
|
-
Initialize the Right-Sizer client.
|
|
181
|
-
|
|
182
|
-
Args:
|
|
183
|
-
prefer_local: If True, skip API and use local rules only.
|
|
184
|
-
Useful for offline operation or faster analysis.
|
|
185
|
-
"""
|
|
186
|
-
from replimap.licensing.manager import get_license_manager
|
|
187
|
-
|
|
188
|
-
self.manager = get_license_manager()
|
|
189
|
-
self.prefer_local = prefer_local
|
|
146
|
+
def __init__(self) -> None:
|
|
147
|
+
"""Initialize the Right-Sizer client."""
|
|
190
148
|
self._local_engine: LocalRightSizer | None = None
|
|
191
149
|
self._last_source: str = "unknown" # Track where results came from
|
|
192
150
|
|
|
193
|
-
def _get_license_key(self) -> str | None:
|
|
194
|
-
"""Get the current license key."""
|
|
195
|
-
license_info = self.manager.current_license # Property, not method
|
|
196
|
-
return license_info.license_key if license_info else None
|
|
197
|
-
|
|
198
151
|
@property
|
|
199
152
|
def last_source(self) -> str:
|
|
200
|
-
"""Get the source of the last analysis (
|
|
153
|
+
"""Get the source of the last analysis (always "local" or "unknown")."""
|
|
201
154
|
return self._last_source
|
|
202
155
|
|
|
203
156
|
def _get_local_engine(self, strategy: DowngradeStrategy) -> LocalRightSizer:
|
|
@@ -277,9 +230,9 @@ class RightSizerClient:
|
|
|
277
230
|
strategy: DowngradeStrategy = DowngradeStrategy.CONSERVATIVE,
|
|
278
231
|
) -> RightSizerResult:
|
|
279
232
|
"""
|
|
280
|
-
Get suggestions using local rule engine
|
|
233
|
+
Get suggestions using the local rule engine.
|
|
281
234
|
|
|
282
|
-
|
|
235
|
+
Works fully offline.
|
|
283
236
|
"""
|
|
284
237
|
self._last_source = "local"
|
|
285
238
|
|
|
@@ -405,328 +358,13 @@ class RightSizerClient:
|
|
|
405
358
|
strategy: DowngradeStrategy = DowngradeStrategy.CONSERVATIVE,
|
|
406
359
|
) -> RightSizerResult:
|
|
407
360
|
"""
|
|
408
|
-
Get optimization suggestions
|
|
361
|
+
Get optimization suggestions.
|
|
409
362
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
3. Fall back to local if API fails
|
|
363
|
+
Always computed locally by the rule engine — there is no remote
|
|
364
|
+
API path (see CHANGELOG: right-sizing suggestions are always
|
|
365
|
+
computed locally).
|
|
414
366
|
"""
|
|
415
|
-
|
|
416
|
-
if self.prefer_local:
|
|
417
|
-
logger.info("Using local right-sizer (prefer_local=True)")
|
|
418
|
-
return self.get_suggestions_local(resources, strategy)
|
|
419
|
-
|
|
420
|
-
import asyncio
|
|
421
|
-
|
|
422
|
-
try:
|
|
423
|
-
loop = asyncio.get_event_loop()
|
|
424
|
-
if loop.is_running():
|
|
425
|
-
# If already in async context, run in thread pool
|
|
426
|
-
from replimap.core.concurrency import create_thread_pool
|
|
427
|
-
|
|
428
|
-
executor = create_thread_pool(
|
|
429
|
-
max_workers=1, thread_name_prefix="rightsizer-"
|
|
430
|
-
)
|
|
431
|
-
try:
|
|
432
|
-
future = executor.submit(
|
|
433
|
-
asyncio.run, self.get_suggestions_async(resources, strategy)
|
|
434
|
-
)
|
|
435
|
-
return future.result()
|
|
436
|
-
finally:
|
|
437
|
-
executor.shutdown(wait=True)
|
|
438
|
-
return asyncio.run(self.get_suggestions_async(resources, strategy))
|
|
439
|
-
except RuntimeError:
|
|
440
|
-
return asyncio.run(self.get_suggestions_async(resources, strategy))
|
|
441
|
-
|
|
442
|
-
async def get_suggestions_async(
|
|
443
|
-
self,
|
|
444
|
-
resources: list[ResourceSummary],
|
|
445
|
-
strategy: DowngradeStrategy = DowngradeStrategy.CONSERVATIVE,
|
|
446
|
-
) -> RightSizerResult:
|
|
447
|
-
"""
|
|
448
|
-
Get optimization suggestions from API with local fallback (async version).
|
|
449
|
-
|
|
450
|
-
Falls back to local rules if:
|
|
451
|
-
- No license key available
|
|
452
|
-
- API returns an error
|
|
453
|
-
- Network timeout occurs
|
|
454
|
-
"""
|
|
455
|
-
if not resources:
|
|
456
|
-
return self._error_result("No rightsizable resources found")
|
|
457
|
-
|
|
458
|
-
license_key = self._get_license_key()
|
|
459
|
-
if not license_key:
|
|
460
|
-
# No license - use local fallback
|
|
461
|
-
logger.info("No license key, using local right-sizer")
|
|
462
|
-
return self.get_suggestions_local(resources, strategy)
|
|
463
|
-
|
|
464
|
-
# Try API first
|
|
465
|
-
try:
|
|
466
|
-
if len(resources) > MAX_RESOURCES_PER_REQUEST:
|
|
467
|
-
result = await self._get_suggestions_batched(
|
|
468
|
-
resources, strategy, license_key
|
|
469
|
-
)
|
|
470
|
-
else:
|
|
471
|
-
result = await self._get_suggestions_single(
|
|
472
|
-
resources, strategy, license_key
|
|
473
|
-
)
|
|
474
|
-
|
|
475
|
-
# Check if API succeeded
|
|
476
|
-
if result.success:
|
|
477
|
-
self._last_source = "api"
|
|
478
|
-
return result
|
|
479
|
-
|
|
480
|
-
# API returned an error - check if we should fallback
|
|
481
|
-
error_msg = result.error_message or ""
|
|
482
|
-
fallback_errors = [
|
|
483
|
-
"API request timed out",
|
|
484
|
-
"Network error",
|
|
485
|
-
"Invalid response from API",
|
|
486
|
-
"HTTP 500",
|
|
487
|
-
"HTTP 502",
|
|
488
|
-
"HTTP 503",
|
|
489
|
-
"HTTP 504",
|
|
490
|
-
"ServiceUnavailable",
|
|
491
|
-
"Internal Server Error",
|
|
492
|
-
"Service Unavailable",
|
|
493
|
-
"Bad Gateway",
|
|
494
|
-
"Gateway Timeout",
|
|
495
|
-
]
|
|
496
|
-
|
|
497
|
-
should_fallback = any(
|
|
498
|
-
err.lower() in error_msg.lower() for err in fallback_errors
|
|
499
|
-
)
|
|
500
|
-
|
|
501
|
-
if should_fallback:
|
|
502
|
-
logger.warning(
|
|
503
|
-
f"API error: {error_msg}. Falling back to local right-sizer."
|
|
504
|
-
)
|
|
505
|
-
return self.get_suggestions_local(resources, strategy)
|
|
506
|
-
|
|
507
|
-
# For other errors (auth, license, etc.), return the API error
|
|
508
|
-
return result
|
|
509
|
-
|
|
510
|
-
except Exception as e:
|
|
511
|
-
# Unexpected error - fallback to local
|
|
512
|
-
logger.warning(f"Unexpected API error: {e}. Using local right-sizer.")
|
|
513
|
-
return self.get_suggestions_local(resources, strategy)
|
|
514
|
-
|
|
515
|
-
async def _get_suggestions_batched(
|
|
516
|
-
self,
|
|
517
|
-
resources: list[ResourceSummary],
|
|
518
|
-
strategy: DowngradeStrategy,
|
|
519
|
-
license_key: str,
|
|
520
|
-
) -> RightSizerResult:
|
|
521
|
-
"""Get suggestions for resources in batches (when > 100 resources)."""
|
|
522
|
-
# Split into batches
|
|
523
|
-
batches = [
|
|
524
|
-
resources[i : i + MAX_RESOURCES_PER_REQUEST]
|
|
525
|
-
for i in range(0, len(resources), MAX_RESOURCES_PER_REQUEST)
|
|
526
|
-
]
|
|
527
|
-
|
|
528
|
-
logger.info(
|
|
529
|
-
f"Batching {len(resources)} resources into {len(batches)} API requests "
|
|
530
|
-
f"(max {MAX_RESOURCES_PER_REQUEST} per request)"
|
|
531
|
-
)
|
|
532
|
-
|
|
533
|
-
# Process all batches
|
|
534
|
-
results: list[RightSizerResult] = []
|
|
535
|
-
for i, batch in enumerate(batches):
|
|
536
|
-
logger.debug(
|
|
537
|
-
f"Processing batch {i + 1}/{len(batches)} ({len(batch)} resources)"
|
|
538
|
-
)
|
|
539
|
-
result = await self._get_suggestions_single(batch, strategy, license_key)
|
|
540
|
-
|
|
541
|
-
if not result.success:
|
|
542
|
-
# If any batch fails, return the error
|
|
543
|
-
return result
|
|
544
|
-
|
|
545
|
-
results.append(result)
|
|
546
|
-
|
|
547
|
-
# Merge all results
|
|
548
|
-
return self._merge_results(results, strategy)
|
|
549
|
-
|
|
550
|
-
def _merge_results(
|
|
551
|
-
self, results: list[RightSizerResult], strategy: DowngradeStrategy
|
|
552
|
-
) -> RightSizerResult:
|
|
553
|
-
"""Merge multiple RightSizerResult objects into one."""
|
|
554
|
-
all_suggestions: list[ResourceSuggestion] = []
|
|
555
|
-
all_skipped: list[SkippedResource] = []
|
|
556
|
-
total_current = 0.0
|
|
557
|
-
total_recommended = 0.0
|
|
558
|
-
breakdown = SavingsBreakdown(instance=0, storage=0, multi_az=0)
|
|
559
|
-
|
|
560
|
-
for result in results:
|
|
561
|
-
all_suggestions.extend(result.suggestions)
|
|
562
|
-
all_skipped.extend(result.skipped)
|
|
563
|
-
total_current += result.total_current_monthly
|
|
564
|
-
total_recommended += result.total_recommended_monthly
|
|
565
|
-
breakdown.instance += result.savings_breakdown.instance
|
|
566
|
-
breakdown.storage += result.savings_breakdown.storage
|
|
567
|
-
breakdown.multi_az += result.savings_breakdown.multi_az
|
|
568
|
-
|
|
569
|
-
total_savings = total_current - total_recommended
|
|
570
|
-
savings_pct = (total_savings / total_current * 100) if total_current > 0 else 0
|
|
571
|
-
|
|
572
|
-
return RightSizerResult(
|
|
573
|
-
success=True,
|
|
574
|
-
suggestions=all_suggestions,
|
|
575
|
-
skipped=all_skipped,
|
|
576
|
-
total_resources=len(all_suggestions) + len(all_skipped),
|
|
577
|
-
resources_with_suggestions=len(all_suggestions),
|
|
578
|
-
resources_skipped=len(all_skipped),
|
|
579
|
-
total_current_monthly=round(total_current, 2),
|
|
580
|
-
total_recommended_monthly=round(total_recommended, 2),
|
|
581
|
-
total_monthly_savings=round(total_savings, 2),
|
|
582
|
-
total_annual_savings=round(total_savings * 12, 2),
|
|
583
|
-
savings_percentage=round(savings_pct, 1),
|
|
584
|
-
savings_breakdown=SavingsBreakdown(
|
|
585
|
-
instance=round(breakdown.instance, 2),
|
|
586
|
-
storage=round(breakdown.storage, 2),
|
|
587
|
-
multi_az=round(breakdown.multi_az, 2),
|
|
588
|
-
),
|
|
589
|
-
strategy_used=strategy.value,
|
|
590
|
-
)
|
|
591
|
-
|
|
592
|
-
async def _get_suggestions_single(
|
|
593
|
-
self,
|
|
594
|
-
resources: list[ResourceSummary],
|
|
595
|
-
strategy: DowngradeStrategy,
|
|
596
|
-
license_key: str,
|
|
597
|
-
) -> RightSizerResult:
|
|
598
|
-
"""Get suggestions for a single batch of resources."""
|
|
599
|
-
# Prepare request (only metadata, no secrets)
|
|
600
|
-
request_body = {
|
|
601
|
-
"resources": [r.to_api_dict() for r in resources],
|
|
602
|
-
"strategy": strategy.value,
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
# Debug: Log sample of resources being sent
|
|
606
|
-
logger.debug(
|
|
607
|
-
f"Sending {len(resources)} resources to Right-Sizer API. "
|
|
608
|
-
f"Sample: {request_body['resources'][:2] if request_body['resources'] else 'empty'}"
|
|
609
|
-
)
|
|
610
|
-
|
|
611
|
-
try:
|
|
612
|
-
async with httpx.AsyncClient(timeout=API_TIMEOUT) as client:
|
|
613
|
-
response = await client.post(
|
|
614
|
-
RIGHTSIZER_ENDPOINT,
|
|
615
|
-
json=request_body,
|
|
616
|
-
headers={
|
|
617
|
-
"Authorization": f"Bearer {license_key}",
|
|
618
|
-
"Content-Type": "application/json",
|
|
619
|
-
},
|
|
620
|
-
)
|
|
621
|
-
|
|
622
|
-
if response.status_code == 401:
|
|
623
|
-
return self._error_result("Invalid or expired license key")
|
|
624
|
-
|
|
625
|
-
if response.status_code == 403:
|
|
626
|
-
data = response.json()
|
|
627
|
-
return self._error_result(
|
|
628
|
-
data.get("message", "Right-Sizer requires Pro plan or higher")
|
|
629
|
-
)
|
|
630
|
-
|
|
631
|
-
if response.status_code == 429:
|
|
632
|
-
return self._error_result(
|
|
633
|
-
"Rate limit exceeded. Please try again later."
|
|
634
|
-
)
|
|
635
|
-
|
|
636
|
-
if response.status_code == 400:
|
|
637
|
-
# Bad request - try to extract error details
|
|
638
|
-
try:
|
|
639
|
-
data = response.json()
|
|
640
|
-
error_msg = data.get(
|
|
641
|
-
"error", data.get("message", "Invalid request")
|
|
642
|
-
)
|
|
643
|
-
return self._error_result(f"API validation error: {error_msg}")
|
|
644
|
-
except (json.JSONDecodeError, KeyError):
|
|
645
|
-
return self._error_result("API error: Invalid request format")
|
|
646
|
-
|
|
647
|
-
if response.status_code != 200:
|
|
648
|
-
# Try to extract error message from response
|
|
649
|
-
try:
|
|
650
|
-
data = response.json()
|
|
651
|
-
error_msg = data.get(
|
|
652
|
-
"error", data.get("message", f"HTTP {response.status_code}")
|
|
653
|
-
)
|
|
654
|
-
return self._error_result(f"API error: {error_msg}")
|
|
655
|
-
except (json.JSONDecodeError, KeyError):
|
|
656
|
-
return self._error_result(
|
|
657
|
-
f"API error: HTTP {response.status_code}"
|
|
658
|
-
)
|
|
659
|
-
|
|
660
|
-
data = response.json()
|
|
661
|
-
return self._parse_response(data)
|
|
662
|
-
|
|
663
|
-
except httpx.TimeoutException:
|
|
664
|
-
return self._error_result("API request timed out. Please try again.")
|
|
665
|
-
except httpx.RequestError as e:
|
|
666
|
-
return self._error_result(f"Network error: {e!s}")
|
|
667
|
-
except json.JSONDecodeError:
|
|
668
|
-
return self._error_result("Invalid response from API")
|
|
669
|
-
|
|
670
|
-
def _parse_response(self, data: dict[str, Any]) -> RightSizerResult:
|
|
671
|
-
"""Parse API response into RightSizerResult."""
|
|
672
|
-
suggestions = []
|
|
673
|
-
for s in data.get("suggestions", []):
|
|
674
|
-
breakdown = s.get("savings_breakdown", {})
|
|
675
|
-
suggestion = ResourceSuggestion(
|
|
676
|
-
resource_id=s["resource_id"],
|
|
677
|
-
resource_type=s["resource_type"],
|
|
678
|
-
original_type=s["current"]["instance_type"],
|
|
679
|
-
original_monthly_cost=s["current"]["monthly_cost"],
|
|
680
|
-
recommended_type=s["recommended"]["instance_type"],
|
|
681
|
-
recommended_monthly_cost=s["recommended"]["monthly_cost"],
|
|
682
|
-
monthly_savings=s["monthly_savings"],
|
|
683
|
-
annual_savings=s["annual_savings"],
|
|
684
|
-
savings_percentage=s["savings_percentage"],
|
|
685
|
-
savings_breakdown=SavingsBreakdown(
|
|
686
|
-
instance=breakdown.get("instance", 0),
|
|
687
|
-
storage=breakdown.get("storage", 0),
|
|
688
|
-
multi_az=breakdown.get("multi_az", 0),
|
|
689
|
-
),
|
|
690
|
-
actions=s.get("actions", []),
|
|
691
|
-
warnings=s.get("warnings", []),
|
|
692
|
-
confidence=s.get("confidence", "high"),
|
|
693
|
-
recommended_storage_type=s["recommended"].get("storage_type"),
|
|
694
|
-
recommended_multi_az=s["recommended"].get("multi_az"),
|
|
695
|
-
)
|
|
696
|
-
suggestions.append(suggestion)
|
|
697
|
-
|
|
698
|
-
skipped = [
|
|
699
|
-
SkippedResource(
|
|
700
|
-
resource_id=sk["resource_id"],
|
|
701
|
-
resource_type=sk["resource_type"],
|
|
702
|
-
instance_type=sk["instance_type"],
|
|
703
|
-
reason=sk["reason"],
|
|
704
|
-
)
|
|
705
|
-
for sk in data.get("skipped", [])
|
|
706
|
-
]
|
|
707
|
-
|
|
708
|
-
summary = data.get("summary", {})
|
|
709
|
-
breakdown = summary.get("savings_breakdown", {})
|
|
710
|
-
|
|
711
|
-
return RightSizerResult(
|
|
712
|
-
success=data.get("success", False),
|
|
713
|
-
suggestions=suggestions,
|
|
714
|
-
skipped=skipped,
|
|
715
|
-
total_resources=summary.get("total_resources", 0),
|
|
716
|
-
resources_with_suggestions=summary.get("resources_with_suggestions", 0),
|
|
717
|
-
resources_skipped=summary.get("resources_skipped", 0),
|
|
718
|
-
total_current_monthly=summary.get("total_current_monthly", 0),
|
|
719
|
-
total_recommended_monthly=summary.get("total_recommended_monthly", 0),
|
|
720
|
-
total_monthly_savings=summary.get("total_monthly_savings", 0),
|
|
721
|
-
total_annual_savings=summary.get("total_annual_savings", 0),
|
|
722
|
-
savings_percentage=summary.get("savings_percentage", 0),
|
|
723
|
-
savings_breakdown=SavingsBreakdown(
|
|
724
|
-
instance=breakdown.get("instance", 0),
|
|
725
|
-
storage=breakdown.get("storage", 0),
|
|
726
|
-
multi_az=breakdown.get("multi_az", 0),
|
|
727
|
-
),
|
|
728
|
-
strategy_used=data.get("strategy_used", "conservative"),
|
|
729
|
-
)
|
|
367
|
+
return self.get_suggestions_local(resources, strategy)
|
|
730
368
|
|
|
731
369
|
def _error_result(self, message: str) -> RightSizerResult:
|
|
732
370
|
"""Create an error result."""
|
|
@@ -84,13 +84,6 @@ from replimap.licensing.prompts import (
|
|
|
84
84
|
get_upgrade_prompt,
|
|
85
85
|
)
|
|
86
86
|
|
|
87
|
-
# Secure License Manager - Main entry point for v2 licensing
|
|
88
|
-
from replimap.licensing.secure_manager import (
|
|
89
|
-
SecureLicenseError,
|
|
90
|
-
SecureLicenseManager,
|
|
91
|
-
get_secure_license_manager,
|
|
92
|
-
)
|
|
93
|
-
|
|
94
87
|
# Usage tracking
|
|
95
88
|
from replimap.licensing.tracker import UsageTracker
|
|
96
89
|
|
|
@@ -102,11 +95,10 @@ from replimap.licensing.tracker import UsageTracker
|
|
|
102
95
|
# - LocalLeaseCache (cache.py) - Cache implementation details
|
|
103
96
|
# - LicenseVerifier (verifier.py) - Cryptographic internals
|
|
104
97
|
# - KeyRegistry (crypto/keys.py) - Key management internals
|
|
105
|
-
# - RateLimiter (secure_manager.py) - Rate limiting internals
|
|
106
98
|
# - get_machine_fingerprint (fingerprint.py) - Fingerprint generation details
|
|
107
99
|
#
|
|
108
100
|
# External code should use the high-level API:
|
|
109
|
-
# -
|
|
101
|
+
# - LicenseManager (manager.py) for license operations
|
|
110
102
|
# - feature_gate() and require_plan() for access control
|
|
111
103
|
# - detect_ci_environment() for CI detection
|
|
112
104
|
# ═══════════════════════════════════════════════════════════════════════════
|
|
@@ -121,10 +113,6 @@ __all__ = [
|
|
|
121
113
|
"Plan",
|
|
122
114
|
"PlanFeatures",
|
|
123
115
|
"UsageTracker",
|
|
124
|
-
# Secure License Manager (v2)
|
|
125
|
-
"SecureLicenseManager",
|
|
126
|
-
"SecureLicenseError",
|
|
127
|
-
"get_secure_license_manager",
|
|
128
116
|
# Gate result
|
|
129
117
|
"GateResult",
|
|
130
118
|
# Gate checks
|
|
@@ -46,7 +46,7 @@ class KeyRegistry:
|
|
|
46
46
|
PUBLIC_KEYS: dict[str, bytes] = {
|
|
47
47
|
# Current active key (2024)
|
|
48
48
|
"key-2024-01": b"""-----BEGIN PUBLIC KEY-----
|
|
49
|
-
|
|
49
|
+
MCowBQYDK2VwAyEAGVGarYV4idivq+YGZXZ12kZSqrr6yKV5mw2pWIoU9Mw=
|
|
50
50
|
-----END PUBLIC KEY-----""",
|
|
51
51
|
# Previous key (still accepted for old licenses)
|
|
52
52
|
# "key-2023-01": b"""-----BEGIN PUBLIC KEY-----
|