parameters: (self)
docstring: Return machines that are available.
          @return: free virtual machines
docstring_summary: Return machines that are available.
docstring_tokens: Return machines that are available .
function: 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()
function_tokens: 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 ( )