The heat.openstack.common.utils Module

System-level utilities and helper functions.

heat.openstack.common.utils.bool_from_string(subject)[source]

Interpret a string as a boolean.

Any string value in:

(‘True’, ‘true’, ‘On’, ‘on’, ‘Yes’, ‘yes’, ‘1’)

is interpreted as a boolean True.

Useful for JSON-decoded stuff and config file parsing

heat.openstack.common.utils.int_from_bool_as_string(subject)[source]

Interpret a string as a boolean and return either 1 or 0.

Any string value in:

(‘True’, ‘true’, ‘On’, ‘on’, ‘1’)

is interpreted as a boolean True.

Useful for JSON-decoded stuff and config file parsing

This Page