bindings and wrappers to manage an XOA instance
Project description
xoadmin
xoadmin is an asynchronous Python client for interacting with Xen Orchestra's REST API and WebSocket. It enables the management of VMs, users, storage, and more, through Xen Orchestra.
- Authenticate via WebSocket.
- Perform operations on VMs.
- Manage users, including creating and deleting users.
- Handle storage operations like listing storage repositories (SRs) and managing Virtual Disk Images (VDIs).
Installation
To use the XO Admin Library, ensure you have Python 3.7+ installed. This library depends on httpx and websockets for asynchronous HTTP and WebSocket communication, respectively.
- Clone this repository.
- Install the package
pip install .
Quick Start
- Initialize the
XOAManagerwith the base URL of your Xen Orchestra instance:
from xoadmin.manager import XOAManager
manager = XOAManager("http://your-xo-instance.com", verify_ssl=False)
- Authenticate using your Xen Orchestra credentials:
await manager.authenticate(username="your-username", password="your-password")
- Now, you can perform various operations, such as listing all VMs:
vms = await manager.list_all_vms()
print(vms)
Ensure you run your script in an environment that supports asynchronous execution, like:
import asyncio
asyncio.run(main())
Documentation
For more detailed information on available methods and their usage, refer to the source code in the src/xoadmin directory. Each module (vm.py, user.py, storage.py) contains classes with methods corresponding to the Xen Orchestra functionalities they manage.
Contributing
Contributions to the XO Admin Library are welcome! Please feel free to submit pull requests or open issues to discuss new features or improvements.
License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xoadmin-1.1.1.tar.gz.
File metadata
- Download URL: xoadmin-1.1.1.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.8.18 Linux/6.5.0-1016-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4050bc48598b1904bec4014422e50e24bc667d7337eab59a34b5b14b7d387633
|
|
| MD5 |
d0237902008dcbd5beefb7a6dbcb3372
|
|
| BLAKE2b-256 |
6dbfba8f68689d7e13d7830e5b71ed1e0ec1168350d08eaf41c9cb24cb2a8a1a
|
File details
Details for the file xoadmin-1.1.1-py3-none-any.whl.
File metadata
- Download URL: xoadmin-1.1.1-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.8.18 Linux/6.5.0-1016-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe9e140eb909ba9353ebc7e84f0557d9280b782b06b18b949b8c1f0264c857d5
|
|
| MD5 |
9d5431a225b27595e56d0a0cb7f27b77
|
|
| BLAKE2b-256 |
ab3b8fea269e59e938b007701f342a0a1475f532da06e2fe5b3a0e19ae7ced9e
|