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
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
microversion_parse-0.1.3.tar.gz
(13.3 kB
view details)
Built Distribution
File details
Details for the file microversion_parse-0.1.3.tar.gz
.
File metadata
- Download URL: microversion_parse-0.1.3.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 601859f22504fb9ca941bd5cad773ad8354d63561d316c41096d9c4c7f0dba79 |
|
MD5 | 9a519878d0fe29da4b1bce41c5eabb24 |
|
BLAKE2b-256 | 1a11ee8024e8bd33ae3f7947453ae941f839cdf54d3442286f214046741a59d4 |
File details
Details for the file microversion_parse-0.1.3-py2-none-any.whl
.
File metadata
- Download URL: microversion_parse-0.1.3-py2-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08b383070931cfbaa12322569645d38837a213f7d8c2c6df4242228e6bf8eff6 |
|
MD5 | 3a79f65fa670801c2d0715451899c213 |
|
BLAKE2b-256 | efa666e0206b1e9c7356faafc12870e7280c248905524f2fba8c540fcb23048a |