systemlink-cli 1.13.5__tar.gz → 1.13.7__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-1.13.5 → systemlink_cli-1.13.7}/PKG-INFO +1 -1
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/pyproject.toml +1 -1
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/_version.py +1 -1
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/main.py +2 -2
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/slcli/SKILL.md +30 -20
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/systemlink-notebook/SKILL.md +121 -11
- systemlink_cli-1.13.7/slcli/skills/systemlink-notebook/references/interfaces.md +185 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/systemlink-notebook/references/notebook-patterns.md +53 -12
- systemlink_cli-1.13.7/slcli/skills/systemlink-webapp/SKILL.md +188 -0
- systemlink_cli-1.13.7/slcli/skills/systemlink-webapp/references/angular-ui-packages.md +154 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/systemlink-webapp/references/deployment.md +7 -5
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/systemlink-webapp/references/nimble-angular.md +2 -0
- systemlink_cli-1.13.7/slcli/skills/systemlink-webapp/references/troubleshooting.md +100 -0
- systemlink_cli-1.13.5/slcli/skills/systemlink-notebook/references/interfaces.md +0 -82
- systemlink_cli-1.13.5/slcli/skills/systemlink-webapp/SKILL.md +0 -855
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/LICENSE +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/dff-editor/editor.js +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/dff-editor/index.html +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/__init__.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/__main__.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/asset_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/cli_formatters.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/cli_utils.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/comment_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/completion_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/config.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/config_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/dataframe_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/dff_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/dff_decorators.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/example_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/example_loader.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/example_provisioner.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/README.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/_schema/schema-v1.0.json +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/demo-complete-workflow/README.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/demo-complete-workflow/config.yaml +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/demo-test-plans/README.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/demo-test-plans/config.yaml +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/exercise-5-1-parametric-insights/README.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/exercise-5-1-parametric-insights/config.yaml +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/exercise-7-1-test-plans/README.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/exercise-7-1-test-plans/config.yaml +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/README.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/config.yaml +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/notebooks/SpecAnalysis_ComplianceCalculation.ipynb +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/notebooks/SpecComplianceCalculation.ipynb +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/notebooks/SpecfileExtractionAndIngestion.ipynb +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/examples/spec-compliance-notebooks/spec_template.xlsx +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/feed_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/file_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/function_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/function_templates.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/mcp_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/mcp_reachability.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/mcp_server.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/notebook_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/platform.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/policy_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/policy_utils.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/profiles.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/response_handlers.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/rich_output.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/routine_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skill_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/nipkg-file-package/SKILL.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/slcli/references/analysis-recipes.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/slcli/references/commands.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/slcli/references/datasheet-workflow.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/slcli/references/filtering.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/slcli/references/troubleshooting.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/systemlink-job-debugging/SKILL.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/systemlink-python-test/SKILL.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/systemlink-webapp/references/layout-patterns.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/skills/systemlink-webapp/references/systemlink-services.md +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/spec_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/ssl_trust.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/state_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/system_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/system_query_utils.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/table_utils.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/tag_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/templates_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/testmonitor_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/universal_handlers.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/user_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/utils.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/web_editor.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/webapp_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/workflow_preview.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/workflows_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/workitem_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/workspace_click.py +0 -0
- {systemlink_cli-1.13.5 → systemlink_cli-1.13.7}/slcli/workspace_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "systemlink-cli"
|
|
3
|
-
version = "1.13.
|
|
3
|
+
version = "1.13.7"
|
|
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" }]
|
|
@@ -64,7 +64,7 @@ def _configure_rich_click_command_groups() -> None:
|
|
|
64
64
|
"slcli": [
|
|
65
65
|
{
|
|
66
66
|
"name": "Configure",
|
|
67
|
-
"commands": ["config", "login", "logout", "info", "completion"],
|
|
67
|
+
"commands": ["config", "login", "logout", "info", "completion", "example"],
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
"name": "Administer",
|
|
@@ -89,7 +89,7 @@ def _configure_rich_click_command_groups() -> None:
|
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
"name": "Validate & Plan",
|
|
92
|
-
"commands": ["testmonitor", "template", "spec", "workitem"
|
|
92
|
+
"commands": ["testmonitor", "template", "spec", "workitem"],
|
|
93
93
|
},
|
|
94
94
|
]
|
|
95
95
|
}
|
|
@@ -24,6 +24,16 @@ compatibility: >-
|
|
|
24
24
|
metadata:
|
|
25
25
|
author: ni-kismet
|
|
26
26
|
version: "2.0"
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Command style
|
|
30
|
+
|
|
31
|
+
Prefer long option names in generated commands and examples. Use `--format json`,
|
|
32
|
+
`--take 25`, `--workspace Default`, and `--output path.json` instead of `-f json`,
|
|
33
|
+
`-t 25`, `-w Default`, or `-o path.json`.
|
|
34
|
+
|
|
35
|
+
Only mention short aliases when explicitly documenting that they exist.
|
|
36
|
+
|
|
27
37
|
# --system SYSTEM_ID Assign a system (by minion/system ID). Repeatable.
|
|
28
38
|
# --fixture ASSET_ID Assign a fixture/slot (by asset ID, asset type FIXTURE). Repeatable.
|
|
29
39
|
# --dut ASSET_ID Assign a DUT (by asset ID, asset type DEVICE_UNDER_TEST). Repeatable.
|
|
@@ -36,22 +46,22 @@ slcli workitem schedule <WORK_ITEM_ID> \
|
|
|
36
46
|
[--system SYSTEM_ID]... [--fixture ASSET_ID]... [--dut ASSET_ID]...
|
|
37
47
|
|
|
38
48
|
# Work item template subgroup
|
|
39
|
-
slcli workitem template list [
|
|
40
|
-
slcli workitem template get <TEMPLATE_ID> [
|
|
41
|
-
slcli workitem template create --name TEXT --type TEXT --template-group TEXT [
|
|
49
|
+
slcli workitem template list [--workspace WORKSPACE] [--filter TEXT] [--take INT] [--format json]
|
|
50
|
+
slcli workitem template get <TEMPLATE_ID> [--format json]
|
|
51
|
+
slcli workitem template create --name TEXT --type TEXT --template-group TEXT [--workspace WORKSPACE] [OPTIONS]
|
|
42
52
|
slcli workitem template update <TEMPLATE_ID> [--name TEXT] [--description TEXT] [--summary TEXT]
|
|
43
53
|
slcli workitem template delete <TEMPLATE_ID>... [--yes]
|
|
44
54
|
|
|
45
55
|
# Workflow subgroup
|
|
46
|
-
slcli workitem workflow list [
|
|
47
|
-
slcli workitem workflow get [--id WORKFLOW_ID] [--name NAME] [
|
|
56
|
+
slcli workitem workflow list [--workspace WORKSPACE] [--take INT] [--format json]
|
|
57
|
+
slcli workitem workflow get [--id WORKFLOW_ID] [--name NAME] [--format json]
|
|
48
58
|
slcli workitem workflow init [--name TEXT] [--directory DIR] # Scaffold a local workflow file
|
|
49
|
-
slcli workitem workflow create --file PATH [
|
|
50
|
-
slcli workitem workflow import --file PATH [
|
|
51
|
-
slcli workitem workflow export [--id WORKFLOW_ID] [--name NAME] [
|
|
59
|
+
slcli workitem workflow create --file PATH [--workspace WORKSPACE] # Create from JSON file
|
|
60
|
+
slcli workitem workflow import --file PATH [--workspace WORKSPACE] # Import workflow from JSON
|
|
61
|
+
slcli workitem workflow export [--id WORKFLOW_ID] [--name NAME] [--output FILE] # Export to JSON
|
|
52
62
|
slcli workitem workflow update --id WORKFLOW_ID --file PATH # Update from JSON file
|
|
53
63
|
slcli workitem workflow delete --id WORKFLOW_ID [--yes]
|
|
54
|
-
slcli workitem workflow preview [--file PATH] [--id WORKFLOW_ID] [--html] [--no-open] [
|
|
64
|
+
slcli workitem workflow preview [--file PATH] [--id WORKFLOW_ID] [--html] [--no-open] [--output FILE]
|
|
55
65
|
```
|
|
56
66
|
|
|
57
67
|
**Create work item options:**
|
|
@@ -82,9 +92,9 @@ Scaffold, package, and publish custom web applications to SystemLink.
|
|
|
82
92
|
```bash
|
|
83
93
|
slcli webapp init <DIRECTORY> # Scaffold the Angular starter
|
|
84
94
|
slcli webapp manifest init <DIRECTORY> [OPTIONS] # Create nipkg.config.json for packaging
|
|
85
|
-
slcli webapp pack [FOLDER] [--config FILE] [
|
|
86
|
-
slcli webapp list [
|
|
87
|
-
slcli webapp get <WEBAPP_ID> [
|
|
95
|
+
slcli webapp pack [FOLDER] [--config FILE] [--output OUTPUT_FILE] # Package a webapp into a .nipkg
|
|
96
|
+
slcli webapp list [--workspace WORKSPACE] [--take INT] [--format json]
|
|
97
|
+
slcli webapp get <WEBAPP_ID> [--format json]
|
|
88
98
|
slcli webapp publish PATH [--workspace NAME] # Upload and publish a webapp
|
|
89
99
|
slcli webapp delete <WEBAPP_ID>
|
|
90
100
|
slcli webapp open <WEBAPP_ID> # Open webapp URL in browser
|
|
@@ -95,19 +105,19 @@ slcli webapp open <WEBAPP_ID> # Open webapp URL in br
|
|
|
95
105
|
Create, inspect, import, export, and revert saved software states managed by the SystemLink Systems State service.
|
|
96
106
|
|
|
97
107
|
```bash
|
|
98
|
-
slcli state list [
|
|
99
|
-
slcli state get <STATE_ID> [
|
|
108
|
+
slcli state list [--workspace WORKSPACE] [--architecture CHOICE] [--distribution CHOICE] [--take INT] [--format json]
|
|
109
|
+
slcli state get <STATE_ID> [--format json]
|
|
100
110
|
slcli state create --name TEXT --distribution CHOICE --architecture CHOICE [OPTIONS]
|
|
101
111
|
slcli state update <STATE_ID> [OPTIONS]
|
|
102
112
|
slcli state delete <STATE_ID> [--yes]
|
|
103
113
|
|
|
104
114
|
slcli state import --name TEXT --distribution CHOICE --architecture CHOICE --file PATH [OPTIONS]
|
|
105
|
-
slcli state replace-content <STATE_ID> --file PATH [--change-description TEXT] [
|
|
115
|
+
slcli state replace-content <STATE_ID> --file PATH [--change-description TEXT] [--format json]
|
|
106
116
|
slcli state export <STATE_ID> [--version VERSION] [--inline | --output FILE]
|
|
107
117
|
slcli state capture <SYSTEM_ID> [--inline | --output FILE]
|
|
108
118
|
|
|
109
|
-
slcli state history <STATE_ID> [
|
|
110
|
-
slcli state version <STATE_ID> <VERSION> [
|
|
119
|
+
slcli state history <STATE_ID> [--take INT] [--format json]
|
|
120
|
+
slcli state version <STATE_ID> <VERSION> [--format json]
|
|
111
121
|
slcli state revert <STATE_ID> <VERSION> [--yes]
|
|
112
122
|
```
|
|
113
123
|
|
|
@@ -148,7 +158,7 @@ Install pre-built demo configurations (systems, assets, DUTs, templates, etc.)
|
|
|
148
158
|
for training, testing, or evaluation.
|
|
149
159
|
|
|
150
160
|
```bash
|
|
151
|
-
slcli example list [
|
|
161
|
+
slcli example list [--format json] # List available examples
|
|
152
162
|
slcli example info <EXAMPLE_ID> # Show example details
|
|
153
163
|
slcli example install <EXAMPLE_ID> [--workspace NAME] # Provision example resources
|
|
154
164
|
slcli example delete <EXAMPLE_ID> [--workspace NAME] # Remove provisioned resources
|
|
@@ -175,7 +185,7 @@ SystemLink Enterprise (SLE) or require a specific microservice to be deployed.
|
|
|
175
185
|
|
|
176
186
|
```bash
|
|
177
187
|
slcli info # Shows platform type and service health
|
|
178
|
-
slcli info
|
|
188
|
+
slcli info --format json # Machine-readable; check .services for per-service status
|
|
179
189
|
```
|
|
180
190
|
|
|
181
191
|
| Command group | Required service | SLE | SLS | Notes |
|
|
@@ -231,7 +241,7 @@ to disable caching for debugging.
|
|
|
231
241
|
|
|
232
242
|
## Key rules
|
|
233
243
|
|
|
234
|
-
1. **Always use
|
|
244
|
+
1. **Always use `--format json`** when piping output to `jq` or doing programmatic analysis.
|
|
235
245
|
2. **Use `--summary --group-by`** for aggregation instead of fetching all records and counting.
|
|
236
246
|
3. **Use convenience filters first** (e.g., `--status FAILED`), fall back to `--filter` for complex queries.
|
|
237
247
|
4. **Parameterize `--filter` queries** — use `--substitution` instead of string interpolation.
|
|
@@ -20,6 +20,84 @@ argument-hint: 'Describe the notebook purpose and what data it should report on'
|
|
|
20
20
|
- Creating a test data analysis notebook
|
|
21
21
|
- Deploying a notebook to SystemLink via `slcli`
|
|
22
22
|
|
|
23
|
+
## Important: Python Client Quirks
|
|
24
|
+
|
|
25
|
+
The `nisystemlink-clients` Python package has a few ergonomics quirks to be aware of:
|
|
26
|
+
|
|
27
|
+
### API naming inconsistency
|
|
28
|
+
|
|
29
|
+
Client methods use Python `snake_case`, but request model fields use `camelCase`. This requires careful attention:
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
# ❌ WRONG: Using Python snake_case (very intuitive but incorrect)
|
|
33
|
+
CreateResultRequest(program_name="My Test", file_ids=[file_id])
|
|
34
|
+
|
|
35
|
+
# ✅ CORRECT: Must use camelCase field names from the request model
|
|
36
|
+
CreateResultRequest(programName="My Test", fileIds=[file_id])
|
|
37
|
+
|
|
38
|
+
# Methods stay snake_case:
|
|
39
|
+
client.create_results(request) # This is correct
|
|
40
|
+
client.create_steps(...) # This is correct
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Always check the request model constructor signature, not what "feels" Pythonic.
|
|
44
|
+
|
|
45
|
+
### Partial-success responses
|
|
46
|
+
|
|
47
|
+
Operations like `create_results()` and `create_steps()` return partial-success wrapper types
|
|
48
|
+
(e.g., `CreateStepsPartialSuccess`) even when successful. These contain both success and failure data:
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from nisystemlink.clients.testmonitor import TestMonitorClient
|
|
52
|
+
from nisystemlink.clients.testmonitor.models import CreateStepRequest
|
|
53
|
+
|
|
54
|
+
client = TestMonitorClient()
|
|
55
|
+
response = client.create_steps([CreateStepRequest(...)])
|
|
56
|
+
|
|
57
|
+
# Success and failures are both in the response
|
|
58
|
+
if response.failed:
|
|
59
|
+
print(f"Failed to create {len(response.failed)} steps")
|
|
60
|
+
if response.created:
|
|
61
|
+
print(f"Successfully created {len(response.created)} steps")
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Limited service coverage
|
|
65
|
+
|
|
66
|
+
The Python client does **not cover all SystemLink services**. The most important gaps for notebooks (see the [client repo](https://github.com/ni/nisystemlink-clients-python) for the current full list):
|
|
67
|
+
|
|
68
|
+
- ❌ **Notebook Execution** — no Python client for execution lifecycle management
|
|
69
|
+
- ❌ **Routines v1/v2** — no Python client for scheduling/triggering
|
|
70
|
+
- ❌ **Systems State** — no Python client for system health queries
|
|
71
|
+
- ❌ **Comments** — no Python client for resource annotations
|
|
72
|
+
- ❌ **User Data** — no Python client for key-value stores
|
|
73
|
+
- ❌ **Tag Historian** — no Python client for time-series history
|
|
74
|
+
|
|
75
|
+
For these services, use REST calls directly via the `requests` library or SystemLink's OpenAPI SDKs.
|
|
76
|
+
|
|
77
|
+
### Public import paths
|
|
78
|
+
|
|
79
|
+
This skill uses two distinct Python SDK namespaces — be careful not to mix them:
|
|
80
|
+
|
|
81
|
+
- **`nisystemlink.clients.*`** — the typed Python client (`nisystemlink-clients` package). Use public top-level imports.
|
|
82
|
+
- **`systemlink.clients.nisysmgmt.*`** — a separate OpenAPI-generated SDK used only for Systems queries.
|
|
83
|
+
|
|
84
|
+
For `nisystemlink.clients`, always import from the public top-level modules, not private `_module` paths:
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
# ✅ CORRECT: Public paths (nisystemlink-clients)
|
|
88
|
+
from nisystemlink.clients.file import FileClient
|
|
89
|
+
from nisystemlink.clients.testmonitor import TestMonitorClient
|
|
90
|
+
from nisystemlink.clients.testmonitor.models import CreateResultRequest, CreateStepRequest
|
|
91
|
+
|
|
92
|
+
# ❌ WRONG: Private module paths (may change or be removed)
|
|
93
|
+
from nisystemlink.clients.testmonitor._test_monitor_client import TestMonitorClient
|
|
94
|
+
from nisystemlink.clients.testmonitor.models._create_result_request import CreateResultRequest
|
|
95
|
+
|
|
96
|
+
# Separate SDK — used only for Systems queries:
|
|
97
|
+
from systemlink.clients.nisysmgmt.api.systems_api import SystemsApi
|
|
98
|
+
from systemlink.clients.nisysmgmt.models.query_systems_request import QuerySystemsRequest
|
|
99
|
+
```
|
|
100
|
+
|
|
23
101
|
## Notebook Structure
|
|
24
102
|
|
|
25
103
|
Every SystemLink notebook follows this cell pattern:
|
|
@@ -76,7 +154,13 @@ in the cell's `.metadata` field for SystemLink to recognize the parameters and o
|
|
|
76
154
|
- `tags: ["parameters"]` is **required** — this is how papermill identifies the cell
|
|
77
155
|
- `systemlink.version` must be `2` for most notebooks, or `1` for **Work Item Automations**
|
|
78
156
|
- Supported parameter types: `string`, `integer`, `float`, `boolean`, `string[]`
|
|
79
|
-
- Supported output types: `data_frame`, `scalar`, `string`, `string[]`
|
|
157
|
+
- Supported scrapbook output types: `data_frame`, `scalar`, `string`, `string[]`
|
|
158
|
+
- Some interfaces define additional descriptor values outside the standard scrapbook output
|
|
159
|
+
types. For example, Data Space Analysis returns analysis option descriptors whose
|
|
160
|
+
`type` can be `scalar` or `vector`.
|
|
161
|
+
- **Grafana restriction:** Notebooks intended for use in Grafana dashboards can only
|
|
162
|
+
output `data_frame` and `scalar` types. The `string` and `string[]` output types
|
|
163
|
+
are not supported by the Grafana plugin.
|
|
80
164
|
|
|
81
165
|
### Work Item Automations pattern
|
|
82
166
|
|
|
@@ -199,33 +283,59 @@ import scrapbook as sb
|
|
|
199
283
|
from systemlink.clients.nisysmgmt.api.systems_api import SystemsApi
|
|
200
284
|
from systemlink.clients.nisysmgmt.models.query_systems_request import QuerySystemsRequest
|
|
201
285
|
|
|
202
|
-
# Test results
|
|
286
|
+
# Test results (remember: camelCase field names in request models)
|
|
203
287
|
from nisystemlink.clients.testmonitor import TestMonitorClient
|
|
288
|
+
from nisystemlink.clients.testmonitor.models import CreateResultRequest, CreateStepRequest
|
|
204
289
|
from nisystemlink.clients.core import HttpConfigurationManager
|
|
205
290
|
|
|
206
291
|
# Assets
|
|
207
292
|
from nisystemlink.clients.assetmanagement import AssetManagementClient
|
|
208
293
|
|
|
209
|
-
# Direct HTTP (when no typed client exists)
|
|
294
|
+
# Direct HTTP (when no typed client exists or for missing services)
|
|
210
295
|
import requests
|
|
211
296
|
config = HttpConfigurationManager.get_configuration()
|
|
212
297
|
base_url = config.server_uri.rstrip("/")
|
|
213
|
-
|
|
298
|
+
api_keys = getattr(config, "api_keys", {})
|
|
299
|
+
api_key = api_keys.get("x-ni-api-key") if isinstance(api_keys, dict) else None
|
|
300
|
+
if not api_key:
|
|
301
|
+
raise RuntimeError("Configure an x-ni-api-key before using REST fallbacks.")
|
|
302
|
+
headers = {"x-ni-api-key": api_key}
|
|
214
303
|
```
|
|
215
304
|
|
|
305
|
+
### Available Python client services
|
|
306
|
+
|
|
307
|
+
The Python client covers these **15 main services**:
|
|
308
|
+
- `alarm`, `artifact`, `assetmanagement`, `dataframe`, `feeds`, `file`, `notebook`,
|
|
309
|
+
`notification`, `product`, `spec`, `systems`, `tag`, `test_plan`, `testmonitor`, `work_item`
|
|
310
|
+
|
|
311
|
+
### Missing services (use REST directly)
|
|
312
|
+
|
|
313
|
+
If you need these services, call the REST API directly using `requests` and the OpenAPI docs:
|
|
314
|
+
- **Notebook Execution** — execution lifecycle (use OpenAPI directly)
|
|
315
|
+
- **Routines v1/v2** — scheduling/triggering (use OpenAPI directly)
|
|
316
|
+
- **Systems State** — system health/connection status (use OpenAPI directly)
|
|
317
|
+
- **Comments** — resource annotations (use OpenAPI directly)
|
|
318
|
+
- **User Data** — key-value stores (use OpenAPI directly)
|
|
319
|
+
- **Tag Historian** — time-series history (use OpenAPI directly)
|
|
320
|
+
- **Auth**, **User**, and others — see full list in service-gaps documentation
|
|
321
|
+
|
|
216
322
|
## Client and API References
|
|
217
323
|
|
|
218
|
-
-
|
|
324
|
+
- **Python client repository** — full source and examples:
|
|
219
325
|
https://github.com/ni/nisystemlink-clients-python
|
|
220
|
-
-
|
|
221
|
-
directly and use the hosted OpenAPI docs to discover endpoints and schemas:
|
|
326
|
+
- **SystemLink OpenAPI docs** — for all services, including those without Python clients:
|
|
222
327
|
https://demo-api.lifecyclesolutions.ni.com/niapis/
|
|
223
|
-
-
|
|
224
|
-
examples repository:
|
|
328
|
+
- **SystemLink Enterprise examples** — end-to-end patterns:
|
|
225
329
|
https://github.com/ni/systemlink-enterprise-examples/
|
|
226
330
|
|
|
227
|
-
When using
|
|
228
|
-
|
|
331
|
+
When using the Python client:
|
|
332
|
+
- Always check the request model constructor signature for camelCase field names (they won't match Python snake_case)
|
|
333
|
+
- Expect `create_*` operations to return partial-success wrapper types; inspect `.created` and `.failed` attributes
|
|
334
|
+
- Use public import paths from top-level modules, not private `_module` paths
|
|
335
|
+
|
|
336
|
+
When a service lacks a Python client, use OpenAPI docs to discover the endpoint path,
|
|
337
|
+
request body shape, and response schema before writing HTTP calls.
|
|
338
|
+
|
|
229
339
|
## Systems Query Pattern
|
|
230
340
|
|
|
231
341
|
The `SystemsApi` uses a projection/filter pattern for querying:
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Notebook Interfaces
|
|
2
|
+
|
|
3
|
+
When deploying a notebook to SystemLink, you can assign an **interface** that tells
|
|
4
|
+
SystemLink how the notebook will be used. This affects how parameters are presented
|
|
5
|
+
and how the notebook is triggered.
|
|
6
|
+
|
|
7
|
+
Set the interface during creation or update:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
slcli notebook manage update --id <ID> --interface "Systems Grid"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Prefer `create --interface ...` when you are creating a new notebook. Use
|
|
14
|
+
`update --interface ...` for in-place interface changes on an existing notebook.
|
|
15
|
+
Delete and re-create only if the server rejects the update.
|
|
16
|
+
|
|
17
|
+
## Service Availability Note
|
|
18
|
+
|
|
19
|
+
The Python client does not cover every SystemLink service. Key gaps that affect
|
|
20
|
+
automation interfaces (see the `nisystemlink-clients` repository for the current
|
|
21
|
+
service list):
|
|
22
|
+
|
|
23
|
+
- ❌ **Notebook Execution** — No Python client for checking execution status or logs
|
|
24
|
+
- ❌ **Routines v1/v2** — No Python client for scheduling; use REST directly or `slcli routine` in scheduled shells
|
|
25
|
+
- ❌ **Comments** — No Python client for adding resource annotations
|
|
26
|
+
- ❌ **User** — No Python client for querying users/workspaces (use REST directly)
|
|
27
|
+
|
|
28
|
+
For these services in notebooks, call the REST API directly via the `requests`
|
|
29
|
+
library and the service-specific SystemLink OpenAPI docs.
|
|
30
|
+
|
|
31
|
+
## Available Interfaces
|
|
32
|
+
|
|
33
|
+
Reference: [Publishing a Jupyter Notebook (NI Docs)](https://www.ni.com/docs/en-US/bundle/systemlink-enterprise/page/publishing-a-jupyter-notebook.html)
|
|
34
|
+
|
|
35
|
+
> **Note:** SystemLink Enterprise does not strictly enforce the selected interface name.
|
|
36
|
+
> The service can still execute a notebook even if the interface-specific metadata is
|
|
37
|
+
> incomplete. However, parameter injection, UI rendering, and output handling still depend
|
|
38
|
+
> on the appropriate papermill and `systemlink` metadata being present.
|
|
39
|
+
|
|
40
|
+
| Interface | Use Case | Required Inputs | Required Outputs |
|
|
41
|
+
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
| **Assets Grid** | Not currently in use | — | — |
|
|
43
|
+
| **Data Table Analysis** | Analyze data table contents. Detailed input and output requirements are not yet documented in this reference. | See NI docs | See NI docs |
|
|
44
|
+
| **Data Space Analysis** | Analyze parametric data in a data space and calculate statistics | `trace_data`: `dict[str, str]` (artifact reference, for example `{"artifact_id": "..."}`)<br>`analysis_options`: `string[]`<br>`workspace_id`: `string` | List of analysis options: `[{display_name, id, type: scalar/vector}]` |
|
|
45
|
+
| **File Analysis** | Analyze a file or create a routine with a file change trigger | `file_ids`: string[] | No output required |
|
|
46
|
+
| **Periodic Execution** | Scheduled recurring notebook (e.g. daily/hourly reports) | No input required | No output required |
|
|
47
|
+
| **Resource Changed Routine** | Triggered when a resource changes (via v1 routines) | `context`: `dict` containing `routine_id`, `correlation_id`, `triggered_at`, `resource_type`, `before` (snapshot before change), and `after` (snapshot after change) | No output required |
|
|
48
|
+
| **Specification Analysis** | Analyze chosen specifications | `spec_ids`: `string[]`<br>`product_id`: `string` | No output required |
|
|
49
|
+
| **Systems Grid** | Report that adds a column to the Systems management grid | No input required | `data_frame` with `minion id` as the first column. Example: `[{"display_name": "Package Version", "id": "package_version", "type": "data_frame", "data": {"columns": ["minion id", "package version"], "values": [["minion-id-1", "23.5"], ["minion-id-2", "24.0"]]}}]` |
|
|
50
|
+
| **Test Data Analysis** | Analyze chosen test results | `result_ids`: string[] | No output required |
|
|
51
|
+
| **Test Data Extraction** | Extract parametric data from files (BDC, STDF) and transform into test results, steps, and measurements | `file_id`: `string`<br>`part_number`: `string`<br>`notebook_id`: `string` | No output required |
|
|
52
|
+
| **Work Item Automations** | Perform automated actions on one or more work items for customer-specific use cases. Notebooks appear in the work items UI and can be manually triggered on selected items. | `work_item_ids`: string[] | No output required |
|
|
53
|
+
| **Work Item Operations** | Invoked by the system through the action of a work item execution | `workItemId`: `string`<br>`systemId`: `string`<br>May also receive user-defined parameters | No output required |
|
|
54
|
+
| **Work Item Scheduler** | Schedule work items using a custom algorithm | `work_item_ids`: string[] | No output required |
|
|
55
|
+
|
|
56
|
+
### Grafana Compatibility
|
|
57
|
+
|
|
58
|
+
Notebooks whose outputs are consumed by the SystemLink Grafana plugin can only use
|
|
59
|
+
`data_frame` and `scalar` output types. The `string` and `string[]` types are not
|
|
60
|
+
supported by Grafana.
|
|
61
|
+
|
|
62
|
+
## Common Interface Patterns
|
|
63
|
+
|
|
64
|
+
### Systems Grid
|
|
65
|
+
|
|
66
|
+
Parameters typically include:
|
|
67
|
+
|
|
68
|
+
- `group_by` (string) — always support "System"
|
|
69
|
+
- `systems_filter` (string) — filter expression for which systems
|
|
70
|
+
- Domain-specific params (e.g. `package` for package version)
|
|
71
|
+
|
|
72
|
+
Output must be `data_frame` with `minion id` as the first column.
|
|
73
|
+
|
|
74
|
+
### Test Data Analysis
|
|
75
|
+
|
|
76
|
+
Parameters typically include:
|
|
77
|
+
|
|
78
|
+
- `group_by` (string)
|
|
79
|
+
- `program_name` (string)
|
|
80
|
+
- `status_filter` (string)
|
|
81
|
+
- `systems_filter` (string)
|
|
82
|
+
|
|
83
|
+
### Periodic Execution
|
|
84
|
+
|
|
85
|
+
No special parameter requirements. Typically uses fixed configuration
|
|
86
|
+
or reads from tags/files. Can be scheduled via routines (no Python client available).
|
|
87
|
+
|
|
88
|
+
**Note:** The Python client does not have a Routines service. Use `slcli routine` to
|
|
89
|
+
schedule notebooks, or call the Routines REST API directly.
|
|
90
|
+
|
|
91
|
+
Create a scheduled routine via CLI:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
slcli routine create --api-version v1 \
|
|
95
|
+
--name "Daily Report" \
|
|
96
|
+
--type SCHEDULED \
|
|
97
|
+
--notebook-id <NOTEBOOK_ID> \
|
|
98
|
+
--schedule '{"startTime":"2026-01-01T00:00:00Z","repeat":"DAY"}'
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Or create a scheduled routine via REST using `HttpConfigurationManager` and `requests`:
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
import requests
|
|
105
|
+
from nisystemlink.clients.core import HttpConfigurationManager
|
|
106
|
+
|
|
107
|
+
config = HttpConfigurationManager.get_configuration()
|
|
108
|
+
base_url = config.server_uri.rstrip("/")
|
|
109
|
+
api_keys = getattr(config, "api_keys", {})
|
|
110
|
+
api_key = api_keys.get("x-ni-api-key") if isinstance(api_keys, dict) else None
|
|
111
|
+
if not api_key:
|
|
112
|
+
raise RuntimeError("Configure an x-ni-api-key before using REST fallbacks.")
|
|
113
|
+
headers = {"x-ni-api-key": api_key}
|
|
114
|
+
|
|
115
|
+
payload = {
|
|
116
|
+
"name": "Daily Report",
|
|
117
|
+
"type": "SCHEDULED",
|
|
118
|
+
"notebookId": "<NOTEBOOK_ID>",
|
|
119
|
+
"schedule": {"startTime": "<START_TIME_ISO8601>", "repeat": "DAY"}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
resp = requests.post(f"{base_url}/niroutine/v1/routines", json=payload, headers=headers)
|
|
123
|
+
resp.raise_for_status()
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Work Item Automations
|
|
127
|
+
|
|
128
|
+
Use this interface for notebooks that act on selected work items (close, update,
|
|
129
|
+
assign, etc.). The notebook appears in the work items UI and can be manually
|
|
130
|
+
triggered on one or more selected work items.
|
|
131
|
+
|
|
132
|
+
Parameters are injected by the work item system:
|
|
133
|
+
|
|
134
|
+
- `work_item_ids` (string[]) — list of selected work item IDs. Default: `[]`
|
|
135
|
+
- `workspace` (string) — workspace context (optional)
|
|
136
|
+
|
|
137
|
+
**Critical:** `work_item_ids` must be typed as `"string[]"` (not `"string"`),
|
|
138
|
+
default to `[]` in both papermill and the code cell, and `systemlink.version`
|
|
139
|
+
must be `1`. See the systemlink-notebook skill for the full metadata example.
|
|
140
|
+
|
|
141
|
+
**Service note:** The Python client has `work_item` service for querying and updating
|
|
142
|
+
work items, but does not have a `comments` service. If your automation needs to add
|
|
143
|
+
comments or notes, call the Comments REST API directly via `requests` library.
|
|
144
|
+
|
|
145
|
+
## Using REST When Python Clients Are Missing
|
|
146
|
+
|
|
147
|
+
If a notebook needs a service without a Python client, use `requests` and the OpenAPI docs:
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
import requests
|
|
151
|
+
from nisystemlink.clients.core import HttpConfigurationManager
|
|
152
|
+
|
|
153
|
+
config = HttpConfigurationManager.get_configuration()
|
|
154
|
+
base_url = config.server_uri.rstrip("/")
|
|
155
|
+
api_keys = getattr(config, "api_keys", {})
|
|
156
|
+
api_key = api_keys.get("x-ni-api-key") if isinstance(api_keys, dict) else None
|
|
157
|
+
if not api_key:
|
|
158
|
+
raise RuntimeError("Configure an x-ni-api-key before using REST fallbacks.")
|
|
159
|
+
headers = {"x-ni-api-key": api_key}
|
|
160
|
+
|
|
161
|
+
# Example: Add a comment to a work item (Comments service not available in Python)
|
|
162
|
+
comment_payload = {
|
|
163
|
+
"resourceId": work_item_id,
|
|
164
|
+
"resourceType": "WorkItem",
|
|
165
|
+
"content": "Automated note from notebook"
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
resp = requests.post(
|
|
169
|
+
f"{base_url}/nicomments/v1/comments",
|
|
170
|
+
json=comment_payload,
|
|
171
|
+
headers=headers
|
|
172
|
+
)
|
|
173
|
+
resp.raise_for_status()
|
|
174
|
+
comment = resp.json()
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Common missing services you might need:
|
|
178
|
+
|
|
179
|
+
- **Comments** — `/nicomments/v1/comments`
|
|
180
|
+
- **Routines v1/v2** — `/niroutine/v1/routines` or `/niroutine/v2/routines`
|
|
181
|
+
- **User** — `/niuser/v1/users` or `/niuser/v1/users/query`
|
|
182
|
+
- **Systems State** — `/nisystemsstate/v1/states`
|
|
183
|
+
- **Tag Historian** — check the service-specific OpenAPI docs instead of assuming `/niapis/...`
|
|
184
|
+
|
|
185
|
+
Always check the OpenAPI docs to confirm the correct endpoint path and request schema before implementing REST calls.
|