(PUP-2303) Fix arguments of ArgumentError

Yo dawg, I heard you like ArgumentErrors so I put an
ArgumentError in your ArgumentError.

This makes errors in fileserver config much more readable and
easier to find.
(doc) Document key purging in the description of the ssh_authorized_key type

This commit puts an explanation of key purging over where people will likely be
looking for it. It also tightens up the description of the user type's
purge_ssh_keys attribute, and adds an example key to the ssh_authorized_key type
(since the way that type breaks up key lines is somewhat unintuitive).

The example public key is a dud, to prevent accidental access grants.
(PUP-2311) OpenBSD uninstall broken when multiple uninstall_options given
(PUP-2458) Tests for providers inheriting from providers of another type

It's sometimes desirable to create new providers that inherit from providers
of a different type to create more specialised types/providers from a common
base.  This adds tests around this already-present functionality.
(PUP-1597) Fix contain functions lookup of class with leading ::

When the contain function creates edges it looked up resources
without removing the leading :: in the name. The catalog never stores
these, and thus an edge was formed between a resource and nil.

This commit simply removes the ::. There is no checking that a resource
is actually returned since they should all be there due to the call to
include them in the catalog (which would fail if it was not possible to
include them).

A test is also added for the erronous (and now fixed case).
(PUP-2508) Ensure env & trn-uuid are sent when configurer failures occur

Any failure in the configurer #run code might cause the ensure block to
evaluate early, and a report might be sent missing the details of what
the environment and transaction_uuid should be.

This patch moves where the report fields 'environment' and
'transaction_uuid' are set in the configurer code to ensure they are
populated early.

It also ensures the report environment is modified if the catalog or
server specifies it is different to the launched environment. This is
because we change this mid-flight, so our code simplies updates the
report environment when this happens.

Signed-off-by: Ken Barber <ken@bob.sh>
(PUP-2214) Change doc application to use current environment
(PUP-2214) Change parser application to use current_environment

This changes the parser face to use the current_environment instead
of looking up the "configured environment" from settings and then
using that environment.

This also adjust the documentation for the command wrt. use
with --parser future.
(PUP-2214) Change node/clean face to use configured environment
(PUP-2214) Fix failing doc tests

Doc tests with mocking did not work, needed to use a real configured
env.
(PUP-2214) Add comment that node.environment is source of environment

This note is to ensure the lookup of :environment is not changed
to a lookup of :current_environment, since the node's environment
is what is used to determine what the current_environment should be.
(PUP-2014) Make module use current_environment

Module now uses current environment instead of configured
environment when being asked for a module and not supplying
an explicit environment name. It used to lookup to configured
environment giving invoking logic no chance to modify the
default without modifying the setting.
(PUP-2214) Make util rdoc and related parser use :current_environment
(PUP-2214) Add comment about looking up environment for requests.
(PUP-2214) Change autoloader to use current_environment for changed?

This changes the autoloader to use the current_environment as the
environment when performing a changed? operation. (It used to check
if the configured environment was changed).

The complicated bootstrap support still uses lookup of configured
environment as that is the fallback when booting.
(PUP-2214) Add comment what command_line "current_environment" means
(PUP-2214) Add comment about application's use of configured env
(PUP-2214) Add comment about module_tool's lookup of requested env
(PUP-1597) Handle containment of relative names

The contain() function made an error when dealing with a relative name.
It assumed that the class that was actually included was always the same
as the name that it was given. In many cases this is true, but when the
name is found via a relative lookup (e.g. contain(bar) inside a class
foo, when a foo::bar exists), the assumption breaks down. The source of
the problem is that it tries to look up the included class after the
fact. Without all of the extra information about namespaces it isn't
able to find the right class.

To fix this, the include() function has been updated to return the
class resources that it included (including those that were already
present). This allows the contain() function to create the appriate
edges with the exact resources needed.

A secondary change in this was to remove the checks for include not
being able to include a class. The compiler method that is involved
already makes that check and raises an error, so the include functions
code was simply redundant.
(PUP-1597) Separate different modes of including

The evaluate_classes method has a couple different responsibilities and
inputs. This is just an attempt to pull them apart some and make the
flows a little more straightforward.