In this page, we will show the various launcher services available through the Python API.
list_projects(user) -> list(project_id)
Request list of projects for given user.
user | Name of user to request projects from -> string |
list_servers() -> list(server_info)
Request list of running Reven servers.
list_users() -> list(string)
Request list of reven users.
list_vms() -> list(vm_info)
Request list of available Virtual Machine configurations.
project_abort_scenario_recording(project) -> None
Abort current scenario recording for a project.
project | Project id (user, project name). -> project_id |
project_create(project) -> None
Create a new project.
project | Project id (user, project name). -> project_id |
project_delete(project) -> None
Delete a project.
project | Project id (user, project name). -> project_id |
project_details(project) -> server_info
Retrieve server information of a project.
project | Project id (user, project name). -> project_id |
project_download_file(project, filename) -> file_chunk
Download and return a file chunk.
project | Project id (user, project name). -> project_id |
filename | Name of file to download. -> string |
project_download_file_as(project, filename, destination) -> None
Download a file to a client side location.
project | Project id (user, project name). -> project_id |
filename | Name of file to download. -> string |
destination | Filepath to save downloaded file as. -> string |
project_list_files(project) -> list(file_info)
List input files of a project.
project | Project id (user, project name). -> project_id |
project_record_scenario(project, scenario) -> None
Record a scenario.
project | Project id (user, project name). -> project_id |
scenario | Scenario configuration. -> scenario_recording_config |
project_remove_file(project, filename) -> None
Remove an input file from a project.
project | Project id (user, project name). -> project_id |
filename | Name of file to remove. -> string |
project_rename(project, new_project) -> None
Rename a project.
project | Id of project to rename. -> project_id |
new_project | New project id (user, project name). -> project_id |
project_rename_file(project, filename, new_filename) -> None
Rename an input file from a project.
project | Project id (user, project name). -> project_id |
filename | Name of file to rename. -> string |
new_filename | New name for given file. -> string |
project_scenario(project) -> scenario_recording_info
Retrieve scenario recording status for a project.
project | Project id (user, project name). -> project_id |
project_upload_file(project, filepath) -> None
Upload input file to a project.
project | Project id (user, project name). -> project_id |
filepath | Path of the file to upload. -> string |
server_kill(port) -> None
Kill Reven server by port.
port | Port of Reven server. -> integer |
server_launch(project, launch_config) -> integer
Launch Reven server for given project and return server port.
Due to the design of the API, multiple servers can be started for a single project. The main use case for this would be to launch a new execution with extra inspectors while keeping a previous one for browsing in Axion. However, please note that this workflow is not officially supported. Each started server will have its own port. These are different server instances, but Axion doesn'thave the means to display them.It will display the server as 'started' for as long as there is at least one server instance of the same project started. The displayed port will be the lowest among all server instance, and the instance at this port will be the one that Axion connects to and which will be closed if the 'force close' button is clicked. Having different server instances launched on the same project has practical implications:
launcher_connection.list_servers()
:From there, you can kill unwanted duplicates with launcher_connection.server_kill(port)
. However, there is currently no practical way of knowing which server was launched first (in particular, the most recent server does not necessarily have the highest port). The safest way to fix duplicate problems is to prevent them from happening.You can do this by checking if a server is already launched before starting a new one:
project | id of project to launch. -> project_id |
launch_config | launch configuration (license, port, etc.). -> reven_launch_config |
server_restart(port) -> integer
Restart Reven server by port, return new server port.
port | Port of Reven server. -> integer |
server_unblock(port) -> None
Unblock Reven server by port (stop current service).
port | Port of Reven server. -> integer |
system_disk_info() -> disk_info
Return disk usage.
system_licenses_info() -> licenses_info
Return licenses usage.