Skip to content

Refactor NotificationConfigurations.list() to use iterator pattern#109

Merged
isivaselvan merged 5 commits intohashicorp:next-0.1.3from
TanyaSingh369-svg:refactor/iterator/notify-config
Mar 12, 2026
Merged

Refactor NotificationConfigurations.list() to use iterator pattern#109
isivaselvan merged 5 commits intohashicorp:next-0.1.3from
TanyaSingh369-svg:refactor/iterator/notify-config

Conversation

@TanyaSingh369-svg
Copy link
Copy Markdown
Contributor

@TanyaSingh369-svg TanyaSingh369-svg commented Mar 5, 2026

Description

Refactored Notification Configuration resource to implement the iterator pattern for listing operations.

Changes Include

  • Updated NotificationConfigurations.list() to return Iterator[NotificationConfiguration]
  • Replaced list-style response handling with generator-based iteration
  • Implemented lazy evaluation using the shared _Service._list() helper for automatic pagination
  • Updated unit tests to properly consume the iterator and validate API calls
  • Maintained backward compatibility for existing model structures

In Examples

  • Verified iterator-based usage in examples/notification_configuration.py
  • Demonstrated listing of notification configurations using iterator pattern
  • Validated create → read → update → verify → delete workflow

Testing

All unit tests passing.

  • Full test suite: 396 passed
  • Notification configuration tests: 31 passed

Notification Configuration Tests

Screenshot 2026-03-05 at 5 54 47 PM Screenshot 2026-03-05 at 5 55 46 PM

Notification Configuration API Example for organization: prab-sandbox01

Example execution:

Screenshot 2026-03-05 at 5 57 53 PM

@TanyaSingh369-svg TanyaSingh369-svg requested a review from a team as a code owner March 5, 2026 12:34
@isivaselvan isivaselvan merged commit 9306d7f into hashicorp:next-0.1.3 Mar 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants