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
Release history Release notifications | RSS feed
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.5.tar.gz
(9.4 kB
view hashes)
Built Distribution
Close
Hashes for ingatesdk-1.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c754380f1c72bd6e99df0ef980eba52a320c7376803327e70e7b91e3500ebd53 |
|
MD5 | 4a899b473b62df1213d28b47a9f6b739 |
|
BLAKE2b-256 | c5049f8c45a2f56d95db9429cd640d138823f7d23f9ec0e4bd69eefd67f25bcf |