Run real-time commands

Mar 28, 2025 | Knowledge Base

Normally with Python rules, you have to have some backups for Netpicker to test your assertion against.

First, let’s run a test and see if we have the word “ospf” in the configuration or not without getting a backup:

The rule fails even though we have one OSPF process configured on the device:

For this to work, we either have to trigger a device backup first, or run a real-time command using device.cli():

On this page
Explore our products
See what Flock9 can do for your network.
View products

Can't find what you need?

Our engineers answer questions on Discord and by ticket.