CB 2.0: Make the network barclamp really work, and make all the recipes really Chef11 compliant. [2/5]

This pull request series makes the network barclamp interact with the
core Crowbar framework allow for:

* Dynamic creation of networks at point of need rather than having to
set them all up ahead of time.
* Presenting networks as roles to the core Crowbar framework.
* Presenting address and network interface allocations as noderoles.

Since this is a first-pass implementation, it lacks a few amenities:

* Networks cannot be edited after they are created.  This will be
  addressed once we get a good idea about what sorts of edits to a
  network make sense in a running cluster, and how to make edits on a
  live cluster with a decent stab at not losing overall connectivity.
* Address allocations can not be deleted once created.  This will be
  enabled once we have a better idea about how to do so in a way that
  does not break the node-role graph.
* The network barclamp only knows how to present information to the
core, it has no idea how to get information back.
* The admin network is special, and that specialness is hardcoded.  It
  should be driven by configuration metadata from the network-server
  role instead.


This also fixes up a series of non-Chef 11 compliant recipes due to a
combination of bad cache hygene on my part and the Chef 10 client
imnitruck installer having an inexplicably higher priority than the
Chef 11 one.



 bin/crowbar_network                                |  130 +++--
 chef/cookbooks/network/recipes/default.rb          |    9 +-
 crowbar.yml                                        |   14 +-
 .../barclamp_network/conduits_controller.rb        |  286 -----------
 .../barclamp_network/networks_controller.rb        |  331 +++----------
 .../scaffolds/allocated_ip_addresses_controller.rb |   20 -
 .../scaffolds/bmc_interfaces_controller.rb         |   20 -
 .../barclamp_network/scaffolds/bonds_controller.rb |   20 -
 .../scaffolds/bridge_controller.rb                 |   20 -
 .../scaffolds/bus_maps_controller.rb               |   20 -
 .../barclamp_network/scaffolds/buses_controller.rb |   20 -
 .../scaffolds/conduit_filters_controller.rb        |   20 -
 .../scaffolds/conduit_rules_controller.rb          |   20 -
 .../scaffolds/conduits_controller.rb               |   20 -
 .../scaffolds/config_actions_controller.rb         |   19 -
 .../scaffolds/create_bonds_controller.rb           |   20 -
 .../scaffolds/create_bridges_controller.rb         |   20 -
 .../scaffolds/create_vlans_controller.rb           |   20 -
 .../scaffolds/interface_maps_controller.rb         |   20 -
 .../scaffolds/interface_selectors_controller.rb    |   20 -
 .../scaffolds/interfaces_controller.rb             |   20 -
 .../scaffolds/ip_addresses_controller.rb           |   20 -
 .../scaffolds/ip_ranges_controller.rb              |   20 -
 .../scaffolds/network_mode_filters_controller.rb   |   20 -
 .../scaffolds/networks_controller.rb               |   20 -
 .../scaffolds/node_attribute_filters_controller.rb |   20 -
 .../scaffolds/node_ref_controller.rb               |   20 -
 .../scaffolds/physical_interfaces_controller.rb    |   20 -
 .../scaffolds/routers_controller.rb                |   20 -
 .../scaffolds/select_by_indices_controller.rb      |   20 -
 .../scaffolds/select_by_speeds_controller.rb       |   20 -
 .../barclamp_network/scaffolds/vlans_controller.rb |   20 -
 .../barclamp_network/allocated_ip_address.rb       |   26 -
 .../app/models/barclamp_network/allocation.rb      |   43 ++
 .../models/barclamp_network/attrib_bus_order.rb    |   45 --
 .../attrib_configured_interface_map.rb             |   48 --
 .../models/barclamp_network/attrib_ip_address.rb   |   60 ---
 .../barclamp_network/attrib_network_config.rb      |   40 --
 .../app/models/barclamp_network/barclamp.rb        |  450 -----------------
 .../app/models/barclamp_network/bmc_interface.rb   |   16 -
 .../app/models/barclamp_network/bond.rb            |   27 -
 .../app/models/barclamp_network/bridge.rb          |   16 -
 .../app/models/barclamp_network/bus.rb             |   22 -
 .../app/models/barclamp_network/bus_map.rb         |   37 --
 .../app/models/barclamp_network/conduit.rb         |   70 ---
 .../app/models/barclamp_network/conduit_filter.rb  |   24 -
 .../app/models/barclamp_network/conduit_rule.rb    |  123 -----
 .../app/models/barclamp_network/config_action.rb   |   57 ---
 .../app/models/barclamp_network/create_bond.rb     |   19 -
 .../app/models/barclamp_network/create_bridge.rb   |   26 -
 .../app/models/barclamp_network/create_vlan.rb     |   19 -
 .../app/models/barclamp_network/interface.rb       |   27 -
 .../app/models/barclamp_network/interface_map.rb   |   58 ---
 .../models/barclamp_network/interface_selector.rb  |   37 --
 .../app/models/barclamp_network/ip_address.rb      |   42 --
 .../app/models/barclamp_network/ip_range.rb        |   36 --
 .../app/models/barclamp_network/network.rb         |  355 ++++++--------
 .../models/barclamp_network/network_mode_filter.rb |   32 --
 .../app/models/barclamp_network/network_utils.rb   |  107 ----
 .../barclamp_network/node_attribute_filter.rb      |   34 --
 .../app/models/barclamp_network/node_observer.rb   |   29 --
 .../app/models/barclamp_network/node_ref.rb        |   21 -
 .../models/barclamp_network/physical_interface.rb  |   16 -
 .../app/models/barclamp_network/range.rb           |  116 +++++
 .../app/models/barclamp_network/role.rb            |   23 +
 .../app/models/barclamp_network/role_filter.rb     |   33 --
 .../app/models/barclamp_network/router.rb          |   30 +-
 .../app/models/barclamp_network/select_by_index.rb |   27 -
 .../app/models/barclamp_network/select_by_speed.rb |   61 ---
 .../app/models/barclamp_network/selector.rb        |   28 --
 .../app/models/barclamp_network/vlan.rb            |   19 -
 crowbar_engine/barclamp_network/config/routes.rb   |   60 +--
 .../db/migrate/20120730175122_create_networks.rb   |   27 -
 .../db/migrate/20120730175238_create_interfaces.rb |   29 --
 .../migrate/20120730175255_create_ip_addresses.rb  |   28 --
 .../db/migrate/20120821194639_create_conduits.rb   |   24 -
 .../db/migrate/20120822201408_create_routers.rb    |   24 -
 .../db/migrate/20120827150258_create_ip_ranges.rb  |   24 -
 .../db/migrate/20120914175602_create_buses.rb      |   25 -
 .../db/migrate/20120914175721_create_bus_maps.rb   |   24 -
 .../20120914175733_create_interface_maps.rb        |   23 -
 .../20120918205152_create_interface_selectors.rb   |   23 -
 .../20120918205303_create_conduit_filters.rb       |   29 --
 .../20120919110841_create_config_actions.rb        |   30 --
 .../migrate/20120919190544_create_conduit_rules.rb |   23 -
 .../db/migrate/20130112145100_create_selectors.rb  |   25 -
 .../db/migrate/20130115160000_network_navs.rb      |   32 --
 ...20130115220245_create_allocated_ip_addresses.rb |   28 --
 .../20130123083500_create_interfaces_networks.rb   |   23 -
 .../db/migrate/20130124211800_scaffold_navs.rb     |   77 ---
 .../db/migrate/20130319151500_create_node_refs.rb  |   24 -
 .../db/migrate/20130908_create_networks.rb         |   50 ++
 .../barclamp_network/lib/barclamp_network.rb       |   19 -
 .../lib/barclamp_network/engine.rb                 |    3 +-
 .../barclamp_network/test/barclamp_network_test.rb |    7 -
 .../barclamp_network/test/dummy/README.rdoc        |  261 ----------
 .../barclamp_network/test/dummy/Rakefile           |    7 -
 .../dummy/app/assets/javascripts/application.js    |   15 -
 .../dummy/app/assets/stylesheets/application.css   |   13 -
 .../app/controllers/application_controller.rb      |    3 -
 .../test/dummy/app/helpers/application_helper.rb   |    2 -
 .../dummy/app/views/layouts/application.html.erb   |   14 -
 .../barclamp_network/test/dummy/config.ru          |    4 -
 .../test/dummy/config/application.rb               |   59 ---
 .../barclamp_network/test/dummy/config/boot.rb     |   10 -
 .../test/dummy/config/database.yml                 |   25 -
 .../test/dummy/config/environment.rb               |    5 -
 .../test/dummy/config/environments/development.rb  |   37 --
 .../test/dummy/config/environments/production.rb   |   67 ---
 .../test/dummy/config/environments/test.rb         |   37 --
 .../config/initializers/backtrace_silencers.rb     |    7 -
 .../test/dummy/config/initializers/inflections.rb  |   15 -
 .../test/dummy/config/initializers/mime_types.rb   |    5 -
 .../test/dummy/config/initializers/secret_token.rb |    7 -
 .../dummy/config/initializers/session_store.rb     |    8 -
 .../dummy/config/initializers/wrap_parameters.rb   |   14 -
 .../test/dummy/config/locales/en.yml               |    5 -
 .../barclamp_network/test/dummy/config/routes.rb   |    4 -
 .../barclamp_network/test/dummy/public/404.html    |   26 -
 .../barclamp_network/test/dummy/public/422.html    |   26 -
 .../barclamp_network/test/dummy/public/500.html    |   25 -
 .../barclamp_network/test/dummy/script/rails       |    6 -
 .../test/integration/navigation_test.rb            |   10 -
 .../barclamp_network/test/network_test_helper.rb   |  175 -------
 .../barclamp_network/test/test_helper.rb           |   15 -
 .../test/unit/allocated_ip_address_model.old       |  198 --------
 .../test/unit/attrib_bus_order_test.old            |   38 --
 .../test/unit/attrib_ip_address_test.old           |   61 ---
 .../barclamp_network/test/unit/bond_model_test.old |   83 ----
 .../test/unit/bus_map_model_test.old               |   72 ---
 .../barclamp_network/test/unit/bus_model_test.old  |   47 --
 .../test/unit/conduit_filter_test.old              |   25 -
 .../test/unit/conduit_rule_test.old                |  305 ------------
 .../barclamp_network/test/unit/conduit_test.old    |  450 -----------------
 .../test/unit/config_action_model_test.old         |   64 ---
 .../test/unit/create_bond_test.old                 |   47 --
 .../test/unit/create_bridge_test.old               |   62 ---
 .../test/unit/create_vlan_model_test.old           |   31 --
 .../test/unit/interface_map_model_test.old         |  142 ------
 .../test/unit/interface_model_test.old             |   60 ---
 .../test/unit/interface_selector_test.old          |  103 ----
 .../test/unit/ip_address_model_test.old            |   93 ----
 .../test/unit/ip_range_model_test.old              |   93 ----
 .../test/unit/network_barclamp_test.old            |  517 --------------------
 .../test/unit/network_mode_filter_test.old         |   42 --
 .../test/unit/network_model_test.old               |  464 ------------------
 .../test/unit/network_utils_test.old               |  110 -----
 .../test/unit/node_attribute_filter_test.old       |   44 --
 .../test/unit/role_filter_test.old                 |   52 --
 .../test/unit/router_model_test.old                |   68 ---
 .../test/unit/select_by_index_test.old             |   62 ---
 .../test/unit/select_by_speed_test.old             |  145 ------
 .../barclamp_network/test/unit/selector_test.old   |   27 -
 .../barclamp_network/test/unit/vlan_model_test.old |   42 --
 154 files changed, 553 insertions(+), 8190 deletions(-)

Crowbar-Pull-ID: 402e9ce91111702c1f810a6a19545ee4d489a3f9

Crowbar-Release: development