Remove kombu as a dependency for Nova

It was required before oslo.messaging.

Change-Id: I3159b8509ac5b4020cd584c894eb131bb16df97c
Faster get_attrname in nova/objects/base.py

get_attrname function is called very very often,
and it's string concatenation method is not fast.

* Changing the string concatenation to a 2 times
  faster + operator instead of the % operator.

Change-Id: I326fd6dda8dd41a90757c69867afd62063231362
Refactor Ironic driver tests as per review comment

During the Ironic driver merge into Nova, there were some
suggestions on refactoring the tests as per this review
(https://review.openstack.org/#/c/111425/19/nova/...
...tests/virt/ironic/test_driver.py)

This patch implements these suggestions.

Change-Id: I05e8b3d01bffebe2f68bbd50fc775e1ef48616cc
Remove unused network_api.get_instance_uuids_by_ip_filter()

Last usage was removed in ae781ee97947c33d6d43e4c21df4f338c875bf1c

Change-Id: I33dc14085ca0c887778c7379f0498714e8d30425
Error code for creating secgroup default rule

Trying to create secgroup group default rules
that already exists gives HttpBadRequest error,
but it should raise HttpConflict.

So updated the code to HttpConflict error.
Closes-Bug: #1374320

Change-Id: I93c6eb7fb96e7109404206367ed81495a4724296
network:Separate the translatable messages into different catalogs

oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating.  For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack

There were not marker fuctions some places in directory network.
This commit makes changes:
* Add missing marker functions
* Use ',' instead of '%' while adding variables to log messages

Change-Id: Id19436f4226bb60baef65974a62641095e334b1f
Small cleanup in db.sqlalchemy.api.action_finish()

This function was pulling back a row, updating the returned object,
then returning a reference to it. This potentially races, as the
object may be updated in another transaction after fetching. In
practise it's probably fine, but the new code is more obviously
correct, and probably slightly nicer to sqlalchemy.

Change-Id: I879e973180278faa51e664d526d75e5f095a64ea
VMware: make use of oslo.vmware pbm_wsdl_loc_set

Make use of the oslo.vmware method for setting a defined wsdl.

Change-Id: I207f0e737139c06c5b1ea9019cfbf4659aa5ca1a
Add API schema for v2.1 block_device_mapping extension

By defining the API schema, it is possible to separate the validation
code from the API method. The API method can be more simple.
In addition, a response of API validation error can be consistent for
the whole Nova API.

Partially implements blueprint v2-on-v3-api

Change-Id: I6d53ef2e3dad5a4ac9b67a5838f6e07606a8372b
objects: allow creation of objects without dict item compat

The dict compat support in NovaObject is useful for incrementally
converting existing code over to use objects. Any brand new objects
though have no reason to support dictionary access, so there should
be a way to disable this compat mode.

This moves all the dict compat support methods out of NovaObject,
to a new class NovaObjectDictCompat. All existing objects are
updated to add this new class as a mix-in parent.

In future any completely new objects (ie ones which aren't being
used to converted existing code from dict instances) should avoid
inheriting from NovaObjectDictCompat. Existing objects should
also have this parent class removed once all callers are audited
and/or updated to ensure they do not require dict compat.

Change-Id: I03f93f0c40df6f5f7df9cefe28dff900c22294c9
objects: stop conductor manager using dict field access on objects

The conductor manager 'object_action' method was accessing object
fields using dict syntax instead of attribute syntax. This meant
that every single object would always have to support dict compat
mode.

Change-Id: I7431b5d8e889eebacfef9179c9dceab54ac286ca
objects: remove dict compat support from all XXXList() objects

The XXXList() classes only ever have a single 'objects' attribute
and this is never directly accessed as a dict key, instead all
callers use it in list context. Thus the dict compat support can
be removed from all these objects

Change-Id: I3f8d49d25b99dd0a498dfaad705c6332908cb72f
Make update server schema 'additionalProperties' False

Nova V2.1 API has strong input validation by making validation
through JSON schema.

This patch makes update server schema 'additionalProperties' to False
as all update server extensions are implemented in V2.1.

After this, V2.1 will not allow extra arg for update server.

This patch also modify the corresponding update server tests
for extra input passed in request body-
    test_update_server_admin_password_ignored

Partially implements blueprint v2-on-v3-api

Change-Id: Ib67880d0380b539c3a5b12a14ea9ed71b7b588a3
Fix spelling error in compute api

Change-Id: Ie6b2d998dea6c5b9c7d3eee9c1c01f9169679451
Make instance_get_all_*() funtions support the smart extra.$foo columns

This is a follow-on to a previous patch set that made the extra columns
valid for being specified in columns_to_join, as they require slightly
different handling.

Related to blueprint flavor-from-sysmeta-to-blob

Change-Id: Ieffec0e846565b7521fe620694d9f84c67066e11
Use oslo db concurrency to generate nova.conf.sample

Make sure we include database and concurrency options in the
sample config file.

Change-Id: I66e68ec120cba2cee86e36aa26720199876c40a4
Closes-Bug: #1391782
Reject non existent mock assert calls

assert_called and assert_not_called are not asserting the state
of the mock object but considered as mocked calls so mock
will never raise exception but always executed successfully

This change patches the Mock class during unit test
to raise an exception if a function called on a mock object
that's name starts with 'assert' and does not one
of the supported Mock assert calls.

This change also fix the unit test to call only the supported
assert function on mock object.

This change also removes hacking rule N327 as the mock change
renders this hacking rule obsolete.

Change-Id: Id75def84bd4bdc1c1fb06221b4223322a99251eb
libvirt: move setting of clock out into helper method

Move clock settings will be added in the future, so it
makes sense to have a separate helper method for all
of them.

Related-bug: #1400315
Change-Id: I1662e2d1e2e729da873c14a0cc307e412c699320
libvirt: add support for hyperv timer source with windows guests

The hyperv timer source enables Windows guests to keep accurate
time, much like kvmclock does for Linux guests. It should be
enabled for all windows guests, as it doesn't harm older windows
versions which don't know about it.

Related-bug: #1400315
Change-Id: I6af05b4e8e0b2145733c0f301c04555da23b7da8
libvirt: change representation of guest features

While the current acpi, apic & pae features are mere single elements,
further feature will require complex data structures. The libvirt
config class must thus change from using a simple string to represent
a feature, to a full class

Related-bug: #1400315
Change-Id: Ia6fa2602dd7a9e7623abcfd46c8b57d3631372ef