From: Zack Cerza Date: Mon, 8 Sep 2014 15:57:42 +0000 (-0600) Subject: Add Remote.inventory_info X-Git-Tag: 1.1.0~1173 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4351173d08ddd68eb8f6737f205e5099cd0ed1b2;p=teuthology.git Add Remote.inventory_info A property that returns a dict of attributes in the format that the paddles lock server likes. Signed-off-by: Zack Cerza --- diff --git a/teuthology/orchestra/remote.py b/teuthology/orchestra/remote.py index 7d4c1450..9a447bce 100644 --- a/teuthology/orchestra/remote.py +++ b/teuthology/orchestra/remote.py @@ -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): """