plainbox:config: add ChoiceValidator

This validator class can check if the value is in a set of
configured constants.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:applogic: add default_provider variable to PlainBoxConfig

This variable is designed to control the default provider used by
plainbox command line tools when 'plainbox --checkbox|-c' argument
is not used.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands: use configured provider by default

This patch makes plainbox command line tools load the provider
name from configuration files when no explicit value is specified.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
"automatic merge by tarmac [r=roadmr][bug=][author=zkrynicki]"
Incremented changelog
plainbox:providers: add IHVProvider

This provider mimics checkbox but restricts whitelists to those that start
with the string 'ihv-'. It is using the "auto" checkbox provider
internally, as the source of all data, so it should work with both
source and deb providers

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands: add support for -c 'ihv' provider

This patch allows one to select the 'ihv' provider by invoking plainbox
with 'plainbox -c ihv' command line option.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:applogic: add support configuring 'ihv' as default_provider

This patch just allows the users to select 'ihv' as the value for
default_provider configuration option

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
"automatic merge by tarmac [r=zkrynicki,roadmr][bug=][author=zkrynicki]"
Incremented changelog
Switched to using an RFC2606-reserved domain for the inlining test
commands:service.py: calls dbus.mainloop.glib.threads_init().

In addition to gobject.threads_init(), and do it before creating the main loop.
plainbox:testing_utils: detect incorrect usage of TestCaseWithParameters

I got bit by a simple mis-application of TestCaseWithParameters. My test
code needed one parameter (say, param1) with two values (say, value1,
and value2). My test class looked like this:

class BrokenTestClass(TestCaseWithParameters):

    parameter_names = (param1,)
    parameter_values = ((value1, value2),)

When tests were executed I only saw value1 being used, value2 was not
being applied. I only noticed this when running this specific test class
(otherwise this detail was being lost in the sea of output). It turned
out that I didn't remember how to use TestCaseWithParameters correctly
and I got parameter_values wrong. I should have written this instead:

class CorrectTestClass(TestCaseWithParameters):

    parameter_names = (param1,)
    parameter_values = ((value1,), (value2),)

So this patch does a simple runtime validation to ensure that each set
of values returned by get_parameter_values() (or directly from
parameter_values) has the same length as the set of names returned by
get_parameter_names()

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
"automatic merge by tarmac [r=roadmr][bug=][author=zkrynicki]"
"Minor fix for a minor bug, switches to using a top-level reserved domain as per RFC2606 in a unit test. [r=zkrynicki][bug=1222808][author=roadmr]"
"commands:service.py: calls dbus.mainloop.glib.threads_init(). [r=zkrynicki][bug=1219905][author=sylvain-pineau]"
plainbox:service: replace - with _ in whitelist names.

This patch is a (temporary) workaround for whitelists that have - in their
names. The proper solution would be to stop using the name entirely but
that is somewhat blocked by the GUI component not doing whitelist
detection properly (by interfaces) but instead looks for certain patterns
in the object path.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
"automatic merge by tarmac [r=roadmr][bug=][author=zkrynicki]"
Added report data files - fixed test-data wrong recursive-include syntax
"Adds the report resources to the plainbox package (actually, just to the set of files that are installed when doing setup.py build / install). No changes to packaging were necessary.

This is needed for the html exporter to work properly from an installed package. [r=zkrynicki][bug=][author=roadmr]"