Need to setup gpg-agent first, on OSX I use keychain (it also does ssh-agent)
$ brew info keychain
keychain: stable 2.8.5
User-friendly front-end to ssh-agent(1)
https://www.funtoo.org/Keychain
/usr/local/Cellar/keychain/2.8.5 (7 files, 108.5KB) *
import contextlib | |
import hashlib | |
import logging | |
from collections import defaultdict | |
from decimal import Decimal | |
from django.db.models import DecimalField, ForeignKey | |
log = logging.getLogger(__name__) |
def merge_dicts(dict_list): | |
"""Merge all values from dict list into a single dict | |
>>> d1 = {'a': 1, 'b': 2} | |
>>> d2 = {'a': 2, 'b': 3} | |
>>> merge_dicts([d1, d2]) | |
{'a': [1, 2], 'b': [2, 3]} | |
""" | |
kviter = chain.from_iterable(d.iteritems() for d in dict_list) |
# This was added to schema.py so that it automatically gets applied when the schema is generated. | |
from drf_spectacular.extensions import OpenApiAuthenticationExtension, OpenApiSerializerFieldExtension | |
from drf_spectacular.plumbing import build_bearer_security_scheme_object | |
class TokenScheme(OpenApiAuthenticationExtension): | |
target_class = "rest_framework.authentication.TokenAuthentication" | |
name = "tokenAuth" | |
match_subclasses = True |
from nautobot.dcim.models import Device | |
from nautobot.dcim.models import Interface | |
from nautobot.dcim.choices import InterfaceTypeChoices | |
from nautobot.ipam.models import VLAN | |
from nautobot.extras.jobs import Job | |
class TestJob(Job): | |
class Meta: | |
description = "Some job jo!" |
This is a brief summary of setting up Nautobot on AWS. I used Nautobot 1.1.3, but it should not vary too much when using different versions. It assumes some familiarity with Nautobot and AWS. Pretty much all of the AWS cli commands are the bare minimum to stand up some version of this and only show creating one resource if multiple identical resources are needed, you should add tags and consider your needs around sizing, redundancy, etc. The end result is a basic Nautobot deployment. It is not doing any scaling, just one http server and one celery worker.
def select_option_for_select2(driver, id, text=None): | |
element = driver.find_element(By.XPATH, '//*[@id="{}"]/following-sibling::*[1]'.format(id)) | |
element.click() | |
if text: | |
element = driver.find_element(By.CSS_SELECTOR, "input[type=search]") | |
element.send_keys(text) | |
try: | |
element.send_keys(Keys.ENTER) |
From 19e3203ea649a2668629eb66088f004a8747248c Mon Sep 17 00:00:00 2001 | |
From: jathanism <[email protected]> | |
Date: Tue, 13 Apr 2021 15:34:02 -0700 | |
Subject: [PATCH] Patch for IPv6 ending in non-integer (a-f) | |
--- | |
nautobot/ipam/querysets.py | 2 +- | |
nautobot/ipam/tests/test_querysets.py | 1 + | |
2 files changed, 2 insertions(+), 1 deletion(-) |
From 3e282e34a0387ea80ff2500c936d107c369c08ba Mon Sep 17 00:00:00 2001 | |
From: jathanism <[email protected]> | |
Date: Tue, 13 Apr 2021 13:19:27 -0700 | |
Subject: [PATCH] Extend `IPAddress.objects.string_search` to support IPv6 | |
--- | |
nautobot/ipam/querysets.py | 83 +++++++++++++++++++++++---- | |
nautobot/ipam/tests/test_filters.py | 10 ++++ | |
nautobot/ipam/tests/test_querysets.py | 44 ++++++++++++++ | |
3 files changed, 126 insertions(+), 11 deletions(-) |