runner: fix crash for jobs without a command

Apparently some jobs (particularly sniff/sniff6) have no command. We
should not be crashing on those.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
Bumped rev to 0.15.3 (0.15.2 is based on rev1907)
public: drop prototype methods

Drop the unused / unimplemented prototype methods that were originally
proposed in the first revision of plainbox. They are not needed (yet)
and will probably have different API. Keeping them around makes it
difficult to refactor internals that they bind to

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
checkbox: allow loading jobs directly via checkbox instance

Previously loading jobs was historically done by the load(somewhere)
function. This is really odd as it was only really loading checkbox
jobs and had this information hardcoded. With the wake of decoupling
the core from checkbox we need to couple checkbox pieces together.

In practical terms a CheckBox instance can now discover and load all
jobs by itself.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
box: drop support for --load-extra

This flag was historically introduced before plainbox could discover
checkbox and load jobs defined therein. Now with decoupling plainbox
core from checkbox concepts it serves no puprpose as there is no way
to know what kind of jobs should be loaded by passing that argument.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
box: delegate loading all jobs to checkbox instance

This builds upon the previous patches to entirely encapsulate how
checkbox jobs are loaded into the checkbox instance. The prototype
frontend (plainbox) will no longer have that logic.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
utils: drop the plainbox.impl.utils module

This module is no longer required. Loading jobs is now handled by the
CheckBox class.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
job: track JobDefinition association to checkbox

This prepares the JobDefinition to totally encapsulate checkbox logic
by having a connection to the checkbox instance. It will allow the
job to define its execution environment without external knowledge.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
checkbox: associate loaded jobs with checkbox instance

To allow jobs to know which checkbox instance they are associated with
each job instance loaded from rfc822 representation is now bound to
the checkbox object that was used to load it.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
job: add JobDefinition.modify_execution_environment()

This new method allows each job to modify and prepare the environment
it should be executed in. This will remove the necessity to track checkbox
instance in the JobRunner class

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
runner: use modify_execution_environment()

This change removes the need to have a reference to a checkbox instance
inside JobRunner. Instead of having hardcoded logic for checkbox jobs
the task is now delegated to each job instance.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
runner: drop the checkbox argument from JobRunner

The checkbox instance is no longer needed by the JobRunner class

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
job: add JobDefinition.create_child_from_record()

This method allows local jobs to spawn jobs and retain the association
to a checkbox object

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
session: Use create_child_job_from_record() when processing local jobs

This method allows each local job to retain checkbox association
as explained in the previous patch.

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

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
box: display job description if available

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
box: less verbose default console user interface

This patch changes some of print() calls to logger.debug() so that
users are not spammed with internal details by default.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
box: rename run_pattern_list to include_pattern_list

This change is made in anticipation of --exclude-pattern-list

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>