GVE DevNet Meraki Device Bulk Reboot

An app that can reboot all the selected Access Points in a Meraki network in case there are issues arising with these devices.

In a large network, you might have a lot of Access Points. Sometimes, an Access Point might not work correctly, but it's unclear which one exactly is causing the problem. Normally, every Access Point would need to be manually rebooted.

This simple user interface makes it much faster and easier to reboot all Access Points and fix the problem.

Contacts

Solution Components

  • Python 3
  • Meraki
  • Flask

How to obtain a Meraki API Key

In order to use the Cisco Meraki API, you have to enable the API for your organization first. After having enabled API access, you can generate an API key. You can follow the following instructions on how to enable API access and how to generate an API key:

  1. Log in to the Cisco Meraki dashboard

  2. In the left-hand menu, go to Organization > Settings > Dasbhoard API access

  3. Click on Enable access to the Cisco Meraki Dashboard API

  4. Go to Profile > API access

  5. Under API access, click on Generate API key

  6. Save the API key in a safe place. Please note that the API key will be shown only once for security purposes. In case you lose the key, then you have to revoke the key and regenerate a new key. Moreover, there is a limit of only two API keys per profile.

For more information on how to generate an API key, please click here here

Note: Make sure this API key has write access to both the source and target organization. You can add your account as Full Organization Admin to both organizations by following the instructions here.

Installation/Configuration

The following commands are executed in the terminal.

  1. Create and activate a virtual environment for the project:

     #WINDOWS:
     $ py -3 -m venv [add_name_of_virtual_environment_here] 
     $ [add_name_of_virtual_environment_here]/Scripts/activate.bat
     #MAC:
     $ python3 -m venv [add_name_of_virtual_environment_here] 
     $ source [add_name_of_virtual_environment_here]/bin/activate
    

For more information about virtual environments, please click here

  1. Access the created virtual environment folder

     $ cd [add_name_of_virtual_environment_here]
    
  2. Clone this repository

     $ git clone [add_link_to_repository_here]
    
  3. Access the folder gve_devnet_meraki_device_bulk_reboot

     $ cd gve_devnet_meraki_device_bulk_reboot
    
  4. Install the dependencies:

     $ pip install -r requirements.txt
    
  5. Open the .env file and add the environment variables. In the sections above, it is explained how to obtain these credentials and variables. Please note that all the variables below are strings.

    MERAKI_API_KEY = "<insert_meraki_api_key>"

Usage

Now it is time to launch the application! Simply type in the following command in your terminal:

$ python app.py

Then, head over to the URL that is displayed in the terminal output.

Screenshots

/IMAGES/0image.png

/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.

Use Case

Meraki Device Bulk Reboot

Meraki has a broad portfolio including routers, switches, Access Points (APs), cameras and sensors. The Meraki cloud is the backbone of the highly available, secure, and efficient Meraki solution. It allows for easy management and provisioning of the devices. Moreover, all the products and solutions are programmable, which allows us to build customization and integrations. In this Proof of Value (PoV), we have created an intuitive user interface which can easily reboot all selected APs.

In larger networks, there might be a lot of Access Points. Sometimes, it could happen that an AP doesn't work correctly, but it's unclear exactly which AP is causing the problem. The simple user interface that we have created ensures that rebooting all APs doens't have to happen manually anymore. Instead, it can be done with a single button click. This app, therefore, makes it much faster and easier to reboot all Access Points and fix the problem.

Once a user selects a organization and a network, a table containing all APs in the network will be shown. All of these APs are selected by default to be rebooted. However, it is possible to deselect APs, should that be necessary. Afterwards, it's simply a matter of clicking the 'reboot' button to reboot all selected APs. Once the rebooting process is finished, the user will receive a summary of the results (whether the reboot was successful or a failure for each of the APs).

In addition to receiving a summary within the user interface itself, there is also an option to send this summary to Webex as well. This option is selected by default, but can be deselected, if desired.

In summary, the user interface has the following functionalities:

  • Rebooting of all selected Access Points
  • Generate a summary of the results of the rebooting process
  • Send an additional summary of the results to Webex

interface

White Paper

Provide links to related white papers:

Provide a link to a related DevNet Sandbox:

Provide links to related Learning Labs or modules on DevNet:

Solutions on Ecosystem Exchange

Provide links to related solutions on DevNet Ecosystem Exchange:

View code on GitHub
  • Owner

  • Contributors

  • Categories

  • Products

    Meraki
  • Programming Languages

    CSS
  • License

    Other

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.