Project

General

Profile

Actions

Bug #28327

closed

GET katello/api/v2/subscriptions/:id always fails with error: This subscription is not relevant to the current organization

Added by Samir Jha over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Subscriptions
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1774953

Description of problem:
GET katello/api/v2/subscriptions/:id always fails with error: This subscription is not relevant to the current organization

Version-Release number of selected component (if applicable):
Sat6.7

How reproducible:
100%

Steps to Reproduce:
1. Get lists of organization subscriptions:
root@ent-02-vm-03 ~]# curl -X GET -k -u admin:admin https://ent-02-vm-03.lab.eng.nay.redhat.com/katello/api/v2/subscriptions/

Output: {
"organization": {},
"total": 3,
"subtotal": 3,
"page": 1,
"per_page": 20,
"error": null,
"search": null,
"sort": {
"by": "name",
"order": "asc"
},
"results": [{
"id": 23,
"cp_id": "8ac213ad6e598c23016e8d64d61f50e9",
"subscription_id": 7,
"name": "Red Hat Enterprise Linux for Virtual Datacenters, Premium",
"start_date": "2019-10-24 04:00:00 UTC",
"end_date": "2020-10-24 03:59:59 UTC",
"available": -1,
"quantity": -1,
"consumed": 1,
"account_number": 6318436,
"contract_number": 12030882,
"support_level": "Premium",
"product_id": "RH00049",
"sockets": "2",
"cores": null,
"ram": null,
"instance_multiplier": 1,
"stacking_id": null,
"multi_entitlement": false,
"type": "STACK_DERIVED",
"product_name": "Red Hat Enterprise Linux for Virtual Datacenters, Premium",
"unmapped_guest": false,
"virt_only": true,
"virt_who": false,
"upstream": true,
"upstream_pool_id": null,
"hypervisor": {
"id": 1588,
"name": "virt-who-10.66.144.13-1"
}
}, {
"id": 5,
"cp_id": "8ac213ad6e598c23016e59b47db1087d",
"subscription_id": 6,
"name": "Red Hat Enterprise Linux Server, Premium (Physical or Virtual Nodes)",
"start_date": "2019-10-24 04:00:00 UTC",
"end_date": "2020-10-24 03:59:59 UTC",
"available": 200,
"quantity": 200,
"consumed": 0,
"account_number": 6318436,
"contract_number": 12030884,
"support_level": "Premium",
"product_id": "RH00003",
"sockets": "2",
"cores": null,
"ram": null,
"instance_multiplier": "2",
"stacking_id": "RH00003",
"multi_entitlement": true,
"type": "NORMAL",
"product_name": "Red Hat Enterprise Linux Server, Premium (Physical or Virtual Nodes)",
"unmapped_guest": false,
"virt_only": false,
"virt_who": false,
"upstream": true,
"upstream_pool_id": "8a99f9ad6dfbbf3f016dfbca0ac70016"
}, {
"id": 1,
"cp_id": "8ac213ad6e598c23016e59b470430873",
"subscription_id": 3,
"name": "Resilient Storage for Unlimited Guests",
"start_date": "2019-10-24 04:00:00 UTC",
"end_date": "2020-10-24 03:59:59 UTC",
"available": 200,
"quantity": 200,
"consumed": 0,
"account_number": 6318436,
"contract_number": 12030885,
"support_level": "Layered",
"product_id": "RH00060",
"sockets": "2",
"cores": null,
"ram": null,
"instance_multiplier": 1,
"stacking_id": "RH00060",
"multi_entitlement": true,
"type": "NORMAL",
"product_name": "Resilient Storage for Unlimited Guests",
"unmapped_guest": false,
"virt_only": false,
"virt_who": true,
"upstream": true,
"upstream_pool_id": "8a99f9ad6dfbbf3f016dfbc9de30000e"
}]
}

2.Show a subscription
[root@ent-02-vm-03 ~]# curl -X GET -k -u admin:admin https://ent-02-vm-03.lab.eng.nay.redhat.com/katello/api/v2/subscriptions/5

Actual results:
Failed with Error:
[root@ent-02-vm-03 ~]# curl -X GET -k -u admin:admin https://ent-02-vm-03.lab.eng.nay.redhat.com/katello/api/v2/subscriptions/5 {"displayMessage":"This subscription is not relevant to the current organization.","errors":["This subscription is not relevant to the current organization."]}[root@ent-02-vm-03 ~]#

Actions #1

Updated by Samir Jha over 4 years ago

  • Assignee set to Samir Jha
Actions #2

Updated by The Foreman Bot over 4 years ago

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

Updated by The Foreman Bot over 4 years ago

  • Fixed in Releases Katello 3.15.0 added
Actions #4

Updated by Samir Jha over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #5

Updated by Samir Jha over 4 years ago

  • Target version set to Katello 3.14.0
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF