Archiving2Yaml
Archiving2yaml
Simple helper script to generate a configuration file from an existing archive setup.
- class tools.v1.archiving2yaml.Archiving2yaml[source]
Class provides functionality to fetch details from the archiver and format zthe data for yaml file generation.
- add_archiver_trls(host: str, port: str, archiver_name: str)[source]
Adds the archiver full trls into a list.
- check_archivers_in_manager(configuration_manager: str) bool[source]
Method checks if manager contains any of the event subscriber present in the file.
- get_full_trl(host: str, port: str, dev_name: str) str[source]
Method to provide the short trl from full trl.
- get_host_id(host: str, port: str) str[source]
Provides the tango host id based on host and port details.
- get_host_port_from_id(host_id: str) tuple[str, str][source]
Provides host and port details from host_id
- get_host_port_from_trl(device_name: str) tuple[str, str][source]
Provides tango host and port details from the trl
- get_manager_id(manager: str) str[source]
Method provides the configuration manager id based on the manager trl.
- get_managerid_of_archiver(archiver: str) str[source]
Method provides the manager id based on event subsriber trl.
- remove_unnecessary_values(configurations: dict)[source]
Method to remove unnecessary values from the configuraiton data.
- Parameters:
configurations (dict) – Attribute configuration data.
- set_all_archiver_attribute_configuration()[source]
Method sets the attribute configuration information for all the archiver.
- set_archivers(archiver_names: list[str])[source]
Sets Event subscriber details based on list provided.
- archiver_names (list): The name of archivers for which data needs
to be checked. For example: [“mid-eda/es/01”] or [“mid-eda/es/01”,”mid-eda/es/02”]. Also accepts [“mid-eda/es/*”], this would get all the instance present in current host.
- set_attribute_configuration(archiver: str, es_id: str)[source]
Method sets attribute configuration
- Parameters:
archiver (str) – event subscriber name.
- set_configuration_managers(configuration_managers: list[str])[source]
Method sets the configuration manager details.
- Parameters:
configuration_managers (list) – List of configuration manager trl
- set_tango_hosts(archiver_names: list[str])[source]
Sets tango host into required format from archiver trl.
- Parameters:
archiver_names (list[str]) – list of tango hosts. For example: [“mid-eda/es/01”], here it uses current tango host. [“tango://tango-databaseds:10000/mid-eda/es/01”, “tango://tango-databaseds2:10000/mid-eda/es/*”] Here,incase of “tango-databaseds2” the port will be set to default that is 10000. Please use KUBE DNS <host>.<namespace>.svc.<cluster-domain> for hosts outside the current namespace of deployment.