Skip to content

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

Merged
padamstx merged 2 commits intomainfrom
3395-action-control-templates
May 7, 2025
Merged

feat(IAM Policy Management): add support for action control templates from IAM#289
padamstx merged 2 commits intomainfrom
3395-action-control-templates

Conversation

@Rajesh-Pirati
Copy link
Copy Markdown
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

… from IAM

Signed-off-by: Rajesh Pirati <rajesh.pirati@ibm.com>
@Rajesh-Pirati
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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.

example_target_account_id = None
example_assignment_etag = None
example_account_settings_etag = None
example_action_control_template_id = None
Copy link
Copy Markdown
Contributor

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

except ApiException as e:
pytest.fail(str(e))

@needscredentials
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

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
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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 <rajesh.pirati@ibm.com>
Copy link
Copy Markdown
Contributor

@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
Copy Markdown

🎉 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