-
Notifications
You must be signed in to change notification settings - Fork 9
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
CSP Backend uses a hardcoded value for "target_basename" #34
Comments
FreeNAS was not originally in scope for this CSP and a lot of these things got neglected. However, since the target prefix is a backend specific detail, it belongs in the |
How about this? TrueNAS already knows its target basename value - which is available through the API by calling n.b. I've updated PR #35 to do just that. |
Thanks for the revision. I like this solution better, but I think we can improve it further. After noodling this a bit I think there shouldn't be a hard coded default at all. We don't want users to be frisky and think they can use any odd target prefix and I would like the CSP to actually validate that the target name has a valid prefix, which in this case is any of the two TrueNAS/FreeNAS prefixes. It should fail otherwise and tell the user why. |
Oddly enough, that's how I'd done things originally but switched to using a default value at the last minute to maintain consistent behavior. My latest commit reverts back to raising |
Thanks for collaborating on this. However, I want to make this solution even simpler. The current hardcoded value should be made into a list ( truenas-csp/truenascsp/truenascsp.py Line 414 in 339486d
While examining this code I see that I completely left out the verification of the target name in the first place, which is unintentional. |
Fixed in #40 |
CSP Backend uses a hardcoded value for
target_basename
(e.g.iqn.2011-08.org.truenas.ctl
).This should be overridable.
The text was updated successfully, but these errors were encountered: