The rsd_lib.utils Module¶
-
rsd_lib.utils.camelcase_to_underscore_joined(camelcase_str)¶ Convert camelCase string to underscore_joined string
Parameters: camelcase_str – The camelCase string Returns: the equivalent underscore_joined string
-
rsd_lib.utils.get_resource_identity(resource)¶
-
rsd_lib.utils.get_sub_resource_path_list_by(resource, subresource_name)¶ Helper function to find a list of subresource path
Parameters: - resource – ResourceBase instance on which the name gets queried upon.
- subresource_name – name of the resource field contains a list of dict to fetch the ‘@odata.id’ from.
-
rsd_lib.utils.num_or_none(x)¶ Given a value x it cast as int, float or None
Parameters: x – The value to transform and return Returns: Either None or x cast to an int/float