Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
DanG100 committed Sep 28, 2023
1 parent c569cd6 commit b29e373
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dataplane/standalone/saiserver/attrmgr/attrmgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ func (mgr *AttrMgr) PopulateAttributes(req, resp proto.Message) error {
enumVal := reqList.Get(i).Enum()
val, ok := mgr.attrs[id][int32(enumVal)]
if !ok {
// log.Errorf("requested attribute not set: id %v, obj type %v, enum %v", id, mgr.GetType(id), reqList.Get(i))
// continue
return fmt.Errorf("requested attribute not set: %v", reqList.Get(i))
}
// Empty lists exist so they are not errors, but are not settable.
Expand Down Expand Up @@ -212,7 +210,9 @@ func (mgr *AttrMgr) PopulateAllAttributes(id string, msg proto.Message) error {
return nil
}

// storeAttributes stores all the attributes in the message.
// StoreAttributes stores all the attributes in the message.
// Note: for lists, a nil lists is an unset attribute, but a non-nil empty list is set.
// so querying a nil list returns an error, even though they look the same on the wire.
func (mgr *AttrMgr) StoreAttributes(id uint64, msg proto.Message) {
mgr.storeAttributes(fmt.Sprint(id), msg)
}
Expand Down

0 comments on commit b29e373

Please sign in to comment.