def fmt_str(val):
    """Returns the peculiar formats of data expected by most of the Opsview
    API
    """
    if isinstance(val, bool):
        return '%d' % val
    elif isinstance(val, int):
        return '%d' % val
    elif isinstance(val, str):
        return val
    elif val:
        return '%s' % val
    return None
