ACI_LAYER1_CHECK

Python Code that allows Network Engineers to run through their ACI Infrastructure for Layer 1 availability and compare to a set of interfaces that reflects their tenant computing a health score

published

Overview

High Level Workflow

Device/Interface Health:

The idea of the health check is to provide visibility into possible layer 1 problems within the network fabric. The script runs to check for interfaces that are down and compares them with expected set of interfaces and computes a health percentage score.

Python

The script is written in python using acitoolkit to interact with APIC,and computation based on defined set of interfaces.

Output: The results of the CLI commands are stored in simple .txt file: (L1_Output.txt, L1_Health.txt) Sample Output

You can also find the results of a full run in the text file (Result.txt)

Contacts

*Oluyemi Oshunkoya (yemi_o@outlook.com)

Solution Components

*Python
*

Prerequisites

ACITOOLKIT

Python3.6 and above

Step 1 - Downloading - Option A Using a Docker Image

  1. Download the latest version of the ACITOOLKIT from docker hub

docker pull dockercisco/acitoolkit

  1. Run the docker image

docker run -it --name acitoolkit dockercisco/acitoolkit

Step 1 - Downloading - Option B Using GIT

  1. Clone the repository

git clone https://github.com/datacenter/acitoolkit.git

  1. Install ACITOOLKIT library

cd acitoolkit
python setup.py install

Step 2 - Script Setup

  1. Clone this repository into your desired directory using the command:

git clone https://github.com/yzmar4real/ACI_LAYER1_CHECK.git

  1. CD into the directory

cd ACI_LAYER1_CHECK

  1. (Optional) Use the directory as a virtual environment for the project

python3 -m venv .

  1. (Optional) Start the virtual environment and install the requirements for the project

source bin/activate

  1. Execute the main script from console

python3 Main.py

View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.