Skip to content

Commit

Permalink
Modify Cisco IOS README section
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Oct 25, 2023
1 parent 856683a commit 749ed29
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ CiscoConfParse has a special feature that abstracts common IOS / NXOS / ASA / IO
```python
from ciscoconfparse import CiscoConfParse

parse = CiscoConfParse('tests/fixtures/configs/sample_08.ios', syntax='ios', factory=True)

##############################################################################
# Parse an example Cisco IOS HSRP configuration from:
# tests/fixtures/configs/sample_08.ios
Expand All @@ -97,13 +95,14 @@ parse = CiscoConfParse('tests/fixtures/configs/sample_08.ios', syntax='ios', fac
# !
#
##############################################################################
parse = CiscoConfParse('tests/fixtures/configs/sample_08.ios', syntax='ios', factory=True)
for ccp_obj in parse.find_objects('^interface'):

# Skip if there are no HSRPInterfaceGroup() instances...
if len(ccp_obj.hsrp_interfaces) == 0:
continue

# Interface name, such as 'Serial1/0'
# Interface name, such as 'FastEthernet0/0'
intf_name = ccp_obj.name

# Interface description
Expand Down

0 comments on commit 749ed29

Please sign in to comment.