def remove_vifs(vmuuid):
    for vifuuid in xenhelpers.xe_param('vm-vif-list', 'uuid', vm=vmuuid):
        run('xe vif-unplug uuid=%s' % vifuuid)
        run('xe vif-destroy uuid=%s' % vifuuid)
def test_vifs_exist(vmuuid, vmname):
    vifs = xenhelpers.xe_param('vm-vif-list', 'uuid', vm=vmuuid)
    if not vifs:
        abort('No VIFs found on "%s" (%s). How did you SSH into it then?' % (vmname, vmuuid))