(hostnames)
return machine_ids
Helper function to convert a list of hostnames into a JSON list of hostname/ip pairs.
    :param hostnames: a list of hostnames
    :returns: a dictionary representing the list of machines to bring up/down for maintenance
Helper function to convert a list of hostnames into a JSON list of hostname/ip pairs.
    :param hostnames: a list of hostnames
    :returns: a dictionary representing the list of machines to bring up/down for maintenance
Helper function to convert a list of hostnames into a JSON list of hostname / ip pairs . : param hostnames : a list of hostnames : returns : a dictionary representing the list of machines to bring up / down for maintenance
def get_machine_ids(hostnames):
    """Helper function to convert a list of hostnames into a JSON list of hostname/ip pairs.
    :param hostnames: a list of hostnames
    :returns: a dictionary representing the list of machines to bring up/down for maintenance
    """
    machine_ids = []
    components = hostnames_to_components(hostnames, resolve=True)
    for component in components:
        machine_id = {
            "hostname": component.host,
            "ip": component.ip,
        }
        machine_ids.append(machine_id)
    return machine_ids
def get_machine_ids ( hostnames ) : machine_ids = [ ] components = hostnames_to_components ( hostnames , resolve = True ) for component in components : machine_id = { "hostname" : component . host , "ip" : component . ip , } machine_ids . append ( machine_id ) return machine_ids