-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add validators to transport node resource #1111
Conversation
When user provides empty strings or empty lists, NSX fails the request without specifying what exactly is missing. It is preferrable to fail those invalid configs on plan stage. Signed-off-by: Anna Khmelnitsky <[email protected]>
52c7b50
to
247d896
Compare
/test-all |
I'm wondering if the same issue also exists in other resources. |
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
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
While I agree it might be best to fail in plan stage and I also think the issue will exist in other resources, we should also not forget that we don't want to do validation in place of NSX API, as this will create logic duplication and possibly create a bit of complexity in Interop. It's fine though to pre-validate those field which should not be empty, as that's not something that should be expected to change in NSX API evolution. Regardless I would not scan all existing resources for these case, maybe let's just consider doing this in auto-generated code. |
I'm reluctant to apply this validator to released resources, since this can break backwards compatibility. But we can go over resources in |
When user provides empty strings or empty lists, NSX fails the request without specifying what exactly is missing. It is preferrable to fail those invalid configs on plan stage.