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 django | |
import os | |
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'netbox.settings') | |
django.setup() | |
from dcim.models import Device, ConsolePort, ConsoleServerPort, PowerPort, PowerOutlet, Interface, RearPort, FrontPort, DeviceBay | |
for device in Device.objects.all(): | |
# Based on Device.save() | |
ConsolePort.objects.bulk_create( |
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
Sep 21 09:35:24 loki systemd[1]: Starting Vector... | |
Sep 21 09:35:24 loki vector[24928]: √ Loaded ["/etc/vector/vector.toml"] | |
Sep 21 09:35:24 loki vector[24928]: √ Component configuration | |
Sep 21 09:35:24 loki vector[24928]: √ Health check "loki" | |
Sep 21 09:35:24 loki vector[24928]: ------------------------------------ | |
Sep 21 09:35:24 loki vector[24928]: Validated | |
Sep 21 09:35:24 loki systemd[1]: Started Vector. | |
Sep 21 09:35:24 loki vector[24932]: Sep 21 09:35:24.385 INFO vector::app: Log level is enabled. level="vector=trace,codec=trace,vrl=trace,file_source=trace,tower_limit=trace,rdkafka=trace" enable_datadog_tracing=false | |
Sep 21 09:35:24 loki vector[24932]: Sep 21 09:35:24.386 INFO vector::app: Loading configs. paths=["/etc/vector/vector.toml"] | |
Sep 21 09:35:24 loki vector[24932]: Sep 21 09:35:24.417 DEBUG vector::tls::settings: Fetching system root certs. |
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 re | |
import unittest | |
def parse_natural(name): | |
res = re.split("(\d+)", name) | |
# first and last element is always a string; alternate values are numbers | |
for i in range(1, len(res), 2): | |
res[i] = int(res[i]) | |
return res |
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
#!/usr/bin/python3 | |
import os | |
import shutil | |
import subprocess | |
import sys | |
index = int(sys.argv[1]) | |
num_disks = int(sys.argv[2]) | |
base = os.path.abspath("mybase.img") |
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
libguestfs: create: flags = 0, handle = 0x55be3d261850, program = guestfish | |
libguestfs: command: run: qemu-img | |
libguestfs: command: run: \ create | |
libguestfs: command: run: \ -f qcow2 | |
libguestfs: command: run: \ -o backing_file=/home/nsrc/nsrc-gns3/scripts/mybase.img,compat=1.1 | |
libguestfs: command: run: \ /tmp/gf-run.20461/node0.qcow2 | |
Formatting '/tmp/gf-run.20461/node0.qcow2', fmt=qcow2 size=1474560 compat=1.1 backing_file=/home/nsrc/nsrc-gns3/scripts/mybase.img cluster_size=65536 lazy_refcounts=off refcount_bits=16 | |
libguestfs: command: run: qemu-img | |
libguestfs: command: run: \ create | |
libguestfs: command: run: \ -f qcow2 |
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
#!/usr/bin/python3 | |
import os | |
import shutil | |
import subprocess | |
import sys | |
index = int(sys.argv[1]) | |
num_disks = int(sys.argv[2]) | |
base = os.path.abspath("mybase.img") |
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
#!/usr/bin/python3 | |
import subprocess, sys | |
COUNT = 36 | |
CONCURRENCY = 12 | |
NUM_DISKS = 46 | |
jobs = [] | |
errors = [] |
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 extras.reports import Report | |
from dcim.models import Cable, RearPort | |
from dcim.constants import * | |
from circuits.models import CircuitTermination | |
CABLE_TYPES_OK_BETWEEN_RACKS = { | |
CABLE_TYPE_DAC_PASSIVE, | |
} | |
class CheckCableLocality(Report): |
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
UEsDBBQACAAIAHRJplIAAAAAAAAAAAAAAAAMAAAAcHJvamVjdC5nbnMzzVdLk9wmEP4rU8o1 | |
7KK3ND7lkGsqB6dySFwqxENDVgIF0I7HW/vf06DHaGfXTuzKwTMX0cBHP77uhqeITE43tNeW | |
R8eDIL3lPx5moR65upVZR4zbCZkhZ6m6pjOSNVZ+8iBJDhN7QekFigz+O+qUTdGZt2iSKI6T | |
PIK50ei/OHWNZH5FjPOE07pAjOMMZbmgqBY0QUyIKq8yKlKc+l2GP0ortdexhqGlXPHmxGV3 | |
8hrGGONNepbMnbxqi/Ckz0HlnSVBJpXjRhDKm560vLe38z25cPNCqsjYgF9uwaZx7CU3IFJT | |
34PE6VH3uruA5Cmiehgnxz3QHx+uXtzGvVQPYfAUCdm7+cin52VmcVNKeJuIuEaU1BXKYlyj | |
iqQxanmCE8ITmvLCu0lpxhcwwsgIaI2ahjYo550RLA1qGe2Imx0avOQufQiZ0MohQQbZX46H | |
95eR/24kwLwLch9j7+07PI/PIQDHQ6t79g6074+HH3D4hRHSI6HSAVAMO7x+jn/08Yo49qOP | |
8JnG8OE9hWL8vFiwGE24KPOMx95ogjJW5KiiBUGYxRmL85bVqQiM0sbtzASU79x6Rdxmf4UX | |
+8vsxvyiqjNMqxYlnDGUtTVGbZzUSKSipHEmcEH5W+Z/CJy0kNAbS4Nsx42Fk8tBvaak90hU |
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
{ | |
"auto_close": false, | |
"auto_open": false, | |
"auto_start": false, | |
"drawing_grid_size": 25, | |
"grid_size": 75, | |
"name": "gns3-web-ui-1125", | |
"project_id": "1052ec96-de04-45fc-9fc2-dff8584cf303", | |
"revision": 9, | |
"scene_height": 1000, |