2724c7fa

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.

Total

23s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 0s 1s 1s 1s 0s
Eval 0s 7s 7s 8s 0s
Build 7s 40s 16s 23s 0s
Suite 0s 48s 23s 23s 0s

Timeline

Config Eval Build
0s10s20s