Yaml2Archiving ============== The **Yaml2Archiving** tool helps users archive Tango attributes by providing a YAML configuration file. This file can include multiple **Tango Hosts**, **Configuration Managers**, and **Event Archivers** — all defined in one place. Usage ----- The tool requires a YAML file specifying: - Tango hosts - Configuration managers - Event archivers - Attribute details to be archived --- ### Run the Archiver #### Configure New Attributes To configure new attributes, run: .. code-block:: bash python -m yaml2archiving.v1.archiver_configurator multiple_db.yaml --- #### Update Existing Attributes To update existing attributes (only include attributes that require updates in the YAML file), run: .. code-block:: bash python -m yaml2archiving.v1.archiver_configurator update_info.yaml --update --- #### Remove Attributes To remove existing attributes (only include attributes that should be removed in the YAML file), run: .. code-block:: bash python -m yaml2archiving.v1.archiver_configurator remove_info.yaml --remove --- Example YAML Configuration -------------------------- Below is an example of a YAML configuration file that can be used with the tool: .. code-block:: yaml tango_hosts: - th1: host: "tango-host-databaseds-test1.ska-tango-archiver.svc.cluster.local" port: "10000" - th2: host: "tango-host-databaseds-test1.ska-tango-archiver-1.svc.cluster.local" port: "10000" configuration_managers: - cm1: trl: mid-eda/cm/01 - cm2: trl: mid-eda/cm/02 th: th2 event_subscribers: - es1: trl: mid-eda/es/01 th: th2 - es2: trl: mid-eda/es/02 - es3: trl: tango://192.168.49.2:10000/mid-eda/es/03 defaults: - th: th1 - cm: cm1 - es: es1 attributes: - trl: sys/tg_test/1/double_image configuration: code_push_event: true polling_period: 1000 archive_abs_change: 2 - trl: sys/tg_test/1/double_image cm: cm2 es: es2 configuration: code_push_event: true polling_period: 1000 archive_abs_change: 2 - trl: sys/tg_test/2/long_scalar configuration: code_push_event: true --- Notes ----- - ``trl`` stands for **Tango Resource Locator**, which uniquely identifies a Tango device or attribute. - ``th`` refers to the **Tango Host**, representing the database host and port where Tango devices are registered. - ``cm`` refers to the **Configuration Manager**, responsible for managing attribute configurations. - ``es`` refers to the **Event Subscriber**, which handles the archiving or monitoring of attribute events. - The ``defaults`` section specifies default values for ``th``, ``cm``, and ``es``. - If an attribute does not explicitly define ``th``, ``cm``, or ``es``, the corresponding default values are automatically used. - When using the ``--update`` or ``--remove`` options, include only the relevant attributes in the YAML file. - For updates, provide the complete attribute configuration, including existing and updated configuration values.