epam / cloud-pipeline

Cloud agnostic genomics analysis, scientific computation and storage platform
https://cloud-pipeline.com
Apache License 2.0
144 stars 58 forks source link

Filter Billing Reports by Cloud Provider / Cloud Region #1277

Open sidoruka opened 3 years ago

sidoruka commented 3 years ago

Background At the moment, Cloud Pipeline allows displaying the AWS/GCP/Azure instance types and their usage. But there is no way to get the overall per-Cloud or per-region information.

Approach

sidoruka commented 3 years ago

Backport to release/0.16

rodichenko commented 3 years ago

@sidoruka done (#1284), backported to release/0.16 (d2ad0dc7e8edc5cc7b36cad0118de00bbf8bcce3)

NShaforostov commented 3 years ago

@sidoruka a little question: For example, the user has the ROLE_BILLING_MANAGER role (and has the "full" access to the Billing - according to #1258), but in "Cloud Regions" section of the System settings that user is admitted to restricted number of regions/providers. In such case, should that user have the ability to view spendings for any region/provider or only for available for him/her via the System settings?

NShaforostov commented 3 years ago

@sidoruka a little question: For example, the user has the ROLE_BILLING_MANAGER role (and has the "full" access to the Billing - according to #1258), but in "Cloud Regions" section of the System settings that user is admitted to restricted number of regions/providers. In such case, should that user have the ability to view spendings for any region/provider or only for available for him/her via the System settings?

@rodichenko we've discussed the question above and resolved that the user with the ROLE_BILLING_MANAGER role shall have the ability to view spendings for any platform region/provider (i.e. regardless of the regions available for that user via the System settings). So, could you add the corresponding ability to select any region for the "Provider/region" dropdown list?

rodichenko commented 3 years ago

@NShaforostov @mzueva @sidoruka to implement this we need separate API method to fetch all configured regions, not only available for specific user (we use GET cloud/region for now)

rodichenko commented 3 years ago

@mzueva seems like there is an error for storages reports if we specify both cloudRegionId=[regionId, regionId, regionId, ...] and resource_type=["STORAGE"] filters - server responds with {status: 'OK'}

mzueva commented 3 years ago

@NShaforostov Cloud you please verify it?

rodichenko commented 3 years ago

@sidoruka @NShaforostov https://github.com/epam/cloud-pipeline/issues/1277#issuecomment-679009181 implementation is backported to release/0.16 (3e26b88c653eeb3d8783bec66bcca8d5cd0ab5ac)

NShaforostov commented 3 years ago

Verified

mzueva commented 3 years ago

backported to release/0.16 via 98481a9215855fc24f40874281d1137d7cf0f9b0

sidoruka commented 3 years ago

@mzueva, if I remember correctly this one is still in progress due to some GCP authentication issues. Update: I see, it is probably related to #1348. Let's keep this one open as well.