Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modified BGP and CRC - remove abstract #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions bgp_adjacencies/BGP_Neighbors_Established.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions crc_errors/CRC_Count_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down Expand Up @@ -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
Expand Down