"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "qinling/utils/common.py" between
qinling-2.0.0.tar.gz and qinling-3.0.0.tar.gz

About: OpenStack Qinling is Function as a Service for OpenStack.
The "Train" series (latest release).

common.py  (qinling-2.0.0):common.py  (qinling-3.0.0)
skipping to change at line 84 skipping to change at line 84
def convert_dict_to_string(d): def convert_dict_to_string(d):
temp_list = ['%s=%s' % (k, v) for k, v in d.items()] temp_list = ['%s=%s' % (k, v) for k, v in d.items()]
return ','.join(temp_list) return ','.join(temp_list)
def datetime_to_str(dct, attr_name): def datetime_to_str(dct, attr_name):
"""Convert datetime object in dict to string.""" """Convert datetime object in dict to string."""
if (dct.get(attr_name) is not None and if (dct.get(attr_name) is not None and
not isinstance(dct.get(attr_name), six.string_types)): not isinstance(dct.get(attr_name), six.string_types)):
dct[attr_name] = dct[attr_name].isoformat(' ') dct[attr_name] = dct[attr_name].strftime('%Y-%m-%dT%H:%M:%SZ')
def generate_unicode_uuid(dashed=True): def generate_unicode_uuid(dashed=True):
return uuidutils.generate_uuid(dashed=dashed) return uuidutils.generate_uuid(dashed=dashed)
def validate_int_in_range(name, value, min_allowed, max_allowed): def validate_int_in_range(name, value, min_allowed, max_allowed):
unit_mapping = { unit_mapping = {
"cpu": "millicpu", "cpu": "millicpu",
"memory": "bytes", "memory": "bytes",
"timeout": "seconds" "timeout": "seconds"
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)