Metadata-Version: 2.5
Name: trytond_strings_xo
Version: 8.0.0.4
Summary: Xen Orchestra Integration
Author: Clemens Hupka
Maintainer-email: Clemens Hupka <clemens.hupka@backend.at>
License-Expression: GPL-3.0-or-later
License-File: COPYRIGHT
License-File: LICENSE
Keywords: orchestra,tryton,virtualization,xcp-ng,xen
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Plugins
Classifier: Framework :: Tryton
Classifier: Topic :: Office/Business
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Requires-Dist: cryptography
Requires-Dist: trytond-company<8.1,>=8.0
Requires-Dist: trytond<8.1,>=8.0
Provides-Extra: test
Description-Content-Type: text/x-rst

Xen Orchestra
=============

The ``strings_xo`` module provides the foundation for integrating
Xen Orchestra (XO) and XCP-ng with Tryton.  It defines the server
configuration and an encrypted credential store, together with a REST
client for the Xen Orchestra REST API v0.

Features
--------

- **Server configuration**: describe a Xen Orchestra instance with its
  URL, authentication method, company, default pool and connection
  settings.
- **Encrypted credentials**: API tokens and passwords are encrypted at
  rest with Fernet symmetric encryption and masked in every read
  result.  Credentials can be stored on the server or reused through
  the ``xo.credential`` model.
- **REST client**: a complete client for the Xen Orchestra REST API v0
  covering collections, object actions (``?sync=true``), ``PATCH``,
  ``DELETE``, binary import/export and NDJSON streaming, with bounded
  retry and exponential backoff.
- **Sync framework**: a generic, idempotent pull-sync framework reused
  by every suite module.  A mirror model declares the Xen Orchestra
  collection and a field map, and the framework performs the upsert
  keyed on ``(server, uuid)``, the orphan handling and the structured
  logging of every run.
- **Manual and scheduled sync**: a *Manual Sync* wizard and a scheduled
  ``ir.cron`` with an interval controlled by the ``[strings_xo]``
  configuration section.
- **Security**: dedicated access groups, model access and field level
  access rights protecting the token and password fields.

Configuration
-------------

After installing the module, open *Xen Orchestra > Servers* to add a
Xen Orchestra instance, and *Xen Orchestra > Credentials* to manage
reusable credentials.  The module configuration is available under
*Xen Orchestra > Configuration*.

Dependencies
------------

- Tryton modules: ``ir``, ``res``, ``company``.

Models
------

- ``xo.server`` — ``XOServer``: a Xen Orchestra instance and its
  authentication settings.
- ``xo.credential`` — ``XOCredential``: an encrypted, reusable
  credential (API token or user name / password).
- ``xo.configuration`` — ``XOConfiguration``: singleton holding the
  Fernet key used to encrypt credential secrets.

Cron Jobs
---------

- *Xen Orchestra: Synchronise* (``xo.server|sync_cron``) — synchronises
  every active server every five minutes, honouring the
  ``[strings_xo] sync_interval_minutes`` setting.

Wizards
-------

- *Manual Sync* — synchronise a selected Xen Orchestra server and show
  the summary counters and errors of the run.
