An application pulls configuration information from JSON files generated

Overview

AP Provisioning Automation

An application pulls configuration information from JSON files generated by Ekahau and then uses Netmiko to configure the lightweight APs from the WLC with the information generated from Ekahau.

Overview

High Level Workflow

Contacts

  • Danielle Stacy

Solution Components

  • Netmiko
  • Python
  • Cisco WLC
  • Cisco AP (1562I, 1562D, 1562E, 9130I, 9120I, 3802I, 3802E, 2802I, 3702I, 3702E, 3602I, 3502I, 1815W, 1810W)

Prerequisistes

-Ekahau files: This prototype was written with the assumption that the user will use Ekahau in their environment. Prior to running the program, create a directory that will hold all the JSON files that Ekahau created for the APs connected to the WLC you are working with. Then move all the JSON files to this directory. The files that are needed are the file that identify the access points and the file that contains the radio configuration information (power level and channel).

Installation/Configuration

  1. Clone this directory with git clone https://github.com/gve-sw/gve_devnet_ap_provisioning_automation and open the directory.
  2. Fill in the information needed in the details.py file. Here, you will provide the name of the directory with your JSON files that you created in the Prerequisites section, the IP address of the WLC, the username of the WLC, and the password of the WLC.
config_file_dir = "configuration file name goes here"
ip_addr = "ip address of WLC access points in config file directory are connected to"
username = "username of the WLC with the ip address above"
password = "password to the WLC"
  1. Set up a Python virtual environment. Make sure Python 3 is installed in your environment, and if not, you may download Python here. Once Python 3 is installed in your environment, you can activate the virtual environment with the instructions found here.
  2. Install the requirements with pip install -r requirements.txt.

Usage

The code that reads the information found in the Ekahau configuration JSON files and then applies those configurations to the access points is found in the file provision.py. The file powerByModelandChannel.json contains a matrix that maps the power level that the Ekahau file will provide (in dBm) to one of the 8 power levels that Cisco APs can be configured to. If there is not an available Cisco power level that exactly matches the power level provided by Ekahau, then the closest power level will be configured on the AP. For instance, if the Ekahau JSON file suggests a power level of 12 dBm, but the only Cisco power levels available are 3 (which maps to 13 dBm) or 4 (which maps to 10 dBm), then the code will configure the AP with power level 3 because its 13 dBm is closer to 12 dBm than power level 4 with 10 dBm. The code also expects the name of the Ekahau JSON file that contains the identifying information of the APs to be accessPoints.json and the name of the JSON file that contains the power level and channel information for the AP radio to be named simulatedRadios.json. If these files have different names in your environment, then you need to change the strings found in lines 18 and 24 in provision.py.

Line 18 which indicates the simulatedRadios.json file name:

radio_file_path = config_file_dir + "/simulatedRadios.json"

Line 24 which indicates the accessPoints.json file name:

ap_file_path = config_file_dir + "/accessPoints.json"

To run the code, use the command python3 provision.py

/IMAGES/0image.png

LICENSE

Provided under Cisco Sample Code License, for details see LICENSE

CODE_OF_CONDUCT

Our code of conduct is available here

CONTRIBUTING

See our contributing guidelines here

DISCLAIMER:

Please note: This script is meant for demo purposes only. All tools/ scripts in this repo are released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use. You are responsible for reviewing and testing any scripts you run thoroughly before use in any non-testing environment.

Owner
Cisco GVE DevNet Team
Cisco GVE DevNet Team. Open a case with us at the link below:
Cisco GVE DevNet Team
Sync any your configuration file to remote. Currently only support gist.

Sync your configuration to remote, such as vimrc. You can use EscSync to manage your configure of editor, shell, etc.

Me1onRind 0 Nov 21, 2022
Python-dotenv reads key-value pairs from a .env file and can set them as environment variables.

python-dotenv Python-dotenv reads key-value pairs from a .env file and can set them as environment variables. It helps in the development of applicati

Saurabh Kumar 5.5k Jan 04, 2023
A YAML validator for Programming Historian lessons.

phyaml A simple YAML validator for Programming Historian lessons. USAGE: python3 ph-lesson-yaml-validator.py lesson.md The script automatically detect

Riva Quiroga 1 Nov 07, 2021
Generate config files and qr codes for wireguard vpn

wireguard config generator for python Generate config files and qr codes for wireguard vpn You will need to install qrcode and pillow in python and yo

18 Dec 02, 2022
A tool to manage configuration files, build scripts etc. across multiple projects.

A tool to manage configuration files, build scripts etc. across multiple projects.

8 Dec 14, 2022
Strict separation of config from code.

Python Decouple: Strict separation of settings from code Decouple helps you to organize your settings so that you can change parameters without having

Henrique Bastos 2.3k Dec 30, 2022
Yamale (ya·ma·lē) - A schema and validator for YAML.

Yamale (ya·ma·lē) ⚠️ Ensure that your schema definitions come from internal or trusted sources. Yamale does not protect against intentionally maliciou

23andMe 534 Dec 21, 2022
Config files for my GitHub profile.

Config files for my GitHub profile.

Lukas Sales 7 May 17, 2022
Hydra is a framework for elegantly configuring complex applications

Python Decouple: Strict separation of settings from code Decouple helps you to organize your settings so that you can change parameters without having

Facebook Research 6.6k Jan 04, 2023
Configuration for Python planets

Configuration for Python planets

Python 127 Dec 16, 2022
Read configuration settings from python configuration files.

Maison Read configuration settings from python configuration files. Motivation When developing a python application, e.g a command-line tool, it can b

9 Jan 04, 2023
Flexible Python configuration system. The last one you will ever need.

OmegaConf Description Project Code quality Docs and support OmegaConf is a hierarchical configuration system, with support for merging configurations

Omry Yadan 1.4k Jan 02, 2023
A set of Python scripts and notebooks to help administer and configure Workforce projects.

Workforce Scripts A set of Python scripts and notebooks to help administer and configure Workforce projects. Notebooks Several example Jupyter noteboo

Esri 75 Sep 09, 2022
Dynamic Django settings.

Constance - Dynamic Django settings A Django app for storing dynamic settings in pluggable backends (Redis and Django model backend built in) with an

Jazzband 1.5k Jan 04, 2023
Event Coding for the HV Protocol MEG datasets

Scripts for QA and trigger preprocessing of NIMH HV Protocol Install pip install git+https://github.com/nih-megcore/hv_proc Usage hv_process.py will

2 Nov 14, 2022
Dag-bakery - Dag Bakery enables the capability to define Airflow DAGs via YAML.

DAG Bakery - WIP 🔧 dag-bakery aims to simplify our DAG development by removing all the boilerplate and duplicated code when defining multiple DAG cro

Typeform 2 Jan 08, 2022
environs is a Python library for parsing environment variables.

environs: simplified environment variable parsing environs is a Python library for parsing environment variables. It allows you to store configuration

Steven Loria 920 Jan 04, 2023
Organize Django settings into multiple files and directories. Easily override and modify settings. Use wildcards and optional settings files.

Organize Django settings into multiple files and directories. Easily override and modify settings. Use wildcards in settings file paths and mark setti

Nikita Sobolev 942 Jan 05, 2023
filetailor is a peer-based configuration management utility for plain-text files such as dotfiles.

filetailor filetailor is a peer-based configuration management utility for plain-text files (and directories) such as dotfiles. Files are backed up to

5 Dec 23, 2022
Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support.

Simple dataclasses configuration management for Python with hocon/json/yaml/properties/env-vars/dict support, based on awesome and lightweight pyhocon parsing library.

Teo Stocco 62 Dec 23, 2022