Defining a Device to Clean

In this section we will be defining our first device to clean using the cleaner class we previously added. There is no limit to the number of devices that can be defined, however since this is a quick start guide, we will only be adding one.

To add a device inside the Clean YAML there are two different steps.

First we must add a top-level key called devices. Under that key we can add the device name. Please note: this device must exist in your Testbed YAML.

1cleaners:
2    # This means to use the cleaner class `PyatsDeviceClean`
3    PyatsDeviceClean:
4        # The module is where the cleaner class above can be found
5        module: genie.libs.clean
6
7devices:
8    PE1:

Second, we must add a key inside the cleaners block called devices where the value is a list of the devices added.

 1cleaners:
 2    # This means to use the cleaner class `PyatsDeviceClean`
 3    PyatsDeviceClean:
 4        # The module is where the cleaner class above can be found
 5        module: genie.libs.clean
 6        # You can define many devices within the Clean YAML.
 7        # Any that are not in this list are not cleaned even if they are defined below.
 8        devices: [PE1]
 9
10devices:
11    PE1: