NATO is a defense alliance. If RF will directly attack a NATO country, then a nuclear war will begin. When a NATO country attacks another country, NATO will not be involved.
EDIT: I'm wrong about Afghanistan.
EDIT: I'm wrong about Afghanistan.
The US successfully invoked NATO article 5 after 9/11 requiring all NATO members to assist militarily.