Logging detail when attach interface failed

When attach interface failed, there isn't any detail for
error info. Change the log level to exception to get more detail.

Change-Id: If531c32357dbb002a3e92e4ca559eeb7f6ab6d2d
Closes-Bug: #1373761
Remove admin context which is not needed.

_get_guest_config use admin context to read deleted flavor, it's
not needed because flavor function in db layer didn't require that.

Change-Id: Idbf6a7d712d432da5a5919c28e988870ead0d4b2
maint:Don't translate debug level logs

Our translation policy
(https://wiki.openstack.org/wiki/LoggingStandards#Log_Translation) calls
for not translating debug level logs. This helps to prioritize log
translation.
There were some commits that fixed it but ignored the the style like
msg = _('this is debug info'); LOG.debug(msg)
This commit fixes this style of LOG.debug.

Change-Id: I2cc3fe563456ba0906f74262ab1ba6967301d6d1
Fixed typos in nova.objects.base docstrings

Change-Id: I1d485a2ca2fca58262bc023e5c9f273c6632e4a6
Fix the uris in documentation

Broken image links when viewed from github:
https://github.com/openstack/nova/tree/master/doc/source/devref

Change-Id: Icad6ed2aa742310fbea399ddecd8480123eaac64
VMware: remove unused method _get_vmfolder_ref

This method was only used in the ESX driver. That was deprecated
in Juno.

Change-Id: Ied0fdf835c18c4a2c9ca080379e13bfd72d825c2
Config drive: delete deprecated config var config_drive_tempdir

Commit 6e15d787fffcef8c4299fbaf1d5c715af1a34fa2 removed the use
of this configuration variable.

Change-Id: Ifd5baa8b7d579b0959cdb57b1335380a4129d652
libvirt: add in missing translation for LVM migration

Commit e24f333cd5d3667a15c36ac502304bfb5a0e21df added an exception
that contained a missing translation.

TrivialFix

Change-Id: I21419655605a47ef0f5b792a7db5512267d114c1
Make unit test floating ips bulk faster

The unit test is only used to test whether the code branch is
executed with pre-defined logic, so it does make sense to create
as less as dataset if we can achieve that goal.

Currently the unit test for floating ip bulk operation in nova
create a rather a big data set to run the test. This patch adjust
it with smaller one.

the results shows (ignore the first one because env setup)
                                                   [former] [current]
test_create_bad_cidr_fail                       OK  4.27     8.30
test_create_duplicate_fail                      OK  8.01     1.20
test_create_invalid_cidr_fail                   OK  0.10     0.14
test_create_ips                                 OK  0.77     0.18
test_create_ips_pool                            OK  7.65     0.17
test_delete_ips                                 OK  10.01    0.35
test_list_ip_by_host                            OK  0.14     0.27
test_list_ips                                   OK  0.15     0.25

Change-Id: I2ee5b5186f0c88b80ed20a0dbc16af9360e28332
Remove useless host parameter in virt

For host api, there are useless host params for
host_power_action and set_host_enable virt API,
this patch removes the useless host params.

Change-Id: I556278fc426a800f108da9129e42175da32dac49
Deduplicate some INFO and AUDIT level messages

I'm trying to debug a problem where the last thing in the logs is
"Starting instance...".  Unfortunately this occurs twice in the same
source file, so it's hard to figure out a priori which log statement
it came from.  Audit and info messages don't disambiguate their
function/line number, all you get is the logger name like:

2014-04-06 19:51:01.871 8288 AUDIT
  nova.compute.manager [req-...] [instance: ...] Starting instance...

I think it doesn't hurt to to make sure all logs at this level are
unique, even if upstream were to log the function (see [1]).  Most
duplicate LOG.info and LOG.audit level messages are in separate files
so we can disambiguate by the name, but there are a few that overlap.

For reference, the less-then-perfect but useful check I used was:
 $ grep -r 'LOG.audit' * | sed 's/:\s*/ /' | sort -k1 | uniq -f1 -c

[1] https://review.openstack.org/#/c/85638/

Change-Id: If1ff573ffed1d12fcadfbdfd3365aae68a5fb977
Truncate encoded instance message to 255

In nova/compute/utils.py function exception_to_dict truncates unicode
message to 255. However, in non-English locales, instance message may
be longer than 255 after encoding the unicode message to byte message.
Need to truncate the encoded byte message to 255, in order to ensure
db insert operation succeed.

Change-Id: I70cd2d6e4590ea95510c1ea3d51287f0dea14956
Closes-Bug: 1389102
Add 'instance-usage-audit-log' plugin for V2.1

This patch adds 'instance-usage-audit-log' plugin for V2.1 API.
Also implement the API sample tests and share the unit tests
between V2 & V2.1.

Partially implements blueprint v2-on-v3-api

Change-Id: I152d00fb4b12942515d5db54a7ec381279c31ccd
Raise HTTPNotFound in V2 console extension

In case requested instance is not found, console extension does not catch
InstanceNotFound, which results to internal server error (500).

This patch handle InstanceNotFound exception and raise HTTPNotFound
like V3 console plugin.

Change-Id: Ia982049451f2c529f123da714e994476d4610491
Share console-auth-tokens tests between V2 & V2.1

As V2 and V2.1 'os-console-auth-tokens' extensions are same,
unit tests can be shared between those.

This patch share the tests between V2 & V2.1

Partially implements blueprint v2-on-v3-api

Change-Id: I9c1ff61ff73fee551a60a0ff684dd73a1bbad72e
Remove havana compat from nova.consoleauth.rpcapi

Since we only support upgrading from N-1 to N, there's no need to keep
around this older upgrade related code.

Change-Id: I253db2fe161add62cb248665c7920126f0d7455f
Remove havana compat from nova.console.rpcapi

Since we only support upgrading from N-1 to N, there's no
need to keep around this older upgrade related code.

Change-Id: I663b77230cb0ca87c31a4dfd6cddaf10c588a000
Compute: Add start notification for resume

The resume operation did not have a 'start' and 'end'. This has
been updated. Notifications should be sent at the start and end
of each opertaion. The support should be consistant throughout
the driver.

Change-Id: I3354d1d9c01b13bc2fed70ee06875f6d49ff1d16
Add API schema for aggregates set_metadata API

This patch adds API schema for aggregates set_metadata API.

Partially implements blueprint v2-on-v3-api

Change-Id: I2d1e454f87870554cdeff50cc2de522c34fe81d4
Virt: create an object InstanceInfo

The virt driver method get_info returns a distionary. This patch
introduces an object for the InstanceInfo.

Change-Id: Ia4e4639ec1a593380b48f8f6e4962dd22ab8fc0b