docs: grouped connection bindings — Central UI Configure page, ResolvedAttribute.DefaultDataSourceReference, CLI instance bind-module; correct the stale 'set-bindings REPLACES all' claim (server upserts) in README + help text

This commit is contained in:
Joseph Doherty
2026-08-20 16:01:33 -04:00
parent 77f4af0d64
commit 5e04e81ba0
6 changed files with 44 additions and 9 deletions
@@ -62,9 +62,9 @@ public static class InstanceCommands
"[attributeName, dataConnectionId, dataSourceReferenceOverride] " +
"(the 3rd element overrides the attribute's data-source reference; " +
"pass null or omit it to use the template default). " +
"NOTE: this REPLACES all bindings for the instance — include the " +
"override on every entry that needs one, or omitting it clears any " +
"previously-set override.",
"NOTE: this UPSERTS — listed attributes are updated or added, unlisted " +
"ones keep their binding; omitting the 3rd element on a listed entry " +
"clears that attribute's previously-set override.",
Required = true
};
+33 -3
View File
@@ -683,9 +683,39 @@ scadabridge --url <url> instance set-bindings --id 42 \
--bindings '[["Speed",7,"ns=2;s=Reactor.Speed"],["Mode",7]]'
```
> **Note:** this command **replaces** all bindings for the instance. Include the
> override on every entry that needs one — omitting the third element clears any
> previously-set override for that attribute.
> **Note:** this command **upserts** — each listed attribute is updated (or added);
> attributes *not* listed keep their existing binding. Within a listed entry, omitting
> the third element clears any previously-set override for that attribute.
#### `instance bind-module`
Rebind every member of one composed module (or the instance's direct attributes) to a
new object path in a single command — the CLI counterpart of the Configure page's
per-group **Apply**. Reads the instance's current bindings (`GetInstance`), rewrites the
module's rows client-side to `<object>.<memberTail>`, and upserts only those rows
(`SetConnectionBindings`), so every other module is left untouched.
```sh
scadabridge --url <url> instance bind-module --id <int> --module <name> --connection <int> --object <path> [--dry-run]
```
| Option | Required | Description |
|--------|----------|-------------|
| `--id` | yes | Instance ID |
| `--module` | yes | Module key = first segment of the canonical attribute name (e.g. `RightMESReceiver`, which also covers nested `RightMESReceiver.LeakTest.*`). Use `(instance)` for the direct (dot-less) attributes |
| `--connection` | yes | Data connection ID every member is bound to |
| `--object` | yes | Object path the members hang off (`MESReceiver_022`, `Left_002.DelmiaReceiver`); a trailing `.` is tolerated. An **empty string clears** the overrides so the template defaults apply |
| `--dry-run` | no | Print the resulting bindings without saving |
```sh
# Repoint the right-hand MES receiver module of instance 1 to the MESReceiver_022 object.
scadabridge --url <url> instance bind-module --id 1 --module RightMESReceiver --connection 1 --object MESReceiver_022
```
The module must already have at least one binding row on the instance — the command
rewrites existing rows, it does not discover the template's members. A module with no
bindings yet must be seeded once with `instance set-bindings` (or bound once in the Central
UI); an unknown module fails with `UNKNOWN_MODULE` and lists the modules that do have rows.
#### `instance set-overrides`