QLMaaS prompt

QLMaaS provides a command like tools to manage the job submitted on the server, get some informations on the Qaptiva machine, update the credentials used to connect to Qaptiva Access…

The prompt could be open in Python or by using a command line tool that will open the prompt

Starting the prompt in a terminal

The command qlmaas_prompt.py can be used to start a prompt directly from a terminal

qlmaas_prompt.py

This command will try to use the configuration file of Qaptiva Access to login on the server. Nevertheless, if no configuration file is defined or if you want to override somes item of your configuration file, you can use some of the following options:

  • The hostname option (--hostname or -n): set the hostname of the Qaptiva Access server

  • The port option (--port or -p): set the port of the Qaptiva Access server

  • The authentication option (--authentication or -a): authentication method (valid values: password or ssl)

  • The certificate option (--certificate or -c): set the SSL certificate used to login (only used for an SSL authentication)

  • The key option (--key or -k): set the SSL key used to login (only used for SSL authentication)

  • The check host option (--check-host): check the host certificate

Starting the prompt in Python

With a configuration file

Function prompt() opens an interactive prompt directly from Python:

from qlmaas.utils import prompt

prompt()

Without a configuration file

The method open_prompt() of QLMaaSConnection open a prompt directly from Python:

from qat.qlmaas import QLMaaSConnection

conn = QLMaaSConnection()
conn.open_prompt()

Prompt commands

The QLMaaS prompt could be used to get information from the server in an easier way. The available commands are:

  • ls: list all jobs or those having a specific status (except the ones having a DELETED status).

    > ls
    > ls --status STATUS
    
  • cancel: cancel a job using its job id or cancel all jobs having a specific status

    > cancel JOB_ID [JOB_ID ...]
    > cancel --status STATUS
    
  • delete: delete a job using its job id or delete all jobs having a specific status.

    > delete JOB_ID [JOB_ID ...]
    > delete --status STATUS
    
  • dl: download the result of a Job and save the result on your computer. By default, this command create a file called JobXXX.res

    > dl [--output FILENAME] JOB_ID
    
  • plugins: list all the Plugins available on the QLMaaS server

    > plugins
    
  • qpus: list all QPUs available on the QLMaaS server

    > qpus
    
  • generators: list all generators available on the QLMaaS server

    > generators
    
  • applications: list all applications available on the QLMaaS server in a given python module

    > applications PYTHON_MODULE
    
  • module: list all importable object (applications or raw object) importable in a myQLM Power Access remote module

    > module PYTHON_MODULE
    
  • config: manage your configuration present on the server side. A configuration is used to display and update the list of available QPUs and Plugins. The configuration contains a list of modules (modules that contains Plugins and/or QPUs) and paths (location of these modules)

    # Display the remote configuration file
    > config list
    
    # Update the remote configuration file
    > config update [--modules MODULE ...] [--paths PATH ...] [--override]
    
  • manage: manage your credentials. This command is used to update your password, your SSL certificate or even your DN. The value of the DN could be either a string or a filename pointing to a server trusted certificate

    > manage [--password] [--certificate FILENAME] [--dn VALUE]