diff --git a/pkg/innerring/processors/audit/process.go b/pkg/innerring/processors/audit/process.go index bb430e398f..28e8301e25 100644 --- a/pkg/innerring/processors/audit/process.go +++ b/pkg/innerring/processors/audit/process.go @@ -90,7 +90,8 @@ func (ap *Processor) processStartAudit(epoch uint64) { WithContainerID(containers[i]). WithStorageGroupList(storageGroups). WithContainerStructure(cnr). - WithContainerNodes(nodes) + WithContainerNodes(nodes). + WithNetworkMap(nm) if err := ap.taskManager.PushTask(auditTask); err != nil { ap.log.Error("could not push audit task", diff --git a/pkg/services/audit/task.go b/pkg/services/audit/task.go index 118518796c..b7b212e05a 100644 --- a/pkg/services/audit/task.go +++ b/pkg/services/audit/task.go @@ -18,6 +18,8 @@ type Task struct { cnr *container.Container + nm *netmap.Netmap + cnrNodes netmap.ContainerNodes sgList []*object.ID @@ -88,6 +90,20 @@ func (t *Task) WithContainerNodes(cnrNodes netmap.ContainerNodes) *Task { return t } +// NetworkMap returns network map of audit epoch. +func (t *Task) NetworkMap() *netmap.Netmap { + return t.nm +} + +// WithNetworkMap sets network map of audit epoch. +func (t *Task) WithNetworkMap(nm *netmap.Netmap) *Task { + if t != nil { + t.nm = nm + } + + return t +} + // ContainerNodes returns nodes in the container under audit. func (t *Task) ContainerNodes() netmap.ContainerNodes { return t.cnrNodes