Skip to content

Commit

Permalink
optional_args added to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hupebln committed Dec 15, 2021
1 parent 7e98ce9 commit c67a6ed
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,27 @@ rest-interface
rest-interface session-idle-timeout 120 #optional
```

### optional_args
optional_args can be set during initialization like this:
```Python
from napalm import get_network_driver

d = get_network_driver("arubaoss")

with d('1.2.3.4', 'username', 'password', optional_args={'ssl_verify': False, "debugging": True}) as aruba:
print(aruba.get_config())
```

The following values can be set in optional_args:
- ssl_verify: bool/str = defaults to **True** - will be passed to the requests object (description can be found [here](https://docs.python-requests.org/en/latest/_modules/requests/sessions/#Session.request))
- keepalive: bool = defaults to **False** - sets the underlying TCP connection to either keep the connection or not and is a workaround for an issue with ArubaOS devices
(discussed [here](https://community.arubanetworks.com/community-home/digestviewer/viewthread?MID=28798#bme4aa3703-e476-4880-9cb4-9b208f86b2f4))
- keep_alive: bool = same as keepalive, just shadows it to be able to use the same keyword as in older Python requests versions
- debugging: bool = defaults to **False** - sets the level of the logging handler to logging.DEBUG
- disable_ssl_warnings: bool = defaults to **False** - disables ssl warnings from urllib3
- api: string = defaults to **v6** - defines the API version
- ssl: bool = defaults to **True**, sets http or https

### Saltstack
To use the driver with Saltstack, you would typically need a proxy minion.

Expand Down

0 comments on commit c67a6ed

Please sign in to comment.