from __future__ import absolute_import, print_function
import time
-from operator import attrgetter
import libcloud.compute.base as cloud_base
import libcloud.compute.providers as cloud_provider
name = 'compute-{}-{}'.format(node_id, cluster_id)
tags = {
'booted_at': time.strftime(ARVADOS_TIMEFMT, time.gmtime()),
- 'arv-ping-url': self._make_ping_url(arvados_node),
+ 'arv-ping-url': self._make_ping_url(arvados_node)
}
tags.update(self.tags)
return {
}
def sync_node(self, cloud_node, arvados_node):
- hostname = arvados_node_fqdn(arvados_node)
- self.real.ex_create_tags(cloud_node, {"hostname": hostname})
+ self.real.ex_create_tags(cloud_node,
+ {'hostname': arvados_node_fqdn(arvados_node)})
def _init_image(self, urn):
- return "image", self.list_images(ex_urn=urn)[0]
-
- def _init_ssh_key(self, filename):
- with open(filename) as ssh_file:
- key = cloud_base.NodeAuthSSHKey(ssh_file.read())
- return 'auth', key
+ return "image", self.get_image(urn)
def list_nodes(self):
# Azure only supports filtering node lists by resource group.