Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FOPTS-6034 Make Azure New Marketplace Products Policy Support MSP Configurations #2920

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

midir99
Copy link
Contributor

@midir99 midir99 commented Jan 8, 2025

Description

We changed the method used to obtain the bill connections, now instead of calling the bill-connects API we fetch cost data and get the bill connections from there, this change is required since MSP customers have a different way of configuring their bill connects, and that method would make the policy fail.

This also adds support for MCA connections.

Code change used here is based on already tested code for policy template Azure Savings Realized from Reservations.

Issues Resolved

Link to Example Applied Policy

image

Contribution Check List

  • New functionality includes testing.
  • New functionality has been documented in the README if applicable
  • New functionality has been documented in CHANGELOG.MD

IMPORTANT ❗❗❗

Please ignore the following message:

image

The linter is not able to tell that the script that this datasource uses puts the parameters according to the rule we have:

image

… data based on type of azure connection (mca cbi, en, en old)
Copy link
Contributor

github-actions bot commented Jan 8, 2025

1 Error
🚫

operational/azure/marketplace_new_products/azure_marketplace_new_products.pt

run_script statements found whose parameters are not in the correct order. run_script parameters should be in the following order: script, val(iter_item, string), datasources, parameters, variables, raw values:

Line 256: ds_current_products_oldconnection / run_script $js_get_products_oldconnection
Line 355: ds_current_products_newconnection / run_script $js_get_products_newconnection
Line 447: ds_current_products_mcacbiconnection / run_script $js_get_products_mcacbiconnection

1 Warning
⚠️

operational/azure/marketplace_new_products/azure_marketplace_new_products.pt

Policy template updated but associated README.md file has not been. Please verify that any necessary changes have been made to the README.

1 Message
📖

Github Pull Request

Pull Request is missing READY-FOR-REVIEW label. Please add this label if this Pull Request is ready for review.

Please note that this message may be a false positive if you've added the label after Dangerfile tests were run, since adding labels does not trigger them to run again. In these cases, simply ignore this message.

Generated by 🚫 Danger

@midir99 midir99 changed the title Azure New Marketplace Products Fix FOPTS-6034 Azure New Marketplace Products Fix Jan 14, 2025
@midir99 midir99 self-assigned this Jan 14, 2025
@midir99 midir99 added the enhancement New feature or request label Jan 14, 2025
@midir99 midir99 changed the title FOPTS-6034 Azure New Marketplace Products Fix FOPTS-6034 Make Azure New Marketplace Products Policy Support MSP Configurations Jan 15, 2025
@midir99 midir99 added READY-FOR-REVIEW javascript Pull requests that update Javascript code labels Jan 15, 2025
@midir99 midir99 marked this pull request as ready for review January 15, 2025 19:26
@midir99 midir99 requested a review from a team as a code owner January 15, 2025 19:26
@midir99 midir99 marked this pull request as draft January 15, 2025 19:28
@midir99 midir99 marked this pull request as ready for review January 15, 2025 19:47
@midir99 midir99 requested a review from juanestrahcl January 15, 2025 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javascript Pull requests that update Javascript code READY-FOR-REVIEW
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants