Difficulty: Beginner
Estimated Time: 10 minutes

Use Cisco Genie to learn and verify your network

This Katacode training simulates a real life scenario of a network engineer.

A major obstacle faced by all network engineers is keeping their network operational and healthy. Genie can help with that!

1) Take a snapshot of your network when your network is in good state

2) Re-take a snapshot periodically and compare with initial snapshot

3) When something changed, be alerted.

Genie provides multiple ways to do this; this training will demonstrate two ways:

1) Genie linux cli interacts with your devices and capture the state of it, all without any programing knowledge. Just like any other linux command.

2) RobotFramework with Genie robot library is a great way to get started with automation.

RobotFramework is an English keyword based automation framework and we've added Genie robot library to automate your network.

Objectives

In this learning lab you are going to learn:

  • How to use Genie Linux cli
  • How to use Genie Robot Library
  • Take snapshot of your devices and compare them to see what has changed

More information

Genie is a python library solution provided by Cisco which contains all the tools needed for Network Test Automation.

Make sure to go our official website and our Genie Installation training to get started!

You can reach us at [email protected]

All Genie trainings

This training demonstrated that Genie can be very useful as a tool help you manage your devices.

This training can be viewed on github under the directory robot.

To run this on your own network do the following:

  • Install Genie on your own Linux/MacOs device
  • Git clone Genie solution repo
  • Navigate to the robot_compare directory
  • Create your own Testbed file and you are ready to run it like in this training

You can always reach us for any question at [email protected]

Genie compares device operational state

Step 1 of 6

Step 1 - Without automation - Collect information

NOTE: the installation of all of the libraries is happening in the background, and may take a minute to complete

Goal

Congratulation, you are in charge of the following network!

Topology

The network is performing as expected. Your task is to make sure it remains up and running and if anything changes to react quickly. (Sounds familiar?)

Let's connect to our device and send a few show commands.

Getting Ready

To get you started quickly, we've created a virtualenv and installed Genie.

You can activate the virtualenv by running the following commands

source virtual/bin/activate

Manual investigation

We could not provide enough device, so we have "virtual". They react the same as normal devices, with limited commands. Click the following command to connect to the device.

mock_device_cli --os nxos --mock_data_dir /root/katacoda-scenarios/compare/initial_data/nxos --state execute

We can send a few show commands to understand the topology and configuration

show running-config show interface show ip ospf vrf all

NOTE: Type Ctrl+d to get out of the device.

The same can be done on the other device

mock_device_cli --os iosxe --mock_data_dir /root/katacoda-scenarios/compare/initial_data/csr/ --state execute