Helper utilities related to the AWS API implementations
Extract a list-of-dicts based on parameters containing AWS style list
MetricData.member.1.MetricName=buffers MetricData.member.1.Unit=Bytes MetricData.member.1.Value=231434333 MetricData.member.2.MetricName=buffers2 MetricData.member.2.Unit=Bytes MetricData.member.2.Value=12345
This can be extracted by passing prefix=MetricData, resulting in a list containing two dicts
Extract a dictionary of user input parameters, from AWS style parameter-pair encoded list
In the AWS API list items appear as two key-value pairs (passed as query parameters) with keys of the form below:
Prefix.member.1.keyname=somekey Prefix.member.1.keyvalue=somevalue Prefix.member.2.keyname=anotherkey Prefix.member.2.keyvalue=somevalue
We reformat this into a dict here to match the heat engine API expected format
Format response from engine into API format
Helper function, looks up an expected parameter in a parsed params dict and returns the result. If params does not contain the requested key we raise an exception of the appropriate type
Utility function for mapping one dict format to another