Contains some commonly used utility methods.
Bases: object
Bases: cinder.exception.VolumeBackendAPIException
Custom exception class used to report logical errors.
Method to format error message.
Parameters: |
|
---|
Formats JSON object to make it readable by proper indentation.
Parameters: | obj – JSON object |
---|---|
Returns: | a string of formatted JSON object |
Returns a list of values from child_node_name.
If child_node is not given, then it will retrieve list from parent node
Returns value of given child_node.
If child_node is not given, then value of parent node is returned returns None: If json_object or parent_node is not given,
If child_node is not found under parent_node
Returns the parent and child elements from XPath.
Returns the single task details.
Checks whether the name is a URI or not.
Parameters: | name – Name of the resource |
---|---|
Returns: | True if name is URI, False otherwise |
Used to decode the JSON encoded response.
Fetches the list of resources with a given tag.
Parameters: |
|
---|
Used to make an HTTP request and get the response.
The message body is encoded in JSON format
Parameters: |
|
---|---|
Returns: | a tuple of two elements: (response body, response headers) |
Raises: | CoprHdError in case of HTTP errors with err_code 3 |
Converts a size to bytes.
Parameters: | in_str – a number suffixed with a unit: {number}{unit} units supported: K, KB, k or kb - kilobytes M, MB, m or mb - megabytes G, GB, g or gb - gigabytes T, TB, t or tb - terabytes |
---|---|
Returns: | number of bytes None; if input is incorrect |