Skip to main content

psconfig/PWA configuration parser

Project description

psconfig-client is a python library to parse perfSONAR psconfig/PWA mesh configuration files

Synopsis:
import psconfig.api
import logging
import sys

log = logging.getLogger()

if __name__ == '__main__':
    log.setLevel(logging.DEBUG)
    formatter = logging.Formatter(fmt='%(message)s')
    fh = logging.StreamHandler(stream=sys.stdout)
    fh.setFormatter(formatter)
    log.addHandler(fh)

    # url supports host auto-url, particular mesh or top level mesh directory
    # for https you can pass hostcert/key and verify flag, which are all passed to the requests library call
    x = psconfig.api.PSC('url', hostcert=None, hostkey=None, verify=False)
    # get all hosts from all groups
    print(x.get_all_hosts())
    # get all hosts from the group X
    print(x.get_hosts_by_group('X'))
    # get all hosts from the groups X, Y, Z
    print(x.get_hosts_by_group('X', 'Y', 'Z'))
    # get all hosts from all groups except A
    print(x.get_hosts_by_group(exclude='A'))

    # get test types (trace, throughput, latency, etc.) per host
    for h in x.get_hosts_by_group():
        print(h, x.get_test_types(h))

    # get site name of a host
    print(x.get_site('<hostname>')

    # get all hosts from the mesh configs X, Y, Z and not Q
    print(x.get_hosts_by_config('X', 'Y', 'Z', exclude='Q'))

    # get full map of mesh -> hosts
    print(x.get_config_host_map())

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

psconfig-client-0.1.7.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

psconfig_client-0.1.7-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file psconfig-client-0.1.7.tar.gz.

File metadata

  • Download URL: psconfig-client-0.1.7.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

File hashes

Hashes for psconfig-client-0.1.7.tar.gz
Algorithm Hash digest
SHA256 fb8e25a5ff17fedc4a3963da477951ed80b69b4a759a1b0ddc3e14c098cc38ab
MD5 6cd5c1f4a9eafe84539179eae0bb5586
BLAKE2b-256 9a5b6819da33edcbab8f72ebc7387ff227049f69ffed4945d6d750ab691933f8

See more details on using hashes here.

File details

Details for the file psconfig_client-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: psconfig_client-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

File hashes

Hashes for psconfig_client-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 ac6957e8ad8402a61d6e9c685f89b16025042b02b711882b49d755364dbf6020
MD5 51eb1c8f53afdb6bae4f802ea3a19d72
BLAKE2b-256 54e5925851bb255ace2a7fa528d446ce3db033c2d8eeac216e53fabae64031c3

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