def uuid_to_hex(uid): """Make 8-4-4-4-12 uuid into plain hex for the QAPI """ return unicode_type(UUID(ensure_unicode(uid, name='uid')).hex)
def hex_to_uuid(hstr): """Make a 32 ascii char hex into a 8-4-4-4-12 uuid """ return unicode_type(UUID(ensure_unicode(hstr, name='hstr')))