class HammerCLIKatello::SubscriptionCommand::ListCommand

Public Instance Methods

extend_data(data) click to toggle source
# File lib/hammer_cli_katello/subscription.rb, line 24
def extend_data(data)
  data["format_quantity"] = data["quantity"] == -1 ? _("Unlimited") : data["quantity"]
  data["subscription_type"] = get_subscription_type(data)
  data
end
get_subscription_type(data) click to toggle source
# File lib/hammer_cli_katello/subscription.rb, line 32
def get_subscription_type(data)
  if !data["virt_only"]
    _("Physical")
  elsif data["host"]
    _("Guests of %s") % data['host']['name']
  elsif data["hypervisor"]
    _("Guests of %s") % data['hypervisor']['name']
  elsif data["unmapper_guest"]
    _("Temporary")
  else
    _("Virtual")
  end
end