X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/4186924dbc103d080c47ae85bcfcd38d87314767..debf08b0415cf0f9d35338cfb280bde8628619eb:/services/nodemanager/arvnodeman/nodelist.py?ds=sidebyside diff --git a/services/nodemanager/arvnodeman/nodelist.py b/services/nodemanager/arvnodeman/nodelist.py deleted file mode 100644 index f1a661e559..0000000000 --- a/services/nodemanager/arvnodeman/nodelist.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python - -from __future__ import absolute_import, print_function - -from . import clientactor -from . import config - -class ArvadosNodeListMonitorActor(clientactor.RemotePollLoopActor): - """Actor to poll the Arvados node list. - - This actor regularly polls the list of Arvados node records, and - sends it to subscribers. - """ - - def is_common_error(self, exception): - return isinstance(exception, config.ARVADOS_ERRORS) - - def _item_key(self, node): - return node['uuid'] - - def _send_request(self): - return self._client.nodes().list(limit=10000).execute()['items'] - - -class CloudNodeListMonitorActor(clientactor.RemotePollLoopActor): - """Actor to poll the cloud node list. - - This actor regularly polls the cloud to get a list of running compute - nodes, and sends it to subscribers. - """ - - def is_common_error(self, exception): - return self._client.is_cloud_exception(exception) - - def _item_key(self, node): - return node.id - - def _send_request(self): - n = self._client.list_nodes() - return n