Lines Matching full:host
20 We'll check if the label already exists on the host and return True if so.
21 Otherwise we'll check if the label should exist on the host.
25 def exists_wrapper(self, host): argument
30 @param host: The host object to run methods on.
32 @returns True if the label already exists on the host, otherwise run
35 info = host.host_info_store.get()
36 return (self._NAME in info.labels) or exists(self, host)
42 This class contains the scaffolding for the host-specific labels.
50 def generate_labels(self, host): argument
52 Return the list of labels generated for the host.
54 @param host: The host object to check on. Not needed here for base case
57 @return a list of labels applicable to the host.
62 def exists(self, host): argument
64 Checks the host if the label is applicable or not.
66 This method is geared for the type of labels that indicate if the host
69 host or not.
71 @param host: The host object to check on.
76 def get(self, host): argument
80 @param host: The host object to check on.
82 if self.exists(host):
83 return self.generate_labels(host)
139 def generate_labels(self, host): argument
143 def exists(self, host): argument
153 present and indicate the os/board/etc type of the host. The _NAME property
164 def get(self, host): argument
167 @param host: The host object to check on.
169 if self.exists(host):
171 for label in self.generate_labels(host)]
194 """This class will assist in retrieving/updating the host labels."""
214 def get_labels(self, host): argument
216 Retrieve the labels for the host.
218 @param host: The host to get the labels for.
224 labels.extend(label.get(host))
231 def get_labels_for_update(self, host, task_name): argument
233 Retrieve the labels for the host which needs to be updated.
235 @param host: The host to get the labels for updating.
247 labels.extend(label.get(host))
271 want to keep but won't be part of the new labels detected on the host.
276 @param old_labels: List of labels already on the host.
287 def _commit_info(self, host, new_info, keep_pool): argument
288 if keep_pool and isinstance(host.host_info_store,
290 primary_store = afe_store.AfeStoreKeepPool(host.hostname)
291 host.host_info_store.commit_with_substitute(
297 host.host_info_store.commit(new_info)
300 def update_labels(self, host, task_name='', keep_pool=False): argument
302 Retrieve the labels from the host and update if needed.
304 @param host: The host to update the labels for.
313 new_labels = self.get_labels_for_update(host, task_name)
314 old_info = host.host_info_store.get()
322 self._commit_info(host, new_info, keep_pool)