Revision a0be43ee
Added by Thomas McKay over 7 years ago
lib/hammer_cli_csv/content_hosts.rb | ||
---|---|---|
match = matches[0]
|
||
print _(" attaching '%{name}'...") % {:name => match['name']} if option_verbose?
|
||
|
||
amount = line[SUBS_QUANTITY]
|
||
quantity = (amount.nil? || amount.empty? || amount == 'Automatic') ? 0 : amount.to_i
|
||
|
||
@api.resource(:host_subscriptions).call(:add_subscriptions, {
|
||
'host_id' => host['id'],
|
||
'subscriptions' => existing_subscriptions + [match]
|
||
'subscriptions' => [{:id => match['id'], :quantity => quantity}]
|
||
})
|
||
end
|
||
|
Also available in: Unified diff
corrected logic for attaching sub