set_availability
Changes the availability definition of a given service.
Format
emcli set_availability -name=<target_name> -type=<target_type> -availType=TESTS|SYSTEM|SUB_SERVICE -availOp=and|or [-sysAvailType=SYSTEM_TARGET_DIRECTLY|SELECTED_COMPONENTS_OF_A_SYSTEM] [-keycomponents=<'keycomp1name:keycomp1type; keycomp2name:keycomp2type;...'>]
Options
-
name
Service target name.
-
type
Service target type. Aggregate services target type are also supported. Use the get_targets verb to get the target type of a target.
-
availType
Type of availability. Switches the availability to either test-based, system-based, or subservice-based. SUB_SERVICE is supported only for aggregate services.
-
availOp
If
and
, it uses all key tests/components to decide availability.If
or
, it uses any key tests/components to decide availability. -
sysAvailType
Type of availability when the availType is system-based. Sets the availability to either SYSTEM_TARGET_DIRECTLY or SELECTED_COMPONENTS_OF_A_SYSTEM .
-
If availability is set to 'system target directly', the system associated with the service needs to define availability[status], systemname, and systemtype are required arguments.
-
If availability is set to 'selected components of a system', systemname, systemtype, and keycomponents are required arguments.
-
If availability is set to 'system target directly', and if availability[status] is not defined, the availability set is invalid. Therefore, the only option that can be set is 'selected components of a system'.
-
-
keycomponents
Name-type pair (that is, keycomp_name:keycomp_type) list of key components in the system used for the service.
Examples
Example 1
This example sets the availability of service MyTarget to be based on any key components of a system.
emcli set_availability -name='MyTarget' -type='generic_service' -availType='system' -availOp='or' -keycomponents='database:oracle_database; host1:host'
Example 2
This example sets the availability of service MyTarget to be based on system targets availability.
emcli set_availability -name='MyTarget' -type='generic_service' -availType='system' -availOp='and' -sysAvailType='system target directly' emcli set_availability -name='MyTarget' -type='generic_service' -availType='system' -availOp='and' -sysAvailType='selected components of a system' -keycomponents='database:oracle_database; host1:host' emcli set_availability -name='MyTarget' -type='generic_service' -availType='system' -availOp='or' -sysAvailType='selected components of a system' -keycomponents='database:oracle_database; host1:host'