`load_option_items` only has one argument; make it so!

The `load_option_items` method took a hash, but really only had one argument.

This simplifies the code by eliminating the indirection, and simply passing
the command name directly to the function.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Eliminate a dead call to `print_command_help`

The BMC code had a commented out invocation of `print_command_help`; this
eliminates it, to make clearer the behaviour of the system.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Inline discovery of the YAML file containing option items

The discovery of the YAML file containing option items was only used through
the `load_option_items` method on the base slice class.

Since this was not really API in any meaningful sense, this commit inlines the
behaviour and reduces our footprint.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Rename `load_option_items` to `command_option_data`

This renames the `load_option_items` method to `command_option_data`, so that
it is named after what you get from invoking it, rather than what it did
internally to retrieve that information.

This commit has no other functional change.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Use `get_node_instance_info` to target stopping node processes

Previously, the Razor daemon tried to shut down the API instances using
`killall` on anything named `node` - which failed on two counts, being that it
would kill too many things, and that it didn't work on some distributions
which ended up naming the process `nodejs` instead.

This replaces that with a more targeted process that kills only the nodejs
processes directly associated with Razor.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Turn YAML option data into Ruby code option data

This imports the YAML option definitions into Ruby code, avoiding the need to
parse and decode an external file before we can print option data.  This also
makes it harder - though, obviously, still entirely possible - to miss the
existence of that data when updating the code.

There is no behavioural change in the product from this.  The same data, in
the same form and order, is supplied to the rest of the system.  Only the
source is modified.

This closes #459, as the data now lives in Ruby.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Fix mismatched option `invert` with code `inverse`

An earlier fix caught most, but not all, of the mismatching uses of `invert`
and `inverse` through the code.  Jan Meyer <jan.meyer@m-bs.de> correctly noted
one of the places that was missed was the external option data files.

This, in part, is the motivation for pulling that data into the Ruby code -
having established that it is harder to discover that in a separate file, when
you search for a string, I wanted to tackle the root cause.

Ultimately, though, I need to apply the fix that Jan supplied - and having
rewritten the code this applies the concept rather than the delta he offered.

This supplants #451, which made the change in the YAML files.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #458 from daniel-pittman/feature/master/326-killall-node-is-not-awesome-as-shutdown-strategy

Use `get_node_instance_info` to target stopping node processes
Merge pull request #460 from daniel-pittman/feature/master/459-bring-option-defitition-into-code-rather-than-yaml-files

#459: bring option defitition into code rather than yaml files
Remove Ubuntu Raring package builds temporarily

Ubuntu Raring builds are currently not on our core "supported" list
of platforms; this removes the efforts to build packages for them.

It will return, eventually, but not without some additional planning.
(#464) Facter should only be installed if necessary in os_boot.erb

This change adds the option --enablerepo=base to the yum install call
in os_boot.erb to make sure the base repo is always enabled. This is
necessary because the factor package from the puppetlabs repo depends
on other packages like virt-what for example which are only available
in the base repo.

The change should not introduce any regressions because it simply
makes sure that the base repo is enabled. If it is enabled already,
this will not make any difference.

This pull request fixes issue #464.
Merge pull request #466 from cr3/464

(#464) Facter should only be installed if necessary in os_boot.erb
(#471) Inconsistent assumption about @node_ip in models

This change fixes the broker_agent_handoff method in the models that
potentially used an empty ipaddress option when calling the agent_hand_off
method in the broker. Now, the agent_hand_off method is only called when
the @node_ip is not empty and still reports a useful error message when
it is empty.

Closes #471
Merge pull request #472 from cr3/471

(#471) Inconsistent assumption about @node_ip in models
add posibility to use 'autopart' or 'part' in redhat's kickstart
Merge pull request #474 from faja/feature/add_part_in_redhat_model

add posibility to use 'autopart' or 'part' in redhat's kickstart
Revert "add posibility to use 'autopart' or 'part' in redhat's kickstart"

This reverts commit 104b066.  Making it possible for users to customize the
partition layout is highly undesirable with the other committers, to
my surprise.

Given that, this is being reverted.  Users who want this capability are
expected to build their own model to implement it.
Merge pull request #475 from daniel-pittman/bug/master/474-revert-additional-partitioning-support

Revert "add posibility to use 'autopart' or 'part' in redhat's kickstart...
(#478) /etc/rc.local should remain a symlink on Red Hat

This change adds the --follow-symlinks option to the sed command in the
os_complete.erb template of the redhat model. This is necessary because
the file /etc/rc.local on Red Hat should be a symlink to rc.d/rc.local
but, without this option, it becomes a regular file.

Note that the same change should not be necessary in Ubuntu and Debian
models because /etc/rc.local is not a symlink on those operating systems.

Closes #478
Update CI testing Puppet installation script repo setup

Puppet repositories have recently changed, resulting in a need to update the
scripts we use in the CI system to reflect that.  This allows Puppet to be
installed as part of the test regime.

This has not changed the broker installation process in any way, since that is
not using any of the repositories that have changed structure.

There are not functional changes to Razor as a result of this work, as it is
strictly related to Puppet Labs internal CI infrastructure.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>