Skip to content

Instantly share code, notes, and snippets.

View titom73's full-sized avatar
:octocat:

TiTom73 titom73

:octocat:
View GitHub Profile
@titom73
titom73 / avd-cli-coverage.json
Last active November 9, 2025 17:24
avd-cli-coverage
{"label":"coverage","message":"90.04%","schemaVersion":1,"color":"hsl(120, 100%, 40%)"}
@titom73
titom73 / eos-downloader-coverage.json
Last active October 24, 2025 17:19
eos-downloader-coverage
{"label":"coverage","message":"83%","schemaVersion":1,"color":"hsl(99, 100%, 40%)"}
@titom73
titom73 / run.tpl
Created June 12, 2025 07:44 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@titom73
titom73 / dummy-stage02.py
Last active November 13, 2023 16:37
Anta Hackathon Solution
"""
Test functions related to system-level features and protocols
"""
## Please refer to https://github.com/titom73/atd-anta-demo/blob/main/docs/demo-tests.md for complete description
from typing import Optional
from anta.models import AntaTest, AntaCommand
@titom73
titom73 / input.yml
Last active August 2, 2023 14:24
Traceback PR 315
anta.tests.routing:
bgp:
- VerifyBGPIPv4UnicastCount:
vrfs:
default: des

Webhooks

Webhook for new device

{
    "alerts": [
        {
            "annotations": {
                "description": "New device DF502B50F29141129E775AF71A350E46 was detected with Zerotouch disabled",
#!/usr/bin/python
# coding: utf-8 -*-
import sys
import logging
import pprint
import random
from pydantic import BaseModel, ValidationError, validator
from anta import inventory
from anta.inventory import AntaInventory
@titom73
titom73 / bump-version.sh
Last active March 22, 2022 12:37
Bump SemVer
#! /bin/bash
# Author:
# Date: 2022-03-22
# Version: 0.1.0
# Info: Script to bump version based on SemVer syntax. DEV id is based on week number
# Example:
# # Assuming current version is v3.32.1.dev2
# # Bump MAJOR version
# $ bash .github/bump-dev-version.sh major
@titom73
titom73 / pytest.md
Created December 8, 2021 09:56 — forked from kwmiebach/pytest.md
pytest cheat sheet

Usage

(Create a symlink pytest for py.test)

pytest [options] [file_or_dir] [file_or_dir] ...

Help:

@titom73
titom73 / volume-backup.sh
Created October 20, 2021 18:53
Docker volume backup
#!/bin/bash
# This script allows you to backup a single volume from a container
# Data in given volume is saved in the current directory in a tar archive.
CONTAINER_NAME=$1
VOLUME_NAME=$2
usage() {
echo "Usage: $0 [container name] [volume name]"
exit 1
}