This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

vSmart Policy Scheduler

This is the Cisco SD-WAN vSmart Policy Scheduler source code. Using vManage API's, we can configure a schedule for vSmart policies
and when they should be active or not. Time ranges can be configured to set the active times for the policies.

The schedulers are stored in a database which is queried regularly by the server to determine which policies should be activated
or deactivated.

High Level Design

alt text

Contacts

Solution Components

  • Flask
  • Docker
  • Python
  • JavaScript
  • Cisco vManage API’s

Installation:

Clone the repo

$ git clone https://github.com/gve-sw/vsmart-policy-scheduler

Python

Install dependencies

$ pip3 install -r requirements.txt

Docker

You may build the docker image from this repo. You may edit docker-compose.yml to change the desired timezone:

environment:
      TZ: "Asia/Singapore"

A list of valid timezones is available at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones under TZ Database Name

Setup:

You can deploy this prototype in a lab environment, dCloud instance, or on your own deployment.
You would then need to either input your details through the web GUI or edit a config file below.

vManage details :

You need to have your VMANAGE IP Address, USERNAME, and PASSWORD.
Fill in the details of your vManage deployment in the DETAILS.py file

VMANAGE = 'VMANAGE IP:PORT'
J_USERNAME = 'USERNAME'
J_PASSWORD = 'PASSWORD'

Usage:

Python

Launch the Scheduler Server. Make sure that you have your venv activated.

$ flask run --host=0.0.0.0 --port=5000

Docker

Launch the Scheduler Server through the docker-compose file.

$ docker-compose up

Login Screen

alt text

Policy Selection

alt text

Policy Scheduling

alt text

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

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.