netherframe.core 0.9.1__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.
- netherframe/core/__init__.py +140 -0
- netherframe/core/autoscope.py +59 -0
- netherframe/core/backends/__init__.py +51 -0
- netherframe/core/backends/backend_bootstrap.py +132 -0
- netherframe/core/backends/backend_chain.py +663 -0
- netherframe/core/backends/backend_chain_models.py +67 -0
- netherframe/core/backends/backend_chain_policy.py +137 -0
- netherframe/core/backends/backend_config.py +198 -0
- netherframe/core/backends/backend_literals.py +94 -0
- netherframe/core/backends/backend_registry.py +411 -0
- netherframe/core/backends/document_state_backend.py +211 -0
- netherframe/core/backends/graph_authorization.py +102 -0
- netherframe/core/backends/graph_baseline.py +78 -0
- netherframe/core/backends/graph_checkpoint.py +227 -0
- netherframe/core/backends/graph_completion.py +106 -0
- netherframe/core/backends/graph_diagnostics.py +210 -0
- netherframe/core/backends/graph_edges.py +244 -0
- netherframe/core/backends/graph_errored_state.py +151 -0
- netherframe/core/backends/graph_execution_rows.py +82 -0
- netherframe/core/backends/graph_footprints.py +279 -0
- netherframe/core/backends/graph_history.py +115 -0
- netherframe/core/backends/graph_identity.py +315 -0
- netherframe/core/backends/graph_inputs.py +250 -0
- netherframe/core/backends/graph_kept_return.py +98 -0
- netherframe/core/backends/graph_leases.py +185 -0
- netherframe/core/backends/graph_merge.py +79 -0
- netherframe/core/backends/graph_migration.py +181 -0
- netherframe/core/backends/graph_moves.py +417 -0
- netherframe/core/backends/graph_object_guard.py +334 -0
- netherframe/core/backends/graph_ownership.py +116 -0
- netherframe/core/backends/graph_plan_basis.py +243 -0
- netherframe/core/backends/graph_plan_guard.py +174 -0
- netherframe/core/backends/graph_planning.py +528 -0
- netherframe/core/backends/graph_planning_context.py +94 -0
- netherframe/core/backends/graph_planning_rounds.py +351 -0
- netherframe/core/backends/graph_planning_selection.py +298 -0
- netherframe/core/backends/graph_recovery.py +516 -0
- netherframe/core/backends/graph_retention.py +51 -0
- netherframe/core/backends/graph_settings.py +99 -0
- netherframe/core/backends/graph_state.py +905 -0
- netherframe/core/backends/graph_state_engine.py +1861 -0
- netherframe/core/backends/local_backend.py +511 -0
- netherframe/core/backends/lock_heartbeat.py +47 -0
- netherframe/core/backends/state_backend.py +149 -0
- netherframe/core/backends/state_engine.py +41 -0
- netherframe/core/backends/state_engine_runtime.py +630 -0
- netherframe/core/backends/state_lock.py +45 -0
- netherframe/core/backends/state_models.py +504 -0
- netherframe/core/config/__init__.py +35 -0
- netherframe/core/config/config.py +24 -0
- netherframe/core/config/config_discovery.py +150 -0
- netherframe/core/config/config_normalization.py +315 -0
- netherframe/core/config/config_parsing.py +44 -0
- netherframe/core/config/config_values.py +79 -0
- netherframe/core/config/hybrid_settings.py +81 -0
- netherframe/core/config/ignore_changes.py +170 -0
- netherframe/core/config/normalization_coercion.py +142 -0
- netherframe/core/config/normalization_types.py +171 -0
- netherframe/core/config/types.py +21 -0
- netherframe/core/constructs/__init__.py +27 -0
- netherframe/core/constructs/app_stack.py +1178 -0
- netherframe/core/constructs/app_synthesis.py +203 -0
- netherframe/core/constructs/attributes.py +156 -0
- netherframe/core/constructs/backend_base.py +389 -0
- netherframe/core/constructs/base_construct.py +318 -0
- netherframe/core/constructs/cross_stack_refs.py +267 -0
- netherframe/core/constructs/framework_settings.py +20 -0
- netherframe/core/constructs/generated_value.py +78 -0
- netherframe/core/constructs/infrastructure.py +148 -0
- netherframe/core/constructs/infrastructure_policy.py +27 -0
- netherframe/core/constructs/infrastructure_support.py +286 -0
- netherframe/core/constructs/meta.py +431 -0
- netherframe/core/constructs/provider_construct.py +290 -0
- netherframe/core/constructs/resolution.py +76 -0
- netherframe/core/constructs/resources.py +869 -0
- netherframe/core/constructs/specialized_resources.py +349 -0
- netherframe/core/constructs/stack_bound.py +37 -0
- netherframe/core/constructs/stack_registry.py +96 -0
- netherframe/core/constructs/stack_synthesis.py +321 -0
- netherframe/core/constructs/utilities.py +7 -0
- netherframe/core/context.py +81 -0
- netherframe/core/drift/__init__.py +140 -0
- netherframe/core/drift/analysis_core.py +41 -0
- netherframe/core/drift/detector.py +343 -0
- netherframe/core/drift/errors.py +29 -0
- netherframe/core/drift/import_id.py +116 -0
- netherframe/core/drift/legacy_adapter.py +154 -0
- netherframe/core/drift/locate.py +99 -0
- netherframe/core/drift/models.py +52 -0
- netherframe/core/drift/provider_clients.py +70 -0
- netherframe/core/drift/provider_utils.py +202 -0
- netherframe/core/drift/resource_analysis.py +173 -0
- netherframe/core/drift/resource_parser.py +207 -0
- netherframe/core/drift/state_comparison.py +152 -0
- netherframe/core/drift/transformer.py +265 -0
- netherframe/core/exceptions.py +192 -0
- netherframe/core/execution/__init__.py +25 -0
- netherframe/core/execution/adoption.py +235 -0
- netherframe/core/execution/approval.py +159 -0
- netherframe/core/execution/deferred_scheduling.py +258 -0
- netherframe/core/execution/graph_apply_preparation.py +158 -0
- netherframe/core/execution/graph_deferrals.py +68 -0
- netherframe/core/execution/graph_destroy_preparation.py +139 -0
- netherframe/core/execution/graph_import_preparation.py +133 -0
- netherframe/core/execution/graph_inputs.py +82 -0
- netherframe/core/execution/graph_intent_manifest.py +236 -0
- netherframe/core/execution/graph_move_preparation.py +102 -0
- netherframe/core/execution/graph_noop.py +35 -0
- netherframe/core/execution/graph_plan_artifact.py +471 -0
- netherframe/core/execution/graph_plan_coverage.py +415 -0
- netherframe/core/execution/graph_plan_review.py +195 -0
- netherframe/core/execution/graph_planning_candidate.py +261 -0
- netherframe/core/execution/graph_planning_frontend.py +158 -0
- netherframe/core/execution/graph_planning_values.py +169 -0
- netherframe/core/execution/graph_state_migration.py +184 -0
- netherframe/core/execution/hybrid.py +309 -0
- netherframe/core/execution/hybrid_adoption.py +450 -0
- netherframe/core/execution/hybrid_apply.py +1264 -0
- netherframe/core/execution/hybrid_data_sources.py +211 -0
- netherframe/core/execution/hybrid_ephemeral.py +342 -0
- netherframe/core/execution/hybrid_graph_state.py +827 -0
- netherframe/core/execution/hybrid_plan.py +799 -0
- netherframe/core/execution/hybrid_planning.py +1937 -0
- netherframe/core/execution/hybrid_providers.py +1098 -0
- netherframe/core/execution/hybrid_refresh.py +408 -0
- netherframe/core/execution/hybrid_results.py +141 -0
- netherframe/core/execution/hybrid_runtime_checks.py +274 -0
- netherframe/core/execution/hybrid_state_ops.py +564 -0
- netherframe/core/execution/mode.py +21 -0
- netherframe/core/execution/plan_artifacts.py +31 -0
- netherframe/core/execution/planning_scope.py +109 -0
- netherframe/core/execution/provenance_report.py +731 -0
- netherframe/core/functions/__init__.py +39 -0
- netherframe/core/functions/catalog_support.py +74 -0
- netherframe/core/functions/function_base.py +193 -0
- netherframe/core/functions/functions.py +81 -0
- netherframe/core/functions/legacy_registry.py +92 -0
- netherframe/core/infrastructure/__init__.py +10 -0
- netherframe/core/infrastructure/discovery.py +350 -0
- netherframe/core/infrastructure/resource_introspection.py +244 -0
- netherframe/core/infrastructure/validation.py +149 -0
- netherframe/core/linting/__init__.py +27 -0
- netherframe/core/linting/core.py +280 -0
- netherframe/core/linting/graph.py +100 -0
- netherframe/core/linting/plugins.py +38 -0
- netherframe/core/logging.py +37 -0
- netherframe/core/logging_controls.py +121 -0
- netherframe/core/logging_formatting.py +78 -0
- netherframe/core/logging_setup.py +202 -0
- netherframe/core/logging_state.py +43 -0
- netherframe/core/logging_wrapper.py +222 -0
- netherframe/core/orchestration/__init__.py +38 -0
- netherframe/core/orchestration/app_script_generation.py +596 -0
- netherframe/core/orchestration/event_loop.py +146 -0
- netherframe/core/orchestration/execution_models.py +188 -0
- netherframe/core/orchestration/execution_slots.py +204 -0
- netherframe/core/orchestration/execution_strategies.py +287 -0
- netherframe/core/orchestration/graph_authorization.py +72 -0
- netherframe/core/orchestration/graph_completion.py +246 -0
- netherframe/core/orchestration/graph_creations.py +122 -0
- netherframe/core/orchestration/graph_normalization.py +262 -0
- netherframe/core/orchestration/phased_artifacts.py +764 -0
- netherframe/core/orchestration/planned_changes.py +245 -0
- netherframe/core/orchestration/progress_reporting.py +109 -0
- netherframe/core/orchestration/resource_operations.py +1406 -0
- netherframe/core/orchestration/stack_ordering.py +72 -0
- netherframe/core/orchestration/state_shaping.py +1138 -0
- netherframe/core/orchestration/unified_orchestrator.py +618 -0
- netherframe/core/phases/__init__.py +35 -0
- netherframe/core/phases/analyzer.py +121 -0
- netherframe/core/phases/cycle_analysis.py +162 -0
- netherframe/core/phases/cycle_breaking.py +32 -0
- netherframe/core/phases/dependency_extraction.py +143 -0
- netherframe/core/phases/dependency_graph.py +118 -0
- netherframe/core/phases/graph_algorithms.py +402 -0
- netherframe/core/phases/models.py +268 -0
- netherframe/core/phases/omission.py +83 -0
- netherframe/core/phases/parallel_groups.py +37 -0
- netherframe/core/phases/planner.py +236 -0
- netherframe/core/phases/serialization.py +56 -0
- netherframe/core/phases/stack_dependency_plan.py +89 -0
- netherframe/core/providers/__init__.py +22 -0
- netherframe/core/providers/builtin_provider.py +367 -0
- netherframe/core/providers/generators.py +248 -0
- netherframe/core/providers/graph_identity.py +222 -0
- netherframe/core/providers/graph_planning.py +173 -0
- netherframe/core/providers/plan_reuse.py +106 -0
- netherframe/core/providers/provider_address.py +248 -0
- netherframe/core/providers/provider_binary_resolver.py +128 -0
- netherframe/core/providers/provider_handshake.py +146 -0
- netherframe/core/providers/provider_lifecycle.py +153 -0
- netherframe/core/providers/provider_loader.py +478 -0
- netherframe/core/providers/provider_models.py +89 -0
- netherframe/core/providers/provider_operation_context.py +291 -0
- netherframe/core/providers/provider_protocol.py +431 -0
- netherframe/core/providers/provider_registry.py +334 -0
- netherframe/core/providers/provider_resolution.py +298 -0
- netherframe/core/providers/provider_resource_operations.py +609 -0
- netherframe/core/providers/provider_rpc_support.py +91 -0
- netherframe/core/providers/provider_schema.py +210 -0
- netherframe/core/providers/provider_session.py +58 -0
- netherframe/core/providers/provider_session_io.py +101 -0
- netherframe/core/providers/provider_session_models.py +31 -0
- netherframe/core/providers/provider_session_shutdown.py +67 -0
- netherframe/core/providers/provider_session_startup.py +182 -0
- netherframe/core/providers/provider_settings.py +32 -0
- netherframe/core/providers/provider_supplemental_operations.py +492 -0
- netherframe/core/providers/provider_value_shaper.py +75 -0
- netherframe/core/providers/state_normalization.py +57 -0
- netherframe/core/providers/state_refresh.py +105 -0
- netherframe/core/providers/tls_generators.py +521 -0
- netherframe/core/py.typed +0 -0
- netherframe/core/runtime/__init__.py +39 -0
- netherframe/core/runtime/hybrid_runtime.py +710 -0
- netherframe/core/runtime/runtime.py +59 -0
- netherframe/core/runtime/runtime_api.py +173 -0
- netherframe/core/runtime/runtime_binding.py +46 -0
- netherframe/core/runtime/runtime_command.py +64 -0
- netherframe/core/runtime/terraform_runtime.py +262 -0
- netherframe/core/runtime/terraform_runtime_binding.py +47 -0
- netherframe/core/runtime/terraform_runtime_query.py +62 -0
- netherframe/core/serialization/__init__.py +51 -0
- netherframe/core/serialization/caching_v2.py +155 -0
- netherframe/core/serialization/cty_msgpack.py +819 -0
- netherframe/core/serialization/json_encoder.py +81 -0
- netherframe/core/serialization/message_encoding.py +174 -0
- netherframe/core/serialization/message_value_utils.py +44 -0
- netherframe/core/serialization/orjson_compat.py +103 -0
- netherframe/core/serialization/schema_cache.py +468 -0
- netherframe/core/serialization/schema_utils.py +159 -0
- netherframe/core/serialization/stack_config_builder.py +222 -0
- netherframe/core/serialization/unknown_values.py +192 -0
- netherframe/core/state_migration.py +15 -0
- netherframe/core/state_migration_backend.py +223 -0
- netherframe/core/state_migration_conversion.py +234 -0
- netherframe/core/state_migration_inspection.py +147 -0
- netherframe/core/state_migration_types.py +9 -0
- netherframe/core/synthesis/__init__.py +21 -0
- netherframe/core/synthesis/hcl_blocks.py +149 -0
- netherframe/core/synthesis/hcl_formatting.py +148 -0
- netherframe/core/synthesis/hcl_writer.py +408 -0
- netherframe/core/synthesis/import_generator.py +172 -0
- netherframe/core/synthesis/references.py +95 -0
- netherframe/core/synthesis/stack_artifacts.py +143 -0
- netherframe/core/synthesis/validation_reports.py +46 -0
- netherframe/core/testing/__init__.py +1 -0
- netherframe/core/testing/env.py +13 -0
- netherframe/core/testing/fakecloud.py +622 -0
- netherframe/core/testing/graph_memory.py +1476 -0
- netherframe/core/testing/graph_scenarios.py +377 -0
- netherframe/core/testing/log_capture.py +34 -0
- netherframe/core/testing/patching.py +17 -0
- netherframe/core/testing/provider_test_helpers.py +33 -0
- netherframe/core/testing/pytest_fakecloud.py +59 -0
- netherframe/core/testing/pytest_workspace.py +78 -0
- netherframe/core/testing/schema_cache.py +44 -0
- netherframe/core/testing/state_backend_contract.py +556 -0
- netherframe/core/testing/terraform_cache.py +41 -0
- netherframe/core/values/__init__.py +12 -0
- netherframe/core/values/address.py +345 -0
- netherframe/core/values/basic_resolver.py +133 -0
- netherframe/core/values/compiled.py +318 -0
- netherframe/core/values/ephemeral_values.py +37 -0
- netherframe/core/values/expressions.py +1112 -0
- netherframe/core/values/hcl_expressions.py +272 -0
- netherframe/core/values/intent.py +141 -0
- netherframe/core/values/observation_cache.py +90 -0
- netherframe/core/values/provenance.py +545 -0
- netherframe/core/values/read_scopes.py +73 -0
- netherframe/core/values/resolver.py +37 -0
- netherframe/core/values/runtime_impl.py +168 -0
- netherframe/core/values/runtime_value.py +129 -0
- netherframe/core/values/runtime_value_ops.py +454 -0
- netherframe/core/values/runtime_value_wrapped.py +9 -0
- netherframe/core/values/terraform_operations.py +851 -0
- netherframe/core/values/terraform_syntax.py +396 -0
- netherframe/core/values/tokens.py +95 -0
- netherframe_core-0.9.1.data/purelib/netherframe_nf_alias.pth +1 -0
- netherframe_core-0.9.1.dist-info/METADATA +115 -0
- netherframe_core-0.9.1.dist-info/RECORD +561 -0
- netherframe_core-0.9.1.dist-info/WHEEL +4 -0
- netherframe_core-0.9.1.dist-info/entry_points.txt +3 -0
- netherframe_core-0.9.1.dist-info/licenses/LICENSE +21 -0
- netherframe_nf_alias/__init__.py +82 -0
- nf/core/__init__.py +4 -0
- nf/core/autoscope.py +4 -0
- nf/core/backends/__init__.py +4 -0
- nf/core/backends/backend_bootstrap.py +4 -0
- nf/core/backends/backend_chain.py +4 -0
- nf/core/backends/backend_chain_models.py +4 -0
- nf/core/backends/backend_chain_policy.py +4 -0
- nf/core/backends/backend_config.py +4 -0
- nf/core/backends/backend_literals.py +4 -0
- nf/core/backends/backend_registry.py +4 -0
- nf/core/backends/document_state_backend.py +4 -0
- nf/core/backends/graph_authorization.py +4 -0
- nf/core/backends/graph_baseline.py +4 -0
- nf/core/backends/graph_checkpoint.py +4 -0
- nf/core/backends/graph_completion.py +4 -0
- nf/core/backends/graph_diagnostics.py +4 -0
- nf/core/backends/graph_edges.py +4 -0
- nf/core/backends/graph_errored_state.py +4 -0
- nf/core/backends/graph_execution_rows.py +4 -0
- nf/core/backends/graph_footprints.py +4 -0
- nf/core/backends/graph_history.py +4 -0
- nf/core/backends/graph_identity.py +4 -0
- nf/core/backends/graph_inputs.py +4 -0
- nf/core/backends/graph_kept_return.py +4 -0
- nf/core/backends/graph_leases.py +4 -0
- nf/core/backends/graph_merge.py +4 -0
- nf/core/backends/graph_migration.py +4 -0
- nf/core/backends/graph_moves.py +4 -0
- nf/core/backends/graph_object_guard.py +4 -0
- nf/core/backends/graph_ownership.py +4 -0
- nf/core/backends/graph_plan_basis.py +4 -0
- nf/core/backends/graph_plan_guard.py +4 -0
- nf/core/backends/graph_planning.py +4 -0
- nf/core/backends/graph_planning_context.py +4 -0
- nf/core/backends/graph_planning_rounds.py +4 -0
- nf/core/backends/graph_planning_selection.py +4 -0
- nf/core/backends/graph_recovery.py +4 -0
- nf/core/backends/graph_retention.py +4 -0
- nf/core/backends/graph_settings.py +4 -0
- nf/core/backends/graph_state.py +4 -0
- nf/core/backends/graph_state_engine.py +4 -0
- nf/core/backends/local_backend.py +4 -0
- nf/core/backends/lock_heartbeat.py +4 -0
- nf/core/backends/state_backend.py +4 -0
- nf/core/backends/state_engine.py +4 -0
- nf/core/backends/state_engine_runtime.py +4 -0
- nf/core/backends/state_lock.py +4 -0
- nf/core/backends/state_models.py +4 -0
- nf/core/config/__init__.py +4 -0
- nf/core/config/config.py +4 -0
- nf/core/config/config_discovery.py +4 -0
- nf/core/config/config_normalization.py +4 -0
- nf/core/config/config_parsing.py +4 -0
- nf/core/config/config_values.py +4 -0
- nf/core/config/hybrid_settings.py +4 -0
- nf/core/config/ignore_changes.py +4 -0
- nf/core/config/normalization_coercion.py +4 -0
- nf/core/config/normalization_types.py +4 -0
- nf/core/config/types.py +4 -0
- nf/core/constructs/__init__.py +4 -0
- nf/core/constructs/app_stack.py +4 -0
- nf/core/constructs/app_synthesis.py +4 -0
- nf/core/constructs/attributes.py +4 -0
- nf/core/constructs/backend_base.py +4 -0
- nf/core/constructs/base_construct.py +4 -0
- nf/core/constructs/cross_stack_refs.py +4 -0
- nf/core/constructs/framework_settings.py +4 -0
- nf/core/constructs/generated_value.py +4 -0
- nf/core/constructs/infrastructure.py +4 -0
- nf/core/constructs/infrastructure_policy.py +4 -0
- nf/core/constructs/infrastructure_support.py +4 -0
- nf/core/constructs/meta.py +4 -0
- nf/core/constructs/provider_construct.py +4 -0
- nf/core/constructs/resolution.py +4 -0
- nf/core/constructs/resources.py +4 -0
- nf/core/constructs/specialized_resources.py +4 -0
- nf/core/constructs/stack_bound.py +4 -0
- nf/core/constructs/stack_registry.py +4 -0
- nf/core/constructs/stack_synthesis.py +4 -0
- nf/core/constructs/utilities.py +4 -0
- nf/core/context.py +4 -0
- nf/core/drift/__init__.py +4 -0
- nf/core/drift/analysis_core.py +4 -0
- nf/core/drift/detector.py +4 -0
- nf/core/drift/errors.py +4 -0
- nf/core/drift/import_id.py +4 -0
- nf/core/drift/legacy_adapter.py +4 -0
- nf/core/drift/locate.py +4 -0
- nf/core/drift/models.py +4 -0
- nf/core/drift/provider_clients.py +4 -0
- nf/core/drift/provider_utils.py +4 -0
- nf/core/drift/resource_analysis.py +4 -0
- nf/core/drift/resource_parser.py +4 -0
- nf/core/drift/state_comparison.py +4 -0
- nf/core/drift/transformer.py +4 -0
- nf/core/exceptions.py +4 -0
- nf/core/execution/__init__.py +4 -0
- nf/core/execution/adoption.py +4 -0
- nf/core/execution/approval.py +4 -0
- nf/core/execution/deferred_scheduling.py +4 -0
- nf/core/execution/graph_apply_preparation.py +4 -0
- nf/core/execution/graph_deferrals.py +4 -0
- nf/core/execution/graph_destroy_preparation.py +4 -0
- nf/core/execution/graph_import_preparation.py +4 -0
- nf/core/execution/graph_inputs.py +4 -0
- nf/core/execution/graph_intent_manifest.py +4 -0
- nf/core/execution/graph_move_preparation.py +4 -0
- nf/core/execution/graph_noop.py +4 -0
- nf/core/execution/graph_plan_artifact.py +4 -0
- nf/core/execution/graph_plan_coverage.py +4 -0
- nf/core/execution/graph_plan_review.py +4 -0
- nf/core/execution/graph_planning_candidate.py +4 -0
- nf/core/execution/graph_planning_frontend.py +4 -0
- nf/core/execution/graph_planning_values.py +4 -0
- nf/core/execution/graph_state_migration.py +4 -0
- nf/core/execution/hybrid.py +4 -0
- nf/core/execution/hybrid_adoption.py +4 -0
- nf/core/execution/hybrid_apply.py +4 -0
- nf/core/execution/hybrid_data_sources.py +4 -0
- nf/core/execution/hybrid_ephemeral.py +4 -0
- nf/core/execution/hybrid_graph_state.py +4 -0
- nf/core/execution/hybrid_plan.py +4 -0
- nf/core/execution/hybrid_planning.py +4 -0
- nf/core/execution/hybrid_providers.py +4 -0
- nf/core/execution/hybrid_refresh.py +4 -0
- nf/core/execution/hybrid_results.py +4 -0
- nf/core/execution/hybrid_runtime_checks.py +4 -0
- nf/core/execution/hybrid_state_ops.py +4 -0
- nf/core/execution/mode.py +4 -0
- nf/core/execution/plan_artifacts.py +4 -0
- nf/core/execution/planning_scope.py +4 -0
- nf/core/execution/provenance_report.py +4 -0
- nf/core/functions/__init__.py +4 -0
- nf/core/functions/catalog_support.py +4 -0
- nf/core/functions/function_base.py +4 -0
- nf/core/functions/functions.py +4 -0
- nf/core/functions/legacy_registry.py +4 -0
- nf/core/infrastructure/__init__.py +4 -0
- nf/core/infrastructure/discovery.py +4 -0
- nf/core/infrastructure/resource_introspection.py +4 -0
- nf/core/infrastructure/validation.py +4 -0
- nf/core/linting/__init__.py +4 -0
- nf/core/linting/core.py +4 -0
- nf/core/linting/graph.py +4 -0
- nf/core/linting/plugins.py +4 -0
- nf/core/logging.py +4 -0
- nf/core/logging_controls.py +4 -0
- nf/core/logging_formatting.py +4 -0
- nf/core/logging_setup.py +4 -0
- nf/core/logging_state.py +4 -0
- nf/core/logging_wrapper.py +4 -0
- nf/core/orchestration/__init__.py +4 -0
- nf/core/orchestration/app_script_generation.py +4 -0
- nf/core/orchestration/event_loop.py +4 -0
- nf/core/orchestration/execution_models.py +4 -0
- nf/core/orchestration/execution_slots.py +4 -0
- nf/core/orchestration/execution_strategies.py +4 -0
- nf/core/orchestration/graph_authorization.py +4 -0
- nf/core/orchestration/graph_completion.py +4 -0
- nf/core/orchestration/graph_creations.py +4 -0
- nf/core/orchestration/graph_normalization.py +4 -0
- nf/core/orchestration/phased_artifacts.py +4 -0
- nf/core/orchestration/planned_changes.py +4 -0
- nf/core/orchestration/progress_reporting.py +4 -0
- nf/core/orchestration/resource_operations.py +4 -0
- nf/core/orchestration/stack_ordering.py +4 -0
- nf/core/orchestration/state_shaping.py +4 -0
- nf/core/orchestration/unified_orchestrator.py +4 -0
- nf/core/phases/__init__.py +4 -0
- nf/core/phases/analyzer.py +4 -0
- nf/core/phases/cycle_analysis.py +4 -0
- nf/core/phases/cycle_breaking.py +4 -0
- nf/core/phases/dependency_extraction.py +4 -0
- nf/core/phases/dependency_graph.py +4 -0
- nf/core/phases/graph_algorithms.py +4 -0
- nf/core/phases/models.py +4 -0
- nf/core/phases/omission.py +4 -0
- nf/core/phases/parallel_groups.py +4 -0
- nf/core/phases/planner.py +4 -0
- nf/core/phases/serialization.py +4 -0
- nf/core/phases/stack_dependency_plan.py +4 -0
- nf/core/providers/__init__.py +4 -0
- nf/core/providers/builtin_provider.py +4 -0
- nf/core/providers/generators.py +4 -0
- nf/core/providers/graph_identity.py +4 -0
- nf/core/providers/graph_planning.py +4 -0
- nf/core/providers/plan_reuse.py +4 -0
- nf/core/providers/provider_address.py +4 -0
- nf/core/providers/provider_binary_resolver.py +4 -0
- nf/core/providers/provider_handshake.py +4 -0
- nf/core/providers/provider_lifecycle.py +4 -0
- nf/core/providers/provider_loader.py +4 -0
- nf/core/providers/provider_models.py +4 -0
- nf/core/providers/provider_operation_context.py +4 -0
- nf/core/providers/provider_protocol.py +4 -0
- nf/core/providers/provider_registry.py +4 -0
- nf/core/providers/provider_resolution.py +4 -0
- nf/core/providers/provider_resource_operations.py +4 -0
- nf/core/providers/provider_rpc_support.py +4 -0
- nf/core/providers/provider_schema.py +4 -0
- nf/core/providers/provider_session.py +4 -0
- nf/core/providers/provider_session_io.py +4 -0
- nf/core/providers/provider_session_models.py +4 -0
- nf/core/providers/provider_session_shutdown.py +4 -0
- nf/core/providers/provider_session_startup.py +4 -0
- nf/core/providers/provider_settings.py +4 -0
- nf/core/providers/provider_supplemental_operations.py +4 -0
- nf/core/providers/provider_value_shaper.py +4 -0
- nf/core/providers/state_normalization.py +4 -0
- nf/core/providers/state_refresh.py +4 -0
- nf/core/providers/tls_generators.py +4 -0
- nf/core/py.typed +0 -0
- nf/core/runtime/__init__.py +4 -0
- nf/core/runtime/hybrid_runtime.py +4 -0
- nf/core/runtime/runtime.py +4 -0
- nf/core/runtime/runtime_api.py +4 -0
- nf/core/runtime/runtime_binding.py +4 -0
- nf/core/runtime/runtime_command.py +4 -0
- nf/core/runtime/terraform_runtime.py +4 -0
- nf/core/runtime/terraform_runtime_binding.py +4 -0
- nf/core/runtime/terraform_runtime_query.py +4 -0
- nf/core/serialization/__init__.py +4 -0
- nf/core/serialization/caching_v2.py +4 -0
- nf/core/serialization/cty_msgpack.py +4 -0
- nf/core/serialization/json_encoder.py +4 -0
- nf/core/serialization/message_encoding.py +4 -0
- nf/core/serialization/message_value_utils.py +4 -0
- nf/core/serialization/orjson_compat.py +4 -0
- nf/core/serialization/schema_cache.py +4 -0
- nf/core/serialization/schema_utils.py +4 -0
- nf/core/serialization/stack_config_builder.py +4 -0
- nf/core/serialization/unknown_values.py +4 -0
- nf/core/state_migration.py +4 -0
- nf/core/state_migration_backend.py +4 -0
- nf/core/state_migration_conversion.py +4 -0
- nf/core/state_migration_inspection.py +4 -0
- nf/core/state_migration_types.py +4 -0
- nf/core/synthesis/__init__.py +4 -0
- nf/core/synthesis/hcl_blocks.py +4 -0
- nf/core/synthesis/hcl_formatting.py +4 -0
- nf/core/synthesis/hcl_writer.py +4 -0
- nf/core/synthesis/import_generator.py +4 -0
- nf/core/synthesis/references.py +4 -0
- nf/core/synthesis/stack_artifacts.py +4 -0
- nf/core/synthesis/validation_reports.py +4 -0
- nf/core/testing/__init__.py +4 -0
- nf/core/testing/env.py +4 -0
- nf/core/testing/fakecloud.py +4 -0
- nf/core/testing/graph_memory.py +4 -0
- nf/core/testing/graph_scenarios.py +4 -0
- nf/core/testing/log_capture.py +4 -0
- nf/core/testing/patching.py +4 -0
- nf/core/testing/provider_test_helpers.py +4 -0
- nf/core/testing/pytest_fakecloud.py +4 -0
- nf/core/testing/pytest_workspace.py +4 -0
- nf/core/testing/schema_cache.py +4 -0
- nf/core/testing/state_backend_contract.py +4 -0
- nf/core/testing/terraform_cache.py +4 -0
- nf/core/values/__init__.py +4 -0
- nf/core/values/address.py +4 -0
- nf/core/values/basic_resolver.py +4 -0
- nf/core/values/compiled.py +4 -0
- nf/core/values/ephemeral_values.py +4 -0
- nf/core/values/expressions.py +4 -0
- nf/core/values/hcl_expressions.py +4 -0
- nf/core/values/intent.py +4 -0
- nf/core/values/observation_cache.py +4 -0
- nf/core/values/provenance.py +4 -0
- nf/core/values/read_scopes.py +4 -0
- nf/core/values/resolver.py +4 -0
- nf/core/values/runtime_impl.py +4 -0
- nf/core/values/runtime_value.py +4 -0
- nf/core/values/runtime_value_ops.py +4 -0
- nf/core/values/runtime_value_wrapped.py +4 -0
- nf/core/values/terraform_operations.py +4 -0
- nf/core/values/terraform_syntax.py +4 -0
- nf/core/values/tokens.py +4 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"""Netherframe Core package facade."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
6
|
+
|
|
7
|
+
# Special type for preprocessor control
|
|
8
|
+
T = TypeVar("T")
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from contextlib import AbstractContextManager
|
|
12
|
+
from netherframe.core.autoscope import autoscope
|
|
13
|
+
from netherframe.core.backends.backend_chain import (
|
|
14
|
+
BackendBootstrapAction,
|
|
15
|
+
BackendBootstrapResult,
|
|
16
|
+
BackendChain,
|
|
17
|
+
BackendDecision,
|
|
18
|
+
BackendSelection,
|
|
19
|
+
ConditionalBackend,
|
|
20
|
+
)
|
|
21
|
+
from netherframe.core.constructs.app_stack import App, Stack
|
|
22
|
+
from netherframe.core.constructs.backend_base import LocalBackend
|
|
23
|
+
from netherframe.core.constructs.base_construct import BaseConstruct as Construct
|
|
24
|
+
from netherframe.core.constructs.framework_settings import BackendSettings, ProviderSettings
|
|
25
|
+
from netherframe.core.constructs.generated_value import GeneratedValue
|
|
26
|
+
from netherframe.core.constructs.infrastructure import Output, Variable
|
|
27
|
+
from netherframe.core.constructs.meta import Condition, DataLifecycleRules, LifecycleRules
|
|
28
|
+
from netherframe.core.constructs.resources import DataSource, Provider, Resource
|
|
29
|
+
from netherframe.core.functions.functions import Fn
|
|
30
|
+
from netherframe.core.values.runtime_value import RuntimeValue
|
|
31
|
+
|
|
32
|
+
# `name: Bind = Construct(...)` declares `name` with no particular type (a bare generic alias
|
|
33
|
+
# is `Bind[Any]`), so checkers accept it; `name: Bind[Vpc] = Vpc(...)` keeps the type.
|
|
34
|
+
type Bind[BoundT] = BoundT
|
|
35
|
+
|
|
36
|
+
BindContext: AbstractContextManager[None]
|
|
37
|
+
else:
|
|
38
|
+
# At runtime, use metaclasses that return the original type
|
|
39
|
+
class BindMeta(type):
|
|
40
|
+
"""Metaclass for the Bind type marker."""
|
|
41
|
+
|
|
42
|
+
def __getitem__(cls, type_hint: type[T]) -> type[T]:
|
|
43
|
+
"""Return the original type when indexed.
|
|
44
|
+
|
|
45
|
+
This makes Bind[SomeType] return SomeType at runtime,
|
|
46
|
+
acting as a transparent marker for the preprocessor.
|
|
47
|
+
"""
|
|
48
|
+
return type_hint
|
|
49
|
+
|
|
50
|
+
class Bind(metaclass=BindMeta):
|
|
51
|
+
"""Runtime marker class for explicit variable binding.
|
|
52
|
+
|
|
53
|
+
This class serves as a marker for the preprocessor to understand
|
|
54
|
+
when variable names should be injected into construct instantiations.
|
|
55
|
+
At runtime, Bind[T] returns T directly, making it transparent.
|
|
56
|
+
|
|
57
|
+
Example usage:
|
|
58
|
+
# Type checker sees: Resource (with full autocomplete)
|
|
59
|
+
# Preprocessor sees: Bind annotation (triggers wrapping)
|
|
60
|
+
# Runtime gets: Resource (transparent)
|
|
61
|
+
my_resource: Bind = Resource(nf_type="aws_s3_bucket")
|
|
62
|
+
my_vpc: Bind[Vpc] = Vpc(cidr_block="10.0.0.0/16")
|
|
63
|
+
"""
|
|
64
|
+
|
|
65
|
+
class _BindContext:
|
|
66
|
+
"""No-op context manager used by the preprocessor as a binding marker."""
|
|
67
|
+
|
|
68
|
+
def __enter__(self) -> None:
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
def __exit__(self, *args: object) -> None:
|
|
72
|
+
return None
|
|
73
|
+
|
|
74
|
+
def __call__(self) -> _BindContext:
|
|
75
|
+
return self
|
|
76
|
+
|
|
77
|
+
BindContext = _BindContext()
|
|
78
|
+
|
|
79
|
+
from netherframe.core.autoscope import autoscope
|
|
80
|
+
from netherframe.core.backends.backend_chain import (
|
|
81
|
+
BackendBootstrapAction,
|
|
82
|
+
BackendBootstrapResult,
|
|
83
|
+
BackendChain,
|
|
84
|
+
BackendDecision,
|
|
85
|
+
BackendSelection,
|
|
86
|
+
ConditionalBackend,
|
|
87
|
+
)
|
|
88
|
+
from netherframe.core.constructs.app_stack import App, Stack
|
|
89
|
+
from netherframe.core.constructs.backend_base import LocalBackend
|
|
90
|
+
from netherframe.core.constructs.base_construct import BaseConstruct as Construct
|
|
91
|
+
from netherframe.core.constructs.framework_settings import BackendSettings, ProviderSettings
|
|
92
|
+
from netherframe.core.constructs.generated_value import GeneratedValue
|
|
93
|
+
from netherframe.core.constructs.infrastructure import Output, Variable
|
|
94
|
+
from netherframe.core.constructs.meta import Condition, DataLifecycleRules, LifecycleRules
|
|
95
|
+
from netherframe.core.constructs.resources import DataSource, Provider, Resource
|
|
96
|
+
from netherframe.core.values.runtime_value import RuntimeValue
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
__all__ = [
|
|
100
|
+
# Core constructs
|
|
101
|
+
"App",
|
|
102
|
+
"Stack",
|
|
103
|
+
"Resource",
|
|
104
|
+
"DataSource",
|
|
105
|
+
"Provider",
|
|
106
|
+
"ProviderSettings",
|
|
107
|
+
"GeneratedValue",
|
|
108
|
+
"Output",
|
|
109
|
+
"Variable",
|
|
110
|
+
"Construct",
|
|
111
|
+
# Meta-arguments
|
|
112
|
+
"LifecycleRules",
|
|
113
|
+
"DataLifecycleRules",
|
|
114
|
+
"Condition",
|
|
115
|
+
"Fn",
|
|
116
|
+
"RuntimeValue",
|
|
117
|
+
"autoscope",
|
|
118
|
+
# Backends
|
|
119
|
+
"BackendChain",
|
|
120
|
+
"BackendBootstrapAction",
|
|
121
|
+
"BackendBootstrapResult",
|
|
122
|
+
"BackendDecision",
|
|
123
|
+
"BackendSelection",
|
|
124
|
+
"ConditionalBackend",
|
|
125
|
+
"LocalBackend",
|
|
126
|
+
"BackendSettings",
|
|
127
|
+
# Preprocessor control
|
|
128
|
+
"Bind",
|
|
129
|
+
"BindContext",
|
|
130
|
+
]
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def __getattr__(name: str) -> Any:
|
|
134
|
+
# Fn comes from the installed legacy function catalog; resolve it on first use
|
|
135
|
+
# so importing netherframe.core does not require a catalog package.
|
|
136
|
+
if name == "Fn":
|
|
137
|
+
from netherframe.core.functions.functions import Fn
|
|
138
|
+
|
|
139
|
+
return Fn
|
|
140
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""Autoscope decorator for automatic scope detection."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import functools
|
|
6
|
+
from typing import Any, Protocol, cast
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class _InitAssignable(Protocol):
|
|
10
|
+
__init__: Any
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def autoscope[T](cls: type[T]) -> type[T]:
|
|
14
|
+
"""Decorator that automatically detects and injects scope for construct classes.
|
|
15
|
+
|
|
16
|
+
This decorator wraps the __init__ method of a class to automatically detect
|
|
17
|
+
the current scope from the context stack when nf_scope is not provided.
|
|
18
|
+
|
|
19
|
+
The ``__init__`` of an ``App`` or ``Stack`` subclass also makes the construct the current
|
|
20
|
+
scope once it is set up (``super().__init__`` has run) until ``__init__`` returns, as
|
|
21
|
+
``with self:`` would: constructs created in its body default to ``nf_scope=self``.
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
cls: The class to decorate
|
|
25
|
+
|
|
26
|
+
Returns:
|
|
27
|
+
The decorated class
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
original_init = cls.__init__
|
|
31
|
+
|
|
32
|
+
def inject_scope(kwargs: dict[str, Any]) -> None:
|
|
33
|
+
# If nf_scope is not provided, try to get from context
|
|
34
|
+
if "nf_scope" not in kwargs:
|
|
35
|
+
# Import here to avoid circular imports
|
|
36
|
+
from netherframe.core.constructs.base_construct import BaseConstruct
|
|
37
|
+
|
|
38
|
+
# Try to get current scope from context
|
|
39
|
+
current_scope = BaseConstruct._current_scope()
|
|
40
|
+
if current_scope:
|
|
41
|
+
kwargs["nf_scope"] = current_scope
|
|
42
|
+
|
|
43
|
+
@functools.wraps(original_init)
|
|
44
|
+
def wrapped_init(self: Any, *args: Any, **kwargs: Any) -> None:
|
|
45
|
+
inject_scope(kwargs)
|
|
46
|
+
original_init(self, *args, **kwargs)
|
|
47
|
+
|
|
48
|
+
@functools.wraps(original_init)
|
|
49
|
+
def wrapped_scope_init(self: Any, *args: Any, **kwargs: Any) -> None:
|
|
50
|
+
from netherframe.core.constructs.base_construct import BaseConstruct
|
|
51
|
+
|
|
52
|
+
inject_scope(kwargs)
|
|
53
|
+
BaseConstruct._run_scoping_init(self, original_init, args, kwargs)
|
|
54
|
+
|
|
55
|
+
# Organizational constructs hold the constructs created in their body; resources hold none
|
|
56
|
+
scopes_children = bool(getattr(cls, "_is_app", False) or getattr(cls, "_is_stack", False))
|
|
57
|
+
init_target = cast("_InitAssignable", cls)
|
|
58
|
+
init_target.__init__ = wrapped_scope_init if scopes_children else wrapped_init
|
|
59
|
+
return cls
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Backends package facade."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .backend_bootstrap import (
|
|
6
|
+
BackendBootstrapManager,
|
|
7
|
+
BackendBootstrapper,
|
|
8
|
+
BackendResources,
|
|
9
|
+
)
|
|
10
|
+
from .backend_chain import BackendChain, ConditionalBackend, build_backend_chain_from_config
|
|
11
|
+
from .backend_config import BackendAutoDetector, BackendConfig, BackendConfigManager
|
|
12
|
+
from .backend_registry import BackendRegistry, backend_construct, state_backend
|
|
13
|
+
from .state_engine import (
|
|
14
|
+
BackendType,
|
|
15
|
+
LocalBackendConfig,
|
|
16
|
+
LocalStateBackend,
|
|
17
|
+
PostgreSQLBackendConfig,
|
|
18
|
+
ResourceState,
|
|
19
|
+
S3BackendConfig,
|
|
20
|
+
State,
|
|
21
|
+
StateBackend,
|
|
22
|
+
StateChange,
|
|
23
|
+
StateEngine,
|
|
24
|
+
StateVersion,
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
__all__ = [
|
|
28
|
+
"BackendAutoDetector",
|
|
29
|
+
"BackendBootstrapManager",
|
|
30
|
+
"BackendBootstrapper",
|
|
31
|
+
"BackendChain",
|
|
32
|
+
"BackendConfig",
|
|
33
|
+
"BackendConfigManager",
|
|
34
|
+
"BackendRegistry",
|
|
35
|
+
"BackendResources",
|
|
36
|
+
"BackendType",
|
|
37
|
+
"ConditionalBackend",
|
|
38
|
+
"LocalBackendConfig",
|
|
39
|
+
"LocalStateBackend",
|
|
40
|
+
"PostgreSQLBackendConfig",
|
|
41
|
+
"ResourceState",
|
|
42
|
+
"S3BackendConfig",
|
|
43
|
+
"State",
|
|
44
|
+
"StateBackend",
|
|
45
|
+
"StateChange",
|
|
46
|
+
"StateEngine",
|
|
47
|
+
"StateVersion",
|
|
48
|
+
"backend_construct",
|
|
49
|
+
"build_backend_chain_from_config",
|
|
50
|
+
"state_backend",
|
|
51
|
+
]
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"""Backend bootstrapping functionality - provider-agnostic core abstractions."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from abc import ABC, abstractmethod
|
|
6
|
+
from dataclasses import asdict, dataclass
|
|
7
|
+
from typing import Any, ClassVar
|
|
8
|
+
|
|
9
|
+
from netherframe.core.exceptions import ConfigurationError
|
|
10
|
+
from netherframe.core.logging import get_logger
|
|
11
|
+
|
|
12
|
+
logger = get_logger(__name__)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@dataclass
|
|
16
|
+
class BackendResources:
|
|
17
|
+
"""Information about resources created for backend storage.
|
|
18
|
+
|
|
19
|
+
This is a generic container that can hold any backend-specific resource information.
|
|
20
|
+
Providers should extend this or use it directly with their specific fields.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
def to_dict(self) -> dict[str, Any]:
|
|
24
|
+
"""Convert to dictionary, excluding None values."""
|
|
25
|
+
return {k: v for k, v in asdict(self).items() if v is not None}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class BackendBootstrapper(ABC):
|
|
29
|
+
"""Abstract base class for backend bootstrappers.
|
|
30
|
+
|
|
31
|
+
Provider-specific packages should implement this interface to provide
|
|
32
|
+
backend resource bootstrapping functionality.
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
@abstractmethod
|
|
36
|
+
def bootstrap(self) -> BackendResources:
|
|
37
|
+
"""Bootstrap all backend resources.
|
|
38
|
+
|
|
39
|
+
Returns:
|
|
40
|
+
BackendResources with information about created resources
|
|
41
|
+
|
|
42
|
+
"""
|
|
43
|
+
|
|
44
|
+
@abstractmethod
|
|
45
|
+
def validate(self) -> bool:
|
|
46
|
+
"""Validate that all required backend resources exist.
|
|
47
|
+
|
|
48
|
+
Returns:
|
|
49
|
+
True if all resources exist, False otherwise
|
|
50
|
+
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class BackendBootstrapManager:
|
|
55
|
+
"""Manager for backend bootstrappers.
|
|
56
|
+
|
|
57
|
+
This allows provider packages to register their bootstrappers.
|
|
58
|
+
"""
|
|
59
|
+
|
|
60
|
+
_bootstrappers: ClassVar[dict[str, type[BackendBootstrapper]]] = {}
|
|
61
|
+
|
|
62
|
+
@classmethod
|
|
63
|
+
def register_bootstrapper(
|
|
64
|
+
cls,
|
|
65
|
+
backend_type: str,
|
|
66
|
+
bootstrapper_class: type[BackendBootstrapper],
|
|
67
|
+
) -> None:
|
|
68
|
+
"""Register a bootstrapper for a backend type.
|
|
69
|
+
|
|
70
|
+
This should be called by provider packages to register their bootstrappers.
|
|
71
|
+
For example, aws-backends would register S3BackendBootstrapper for "s3".
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
backend_type: The backend type (e.g., "s3", "gcs", "azurerm")
|
|
75
|
+
bootstrapper_class: The bootstrapper class to register
|
|
76
|
+
|
|
77
|
+
"""
|
|
78
|
+
cls._bootstrappers[backend_type] = bootstrapper_class
|
|
79
|
+
logger.debug("Registered bootstrapper for backend type: %s", backend_type)
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def get_bootstrapper(cls, backend_type: str, **kwargs: Any) -> BackendBootstrapper:
|
|
83
|
+
"""Get a bootstrapper instance for a backend type.
|
|
84
|
+
|
|
85
|
+
Args:
|
|
86
|
+
backend_type: The backend type
|
|
87
|
+
**kwargs: Arguments to pass to the bootstrapper constructor
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
Bootstrapper instance
|
|
91
|
+
|
|
92
|
+
Raises:
|
|
93
|
+
ConfigurationError: If no bootstrapper is registered for the backend type
|
|
94
|
+
|
|
95
|
+
"""
|
|
96
|
+
if backend_type not in cls._bootstrappers:
|
|
97
|
+
raise ConfigurationError(
|
|
98
|
+
f"No bootstrapper registered for backend type: {backend_type}. Available types: {list(cls._bootstrappers.keys())}",
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
bootstrapper_class = cls._bootstrappers[backend_type]
|
|
102
|
+
return bootstrapper_class(**kwargs)
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
def bootstrap_backend(cls, backend_type: str, **kwargs: Any) -> BackendResources:
|
|
106
|
+
"""Bootstrap a backend and return resource information.
|
|
107
|
+
|
|
108
|
+
Convenience method that gets the bootstrapper and calls bootstrap().
|
|
109
|
+
|
|
110
|
+
Args:
|
|
111
|
+
backend_type: The backend type
|
|
112
|
+
**kwargs: Arguments to pass to the bootstrapper
|
|
113
|
+
|
|
114
|
+
Returns:
|
|
115
|
+
BackendResources with information about created resources
|
|
116
|
+
|
|
117
|
+
"""
|
|
118
|
+
bootstrapper = cls.get_bootstrapper(backend_type, **kwargs)
|
|
119
|
+
return bootstrapper.bootstrap()
|
|
120
|
+
|
|
121
|
+
@classmethod
|
|
122
|
+
def is_bootstrapper_available(cls, backend_type: str) -> bool:
|
|
123
|
+
"""Check if a bootstrapper is available for a backend type.
|
|
124
|
+
|
|
125
|
+
Args:
|
|
126
|
+
backend_type: The backend type to check
|
|
127
|
+
|
|
128
|
+
Returns:
|
|
129
|
+
True if a bootstrapper is registered, False otherwise
|
|
130
|
+
|
|
131
|
+
"""
|
|
132
|
+
return backend_type in cls._bootstrappers
|