Task #6869: Challenge OpenStack and OpenNebula with ucloud
ucloud-pay v1: Implement payment support into ucloud
This module should be rather generic, but still out-of-the-box usable.
The basic setup / changes should be as follows:
- modify the CLI to query the pay service before creating a resources, whether it needs to be paid
- if it needs to be paid, require user to pass --pay flag
- if not, allow CLI to continue without confirming payment
- add function to retrieve bills
- by default timeframe is "current month"
- time frame can be set arbitrarily
- regular users can only retrieve their own bill(s)
- users in the realm "ungleich-admin" can retrieve bills for any users
- bills should be displayed in
- ascii format
- json objects
- pdf [ we need a template here]
Support for ucloud-cli¶
- This is an "informational only" interface
- It will return the price that a user will have to pay for requesting a specific resource
- This will not cause any billing
- ucloud-pay will watch the etcd store for changes
- Each time it finds objects that need to be paid, it charges the user/owner
- Should be added by stripe (maybe other providers later)
- Might need to create subscriptions (Ping Mondi for it)
By bill / bank¶
If a user is eligible for paying by bill, create an entry in etcd for the used resource.
Document the behaviour, API, how to use it in ucloud.