plainbox:commands:checkbox: split into cmd+inv

This patch splits the 'checkbox.py' module into two new modules,
cmd_checkbox and inv_checkbox. During plainbox startup only the
cmd_checkbox module needs to be imported and it has minimal requirements
so very little overall code needs to be loaded.

When any commands that actually needs to use the base 'checkbox'
functionality is executed then the inv_checkbox module is imported,
bringing in all of the additional modules it requires.

Tests are adjusted to use the appropriate new module instead, as are the
'checkbox sru', 'checkbox cli', 'plainbox run' and the 'plainbox dev
special', commands.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:run: split into cmd+inv

This patch splits the 'run.py' module into two new modules, cmd_run and
inv_run. During plainbox startup only the cmd_run module needs to be
imported and it has minimal requirements so very little overall code
needs to be loaded.

When the run command is actually executed then the inv_run module is
imported, bringing in all of the additional modules it requires.

Tests are adjusted to use the appropriate new module instead, as is the
'checkbox cli' command.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:analyze: split into cmd+inv

This patch splits the 'analyze.py' module into two new modules,
cmd_analyze and inv_analyze. During plainbox startup only the
cmd_analyze module needs to be imported and it has minimal requirements
so very little overall code needs to be loaded.

When the analyze command is actually executed then the inv_analyze
module is imported, bringing in all of the additional modules it
requires.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:script: split into cmd+inv

This patch splits the 'script.py' module into two new modules,
cmd_script and inv_script. During plainbox startup only the cmd_script
module needs to be imported and it has minimal requirements so very
little overall code needs to be loaded.

When the script command is actually executed then the inv_script module
is imported, bringing in all of the additional modules it requires.

Tests are adjusted to use the appropriate new module instead

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:session: split into cmd+inv

This patch splits the 'session.py' module into two new modules,
cmd_session and inv_session. During plainbox startup only the
cmd_session module needs to be imported and it has minimal requirements
so very little overall code needs to be loaded.

When the session command is actually executed then the inv_session
module is imported, bringing in all of the additional modules it
requires.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:device: fix PEP-8 issues

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:device: improve output for for odd systems

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:list: split into cmd+inv

This patch splits the 'list.py' module into two new modules, cmd_list
and inv_list. During plainbox startup only the cmd_list module needs to
be imported and it has minimal requirements so very little overall code
needs to be loaded.

When the 'plainbox dev list' command is executed then the inv_list
module is imported, bringing in all of the additional modules it
requires.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:check_config: split into cmd+inv

This patch splits the 'check_config.py' module into two new modules,
cmd_check_config and inv_check_config. During plainbox startup only the
cmd_check_config module needs to be imported and it has minimal
requirements so very little overall code needs to be loaded.

When the 'plainbox check-config' command is executed then the
inv_check_config module is imported, bringing in all of the additional
modules it requires.

In addition, all call sites that used to import the old module are
updated to use one of the new modules instead.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:parse: split into cmd+inv

This patch splits the 'parse.py' module into two new modules, cmd_parse
and inv_parse. During plainbox startup only the cmd_parse module needs
to be imported and it has minimal requirements so very little overall
code needs to be loaded.

When the 'plainbox dev parse' command is executed then the inv_parse
module is imported, bringing in all of the additional modules it
requires.

In addition, all call sites that used to import the old module are
updated to use one of the new modules instead.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:selftest: split into cmd+inv

This patch splits the 'selftest.py' module into two new modules,
cmd_selftest and inv_selftest. During plainbox startup only the
cmd_selftest module needs to be imported and it has minimal requirements
so very little overall code needs to be loaded.

When the 'plainbox self-test' command is executed then the inv_selftest
module is imported, bringing in all of the additional modules it
requires.

The implementation of the command code was changed slightly, resulting
in one more base class and less useless initialization code. There are
no user-visible or API changes though.

In addition, all call sites that used to import the old module are
updated to use one of the new modules instead.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:startprovider: split into cmd+inv

This patch splits the 'startprovider.py' module into two new modules,
cmd_startprovider and inv_startprovider. During plainbox startup only
the cmd_startprovider module needs to be imported and it has minimal
requirements so very little overall code needs to be loaded.

When the 'plainbox self-test' command is executed then the
inv_startprovider module is imported, bringing in all of the additional
modules it requires.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:commands:special: split into cmd+inv

This patch splits the 'special.py' module into two new modules,
cmd_special and inv_special. During plainbox startup only the
cmd_special module needs to be imported and it has minimal requirements
so very little overall code needs to be loaded.

When the 'plainbox dev special' command is executed then the inv_special
module is imported, bringing in all of the additional modules it
requires.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:vendor: vendorize python-phablet @ c281045df

This patch pulls in the 'phablet.py' module from python-phablet.git from
revision c281045dfb8b55dd2888e1efe9631f72ffc77ac8

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:box: improve PlainBoxTool.create_parse_object()

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox: be lazier about loading providers

This patch changes the plainbox command in a few fundamental ways. First
of all the 'plainbox --providers' option is removed. It was deprecated a
good while ago and nobody used it anymore. Instead plainbox can be
invoked as 'stubbox' to load the stub provider. In normal mode (when
invoked as plainbox) stubbox is *not* loaded anymore. Some commands
still refer to themselves as being a part of plainbox, 'plainbox dev'
for example, but this is hard to change and not important enough.

This is the only user-visible change here.

The other part of this patch moves the initialization of
PlainBoxToolBase._provider_list far later into the startup process, to
the dispatch_command() method. This is not the ultimate goal as we still
load providers too early (before we even know we need them) but it is
the least invasive (API wise) change that we can make now.

Overall the startup cost of 'plainbox --help' is now much lower.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
plainbox:applogic: remove the PlainBoxConfig.{welcome_text,default_provider}

This patch removes two of the old (obsolete) configuration keys from the
base plainbox configuration file. Those keys were either entirely
obsolete (default provider) or totally misguided (welcome text) as this
is not something that can belong in a configuration file that users are
expected to edit.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
"automatic merge by tarmac [r=kissiel][bug=][author=zkrynicki]"
"automatic merge by tarmac [r=kissiel][bug=][author=zkrynicki]"
"automatic merge by tarmac [r=kissiel][bug=][author=zkrynicki]"