Bug 1055617 - [RFE] rct cat-cert should also report the "VCPU Limit" attribute for an Order
Summary: [RFE] rct cat-cert should also report the "VCPU Limit" attribute for an Order
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Carter Kozak
QA Contact: John Sefler
Depends On:
Blocks: rhsm-rhel70
TreeView+ depends on / blocked
Reported: 2014-01-20 15:52 UTC by John Sefler
Modified: 2014-09-15 00:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2014-01-30 18:49:37 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description John Sefler 2014-01-20 15:52:46 UTC
Description of problem:
Now that VCPU Compliance bug 885785 has been implemented, The rct cat-cert tool should report the "VCPU Limit" corresponding to the "vcpu" subscription pool's product attribute.

This bug is similar in scope to bug 951142 and bug 861993 that were used for Core Limit and RAM Limit.

Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.9.2-1
subscription-manager: 1.10.10-1.git.22.bf03c6b.el7
python-rhsm: 1.10.10-1.git.1.90486fd.el7

How reproducible:

Steps to Reproduce:
configured against a candlepin server with the TESTDATA deployed...
[root@jsefler-7 ~]# subscription-manager register --username testuser1 --password password --org admin
The system has been registered with ID: 51578115-36e0-4939-b96e-115c2eeb8b60 
[root@jsefler-7 ~]# subscription-manager list --avail | egrep "Awesome OS Server Basic$" -A4
Subscription Name: Awesome OS Server Basic
Provides:          Awesome OS Server Bits
SKU:               awesomeos-server-basic
Contract:          1
Pool ID:           8a908740439d1e6f01439d1f39e0059a
[root@jsefler-7 ~]# subscription-manager attach --pool 8a908740439d1e6f01439d1f39e0059a
Successfully attached a subscription for: Awesome OS Server Basic
[root@jsefler-7 ~]# rct cat-cert --no-content /etc/pki/entitlement/8190472999679086625.pem 

	Entitlement Certificate

	Path: /etc/pki/entitlement/8190472999679086625.pem
	Version: 1.0
	Serial: 8190472999679086625
	Start Date: 2014-01-16 00:00:00+00:00
	End Date: 2015-01-16 00:00:00+00:00
	Pool ID: Not Available

	CN: 8a908740439d1e6f0143b0536a503588

	C: US
	CN: jsefler-f14-candlepin.usersys.redhat.com
	L: Raleigh

	ID: 37060
	Name: Awesome OS Server Bits
	Version: 6.1
	Arch: ALL
	Brand Type: OS

	Name: Awesome OS Server Basic
	Number: order-8675309
	SKU: awesomeos-server-basic
	Contract: 1
	Account: 12331131231
	Service Level: None
	Service Type: Self-Support
	Quantity: 10
	Quantity Used: 1
	Socket Limit: 2
	RAM Limit: 
	Core Limit: 
	Virt Only: False
	Stacking ID: 
	Warning Period: 30
	Provides Management: 0

^BANG! Expected the Order information to include VCPU Limit: 4

Additional info:
I know that the VCPU Limit on this entitlement is 4 by using the new rhsm-debug tool as follows...

[root@jsefler-7 ~]# rhsm-debug system --no-archive
Wrote: /tmp/rhsm-debug-system-20140120-631679
[root@jsefler-7 ~]# grep "vcpu" /tmp/rhsm-debug-system-20140120-631679/entitlements.json -A4 -B3
                    "created": "2014-01-16T22:15:05.953+0000",
                    "id": "8a908740439d1e6f01439d1f39e105a5",
                    "name": "vcpu",
                    "productId": "awesomeos-server-basic",
                    "updated": "2014-01-16T22:15:05.953+0000",
                    "value": "4"

Comment 1 Carter Kozak 2014-01-30 18:49:37 UTC
We don't encode vcpu into entitlement certificates (or virt_limit/guest_limit) because the client should never need to use them.

It doesn't seem right to encode these values into the certificate just to print them with rct cat-cert.  They would just provide unnecessary bloat.

All attributes can be read from the entitlement json provided by the subscription management server.

Note You need to log in before you can comment on or make changes to this bug.