> it was agreed on the time of the dissolution of the Warsaw pact
Except there was no such agreement.
And except it was not NATO that "expanded" but it was countries like Poland who begged to join NATO after KGB putch (1993), war in Chechnya (all 90's) and public declarations of Russian politicians about "restoration of USSR in its previous borders" (Zhirinovsky).