Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1221786 - [RFE] Provide a way for users to set a usage_account_id in the database
[RFE] Provide a way for users to set a usage_account_id in the database
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
2.2.0
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: Luke Meyer
libra bugs
: NeedsTestCase
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-14 16:45 EDT by Eric Rich
Modified: 2015-07-21 15:12 EDT (History)
12 users (show)

See Also:
Fixed In Version: openshift-origin-broker-util-1.35.2.3-1
Doc Type: Enhancement
Doc Text:
When implementing a custom billing provider, the usage_account_id field must be set for tracked users. Previously, there was no tool to set the usage_account_id field, and the database had to be modified manually to set this field. With this enhancement, administrators can now use the oo-admin-ctl-user command with the --setusageaccountid option to set the usage_account_id field for users without direct modifications to the database.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-21 15:12:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1463 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.6 bug fix and enhancement update 2015-07-21 19:11:33 EDT

  None (edit)
Description Eric Rich 2015-05-14 16:45:14 EDT
Description of problem:

In order to create a custom billing provider you need to manually modify the database because of https://github.com/openshift/origin-server/blob/master/broker-util/oo-admin-ctl-usage#L155-L175 checks for the account number. 

Version-Release number of selected component (if applicable): 2.2 

How reproducible: 100% 

Steps to Reproduce:
1. Follow https://mojo.redhat.com/docs/DOC-1012698

Suggested Action: 

Allow for oo-admin-ctl-user to set a usage_account_id

    # oo-admin-ctl-user -l admin --setplanquantity 1 --setplan free \
       --setusage_account_id 12345
Comment 2 Brenton Leanhardt 2015-05-15 14:26:07 EDT
Upstream PR: https://github.com/openshift/origin-server/pull/6141
Comment 3 openshift-github-bot 2015-05-15 20:07:01 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/d723c169a6eefb54546b9d27d804ea463f9a72fb
Bug 1221786 - Provide a way for users to set a usage_account_id
Comment 6 Ma xiaoqiang 2015-05-19 02:41:27 EDT
Check on puddle [2.2.6/2015-05-18.1]

1. list the user info
# oo-admin-ctl-user -l xiaom                     
User xiaom1:
                            plan: 
                usage account id: 
<--snip-->

2. set the usage account id 
# oo-admin-ctl-user -l xiaom --setusageaccountid 1234


Setting usage account id 1234 for user xiaom... Done.

User xiaom:
                            plan: 
                usage account id: 1234

3. check the value in the database
# mongo -u openshift -p mongopass openshift_broker   
MongoDB shell version: 2.4.6
connecting to: openshift_broker
> db.cloud_users.findOne()
<--snip-->
        "usage_account_id" : "1234"
}
Comment 9 errata-xmlrpc 2015-07-21 15:12:43 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1463.html

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