Path: /Users/danielantonio/Developer/especial_op
Propósito: Acesso e configuração de roteadores e servidores (Cisco, Linux, etc.)
especial_op/
├── wiki/ ← WIKI (runbooks e memória de contexto)
│ ├── INDEX.md
│ ├── servers.md
│ ├── linux-ops.md
│ ├── huawei-ne40e.md
│ ├── ne40e-communities.md
│ ├── cisco-ios-xe.md
│ └── zoc-inventory.md
├── config/
│ └── devices.yaml ← inventário de dispositivos (IP, user, senha, tipo)
├── especial_op/
│ ├── cisco.py ← CiscoClient (invoke_shell, TACACS+)
│ ├── huawei.py ← HuaweiClient (invoke_shell, screen-length 0)
│ ├── nokia.py ← NokiaClient (invoke_shell, SR-OS MD-CLI)
│ ├── linux.py ← LinuxClient (exec_command, Linux + Mikrotik)
│ └── __init__.py
├── tools/
│ └── zoc_import.py ← Importa/consulta ZOC8 → devices.yaml
├── logs/ ← Logs de anúncio BGP e snapshots de rotas
├── op.py ← CLI principal (roteia pelo campo 'type')
└── pyproject.toml ← dep: tools (paramiko), pyyaml
| type | Classe | Protocolo |
|---|---|---|
cisco-ios-xe |
CiscoClient | invoke_shell, terminal length 0 |
huawei-vrp |
HuaweiClient | invoke_shell, screen-length 0 temporary |
nokia-sros |
NokiaClient | invoke_shell, environment no more |
linux |
LinuxClient | exec_command, chave SSH |
mikrotik |
LinuxClient | exec_command, senha + PreferredAuthentications=password |
cd /Users/danielantonio/Developer/especial_op
# Rodar comando em qualquer device
python3 op.py run "show version" # usa primeiro device do yaml
python3 op.py --device XAVIER run "df -h"
python3 op.py --device 9K-TAMBORE-RTC run "show ip route"
# Aplicar configuração (Cisco)
python3 op.py --device 9K-TAMBORE-RTC config "CMD1" "CMD2"
devices:
- name: NOME
host: IP
port: 22
user: USUARIO
password: "SENHA" # para Cisco/TACACS+
type: cisco-ios-xe # ou: linux
Path: /Users/danielantonio/Developer/wg-cli
Propósito: Operações Wanguard (Andrisoft) — prefixos, clientes, BGP, flowspec
wg-cli/
├── config/
│ └── servers.yaml ← servidores Wanguard (DEADPOOL, COLOSSUS, XAVIER)
├── wgcli/ ← pacote interativo (menu rich/questionary)
├── wg.py ← CLI para Claude operar Wanguard sem terminal interativo
├── base_conhecimento/ ← runbooks e scripts de operação Wanguard
└── main.py ← CLI interativa com menu
cd /Users/danielantonio/Developer/wg-cli
python3 wg.py prefixes AS262909
python3 wg.py search 200.18.108.1
python3 wg.py anomalies AS268502 --status active
python3 wg.py bgp-list --status active
python3 wg.py --server COLOSSUS prefixes AS12345
Path: /Users/danielantonio/Developer/tools
Propósito: SSHClient com suporte a MySQL via SSH (usado pelo wg-cli)
from tools import SSHClient
with SSHClient(host="177.67.87.3", user="danielantonio") as ssh:
rows = ssh.mysql("SELECT * FROM ipaddr LIMIT 5")
stdout, stderr = ssh.run("uptime")
Nota: SSHClient usa chave SSH, sem suporte a senha. Para dispositivos com senha (Cisco TACACS+), usar
CiscoClientdo especial_op.