Fix boto capabilities check

In commit 4845fc27 a capability check for the boto library has been
accidentally broken. boto.connection existed in all versions and it
was HTTPResponse class that should cause the ImportError.
Exception will not happen on the import line anymore, so check the
capabilities using hasattr() instead.

Change-Id: Ic9bff71b91de685a958400f12836322c7ca996c4
lxc: virDomainGetVcpus is not supported by driver

virDomainGetVcpus is not supported by the libvirt lxc
driver, so it results in a nasty traceback. Trap the
error and return the number of vcpus.

Fixes LP: #1106960

Change-Id: I4e81dedad74ce3c58fcdf3ee064dfa0b9aa9a755
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Fix check instance host for instance action

When instance has no host, actions such as get_console_output,
start_stop_instance cause HTTP 500 response. Here change to
HTTPConflict when action called before host set.

Fix LP# 1116012

Change-Id: I6153a03f449d9fad8d0d8fb7295bdea4d2b2c2b1
replace ssh-keygen -m with a python equivalent

When running on latest released versions of Debian and RHEL/CentOS
we get Encryption failure with "ssh-keygen: illegal option -- m"

Fixes LP# 1102501

Change-Id: Ia54bf8f3e8d51c8baa09ba67d2e18ad214316989
NOTE: new dependency on pyasn1 python module
Update .coveragerc

Set up proper source and omit options.

Change-Id: I28e95c5dde5d906dc2bf44b647017f8cff5981f6
Implements: blueprint update-coveragerc
Adds _(prerun|check)_134 functions to test_migrations

The _prerun_134 function populates the 'bw_usage_cache'
table with real data, different in some critical ways,
before migrating it. _check_134 function certifies that
things were properly migrated.

Partially implements bp migration-testing-with-data

Change-Id: I4100c8aa3e1c9d2ff4fdb095dba4cb084b5df279
Clean up extended server output samples

The extended status extension was testing list instead of get and the
extended server attribute extension was misnaming its sample files.

This makes the names of the samples consistent.

Change-Id: I5b6f8d00c85d7817775c190b2a7645a47f8085db
DocImpact: The api sample site may need to be updated as well
support reloctable venv roots in testing framework

run_tests.sh, with_venv.sh, and the install_venv.py scripts now
support relocating the venv root to another location.

All 3 scripts now support new envinroment variables to configure
the location of the venv and the tools directory. To maintain
compatability the defaults are set to the current values.

venv_path = Location of the virtualenv directory
	Default: $(pwd)

venv_name = Name of the virtualenv directory
	Default: .venv

tools_path = Location of the tools directory
	Default: $(pwd)

Additionally the run_tests.sh script also takes these value as
arguments and will pass them along accordingly.

--virtual-env-path <path>   Location of the virtualenv directory
                             Default: $(pwd)
--virtual-env-name <name>   Name of the virtualenv directory
                             Default: .venv
--tools-path <dir>          Location of the tools directory
                             Default: $(pwd)

DocImpact

Change-Id: I1be036058227206ecca342f692cd3d6aadb24069
Fixes: bug #1116942
Implement ZooKeeper driver for ServiceGroup API.

The ZooKeeper driver uses ephemeral nodes in ZooKeeper to keep
track of node liveness in a service group. The Implementation is
based on the evzookeeper library to combine zookeeper
and eventlet.

Part of blueprint zk-service-heartbeat

DocImpact: new driver

Change-Id: Ia20519de2b4964007f8b91ea5d56d1875510d40f
Support for scheduler hints for VM groups

This is part of the blueprint vm-ensembles. The patch introduces the
group as a scheduler hint.

The patch set adds group support for multi-VM deployment. This is achieved
as follows:
1. A new hint is added: group. This will contain the name and type for the
   group. At the moment only anti-affinity is supported. In the future
   we will add network proximity. It will be extended to <name>:<type>
2. In order to ensure that group policy will be honored for future VM
   deployments, the group is stored as system_metadata.
3. The anti affinity is implemented by a new filter called
   GroupAntiAffinityFilter.

DocImpact

Change-Id: I6ea2af5770b5ac4ff082b2a021d323ee38282205
Ensure that LB VIF drivers creates the bridge if necessary

Fixes bug 1117770

In order for libvirt to use the bridge name the bridge must exist.

Change-Id: Ie24cfce8454e0c1bbfd9058787a1fd704790f03c
Changes GA code for tracking cross-domain.

Change-Id: I731d6b160588b59f01abe98699c144fdf4ae12ad
Update to simplified common oslo version code.

Based on https://review.openstack.org/#/c/19957/

Change-Id: Ieefee2af8812d0217e95eeffb3cf53d8e55c8fe6
make vmwareapi driver pass quantum port-id to ESX

bug 1121349

Similar to how the libvirt and xenapi drivers need to communicate
the quantum port-id (aka the nova vif_uuid when quantum is in use)
to the compute layer in order to identify each vNIC, vmwareapi
needs to do the same.

Change-Id: I8b4bf81bfbad63e61a6ade9f0173e478b3aa45bd
Disallow setting /0 for network other than 0.0.0.0

If something like 15.0.0.0/0 is set as an IP address range it ends up
being identical to 0.0.0.0/0 (i.e all access) which I don't think is
the intent of the user when they make the API call.

Change-Id: I3fc05371f461112feae4f1097777fede5fc6b948
Don't call 'vif.plug' twice during VM startup

When starting a VM, the 'get_guest_config' method would end
up calling both the 'plug' and 'get_config' methods on the
VIF driver impl.  The 'plug' method was, however, already
being called by the 'create_domain_and_network' method in
libvirt/driver.py. The result was that when starting a VM,
Nova would be invoking 'plug' twice. Fortunately this does
not currently cause any serious problems, but it could well
do in the future.

Change-Id: I4b044a6d44801a27362e3bf8531962ba85e79466
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Adds API Sample tests for FloatingIPDNS extension.

Partially implements blueprint nova-api-samples
Fixes bug 1070164

Change-Id: I4c3e5d406ce43c27bb49a651facaa831de646a66
Ensure 'subunit2pyunit' is run in venv from run_tests.sh

The run_tests.sh script invokes

  bash -c "${wrapper} $TESTRTESTS | subunit2pyunit"

where '${wrapper}' expands to 'tools/with_venv.sh'. Due to shell
precedence rules, this only applies to '$TESTRTESTS' not the
'subunit2pyunit' part of the command. The 'subunit2pyunit' binary
though may only be available from the .venv

Change-Id: I5972c8f77b3f50a3713881e6ca1acbaeabbd47d4
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Merge "support reloctable venv roots in testing framework"
Fix unconsumed column name warning in test_migrations.

The warning is "SAWarning: Unconsumed column names: aggregate_name"

There is no column aggregate_name in the aggregates table.

Change-Id: I3b92b3429ac3e020b9ab3f7ce10c73a4e4b93187