cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1851
Views
0
Helpful
1
Replies

using regex in configuring nacm rule

Chris Wang
Cisco Employee
Cisco Employee

Is there any way to use regex for a nacm rule apply to a group of devices?

For example: "rule bunch_devices path /ncs:devices/device[name=*sw*)]/*", as red color marked, which means operations on abc.sw.001 and def.sw.002 could match this rule.

1 Accepted Solution

Accepted Solutions

mvolf
Cisco Employee
Cisco Employee

No. The type of the leaf "path" is a node-instance-identifier - syntactically a XPath expression, but with the restriction that predicates, if present, must consist of key value comparisons. As a result, a single rule like this can refer to one or to all devices, not to a group of devices.

View solution in original post

1 Reply 1

mvolf
Cisco Employee
Cisco Employee

No. The type of the leaf "path" is a node-instance-identifier - syntactically a XPath expression, but with the restriction that predicates, if present, must consist of key value comparisons. As a result, a single rule like this can refer to one or to all devices, not to a group of devices.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: