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

feat(Catalog Management): support change notices and plan id in offer… #325

Merged
merged 3 commits into from
May 3, 2024

Conversation

benbuchanan
Copy link
Contributor

…ing instance create

PR summary

Need these changes to update the catalog management terraform provider.

  • Now support plan id on offering instance create
  • New field called change notices on an offering version

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

Current vs new behavior

Just adding new fields that our api now supports. Needed to update our terraform provider.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

…ing instance create

Signed-off-by: Ben Buchanan <buchanan@ibm.com>
@CLAassistant
Copy link

CLAassistant commented May 1, 2024

CLA assistant check
All committers have signed the CLA.

@benbuchanan benbuchanan requested a review from padamstx May 1, 2024 14:24
@padamstx padamstx self-assigned this May 1, 2024
Signed-off-by: Ben Buchanan <buchanan@ibm.com>
Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Need to re-gen with the latest version of the SDK generator in order to leverage the new support for error handling in the Go SDK and Terraform providers.
  2. Need to add working examples code and integration tests for the GetPlan, DeletePlan, ConsumablePlan, and SetDeprecatePlan operations.

@@ -377,6 +377,31 @@ var _ = Describe(`CatalogManagementV1 Examples Tests`, func() {
offeringID = *offering.ID
})

It(`GetOfferingChangeNotices request example`, func() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no examples for the get_plan, delete_plan, consumable_plan or set_deprecate_plan operations.

@@ -610,6 +610,12 @@ var _ = Describe(`CatalogManagementV1 Integration Tests`, func() {
Evaluations: []catalogmanagementv1.Evaluation{*evaluationModel},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No integration tests for the get_plan, delete_plan, consumable_plan, set_deprecate_plan operations.

@benbuchanan
Copy link
Contributor Author

@padamstx Our API does not have the ability to create a plan unless the token making the call is an approver (Plans are created in Partner Center and they call us with an approver token to create them). We just provide another way to manage them with the delete, deprecate, publish.

Is there precedence for running tests with a different token?

@padamstx
Copy link
Member

padamstx commented May 1, 2024

@padamstx Our API does not have the ability to create a plan unless the token making the call is an approver (Plans are created in Partner Center and they call us with an approver token to create them). We just provide another way to manage them with the delete, deprecate, publish.

Is there precedence for running tests with a different token?

Yes, I think the enterprise management integration tests might do that. Essentially, you'd need to manually change the integration test code so that you create two different instances of the service client, and for each one you'd use a different instance of the IAM authenticator that is configured with the appropriate apikey. Then you'd need to use the correct instance of the service client when invoking operations.
In your .env file that contains the config properties, you could define two sets of properties, with different service name prefixes. Then in the int tests and examples, you could pass in the appropriate service name when constructing the service. Ping me on slack if you need more details.

Signed-off-by: Ben Buchanan <buchanan@ibm.com>
@benbuchanan
Copy link
Contributor Author

example tests:

Ran 709 of 738 Specs in 48.630 seconds
SUCCESS! -- 709 Passed | 0 Failed | 0 Pending | 29 Skipped
PASS
ok  	github.com/IBM/platform-services-go-sdk/catalogmanagementv1	49.332s

integration tests:

Ran 720 of 776 Specs in 43.556 seconds
SUCCESS! -- 720 Passed | 0 Failed | 0 Pending | 56 Skipped
PASS
ok  	github.com/IBM/platform-services-go-sdk/catalogmanagementv1	44.380s

@benbuchanan benbuchanan requested a review from padamstx May 3, 2024 11:48
Copy link
Member

@padamstx padamstx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@padamstx padamstx merged commit 66e14c5 into IBM:main May 3, 2024
3 checks passed
ibm-devx-sdk pushed a commit that referenced this pull request May 3, 2024
## [0.62.11](v0.62.10...v0.62.11) (2024-05-03)

### Bug Fixes

* **Catalog Management:** support change notices and plan id in offering instance create ([#325](#325)) ([66e14c5](66e14c5))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 0.62.11 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants