-
Notifications
You must be signed in to change notification settings - Fork 43
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
CSS-10237 generic access imports #571
CSS-10237 generic access imports #571
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a question, and waiting for #552 to land.
resp.Diagnostics.AddError( | ||
"ImportState Failure", | ||
fmt.Sprintf("Malformed Import ID %q, "+ | ||
"please use format '<resourceTag>:<access>' e.g. %s", IDstr, a.targetResource.ImportHint()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: What is this going to look like in real life? I suggest adding a file: examples/resources/juju_access_jaas_model/import.sh, with the details. You'll need to add these files eventually.
question: what is a "<resourceTag>"? Suggest using a format provided by each type, rather than a generic "resourceTag" indicator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed '<resourceTag>:<access>'
so now the message is just please use format %q
where the %q
is replaced with the import hint.
In the case of a model the import hint is "model-<UUID>:<access-level>"
26ff384
to
034adb4
Compare
- Added missing docstring
034adb4
to
b6bd624
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/merge |
Description
This PR builds on top of #552.
In this PR we implement imports for any resources built on top of the JAAS generic access resource. Imports are enabled via a string of the format
resourceTag:accessLevel
. The concrete resource must also implement an import "hint" to guide users, e.g. the JAAS model access resource hints that the import string must be something like "model-UUID:writer".Fixes: CSS-10237
Type of change