Skip to content

Commit

Permalink
add cli()
Browse files Browse the repository at this point in the history
You could really shoot yourself in the foot with this.
  • Loading branch information
yeled committed Dec 5, 2019
1 parent 362e7ed commit ed6881a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ Editing the XML or diffing the XML is not supported, this may limit the amount o
* rollback
* load_merge_candidate
* get_users
* cli


### Missing APIs.

* cli
* compliance_report
* connection_tests
* get_bgp_config
Expand Down
7 changes: 7 additions & 0 deletions napalm_opengear/opengear.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ def _send_command(self, command):
except (socket.error, EOFError) as e:
raise ConnectionException(str(e))

def cli(self, cmd):
"""send some commands via sudo."""
output = self._send_command('sudo {0}'.format(cmd.strip()))

return output


def open(self):
"""Open a connection to the device."""
self.device = self._netmiko_open(
Expand Down

0 comments on commit ed6881a

Please sign in to comment.