systemlink-cli 2.5.2__tar.gz → 2.5.4__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.
Files changed (216) hide show
  1. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/PKG-INFO +2 -1
  2. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/pyproject.toml +4 -2
  3. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/_version.py +1 -1
  4. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/config.py +3 -9
  5. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/function_click.py +8 -1
  6. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/main.py +3 -0
  7. systemlink_cli-2.5.4/slcli/migrate_click.py +135 -0
  8. systemlink_cli-2.5.4/slcli/migration/command.py +140 -0
  9. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/migration/connection.py +17 -3
  10. systemlink_cli-2.5.4/slcli/migration/flows/__init__.py +1 -0
  11. systemlink_cli-2.5.4/slcli/migration/flows/discover.py +41 -0
  12. systemlink_cli-2.5.4/slcli/migration/orchestration.py +62 -0
  13. systemlink_cli-2.5.4/slcli/migration/schema.py +18 -0
  14. systemlink_cli-2.5.4/slcli/migration/state.py +124 -0
  15. systemlink_cli-2.5.4/slcli/migration/testmonitor/__init__.py +1 -0
  16. systemlink_cli-2.5.4/slcli/migration/testmonitor/client.py +104 -0
  17. systemlink_cli-2.5.4/slcli/migration/testmonitor/discovery.py +158 -0
  18. systemlink_cli-2.5.4/slcli/migration/testmonitor/discovery_task.py +38 -0
  19. systemlink_cli-2.5.4/slcli/migration/testmonitor/models.py +47 -0
  20. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/migration/workspace_client.py +5 -9
  21. systemlink_cli-2.5.4/slcli/paths.py +31 -0
  22. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/profiles.py +3 -8
  23. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/utils.py +22 -15
  24. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/workspace_click.py +4 -3
  25. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/LICENSE +0 -0
  26. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/dff-editor/editor.js +0 -0
  27. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/dff-editor/index.html +0 -0
  28. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/__init__.py +0 -0
  29. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/__main__.py +0 -0
  30. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/alarm_click.py +0 -0
  31. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/asset_click.py +0 -0
  32. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/cli_formatters.py +0 -0
  33. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/cli_utils.py +0 -0
  34. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/comment_click.py +0 -0
  35. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/completion_click.py +0 -0
  36. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/config_click.py +0 -0
  37. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/credentials.py +0 -0
  38. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/dataframe_click.py +0 -0
  39. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/dff_click.py +0 -0
  40. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/dff_decorators.py +0 -0
  41. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/example_click.py +0 -0
  42. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/example_loader.py +0 -0
  43. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/example_provisioner.py +0 -0
  44. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/README.md +0 -0
  45. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/_schema/schema-v1.0.json +0 -0
  46. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/demo-data-1/README.md +0 -0
  47. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/demo-data-1/config.yaml +0 -0
  48. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/demo-data-2/README.md +0 -0
  49. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/demo-data-2/config.yaml +0 -0
  50. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/demo-data-3/config.yaml +0 -0
  51. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/demo-data-3/leakage-current-results.json +0 -0
  52. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/demo-data-3/overvoltage-results.json +0 -0
  53. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/demo-data-3/product-xyz-compliance-report.json +0 -0
  54. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/demo-data-3/product-xyz-specification.csv +0 -0
  55. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/demo-data-3/thermal-response-results.json +0 -0
  56. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/exercise-5-1-parametric-insights/README.md +0 -0
  57. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/exercise-5-1-parametric-insights/config.yaml +0 -0
  58. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/exercise-7-1-test-plans/README.md +0 -0
  59. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/exercise-7-1-test-plans/config.yaml +0 -0
  60. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/spec-compliance-notebooks/README.md +0 -0
  61. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/spec-compliance-notebooks/config.yaml +0 -0
  62. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/spec-compliance-notebooks/notebooks/SpecAnalysis_ComplianceCalculation.ipynb +0 -0
  63. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/spec-compliance-notebooks/notebooks/SpecComplianceCalculation.ipynb +0 -0
  64. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/spec-compliance-notebooks/notebooks/SpecfileExtractionAndIngestion.ipynb +0 -0
  65. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/examples/spec-compliance-notebooks/spec_template.xlsx +0 -0
  66. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/feed_click.py +0 -0
  67. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/file_click.py +0 -0
  68. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/function_templates.py +0 -0
  69. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/managed_client/__init__.py +0 -0
  70. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/managed_client/crypto.py +0 -0
  71. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/managed_client/handlers.py +0 -0
  72. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/managed_client/minion.py +0 -0
  73. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/managed_client/models.py +0 -0
  74. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/managed_client/protocol.py +0 -0
  75. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/managed_client/rest.py +0 -0
  76. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/managed_client/state.py +0 -0
  77. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/managed_client/transport.py +0 -0
  78. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/managed_client_click.py +0 -0
  79. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/mcp_click.py +0 -0
  80. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/mcp_reachability.py +0 -0
  81. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/mcp_server.py +0 -0
  82. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/mcp_skills.py +0 -0
  83. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/migration/__init__.py +0 -0
  84. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/migration/api.py +0 -0
  85. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/migration/prefect_server.py +0 -0
  86. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/notebook_click.py +0 -0
  87. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/pkce.py +0 -0
  88. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/platform.py +0 -0
  89. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/policy_click.py +0 -0
  90. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/policy_utils.py +0 -0
  91. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/profile_credentials.py +0 -0
  92. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/response_handlers.py +0 -0
  93. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/rich_output.py +0 -0
  94. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/routine_click.py +0 -0
  95. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skill_click.py +0 -0
  96. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/SKILL.md +0 -0
  97. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/evals/COPILOT_BATCH_RUN_PROMPT.md +0 -0
  98. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/evals/README.md +0 -0
  99. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/evals/evals.json +0 -0
  100. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/evals/evals.schema.json +0 -0
  101. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/evals/files/spec-import/battery-specs.csv +0 -0
  102. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/evals/files/webapp-package/icon.svg +0 -0
  103. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/evals/files/webapp-package/nipkg.config.json +0 -0
  104. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/evals/files/webapp-package/webapp-content/index.html +0 -0
  105. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/evals/trigger_evals.json +0 -0
  106. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/analysis-recipes.md +0 -0
  107. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/commands.md +0 -0
  108. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/datasheet-workflow.md +0 -0
  109. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/domain-concepts.md +0 -0
  110. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/example-authoring.md +0 -0
  111. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/filtering.md +0 -0
  112. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/import-specs.min.json +0 -0
  113. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/job-debugging/overview.md +0 -0
  114. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/nipkg/overview.md +0 -0
  115. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/notebook/interfaces.md +0 -0
  116. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/notebook/notebook-patterns.md +0 -0
  117. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/notebook/overview.md +0 -0
  118. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/python-test/overview.md +0 -0
  119. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/routine-examples.md +0 -0
  120. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/troubleshooting.md +0 -0
  121. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/webapp/angular-ui-packages.md +0 -0
  122. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/webapp/deployment.md +0 -0
  123. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/webapp/layout-patterns.md +0 -0
  124. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/webapp/nimble-angular.md +0 -0
  125. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/webapp/overview.md +0 -0
  126. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/webapp/systemlink-services.md +0 -0
  127. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/references/webapp/troubleshooting.md +0 -0
  128. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/scripts/benchmark_iteration.py +0 -0
  129. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/scripts/compare_iteration.py +0 -0
  130. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/scripts/eval_manifest.py +0 -0
  131. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/scripts/grade_eval_response.py +0 -0
  132. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/scripts/grade_iteration.py +0 -0
  133. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/scripts/prepare_eval_prompts.py +0 -0
  134. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/scripts/prepare_eval_workspace.py +0 -0
  135. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/scripts/render_eval_review.py +0 -0
  136. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/skills/slcli/scripts/spec_import_helper.py +0 -0
  137. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/spec_click.py +0 -0
  138. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/ssl_trust.py +0 -0
  139. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/state_click.py +0 -0
  140. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/system_click.py +0 -0
  141. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/system_query_utils.py +0 -0
  142. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/systemlink-logo.svg +0 -0
  143. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/table_utils.py +0 -0
  144. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/tag_click.py +0 -0
  145. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/templates_click.py +0 -0
  146. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/testmonitor_click.py +0 -0
  147. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/universal_handlers.py +0 -0
  148. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/user_click.py +0 -0
  149. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/version_click.py +0 -0
  150. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/web_editor.py +0 -0
  151. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_bootstrap.py +0 -0
  152. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_click.py +0 -0
  153. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/.gitignore +0 -0
  154. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/README.md +0 -0
  155. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/angular.json +0 -0
  156. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/package.json +0 -0
  157. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/scripts/filter-sbom.js +0 -0
  158. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/app-routing.module.ts +0 -0
  159. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/app.component.html +0 -0
  160. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/app.component.scss +0 -0
  161. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/app.component.ts +0 -0
  162. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/app.module.ts +0 -0
  163. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.html +0 -0
  164. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.scss +0 -0
  165. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/core/layout/app-shell.component.ts +0 -0
  166. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/core/state/app-view-state.service.ts +0 -0
  167. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/systemlink-context.service.ts +0 -0
  168. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/systemlink-locale.ts +0 -0
  169. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/theme-sync.service.ts +0 -0
  170. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/core/systemlink/webapp-home-data.service.ts +0 -0
  171. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.html +0 -0
  172. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.scss +0 -0
  173. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/assets/assets-page.component.ts +0 -0
  174. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.html +0 -0
  175. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.scss +0 -0
  176. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/datasets/datasets-page.component.ts +0 -0
  177. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.html +0 -0
  178. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.scss +0 -0
  179. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/home/home-page.component.ts +0 -0
  180. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.html +0 -0
  181. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.scss +0 -0
  182. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/master-detail/master-detail-page.component.ts +0 -0
  183. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.html +0 -0
  184. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.scss +0 -0
  185. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/operations/operations-page.component.ts +0 -0
  186. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.html +0 -0
  187. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.scss +0 -0
  188. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/features/settings/settings-page.component.ts +0 -0
  189. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.html +0 -0
  190. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.scss +0 -0
  191. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/shared/components/empty-state.component.ts +0 -0
  192. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.html +0 -0
  193. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.scss +0 -0
  194. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/shared/components/error-banner.component.ts +0 -0
  195. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.html +0 -0
  196. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.scss +0 -0
  197. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/shared/components/loading-state.component.ts +0 -0
  198. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/app/shared/states/view-state.model.ts +0 -0
  199. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/assets/README.md +0 -0
  200. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/index.html +0 -0
  201. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/locale/messages.de.json +0 -0
  202. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/locale/messages.en.json +0 -0
  203. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/locale/messages.es.json +0 -0
  204. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/locale/messages.fr.json +0 -0
  205. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/locale/messages.ja.json +0 -0
  206. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/locale/messages.ko.json +0 -0
  207. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/locale/messages.zh.json +0 -0
  208. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/localize.d.ts +0 -0
  209. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/main.ts +0 -0
  210. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/src/styles.scss +0 -0
  211. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/tsconfig.app.json +0 -0
  212. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/webapp_templates/angular/blank/tsconfig.json +0 -0
  213. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/workflow_preview.py +0 -0
  214. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/workflows_click.py +0 -0
  215. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/workitem_click.py +0 -0
  216. {systemlink_cli-2.5.2 → systemlink_cli-2.5.4}/slcli/workspace_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: systemlink-cli
3
- Version: 2.5.2
3
+ Version: 2.5.4
4
4
  Summary: SystemLink Integrator CLI - cross-platform CLI for SystemLink workflows and templates.
5
5
  License-File: LICENSE
6
6
  Author: Fred Visser
@@ -24,6 +24,7 @@ Requires-Dist: keyring (>=25.6.0,<26.0.0)
24
24
  Requires-Dist: mcp (>=2,<3) ; extra == "mcp"
25
25
  Requires-Dist: msgpack (>=1.1,<2) ; extra == "managed-client"
26
26
  Requires-Dist: packaging (>=21.0)
27
+ Requires-Dist: platformdirs (>=4,<5)
27
28
  Requires-Dist: prefect (>=3.8.6,<4) ; extra == "migration"
28
29
  Requires-Dist: psutil (>=7,<8) ; extra == "migration"
29
30
  Requires-Dist: pydantic (>=2.9,<3) ; extra == "migration"
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "systemlink-cli"
3
- version = "2.5.2"
3
+ version = "2.5.4"
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" }]
@@ -40,6 +40,7 @@ rich = ">=15,<16"
40
40
  rich-click = ">=1.8,<2"
41
41
  cryptography = ">=49.0.0"
42
42
  pygments = ">=2.20.0"
43
+ platformdirs = ">=4,<5"
43
44
  prefect = { version = ">=3.8.6,<4", optional = true }
44
45
  psutil = { version = ">=7,<8", optional = true }
45
46
  pydantic = { version = ">=2.9,<3", optional = true }
@@ -121,7 +122,8 @@ markers = [
121
122
  "sls: marks tests as SystemLink Server specific",
122
123
  "sle: marks tests as SystemLink Enterprise specific",
123
124
  "file: marks tests as file service related",
124
- "comment: marks tests as comment management related"
125
+ "comment: marks tests as comment management related",
126
+ "testmonitor: marks tests as Test Monitor related"
125
127
  ]
126
128
 
127
129
  [tool.black]
@@ -1,4 +1,4 @@
1
1
  """Version information for slcli."""
2
2
 
3
3
  # This file is auto-generated. Do not edit manually.
4
- __version__ = "2.5.2"
4
+ __version__ = "2.5.4"
@@ -1,21 +1,15 @@
1
1
  """Configuration management for slcli."""
2
2
 
3
3
  import json
4
- import os
5
4
  from pathlib import Path
6
5
  from typing import Dict, Optional
7
6
 
7
+ from .paths import get_config_dir
8
+
8
9
 
9
10
  def get_config_file_path() -> Path:
10
11
  """Get the path to the slcli configuration file."""
11
- # Use XDG_CONFIG_HOME if set, otherwise use ~/.config
12
- if "XDG_CONFIG_HOME" in os.environ:
13
- config_dir = Path(os.environ["XDG_CONFIG_HOME"]) / "slcli"
14
- else:
15
- config_dir = Path.home() / ".config" / "slcli"
16
-
17
- config_dir.mkdir(parents=True, exist_ok=True)
18
- return config_dir / "config.json"
12
+ return get_config_dir() / "config.json"
19
13
 
20
14
 
21
15
  def load_config() -> Dict[str, str]:
@@ -1245,6 +1245,8 @@ def register_function_commands(cli: Any) -> None:
1245
1245
  """Execute a function synchronously and return the result.
1246
1246
 
1247
1247
  This sends a single request and waits for completion (no async polling).
1248
+ The HTTP read timeout allows 60 seconds beyond the execution timeout,
1249
+ or waits indefinitely when the execution timeout is zero.
1248
1250
  """
1249
1251
  format_output = validate_output_format(format)
1250
1252
  url = f"{get_unified_v2_base()}/functions/{function_id}/execute"
@@ -1319,7 +1321,12 @@ def register_function_commands(cli: Any) -> None:
1319
1321
  }
1320
1322
  if client_request_id:
1321
1323
  execute_request["clientRequestId"] = client_request_id
1322
- response_data = make_api_request("POST", url, execute_request).json()
1324
+ response_data = make_api_request(
1325
+ "POST",
1326
+ url,
1327
+ execute_request,
1328
+ timeout=(10.0, float(timeout + 60) if timeout else None),
1329
+ ).json()
1323
1330
  if format_output == "json":
1324
1331
  click.echo(json.dumps(response_data, indent=2))
1325
1332
  return
@@ -27,6 +27,7 @@ from .file_click import register_file_commands
27
27
  from .function_click import register_function_commands
28
28
  from .managed_client_click import register_managed_client_commands
29
29
  from .mcp_click import register_mcp_commands
30
+ from .migrate_click import register_migrate_command
30
31
  from .notebook_click import register_notebook_commands
31
32
  from .platform import get_platform_info
32
33
  from .policy_click import register_policy_commands
@@ -80,6 +81,7 @@ def _configure_rich_click_command_groups() -> None:
80
81
  "version",
81
82
  "completion",
82
83
  "example",
84
+ "migrate",
83
85
  ],
84
86
  },
85
87
  {
@@ -791,6 +793,7 @@ register_file_commands(cli)
791
793
  register_function_commands(cli)
792
794
  register_managed_client_commands(cli)
793
795
  register_mcp_commands(cli)
796
+ register_migrate_command(cli)
794
797
  register_templates_commands(cli)
795
798
  register_notebook_commands(cli)
796
799
  register_policy_commands(cli)
@@ -0,0 +1,135 @@
1
+ """CLI registration for the discovery-only ``migrate`` command.
2
+
3
+ Migration depends on the optional ``migration`` extra, so this module imports
4
+ ``slcli.migration`` only when the command runs.
5
+ """
6
+
7
+ from importlib.util import find_spec
8
+ from typing import Dict, List, Optional
9
+ from urllib.parse import urlparse
10
+
11
+ import click
12
+
13
+ _MIGRATION_EXTRA_PACKAGES = frozenset({"prefect", "psutil", "pydantic"})
14
+
15
+
16
+ def migration_extra_installed() -> bool:
17
+ """Return whether the ``migration`` extra's packages are installed, without importing them."""
18
+ return all(find_spec(package) is not None for package in _MIGRATION_EXTRA_PACKAGES)
19
+
20
+
21
+ _MAPPING_FORMAT_ERROR = "workspace mappings must be SOURCE or SOURCE:DESTINATION"
22
+
23
+
24
+ def _split_workspace_mappings(value: str) -> List[List[str]]:
25
+ r"""Split mappings on unescaped commas and colons.
26
+
27
+ A backslash makes the next character literal, so \, and \: allow workspace
28
+ names containing a comma or colon. SystemLink workspace names cannot contain
29
+ backslashes or leading/trailing spaces, so escaping is unambiguous and
30
+ surrounding whitespace is ignored.
31
+ """
32
+ items: List[List[str]] = [[]]
33
+ part: List[str] = []
34
+
35
+ def finish_part() -> None:
36
+ items[-1].append("".join(part).strip())
37
+ part.clear()
38
+
39
+ chars = iter(value)
40
+ for char in chars:
41
+ if char == "\\":
42
+ escaped = next(chars, None)
43
+ if escaped is None:
44
+ raise click.BadParameter("workspace mappings cannot end with an escape '\\'")
45
+ part.append(escaped)
46
+ elif char == ":":
47
+ finish_part()
48
+ elif char == ",":
49
+ finish_part()
50
+ items.append([])
51
+ else:
52
+ part.append(char)
53
+ finish_part()
54
+ return items
55
+
56
+
57
+ def _parse_workspace_mappings(
58
+ ctx: click.Context, param: click.Parameter, value: Optional[str]
59
+ ) -> Optional[Dict[str, str]]:
60
+ """Parse comma-delimited SOURCE or SOURCE:DESTINATION workspace mappings."""
61
+ if value is None:
62
+ return None
63
+ mappings: Dict[str, str] = {}
64
+ for parts in _split_workspace_mappings(value):
65
+ if len(parts) > 2 or not all(parts):
66
+ raise click.BadParameter(_MAPPING_FORMAT_ERROR)
67
+ source, destination = parts[0], parts[-1]
68
+ if source in mappings:
69
+ raise click.BadParameter(f"workspace '{source}' is mapped more than once")
70
+ mappings[source] = destination
71
+ return mappings
72
+
73
+
74
+ def _validate_prefect_api_url(
75
+ ctx: click.Context, param: click.Parameter, value: Optional[str]
76
+ ) -> Optional[str]:
77
+ if value is not None:
78
+ parsed = urlparse(value)
79
+ if parsed.scheme not in ("http", "https") or not parsed.netloc:
80
+ raise click.BadParameter("must be an HTTP or HTTPS URL")
81
+ return value
82
+
83
+
84
+ def register_migrate_command(cli: click.Group) -> None:
85
+ """Register the discovery-only migrate command, hidden without the migration extra."""
86
+
87
+ @cli.command(name="migrate", hidden=not migration_extra_installed())
88
+ @click.option("--source-profile", help="Named source SystemLink profile for a new migration.")
89
+ @click.option(
90
+ "--workspace-mappings",
91
+ callback=_parse_workspace_mappings,
92
+ help=(
93
+ "Comma-delimited SOURCE or SOURCE:DESTINATION workspace mappings. "
94
+ "Escape ',' or ':' in a workspace name with a backslash, for example Lab\\:A:Dest. "
95
+ "Only the listed source workspaces are migrated; all when omitted."
96
+ ),
97
+ )
98
+ @click.option("--migration-id", help="Repeat discovery for an existing migration.")
99
+ @click.option(
100
+ "--prefect-api-url",
101
+ callback=_validate_prefect_api_url,
102
+ help="Use an externally managed Prefect server instead of starting one.",
103
+ )
104
+ def migrate(
105
+ source_profile: Optional[str],
106
+ workspace_mappings: Optional[Dict[str, str]],
107
+ migration_id: Optional[str],
108
+ prefect_api_url: Optional[str],
109
+ ) -> None:
110
+ """Discover and migrate resources from a SystemLink Server."""
111
+ if migration_id is not None and (
112
+ source_profile is not None or workspace_mappings is not None
113
+ ):
114
+ raise click.UsageError(
115
+ "--migration-id cannot be combined with --source-profile or --workspace-mappings"
116
+ )
117
+ if migration_id is None and source_profile is None:
118
+ raise click.UsageError(
119
+ "Provide --source-profile for a new migration or --migration-id for an existing one"
120
+ )
121
+
122
+ try:
123
+ from slcli.migration import command
124
+ except ModuleNotFoundError as exc:
125
+ if (exc.name or "").partition(".")[0] not in _MIGRATION_EXTRA_PACKAGES:
126
+ raise
127
+ raise click.ClickException(
128
+ "Migration dependencies are not installed. Install systemlink-cli with "
129
+ "the 'migration' extra, for example: pipx install 'systemlink-cli[migration]'."
130
+ ) from exc
131
+
132
+ if migration_id is not None:
133
+ command.resume_migration(migration_id, prefect_api_url)
134
+ elif source_profile is not None:
135
+ command.start_migration(source_profile, workspace_mappings, prefect_api_url)
@@ -0,0 +1,140 @@
1
+ """Compose a discovery-only migration run for the ``migrate`` command."""
2
+
3
+ import logging
4
+ from collections.abc import Generator
5
+ from contextlib import contextmanager
6
+ from pathlib import Path
7
+ from typing import Dict, Optional
8
+ from urllib.parse import urlparse
9
+
10
+ import click
11
+
12
+ from slcli._version import __version__
13
+ from slcli.migration.connection import MigrationConnection, resolve_migration_connection
14
+ from slcli.migration.orchestration import prefect_server, run_discovery
15
+ from slcli.migration.state import MigrationRun, create_migration_run, open_migration_run
16
+ from slcli.migration.testmonitor.models import TestMonitorDiscovery
17
+ from slcli.migration.workspace_client import WorkspaceClient
18
+
19
+ _logger = logging.getLogger("slcli.migration")
20
+ MIGRATION_LOG = "migration.log"
21
+
22
+
23
+ def start_migration(
24
+ source_profile: str,
25
+ workspace_mappings: Optional[Dict[str, str]],
26
+ prefect_api_url: Optional[str],
27
+ ) -> None:
28
+ """Create a new migration run and discover its source resources."""
29
+ connection = resolve_migration_connection(source_profile)
30
+ _echo_source(connection)
31
+ if workspace_mappings is not None:
32
+ _require_source_workspaces(connection, workspace_mappings)
33
+ run = create_migration_run(source_profile, workspace_mappings)
34
+ _discover(run, connection, workspace_mappings, prefect_api_url)
35
+
36
+
37
+ def resume_migration(migration_id: str, prefect_api_url: Optional[str]) -> None:
38
+ """Resume migration run with the original inputs and cached state."""
39
+ try:
40
+ run, metadata = open_migration_run(migration_id)
41
+ except ValueError as exc:
42
+ raise click.ClickException(str(exc)) from exc
43
+ connection = resolve_migration_connection(metadata.source_profile)
44
+ _echo_source(connection)
45
+ _discover(run, connection, metadata.workspace_mappings, prefect_api_url)
46
+
47
+
48
+ def format_summary(discovery: TestMonitorDiscovery) -> str:
49
+ """Return deterministic Test Monitor discovery counts and failures."""
50
+ lines = [
51
+ "Test Monitor discovery:",
52
+ f" Products: {len(discovery.products)}",
53
+ f" Terminal results: {len(discovery.results)}",
54
+ f" Failed workspaces: {len(discovery.failures)}",
55
+ *(f" {failure.workspace}: {failure.error_type}" for failure in discovery.failures),
56
+ ]
57
+ if discovery.failures:
58
+ lines.append(" Product workspaces were inferred without the failed workspaces.")
59
+ return "\n".join(lines)
60
+
61
+
62
+ def _all_workspaces_failed(discovery: TestMonitorDiscovery) -> bool:
63
+ return bool(discovery.workspaces) and len(discovery.failures) == len(discovery.workspaces)
64
+
65
+
66
+ def _echo_source(connection: MigrationConnection) -> None:
67
+ click.echo(f"Source: {connection.profile_name} ({connection.base_url})")
68
+ if urlparse(connection.base_url).scheme.lower() != "https":
69
+ click.echo("Warning: source connection does not use HTTPS.", err=True)
70
+ if connection.ssl_verify is False:
71
+ click.echo("Warning: source TLS certificate verification is disabled.", err=True)
72
+
73
+
74
+ def _require_source_workspaces(
75
+ connection: MigrationConnection, workspace_mappings: Dict[str, str]
76
+ ) -> None:
77
+ existing = {workspace.name for workspace in WorkspaceClient(connection).query_workspaces()}
78
+ unknown = sorted(set(workspace_mappings).difference(existing))
79
+ if unknown:
80
+ raise click.BadParameter(
81
+ f"unknown source workspace: {', '.join(unknown)}",
82
+ param_hint="--workspace-mappings",
83
+ )
84
+
85
+
86
+ @contextmanager
87
+ def _run_log(log_path: Path) -> Generator[None, None, None]:
88
+ """Write migration logs to the run directory for the duration of the run."""
89
+ handler = logging.FileHandler(log_path, encoding="utf-8")
90
+ handler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(name)s %(message)s"))
91
+ previous_level = _logger.level
92
+ _logger.addHandler(handler)
93
+ _logger.setLevel(logging.INFO)
94
+ try:
95
+ yield
96
+ finally:
97
+ _logger.removeHandler(handler)
98
+ _logger.setLevel(previous_level)
99
+ handler.close()
100
+
101
+
102
+ def _discover(
103
+ run: MigrationRun,
104
+ connection: MigrationConnection,
105
+ workspace_mappings: Optional[Dict[str, str]],
106
+ prefect_api_url: Optional[str],
107
+ ) -> None:
108
+ click.echo(f"Migration ID: {run.migration_id}")
109
+ log_path = run.directory / MIGRATION_LOG
110
+ workspaces = list(workspace_mappings) if workspace_mappings is not None else None
111
+ server_mode = "managed" if prefect_api_url is None else "external"
112
+ with _run_log(log_path):
113
+ _logger.info(
114
+ "Discovery started: migration=%s cli=%s profile=%s endpoint=%s workspaces=%s "
115
+ "prefect_server=%s",
116
+ run.migration_id,
117
+ __version__,
118
+ connection.profile_name,
119
+ connection.base_url,
120
+ workspaces if workspaces is not None else "all",
121
+ server_mode,
122
+ )
123
+ try:
124
+ with prefect_server(run, prefect_api_url) as api_url:
125
+ discovery = run_discovery(run, connection.profile_name, workspaces, api_url)
126
+ except BaseException as exc:
127
+ _logger.error("Discovery failed: %s: %s", type(exc).__name__, exc)
128
+ click.echo(f"Log: {log_path}", err=True)
129
+ raise
130
+ test_monitor = discovery.test_monitor
131
+ _logger.info(
132
+ "Discovery completed: products=%d results=%d failed_workspaces=%s",
133
+ len(test_monitor.products),
134
+ len(test_monitor.results),
135
+ [failure.workspace for failure in test_monitor.failures],
136
+ )
137
+ click.echo(format_summary(test_monitor))
138
+ click.echo(f"Log: {log_path}")
139
+ if _all_workspaces_failed(test_monitor):
140
+ raise click.ClickException("Discovery failed for every workspace.")
@@ -1,7 +1,7 @@
1
1
  """Profile-explicit SystemLink connections for migration operations."""
2
2
 
3
3
  from dataclasses import dataclass, field
4
- from typing import Dict, Optional, Union
4
+ from typing import Any, Dict, Optional, Union
5
5
 
6
6
  import click
7
7
  import requests
@@ -9,6 +9,7 @@ from requests.adapters import HTTPAdapter
9
9
  from urllib3.util.retry import Retry
10
10
 
11
11
  from slcli.profiles import Profile, ProfileConfig
12
+ from slcli.ssl_trust import use_standard_ssl_context
12
13
  from slcli.utils import get_auth_headers, profile_ssl_verify, resolve_profile_auth
13
14
 
14
15
  # Policy for read-only queries, including POST query endpoints, which are safe to replay.
@@ -23,6 +24,20 @@ _QUERY_RETRY = Retry(
23
24
  )
24
25
 
25
26
 
27
+ class _ProfileSession(requests.Session):
28
+ """Session that evaluates an explicit CA bundle despite injected OS trust."""
29
+
30
+ def __init__(self, ssl_verify: Union[bool, str]) -> None:
31
+ """Bind the session to one TLS verification setting."""
32
+ super().__init__()
33
+ self.verify = self._ssl_verify = ssl_verify
34
+
35
+ def request(self, *args: Any, **kwargs: Any) -> requests.Response: # type: ignore[override]
36
+ """Send a request using the standard SSL context for CA bundle paths."""
37
+ with use_standard_ssl_context(self._ssl_verify):
38
+ return super().request(*args, **kwargs)
39
+
40
+
26
41
  @dataclass(frozen=True)
27
42
  class MigrationConnection:
28
43
  """Endpoint, authentication, and TLS settings from one explicitly named profile."""
@@ -34,9 +49,8 @@ class MigrationConnection:
34
49
 
35
50
  def create_session(self) -> requests.Session:
36
51
  """Return a query session bound to this connection's credentials and TLS."""
37
- session = requests.Session()
52
+ session = _ProfileSession(self.ssl_verify)
38
53
  session.headers.update(self.headers)
39
- session.verify = self.ssl_verify
40
54
  adapter = HTTPAdapter(max_retries=_QUERY_RETRY)
41
55
  session.mount("https://", adapter)
42
56
  session.mount("http://", adapter)
@@ -0,0 +1 @@
1
+ """Prefect flows for migration operations."""
@@ -0,0 +1,41 @@
1
+ """Discovery-only migration flow."""
2
+
3
+ from typing import List, Optional
4
+
5
+ from prefect import flow
6
+ from pydantic import ConfigDict
7
+
8
+ from slcli.migration.schema import VersionedModel
9
+ from slcli.migration.testmonitor.discovery_task import discover_test_monitor_task
10
+ from slcli.migration.testmonitor.models import TestMonitorDiscovery
11
+
12
+
13
+ class MigrationDiscovery(VersionedModel):
14
+ """Discovery results for every supported resource type."""
15
+
16
+ model_config = ConfigDict(frozen=True)
17
+
18
+ test_monitor: TestMonitorDiscovery
19
+
20
+
21
+ @flow(
22
+ name="systemlink-migration-discovery",
23
+ flow_run_name="migration-discovery-{migration_id}",
24
+ persist_result=True,
25
+ result_serializer="json",
26
+ )
27
+ def discover_flow(
28
+ migration_id: str,
29
+ source_profile: str,
30
+ workspaces: Optional[List[str]],
31
+ ) -> MigrationDiscovery:
32
+ """Run one persisted discovery task per supported resource type.
33
+
34
+ Args:
35
+ migration_id: Migration that scopes task cache keys.
36
+ source_profile: Name of the source profile.
37
+ workspaces: Source workspace names to discover; all workspaces when None.
38
+ """
39
+ return MigrationDiscovery(
40
+ test_monitor=discover_test_monitor_task(migration_id, source_profile, workspaces)
41
+ )
@@ -0,0 +1,62 @@
1
+ """Run migration flows against a Prefect server."""
2
+
3
+ from collections.abc import Generator
4
+ from contextlib import contextmanager
5
+ from typing import List, Optional
6
+
7
+ from prefect.events.worker import EventsWorker
8
+ from prefect.settings import (
9
+ PREFECT_API_URL,
10
+ PREFECT_HOME,
11
+ PREFECT_LOGGING_TO_API_ENABLED,
12
+ temporary_settings,
13
+ )
14
+
15
+ from slcli.migration.flows.discover import MigrationDiscovery, discover_flow
16
+ from slcli.migration.prefect_server import ManagedPrefectServer
17
+ from slcli.migration.state import MigrationRun
18
+
19
+
20
+ @contextmanager
21
+ def prefect_server(run: MigrationRun, api_url: Optional[str] = None) -> Generator[str, None, None]:
22
+ """Yield a Prefect API URL for a run.
23
+
24
+ Args:
25
+ run: Migration run whose ``server_home`` can host a managed server.
26
+ api_url: An externally managed server to use instead; the caller owns its
27
+ lifecycle and database.
28
+ """
29
+ if api_url is not None:
30
+ yield api_url
31
+ return
32
+ with ManagedPrefectServer(run.server_home) as managed_api_url:
33
+ yield managed_api_url
34
+
35
+
36
+ def run_discovery(
37
+ run: MigrationRun,
38
+ source_profile: str,
39
+ workspaces: Optional[List[str]],
40
+ api_url: str,
41
+ ) -> MigrationDiscovery:
42
+ """Run the discovery flow for a migration run on a Prefect server.
43
+
44
+ Args:
45
+ run: Migration run that provides the client home and result storage.
46
+ source_profile: Name of the source profile.
47
+ workspaces: Source workspace names to discover; all workspaces when None.
48
+ api_url: Prefect API URL from :func:`prefect_server`.
49
+ """
50
+ with temporary_settings(
51
+ updates={
52
+ PREFECT_HOME: run.client_home,
53
+ PREFECT_API_URL: api_url,
54
+ PREFECT_LOGGING_TO_API_ENABLED: False,
55
+ "results.local_storage_path": run.results_path,
56
+ }
57
+ ):
58
+ try:
59
+ return discover_flow(run.migration_id, source_profile, workspaces)
60
+ finally:
61
+ # Deliver queued task-state events before the server may be stopped.
62
+ EventsWorker.drain_all()
@@ -0,0 +1,18 @@
1
+ """Single schema version for everything migration persists."""
2
+
3
+ from pydantic import BaseModel, field_validator
4
+
5
+ SCHEMA_VERSION = 1
6
+
7
+
8
+ class VersionedModel(BaseModel):
9
+ """A persisted model that only loads data written with the current schema."""
10
+
11
+ schema_version: int = SCHEMA_VERSION
12
+
13
+ @field_validator("schema_version")
14
+ @classmethod
15
+ def _require_current(cls, value: int) -> int:
16
+ if value != SCHEMA_VERSION:
17
+ raise ValueError(f"unsupported schema version {value}; expected {SCHEMA_VERSION}")
18
+ return value