def compute_node_get_by_host(context, host):
 session = get_session()
 with session.begin():
  service = session.query(models.Service).filter_by(host=host, binary='monitor-bmc').first()
  node = session.query(models.ComputeNode).options(joinedload('service')).filter_by(deleted=False, service_id=service.id)
  return node.first()

def compute_node_get_by_host ( context , host ) : session = get_session ( ) with session . begin ( ) : service = session . query ( models . Service ) . filter_by ( host = host , binary = 'monitor-bmc' ) . first ( ) node = session . query ( models . ComputeNode ) . options ( joinedload ( 'service' ) ) . filter_by ( deleted = False , service_id = service . id ) return node . first ( )
get all capacity entries for the given host .