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

fix(IAM Policy Management): re-gen service after fix the assignment response #321

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

Rajesh-Pirati
Copy link
Contributor

PR summary

Fix assignment resources target metadata
issue: https://github.ibm.com/IAM/AM-issues/issues/2348

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

test results
integration

go test -tags=integration
Running Suite: IamPolicyManagementV1 Suite
==========================================
Random Seed: 1713859488
Will run 262 of 262 specs

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
------------------------------
• [SLOW TEST:6.396 seconds]
IAM Policy Management - Integration Tests
/Users/rajesh/iam-project/platform-sdk/platform-services-go-sdk/iampolicymanagementv1/iam_policy_management_v1_integration_test.go:38
  Create an access policy
  /Users/rajesh/iam-project/platform-sdk/platform-services-go-sdk/iampolicymanagementv1/iam_policy_management_v1_integration_test.go:118
    Successfully created an access policy
    /Users/rajesh/iam-project/platform-sdk/platform-services-go-sdk/iampolicymanagementv1/iam_policy_management_v1_integration_test.go:120
------------------------------
••••••••••••••••••••••••••••••••
Ran 262 of 262 Specs in 35.848 seconds
SUCCESS! -- 262 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS
ok  	github.com/IBM/platform-services-go-sdk/iampolicymanagementv1	37.044s

examples:

"resources": [
    {
      "target": {
        "type": "Account",
        "id": "0ddc8e9eb0894383b48791ff4ba0b80e"
      },
      "policy": {
        "resource_created": {
          "id": "475f7d78-a26c-453f-9bab-3ac9ed165e2d"
        }
      }
    }
  ],
  "template": {
    "id": "policyTemplate-d701c21c-1a06-4666-b1da-05f1d29adea8",
    "version": "1"
  },
  "status": "succeeded"
}
•
GetV2Policy() result:
{
  "type": "authorization",
  "description": "Test Template v2",
  "subject": {
    "attributes": [
      {
        "key": "serviceName",
        "operator": "stringEquals",
        "value": "compliance"
      },
      {
        "key": "accountId",
        "operator": "stringEquals",
        "value": "0ddc8e9eb0894383b48791ff4ba0b80e"
      }
    ]
  },
  "resource": {
    "attributes": [
      {
        "key": "serviceName",
        "operator": "stringEquals",
        "value": "appid"
      },
      {
        "key": "accountId",
        "operator": "stringEquals",
        "value": "0ddc8e9eb0894383b48791ff4ba0b80e"
      }
    ]
  },
  "id": "475f7d78-a26c-453f-9bab-3ac9ed165e2d",
  "href": "https://iam.test.cloud.ibm.com/v1/policies/475f7d78-a26c-453f-9bab-3ac9ed165e2d",
  "control": {
    "grant": {
      "roles": [
        {
          "role_id": "crn:v1:bluemix:public:iam::::serviceRole:Reader"
        }
      ]
    }
  },
  "created_at": "2024-04-23T08:11:29.192Z",
  "created_by_id": "IBMid-56300",
  "last_modified_at": "2024-04-23T08:11:29.192Z",
  "last_modified_by_id": "IBMid-56300",
  "state": "active",
  "template": {
    "id": "policyTemplate-d701c21c-1a06-4666-b1da-05f1d29adea8",
    "version": "1",
    "assignment_id": "policyAssignment-692b5bc0-f558-4435-a1a7-e9e665c7f979"
  }
}
••••
Ran 261 of 261 Specs in 25.325 seconds
SUCCESS! -- 261 Passed | 0 Failed | 0 Pending | 0 Skipped
PASS
ok  	github.com/IBM/platform-services-go-sdk/iampolicymanagementv1	27.254s

Copy link
Contributor

@swcolley swcolley left a comment

Choose a reason for hiding this comment

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

LGTM

@Rajesh-Pirati Rajesh-Pirati marked this pull request as ready for review April 23, 2024 19:29
@padamstx padamstx self-assigned this Apr 24, 2024
@padamstx padamstx self-requested a review April 24, 2024 13:16
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 2e4a365 into main Apr 24, 2024
4 checks passed
@padamstx padamstx deleted the Fix-assignment-response-metadata branch April 24, 2024 13:17
ibm-devx-sdk pushed a commit that referenced this pull request Apr 24, 2024
## [0.62.7](v0.62.6...v0.62.7) (2024-04-24)

### Bug Fixes

* **IAM Policy Management:** re-gen service after fixing the assignment response ([#321](#321)) ([2e4a365](2e4a365))
@ibm-devx-sdk
Copy link

🎉 This PR is included in version 0.62.7 🎉

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