Example: enforcing IOS-XR router names¶
This is a basic example of the compliance module of Netshot, using a text-based rule.
Let's assume you want your IOS-XR devices to be named xr0 to xr9. You can enforce this with a text rule.
- Go to the Compliance section.
- If you haven't created any policy yet, click Create policy..., give it a name, and choose the device group the policy will apply to.
- Click on + (to the right of the policy) to add the rule.
- Give the rule a name, e.g. "XR device naming", select Simple text rule and click Add.
-
Click Edit content and fill in the rule definition, for example:
- Device type: Cisco IOS-XR
- Field: Device name
- Text (regular expression):
^xr[0-9]$ - The text must exist
You can test the rule against a selected device before saving. 6. Click Save. 7. Don't forget to enable the rule by clicking the wrench button and checking the Enabled box.
Once enabled, any IOS-XR device whose name does not match a single digit after xr (e.g. router1, xr10) will be flagged as non-conforming.