We must run against the KVM host in order to do anything. If no limit
option is set to specify which hosts or hostgroups to run against, we're
fine as kvmhost will be included.
However, if --limit is specified we have to make sure that the KVM host
will be in that list.
Currently we check if either 'kvmhost' is in the limit option or the
limit option is equal to 'all'. However, this does not cater for more
complex limits like 'all,!not-this-vm' and cases where 'kvmhost' and
'all' are anywhere in the option.
This patch makes the check more robust, by converting the option into a
list. This way we can just check that 'all' or 'kvmhost' are in there.
We must run against the KVM host in order to do anything. If no limit option is set to specify which hosts or hostgroups to run against, we're fine as kvmhost will be included.
However, if --limit is specified we have to make sure that the KVM host will be in that list.
Currently we check if either 'kvmhost' is in the limit option or the limit option is equal to 'all'. However, this does not cater for more complex limits like 'all,!not-this-vm' and cases where 'kvmhost' and 'all' are anywhere in the option.
This patch makes the check more robust, by converting the option into a list. This way we can just check that 'all' or 'kvmhost' are in there.