refactor(opcuaclient): remove vestigial TargetNamespaceKind + UnsMappingTable (#648)
Nothing read the mapping table beyond the startup validator; v3 UNS projection is
explicit via UnsTagReference. Legacy keys in stored DriverConfig are ignored (pinned).
Reverts the docker-dev opc-plc seed workaround from fdee129f.
Claude-Session: https://claude.ai/code/session_01Ef2ozxS7QPanGT8uoATbTe
This commit is contained in:
+14
-13
@@ -38,8 +38,7 @@ out-of-process isolation.
|
||||
"EndpointUrl": "opc.tcp://plc.internal:4840",
|
||||
"SecurityPolicy": "None",
|
||||
"SecurityMode": "None",
|
||||
"AuthType": "Anonymous",
|
||||
"TargetNamespaceKind": "Equipment"
|
||||
"AuthType": "Anonymous"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,19 +61,21 @@ dangle. Stored NodeIds embed the server-stable namespace **URI** (not the
|
||||
session-relative `ns=N` index) so a remote namespace-table reorder across a
|
||||
restart doesn't silently re-point references at the wrong namespace.
|
||||
|
||||
### Namespace assignment
|
||||
### Namespace assignment (retired, Gitea #648)
|
||||
|
||||
This is the only driver that gateways into **either** namespace kind, decided
|
||||
per instance via `TargetNamespaceKind`:
|
||||
Earlier versions required a per-instance `TargetNamespaceKind` (`Equipment` +
|
||||
a mandatory `UnsMappingTable`, or `SystemPlatform` + an empty table). Both
|
||||
options are **removed**: nothing ever read the mapping table beyond the startup
|
||||
check, and in v3 the raw-to-UNS projection is explicit (`UnsTagReference`), so
|
||||
the choice carried no behaviour — it only made a config without the key fail
|
||||
`Initialize`. Remote nodes are authored as `/raw` tags bound by their upstream
|
||||
`nodeId`; there is no namespace field on the driver, the AdminUI form or the
|
||||
seed.
|
||||
|
||||
- `Equipment` — the remote server exposes raw equipment data; remote browse
|
||||
paths are remapped to UNS via a required `UnsMappingTable`.
|
||||
- `SystemPlatform` — the remote server exposes processed/derived data; the
|
||||
remote hierarchy is preserved with no UNS conversion (and the mapping table
|
||||
must be empty).
|
||||
|
||||
The choice is enforced at startup so a misconfiguration fails draft validation
|
||||
rather than surfacing as a runtime surprise.
|
||||
Stored `DriverConfig` JSON that still carries `targetNamespaceKind` or
|
||||
`unsMappingTable` keeps working: the keys are unknown and ignored on parse and
|
||||
initialise (the AdminUI form drops them on the next save). Pinned by
|
||||
`OpcUaClientReinitConfigAdoptionTests.Legacy_namespace_keys_are_ignored_by_parse_and_initialise`.
|
||||
|
||||
## Capability surface
|
||||
|
||||
|
||||
Reference in New Issue
Block a user