Project

General

Profile

Actions

Bug #23421

closed

can't attach custom subscriptions to an activation key

Added by Evgeni Golov about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

katello 3.7 (git):

[root@rhel7 ~]#  hammer product create --name foobar --organization-id 1
Product created
[root@rhel7 ~]#  hammer subscription list --organization-id 1
---|----------------------------------|--------|----------|----------|---------|---------|---------------------|-----------|---------
ID | UUID                             | NAME   | TYPE     | CONTRACT | ACCOUNT | SUPPORT | END DATE            | QUANTITY  | CONSUMED
---|----------------------------------|--------|----------|----------|---------|---------|---------------------|-----------|---------
1  | ff8080816306b25d016306bd64940007 | foobar | Physical |          |         |         | 2048/04/19 10:54:25 | Unlimited | 0       
---|----------------------------------|--------|----------|----------|---------|---------|---------------------|-----------|---------
[root@rhel7 ~]# hammer activation-key create --name foobar --organization-id 1
Activation key created
[root@rhel7 ~]# hammer activation-key add-subscription --subscription-id ff8080816306b25d016306bd64940007 --name foobar --organization-id 1
Could not add subscription to activation key:
  undefined method `product_id' for #<Katello::Subscription:0x00007efc27eff9c8>

log:

2018-04-27T10:55:19 [E|app|400ad] NoMethodError: undefined method `product_id' for #<Katello::Subscription:0x00007efc27eff9c8>
 | /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activemodel-5.1.4/lib/active_model/attribute_methods.rb:432:in `method_missing'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/models/katello/glue/candlepin/activation_key.rb:52:in `subscribe'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0/app/controllers/katello/api/v2/activation_keys_controller.rb:185:in `add_subscriptions'


Related issues 1 (1 open0 closed)

Related to Katello - Refactor #23424: add tests for adding subscriptions to an activation keyNewActions
Actions #1

Updated by The Foreman Bot about 6 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7339 added
Actions #2

Updated by Evgeni Golov about 6 years ago

  • translation missing: en.field_release set to 338
Actions #3

Updated by Evgeni Golov about 6 years ago

  • Related to Refactor #23424: add tests for adding subscriptions to an activation key added
Actions #4

Updated by Evgeni Golov about 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF