Device customization

The NSO adapter supports two customization properties that allow you to override or extend its default behavior for specific NED device types: liveStatusProps and overrideConfig. Both are configured in the adapter’s service config in Platform.

When to use these properties

The adapter has built-in default behavior for a set of supported NED types. Use liveStatusProps when:

  • A device type requires a non-standard action path or command structure for live status calls
  • You need to support a device type not covered by the adapter’s defaults
  • You want to override the default behavior for a supported device type

Use overrideConfig when:

  • A device type requires non-default flags, cleaners, or configuration paths for get/set config operations
  • You need to change how the adapter constructs JSON-RPC calls for a specific NED

Adding liveStatusProps for a supported device type overrides that type’s default behavior entirely. Only add the parameters you want to change — you do not need to specify all parameters.

Configure customizations

2

Open the Service Config editor

Toggle the Advanced View switch to open the Service Config editor.

3

Add the customization properties

Add liveStatusProps, overrideConfig, or both at the properties object level of the service config.

liveStatusProps

The liveStatusProps property customizes how the adapter constructs JSON-RPC calls for live status commands — typically show commands sent to devices through NSO.

Top-level properties

PropertyTypeDefaultDescription
nedTypeString''The NED device type to match. Can be a fully versioned NED ID such as cisco-ios-cli-6.72, or a partial match such as cisco-ios to apply to all versions of that NED. Available NED types include: cisco-ios, cisco-ios-xr, cisco-staros, cisco-nx, cisco-xe, junos, juniper-junos, juniper-junos-set, xml, a10-acos, f5-bigip, alu-sr, ciena-acos, cienacli-acos, adtran-aos, huawei-vrp, arista-dcs
actionsArray[]Array of action definitions for this NED type

Action properties

PropertyTypeDefaultDescription
commandPrefixString''A string used to match incoming commands. When a command starts with this prefix, this action definition is used.
actionPathString''The NSO JSON-RPC action path to invoke
commandParamsObject{}The parameter structure for the JSON-RPC call. Use "${command}" as a placeholder where the command value should be inserted.
commandParamTypeEnum'string'The type of the command value sent to NSO. Either "string" or "array".

Examples

Custom command prefix

Use commandPrefix to remap the built-in show command to a custom prefix for a specific NED type. In this example, a show version live status call becomes fake_command version in the JSON-RPC call to NSO:

1"liveStatusProps": [
2 {
3 "nedType": "cisco-iosxr-cli-7.36",
4 "actions": [
5 {
6 "commandPrefix": "fake_command",
7 "actionPath": "live-status/cisco-ios-xr-stats:exec/cisco-ios-xr-stats:show"
8 }
9 ]
10 }
11]

The resulting JSON-RPC call:

actionPath: "live-status/cisco-ios-xr-stats:exec/cisco-ios-xr-stats:show"
command: "fake_command version"

Custom command parameters

Use commandParams when the live status action requires a specific parameter structure. Use "${command}" to insert the command value at the correct position:

1"liveStatusProps": [
2 {
3 "nedType": "ericsson-sgsnmme",
4 "actions": [
5 {
6 "actionPath": "live-status/ericssonsgsnmme-stats:EXEC/nonconfig-actions",
7 "commandParams": {
8 "action": {
9 "action-payload": "${command}"
10 }
11 }
12 }
13 ]
14 }
15]

For a show version command, the resulting JSON-RPC call:

actionPath: "live-status/ericssonsgsnmme-stats:EXEC/nonconfig-actions"
command: {
"action": {
"action-payload": "show version"
}
}

Array command type

Use commandParamType: "array" when the live status action expects the command as an array rather than a string:

1"liveStatusProps": [
2 {
3 "nedType": "junos",
4 "actions": [
5 {
6 "actionPath": "live-status/junoscli:exec/any",
7 "commandParams": {
8 "commands": "${command}"
9 },
10 "commandParamType": "array"
11 }
12 ]
13 }
14]

For a show version command, the resulting JSON-RPC call:

actionPath: "live-status/junoscli:exec/any"
command: {
"commands": ["show version"]
}

overrideConfig

The overrideConfig property overrides the adapter’s default device settings for get/set config operations on a per-NED basis.

Top-level properties

PropertyTypeDescription
nedTypeStringThe NED device type to match. Supports versioned or partial NED IDs (same as liveStatusProps).
actionsObjectAn object of action overrides. Only specify the properties you want to change.

Action properties

PropertyTypeExample values
nedFlagString"MAAPI_CONFIG_C", "MAAPI_CONFIG_C_IOS", "MAAPI_CONFIG_J", "MAAPI_CONFIG_XML", null
cleanerString"IOSXRCleaner", "ALUCleaner", "JunosCleaner", "NoCleaner"
nedStrStringnull, "cisco-ios-xr", "ios"
deviceTypeString"cli", "netconf", null
nativeCmdString""
interfacePathString"interface"
deviceActionPathString"live-status/cisco-ios-xr-stats:exec/ci", "live-status/dcs-stats:exec/dcs-stats:show"
cmdArgNameString"command", "args", null
cmdArgString"running-config", "config", null
cmdNSString"cisco-ios-xr-stats", "ios-stats", "staros-stats", "nx-stats", "cisco-xe-stats", "jrpc"
supportNativeConfigBooleantrue, false
deleteKeywordString"no", "delete"

Example

Only include the properties you want to override for the given NED type:

1"overrideConfig": [
2 {
3 "nedType": "cisco-ios-xr",
4 "actions": {
5 "nedFlag": "MAAPI_CONFIG_C",
6 "cleaner": "IOSXRCleaner",
7 "nedStr": "cisco-ios-xr",
8 "deviceType": "cli",
9 "nativeCmd": "",
10 "interfacePath": "interface",
11 "deviceActionPath": "live-status/cisco-ios-xr-stats:exec/ci",
12 "cmdArgName": "args",
13 "cmdArg": "running-config",
14 "cmdNS": "cisco-ios-xr-stats",
15 "supportNativeConfig": true,
16 "deleteKeyword": "no"
17 }
18 }
19]