]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Add Remote.inventory_info
authorZack Cerza <zack.cerza@inktank.com>
Mon, 8 Sep 2014 15:57:42 +0000 (09:57 -0600)
committerZack Cerza <zack.cerza@inktank.com>
Thu, 11 Sep 2014 21:12:52 +0000 (15:12 -0600)
A property that returns a dict of attributes in the format that the
paddles lock server likes.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/orchestra/remote.py

index 7d4c145085fde785f4137029b643d4cfc8f158f8..9a447bce156361a8a6799d473c8fc82520d81c30 100644 (file)
@@ -268,6 +268,18 @@ class Remote(object):
             self._host_key = ' '.join((key.get_name(), key.get_base64()))
         return self._host_key
 
+    @property
+    def inventory_info(self):
+        node = dict()
+        node['name'] = self.hostname
+        node['user'] = self.user
+        node['arch'] = self.arch
+        node['os_type'] = self.distro.name
+        node['os_version'] = self.distro.release
+        node['ssh_pub_key'] = self.host_key
+        node['up'] = True
+        return node
+
 
 class Distribution(object):
     """