Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

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 an lo0.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 to device_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 the job_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 the config_api_1_xxxx docker.

To run a generic device operations command:

  1. Navigate to Infrastructure > Fabrics > fabric name.
  2. Select the fabric devices and click the Run a Custom Action button as shown in Figure 1.
    Figure 1: Select fabric DevicesSelect fabric Devices
  3. Click the operation that you want to perform and click Next.
    Figure 2: Choose an OperationChoose an Operation
  4. Select a Sub Operation Type and enter the filters.

    Details of the devices selected are displayed as shown in Figure 3.

    Figure 3: Devices Selected for the OperationDevices Selected for the Operation
  5. Click Execute.

    Information about the selected device is displayed as shown in Figure 4.

    Figure 4: Generic Device Operation Command ResultsGeneric Device Operation Command Results
  6. Click Finish to complete the operation.