Skip to content

Commit

Permalink
refactor: peer group is now optional
Browse files Browse the repository at this point in the history
Peer group support is deprecated in AFK.
We keep them only to help to migrate.
  • Loading branch information
kpetremann committed Feb 20, 2024
1 parent db05db1 commit 2224187
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/convertor/device/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/criteo/data-aggregation-api/internal/model/dcim"
"github.com/criteo/data-aggregation-api/internal/model/openconfig"
"github.com/openconfig/ygot/ygot"
"github.com/rs/zerolog/log"
)

const AFKEnabledTag = "afk-enabled"
Expand Down Expand Up @@ -73,7 +74,7 @@ func NewDevice(dcimInfo *dcim.NetworkDevice, devicesData *repository.AssetsPerDe

device.PeerGroups, ok = devicesData.PeerGroups[dcimInfo.Hostname]
if !ok {
return nil, fmt.Errorf("no peer-groups found for %s", dcimInfo.Hostname)
log.Warn().Msgf("no peer-groups found for %s", dcimInfo.Hostname)
}

device.PrefixLists, ok = devicesData.PrefixLists[dcimInfo.Hostname]
Expand Down

0 comments on commit 2224187

Please sign in to comment.