Skip to content

Commit

Permalink
Add Remote.inventory_info
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zack Cerza committed Sep 11, 2014
1 parent 58cbb23 commit 4351173
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions teuthology/orchestra/remote.py
Expand Up @@ -268,6 +268,18 @@ def host_key(self):
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):
"""
Expand Down

0 comments on commit 4351173

Please sign in to comment.