Skip to content

Instantly share code, notes, and snippets.

View mathershifter's full-sized avatar

Jesse Mather mathershifter

View GitHub Profile
#!/usr/bin/env python
import collections
class ResolvingDict(collections.MutableMapping):
"""Find a key in current or parent node"""
def __init__(self, mapping, parent=None):
self.store = dict()
self.update(mapping)
self.parent = parent
@mathershifter
mathershifter / eos_ssh.py
Last active August 29, 2015 14:06
A simple SSH module with predefined prompts for Arists EOS CLI and bash modes
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 Arista Networks, Inc. All rights reserved.
# Arista Networks, Inc. Confidential and Proprietary.
r"""
Simple SSH client library or utility if run directly.
-----------------------------------------------------
**Examples:**