Skip to content

Commit

Permalink
713153 - RFE: include IP information in consumers/systems related API…
Browse files Browse the repository at this point in the history
… calls.
  • Loading branch information
Petr Chalupa committed Apr 11, 2012
1 parent 49d167d commit a1f9f46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/src/katello/client/core/system.py
Expand Up @@ -71,6 +71,7 @@ def run(self):
self.printer.setHeader(_("Systems List For Environment [ %s ] in Org [ %s ]") % (env_name, org_name))

self.printer.addColumn('name')
self.printer.addColumn('ipv4_address')
self.printer.addColumn('serviceLevel', _('Service Level'))

self.printer._grep = True
Expand Down Expand Up @@ -121,6 +122,7 @@ def run(self):
system["guests"] = "[ "+ ", ".join([guest["name"] for guest in system["guests"]]) +" ]"

self.printer.addColumn('name')
self.printer.addColumn('ipv4_address')
self.printer.addColumn('uuid')
self.printer.addColumn('location')
self.printer.addColumn('created_at', 'Registered', time_format=True)
Expand Down
1 change: 1 addition & 0 deletions src/app/models/system.rb
Expand Up @@ -146,6 +146,7 @@ def as_json(options)
json['environment'] = environment.as_json unless environment.nil?
json['activation_key'] = activation_keys.as_json unless activation_keys.nil?
json['template'] = system_template.as_json unless system_template.nil?
json['ipv4_address'] = facts.try(:[], 'network.ipv4_address')
if self.guest == 'true'
json['host'] = self.host.attributes if self.host
else
Expand Down

0 comments on commit a1f9f46

Please sign in to comment.