Running Generic Device Operations Commands In Contrail Command
Contrail Networking enables you to obtain device information, such as interface information, like input rate or output rate, or search for the name of an interface by providing its MAC address or IP address from the Contrail Command UI. You can run a specific generic device operations command on multiple devices at a time. A job template is defined for each generic device operations command. After you select the devices and specify the parameters defined in the job template, a job is created depending on the generic command you selected. The result of the job is then displayed for the selected device or devices.
You can select a maximum of 20 devices at a time and run a generic device operations command to view information about those devices.
You can run the following generic device operations commands:
Search using MAC or IP address—Use this generic device operations command to identify the interface name if you know the IP address or the MAC address of an interface. This operation is useful to locate the interface by specifying the interface name and information such as name of the originating device and its loopback IP address.
Show MAC mobility—Use this generic device operations command to display the current location of a MAC address within the fabric and its local and remote origin.
Show chassis information—Use this generic device operations command to view a range of chassis-related information such as chassis environment, routing engine, chassis environment and so on.
Show operations information—Use this generic device operations command to display a range of operational information such as BGP configuration information, EVPN configuration information, VLAN information and so on.
Show current or rollback configuration—Use this generic device operations command to display the rollback configuration.
Show interface details—Use this generic device operations command to display information about the physical or virtual interfaces on a fabric node.
Show interfaces—Use this generic device operations command to show a list of all runtime interfaces. You can use the filters to select the type of interface, such as physical or logical. You can also view particular types of interfaces using the
regex
filter.Show configured interfaces—Use this generic device operations command to list all the configured interfaces. You can use the filters to select the type of interface, such as physical or logical. You can also view particular types of interfaces using the
regex
filter..Show interfaces by names—Use this generic device operations command to check whether a particular type of interface is present in one or more of the devices selected. This operation is useful when you wan to check which among the selected devices has an
xe-0/0/2
interface or anlo0.0
interface. You can use the filters to select the type of interface, such as physical or logical. You can then enter the interface name you want to search for.
You can create a custom generic device operations command
by adding a job_template
object type in the opt/contrail/fabric_ansible_playbooks/conf/predef_payloads.json file. Follow these best practices when you define a new generic
device operations command.
Make sure that
template_type
is set todevice_operation
, which identifies this template as a generic device operation job template.Create a new
job_template
for every generic device command you need to execute. Specify the command name in thejob_template_name
field so that it is easy to identify the command.Make sure that the generic device operation
job_templates
references to the playbook /opt/contrail/fabric_ansible_playbooks/operational_command.yml.Any change to the
predef_payloads.json
requires a restart of theconfig_api_1_xxxx
docker.
To run a generic device operations command: