2724c7fa

Created Started Finished

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

Add an import command, so a deployment need not be a reset

`apply` is the dangerous half of a deployment and it is dangerous for one
reason: it resets the router and then replays a file, and /import compiles a
file before running any of it, so a file RouterOS cannot compile leaves a reset
router with nothing at all.

`import` is the same upload without the reset. On a router that is already
running, RouterOS either applies the whole file or applies none of it, and
either way the router is still there afterwards to be told again. So a
deployment can put everything it takes to reach the router into `apply`, where
it is short and rarely changes, and everything that is only a setting into
`import`, where failing costs an error message.

It fails when the router did not import the file, which `apply` cannot do:
RouterOS reports a rejected command on its console and exits zero anyway, so
the output is the only result there is.

Also `routeros-check --redeployable-line`, which prints the line to cut a file
at for exactly that, from the same notion of where the way back in ends that
the check already reports against, and `vmtestCheckFor`, the vm test as
something a deployment can depend on having passed rather than something
somebody ran. The vm needs no kvm and no network, so it runs in a build.