Remove useless variable from libvirt/driver.py

There are some variables in libvirt/driver.py were never used, so
we can just remove them.

Change-Id: Ie29bfbeef8c185697aa94a6e05e67a70436302c8
Use _get_server_admin_password()

There is _get_server_admin_password() for getting an admin password
in ServersController class. This patch makes some methods use it for
code clean-up.

Change-Id: Iff9d960126e1c09d928d72b572838e6f16cc4f33
Replace assertEquals with assertEqual - tests/scheduler

The method assertEquals has been deprecated since python 2.7.
http://docs.python.org/2/library/unittest.html#deprecated-aliases

Also in Python 3, a deprecated warning is raised when using assertEquals
therefore we should use assertEqual instead.

This is part of blueprint assertequal

Change-Id: I5a6c6ac5d248ea1666f93196d21eb23e793b36d1
Fix the boto version comparison

Use versionutils to check the boto version in parsed form rather than
comparing text.

Fixes bug: 1239890

Change-Id: Iea421ab0d86ce29648a8b8f757456364ea21e956
fix a typo error in test_libvirt_vif.py

Change-Id: I4d5edbd37557185f0235d55bc574ef8314daf643
Merge "Remove useless variable from libvirt/driver.py"
Merge "Use _get_server_admin_password()"
Flavor name should not contain only white spaces

Returns 400 Bad request instead of 200 Ok if flavor name
contains only whitespaces.
Flavor name containing any leading and trailing whitespaces will be
trimmed before validation and before saving it to the backend.

Added unit test cases for both v2 and v3 api's. For v3 api instead of
stubbing flavors 'create' method stubbed db's 'flavor_create' method.
Also removed redundant code of stubbing 'flavor_create' method.

For example
name = "  "              #not allowed
name = "extra large"     #allowed
name = " extra large "   #allowed, but leading and trailing whitespaces
                         #will be trimmed (same as instance name)

Closes-Bug: #1237611

Change-Id: Ie68be299030a878a752dbfdcdfe5094f8427598a
Remove live_snapshot plumbing

This was never actually used.  We discussed the feature this was for on
the mailing list extensively, and then again at the design summit.
Consensus is that this is not something we want to support.

Change-Id: I1dc0a1daa0667b3541f9e397abb2c9b1ea85f55e
xenapi: check for IP address in live migration pre check

A requirement for live migration is that the destination
host contains a management PIF with an IP address assigned.
If a host is broken (no IP), the compute log simply shows a generic
exception on the xenapi call host.migrate_receive.  We can
provide better information that the IP address is missing
by checking this prior to the call.

Closes-Bug: 1245592

Change-Id: Iaa6345f4bddf2f98efb4a5c9743da16ba8ae7b56
Merge "fix a typo error in test_libvirt_vif.py"
Merge "Remove live_snapshot plumbing"
Merge "xenapi: check for IP address in live migration pre check"
Merge "Replace assertEquals with assertEqual - tests/scheduler"
Merge "Flavor name should not contain only white spaces"
Merge "Fix the boto version comparison"
Move some libvirt specific flags into a group

This is backwards compatible via deprecated groups. This change
moves the flags defined in nova/virt/libvirt/driver.py into a
"libvirt" configuration group.

There are other flags which need to be moved, but this change
is quite large, so I will handle those in follow up changes.

Progresses blueprint libvirt-opts-group.

DocImpact: the following flags are moved into a "libvirt" flag
group: rescue_image_id, rescue_kernel_id, rescue_ramdisk_id,
libvirt_type, libvirt_uri, libvirt_inject_password,
libvirt_inject_key, libvirt_inject_partition, use_usb_tablet,
live_migration_uri, live_migration_flag, block_migration_flag,
live_migration_bandwidth, snapshot_image_format,
libvirt_vif_driver, libvirt_volume_drivers

Change-Id: I11e79eb5fd79c459374b9bf04707a4e6d79e993f
Rename libvirt flags to more sane names

Now that the flags in nova/virt/libvirt/driver.py are in a libvirt
group, we can drop the libvirt_ from in front of many of the flag
names. I haven't done this where it would leave us with what I felt
was an overly generic flag name (for example libvirt.type), but
perhaps that's me being overly conservative.

Progresses blueprint libvirt-opts-group.

DocImpact: the following flags have had the libvirt_ dropped from
the start of their flag name now that they are in a flag group:
    libvirt_inject_password
    libvirt_inject_key
    libvirt_inject_partition
    libvirt_vif_driver
    libvirt_volume_drivers
    libvirt_disk_prefix
    libvirt_wait_soft_reboot_seconds
    libvirt_non_blocking
    libvirt_cpu_mode
    libvirt_cpu_model
    libvirt_snapshots_directory

Change-Id: Ia3875e48dd75c26d05332f8356368ae38f264e4e
Move base_dir_name option to somewhere more central

The VMWare hypervisor driver is using the base_dir_name flag, but
it was defined in the libvirt driver. Given I am moving flags for
libvirt into a libvirt group, this flag needs to move somewhere
more central.

Change-Id: If016456b9f571ff0ec88621bd17e463faeef95ba
Move flags in libvirt's imagecache to the libvirt group

This change continues moving libvirt specific flags into a libvirt
specific configuration group.

Progresses blueprint libvirt-opts-group.

DocImpact: the following flags move into the libvirt group:
image_info_filename_pattern, remove_unused_base_images,
remove_unused_kernels, remove_unused_resized_minimum_age_seconds,
remove_unused_original_minimum_age_seconds, checksum_base_images,
checksum_interval_seconds.

Change-Id: Iea681c7db7efc9da0525ef8e01b4900ca71f10cf