Skip to content

feat(IAM Policy Management): add support for action control templates from IAM #289

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

Merged
merged 2 commits into from
May 7, 2025

Conversation

Rajesh-Pirati
Copy link
Contributor

PR summary

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

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Issue: https://github.ibm.com/IAM/AM-issues/issues/3395

@Rajesh-Pirati
Copy link
Contributor Author

integration test results

pytest  test/integration/test_iam_policy_management_v1.py 
================================================================================================================ test session starts ================================================================================================================
platform darwin -- Python 3.12.4, pytest-7.4.4, pluggy-1.5.0
rootdir: /Users/rajesh/iam-project/platform-sdk/platform-services-python-sdk
plugins: cov-4.1.0
collected 52 items                                                                                                                                                                                                                                  

test/integration/test_iam_policy_management_v1.py ....................................................                                                                                                                                        [100%]

================================================================================================================ 52 passed in 33.48s ================================================================================================================

Examples

pytest examples/test_iam_policy_management_v1_examples.py
================================================================================================================ test session starts ================================================================================================================
platform darwin -- Python 3.12.4, pytest-7.4.4, pluggy-1.5.0
rootdir: /Users/rajesh/iam-project/platform-sdk/platform-services-python-sdk
plugins: cov-4.1.0
collected 47 items                                                              

@padamstx padamstx self-assigned this May 5, 2025
@padamstx padamstx self-requested a review May 5, 2025 16:07
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.

Examples code is missing a test for one operation and the integration test code is missing a test for one operation as well.

@@ -61,6 +61,13 @@
example_target_account_id = None
example_assignment_etag = None
example_account_settings_etag = None
example_action_control_template_id = None
Copy link
Member

Choose a reason for hiding this comment

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

If you add links to your API definition to describe the inter-operation dependencies, then the SDK generator would be able to generate these local variables automatically and also emit the code to assign their values and to also use their value at the appropriate places.
Video tutorial: https://secure.video.ibm.com/channel/23887899/playlist/651457/video/133486086

@@ -1064,6 +1071,345 @@ def test_update_access_management_account_settings_example(self):
except ApiException as e:
pytest.fail(str(e))

@needscredentials
Copy link
Member

Choose a reason for hiding this comment

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

This file is missing a test for the delete_action_control_template_version operation.

)
assert response.get_status_code() == 204

def test_45_list_policy_template_versions(self):
Copy link
Member

Choose a reason for hiding this comment

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

typo in function name? doesn't match operation being tested

@@ -974,3 +982,323 @@ def test_34_update_access_management_account_settings(self):
assert result.external_account_identity_interaction.identity_types.service.state == "monitor"
assert result.external_account_identity_interaction.identity_types.service_id is not None
assert result.external_account_identity_interaction.identity_types.service_id.state == "monitor"

Copy link
Member

Choose a reason for hiding this comment

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

Missing test for the get_action_control_template_assignment operation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

adding now.. Thanks

@Rajesh-Pirati Rajesh-Pirati marked this pull request as ready for review May 6, 2025 17:51
@Rajesh-Pirati
Copy link
Contributor Author

Integration test results

pytest test/integration/test_iam_policy_management_v1.py
=============================================================================================================== test session starts ===============================================================================================================
platform darwin -- Python 3.13.3, pytest-7.4.4, pluggy-1.5.0
rootdir: /Users/rajesh/iam-project/platform-sdk/platform-services-python-sdk
plugins: cov-4.1.0
collected 53 items                                                                                                                                                                                                                                

test/integration/test_iam_policy_management_v1.py .....................................................                                                                                                                                     [100%]

=============================================================================================================== 53 passed in 34.50s ===============================================================================================================

Examples

pytest examples/test_iam_policy_management_v1_examples.py
=============================================================================================================== test session starts ===============================================================================================================
platform darwin -- Python 3.13.3, pytest-7.4.4, pluggy-1.5.0
rootdir: /Users/rajesh/iam-project/platform-sdk/platform-services-python-sdk
plugins: cov-4.1.0
collected 48 items                                                                                                                                                                                                                                

examples/test_iam_policy_management_v1_examples.py ................................................                                                                                                                                         [100%]

========================================================================================================= 48 passed in 143.81s (0:02:23) ==========================================================================================================

…es based on review feedback

Signed-off-by: Rajesh Pirati <[email protected]>
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 579ae95 into main May 7, 2025
16 checks passed
@padamstx padamstx deleted the 3395-action-control-templates branch May 7, 2025 16:53
ibm-devx-sdk pushed a commit that referenced this pull request May 7, 2025
# [0.65.0](v0.64.0...v0.65.0) (2025-05-07)

### Features

* **IAM Policy Management:** add support for action control templates from IAM ([#289](#289)) ([579ae95](579ae95))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 0.65.0 🎉

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.

3 participants