Skip to main content

ID -> Name translator for the CloudGenix Python SDK

Project description

ID -> Name Translator for CloudGenix

ID -> Name translator for the CloudGenix Python SDK

Synopsis

CloudGenix's API uses unique ID values for all objects.

This quick module utilizes the CloudGenix Python SDK to create a dictionary object containing most common object lists, referenced by ID.

Once this object is created (ex: idname_dict), this allows for quick lookup of names where IDs are present:

idname_dict = cloudgenix_idname.generate_id_name_map(cgx_sess)

vpn_link_id = '15136303805980148'
print ('My VPN link is "{}".'.format(idname_dict.get(vpn_link_id, vpn_link_id)))
My VPN link is "SJC Branch ('AT&T' via 'Circuit to AT&T') <-> ('ATT2' via 'Circuit to ATT2') Charlotte DC".

Requirements

Code Example

Comes with test.py that creates an ID -> Name map and dumps to console.

License

MIT

Version

Version Changes
1.2.3 Fixed minor return issue
1.2.2 Add support for Spoke Clusters
1.2.1 Add support for SDK >= 5.1.1b1
1.2.0 Add reverse lookup support (name -> ID) to all functions. Reverse lookup has limitations as names are not unique.
1.1.3 Resolve Issue #6, enhance Site WAN Interface mapping, add shortcut to generate_id_name_map.
1.1.2 Fix minor return issue.
1.1.1 Fix issue with tenant_viewonly not being able to read operators.
1.1.0 Fix various bugs, issue #1, and Python 3 support
1.0.0 Initial Release.

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

cloudgenix_idname-1.2.3.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file cloudgenix_idname-1.2.3.tar.gz.

File metadata

  • Download URL: cloudgenix_idname-1.2.3.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.23.3 CPython/2.7.16

File hashes

Hashes for cloudgenix_idname-1.2.3.tar.gz
Algorithm Hash digest
SHA256 d45c00b6ef1819ab879ed18b22d9367d6087dedd1d181adaca2137ee3728d8b0
MD5 aa28872461ee4d98a25a97c70b58d094
BLAKE2b-256 a650e9d0139e8b4f67cc4c8968b8e513e8101dd63b660bccbdb7f47e141e8445

See more details on using hashes here.

Supported by

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