Access point(AP) config workflows use direct command line interface(CLI) commands to configure APs in an Aruba Central group or directly to an AOS10 AP.
This README presupposes general knowledge of how to use ArubaCentral API's and execute workflow scripts. Please see here for detailed information on installing pycentral and getting setup to execute workflow scripts.
- AP Configuration Workflows
- Table of Contents
- Setup
- How To Install
- CLI AP Config
- Documentation
- Troubleshooting Issues
- Known Issues
-
Clone this repository and
cd
into the workflow directory:git clone https://github.com/aruba/central-python-workflows.git cd central-python-workflows/ap_config
-
An authorization file containing credential information for your Aruba Central account is required to run workflows. The details and structure for how to create this can be found here.
An example token only yaml file would look like this:central_info: base_url: "<api-gateway-domain-url>" token: access_token: "<api-gateway-access-token>" ssl_verify: true
The Central Authorization filename is set as a CLI argument to the workflow as shown below:
--central_auth <"filepath">
In order to run a workflow script please install the requirements. Pycentral must also be installed and is included in the requirements. Please refer here for more information on Pycentral.
- install requirements.txt. Make sure python version 3 is installed in system.
$ pip install -r .\requirements.txt
Now you can start executing workflows.
The cli_config_workflow merges and replaces existing AP CLI configurations with CLI input from a .txt file.
-
This workflow should be used to configure a Central group or specific AOS10 AP.
-
Workflow takes a .txt file as input with AP CLI commands to configure an AP.
-
Pulls existing configuration from a Central group or specific AOS10 AP.
-
Merges input CLI with existing configuration, replacing any existing configuration that matches a context from the input. Any input not replaced is added to the new configuration.
-
Posts the merged configuration to the target AP.
-
Pulls new configuration from Central and validates that input was posted. Any CLI input command not in the new configuration is printed to the terminal as an error.
-
Can optionally replace entire config by setting a flag during execution.
AP configuration is provided in a .txt file in CLI format.
-
Config .txt filepath needs to be set using the cli_path argument shown here:
--cli_path <"filepath">
-
The body structure for the input .txt file is purely AP CLI. Commands that need to be in a CLI context should be indented two spaces under the parent context.
Here is an example of context switching with a WLAN profile:
wlan ssid-profile test essid test opmode enhanced-open type guest captive-portal internal dtim-period 1 broadcast-filter arp max-authentication-failures 0 blacklist inactivity-timeout 1000 dmo-channel-utilization-threshold 90 max-clients-threshold 1024 enable utf8 wlan access-rule test utf8 rule any any match any any any permit
A directory of sample configurations has been provided as a reference in the configurations folder under the ap_config directory here
-
With the input file configured the workflow can now be executed.
$ python replace_ap_workflow.py <group name/serial> --central_auth <"/central/token/path"> --cli_path <"config/path">
Workflow can also be executed with the -r flag to completely replace the existing configuration with the input.
$ python replace_ap_workflow.py <group name/serial> -r --central_auth <"/central/token/path"> --cli_path <"config/path">
- Python package documentation: pycentral module documentation
- Use-Cases and Workflows: Aruba Developer Hub
- AP CLI Config Reference: API DevHub Reference
- Get AP CLI Config Reference: Get AP CLI Config Reference
- AP CLI Reference Guide: CLI Reference
- If you encounter module import errors, make sure that the package has been installed correctly.
- Devices on operating systems older than AOS10 cannot use serial number as target value.
- Check that input commands are compatible with device version.
- Ensure Indentation is correct for context switching. The workflow uses regex pattern matching based on appropriate whitespace for merging and copying commands.
- Devices on operating systems older than AOS10 cannot use serial number as target value.