Skip to main content

Ingate Python SDK

Project description

Ingate Python SDK

Overview

The Ingate Python SDK provides an interface to configure and manage your Ingate appliances (including upgrades, licenses and patches) via HTTP requests.

Examples

Change the unit name

Change the name of the unit to Testapi. Create a Client instance. Request a security token. Call the method modify_single_row in order to change the name and print the result. Store the change to the permanent configuration.

import sys

from ingate import ingatesdk

scheme = 'http'
user = 'alice'
password = 'foobar'
address = '192.168.1.1'
port = ''

try:
    # Create API client.
    api_client = ingatesdk.Client('v1', scheme, address, user, password,
                                  port=port)

    # Authenticate and get hold of a security token.
    response = api_client.authenticate()

    # Change the unit name.
    unitname = 'Testapi'
    response = api_client.modify_single_row('misc.unitname', unitname=unitname)
    print('Changed the unit name to %s' % (response[0]['data']['unitname']))
    print('')

    # Store the preliminary configuration to the permanent configuration.
    response = api_client.store_edit()
    print(response[0]['store-edit']['msg'])
    print('')

except Exception as e:
    sys.stderr.write('\n%s: %s\n' % (type(e).__name__, str(e)))

Apply a base license and upgrade to latest firmware version

import sys

from ingate import ingatesdk

scheme = 'http'
user = 'alice'
password = 'foobar'
address = '192.168.1.1'
port = ''

try:
    # Create API client.
    api_client = ingatesdk.Client('v1', scheme, address, user, password,
                                  port=port)

    # Authenticate and get hold of a security token.
    response = api_client.authenticate()

    # Install a license.
    response = api_client.install_license('myaccount', 'mypassword',
                                          'JJV8-9JVT-BV36')

    # Store the edit configuration. The 'download_install_upgrade' function
    # expects that the configuration has been stored at least once.
    api_client.store_edit()

    # Upgrade to the latest version available.
    response = api_client.download_install_upgrade('myaccount', 'mypassword',
                                                   latest=True)

except Exception as e:
    sys.stderr.write('\n%s: %s\n' % (type(e).__name__, str(e)))

Additional information

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

ingatesdk-1.0.14.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ingatesdk-1.0.14-py2.py3-none-any.whl (15.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ingatesdk-1.0.14.tar.gz.

File metadata

  • Download URL: ingatesdk-1.0.14.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/2.7.5

File hashes

Hashes for ingatesdk-1.0.14.tar.gz
Algorithm Hash digest
SHA256 af23a6c6756cae9e95fb3b8cda4d7b225a9c515c51442d8b7b700052969e74b2
MD5 1458380a8333c00e34853729153f99a4
BLAKE2b-256 2fcb000d73e14e44bfc6ad2d0457a0a437e19e0ad7e90ea1e70680eb94b8f908

See more details on using hashes here.

File details

Details for the file ingatesdk-1.0.14-py2.py3-none-any.whl.

File metadata

  • Download URL: ingatesdk-1.0.14-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.27.0 CPython/2.7.5

File hashes

Hashes for ingatesdk-1.0.14-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e31e4f062d1c55d8537d530c406a2b81b01cf1172859491b2fc8e92e83a7bfe6
MD5 99b0c07b4cabc5f3d7b7596ddb2e28be
BLAKE2b-256 9bc32e0e3f5fb59a42b9b96b79a01e86366868b7927fb7206cac555c026b1341

See more details on using hashes here.

Supported by

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