I hereby claim:
- I am jathanism on github.
- I am jathanism (https://keybase.io/jathanism) on keybase.
- I have a public key whose fingerprint is 9B1E C9E6 D0B1 B49F 64C2 F97A A539 DE2F 6716 94A8
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| trigger_logging.py - Test log levels w/ Twisted logger. | |
| """ | |
| import os | |
| import logging | |
| import sys |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env python | |
| """ | |
| scp.py - SCP implementation using Twisted. | |
| This currently only uploads files to the remote host. Receiving files and | |
| uploading directories is NYI. | |
| Credit: http://bit.ly/1EG3eL4 |
| # -*- coding: utf-8 -*- | |
| """ | |
| Loader for Trigger NetDevices using NSoT API. | |
| Right now this loads ALL devices ALL the time, which scales very poorly with | |
| the number of devices and attributes in NSoT. | |
| Note that ``NETDEVICES_SOURCE`` is ignored because the settings from your | |
| ``~/.pynsotrc``. |
| from trigger.netdevices import NetDevices | |
| import StringIO | |
| nd = NetDevices() | |
| dev = nd.find('ubuntu.local') | |
| logger = StringIO.StringIO() | |
| dev.connect(output_logger=logger) | |
| # Interactive stdio over the pty session. | |
| """ |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Copyright (c) Twisted Matrix Laboratories. | |
| # See LICENSE for details. | |
| import base64, os, fcntl, tty, struct | |
| from twisted.enterprise import adbapi |
| from trigger.cmds import Commando | |
| devices = ['device1', 'device2'] | |
| commands = ['show mac address-table'] | |
| c = Commando(devices=devices, commands=commands) | |
| c.run() | |
| # When it's done | |
| print c.results |
| import copy | |
| from pynsot.client import get_api_client() | |
| api = get_api_client() | |
| site = api.sites(api.default_site) | |
| objects = site.networks.get(network_address='192.168.0.0')['data']['networks'] | |
| to_update = copy.deepcopy(objects) | |
| [t['attributes'] = {} for t in to_update] # Strip the attributes |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from __future__ import unicode_literals | |
| """ | |
| reachable.py - Run reachability tests on Devices. | |
| The following tests are run: | |
| - DNS ok |