management.util.startup_context =============================== .. py:module:: management.util.startup_context .. autoapi-nested-parse:: Context builder for startup strategies. Module Contents --------------- .. py:class:: StartupContextBuilder(output, current_version) Builder for creating StartupContext objects. .. py:attribute:: output .. py:attribute:: current_version .. py:attribute:: db_version :type: packaging.version.Version | None :value: None .. py:attribute:: wizard_state :type: setup_wizard.SetupWizardState | None :value: None .. py:attribute:: wizard_completed :type: bool :value: False .. py:attribute:: storage_type :type: management.models.KeyStorageConfig.StorageType | None :value: None .. py:attribute:: is_hsm :type: bool :value: False .. py:attribute:: dek_accessible :type: bool :value: False .. py:attribute:: has_kek :type: bool :value: False .. py:attribute:: has_backup_encrypted_dek :type: bool :value: False .. py:method:: with_db_version(db_version) Set the database version. :param db_version: The version from the database. :returns: Self for method chaining. .. py:method:: collect_wizard_state() Collect wizard state information. :returns: Self for method chaining. .. py:method:: collect_storage_config() Collect storage configuration information. :returns: Self for method chaining. .. py:method:: collect_dek_state() Collect DEK accessibility information. :returns: Self for method chaining. .. py:method:: build() Build the StartupContext object. :returns: The constructed StartupContext. .. py:method:: build_for_db_init() Build a minimal StartupContext for database initialization scenarios. This is used when the database is not initialized or has no version, so we can't query for wizard state, storage config, or DEK state. :returns: A minimal StartupContext with db_initialized=False.