(operator_client, hostnames, start, duration)
return drain_output
Schedules a maintenance window for the specified hosts and marks them as draining.
    :param hostnames: a list of hostnames
    :param start: the time to start the maintenance, represented as number of nanoseconds since the epoch
    :param duration: length of the maintenance window, represented as number of nanoseconds since the epoch
    :returns: None
Schedules a maintenance window for the specified hosts and marks them as draining.
    :param hostnames: a list of hostnames
    :param start: the time to start the maintenance, represented as number of nanoseconds since the epoch
    :param duration: length of the maintenance window, represented as number of nanoseconds since the epoch
    :returns: None
Schedules a maintenance window for the specified hosts and marks them as draining . : param hostnames : a list of hostnames : param start : the time to start the maintenance represented as number of nanoseconds since the epoch : param duration : length of the maintenance window represented as number of nanoseconds since the epoch : returns : None
def drain(operator_client, hostnames, start, duration):
    """Schedules a maintenance window for the specified hosts and marks them as draining.
    :param hostnames: a list of hostnames
    :param start: the time to start the maintenance, represented as number of nanoseconds since the epoch
    :param duration: length of the maintenance window, represented as number of nanoseconds since the epoch
    :returns: None
    """
    log.info("Draining: %s" % hostnames)
    payload = build_maintenance_schedule_payload(operator_client, hostnames, start, duration, drain=True)
    try:
        drain_output = operator_client(data=payload).text
    except HTTPError:
        raise HTTPError("Error performing maintenance drain.")
    return drain_output
def drain ( operator_client , hostnames , start , duration ) : log . info ( "Draining: %s" % hostnames ) payload = build_maintenance_schedule_payload ( operator_client , hostnames , start , duration , drain = True ) try : drain_output = operator_client ( data = payload ) . text except HTTPError : raise HTTPError ( "Error performing maintenance drain." ) return drain_output