Commit Graph

540 Commits

Author SHA1 Message Date
Adrian Turjak 675e42f0d2 Make Distil Health check respect collection domains
Without this, when that config is set, the healthcheck will
report uncollected projects that aren't being collected
anymore.

Also fix some testing.

Change-Id: Ife60eee1400ec596565188b477d64f68b247fcec
2020-09-25 12:44:45 +12:00
Adrian Turjak 4fe7f644f8 DB Managment Transformer to use flavor and prefix
Change-Id: I72f430a948cc9122ee17581b37ca8b5f39928cc7
2020-07-20 14:23:04 +12:00
Adrian Turjak 0a0c7e12ef add transformers for trove
slightly alter how config is loaded to transformers.

Change-Id: I32bf34d270604e8c755160a7dac71e99a38f2a74
2020-07-07 09:23:50 +12:00
Adrian Turjak 07f09a1a9e Log collection time taken
Change-Id: I3a94b70d4cbfa229dfa998d7058792f6ea8db0fa
2020-03-16 16:52:43 +13:00
Adrian Turjak 102e88fab5 Add support to the collector to limit projects by domain
Change-Id: I842c0dd5106574fd6adb1233fe03020acc456353
2020-03-16 16:51:53 +13:00
Adrian Turjak 74f06c5a2a ensure object storage products correctly added to category mapping
Change-Id: I197b31985216bc7e3c78c9d6b05b5cd28d8e4e66
2020-03-05 14:28:15 +13:00
Adrian Turjak 101bd69aee fix an issue with objectstorage products not being in all regions
Change-Id: I0e375cfffe466594481d63591983c8e694bfc3c2
2020-01-22 13:21:14 +13:00
Adrian Turjak 261afe21d1 Fix a NotFound error thrown when checking policy
When collecting a container that has already been deleted
we will get a 404 error, we should just handle it.

Change-Id: Iec7904c5d8554526711a89adf134405028fb757d
2019-12-20 15:46:51 +13:00
Adrian Turjak bdcb202736 Fix an issue with product naming and swift policy names
Change-Id: Ib05c9c0302189c3d28ee10a6b789b8588d5a9d8c
2019-12-13 12:11:01 +13:00
Adrian Turjak 1d0a81a1dd Update tox.ini file for opendev.org
Change-Id: Ia030c6aa4b3be5952298e904d7dc310b7a604655
2019-11-21 11:36:21 +13:00
Adrian Turjak 226ceacf90 Add support for object storage policies
Introduce a new ObjectStorageMax transformer which
takes a container and bases the service for it on the
policy used for it in swift so that we can charge differently
for each policy.

Change-Id: Id1a0d7783ae72de0a2da36245badbd770508be81
2019-11-07 14:05:43 +13:00
OpenDev Sysadmins 33c5f067ba OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:50:31 +00:00
Zuul aafa2c0038 Merge "Support JSON file as an ERP driver" 2019-03-11 22:54:15 +00:00
Feilong Wang 5770bef95e Support JSON file as an ERP driver
Change-Id: I080082a9d8e2f458336985ca996fdf3d71a7d629
2019-03-08 15:47:57 +13:00
Zuul 3efc5c26c3 Merge "Add new transformer for Magnum pollster" 2019-02-19 06:23:35 +00:00
Lingxian Kong 6bb4321087 Fix the KeyError for getting the volume types
Change-Id: I6e4499a32702f950710ab951aa90f305d9e3e9e1
2019-01-15 15:33:52 +13:00
Fei Long Wang f39851c2ef Support extra product category
1. Adding a new config option to support extra product category
2. Support SLA discount product category explicitly

Change-Id: I244c83ee3af3c33e993f332d2093398785e5adfb
2019-01-07 22:50:03 +13:00
Feilong Wang c5c5c5437a Support more licensed products
Instead of hardcoding the os_distro name in code, this patch is
proposing to add a new config option 'licensed_os_distro_list'
under odoo config section so that we can support more os_distro
for licensed products.

Change-Id: Ia913ebec82815d5e9a0b681d0b0e0b4f5ecbb2d1
2018-11-29 14:33:35 +13:00
Feilong Wang 873ceaba3a Add new transformer for Magnum pollster
Change-Id: If45b8b822cc9469135501cea9ab0c1cfab9a5121
2018-10-26 15:48:49 +13:00
Feilong Wang 7579f5362c Add new product category `premium support`
Change-Id: Ib0f580e48f4594a66b52c350d66bf085795d01e8
2018-07-17 15:42:49 +12:00
Lingxian Kong a99bb30894 Add failied project information in health API response
Change-Id: I66e2fd940b5dffb7c820afa77966ac918c99a028
2018-07-10 14:10:28 +12:00
Lingxian Kong efc880799b Get last collection time from valid projects
If some projects are ignored, we should not take them into consideration
when calculating the last collection time.

Change-Id: I44393101fd655ab7dea542493c53245616ec3c4a
2018-07-06 15:07:04 +12:00
Feilong Wang 4961755e83 Improve odoo driver performance
Using 'fields' parameter to explicitly tell odoo to get the fields
we need can improve the query performance a lot.

Change-Id: Ie28f876f9236128a3ecfaf3696a26816d6599d2f
2018-05-28 15:40:07 +12:00
Feilong Wang d9e5463680 Support ignore project in /health API
Currently /health API doesn't support the ignore_tenants config
option, which is not consistent with the collector behaviour.
This patch adds the support and related unit test.

Change-Id: I72e5ed35bd50e629d06c6fe53715d056cc024241
2018-04-24 10:17:55 +12:00
Feilong Wang e5bd5b8213 Support invisible products and fix the units
Usercase of invisible products:
As a cloud provider, I'd like to hide some products which I don't
want to expose to project users.

In the patch, the units in invoice API is also fixed by getting
the units info from product's internal reference.

Change-Id: Iff05f61c0bc303a100f477696dcc904b64c9724d
2018-03-29 13:04:56 +13:00
Zuul d3d04fbe1d Merge "Replace basestring with six.string_types" 2017-10-16 03:09:59 +00:00
Jenkins 09bddd5cdf Merge "Include windows vm usage in quotation" 2017-10-10 01:33:05 +00:00
Zuul 310c492dc9 Merge "Replaces uuid.uuid4 with uuidutils.generate_uuid()" 2017-09-28 21:01:54 +00:00
Lingxian Kong cedaf80811 Include windows vm usage in quotation
The windows vm usage is missing in current quotation API response

Change-Id: Icb4214fe32f7c5b10d4573442745006cc5a1f6ad
2017-09-25 21:58:11 +13:00
Monty Taylor 9327161c9c Remove vestigate HUDSON_PUBLISH_DOCS reference
This isn't actually used and is a leftover from a thing we did
seven years ago that survives today through copy-pasta.

Change-Id: Ibe09b0c6e3b5f356f63fcf6eda1cdea7394e7808
2017-09-19 00:08:01 +00:00
Fei Long Wang 7a606bbb87 Add API ref
To get a better API spec, this patch is following the OpenStack
community way to describe API ref. Only /products endpoint is
included, costs and usage endpoint will be added in following
patches.

Implement blueprint: api-ref

Change-Id: Icaa121c4257fcc27df93e63ec8c2bb095ac41c43
2017-09-15 14:37:13 +12:00
Jenkins 2e373aae7f Merge "Return numberic type for volume in /measurements" 2017-09-04 00:23:52 +00:00
Feilong Wang 9a958fffb8 Fix grant product
Change-Id: I942e21d79bb809fc54bb5224edb21903206493de
2017-09-01 14:26:02 +12:00
Jenkins 421f992f40 Merge "[Trivialfix]Fix typos in distil" 2017-08-31 09:44:15 +00:00
Jenkins 99d1a16fb9 Merge "Update and replace http with https for doc links in distil" 2017-08-31 05:01:36 +00:00
Feilong Wang 0b78c80624 Return numberic type for volume in /measurements
Currently, the volume field in the response of /measurements
API is returned as string type, which is not a best practice.
This patch fixes it and changes the test accordingly.

Change-Id: I394ae5a48f97f7efe1cad1ae7609b3fd6364bfae
2017-08-31 16:11:10 +12:00
Jenkins 04972f4369 Merge "Fix regression issue" 2017-08-31 02:57:43 +00:00
shangxiaobj 8b3f8bff97 Update and replace http with https for doc links in distil
1) Update doc links according to OpenStack document migration
2) Use https instead of http for docs links

Change-Id: Id62f97ed4c4f853dcd1e800c92f48c891a3ea1f4
2017-08-31 02:33:56 +00:00
Feilong Wang 299e3b6dce Fix regression issue
Regression issue which is caused by rebase.

Change-Id: I837fef00e58b3d964d7631fec1d4a5947037206d
2017-08-31 11:53:11 +12:00
Feilong Wang c0b1b7da26 Support py35
Change-Id: Iddd36000b91a091f5c166d2633f46560adbe7fa2
2017-08-29 15:55:12 +12:00
Jenkins 2ac63f70c1 Merge "Return invoice status" 2017-08-21 02:41:11 +00:00
shangxiaobj b862ce2b1d [Trivialfix]Fix typos in distil
Fix all the typos found in distil.

Change-Id: Ibb889c510660bb2f9d7a847b75fb0deda3b5e3d3
2017-08-13 20:19:56 -07:00
Feilong Wang c769c1ced8 Return invoice status
The state/status of invoice can indidate if the invoice has been paid
or not. It would be nice to show/remind our customer via billing panel
if their invoices have been paid.

Change-Id: Ia3f77bbf04ece10f0dc9fdcafa93fcb8d8401c98
2017-08-14 14:40:11 +12:00
Feilong Wang 6d990b6ca6 Support discount for prodcut category mapping
To show the discount info in invoice, it's necessary to add discount
into the discount/category mapping.

Change-Id: I53580eaafbd80bd9efd9a17eab03d42bf1edf481
2017-08-11 02:12:49 +00:00
Jenkins e61b323a32 Merge "Fix getting context info when doing policy check" 2017-08-10 22:19:48 +00:00
Jenkins 100e458502 Merge "Fix object storage mapping" 2017-08-10 01:10:54 +00:00
Jenkins cfdf8d0c19 Merge "Round the quantity for storage product" 2017-08-10 01:04:47 +00:00
Jenkins 95b5564599 Merge "Remove useless config options" 2017-08-10 01:04:28 +00:00
Feilong Wang 03e938b2e0 Fix typo
Change-Id: I1e2e4c1eb92200934a7d023fa2a3c065904be2db
2017-08-09 19:05:17 +00:00
Jenkins 54953ed06c Merge "Improve cache about get products" 2017-08-09 05:49:42 +00:00