Skip to content

feat: add label management to destination, fragment, and certificate clients#57

Merged
cassiofariasmachado merged 3 commits intomainfrom
feature/add-destinations-labels-management
Apr 15, 2026
Merged

feat: add label management to destination, fragment, and certificate clients#57
cassiofariasmachado merged 3 commits intomainfrom
feature/add-destinations-labels-management

Conversation

@cassiofariasmachado
Copy link
Copy Markdown
Contributor

@cassiofariasmachado cassiofariasmachado commented Apr 15, 2026

Description

Add label management capabilities to the destination, fragment, and certificate clients. Labels are key-value metadata that can be attached to resources and used for filtering list operations via OData expressions.

Related Issue

N/A

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Dependency update

How to Test

  1. Create a destination/fragment/certificate
  2. Call update_*_labels to assign labels
  3. Call get_*_labels and verify labels are returned
  4. Call patch_*_labels with action="proxy.php?url=https%3A%2F%2Fgithub.com%2FSAP%2Fcloud-sdk-python%2Fpull%2FADD" and verify merge
  5. Call list_subaccount_* with filter=ListOptions(filter_labels=[Label(key="env", values=["prod"])]) and verify only matching resources are returned

Checklist

  • I have read the Contributing Guidelines
  • I have verified that my changes solve the issue
  • I have added/updated automated tests to cover my changes
  • All tests pass locally
  • I have verified that my code follows the Code Guidelines
  • I have updated documentation (if applicable)
  • I have added type hints for all public APIs
  • My code does not contain sensitive information (credentials, tokens, etc.)
  • I have followed Conventional Commits for commit messages

Breaking Changes

None.

Additional Notes

  • Label and PatchLabels are exported from the public sap_cloud_sdk.destination API
  • filter_labels in ListOptions is mutually exclusive with filter_names
  • Label operations are administrative (no access_strategy/tenant parameter)
  • Local dev clients store labels inline in the entity JSON under a "labels" key; update_* operations preserve labels

…clients

- Add Label and PatchLabels dataclasses to models
- Add get/update/patch label methods to all three cloud clients (destination, fragment, certificate) at both instance and subaccount levels
- Add same label methods to local dev clients for offline testing
- Add filter_labels support to ListOptions for OData label filtering
- Add filter parameter to all list methods (fragment list methods now also support label filtering)
- Add PATCH support to DestinationHttp
- Add label helper methods to LocalDevClientBase
- Add 9 new Operation enum entries for telemetry
- Export Label and PatchLabels from the public API
- Add comprehensive unit and integration tests for all new functionality
@cassiofariasmachado cassiofariasmachado requested a review from a team as a code owner April 15, 2026 20:26
@cassiofariasmachado cassiofariasmachado merged commit 97334a1 into main Apr 15, 2026
9 of 10 checks passed
@cassiofariasmachado cassiofariasmachado deleted the feature/add-destinations-labels-management branch April 15, 2026 21:44
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.

2 participants