Skip to content

Commit

Permalink
Add initial JunosIntfLine() method
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Nov 5, 2023
1 parent 716c47a commit c2f8136
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions ciscoconfparse/models_junos.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
from ciscoconfparse.ccp_abc import BaseCfgLine
from ciscoconfparse.ccp_util import IPv4Obj

from loguru import logger

##
##------------- Junos Configuration line object
##
Expand Down Expand Up @@ -550,6 +552,30 @@ def manual_delay(self):
)
return retval

##
##------------- IOS Interface Object
##


class JunosIntfLine(BaseJunosIntfLine):
# This method is on IOSIntfLine()
@logger.catch(reraise=True)
def __init__(self, *args, **kwargs):
r"""Accept a JunOS interface number and initialize family relationship
attributes
Warnings
--------
All :class:`~models_cisco.JunosIntfLine` methods are still considered beta-quality, until this notice is removed. The behavior of APIs on this object could change at any time.
"""
super().__init__(*args, **kwargs)
self.feature = "interface"

# This method is on IOSIntfLine()
@classmethod
@logger.catch(reraise=True)
def is_object_for(cls, all_lines, line, re=re):
return cls.is_object_for_interface(line)

##
##------------- Junos Interface Globals
Expand Down

0 comments on commit c2f8136

Please sign in to comment.