Promote get_prompt to live in network_cli instead of cliconf (#33880)
This removes the immediate need for a cliconf plugin to use network_cli
This commit is contained in:
parent
5578193ae4
commit
67a8ff47aa
2 changed files with 4 additions and 4 deletions
|
@ -106,10 +106,6 @@ class CliconfBase(with_metaclass(ABCMeta, object)):
|
|||
signal.alarm(0)
|
||||
return resp
|
||||
|
||||
def get_prompt(self):
|
||||
"""Returns the current prompt from the device"""
|
||||
return self._connection._matched_prompt
|
||||
|
||||
def get_base_rpc(self):
|
||||
"""Returns list of base rpc method supported by remote device"""
|
||||
return ['get_config', 'edit_config', 'get_capabilities', 'get']
|
||||
|
|
|
@ -106,6 +106,10 @@ class Connection(ConnectionBase):
|
|||
raise AttributeError("'%s' object has no attribute '%s'" % (self.__class__.__name__, name))
|
||||
return getattr(self._cliconf, name)
|
||||
|
||||
def get_prompt(self):
|
||||
"""Returns the current prompt from the device"""
|
||||
return self._matched_prompt
|
||||
|
||||
def exec_command(self, cmd, in_data=None, sudoable=True):
|
||||
# this try..except block is just to handle the transition to supporting
|
||||
# network_cli as a toplevel connection. Once connection=local is gone,
|
||||
|
|
Loading…
Reference in a new issue