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 extras.scripts import Script, StringVar | |
from utilities.exceptions import AbortScript | |
from extras.models import ObjectChange | |
from dcim.models import Site | |
class revert_change(Script): | |
class Meta: | |
name = "Revert Change" | |
description = "Revert a change made to an object" |
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 typing import List, Union | |
from dcim.models import ( | |
ConsolePort, | |
ConsoleServerPort, | |
Device, | |
DeviceBay, | |
FrontPort, | |
Interface, | |
Module, |
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
# system | |
import os | |
from typing import Literal | |
from unidecode import unidecode | |
import googlemaps | |
# netbox | |
from dcim.models.sites import Site |
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 requests | |
import pynetbox | |
from termcolor import colored | |
from nornir import InitNornir | |
from nornir_utils.plugins.functions import print_result | |
from nornir_napalm.plugins.tasks import napalm_get | |
from nornir.core.filter import F | |
# NetBox Layer 3 switches (Base Inventory Group Defined in the config file below) |
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
# /etc/systemd/system/iperf3.service | |
# User service: $HOME/.config/systemd/user/iperf3.service | |
[Unit] | |
Description=iperf3 server | |
After=syslog.target network.target auditd.service | |
[Service] | |
Restart=always | |
RestartSec=3 |