Metadata-Version: 2.5
Name: trytond_strings_xo_infrastructure
Version: 8.0.0.1
Summary: Xen Orchestra Infrastructure Inventory
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: inventory,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: trytond-company<8.1,>=8.0
Requires-Dist: trytond-strings-xo<8.1,>=8.0
Requires-Dist: trytond<8.1,>=8.0
Provides-Extra: test
Description-Content-Type: text/x-rst

Xen Orchestra Infrastructure
============================

The ``strings_xo_infrastructure`` module mirrors the infrastructure
inventory of a Xen Orchestra (XO) instance into Tryton: the pools, the
hosts, the networks, the physical interfaces, the storage attachments,
the storage repositories and the virtual disk images of the ``/pools``,
``/hosts``, ``/networks``, ``/pifs``, ``/pbds``, ``/srs`` and
``/vdis`` collections are kept in sync as read-only records.

Features
--------

- **Pools**: name, description, master host, high availability state,
  CPU sockets and cores, memory total and default SR.
- **Hosts**: name, management address, power state, enabled flag, CPU
  sockets and cores, memory total and usage, hypervisor version and
  build, BIOS, product and pool membership.
- **Networks**: name, description, MTU, bridge, VLAN, default locking
  mode, purpose, bonding flag, tags and attached PIFs.
- **PIFs**: device and adapter model, host, attached network, IPv4 and
  IPv6 configuration, VLAN, MTU, link speed and state, management flag
  and bond membership.
- **PBDs**: host, attached storage repository, attached flag, device
  configuration and other configuration.
- **Storage repositories (SR)**: name, description, type (LVM, NFS,
  iSCSI, ZFS, ...), content type, size, used and physical used space,
  shared and default flags, allocation strategy, maintenance mode,
  tags, attached hosts, health, pool, other and storage manager
  configuration.
- **VDIs**: name, description, storage repository, size, virtual size,
  used and chain physical usage, type, image format, missing and CBT
  flags, snapshots, tags and other configuration.
- **Read-only synchronisation**: an idempotent upsert keyed on the
  ``(server, uuid)`` pair, driven from the Xen Orchestra REST API v0
  through the ``strings_xo`` client and the generic synchronisation
  framework of the ``strings_xo`` base module.  Records that are no
  longer reported by Xen Orchestra are deactivated instead of being
  deleted.
- **Relationships**: a pool owns its hosts and points at its master
  host; a host owns its PIFs and PBDs; a network owns its PIFs; a PIF
  belongs to a host, is attached to a network and references its bond
  master; a storage repository belongs to a pool, is attached to the
  hosts of its PBDs and owns its VDIs; a VDI is located on a storage
  repository.
- **Security**: dedicated access rights reusing the ``strings_xo``
  groups, with read-only access for Xen Orchestra users and full
  access for the Xen Orchestra administration group.

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

After installing the module, open *Xen Orchestra > Servers* and use the
*Sync Infrastructure* button on a server to pull its inventory.  The
synchronised inventory is available under *Xen Orchestra >
Infrastructure*.

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

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

Models
------

- ``xo.pool`` — ``XOPool``: a Xen Orchestra resource pool.
- ``xo.host`` — ``XOHost``: a XenServer / XCP-ng host.
- ``xo.network`` — ``XONetwork``: a Xen Orchestra network.
- ``xo.pif`` — ``XOPif``: a physical interface of a host.
- ``xo.pbd`` — ``XOPbd``: a storage attachment of a host.
- ``xo.sr`` — ``XOSR``: a storage repository.
- ``xo.vdi`` — ``XOVDI``: a virtual disk image.

Cron Jobs
---------

The module plugs into the generic *Xen Orchestra: Synchronise*
(``xo.server|sync_cron``) scheduled action of the ``strings_xo`` base
module, which synchronises the infrastructure of every active server.

Wizards
-------

The module plugs into the generic *Manual Sync* wizard of the
``strings_xo`` base module.  The *Sync Infrastructure* button of a
server is kept for backwards compatibility.
