Metadata-Version: 2.5
Name: trytond_strings_xo_cmdb
Version: 8.0.0.1
Summary: CMDB bridge of the 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: cmdb,inventory,orchestra,tryton,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-cmdb-computer<8.1,>=8.0
Requires-Dist: trytond-cmdb-location<8.1,>=8.0
Requires-Dist: trytond-cmdb<8.1,>=8.0
Requires-Dist: trytond-company<8.1,>=8.0
Requires-Dist: trytond-strings-xo-infrastructure<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 CMDB Bridge
=========================

The ``strings_xo_cmdb`` module links the objects mirrored from a Xen
Orchestra (XO) instance to the CMDB computer assets describing them.
The hosts of the ``strings_xo_infrastructure`` inventory are linked out
of the box; the virtual machines of the ``strings_xo_compute``
inventory are linked as soon as that module is installed.

Features
--------

- **Mapping model**: ``xo.cmdb.mapping`` links an ``xo.host`` (or an
  ``xo.vm``) to a ``cmdb.computer``.  The reference is resolved
  dynamically, so the bridge offers the virtual machines as soon as
  the compute module is installed, without a change of the module.
- **CMDB as source of truth**: a reconciliation never overwrites the
  metadata owned by the CMDB.  Only the attributes derived from Xen
  Orchestra (processor, memory and operating system summaries) are
  filled, an empty value never clears a stored one, and an asset
  already registered is matched by name before a new one is created.
- **Reconciliation wizard**: ``CMDB Reconciliation`` links the objects
  by identifier and by name, creates the missing assets when asked to,
  and reports the conflicts (a name shared by several computers) and
  the errors of the run.
- **Scheduled reconciliation**: the *Xen Orchestra: Reconcile CMDB*
  scheduled action reconciles every active server every hour.
- **Locations**: the computers created for the hosts of a pool are
  placed in the CMDB location configured on the pool, falling back on
  the location configured on the server.
- **Security**: dedicated access groups, model access rights and a
  multi-company rule on the mappings.

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

Install the module and open *Xen Orchestra > Servers*.  On a server,
the *CMDB* page holds the settings of the bridge:

- **Create CMDB Assets**: create the computers missing for the objects
  reported by the server.  When it is checked, a computer template is
  required.
- **Computer Template**: the template of the created computers.
- **Location**: the default location of the created computers; a
  location configured on a pool takes precedence over it.

The mappings are listed on the same page and under *Xen Orchestra >
CMDB > Mappings*.

Run *Xen Orchestra > CMDB > Reconcile CMDB* to link the objects of a
server, create the missing assets and report the conflicts.  A CMDB
computer which is shared by several Xen Orchestra objects is never
linked automatically: set the *CMDB Computer* of its mapping by hand.

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

- Tryton modules: ``ir``, ``res``, ``company``, ``strings_xo``,
  ``strings_xo_infrastructure``, ``cmdb``, ``cmdb_computer``,
  ``cmdb_location``.
- The ``strings_xo_compute`` module is *not* a dependency: the bridge
  stays installable while the compute inventory is being built and
  offers the virtual machines as soon as it is installed.

Models
------

- ``xo.cmdb.mapping`` — ``XOCMDBMapping``: the link between a Xen
  Orchestra object and a CMDB computer.
- ``cmdb.computer`` — ``CMDBComputer``: extended with the mappings of
  the computer.
- ``xo.pool`` — ``XOPool``: extended with the CMDB location of the
  hosts of the pool.
- ``xo.host`` — ``XOHost``: extended with the CMDB computer of the
  host.
- ``xo.server`` — ``XOServer``: extended with the settings of the
  bridge, the *Reconcile CMDB* button and the scheduled entry point.

Cron Jobs
---------

- *Xen Orchestra: Reconcile CMDB* (``xo.server|cron_reconcile_cmdb``) —
  reconciles the CMDB assets of every active server every hour.
