# Virsh Sandbox
API for managing virtual machine sandboxes using libvirt

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 0.0.1-beta
- Package version: 0.0.2-beta
- Generator version: 7.19.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.

Python 3.9+

## Installation & Usage
### pip install

If the python package is hosted on a repository, you can install directly using:

```sh
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)

Then import the package:
```python
import virsh_sandbox
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import virsh_sandbox
```

### Tests

Execute `pytest` to run the tests.

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python

import virsh_sandbox
from virsh_sandbox.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = virsh_sandbox.Configuration(
    host = "http://localhost:8080"
)



# Enter a context with an instance of the API client
with virsh_sandbox.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = virsh_sandbox.AnsibleApi(api_client)
    request = virsh_sandbox.InternalAnsibleJobRequest() # InternalAnsibleJobRequest | Job creation parameters

    try:
        # Create Ansible job
        api_response = api_instance.create_ansible_job(request)
        print("The response of AnsibleApi->create_ansible_job:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AnsibleApi->create_ansible_job: %s\n" % e)

```

## Documentation for API Endpoints

All URIs are relative to *http://localhost:8080*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AnsibleApi* | [**create_ansible_job**](docs/AnsibleApi.md#create_ansible_job) | **POST** /virsh-sandbox/v1/ansible/jobs | Create Ansible job
*AnsibleApi* | [**get_ansible_job**](docs/AnsibleApi.md#get_ansible_job) | **GET** /virsh-sandbox/v1/ansible/jobs/{job_id} | Get Ansible job
*AnsibleApi* | [**stream_ansible_job_output**](docs/AnsibleApi.md#stream_ansible_job_output) | **GET** /virsh-sandbox/v1/ansible/jobs/{job_id}/stream | Stream Ansible job output
*AuditApi* | [**get_audit_stats**](docs/AuditApi.md#get_audit_stats) | **GET** /tmux-client/v1/audit/stats | Get audit stats
*AuditApi* | [**query_audit_log**](docs/AuditApi.md#query_audit_log) | **POST** /tmux-client/v1/audit/query | Query audit log
*CommandApi* | [**get_allowed_commands**](docs/CommandApi.md#get_allowed_commands) | **GET** /tmux-client/v1/command/allowed | Get allowed commands
*CommandApi* | [**run_command**](docs/CommandApi.md#run_command) | **POST** /tmux-client/v1/command/run | Run command
*FileApi* | [**check_file_exists**](docs/FileApi.md#check_file_exists) | **POST** /tmux-client/v1/file/exists | Check if file exists
*FileApi* | [**copy_file**](docs/FileApi.md#copy_file) | **POST** /tmux-client/v1/file/copy | Copy file
*FileApi* | [**delete_file**](docs/FileApi.md#delete_file) | **POST** /tmux-client/v1/file/delete | Delete file
*FileApi* | [**edit_file**](docs/FileApi.md#edit_file) | **POST** /tmux-client/v1/file/edit | Edit file
*FileApi* | [**get_file_hash**](docs/FileApi.md#get_file_hash) | **POST** /tmux-client/v1/file/hash | Get file hash
*FileApi* | [**list_directory**](docs/FileApi.md#list_directory) | **POST** /tmux-client/v1/file/list | List directory contents
*FileApi* | [**read_file**](docs/FileApi.md#read_file) | **POST** /tmux-client/v1/file/read | Read file
*FileApi* | [**write_file**](docs/FileApi.md#write_file) | **POST** /tmux-client/v1/file/write | Write file
*HealthApi* | [**get_health**](docs/HealthApi.md#get_health) | **GET** /virsh-sandbox/v1/health | Health check
*HealthApi* | [**get_health1**](docs/HealthApi.md#get_health1) | **GET** /tmux-client/v1/health | Get health status
*HumanApi* | [**ask_human**](docs/HumanApi.md#ask_human) | **POST** /tmux-client/v1/human/ask | Request human approval
*HumanApi* | [**ask_human_async**](docs/HumanApi.md#ask_human_async) | **POST** /tmux-client/v1/human/ask-async | Request human approval asynchronously
*HumanApi* | [**cancel_approval**](docs/HumanApi.md#cancel_approval) | **DELETE** /tmux-client/v1/human/pending/{requestID} | Cancel approval
*HumanApi* | [**get_pending_approval**](docs/HumanApi.md#get_pending_approval) | **GET** /tmux-client/v1/human/pending/{requestID} | Get pending approval
*HumanApi* | [**list_pending_approvals**](docs/HumanApi.md#list_pending_approvals) | **GET** /tmux-client/v1/human/pending | List pending approvals
*HumanApi* | [**respond_to_approval**](docs/HumanApi.md#respond_to_approval) | **POST** /tmux-client/v1/human/respond | Respond to approval
*PlanApi* | [**abort_plan**](docs/PlanApi.md#abort_plan) | **POST** /tmux-client/v1/plan/{planID}/abort | Abort plan
*PlanApi* | [**advance_plan_step**](docs/PlanApi.md#advance_plan_step) | **POST** /tmux-client/v1/plan/{planID}/advance | Advance plan step
*PlanApi* | [**create_plan**](docs/PlanApi.md#create_plan) | **POST** /tmux-client/v1/plan/create | Create plan
*PlanApi* | [**delete_plan**](docs/PlanApi.md#delete_plan) | **DELETE** /tmux-client/v1/plan/{planID} | Delete plan
*PlanApi* | [**get_plan**](docs/PlanApi.md#get_plan) | **GET** /tmux-client/v1/plan/{planID} | Get plan
*PlanApi* | [**list_plans**](docs/PlanApi.md#list_plans) | **GET** /tmux-client/v1/plan/ | List plans
*PlanApi* | [**update_plan**](docs/PlanApi.md#update_plan) | **POST** /tmux-client/v1/plan/update | Update plan
*SandboxApi* | [**create_sandbox**](docs/SandboxApi.md#create_sandbox) | **POST** /virsh-sandbox/v1/sandbox/create | Create a new sandbox
*SandboxApi* | [**create_snapshot**](docs/SandboxApi.md#create_snapshot) | **POST** /virsh-sandbox/v1/sandbox/{id}/snapshot | Create snapshot
*SandboxApi* | [**destroy_sandbox**](docs/SandboxApi.md#destroy_sandbox) | **DELETE** /virsh-sandbox/v1/sandbox/{id} | Destroy sandbox
*SandboxApi* | [**diff_snapshots**](docs/SandboxApi.md#diff_snapshots) | **POST** /virsh-sandbox/v1/sandbox/{id}/diff | Diff snapshots
*SandboxApi* | [**generate_configuration**](docs/SandboxApi.md#generate_configuration) | **POST** /virsh-sandbox/v1/sandbox/{id}/generate/{tool} | Generate configuration
*SandboxApi* | [**inject_ssh_key**](docs/SandboxApi.md#inject_ssh_key) | **POST** /virsh-sandbox/v1/sandbox/{id}/sshkey | Inject SSH key into sandbox
*SandboxApi* | [**publish_changes**](docs/SandboxApi.md#publish_changes) | **POST** /virsh-sandbox/v1/sandbox/{id}/publish | Publish changes
*SandboxApi* | [**run_sandbox_command**](docs/SandboxApi.md#run_sandbox_command) | **POST** /virsh-sandbox/v1/sandbox/{id}/run | Run command in sandbox
*SandboxApi* | [**start_sandbox**](docs/SandboxApi.md#start_sandbox) | **POST** /virsh-sandbox/v1/sandbox/{id}/start | Start sandbox
*TmuxApi* | [**create_tmux_pane**](docs/TmuxApi.md#create_tmux_pane) | **POST** /tmux-client/v1/tmux/panes/create | Create tmux pane
*TmuxApi* | [**create_tmux_session**](docs/TmuxApi.md#create_tmux_session) | **POST** /tmux-client/v1/tmux/sessions/create | Create tmux session
*TmuxApi* | [**kill_tmux_pane**](docs/TmuxApi.md#kill_tmux_pane) | **DELETE** /tmux-client/v1/tmux/panes/{paneID} | Kill tmux pane
*TmuxApi* | [**kill_tmux_session**](docs/TmuxApi.md#kill_tmux_session) | **DELETE** /tmux-client/v1/tmux/sessions/{sessionName} | Kill tmux session
*TmuxApi* | [**list_tmux_panes**](docs/TmuxApi.md#list_tmux_panes) | **GET** /tmux-client/v1/tmux/panes | List tmux panes
*TmuxApi* | [**list_tmux_sessions**](docs/TmuxApi.md#list_tmux_sessions) | **GET** /tmux-client/v1/tmux/sessions | List tmux sessions
*TmuxApi* | [**list_tmux_windows**](docs/TmuxApi.md#list_tmux_windows) | **GET** /tmux-client/v1/tmux/windows | List tmux windows
*TmuxApi* | [**read_tmux_pane**](docs/TmuxApi.md#read_tmux_pane) | **POST** /tmux-client/v1/tmux/panes/read | Read tmux pane
*TmuxApi* | [**release_tmux_session**](docs/TmuxApi.md#release_tmux_session) | **POST** /tmux-client/v1/tmux/sessions/{sessionId}/release | Release tmux session
*TmuxApi* | [**send_keys_to_pane**](docs/TmuxApi.md#send_keys_to_pane) | **POST** /tmux-client/v1/tmux/panes/send-keys | Send keys to tmux pane
*TmuxApi* | [**switch_tmux_pane**](docs/TmuxApi.md#switch_tmux_pane) | **POST** /tmux-client/v1/tmux/panes/switch | Switch tmux pane
*VMsApi* | [**list_virtual_machines**](docs/VMsApi.md#list_virtual_machines) | **GET** /virsh-sandbox/v1/vms | List all VMs


## Documentation For Models

 - [InternalAnsibleJob](docs/InternalAnsibleJob.md)
 - [InternalAnsibleJobRequest](docs/InternalAnsibleJobRequest.md)
 - [InternalAnsibleJobResponse](docs/InternalAnsibleJobResponse.md)
 - [InternalAnsibleJobStatus](docs/InternalAnsibleJobStatus.md)
 - [InternalRestCreateSandboxRequest](docs/InternalRestCreateSandboxRequest.md)
 - [InternalRestCreateSandboxResponse](docs/InternalRestCreateSandboxResponse.md)
 - [InternalRestDiffRequest](docs/InternalRestDiffRequest.md)
 - [InternalRestDiffResponse](docs/InternalRestDiffResponse.md)
 - [InternalRestErrorResponse](docs/InternalRestErrorResponse.md)
 - [InternalRestGenerateResponse](docs/InternalRestGenerateResponse.md)
 - [InternalRestInjectSSHKeyRequest](docs/InternalRestInjectSSHKeyRequest.md)
 - [InternalRestListVMsResponse](docs/InternalRestListVMsResponse.md)
 - [InternalRestPublishRequest](docs/InternalRestPublishRequest.md)
 - [InternalRestPublishResponse](docs/InternalRestPublishResponse.md)
 - [InternalRestRunCommandRequest](docs/InternalRestRunCommandRequest.md)
 - [InternalRestRunCommandResponse](docs/InternalRestRunCommandResponse.md)
 - [InternalRestSnapshotRequest](docs/InternalRestSnapshotRequest.md)
 - [InternalRestSnapshotResponse](docs/InternalRestSnapshotResponse.md)
 - [InternalRestStartSandboxRequest](docs/InternalRestStartSandboxRequest.md)
 - [InternalRestStartSandboxResponse](docs/InternalRestStartSandboxResponse.md)
 - [InternalRestVmInfo](docs/InternalRestVmInfo.md)
 - [TimeDuration](docs/TimeDuration.md)
 - [TmuxClientInternalTypesAPIError](docs/TmuxClientInternalTypesAPIError.md)
 - [TmuxClientInternalTypesApprovalStatus](docs/TmuxClientInternalTypesApprovalStatus.md)
 - [TmuxClientInternalTypesApproveRequest](docs/TmuxClientInternalTypesApproveRequest.md)
 - [TmuxClientInternalTypesAskHumanRequest](docs/TmuxClientInternalTypesAskHumanRequest.md)
 - [TmuxClientInternalTypesAskHumanResponse](docs/TmuxClientInternalTypesAskHumanResponse.md)
 - [TmuxClientInternalTypesAuditEntry](docs/TmuxClientInternalTypesAuditEntry.md)
 - [TmuxClientInternalTypesAuditQuery](docs/TmuxClientInternalTypesAuditQuery.md)
 - [TmuxClientInternalTypesAuditQueryResponse](docs/TmuxClientInternalTypesAuditQueryResponse.md)
 - [TmuxClientInternalTypesComponentHealth](docs/TmuxClientInternalTypesComponentHealth.md)
 - [TmuxClientInternalTypesCopyFileRequest](docs/TmuxClientInternalTypesCopyFileRequest.md)
 - [TmuxClientInternalTypesCopyFileResponse](docs/TmuxClientInternalTypesCopyFileResponse.md)
 - [TmuxClientInternalTypesCreatePaneRequest](docs/TmuxClientInternalTypesCreatePaneRequest.md)
 - [TmuxClientInternalTypesCreatePaneResponse](docs/TmuxClientInternalTypesCreatePaneResponse.md)
 - [TmuxClientInternalTypesCreatePlanRequest](docs/TmuxClientInternalTypesCreatePlanRequest.md)
 - [TmuxClientInternalTypesCreatePlanResponse](docs/TmuxClientInternalTypesCreatePlanResponse.md)
 - [TmuxClientInternalTypesDeleteFileRequest](docs/TmuxClientInternalTypesDeleteFileRequest.md)
 - [TmuxClientInternalTypesDeleteFileResponse](docs/TmuxClientInternalTypesDeleteFileResponse.md)
 - [TmuxClientInternalTypesEditFileRequest](docs/TmuxClientInternalTypesEditFileRequest.md)
 - [TmuxClientInternalTypesEditFileResponse](docs/TmuxClientInternalTypesEditFileResponse.md)
 - [TmuxClientInternalTypesFileInfo](docs/TmuxClientInternalTypesFileInfo.md)
 - [TmuxClientInternalTypesGetPlanResponse](docs/TmuxClientInternalTypesGetPlanResponse.md)
 - [TmuxClientInternalTypesHealthResponse](docs/TmuxClientInternalTypesHealthResponse.md)
 - [TmuxClientInternalTypesHealthStatus](docs/TmuxClientInternalTypesHealthStatus.md)
 - [TmuxClientInternalTypesKillSessionResponse](docs/TmuxClientInternalTypesKillSessionResponse.md)
 - [TmuxClientInternalTypesListApprovalsResponse](docs/TmuxClientInternalTypesListApprovalsResponse.md)
 - [TmuxClientInternalTypesListDirRequest](docs/TmuxClientInternalTypesListDirRequest.md)
 - [TmuxClientInternalTypesListDirResponse](docs/TmuxClientInternalTypesListDirResponse.md)
 - [TmuxClientInternalTypesListPanesResponse](docs/TmuxClientInternalTypesListPanesResponse.md)
 - [TmuxClientInternalTypesListPlansResponse](docs/TmuxClientInternalTypesListPlansResponse.md)
 - [TmuxClientInternalTypesPaneInfo](docs/TmuxClientInternalTypesPaneInfo.md)
 - [TmuxClientInternalTypesPendingApproval](docs/TmuxClientInternalTypesPendingApproval.md)
 - [TmuxClientInternalTypesPlan](docs/TmuxClientInternalTypesPlan.md)
 - [TmuxClientInternalTypesPlanStatus](docs/TmuxClientInternalTypesPlanStatus.md)
 - [TmuxClientInternalTypesPlanStep](docs/TmuxClientInternalTypesPlanStep.md)
 - [TmuxClientInternalTypesReadFileRequest](docs/TmuxClientInternalTypesReadFileRequest.md)
 - [TmuxClientInternalTypesReadFileResponse](docs/TmuxClientInternalTypesReadFileResponse.md)
 - [TmuxClientInternalTypesReadPaneRequest](docs/TmuxClientInternalTypesReadPaneRequest.md)
 - [TmuxClientInternalTypesReadPaneResponse](docs/TmuxClientInternalTypesReadPaneResponse.md)
 - [TmuxClientInternalTypesRunCommandRequest](docs/TmuxClientInternalTypesRunCommandRequest.md)
 - [TmuxClientInternalTypesRunCommandResponse](docs/TmuxClientInternalTypesRunCommandResponse.md)
 - [TmuxClientInternalTypesSendKeysRequest](docs/TmuxClientInternalTypesSendKeysRequest.md)
 - [TmuxClientInternalTypesSendKeysResponse](docs/TmuxClientInternalTypesSendKeysResponse.md)
 - [TmuxClientInternalTypesSessionInfo](docs/TmuxClientInternalTypesSessionInfo.md)
 - [TmuxClientInternalTypesStepStatus](docs/TmuxClientInternalTypesStepStatus.md)
 - [TmuxClientInternalTypesSwitchPaneRequest](docs/TmuxClientInternalTypesSwitchPaneRequest.md)
 - [TmuxClientInternalTypesSwitchPaneResponse](docs/TmuxClientInternalTypesSwitchPaneResponse.md)
 - [TmuxClientInternalTypesUpdatePlanRequest](docs/TmuxClientInternalTypesUpdatePlanRequest.md)
 - [TmuxClientInternalTypesUpdatePlanResponse](docs/TmuxClientInternalTypesUpdatePlanResponse.md)
 - [TmuxClientInternalTypesWindowInfo](docs/TmuxClientInternalTypesWindowInfo.md)
 - [TmuxClientInternalTypesWriteFileRequest](docs/TmuxClientInternalTypesWriteFileRequest.md)
 - [TmuxClientInternalTypesWriteFileResponse](docs/TmuxClientInternalTypesWriteFileResponse.md)
 - [VirshSandboxInternalAnsibleJob](docs/VirshSandboxInternalAnsibleJob.md)
 - [VirshSandboxInternalAnsibleJobRequest](docs/VirshSandboxInternalAnsibleJobRequest.md)
 - [VirshSandboxInternalAnsibleJobResponse](docs/VirshSandboxInternalAnsibleJobResponse.md)
 - [VirshSandboxInternalAnsibleJobStatus](docs/VirshSandboxInternalAnsibleJobStatus.md)
 - [VirshSandboxInternalErrorErrorResponse](docs/VirshSandboxInternalErrorErrorResponse.md)
 - [VirshSandboxInternalRestCreateSandboxRequest](docs/VirshSandboxInternalRestCreateSandboxRequest.md)
 - [VirshSandboxInternalRestCreateSandboxResponse](docs/VirshSandboxInternalRestCreateSandboxResponse.md)
 - [VirshSandboxInternalRestDiffRequest](docs/VirshSandboxInternalRestDiffRequest.md)
 - [VirshSandboxInternalRestDiffResponse](docs/VirshSandboxInternalRestDiffResponse.md)
 - [VirshSandboxInternalRestErrorResponse](docs/VirshSandboxInternalRestErrorResponse.md)
 - [VirshSandboxInternalRestGenerateResponse](docs/VirshSandboxInternalRestGenerateResponse.md)
 - [VirshSandboxInternalRestInjectSSHKeyRequest](docs/VirshSandboxInternalRestInjectSSHKeyRequest.md)
 - [VirshSandboxInternalRestListVMsResponse](docs/VirshSandboxInternalRestListVMsResponse.md)
 - [VirshSandboxInternalRestPublishRequest](docs/VirshSandboxInternalRestPublishRequest.md)
 - [VirshSandboxInternalRestPublishResponse](docs/VirshSandboxInternalRestPublishResponse.md)
 - [VirshSandboxInternalRestRunCommandRequest](docs/VirshSandboxInternalRestRunCommandRequest.md)
 - [VirshSandboxInternalRestRunCommandResponse](docs/VirshSandboxInternalRestRunCommandResponse.md)
 - [VirshSandboxInternalRestSnapshotRequest](docs/VirshSandboxInternalRestSnapshotRequest.md)
 - [VirshSandboxInternalRestSnapshotResponse](docs/VirshSandboxInternalRestSnapshotResponse.md)
 - [VirshSandboxInternalRestStartSandboxRequest](docs/VirshSandboxInternalRestStartSandboxRequest.md)
 - [VirshSandboxInternalRestStartSandboxResponse](docs/VirshSandboxInternalRestStartSandboxResponse.md)
 - [VirshSandboxInternalRestVmInfo](docs/VirshSandboxInternalRestVmInfo.md)
 - [VirshSandboxInternalStoreChangeDiff](docs/VirshSandboxInternalStoreChangeDiff.md)
 - [VirshSandboxInternalStoreCommand](docs/VirshSandboxInternalStoreCommand.md)
 - [VirshSandboxInternalStoreCommandExecRecord](docs/VirshSandboxInternalStoreCommandExecRecord.md)
 - [VirshSandboxInternalStoreCommandSummary](docs/VirshSandboxInternalStoreCommandSummary.md)
 - [VirshSandboxInternalStoreDiff](docs/VirshSandboxInternalStoreDiff.md)
 - [VirshSandboxInternalStorePackageInfo](docs/VirshSandboxInternalStorePackageInfo.md)
 - [VirshSandboxInternalStoreSandbox](docs/VirshSandboxInternalStoreSandbox.md)
 - [VirshSandboxInternalStoreSandboxState](docs/VirshSandboxInternalStoreSandboxState.md)
 - [VirshSandboxInternalStoreServiceChange](docs/VirshSandboxInternalStoreServiceChange.md)
 - [VirshSandboxInternalStoreSnapshot](docs/VirshSandboxInternalStoreSnapshot.md)
 - [VirshSandboxInternalStoreSnapshotKind](docs/VirshSandboxInternalStoreSnapshotKind.md)


<a id="documentation-for-authorization"></a>
## Documentation For Authorization

Endpoints do not require authorization.


## Author




