systemlink-cli 3.1.1__tar.gz → 3.2.1__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.
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/PKG-INFO +1 -1
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/pyproject.toml +2 -1
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/_version.py +1 -1
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migrate_click.py +1 -1
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/command.py +5 -9
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/connection.py +25 -10
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/flows/migrate.py +8 -3
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/testmonitor/client.py +5 -2
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/testmonitor/discovery.py +12 -5
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/testmonitor/discovery_task.py +1 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/workspace_client.py +18 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/workspace_task.py +18 -12
- systemlink_cli-3.2.1/slcli/migration/workspaces.py +163 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/commands.md +5 -1
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/workspace_click.py +6 -6
- systemlink_cli-3.1.1/slcli/migration/workspaces.py +0 -125
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/LICENSE +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/dff-editor/editor.js +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/dff-editor/index.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/__init__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/__main__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/alarm_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/asset_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/cli_formatters.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/cli_utils.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/comment_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/completion_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/config.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/config_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/credentials.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/dataframe_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/dff_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/dff_decorators.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/example_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/example_loader.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/example_provisioner.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/_schema/schema-v1.0.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/demo-data-1/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/demo-data-1/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/demo-data-2/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/demo-data-2/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/demo-data-3/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/demo-data-3/leakage-current-results.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/demo-data-3/overvoltage-results.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/demo-data-3/product-xyz-compliance-report.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/demo-data-3/product-xyz-specification.csv +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/demo-data-3/thermal-response-results.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/exercise-5-1-parametric-insights/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/exercise-5-1-parametric-insights/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/exercise-7-1-test-plans/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/exercise-7-1-test-plans/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/spec-compliance-notebooks/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/spec-compliance-notebooks/config.yaml +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/spec-compliance-notebooks/notebooks/SpecAnalysis_ComplianceCalculation.ipynb +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/spec-compliance-notebooks/notebooks/SpecComplianceCalculation.ipynb +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/spec-compliance-notebooks/notebooks/SpecfileExtractionAndIngestion.ipynb +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/examples/spec-compliance-notebooks/spec_template.xlsx +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/feed_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/file_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/function_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/function_templates.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/main.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/managed_client/__init__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/managed_client/crypto.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/managed_client/handlers.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/managed_client/minion.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/managed_client/models.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/managed_client/protocol.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/managed_client/rest.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/managed_client/state.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/managed_client/transport.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/managed_client_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/mcp_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/mcp_reachability.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/mcp_server.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/mcp_skills.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/__init__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/annotations.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/api.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/flows/__init__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/flows/batching.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/flows/discover.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/flows/service.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/orchestration.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/prefect_server.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/schema.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/state.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/summary.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/testmonitor/__init__.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/testmonitor/migration.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/testmonitor/migration_task.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/testmonitor/models.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/testmonitor/records.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/migration/testmonitor/writer.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/notebook_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/paths.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/pkce.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/platform.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/policy_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/policy_utils.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/profile_credentials.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/profiles.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/response_handlers.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/rich_output.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/routine_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skill_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/SKILL.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/evals/COPILOT_BATCH_RUN_PROMPT.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/evals/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/evals/evals.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/evals/evals.schema.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/evals/files/spec-import/battery-specs.csv +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/evals/files/webapp-package/icon.svg +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/evals/files/webapp-package/nipkg.config.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/evals/files/webapp-package/webapp-content/index.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/evals/trigger_evals.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/analysis-recipes.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/datasheet-workflow.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/domain-concepts.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/example-authoring.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/filtering.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/import-specs.min.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/job-debugging/overview.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/nipkg/overview.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/notebook/interfaces.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/notebook/notebook-patterns.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/notebook/overview.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/python-test/overview.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/routine-examples.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/troubleshooting.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/webapp/angular-ui-packages.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/webapp/deployment.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/webapp/layout-patterns.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/webapp/nimble-angular.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/webapp/overview.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/webapp/systemlink-services.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/references/webapp/troubleshooting.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/scripts/benchmark_iteration.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/scripts/compare_iteration.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/scripts/eval_manifest.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/scripts/grade_eval_response.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/scripts/grade_iteration.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/scripts/prepare_eval_prompts.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/scripts/prepare_eval_workspace.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/scripts/render_eval_review.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/skills/slcli/scripts/spec_import_helper.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/spec_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/ssl_trust.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/state_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/system_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/system_query_utils.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/systemlink-logo.svg +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/table_utils.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/tag_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/templates_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/testmonitor_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/universal_handlers.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/user_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/utils.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/version_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/web_editor.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_bootstrap.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/.gitignore +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/angular.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/package.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/scripts/filter-sbom.js +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/app-routing.module.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/app.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/app.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/app.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/app.module.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/core/state/app-view-state.service.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/systemlink-context.service.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/systemlink-locale.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/theme-sync.service.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/webapp-home-data.service.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/app/shared/states/view-state.model.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/assets/README.md +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/index.html +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/locale/messages.de.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/locale/messages.en.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/locale/messages.es.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/locale/messages.fr.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/locale/messages.ja.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/locale/messages.ko.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/locale/messages.zh.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/localize.d.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/main.ts +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/src/styles.scss +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/tsconfig.app.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/webapp_templates/angular/blank/tsconfig.json +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/workflow_preview.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/workflows_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/workitem_click.py +0 -0
- {systemlink_cli-3.1.1 → systemlink_cli-3.2.1}/slcli/workspace_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "systemlink-cli"
|
|
3
|
-
version = "3.
|
|
3
|
+
version = "3.2.1"
|
|
4
4
|
description = "SystemLink Integrator CLI - cross-platform CLI for SystemLink workflows and templates."
|
|
5
5
|
authors = ["Fred Visser <fred.visser@emerson.com>"]
|
|
6
6
|
packages = [{ include = "slcli" }]
|
|
@@ -114,6 +114,7 @@ filterwarnings = [
|
|
|
114
114
|
markers = [
|
|
115
115
|
"e2e: marks tests as end-to-end tests (not run by default)",
|
|
116
116
|
"e2e_migration: marks migration end-to-end tests",
|
|
117
|
+
"e2e_migration_manual: marks opt-in migration E2E tests that must be run against a throw-away destination",
|
|
117
118
|
"full_os_client_matrix: marks tests requiring full supported-OS client coverage",
|
|
118
119
|
"slow: marks tests as slow running",
|
|
119
120
|
"notebook: marks tests as notebook-related",
|
|
@@ -97,7 +97,7 @@ def register_migrate_command(cli: click.Group) -> None:
|
|
|
97
97
|
"Comma-delimited SOURCE or SOURCE:DESTINATION workspace mappings. "
|
|
98
98
|
"Escape ',' or ':' in a workspace name with a backslash, for example Lab\\:A:Dest. "
|
|
99
99
|
"Only the listed source workspaces are migrated; all when omitted. "
|
|
100
|
-
"
|
|
100
|
+
"Missing destination workspaces are created unless the destination profile is readonly."
|
|
101
101
|
),
|
|
102
102
|
)
|
|
103
103
|
@click.option("--migration-id", help="Resume an existing migration.")
|
|
@@ -85,15 +85,11 @@ def _echo_connections(source: MigrationConnection, destination: MigrationConnect
|
|
|
85
85
|
)
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
def _mapping_error(
|
|
89
|
-
exc: WorkspaceMappingError, workspace_mappings: Optional[Dict[str, str]]
|
|
90
|
-
) -> click.ClickException:
|
|
91
|
-
# TODO(AB#4088608): Synchronize workspaces will create missing destination workspaces.
|
|
88
|
+
def _mapping_error(exc: WorkspaceMappingError) -> click.ClickException:
|
|
92
89
|
hint = (
|
|
93
|
-
"
|
|
94
|
-
if
|
|
95
|
-
else "
|
|
96
|
-
"--workspace-mappings. Destination workspaces are not created by migration."
|
|
90
|
+
"Check that the requested source workspaces exist."
|
|
91
|
+
if exc.missing_source
|
|
92
|
+
else "Check destination workspace access and retry."
|
|
97
93
|
)
|
|
98
94
|
return click.ClickException(f"{exc}. {hint}")
|
|
99
95
|
|
|
@@ -147,7 +143,7 @@ def _migrate(
|
|
|
147
143
|
outcome = run_migration(run, metadata, api_url)
|
|
148
144
|
except WorkspaceMappingError as exc:
|
|
149
145
|
_log_failure(exc, log_path)
|
|
150
|
-
raise _mapping_error(exc
|
|
146
|
+
raise _mapping_error(exc) from exc
|
|
151
147
|
except requests.RequestException as exc:
|
|
152
148
|
_log_failure(exc, log_path)
|
|
153
149
|
handle_api_error(exc)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import logging
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
from types import TracebackType
|
|
6
|
-
from typing import Any, Dict, Optional, Union
|
|
6
|
+
from typing import Any, Dict, Iterable, Optional, Union
|
|
7
7
|
|
|
8
8
|
import click
|
|
9
9
|
import requests
|
|
@@ -54,15 +54,16 @@ class LoggingRetry(Retry):
|
|
|
54
54
|
return retry
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
_QUERY_RETRY = LoggingRetry(
|
|
57
|
+
_DEFAULT_RETRY = LoggingRetry(
|
|
59
58
|
total=5,
|
|
60
59
|
backoff_factor=0.5,
|
|
61
60
|
status_forcelist=(429, 500, 502, 503, 504),
|
|
62
|
-
allowed_methods=frozenset({"GET"
|
|
61
|
+
allowed_methods=frozenset({"GET"}),
|
|
63
62
|
respect_retry_after_header=True,
|
|
64
63
|
raise_on_status=False,
|
|
65
64
|
)
|
|
65
|
+
# Policy for read-only queries, including POST query endpoints, which are safe to replay.
|
|
66
|
+
_QUERY_RETRY = _DEFAULT_RETRY.new(allowed_methods=frozenset({"GET", "POST"}))
|
|
66
67
|
|
|
67
68
|
# Policy for destination writes. Only failures where the server did not process the
|
|
68
69
|
# request are retried: refused connections and explicit 429/503 back-pressure. Read
|
|
@@ -96,16 +97,30 @@ class _ProfileSession(requests.Session):
|
|
|
96
97
|
|
|
97
98
|
@dataclass(frozen=True)
|
|
98
99
|
class MigrationConnection:
|
|
99
|
-
"""Endpoint, authentication, and
|
|
100
|
+
"""Endpoint, authentication, TLS, and read-only settings from a named profile."""
|
|
100
101
|
|
|
101
102
|
profile_name: str
|
|
102
103
|
base_url: str
|
|
103
104
|
headers: Dict[str, str] = field(repr=False)
|
|
104
105
|
ssl_verify: Union[bool, str] = True
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
readonly: bool = False
|
|
107
|
+
|
|
108
|
+
def create_session(self, query_paths: Iterable[str] = ()) -> requests.Session:
|
|
109
|
+
"""Return a session bound to this connection's credentials and TLS.
|
|
110
|
+
|
|
111
|
+
Requests are matched to a retry policy by URL prefix. URLs under any
|
|
112
|
+
``query_paths`` entry use the query policy, which replays POST requests.
|
|
113
|
+
All other URLs use the default policy, which never replays POST requests.
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
query_paths: Route prefixes relative to ``base_url`` whose POST requests
|
|
117
|
+
are read-only queries, such as ``"nitestmonitor/v2/query-"``.
|
|
118
|
+
"""
|
|
119
|
+
session = self._session(_DEFAULT_RETRY)
|
|
120
|
+
base = self.base_url.rstrip("/")
|
|
121
|
+
for path in query_paths:
|
|
122
|
+
session.mount(f"{base}/{path.lstrip('/')}", HTTPAdapter(max_retries=_QUERY_RETRY))
|
|
123
|
+
return session
|
|
109
124
|
|
|
110
125
|
def create_write_session(self) -> requests.Session:
|
|
111
126
|
"""Return a session for non-idempotent writes that never replays ambiguous failures."""
|
|
@@ -157,4 +172,4 @@ def resolve_migration_connection(
|
|
|
157
172
|
if auth is None:
|
|
158
173
|
raise click.ClickException(f"Profile '{profile.name}' does not define an API key")
|
|
159
174
|
headers = get_auth_headers(auth.value, auth.scheme)
|
|
160
|
-
return MigrationConnection(profile.name, base_url, headers, ssl_verify)
|
|
175
|
+
return MigrationConnection(profile.name, base_url, headers, ssl_verify, profile.readonly)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Migration flow: discover, synchronize workspaces, then migrate each resource type."""
|
|
2
2
|
|
|
3
|
-
from typing import Dict, Optional
|
|
3
|
+
from typing import Dict, List, Optional
|
|
4
4
|
|
|
5
5
|
from prefect import flow
|
|
6
6
|
from pydantic import ConfigDict
|
|
@@ -51,9 +51,14 @@ def migrate_flow(
|
|
|
51
51
|
workspace_mappings: Source to destination workspace names; all by name when None.
|
|
52
52
|
product_batch_size: Products per migration task.
|
|
53
53
|
result_batch_size: Results, with their steps, per migration task.
|
|
54
|
+
|
|
55
|
+
Raises:
|
|
56
|
+
WorkspaceMappingError: If a source workspace does not exist.
|
|
54
57
|
"""
|
|
55
|
-
|
|
56
|
-
|
|
58
|
+
workspace_subset_to_migrate: Optional[List[str]] = (
|
|
59
|
+
list(workspace_mappings) if workspace_mappings is not None else None
|
|
60
|
+
)
|
|
61
|
+
discovery = discover_flow(migration_id, source_profile, workspace_subset_to_migrate)
|
|
57
62
|
mapping = synchronize_workspaces_task(
|
|
58
63
|
migration_id, destination_profile, discovery.workspaces, workspace_mappings
|
|
59
64
|
)
|
|
@@ -10,6 +10,9 @@ from slcli.migration.api import REQUEST_TIMEOUT_SECONDS, ApiModel
|
|
|
10
10
|
from slcli.migration.connection import MigrationConnection
|
|
11
11
|
|
|
12
12
|
PAGE_SIZE = 1000
|
|
13
|
+
TEST_MONITOR_BASE_PATH = "nitestmonitor/v2"
|
|
14
|
+
# POST query-products and query-results are read-only, so their retries are safe.
|
|
15
|
+
TEST_MONITOR_QUERY_PATHS = (f"{TEST_MONITOR_BASE_PATH}/query-",)
|
|
13
16
|
|
|
14
17
|
|
|
15
18
|
class Product(ApiModel):
|
|
@@ -94,8 +97,8 @@ class TestMonitorClient:
|
|
|
94
97
|
session: Optional[requests.Session] = None,
|
|
95
98
|
) -> None:
|
|
96
99
|
"""Initialize a Test Monitor query client."""
|
|
97
|
-
self._base_url = f"{connection.base_url}/
|
|
98
|
-
self._session = session or connection.create_session()
|
|
100
|
+
self._base_url = f"{connection.base_url}/{TEST_MONITOR_BASE_PATH}"
|
|
101
|
+
self._session = session or connection.create_session(TEST_MONITOR_QUERY_PATHS)
|
|
99
102
|
|
|
100
103
|
def query_products(self) -> Iterator[Product]:
|
|
101
104
|
"""Yield every product."""
|
|
@@ -89,7 +89,8 @@ def infer_product_workspace(
|
|
|
89
89
|
def discover_test_monitor(
|
|
90
90
|
client: TestMonitorSource,
|
|
91
91
|
all_workspaces: Mapping[str, str],
|
|
92
|
-
selected_workspaces:
|
|
92
|
+
selected_workspaces: Collection[str],
|
|
93
|
+
disabled_workspaces: Collection[str],
|
|
93
94
|
) -> TestMonitorDiscovery:
|
|
94
95
|
"""Discover products and terminal results owned by the selected workspaces.
|
|
95
96
|
|
|
@@ -102,10 +103,13 @@ def discover_test_monitor(
|
|
|
102
103
|
|
|
103
104
|
Args:
|
|
104
105
|
client: Test Monitor queries for the source server.
|
|
105
|
-
all_workspaces: Every
|
|
106
|
-
selected_workspaces:
|
|
106
|
+
all_workspaces: Every (enabled) source workspace, by name to ID.
|
|
107
|
+
selected_workspaces: Names of workspaces in scope of the migration.
|
|
108
|
+
disabled_workspaces: Names of disabled source workspaces, which are never scanned.
|
|
109
|
+
Any disabled workspace may hold results, so products with no results are not
|
|
110
|
+
assigned to Default when this is non-empty.
|
|
107
111
|
"""
|
|
108
|
-
selected = set(
|
|
112
|
+
selected = set(selected_workspaces)
|
|
109
113
|
unknown = selected.difference(all_workspaces)
|
|
110
114
|
if unknown:
|
|
111
115
|
raise ValueError(f"Unknown selected workspace: {', '.join(sorted(unknown))}")
|
|
@@ -114,7 +118,10 @@ def discover_test_monitor(
|
|
|
114
118
|
client, {name: id_ for name, id_ in all_workspaces.items() if name in selected}
|
|
115
119
|
)
|
|
116
120
|
migrate_products_with_no_results = (
|
|
117
|
-
selected == set(all_workspaces)
|
|
121
|
+
selected == set(all_workspaces)
|
|
122
|
+
and DEFAULT_WORKSPACE in selected
|
|
123
|
+
and not disabled_workspaces
|
|
124
|
+
and not scan.failures
|
|
118
125
|
)
|
|
119
126
|
products: List[DiscoveredProduct] = []
|
|
120
127
|
product_ids_by_part_number: Dict[str, str] = {}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from collections.abc import Iterator
|
|
4
4
|
from typing import List, Optional
|
|
5
5
|
|
|
6
|
+
import click
|
|
6
7
|
import requests
|
|
7
8
|
|
|
8
9
|
from slcli.migration.api import REQUEST_TIMEOUT_SECONDS, ApiModel
|
|
@@ -16,6 +17,7 @@ class Workspace(ApiModel):
|
|
|
16
17
|
|
|
17
18
|
id: str
|
|
18
19
|
name: str
|
|
20
|
+
enabled: bool = True
|
|
19
21
|
|
|
20
22
|
|
|
21
23
|
class _WorkspacePage(ApiModel):
|
|
@@ -31,6 +33,7 @@ class WorkspaceClient:
|
|
|
31
33
|
session: Optional[requests.Session] = None,
|
|
32
34
|
) -> None:
|
|
33
35
|
"""Initialize a workspace query client."""
|
|
36
|
+
self._connection = connection
|
|
34
37
|
self._url = f"{connection.base_url}/niuser/v1/workspaces"
|
|
35
38
|
self._session = session or connection.create_session()
|
|
36
39
|
|
|
@@ -49,3 +52,18 @@ class WorkspaceClient:
|
|
|
49
52
|
if len(page.workspaces) < PAGE_SIZE:
|
|
50
53
|
return
|
|
51
54
|
skip += PAGE_SIZE
|
|
55
|
+
|
|
56
|
+
def create_workspace(self, name: str) -> Workspace:
|
|
57
|
+
"""Create an enabled workspace and return its server-assigned identity."""
|
|
58
|
+
if self._connection.readonly:
|
|
59
|
+
raise click.ClickException(
|
|
60
|
+
f"Cannot create a workspace: profile '{self._connection.profile_name}' "
|
|
61
|
+
"is in readonly mode"
|
|
62
|
+
)
|
|
63
|
+
response = self._session.post(
|
|
64
|
+
self._url,
|
|
65
|
+
json={"name": name, "enabled": True},
|
|
66
|
+
timeout=REQUEST_TIMEOUT_SECONDS,
|
|
67
|
+
)
|
|
68
|
+
response.raise_for_status()
|
|
69
|
+
return Workspace(id=str(response.json()["id"]), name=name)
|
|
@@ -23,17 +23,21 @@ from slcli.migration.workspaces import (
|
|
|
23
23
|
cache_policy=INPUTS,
|
|
24
24
|
)
|
|
25
25
|
def discover_workspaces_task(
|
|
26
|
-
migration_id: str, source_profile: str,
|
|
26
|
+
migration_id: str, source_profile: str, explicit_workspace_selection: Optional[List[str]]
|
|
27
27
|
) -> DiscoveredWorkspaces:
|
|
28
28
|
"""Discover the source workspaces in scope of a migration.
|
|
29
29
|
|
|
30
30
|
``migration_id`` is unused by the body but scopes the cache key to one migration.
|
|
31
|
+
``explicit_workspace_selection`` optionally contains a specific set of workspaces to find.
|
|
32
|
+
If not given, all workspaces are discovered and returned.
|
|
31
33
|
|
|
32
34
|
Raises:
|
|
33
|
-
WorkspaceMappingError: If a requested workspace does not exist
|
|
35
|
+
WorkspaceMappingError: If a requested source workspace does not exist.
|
|
34
36
|
"""
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
source_workspace_iterator = WorkspaceClient(
|
|
38
|
+
resolve_migration_connection(source_profile)
|
|
39
|
+
).query_workspaces()
|
|
40
|
+
return discover_workspaces(source_workspace_iterator, explicit_workspace_selection)
|
|
37
41
|
|
|
38
42
|
|
|
39
43
|
# Later migration tasks are cached by the mapping, so a resumed run must reuse
|
|
@@ -48,18 +52,20 @@ def discover_workspaces_task(
|
|
|
48
52
|
def synchronize_workspaces_task(
|
|
49
53
|
migration_id: str,
|
|
50
54
|
destination_profile: str,
|
|
51
|
-
|
|
55
|
+
source_workspaces: DiscoveredWorkspaces,
|
|
52
56
|
workspace_mappings: Optional[Dict[str, str]],
|
|
53
57
|
) -> WorkspaceMapping:
|
|
54
|
-
"""Map
|
|
58
|
+
"""Map source workspaces to existing destination workspaces, or create if missing.
|
|
55
59
|
|
|
56
60
|
``migration_id`` is unused by the body but scopes the cache key to one migration.
|
|
57
61
|
|
|
58
62
|
Raises:
|
|
59
|
-
WorkspaceMappingError: If a destination workspace
|
|
63
|
+
WorkspaceMappingError: If a mapped destination workspace is disabled.
|
|
60
64
|
"""
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
destination_client = WorkspaceClient(resolve_migration_connection(destination_profile))
|
|
66
|
+
return synchronize_workspaces(
|
|
67
|
+
source_workspaces,
|
|
68
|
+
destination_client.query_workspaces(),
|
|
69
|
+
destination_client.create_workspace,
|
|
70
|
+
workspace_mappings,
|
|
71
|
+
)
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"""Discover source workspaces and synchronize them to destination workspaces."""
|
|
2
|
+
|
|
3
|
+
from typing import Callable, Iterable, Mapping, Optional, Sequence, Tuple
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, ConfigDict
|
|
6
|
+
|
|
7
|
+
from slcli.migration.workspace_client import Workspace
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class DiscoveredWorkspaces(BaseModel):
|
|
11
|
+
"""Every accessible enabled source workspace and the names in scope of a migration."""
|
|
12
|
+
|
|
13
|
+
model_config = ConfigDict(frozen=True)
|
|
14
|
+
|
|
15
|
+
source: Tuple[Workspace, ...] = ()
|
|
16
|
+
selected: Tuple[str, ...] = ()
|
|
17
|
+
disabled: Tuple[str, ...] = ()
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class MappedWorkspace(BaseModel):
|
|
21
|
+
"""One source workspace and the existing destination workspace it migrates to."""
|
|
22
|
+
|
|
23
|
+
model_config = ConfigDict(frozen=True)
|
|
24
|
+
|
|
25
|
+
source_name: str
|
|
26
|
+
source_id: str
|
|
27
|
+
destination_name: str
|
|
28
|
+
destination_id: str
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class WorkspaceMapping(BaseModel):
|
|
32
|
+
"""Resolved source-to-destination workspaces, ordered by source name."""
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(frozen=True)
|
|
35
|
+
|
|
36
|
+
workspaces: Tuple[MappedWorkspace, ...] = ()
|
|
37
|
+
|
|
38
|
+
def workspace(self, source_name: str) -> MappedWorkspace:
|
|
39
|
+
"""Return the mapping for a source workspace name.
|
|
40
|
+
|
|
41
|
+
Raises:
|
|
42
|
+
KeyError: If the source workspace is not mapped.
|
|
43
|
+
"""
|
|
44
|
+
for workspace in self.workspaces:
|
|
45
|
+
if workspace.source_name == source_name:
|
|
46
|
+
return workspace
|
|
47
|
+
raise KeyError(f"Workspace '{source_name}' is not mapped")
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class WorkspaceMappingError(ValueError):
|
|
51
|
+
"""Requested workspaces that are missing or have disabled destinations."""
|
|
52
|
+
|
|
53
|
+
def __init__(
|
|
54
|
+
self,
|
|
55
|
+
missing_source: Sequence[str] = (),
|
|
56
|
+
missing_destination: Sequence[str] = (),
|
|
57
|
+
disabled_destination: Sequence[str] = (),
|
|
58
|
+
) -> None:
|
|
59
|
+
"""Record missing source or destination workspaces and disabled destinations."""
|
|
60
|
+
self.missing_source = list(missing_source)
|
|
61
|
+
self.missing_destination = list(missing_destination)
|
|
62
|
+
self.disabled_destination = list(disabled_destination)
|
|
63
|
+
problems = []
|
|
64
|
+
if missing_source:
|
|
65
|
+
problems.append(f"unknown source workspace: {', '.join(missing_source)}")
|
|
66
|
+
if missing_destination:
|
|
67
|
+
problems.append(f"missing destination workspace: {', '.join(missing_destination)}")
|
|
68
|
+
if disabled_destination:
|
|
69
|
+
problems.append(f"disabled destination workspace: {', '.join(disabled_destination)}")
|
|
70
|
+
super().__init__("; ".join(problems))
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def discover_workspaces(
|
|
74
|
+
all_source_workspaces: Iterable[Workspace],
|
|
75
|
+
explicit_workspace_selection: Optional[Iterable[str]],
|
|
76
|
+
) -> DiscoveredWorkspaces:
|
|
77
|
+
"""Select enabled source workspaces in scope of a migration.
|
|
78
|
+
|
|
79
|
+
Args:
|
|
80
|
+
all_source_workspaces: Every accessible source workspace.
|
|
81
|
+
explicit_workspace_selection: Source names to migrate; all enabled workspaces when None.
|
|
82
|
+
|
|
83
|
+
Raises:
|
|
84
|
+
WorkspaceMappingError: If a requested source workspace is missing or disabled.
|
|
85
|
+
"""
|
|
86
|
+
enumerated_source_workspaces = tuple(all_source_workspaces)
|
|
87
|
+
enabled_workspaces = tuple(
|
|
88
|
+
sorted(
|
|
89
|
+
(workspace for workspace in enumerated_source_workspaces if workspace.enabled),
|
|
90
|
+
key=lambda workspace: workspace.name,
|
|
91
|
+
)
|
|
92
|
+
)
|
|
93
|
+
enabled_workspace_names = [workspace.name for workspace in enabled_workspaces]
|
|
94
|
+
disabled_workspace_names = tuple(
|
|
95
|
+
workspace.name for workspace in enumerated_source_workspaces if not workspace.enabled
|
|
96
|
+
)
|
|
97
|
+
names_to_include = (
|
|
98
|
+
sorted(explicit_workspace_selection)
|
|
99
|
+
if explicit_workspace_selection is not None
|
|
100
|
+
else enabled_workspace_names
|
|
101
|
+
)
|
|
102
|
+
missing = sorted(set(names_to_include).difference(enabled_workspace_names))
|
|
103
|
+
if missing:
|
|
104
|
+
raise WorkspaceMappingError(missing_source=missing)
|
|
105
|
+
return DiscoveredWorkspaces(
|
|
106
|
+
source=enabled_workspaces,
|
|
107
|
+
selected=tuple(names_to_include),
|
|
108
|
+
disabled=disabled_workspace_names,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
def synchronize_workspaces(
|
|
113
|
+
source_workspaces: DiscoveredWorkspaces,
|
|
114
|
+
destination_workspaces: Iterable[Workspace],
|
|
115
|
+
create_destination_workspace: Callable[[str], Workspace],
|
|
116
|
+
provided_name_mappings: Optional[Mapping[str, str]],
|
|
117
|
+
) -> WorkspaceMapping:
|
|
118
|
+
"""Map discovered source workspaces to existing destination workspaces.
|
|
119
|
+
|
|
120
|
+
Every selected source workspace maps to the same-named destination workspace
|
|
121
|
+
unless ``provided_name_mappings`` renames it.
|
|
122
|
+
|
|
123
|
+
Args:
|
|
124
|
+
source_workspaces: Source workspaces discovered.
|
|
125
|
+
destination_client: Client for running workspace commands on the destination.
|
|
126
|
+
provided_name_mappings: Explicit source-to-destination name mappings;
|
|
127
|
+
when None, destination names match source.
|
|
128
|
+
|
|
129
|
+
Raises:
|
|
130
|
+
WorkspaceMappingError: If a mapped destination workspace is disabled.
|
|
131
|
+
"""
|
|
132
|
+
destination_workspaces_by_name = {
|
|
133
|
+
workspace.name: workspace for workspace in destination_workspaces
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
name_mappings = {
|
|
137
|
+
source_name: (provided_name_mappings or {}).get(source_name, source_name)
|
|
138
|
+
for source_name in source_workspaces.selected
|
|
139
|
+
}
|
|
140
|
+
needed_names = set(name_mappings.values())
|
|
141
|
+
existing_names = set(destination_workspaces_by_name)
|
|
142
|
+
disabled_names = sorted(
|
|
143
|
+
name
|
|
144
|
+
for name in needed_names & existing_names
|
|
145
|
+
if not destination_workspaces_by_name[name].enabled
|
|
146
|
+
)
|
|
147
|
+
if disabled_names:
|
|
148
|
+
raise WorkspaceMappingError(disabled_destination=disabled_names)
|
|
149
|
+
for missing_name in sorted(needed_names - existing_names):
|
|
150
|
+
destination_workspaces_by_name[missing_name] = create_destination_workspace(missing_name)
|
|
151
|
+
|
|
152
|
+
source_ids = {workspace.name: workspace.id for workspace in source_workspaces.source}
|
|
153
|
+
return WorkspaceMapping(
|
|
154
|
+
workspaces=tuple(
|
|
155
|
+
MappedWorkspace(
|
|
156
|
+
source_name=source_name,
|
|
157
|
+
source_id=source_ids[source_name],
|
|
158
|
+
destination_name=name_mappings[source_name],
|
|
159
|
+
destination_id=destination_workspaces_by_name[name_mappings[source_name]].id,
|
|
160
|
+
)
|
|
161
|
+
for source_name in source_workspaces.selected
|
|
162
|
+
)
|
|
163
|
+
)
|
|
@@ -694,11 +694,15 @@ slcli comment delete <ID1> <ID2> <ID3> --yes
|
|
|
694
694
|
## workspace — Workspace management
|
|
695
695
|
|
|
696
696
|
```bash
|
|
697
|
-
slcli workspace list [--format json]
|
|
697
|
+
slcli workspace list [--format json] [--take N]
|
|
698
698
|
slcli workspace get --workspace WORKSPACE_ID [--format json]
|
|
699
699
|
slcli workspace disable --id WORKSPACE_ID [--yes]
|
|
700
700
|
```
|
|
701
701
|
|
|
702
|
+
`workspace list` defaults to 100. For JSON output, `--take` limits the total
|
|
703
|
+
results. For table output, it sets the page size (maximum 100); interactive users
|
|
704
|
+
can continue through additional pages.
|
|
705
|
+
|
|
702
706
|
## config — Profile and credential management
|
|
703
707
|
|
|
704
708
|
Manage named connection profiles (dev, test, prod). Credentials use the OS
|
|
@@ -19,7 +19,7 @@ from .utils import (
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
def _fetch_workspaces_page(
|
|
22
|
-
name_filter: Optional[str] = None, take: int =
|
|
22
|
+
name_filter: Optional[str] = None, take: int = 100, skip: int = 0
|
|
23
23
|
) -> Tuple[list, int, Optional[str]]:
|
|
24
24
|
"""Fetch a single page of workspaces with optional server-side filtering.
|
|
25
25
|
|
|
@@ -86,21 +86,21 @@ def register_workspace_commands(cli: Any) -> None:
|
|
|
86
86
|
"--take",
|
|
87
87
|
"-t",
|
|
88
88
|
type=click.IntRange(min=1),
|
|
89
|
-
default=
|
|
89
|
+
default=100,
|
|
90
90
|
show_default=True,
|
|
91
|
-
help="
|
|
91
|
+
help="JSON result limit or table page size (API pages max 100)",
|
|
92
92
|
)
|
|
93
93
|
def list_workspaces(
|
|
94
94
|
format: str = "table",
|
|
95
95
|
include_disabled: bool = False,
|
|
96
96
|
name_filter: Optional[str] = None,
|
|
97
|
-
take: int =
|
|
97
|
+
take: int = 100,
|
|
98
98
|
) -> None:
|
|
99
99
|
"""List workspaces with optional filtering.
|
|
100
100
|
|
|
101
101
|
The --filter option performs server-side case-insensitive substring
|
|
102
|
-
matching on workspace names. The --take option
|
|
103
|
-
|
|
102
|
+
matching on workspace names. The --take option sets the JSON result limit
|
|
103
|
+
or table page size (API pages are capped at 100).
|
|
104
104
|
"""
|
|
105
105
|
format_output = validate_output_format(format)
|
|
106
106
|
|