

def reset_alarm(**kwargs):
    "\n    Resets an alarm on a given HostSystem in a vCenter to the green state\n    without someone having to log in to do it manually.\n\n    This is done by using an unexposed API call. This requires us\n    to manually construct the SOAP envelope. We use the session key\n    that pyvmomi provides during its connection.\n\n    More information can be found about this process\n    in this article written by William Lam:\n    http://www.virtuallyghetto.com/2010/10/how-to-ack-reset-vcenter-alarm.html\n\n    I adopted his process from perl to groovy:\n    https://gist.github.com/michaelrice/d54a237295e017b032a5\n    and from groovy now to python.\n\n    Usage:\n    SI = SmartConnect(xxx)\n    HOST = SI.content.searchIndex.FindByxxx(xxx)\n    alarm.reset_alarm(entity_moref=HOST._moId, entity_type='HostSystem',\n                      alarm_moref='alarm-1', service_instance=SI)\n    :param service_instance:\n    :param entity_moref:\n    :param alarm:\n    :return boolean:\n    "
    service_instance = kwargs.get('service_instance')
    payload = _build_payload(**kwargs)
    logging.debug(payload)
    session = service_instance._stub
    if (not _send_request(payload, payload)):
        return False
    return True

dataset/ETHPy150Open vmware/pyvmomi-community-samples/samples/tools/alarm.py reset_alarm/VarMisuse@50/448 `session`->`payload`