Remove tools/opcuacli-dotnet and point all docs to Client.CLI

The standalone CLI tool is superseded by src/ZB.MOM.WW.LmxOpcUa.Client.CLI
which uses the shared IOpcUaClientService abstraction. Renames CliTool.md to
Client.CLI.md and updates README, CLAUDE.md, Security, and Redundancy docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph Doherty
2026-03-31 08:08:57 -04:00
parent 29e917b05f
commit 8fae2cb790
19 changed files with 29 additions and 1565 deletions

View File

@@ -235,18 +235,10 @@ Server URIs:
Application URI: urn:localhost:LmxOpcUa:instance1
```
## Differences from tools/opcuacli-dotnet
## Testing
The `Client.CLI` replaces the standalone tool at `tools/opcuacli-dotnet/`. Key differences:
The Client CLI has 52 unit tests covering option parsing, service invocation, output formatting, and cleanup behavior:
| Aspect | tools/opcuacli-dotnet | Client.CLI |
|--------|----------------------|------------|
| OPC UA access | Direct `Session` API | `IOpcUaClientService` abstraction |
| Connection/failover | Per-command `OpcUaFailoverHelper` | Shared service with built-in failover and keep-alive |
| Certificate management | Inline in `OpcUaHelper` | Shared `ApplicationConfigurationFactory` |
| Type conversion | `OpcUaHelper.ConvertValue` | `ValueConverter` in `Client.Shared` |
| Executable name | `opcuacli-dotnet` | `lmxopcua-cli` |
| Verbose logging | Not available | `--verbose` flag with Serilog |
| Testability | No test seam | `IOpcUaClientServiceFactory` injection, 52 unit tests |
The `tools/opcuacli-dotnet/` tool remains available for low-level debugging but is no longer the recommended client CLI.
```bash
dotnet test tests/ZB.MOM.WW.LmxOpcUa.Client.CLI.Tests
```

View File

@@ -135,11 +135,11 @@ When deploying a redundant pair, the following configuration properties must dif
## CLI `redundancy` Command
The CLI tool at `tools/opcuacli-dotnet/` includes a `redundancy` command that reads the redundancy state from a running server.
The Client CLI includes a `redundancy` command that reads the redundancy state from a running server.
```bash
dotnet run -- redundancy -u opc.tcp://localhost:4840/LmxOpcUa
dotnet run -- redundancy -u opc.tcp://localhost:4841/LmxOpcUa
dotnet run --project src/ZB.MOM.WW.LmxOpcUa.Client.CLI -- redundancy -u opc.tcp://localhost:4840/LmxOpcUa
dotnet run --project src/ZB.MOM.WW.LmxOpcUa.Client.CLI -- redundancy -u opc.tcp://localhost:4841/LmxOpcUa
```
The command reads the following standard OPC UA nodes and displays their values:

View File

@@ -104,7 +104,7 @@ Serilog with `ILogger` passed via constructor or `Log.ForContext<T>()`. No sinks
### Commands
Port all 8 commands from the existing `tools/opcuacli-dotnet/`:
All 8 commands:
| Command | Description |
|---------|-------------|

View File

@@ -176,25 +176,24 @@ Periodically inspect the `rejected/` directory. Certificates that appear here we
## CLI Examples
The `tools/opcuacli-dotnet` CLI tool supports the `-S` (or `--security`) flag to select the transport security mode when connecting. Valid values are `none`, `sign`, and `encrypt`.
The Client CLI supports the `-S` (or `--security`) flag to select the transport security mode when connecting. Valid values are `none`, `sign`, `encrypt`, and `signandencrypt`.
### Connect with no security
```bash
cd tools/opcuacli-dotnet
dotnet run -- connect -u opc.tcp://localhost:4840/LmxOpcUa -S none
dotnet run --project src/ZB.MOM.WW.LmxOpcUa.Client.CLI -- connect -u opc.tcp://localhost:4840/LmxOpcUa -S none
```
### Connect with signing
```bash
dotnet run -- connect -u opc.tcp://localhost:4840/LmxOpcUa -S sign
dotnet run --project src/ZB.MOM.WW.LmxOpcUa.Client.CLI -- connect -u opc.tcp://localhost:4840/LmxOpcUa -S sign
```
### Connect with signing and encryption
```bash
dotnet run -- connect -u opc.tcp://localhost:4840/LmxOpcUa -S encrypt
dotnet run --project src/ZB.MOM.WW.LmxOpcUa.Client.CLI -- connect -u opc.tcp://localhost:4840/LmxOpcUa -S encrypt
```
### Browse with encryption and authentication