Skip to main content

OpenStack microversion heaader parser

Project description

A simple parser for OpenStack microversion headers:

import microversion_parse

# headers is a dict of headers with folded (comma-separated
# values) or a list of header, value tuples
version = microversion_parse.get_version(
    headers, service_type='compute',
    legacy_headers=['x-openstack-nova-api-version'])

It processes microversion headers with the standard form:

OpenStack-API-Version: compute 2.1

If provided with a legacy_headers argument, this is treated as a list of headers to check for microversions. Some examples of headers include:

OpenStack-telemetry-api-version: 2.1
OpenStack-nova-api-version: 2.1
X-OpenStack-nova-api-version: 2.1

If a version string cannot be found, None will be returned. If the input is incorrect usual Python exceptions (ValueError, TypeError) are allowed to raise to the caller.

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

microversion_parse-0.1.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

microversion_parse-0.1.1-py2-none-any.whl (6.4 kB view details)

Uploaded Python 2

File details

Details for the file microversion_parse-0.1.1.tar.gz.

File metadata

File hashes

Hashes for microversion_parse-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2c44b7b52863cb722d2b862071712abcc6429e0e85aba688fc5bd8ccd7518448
MD5 ded53265cb01a55140883bc31a5e0399
BLAKE2b-256 9806291bf8ea25385958dfcad60827b6a7e7ac5f701bba79ae12844291c0ae8f

See more details on using hashes here.

File details

Details for the file microversion_parse-0.1.1-py2-none-any.whl.

File metadata

File hashes

Hashes for microversion_parse-0.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 0ec601ae5ea7c32ad989bb045e41e5e7bc95a712f8710d520546b785d3b91108
MD5 4d5b9032302eb3766fff399a4cdc0b90
BLAKE2b-256 e26880327b632a1b16ca299fbd0f84699a6e0b8d473f1322b312a35fc7753ae9

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