Merge branch 'cli' into develop
This commit is contained in:
commit
66c79822af
1 file changed
+10
@@ -111,6 +111,16 @@ class S350Driver(NetworkDriver):
|
|||||||
"""Close the connection to the device."""
|
"""Close the connection to the device."""
|
||||||
self.device.disconnect()
|
self.device.disconnect()
|
||||||
|
|
||||||
|
def cli(self, commands):
|
||||||
|
output = {}
|
||||||
|
try:
|
||||||
|
for cmd in commands:
|
||||||
|
output[cmd] = self.device.send_command(cmd)
|
||||||
|
|
||||||
|
return output
|
||||||
|
except (socket.error, EOFError) as e:
|
||||||
|
raise ConnectionClosedException(str(e))
|
||||||
|
|
||||||
def _send_command(self, command):
|
def _send_command(self, command):
|
||||||
"""Wrapper for self.device.send.command().
|
"""Wrapper for self.device.send.command().
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user