diff --git a/bgp_adjacencies/BGP_Neighbors_Established.py b/bgp_adjacencies/BGP_Neighbors_Established.py index cc9b3be..97e2052 100644 --- a/bgp_adjacencies/BGP_Neighbors_Established.py +++ b/bgp_adjacencies/BGP_Neighbors_Established.py @@ -12,10 +12,7 @@ # Genie Imports from genie.conf import Genie -from genie.abstract import Lookup -# import the genie libs -from genie.libs import ops # noqa # Get your logger for your script log = logging.getLogger(__name__) @@ -69,9 +66,7 @@ def learn_bgp(self): for dev in self.parent.parameters['dev']: log.info(banner("Gathering BGP Information from {}".format( dev.name))) - abstract = Lookup.from_device(dev) - bgp = abstract.ops.bgp.bgp.Bgp(dev) - bgp.learn() + bgp = dev.learn('bgp') self.all_bgp_sessions[dev.name] = bgp.info @ aetest.test diff --git a/crc_errors/CRC_Count_check.py b/crc_errors/CRC_Count_check.py index f457008..2778292 100644 --- a/crc_errors/CRC_Count_check.py +++ b/crc_errors/CRC_Count_check.py @@ -12,10 +12,7 @@ # Genie Imports from genie.conf import Genie -from genie.abstract import Lookup -# import the genie libs -from genie.libs import ops # noqa # Get your logger for your script log = logging.getLogger(__name__) @@ -69,9 +66,7 @@ def learn_interfaces(self): for dev in self.parent.parameters['dev']: log.info(banner("Gathering Interface Information from {}".format( dev.name))) - abstract = Lookup.from_device(dev) - intf = abstract.ops.interface.interface.Interface(dev) - intf.learn() + intf = dev.learn('interface') self.all_interfaces[dev.name] = intf.info # Second test section