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
def get_secrets(requests_mock, case, plugin, pagination, **kwargs): | |
if not pagination: | |
with open(f"{BASE_PATH}/{case}/mocked/secrets.json", "r") as f: | |
requests_mock.get( | |
"http://localhost:8080/api/secrets/secrets/?limit=0", | |
json=json.load(f), | |
headers={"Content-type": "application/json"}, | |
) | |
else: | |
for offset in range(3): |
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
The full traceback is: | |
Traceback (most recent call last): | |
File "/home/ccurtis/.ansible/tmp/ansible-tmp-1578728906.0116885-41951605142416/AnsiballZ_aci_config_rollback.py", line 102, in <module> | |
_ansiballz_main() | |
└ <function _ansiballz_main at 0x7fb671c6b500> | |
File "/home/ccurtis/.ansible/tmp/ansible-tmp-1578728906.0116885-41951605142416/AnsiballZ_aci_config_rollback.py", line 94, in _ansiballz_main | |
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) | |
│ │ │ └ '{"ANSIBLE_MODULE_ARGS": {"host": "10.8.208.11", "username": "xxxxx", "password": "xxxxx", "validate_certs"... | |
│ │ └ '/tmp/ansible_aci_config_rollback_payload_y6sKlk' | |
│ └ '/tmp/ansible_aci_config_rollback_payload_y6sKlk/ansible_aci_config_rollback_payload.zip' |
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/env python | |
from ttp import ttp | |
data_to_parse = """ | |
*Virtual Server : LO_PARTNET-AL8.COM-NGINX-EXT 68.58.239.12 All Up | |
+port 80 tcp ====>LO_PARTNET-AL8.COM-NGINX_HTTP State :All Up | |
+LO_PARTNET-AL8.COM-NGINX:80 10.44.16.220 State : Up | |
+port 443 tcp ====>LO_PARTNET-AL8.COM-NGINX_HTTPS State :All Up |
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/env python | |
from ttp import ttp | |
import json | |
from pprint import pprint | |
from pycatj.pycatj.pycatj import process_dict, process_list | |
import io | |
def pycatj_print(data, object_name): |
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/env python | |
from ttp import ttp | |
data_to_parse = """ | |
object-group network BRAZIL_VIPS | |
network-object host 1.2.2.2 | |
network-object host 2.2.2.2 | |
network-object host 3.3.3.3 | |
object-group network GERMANY_VIP |
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/env python3 | |
from napalm import get_network_driver | |
from getpass import getpass | |
from netmiko import NetMikoAuthenticationException | |
from napalm.base.exceptions import ConnectionException | |
from pprint import pprint | |
username = input('username: ') |
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/env python3 | |
from pyats.datastructures import AttrDict | |
from genie import parsergen | |
from genie.conf.base import Device, Testbed | |
from pprint import pprint | |
nos = "ios" |
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/env python | |
import requests | |
import time | |
import sys | |
from datetime import datetime, timedelta | |
from twilio.rest import Client | |
# Idea and details located here. I just added SMS capability |
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
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> | |
<interfaces xmlns="http://openconfig.net/yang/interfaces"> | |
<interface> | |
<name>Loopback100</name> | |
<config> | |
<name>Loopback100</name> | |
<type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">idx:softwareLoopback</type> | |
<enabled>true</enabled> | |
<description>***REPLACE LOOPBACK 100****</description> | |
</config> |
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
<interfaces xmlns="http://openconfig.net/yang/interfaces"> | |
<interface> | |
<name>Loopback100</name> | |
<config> | |
<name>Loopback100</name> | |
<type xmlns:idx="urn:ietf:params:xml:ns:yang:iana-if-type">idx:softwareLoopback</type> | |
<enabled>true</enabled> | |
<description>***REPLACE LOOPBACK 100****</description> | |
</config> | |
</interface> |
NewerOlder