Skip to main content

A Python package to get REST API Netscaler Information

Project description

Netscaler Module

Netscaler module for python 3.x

Requirements

Python 3+

Installation

$ pip install netscaler_module

Quickstart

Import the netscaler_module library to use the functions

from netscaler_module import NitroClass

....

Create a DATABASE variable and append the dicts response from nitro class. Below an example.

DATABASE = list()

if __name__ == '__main__':
    global DATABASE
    
    ns_pool = [
        {            
            'ip': '192.168.2.100',
            'hostname': 'ns1',
            'backup_name': 'ns1',
        },
        {            
            'ip': '192.168.2.101',
            'hostname': 'ns2',
            'backup_name': 'ns2',
        }
    ]
    password = {
        'username': 'nsroot',
        'password': 'XXXXXXX'
    }
    backup = {        
        'backup_folder': 'repo',
        'backup_level': 'full',
    }

    for ns_item in ns_pool:        
        kwargs = ns_item | password | backup
        ns = NitroClass(**kwargs)
        ns.login()

        if ns.master:
            data = ns.get_lbvservers_binding_partitions()
            DATABASE.extend(data)
        
        ns.create_backup()
        ns.download_backup()
        ns.delete_backup()
        ns.logout()
        
    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.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

netscaler_module-1.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file netscaler_module-1.2.tar.gz.

File metadata

  • Download URL: netscaler_module-1.2.tar.gz
  • Upload date:
  • Size: 6.3 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.2

File hashes

Hashes for netscaler_module-1.2.tar.gz
Algorithm Hash digest
SHA256 a58c9cf1a245db7ddd93e0d36ce230495aa5b43793384a2adcb3d56adb369754
MD5 db2869745743b87a7d267aa83540a540
BLAKE2b-256 8d8d9a653f7430a2b75817cf98bb673e5208f30a85e74adee42add2785ad7ed3

See more details on using hashes here.

File details

Details for the file netscaler_module-1.2-py3-none-any.whl.

File metadata

  • Download URL: netscaler_module-1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 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.2

File hashes

Hashes for netscaler_module-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2731a74a3f8024cba8db91cfd5f4662d8a4a42462907355639592822e34d0396
MD5 3d469cc767cc207702fd927f2fae09e6
BLAKE2b-256 5f25d9f2420f341a008333699356ae911c13accaffa3890fe7ef1e0f6b6048bb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page