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
A slightly opinionated template for iPython configuration for interactive development

A slightly opinionated template for iPython configuration for interactive development. Auto-reload and no imports for packages and modules in the project.

Seva Zhidkov 24 Feb 16, 2022
This Ivy plugin adds support for TOML file headers.

This Ivy plugin adds support for TOML file headers as an alternative to YAML.

Darren Mulholland 1 Nov 09, 2021
A small example project for efficiently configuring a Python application with YAMLs and the CLI

Hydra Example Project for Python A small example project for efficiently configuring a Python application with YAMLs and the CLI. Why should I care? A

Florian Wilhelm 4 Dec 31, 2022
Configuration Extractor for EXE4J PE files

EXE4J Configuration Extractor This script helps reverse engineering Portable Executable files created with EXE4J by extracting their configuration dat

Karsten Hahn 6 Jun 29, 2022
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
A helper for organizing Django project settings by relying on well established programming patterns.

django-configurations django-configurations eases Django project configuration by relying on the composability of Python classes. It extends the notio

Jazzband 955 Jan 05, 2023
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
Chinese-specific configuration to improve your favorite DNS server

Dnsmasq-china-list - Chinese-specific configuration to improve your favorite DNS server. Best partner for chnroutes.

Felix Yan 4.6k Jan 03, 2023
ConfZ is a configuration management library for Python based on pydantic.

ConfZ – Pydantic Config Management ConfZ is a configuration management library for Python based on pydantic. It easily allows you to load your configu

Zühlke 164 Dec 27, 2022
Napalm-vs-openconfig - Comparison of NAPALM and OpenConfig YANG with NETCONF transport

NAPALM vs NETCONF/OPENCONFIG Abstracts Multi vendor network management and autom

Anton Karneliuk 1 Jan 17, 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
KConfig Browser is a graphical application which allows you to modify KDE configuration files found in ~/.config

kconfig_browser KConfig Browser is a graphical application which allows you to modify KDE configuration files found in ~/.config Screenshot Why I crea

11 Sep 15, 2022
MOHAconfig - Gerador de arquivo de configuração para Medal of Honor: Airborne

MOHAconfig Gerador de arquivo de configuração para Medal of Honor: Airborne MOHA - Gerador de arquivo de configuração. Essa aplicação foi feita em pyt

1 Dec 31, 2021
Configuration Management for Python ⚙

dynaconf - Configuration Management for Python. Features Inspired by the 12-factor application guide Settings management (default values, validation,

Bruno Rocha 2.8k Jan 06, 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
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
Secsie is a configuration language made for speed, beauty, and ease of use.

secsie-conf pip3 install secsie-conf Secsie is a configuration language parser for Python, made for speed and beauty. Instead of writing config files

Noah Broyles 3 Feb 19, 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
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
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