Add generic CONF skip decorators

This commit adds two new decorators to tempest.config, skip_if_config()
and skip_unless_config(). These decorators take in a group and option
name and will either not skip or skip based on either the existence of
the option or the value of the option. This is can sometimes be
necessary in tempest plugins where there is an optional dependency on
another plugin. There isn't a good way to have tests that skip based
on the existence of config flags that might not exist. This adds a
stable interface for those plugins to rely on. This can't live in
tempest.lib because of it's dependence on tempest config, which
doesn't belong in the lib interface. But, since we provide stability
guarantees on tempest.config and tempest.test_discover.plugins to
tempest plugins this interface can be provided via tempest.config.

Change-Id: I7a5d0dfa59d6d36f0202acddebaa0a3dec119540
2 files changed