Merge pull request #78 from napalm-automation-community/force_no_enable

Force no enable
This commit is contained in:
Petr Klíma authored and GitHub committed 2021-03-08 14:33:06 +01:00
commit fac504f68a
2 files changed
+5 -1

No files matched your search

+2
View File
@@ -23,6 +23,8 @@ pip3 install napalm_s350
Default information (the same as `call get_facts`)
```bash
napalm --user USER --password PASSWORD --vendor s350 HOSTNAME
napalm --user USER --password PASSWORD --vendor s350 HOSTNAME --optional_args "force_no_enable=True"
```
Get interfaces
+3 -1
View File
@@ -89,6 +89,7 @@ class S350Driver(NetworkDriver):
self.port = optional_args.get('port', 22)
self.device = None
self.force_no_enable = optional_args.get("force_no_enable", False)
def open(self):
"""Open a connection to the device."""
@@ -97,7 +98,8 @@ class S350Driver(NetworkDriver):
username=self.username,
password=self.password,
**self.netmiko_optional_args)
self.device.enable()
if not self.force_no_enable:
self.device.enable()
def _discover_file_system(self):
try: