A Python package to get REST API Netscaler Information
Project description
Netscaler Module
Simple parallel processing interface for python
Requirements
Python 3+
Installation
$ pip install netscaler_module
Quickstart
Use the threaded
decorator to turn a method into a threaded method.
from netscaler_module import nitro
....
Create a DATABASE
variable and append the dicts response from nitro class.
Below an example.
def get_ns(**kwargs):
global DATABASE
ns = NitroClass(**kwargs)
ns.login()
if ns.master:
data = ns.get_lbvservers_binding_partitions()
DATABASE.extend(data)
else:
print('NS: {}, is not master'.format(ns.ip))
ns.logout()
return None
DATABASE = list()
if __name__ == '__main__':
ns_pool = [
'192.168.1.1',
'192.168.1.2',
]
password = {
'username': 'nsroot',
'password': 'XXXXXXX'
}
for ns_ip in ns_pool:
temp = {'ip': ns_ip} | password
get_ns(**temp)
print(DATABASE)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
netscaler_module-1.1.tar.gz
(4.5 kB
view details)
Built Distribution
File details
Details for the file netscaler_module-1.1.tar.gz
.
File metadata
- Download URL: netscaler_module-1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b4a1b9dd9995318c06875899c2d2e68d08176a4af436eacb769b446102e31a7 |
|
MD5 | b6435f08490ba28d1b11d143fb7499c6 |
|
BLAKE2b-256 | 3b75cc35f7cd4d51f6c8844fc2ac3e41052a03daee40b54df8940325c8e1b725 |
File details
Details for the file netscaler_module-1.1-py3-none-any.whl
.
File metadata
- Download URL: netscaler_module-1.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e20d905b03836cf6c93ba460372d1839236d033b2b2fd4c19d4a4f9811396bb2 |
|
MD5 | 3a3989b5c424f2f537c753b5ae89fa8d |
|
BLAKE2b-256 | c936b4bb89114606f79f857ef1f5363c8cf3f35ca4d17555ae41eac3eacf6c3f |