Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion contivmodel/contivModel.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"errors"
log "github.com/Sirupsen/logrus"
"github.com/contiv/netplugin/objdb/modeldb"
"github.com/contiv/netplugin/utils/netutils"
"github.com/gorilla/mux"
"net/http"
"regexp"
Expand Down Expand Up @@ -3457,7 +3458,8 @@ func ValidateNetprofile(obj *Netprofile) error {
return errors.New("bandwidth string invalid format")
}

if obj.Burst > 10486 {
bwint64 := netutils.ConvertBandwidth(obj.Bandwidth)
Copy link
Copy Markdown
Contributor

@dseevr dseevr Jun 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this function? It looks like it wasn't included in the PR, but I see it in the other PR

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function from the netutils.ConvertBandwidth and we use it directly()。The function will be convert the Bandwidth value, and the value type is int64.

if int64(obj.Burst) > bwint64 {
return errors.New("burst Value Out of bound")
}

Expand Down