routing: add option to force import MC pair history

This commit adds the `force` flag to the `XImportMissionControl` RPC
which allows skipping rules around the pair import except for what is
mandatory to make values meaningful. This can be useful for when clients
would like to forcibly override MC state in order to manipulate routing
results.
This commit is contained in:
Andras Banki-Horvath
2022-01-19 17:01:09 +01:00
parent 3829385073
commit 23c157a07b
8 changed files with 479 additions and 400 deletions

View File

@@ -553,7 +553,9 @@ func (s *Server) XImportMissionControl(ctx context.Context,
snapshot.Pairs[i] = *pairSnapshot
}
err := s.cfg.RouterBackend.MissionControl.ImportHistory(snapshot)
err := s.cfg.RouterBackend.MissionControl.ImportHistory(
snapshot, req.Force,
)
if err != nil {
return nil, err
}