update_service

Overview

The update_service statement is used to update service descriptions and/or unit labels.

Syntax

update_serviceservice_key[descriptionnew_description][labelnew_label]

update_service using filefile key_col[descriptiondescription_col][labellabel_col]

update_service using dsetkey_col[descriptiondescription_col][labellabel_col]

Details

The update_service statement can:

  • update a single service using a specific key

  • update all services whose keys are present in a DSET or CSV lookup source

Update a single service

update_serviceservice_key[descriptionnew_description][labelnew_label]

The service with a key of service_key is updated with the literal description and label provided.

Update multiple services using a CSV lookup file

update_service using filefile key_col[descriptiondescription_col][labellabel_col]

The file parameter may contain a path component and is considered as relative to the home directory.

All services keys that match values in the key_col column in the CSV called file have their descriptions and/or labels updated with the values in the corresponding description_col and label_col columns in file.

Update multiple services using a DSET

update_service using dsetkey_col[descriptiondescription_col][labellabel_col]

To update services using a DSET, it must have been previously imported in order to be used as the lookup source.

The DSET ID is derived from the key_col column as follows:

  • If fully qualified then the DSET is derived from key_col directly

  • If not fully qualified then the default DSET is assumed

In either case, whichever is used, or both, of description_col and label_col must be located in the same DSET as key_col

Examples

# Update all services from CSV file
update_service using file "system/lookup.csv" service_key description service_name label unit

# Update specific service
update_service "Small_VM1" description "Small VM 1" label "VM's"

Last updated