Skip to main content

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.

  1. Clone this repository.
  2. Install the package
pip install .

Quick Start

  1. Initialize the XOAManager with the base URL of your Xen Orchestra instance:
from xoadmin.manager import XOAManager

manager = XOAManager("http://your-xo-instance.com", verify_ssl=False)
  1. Authenticate using your Xen Orchestra credentials:
await manager.authenticate(username="your-username", password="your-password")
  1. 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

xoadmin-1.1.1.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xoadmin-1.1.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

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

Hashes for xoadmin-1.1.1.tar.gz
Algorithm Hash digest
SHA256 4050bc48598b1904bec4014422e50e24bc667d7337eab59a34b5b14b7d387633
MD5 d0237902008dcbd5beefb7a6dbcb3372
BLAKE2b-256 6dbfba8f68689d7e13d7830e5b71ed1e0ec1168350d08eaf41c9cb24cb2a8a1a

See more details on using hashes here.

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

Hashes for xoadmin-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe9e140eb909ba9353ebc7e84f0557d9280b782b06b18b949b8c1f0264c857d5
MD5 9d5431a225b27595e56d0a0cb7f27b77
BLAKE2b-256 ab3b8fea269e59e938b007701f342a0a1475f532da06e2fe5b3a0e19ae7ced9e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page