update metacluster personality implemented.

Also implemented tests covering update_cluster --personality.

Change-Id: Iafa5df8f8875c7e873ef13275a36c0f385e9dd8c
Addresses-Issue: Jira/AQUILON-1642
Reviewed-by: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Changing 'switch' to 'network device' in commands and options.

In the following commands the --network_device option can now
be used in place of --switch:
  search_observed_mac, cat
  add_interface, update_interface, del_interface,
  add_interface_address, del_interface_address.

The flush command option --switches has been superseeded by
the option --network_devices.

The following commands have been renamed; the old variants
continue to work:
  add_switch     -> add_network_device
  show_switch    -> show_network_device
  search_switch  -> search_network_device
  update_switch  -> update_network_device
  del_switch     -> del_network_device
  poll_switch    -> poll_network_device

Change-Id: I962fc3e31d9d1728f250eee6e6f58dabcb01478b
Reviewed-by: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Deprecating switch commands and options

Change-Id: If9fb4a4157c32a227e84127e14bb0c8acc075023
Reviewed-by: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Tidying up multiple option handeling

Change-Id: I0dfa2061043252226310144801be603d1a53c884
Reviewed-by: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Improve handling of single-instance classes

Allow the get_instace() method to be called on the base class, taking
the name of the subclass to look up. Replace the use of get_unique()
with get_instance() where possible, because get_instance() is cheaper,
and it also handles normalization (e.g. mixed-case input) better due to
the internal use of polymorphic_subclass().

Change-Id: If687ad5b329e41887d964a9b34f81493d7954eea
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
search_host: add filtering by host environment

At the same time, drop the --all flag, because "show_host --all"
provides the same functionality.

Change-Id: I3390ccc7bfcff028befedd5262e8d3fa3678b618
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Allow searching which personalities require a service

Change-Id: Ie0e0d40a27b28a94255a39f98360a52d90ecb601
Reviewed-by: Zoltan Sebestyen <Zoltan.Sebestyen@morganstanley.com>
Fix deleting empty resource groups

Let del_resource() handle the case when there were never any resources
in the group, so the .resholder attribute is None.

Change-Id: Iddc72ff1ec3881251c9f4d5eb0a92bdd80f50fe6
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Increase the length of the personality name

People are running into the limit of 32 characters, so let's make it
bigger.

Change-Id: I58bafbed25009fa361bc734bc185a1330aff10ea
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Make show_chassis --all less intrusive

Do not return full information unless the user explicitely requests it.

Change-Id: I3e24cc4862d1b857cb32f2c16c149ed1b97da65d
Reviewed-by: Dave Reeve <Dave.Reeve@morganstanley.com>
Fix read_file exception handeling

At the moment IOError's in read_file are not caught, this causes
a 500 Interal Server error when you cat non-existant files; not
404 File Not Found.

Change-Id: I05fabb5707b6f184dffd6a8e41aa27162671e945
Reviewed-by: Gabor Gombas <Gabor.Gombas@morganstanley.com>
renumbered / reordered vulcan2 tests.

Later, the infrastructuer setup / teardown should be moved to separate
test.

Change-Id: I02f27e8bbec189b38e54791c5f5573f0424498c6
Reviewed-by: Gabor Gombas <Gabor.Gombas@morganstanley.com>
fixed resources error message missing subtitutions.

An update disk command where a the target resourcegroup did not have the
named share resulted in the following error message:

Bad Request: {0} does not have {1} {2!s} assigned to it in resourcegroup
hzmc5-shares.

Change-Id: I679608d655f5d98ec3c5d71ad25afdb4b92c0a82
Reviewed-by: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Add personalities to static routes.

This change allows you to specify a personality with a static route.
In this case the static route will only be applied to hosts which
match the supplied personality.

Change-Id: I4931bb521dca56ca58e01e251b0b4cf1396d661d
Addresses-Issue: Jira/AQUILON-1275
Reviewed-by: Gabor Gombas <Gabor.Gombas@morganstanley.com>
Merge remote-tracking branch 'origin/for_next/read_file'
Merge remote-tracking branch 'origin/for_next/resources_fix'
Merge remote-tracking branch 'origin/for_next/route_personality'
Merge remote-tracking branch 'origin/for_next/update_metacluster'
Merge remote-tracking branch 'origin/for_next/misc_changes'
SQL upgrade script fixes

Add PostgreSQL version of the static route changes, and move the Oracle
version to the canonical location.

Change-Id: Iae07007ef31377c7378e9be851b65fa7a15e35a9