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.0.0.tar.gz (12.6 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.0.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file xoadmin-1.0.0.tar.gz.

File metadata

  • Download URL: xoadmin-1.0.0.tar.gz
  • Upload date:
  • Size: 12.6 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.0.0.tar.gz
Algorithm Hash digest
SHA256 cfe7c3a65e14dabcccc054290acb99b9b21b2d97fc7339ead2ac60af27e507af
MD5 5a10aa20ca252dce212caf67de387f54
BLAKE2b-256 5b183453bf99d6d55ff93c80f9cd4fdce6ca99011104fcdfb21e0e2fb17c3eb0

See more details on using hashes here.

File details

Details for the file xoadmin-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: xoadmin-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf80aa6dfbf604866277a4ef1d74ce038ca08ded0942763ad0772376751ddaba
MD5 8641728d9ee89e667e4a7121e77a1211
BLAKE2b-256 a967e45dc4342ed00d0107a1b6d18b87691f1f5c5f4e8f090ac75f8a7f488569

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