

def get(self, name):
    "Returns a generic interface as a set of key/value pairs\n\n        This class is should normally serve as a  base class for building more\n        specific interface resources.  The attributes of this resource are\n        common to all interfaces regardless of type in EOS.\n\n        The generic interface resource returns the following:\n\n            * name (str): The name of the interface\n            * type (str): Always returns 'generic'\n            * shutdown (bool): True if the interface is shutdown\n            * description (str): The interface description value\n\n        Args:\n            name (str): The interface identifier to retrieve from the\n                running-configuration\n\n        Returns:\n            A Python dictionary object of key/value pairs that represents\n                the interface configuration.  If the specified interface\n                does not exist, then None is returned\n        "
    config = self.get_block(('^interface %s' % name))
    if (not config):
        return None
    resource = dict(name=name, type='generic')
    resource.update(self._parse_shutdown(config))
    resource.update(self._parse_description(config))
    return resource

dataset/ETHPy150Open arista-eosplus/pyeapi/pyeapi/api/interfaces.py BaseInterface.get/original