def relation_for_unit(unit=None, rid=None):
    """Get the json represenation of a unit's relation"""
    unit = unit or remote_unit()
    relation = relation_get(unit=unit, rid=rid)
    for key in relation:
        if key.endswith('-list'):
            relation[key] = relation[key].split()
    relation['__unit__'] = unit
    return relation
def relation_for_unit ( unit = None , rid = None ) : unit = unit or remote_unit ( ) relation = relation_get ( unit = unit , rid = rid ) for key in relation : if key . endswith ( '-list' ) : relation [ key ] = relation [ key ] . split ( ) relation [ '__unit__' ] = unit return relation
Get the json represenation of a unit's relation