The gnocchiclient.utils
Module¶
- gnocchiclient.utils.add_query_argument(cmd, parser, *args, **kwargs)¶
- gnocchiclient.utils.build_pagination_options(details=False, history=False, limit=None, marker=None, sorts=None)¶
- gnocchiclient.utils.dict_from_parsed_args(parsed_args, attrs)¶
- gnocchiclient.utils.dict_to_querystring(objs)¶
- gnocchiclient.utils.dt_to_localtz(d)¶
- gnocchiclient.utils.format_archive_policy(ap)¶
- gnocchiclient.utils.format_dict_dict(value)¶
- gnocchiclient.utils.format_dict_list(li)¶
- gnocchiclient.utils.format_move_dict_to_root(obj, field)¶
- gnocchiclient.utils.format_resource_for_metric(metric)¶
- gnocchiclient.utils.format_resource_type(rt)¶
- gnocchiclient.utils.format_string_list(li)¶
- gnocchiclient.utils.get_client(obj)¶
- gnocchiclient.utils.get_pagination_options(parsed_args)¶
- gnocchiclient.utils.list2cols(cols, objs)¶
- gnocchiclient.utils.parse_date(s)¶
Parse date from string.
If no timezone is specified, default is assumed to be local time zone.
- Parameters:
s (str) – The date to parse.
- gnocchiclient.utils.str_to_bool(val)¶
Convert a string representation of truth to
True
orFalse
.True
values arey
,yes
,t
,true
,on
, and1
.False
values aren
,no
,f
,false
,off
, and0
.- Parameters:
val (str) – Value to convert to a boolean.
- Raises:
ValueError – If
val
is anything other than the allowed values.- Returns:
True
if the value is a truthy value, otherwiseFalse
.- Return type:
bool