{% extends "generic/_base.html" %} {% load i18n %} {% comment %} The page every migration pass is started from. Context: - inventory_job: The most recent inventory Job, or None - staging_job: The most recent staging Job, or None - staging_queued: Whether a staging pass is already under way - blocking_findings: The blocking findings the last inventory recorded, each {path, code, message} - warning_count: How many modules the last inventory reported a warning for - branch_import_count: How many modules import something absent, but only inside a branch - undefined_script_count: How many published Scripts their own module does not define - reports_excluded: Whether the last inventory reported built-in report modules it excludes - helper_count: How many modules the last inventory reported would publish nothing - rows: One {key, name, project, revision} per Project either pass named, project None until staged - run: The open MigrationRun, or None before the first staging pass - cutover_job: The most recent cutover Job, or None - cutover_queued: Whether a cutover is already under way - can_cut_over: Whether the crossing has not been recorded yet and can be served past the fence - cutover_interrupted: Whether the state reached cutover with the crossing unrecorded, so the fence may have closed - unservable_projects: The staged Projects that could serve nothing past the fence, each {project_key, reason} - activation_job: The most recent activation Job, or None - activation_queued: Whether an activation is already under way - can_activate: Whether the fence has been crossed, which is activation's only precondition - references_job: The most recent reference pass Job, or None - references_queued: Whether a reference pass is already under way - can_repoint: Whether every migrated Project that still exists serves, so a reference has a row to name - projects_not_serving: The migrated Projects that exist and serve nothing, which a reference pass would refuse over - cleanup_job: The most recent cleanup Job, or None - cleanup_queued: Whether a cleanup is already under way - can_clean_up: Whether every reference step is done and every mapped Project serves, which is what deletion waits for - verification_job: The most recent verification Job, or None - next_action: Which pass to run next, or None when the next move is not a button here {% endcomment %} {% block title %} {% trans "Custom Script migration" %} {% endblock title %} {% block content %}
{% trans "The inventory reports what a migration would do and changes nothing. Staging creates the Script Projects it proposes, every one inactive, and leaves the built-in Custom Scripts serving. Every step from the cutover onwards changes what this installation runs, and there is no way back." %}
| {% trans "State" %} | {% if run %} {{ run.get_state_display }} {% else %} {% trans "Not started" %} {% endif %} |
|---|---|
| {% trans "Last inventory" %} | {% include "netbox_scripts/inc/migration_job.html" with job=inventory_job %} |
| {% trans "Last staging" %} | {% include "netbox_scripts/inc/migration_job.html" with job=staging_job %} |
| {% trans "Last cutover" %} | {% include "netbox_scripts/inc/migration_job.html" with job=cutover_job %} |
| {% trans "Last activation" %} | {% include "netbox_scripts/inc/migration_job.html" with job=activation_job %} |
| {% trans "Last reference pass" %} | {% include "netbox_scripts/inc/migration_job.html" with job=references_job %} |
| {% trans "Last cleanup" %} | {% include "netbox_scripts/inc/migration_job.html" with job=cleanup_job %} |
| {% trans "Last verification" %} | {% include "netbox_scripts/inc/migration_job.html" with job=verification_job %} |
{% trans "The last inventory found source a migration could not import. Staging creates nothing while any of these stands, so resolve each one in the built-in feature and run the inventory again." %}
| {% trans "Module" %} | {% trans "Why it blocks" %} |
|---|---|
{{ finding.path }}
{{ finding.code }}
|
{{ finding.message }} |
{% trans "These Script Projects could serve nothing once the built-in feature is closed, and there is no way back across that fence. Wait for a verdict on the ones still being validated, and fix the source of the rest and stage it again." %}
| {% trans "Project" %} | {% trans "Why it blocks" %} |
|---|---|
{{ entry.project_key }}
|
{{ entry.reason }} |
{% trans "These migrated Script Projects are serving no revision, so an Event Rule or a repointed job would have no Script to name, and deleting their built-in modules would take the last runnable copy. Put each one into service, then run the activation again." %}
| {% trans "Project" %} |
|---|
{{ key }}
|
{% blocktrans count total=warning_count %} One module imports the legacy authoring API, which stops working at NetBox v5.0. Staging is not blocked by it. {% plural %} {{ total }} modules import the legacy authoring API, which stops working at NetBox v5.0. Staging is not blocked by them. {% endblocktrans %} {% trans "The inventory names each one." %}
{% endif %} {% if branch_import_count %}{% blocktrans count total=branch_import_count %} One module imports something this host cannot provide, but only inside a conditional branch. If that branch runs, the revision fails validation and says so. Staging is not blocked by it. {% plural %} {{ total }} modules import something this host cannot provide, but only inside a conditional branch. If those branches run, the revisions fail validation and say so. Staging is not blocked by them. {% endblocktrans %} {% trans "The inventory names each one." %}
{% endif %} {% if undefined_script_count %}{% blocktrans count total=undefined_script_count %} One Script the built-in feature publishes is not defined in the module it publishes from, so a migration cannot keep it under that identity. {% plural %} {{ total }} Scripts the built-in feature publishes are not defined in the modules they publish from, so a migration cannot keep them under those identities. {% endblocktrans %} {% trans "The inventory names each one." %}
{% endif %} {% if reports_excluded %}{% trans "Built-in report modules are not part of this migration, because reports use an authoring API this plugin does not serve." %} {% trans "The inventory says how many, and the cutover withdraws any permission naming them." %}
{% endif %} {% if helper_count %}{% blocktrans count total=helper_count %} One module publishes no Script, so it migrates as a helper file rather than a script file. {% plural %} {{ total }} modules publish no Script, so they migrate as helper files rather than script files. {% endblocktrans %} {% trans "The inventory names each one." %}
{% endif %} {% if rows %}{% trans "Every Project the passes above name, including one the inventory proposed that staging has not created yet. Each state is read now rather than when a pass ran, so it is the verdict validation reached, and a revision that was refused records why on its own page." %}
| {% trans "Script Project" %} | {% trans "Revision" %} | {% trans "Status" %} | {% trans "Scripts" %} |
|---|---|---|---|
| {% if row.project %} {{ row.project }} {% else %} {{ row.name }} {% endif %} | {% with revision=row.revision %}{% if revision %} {% firstof revision.short_digest _("Not stored") %} {% else %} {{ ''|placeholder }} {% endif %} | {% if revision %} {{ revision.get_status_display }} {% else %} {% trans "Not staged" %} {% endif %} | {% if revision %} {{ revision.discovered_scripts|length }} {% else %} {{ ''|placeholder }} {% endif %} | {% endwith %}
{% trans "This migration reached the cutover state without recording the crossing, so the fence may already have closed. Enter the cutover again to finish it, and treat the backup as still required until it reports." %}