$ git clone https://gist.github.com/0fa4719f25ba5710bf6300cd72b57aff.git illumination
$ cd illumination
$ virtualenv venv
$ . venv/bin/activate
$ pip install -r requirements.txt
$ python main.py -u username hostname.example.com GigabitEthernet1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import time | |
# `pip install dnacentersdk xmltodict` is needed | |
from dnacentersdk import api | |
import xmltodict | |
# Create a DNACenterAPI connection object | |
dnac = api.DNACenterAPI( | |
username="username", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This function handles incoming webhooks from Meraki and lock the door with a smart lock. | |
The following environment variables must be set: | |
kmsEncryptedSesameApiKey - SESAME API key (KMS encrypted) | |
kmsEncryptedSesameSecret - SESAME device secret (KMS encrypted) | |
kmsEncryptedMerakiSharedSecret - Meraki shared secret for webhooks (KMS encrypted) | |
sesameUuid - SESAME device UUID (plain) | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- HOWTO: | |
-- after saving it, open with Script Editor (default) and run it | |
-- PREREQUISITES: | |
-- make sure your Keynote presentation is open in the background | |
-- AFTER EXPORT: | |
-- if you can't open the file due to encoding errors, open with Sublime (or another a text editor) and then "File / Save with encoding / UTF8" | |
tell application "Keynote" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CISCO SAMPLE CODE LICENSE | |
Version 1.1 | |
Copyright (c) 2018 Cisco and/or its affiliates | |
These terms govern this Cisco Systems, Inc. ("Cisco"), example or demo | |
source code and its associated documentation (together, the "Sample | |
Code"). By downloading, copying, modifying, compiling, or redistributing | |
the Sample Code, you accept and agree to be bound by the following terms | |
and conditions (the "License"). If you are accepting the License on | |
behalf of an entity, you represent that you have the authority to do so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from jinja2 import Environment, FileSystemLoader | |
from ncclient import manager | |
from flask import Flask, jsonify, render_template, request | |
import xmltodict | |
app = Flask(__name__) | |
host = '<ipaddress or fqdn>' | |
username = '<username>' | |
password = '<password>' |
NewerOlder