Optional enable (force_no_enable)
can work (partialy) on devices you do not have full enable access (priv 15) #73
This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -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
@@ -79,6 +79,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."""
|
||||
@@ -87,7 +88,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:
|
||||
|
||||
Reference in new issue
Block a user