Home | History | Annotate | Download | only in server

Lines Matching refs:labels

97         we only use attributes and labels but as time goes by and other
104 self.labels = []
132 """Retrieve a host's specific labels from the AFE.
134 Looks for the host labels that have the form <label_prefix>:<value>
142 @returns A list of labels that match the prefix or 'None'
145 labels = afe.get_labels(name__startswith=label_prefix,
147 if labels:
148 return [l.name.split(label_prefix, 1)[1] for l in labels]
164 labels = get_labels_from_afe(hostname, label_prefix, afe)
165 if labels and len(labels) == 1:
166 return labels[0]
170 """Retrieve given host's board from its labels in the AFE.
187 Looks through the host's labels in the AFE to determine its build.
192 were multiple build labels assigned to this host.
349 def lock_host_with_labels(afe, lock_manager, labels):
350 """Lookup and lock one host that matches the list of input labels.
355 @param labels: A list of labels to look for on hosts.
357 @return: The hostname of a host matching all labels, and locked through the
363 input labels are available.
364 @raises: error.TestError: If unable to lock a host matching the labels.
366 potential_hosts = afe.get_hosts(multiple_labels=labels)
369 'No devices found with labels %s.' % labels)
376 logging.info('Locked device %s with labels %s.',
377 host.hostname, labels)
380 logging.info('Unable to lock device %s with labels %s.',
381 host.hostname, labels)
383 raise error.TestError('Could not lock a device with labels %s' % labels)