There are two cases when we may want to delete things:
1. if a desired node configuration or spec changes, we delete existing node
resources.
2. if we use the teardown.yml playbook, cmd == teardown, delete
everything, including global state.
In both cases, Tenks state (state.yml), all nodes to be deleted are given a
'state' of absent'. We should therefore use this rather than the 'cmd' variable
which only works in the latter case.
Change-Id: Icc033340c7fd882e61d90e3d086f7ba4a5b673bf
Story: 2004907
Task: 29257
This, for example, allows you to run libvirt with non-default
socket path.
Change-Id: Ia01f39f425cccc6acebd31f77b46b1948e24d215
Story: 2004344
Task: 27935
Instead of overwriting the physnet mappings specified in the Tenks
configuration, create a separate dict that maps physnet names to their
indices. Like physnet_mappings, this will be present for each
hypervisor.
Instead of just an allocations file, Tenks now uses a 'state' file. This
contains the node allocations, as well as physical network mappings and
indices. Clusters can also now be re-deployed with different specs to
update the state.
Much of the logic in the existing 'deploy' playbooks could be reused for
a teardown command, so it didn't make sense to duplicate this. Instead,
rename/restructure playbooks such that they refer to an area of
responsibility, rather than an action.
Also, make some changes to allow a new 'teardown' action.