Add TRAIT_LICENSE_PROFILE to license resources#48
Conversation
Add the license profile trait alongside the existing role trait on license resources so that the License Management via MCP feature can discover and manage Tableau license data. Each license resource now carries a LicenseProfileTrait annotation with the license name and a link to the member entitlement that tracks which users hold that license. Fixes: CXH-1933
Add the TRAIT_LICENSE_PROFILE trait to the license resource type in the capabilities metadata to match the code change.
| } | ||
|
|
||
| ret, err := rs.NewRoleResource(license, resourceTypeLicense, licenseID, roleTraitOptions) | ||
| licenseResource := &v2.Resource{ |
There was a problem hiding this comment.
🟡 Suggestion: The local variable licenseResource shadows the enclosing function licenseResource. It's harmless here (no recursion), but renaming it (e.g. licRes) avoids reader confusion. (confidence: high)
Connector PR Review: Add TRAIT_LICENSE_PROFILE to license resourcesBlocking Issues: 0 | Suggestions: 1 | Threads Resolved: 0 Review SummaryScanned the full PR diff for security and correctness. This change adds Security IssuesNone found. Correctness IssuesNone found. Suggestions
Prompt for AI agentsVerify each finding against the current code and only fix it if needed. SuggestionsIn pkg/connector/license.go:
|
Summary
TRAIT_LICENSE_PROFILEto the license resource type alongside the existingTRAIT_ROLEtraitLicenseProfileTraitcontaining the license name and a link to thememberentitlement that tracks which users hold that licenseDetails
The existing license implementation already models Tableau's site-role-based licensing as role resources with entitlements and grants. This change adds the
TRAIT_LICENSE_PROFILEannotation so that the license management system can identify these resources as licenses and correlate seat usage via the linked entitlement IDs.Tableau's REST API does not expose purchased seat counts, so seat counts are omitted from the trait. Consumed seats can be derived from the existing grants (users with the
memberentitlement on each license).Test plan
go build ./...passesgo test ./...passesFixes: CXH-1933
Automated PR Notice
This PR was automatically created by c1-dev-bot as a potential implementation.
This code requires: