(self)
Return machines that are available.
        @return: free virtual machines
Return machines that are available.
Return machines that are available .
def get_available_machines(self):
        """Return machines that are available.
        @return: free virtual machines
        """
        session = self.Session()
        try:
            machines = session.query(Machine).options(joinedload("tags")).filter_by(locked=False).all()
            return machines
        except SQLAlchemyError as e:
            log.exception(
                "Database error getting available machines: {0}".format(e)
            )
            return []
        finally:
            session.close()
def get_available_machines ( self ) : session = self . Session ( ) try : machines = session . query ( Machine ) . options ( joinedload ( "tags" ) ) . filter_by ( locked = False ) . all ( ) return machines except SQLAlchemyError as e : log . exception ( "Database error getting available machines: {0}" . format ( e ) ) return [ ] finally : session . close ( )