def reserve_hosts(host_filter_data, username=None):
 hosts = models.Host.query_objects(host_filter_data)
 reservations.create(hosts_to_reserve=[h.hostname for h in hosts], username=username)

def reserve_hosts ( host_filter_data , username = None ) : hosts = models . Host . query_objects ( host_filter_data ) reservations . create ( hosts_to_reserve = [ h . hostname for h in hosts ] , username = username )
reserve some hosts .