Skip to content

TPT-4701: Replace hardcoded string values with Capability enum class attributes - #747

Open
mawilk90 wants to merge 1 commit into
linode:devfrom
mawilk90:feature/TPT-4701-replace-hardcoded-capabilities-with-capability-class
Open

mawilk90 wants to merge 1 commit into
linode:devfrom
mawilk90:feature/TPT-4701-replace-hardcoded-capabilities-with-capability-class

Conversation

@mawilk90

@mawilk90 mawilk90 commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

📝 Description

Most of 'capabilities' have hardcoded string values. 'Capability' enum class attributes can be used instead.

✔️ How to Test

make test-int

@mawilk90 mawilk90 added improvement for improvements in existing functionality in the changelog. testing for updates to the testing suite in the changelog. labels Oct 5, 2026
@mawilk90 mawilk90 changed the title Replace hardcoded string values with Capability enum class attributes TPT-4701: Replace hardcoded string values with Capability enum class attributes Oct 5, 2026
@mawilk90
mawilk90 marked this pull request as ready for review October 6, 2026 06:28
@mawilk90
mawilk90 requested review from a team as code owners October 6, 2026 06:28
@mawilk90
mawilk90 requested review from ezilber-akamai, lgarber-akamai and psnoch-akamai and a balanced review from Copilot and removed request for a team October 6, 2026 06:28

Copilot AI left a comment

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.

Copilot review overview

🟢 Approval recommended

All replacements map correctly to existing enum members, preserve behavior, and the changed files parse successfully.

Review effort: Balanced
Findings: None

What changed in this PR

Replaces capability string literals in tests with the SDK’s Capability enum.

Changes:

  • Updates region capability filters and assertions.
  • Types integration helpers with Capability.
  • Adds required enum imports.
File Description
test/​unit/​linode_client_test.py Uses enums in capability assertions.
test/​integration/​models/​vpc/​test_vpc.py Updates VPC region filtering.
test/​integration/​models/​volume/​test_volume.py Updates volume region filtering.
test/​integration/​models/​volume/​test_blockstorage.py Updates block-storage region filters.
test/​integration/​models/​sharegroups/​test_sharegroups.py Updates share-group fixture filtering.
test/​integration/​models/​placement/​test_placement.py Updates placement-region filtering.
test/​integration/​models/​nodebalancer/​test_nodebalancer.py Updates NodeBalancer region filtering.
test/​integration/​models/​networking/​test_networking.py Updates networking region filters.
test/​integration/​models/​monitor/​test_monitor_logs.py Updates monitor region filtering.
test/​integration/​models/​lock/​test_lock.py Updates lock fixture filtering.
test/​integration/​models/​lke/​test_lke.py Updates LKE region filters.
test/​integration/​models/​linode/​test_linode.py Updates Linode capability filters and assertions.
test/​integration/​models/​image/​test_image.py Updates image-upload region filtering.
test/​integration/​models/​firewall/​test_firewall.py Updates firewall fixture filtering.
test/​integration/​models/​account/​test_account.py Updates account test region filtering.
test/​integration/​linode_client/​test_linode_client.py Updates client integration region filters.
test/​integration/​filters/​fixtures.py Updates filter fixture region selection.
test/​integration/​conftest.py Centralizes capability constants and type annotations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement for improvements in existing functionality in the changelog. testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants