roll up of fixes in junos action plugin (#21624)

* calls open_shell() or open_session() depending on connection type
* closes shell after module completion
* adds open_session() to netconf
This commit is contained in:
Peter Sprygada 2017-02-18 17:20:03 -05:00 committed by GitHub
parent c68d81fe4f
commit 2f10bdf0c7
2 changed files with 20 additions and 11 deletions

View file

@ -101,6 +101,9 @@ class Connection(ConnectionBase):
def exec_command(self, request):
"""Sends the request to the node and returns the reply
"""
if request == 'open_session()':
return (0, 'ok', '')
req = to_ele(request)
if req is None:
return (1, '', 'unable to parse request')