This file contains hidden or 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 csv | |
import meraki | |
import os | |
from meraki.exceptions import APIError | |
# Constants | |
API_KEY = os.environ.get('MERAKI_API_KEY') # Replace with your Meraki Dashboard API key | |
GROUP_NUMBER = 1 # The target group number to check for | |
INPUT_CSV_FILE = 'input.csv' # Path to the input CSV file | |
OUTPUT_CSV_FILE = 'output.csv' # Path to the output CSV file |
This file contains hidden or 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 os | |
# run "pip3 install meraki" | |
import meraki | |
import json | |
MERAKI_API_KEY = os.environ.get("MERAKI_API_KEY") | |
ORG_ID = "734417" | |
dashboard = meraki.DashboardAPI( | |
api_key=MERAKI_API_KEY, |
This file contains hidden or 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 meraki | |
import os | |
API_KEY = os.environ.get('MERAKI_API_KEY') | |
DATA = { | |
"Q4CD-XXXX-YYYY": { | |
11: "726205439913492796" | |
} | |
} |
This file contains hidden or 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 flask import Flask, request, jsonify | |
import meraki | |
import json | |
import os | |
import threading | |
import time | |
app = Flask(__name__) |
This file contains hidden or 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 os | |
import sys | |
import re | |
import logging | |
import time | |
import meraki | |
DATA = { |
This file contains hidden or 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 pysnmp.hlapi import * | |
V2_COMMUNITY = 'meraki-rw' | |
MERAKI_DEVICE = '192.168.128.108' | |
iterator = nextCmd( | |
SnmpEngine(), | |
CommunityData(V2_COMMUNITY), | |
UdpTransportTarget((MERAKI_DEVICE, 161)), | |
ContextData(), |
This file contains hidden or 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 socket | |
from pysnmp.proto import api | |
from pyasn1.codec.ber import decoder | |
port = 162 | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
s.bind(("", port)) | |
while 1: | |
data, addr = s.recvfrom(4048) |
This file contains hidden or 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 os | |
from datetime import datetime | |
import meraki | |
MERAKI_API_KEY = os.environ.get('MERAKI_API_KEY', None) | |
def device_needs_license(device): |
This file contains hidden or 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 os | |
import sys | |
from datetime import date | |
import meraki | |
def is_vlan_used(vlans, vlan_id): | |
for vlan in vlans: | |
if vlan['id'] == vlan_id: |
This file contains hidden or 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 os | |
import datetime | |
import meraki | |
TIMEZONE_OFFSETS = { | |
'Australia/LHI': 10.5, | |
'Australia/Lord Howe': 10, | |
'Australia/ACT': 10, | |
'Australia/Canberra': 10, |
NewerOlder