Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GNMI device simulator readme #1647

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions lighty-modules/lighty-gnmi/lighty-gnmi-device-simulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ This simulator provides gNMI device driven by gNMI proto files, with datastore d
Build and start gNMI simulator device:
```
final SimulatedGnmiDevice simulatedGnmiDevice
= new SimulatedGnmiDeviceBuilder()
= new SimulatedGnmiDevice()
.from(gnmiSimulatorConfiguration)
.build();
simulatedGnmiDevice.start();
Expand Down Expand Up @@ -150,15 +150,18 @@ This example will show how to execute basic operations on lighty.io gNMI device
- [INITIAL_CONFIGURATION_PATH](src/test/resources/initData/config.json)
- SERVER_CERTIFICATE / SERVER_PKCS8_KEY - was generated with script inside lighty-gnmi-connector module.
```
SimulatedGnmiDevice device = new SimulatedGnmiDeviceBuilder()
GnmiSimulatorConfiguration gnmiSimulatorConfiguration = new GnmiSimulatorConfiguration()
.setYangsPath(YANG_MODELS_PATH)
.setInitialConfigDataPath(INITIAL_CONFIGURATION_PATH)
.setHost("127.0.0.1")
.setCertificatePath(SERVER_CERTIFICATE)
.setKeyPath(SERVER_PKCS8_KEY)
.setUsernamePasswordAuth("Admin", "Admin")
.setPort(9090)
.setTargetAddress("127.0.0.1")
.setCertPath(SERVER_CERTIFICATE)
.setCertKeyPath(SERVER_PKCS8_KEY)
.setUsername("Admin")
.setPassword("Admin")
.setTargetPort(9090)
.build();

SimulatedGnmiDevice device = new SimulatedGnmiDevice(gnmiSimulatorConfiguration);
device.start();
```

Expand Down
Loading