Home | History | Annotate | Download | only in hosts

Lines Matching refs:labels

18     Decorator for labels that should exist forever once applied.
36 return (self._NAME in info.labels) or exists(self, host)
42 This class contains the scaffolding for the host-specific labels.
52 Return the list of labels generated for the host.
57 @return a list of labels applicable to the host.
66 This method is geared for the type of labels that indicate if the host
78 Return the list of labels.
90 Return all possible labels generated by this label class.
92 @returns a tuple of sets, the first set is for labels that are prefixes
93 like 'os:android'. The second set is for labels that are full
94 labels by themselves like 'bluetooth'.
96 # Another subclass takes care of prefixed labels so this is empty.
110 present and will return at least one label out of a list of possible labels
112 generate_labels() since the label class will need to figure out which labels
116 labels that this label detection class can return in order to allow for
135 will be prepended with a colon to the generated labels like so:
140 The labels returned by this label class will be ['os:android'].
142 subclass; otherwise, all labels returned will be prefixed with 'None:'.
146 """Return the list of labels with _NAME prefixed with a colon.
159 Return all possible labels generated by this label class.
161 @returns a tuple of sets, the first set is for labels that are prefixes
162 like 'os:android'. The second set is for labels that are full
163 labels by themselves like 'bluetooth'.
167 # make sure we only match on prefix labels.
175 """This class will assist in retrieving/updating the host labels."""
178 """Create a list of known labels that is created through this class."""
187 # These two sets will contain the list of labels we can safely remove
195 Retrieve the labels for the host.
197 @param host: The host to get the labels for.
199 labels = []
203 labels.extend(label.get(host))
207 return labels
223 """Update new_labels by adding back old unknown labels.
225 We only delete labels that we might have created earlier. There are
226 some labels we should not be removing (e.g. pool:bvt) that we
227 want to keep but won't be part of the new labels detected on the host.
228 To do that we compare the passed in label to our list of known labels
232 @param old_labels: List of labels already on the host.
233 @param new_labels: List of newly detected labels. This list will be
234 updated to add back labels that are not tracked by the detection
258 Retrieve the labels from the host and update if needed.
260 @param host: The host to update the labels for.
262 # If we haven't yet grabbed our list of known labels, do so now.
267 # old labels from HostInfoStore to minimize the time between read and
271 self._carry_over_unknown_labels(old_info.labels, new_labels)
273 labels=new_labels,