-
Notifications
You must be signed in to change notification settings - Fork 180
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
Ensure global config is valid before creating network #1070
Conversation
build PR |
build PR |
2 similar comments
build PR |
build PR |
build PR |
1 similar comment
build PR |
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
netmaster/objApi/apiController.go
Outdated
|
||
func validateGlobalConfig(netmode string) error { | ||
globalConfig := contivModel.FindGlobal("global") | ||
if globalConfig.FwdMode == "" { |
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.
globalConfig != nil check ?
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 don't think globalConfig
would be nil
once the netmaster started, although i can add the check
When global config (espeically fwd mode) is not set, we shouldn't allow creating network. The network created at that moment is may not having enough data to proceed. Also ensure global settings are set before any network creating in objapi_test Signed-off-by: Wei Tie <[email protected]>
squashed |
build PR |
👍 |
When global config (espeically fwd mode) is not set, we shouldn't
allow creating network. The network created at that moment is may
not having enough data to proceed.
Signed-off-by: Wei Tie [email protected]