ServicePriority#
- class wattson.services.service_priority.ServicePriority(service: WattsonService | None = None, priority_value: float = 0, is_local: bool = True)#
Bases:
object
Represents the priority of a service for determining the starting order. A higher value indicates a higher priority. The priority can be treated globally (“global”) or relatively to the responsible network node (“local”).
Methods
from_remote_representation
Creates a ServicePriority from a template, linking the given WattsonService.
get_global
get_local
get_service
set_global
set_local
to_remote_representation
- __init__(service: WattsonService | None = None, priority_value: float = 0, is_local: bool = True)#
- static from_service_priority(service: WattsonService, priority: ServicePriority) ServicePriority #
Creates a ServicePriority from a template, linking the given WattsonService.
- Parameters:
service ('WattsonService') – The WattsonService instance
priority ('ServicePriority') – The original ServicePriority
- Returns:
A cloned ServicePriority representing the same priority, linked to the given WattsonService.
- Return type:
‘ServicePriority’