def get_role_push_host(role):
 pushs = PermPush.objects.filter(role=role)
 asset_all = Asset.objects.all()
 asset_pushed = {}
 for push in pushs:
  asset_pushed[push.asset] = {'success': push.success, 'key': push.is_public_key, 'password': push.is_password, 'result': push.result}
 asset_no_push = (set(asset_all) - set(asset_pushed.keys()))
 return (asset_pushed, asset_no_push)

def get_role_push_host ( role ) : pushs = PermPush . objects . filter ( role = role ) asset_all = Asset . objects . all ( ) asset_pushed = { } for push in pushs : asset_pushed [ push . asset ] = { 'success' : push . success , 'key' : push . is_public_key , 'password' : push . is_password , 'result' : push . result } asset_no_push = ( set ( asset_all ) - set ( asset_pushed . keys ( ) ) ) return ( asset_pushed , asset_no_push )
asset_pushed: {success: push .