|
24 | 24 |
|
25 | 25 |
|
26 | 26 | class MetricsThresholdAlert(AlertBase): |
27 | | - """Class for connecting to/creating a local or remotely defined metric threshold alert""" |
| 27 | + """ |
| 28 | + Simvue Metrics Threshold Alert |
| 29 | + ============================== |
| 30 | +
|
| 31 | + This class is used to connect to/create metrics threshold alert objects on the Simvue server, |
| 32 | + any modification of MetricsThresholdAlert instance attributes is mirrored on the remote object. |
| 33 | +
|
| 34 | + """ |
28 | 35 |
|
29 | 36 | def __init__(self, identifier: str | None = None, **kwargs) -> None: |
30 | | - """Connect to a local or remote threshold alert by identifier""" |
| 37 | + """Initialise a Metrics Threshold Alert |
| 38 | +
|
| 39 | + If an identifier is provided a connection will be made to the |
| 40 | + object matching the identifier on the target server. |
| 41 | + Else a new MetricsThresholdAlert instance will be created using arguments provided in kwargs. |
| 42 | +
|
| 43 | + Parameters |
| 44 | + ---------- |
| 45 | + identifier : str, optional |
| 46 | + the remote server unique id for the target folder |
| 47 | + **kwargs : dict |
| 48 | + any additional arguments to be passed to the object initialiser |
| 49 | + """ |
31 | 50 | self.alert = MetricThresholdAlertDefinition(self) |
32 | 51 | super().__init__(identifier, **kwargs) |
33 | 52 | self._local_only_args += [ |
@@ -117,10 +136,29 @@ def new( |
117 | 136 |
|
118 | 137 |
|
119 | 138 | class MetricsRangeAlert(AlertBase): |
120 | | - """Class for connecting to/creating a local or remotely defined metric range alert""" |
| 139 | + """ |
| 140 | + Simvue Metrics Range Alert |
| 141 | + ========================== |
| 142 | +
|
| 143 | + This class is used to connect to/create metrics range alert objects on the Simvue server, |
| 144 | + any modification of MetricsRangeAlert instance attributes is mirrored on the remote object. |
| 145 | +
|
| 146 | + """ |
121 | 147 |
|
122 | 148 | def __init__(self, identifier: str | None = None, **kwargs) -> None: |
123 | | - """Connect to a local or remote threshold alert by identifier""" |
| 149 | + """Initialise a Metrics Range Alert |
| 150 | +
|
| 151 | + If an identifier is provided a connection will be made to the |
| 152 | + object matching the identifier on the target server. |
| 153 | + Else a new MetricsRangeAlert instance will be created using arguments provided in kwargs. |
| 154 | +
|
| 155 | + Parameters |
| 156 | + ---------- |
| 157 | + identifier : str, optional |
| 158 | + the remote server unique id for the target folder |
| 159 | + **kwargs : dict |
| 160 | + any additional arguments to be passed to the object initialiser |
| 161 | + """ |
124 | 162 | self.alert = MetricRangeAlertDefinition(self) |
125 | 163 | super().__init__(identifier, **kwargs) |
126 | 164 | self._local_only_args += [ |
|
0 commit comments