Class: HammerCLIKatello::SubscriptionCommand::ListCommand
- Inherits:
-
ListCommand
- Object
- HammerCLIForeman::ListCommand
- ListCommand
- HammerCLIKatello::SubscriptionCommand::ListCommand
- Defined in:
- lib/hammer_cli_katello/subscription.rb
Instance Method Summary collapse
Methods inherited from ListCommand
Methods included from ResolverCommons
Instance Method Details
#extend_data(data) ⇒ Object
23 24 25 26 27 |
# File 'lib/hammer_cli_katello/subscription.rb', line 23 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) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/hammer_cli_katello/subscription.rb', line 31 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 |