Commit Graph

43380 Commits

Author SHA1 Message Date
Stephen Finucane 09e2bcf3f5 hacking: Use assertIs(Not), assert(True|False)
This is per the OpenStack style guidelines.

Change-Id: Iec102872e2d5b004255ce897cc22c4d1a41c6f9e
Co-authored-by: Gabor Antal <antal@inf.u-szeged.hu>
2016-10-12 11:14:33 +01:00
Gábor Antal 03b9937884 Use more specific asserts in tests
Use asserts with more specific assert methods, e.g.: from
assertTrue(sth == None) to assertIsNone(*),
assertTrue(isinstance(inst, type)) to assertIsInstace(inst, type) or
assertTrue(not sth) to assertFalse(sth).

This change ensures a better description will be shown on fail. This is
the recommended way to use assertions provided by testtools.

Change-Id: Ia4a34e0145176e077bbf7e9ed6f69d815c6ed840
Co-authored-by: Stephen Finucane <sfinucan@redhat.com>
2016-10-12 11:12:08 +01:00
Jenkins aa7c3aef95 Merge "conf: Move PCI options to a PCI group" 2016-10-12 09:55:33 +00:00
Jenkins 1a30fda13a Merge "docs: update the Public Contractual API link" 2016-10-12 07:19:44 +00:00
Jenkins faafb6091e Merge "ironic: Rename private methods for instance info" 2016-10-12 00:48:53 +00:00
Matt Riedemann 77b23da9e8 docs: update the Public Contractual API link
This updates the docs to point at our flashy new(ish)
api-ref compute REST API docs instead of those gross
crusty old inaccurate ones.

Change-Id: Ib5e157f3ff7a215be4cbf7e8744b3507f3b4b106
2016-10-11 19:44:07 -04:00
Jenkins 6e1a9fa7b3 Merge "placement: add new resource_classes table" 2016-10-11 22:35:36 +00:00
Jenkins d7e6f20b6b Merge "Improve help text for libvirt options" 2016-10-11 18:46:39 +00:00
Jenkins 0a2700e4e6 Merge "Add swap volume notifications (start, end)" 2016-10-11 17:56:06 +00:00
Jenkins cbbe486cd9 Merge "Add a hacking rule for string interpolation at logging" 2016-10-11 17:55:32 +00:00
Jenkins 6974d651cc Merge "Avoid update resource if compute node not updated" 2016-10-11 16:43:32 +00:00
Jay Pipes d79d6f665d placement: add new resource_classes table
We will store custom resource classes in the new resource_classes table.
These custom resource classes represent non-standardized resource
classes. Followup patches add the plumbing to handle existing
standardized classes currently using the fields.ResourceClass field type
and to perform CRUD operations against a /resource-classes REST API
endpoint.

Change-Id: I60ea0dcb392c1b82fead4b859fc7ed6b32d4bda0
blueprint: custom-resource-classes
2016-10-11 12:30:44 -04:00
Jenkins 035c1177de Merge "Fix check_config_option_in_central_place" 2016-10-11 15:02:51 +00:00
Jenkins c307cbe567 Merge "ENOENT error on '/dev/log'" 2016-10-11 15:02:18 +00:00
Jenkins 79eacfdda6 Merge "config options: improve libvirt smbfs" 2016-10-11 15:01:42 +00:00
Jenkins 55db69f2c0 Merge "Replace uuid4() with uuidsentinel" 2016-10-11 15:01:09 +00:00
Jenkins 0583bb5a84 Merge "docs: update code-review guide for config options" 2016-10-11 15:00:24 +00:00
Jenkins 0ceb0a712a Merge "Don't attempt to escalate nova-manage privileges" 2016-10-11 14:59:46 +00:00
Jenkins 72644e143f Merge "Config options consistency of ephemeral_storage.py" 2016-10-11 14:56:09 +00:00
Jenkins 6961ac9972 Merge "Fix invalid import order and remove import *" 2016-10-11 14:50:50 +00:00
Jenkins 3d66738373 Merge "Cleanup instance device metadata object code" 2016-10-11 14:50:15 +00:00
Jenkins a63a45805a Merge "Replace fake_utils by using Fixture" 2016-10-11 14:00:57 +00:00
Anusha Unnam b78f5498d2 Improve help text for libvirt options
This patch improves help text for libvirt_volume_net_opts,
libvirt_volume_nfs_opts, libvirt_volume_quobyte_opts,
libvirt_volume_scality_opts.

Blueprint centralize-config-options-ocata

Change-Id: Ie89f1b1a7795d73fff9341fbdf1268fb3df7a20d
2016-10-11 12:56:09 +00:00
Takashi NATSUME 47fb8b7579 Add swap volume notifications (start, end)
Add the following notifications when swapping volumes.

* 'instance.volume_swap.start'
* 'instance.volume_swap.end'

A subsequent patch will add 'instance.volume_swap.error'.

Change-Id: Ic4d9d25bdc611221157e4663817e918b8d667ce9
Implements: blueprint add-swap-volume-notifications
2016-10-11 19:17:23 +09:00
Takashi NATSUME 4eb89c206e Add a hacking rule for string interpolation at logging
String interpolation should be delayed to be handled
by the logging code, rather than being done
at the point of the logging call.
So add the following hacking rule for it.

- [N354] String interpolation should be delayed at logging calls.

See the oslo i18n guideline.

* http://docs.openstack.org/developer/oslo.i18n/guidelines.html

Change-Id: Ief6d3ee3539c0857098fffdb7acfeec3e0fed6eb
Closes-Bug: #1596829
2016-10-11 08:39:48 +00:00
Jenkins 3d7ff766a7 Merge "Tests: fix a typo" 2016-10-11 07:38:43 +00:00
Jenkins 3d5d66d588 Merge "Remove dead link from notification devref" 2016-10-10 22:01:51 +00:00
Jenkins e5bfc26f64 Merge "Add error handling for delete-volume API" 2016-10-10 19:56:36 +00:00
Markus Zoeller 87530b6e67 Don't attempt to escalate nova-manage privileges
Remove code which allowed nova-manage to attempt to escalate
privileges so that configuration files can be read by users who
normally wouldn't have access, but do have sudo access.

The privilege escalation came into nova-manage with commit e9fd01e
to solve bug 805695. That bug report didn't describe a faulty behavior
but a change request.

NOTE: This is related to change I03063d2 from Kiall Mac Innes who did
this for the "designate" project. I'm reusing the change-id from his
change to make it clear that they are related to each other.

NOTE: I removed the try-except block completely, as it doesn't make
sense to continue when we cannot read the config file (due to a wrong
path or permission errors). That's the same approach we used in the
recent "nova/cmd/policy_check" module.
https://github.com/openstack/nova/blob/master/nova/cmd/policy_check.py#L158

Co-Authored-By: Kiall Mac Innes <kiall@macinnes.ie>
Closes-Bug: 1611171
Change-Id: I03063d2af14015e6506f1b6e958f5ff219aa4a87
2016-10-10 17:54:07 +02:00
Jenkins 354630e681 Merge "Stop using mox stubs in test_evacuate.py" 2016-10-10 14:39:15 +00:00
Balazs Gibizer 39af8d5d70 Remove dead link from notification devref
The auto generated class documentation link was 404 in the notification
devref as that documenation is not generated automatically any more.

This patch modifies the notification devref to include the interesting
part of the class documentation inline.

Change-Id: I7cbea16fc9682fa3c00eac16a51c4ed8588ba45c
2016-10-10 16:37:13 +02:00
Anh Tran 493a3135ed Stop using mox stubs in test_evacuate.py
Replace 'stubs.Set' with 'stub_out' in
nova/tests/unit/api/openstack/compute/test_evacuate.py

Part of blueprint remove-mox-ocata

Change-Id: I5c9180d0424042d7e966287d2ac7faf9271c136f
2016-10-10 13:15:41 +00:00
Jenkins 26fd2eabb0 Merge "Fix API doc for os-console-auth-tokens" 2016-10-10 12:38:49 +00:00
Jenkins fa4dc18e41 Merge "Add Apache 2.0 license to source file" 2016-10-10 12:38:13 +00:00
Jenkins 6b62b0f228 Merge "Remove the sample policy file" 2016-10-10 12:18:21 +00:00
Gary Kotton e2635584a7 Tests: fix a typo
TrivialFix

Change-Id: I83ea75257d5b900a37f024fe29427d33c4f2b17e
2016-10-10 00:45:11 -07:00
Jenkins 0b59a2d9dc Merge "Patch mkisofs calls" 2016-10-07 20:46:40 +00:00
Jenkins 948f57d832 Merge "Annotate online db migrations with cycle added" 2016-10-07 20:41:59 +00:00
Diana Clarke 5c608abc92 ENOENT error on '/dev/log'
The nova unit tests recently started to fail on systems where you can't
assume '/dev/log' exists (like mac osx). Patching socket.connect allows
the basic configuration of SysLogHandler('/dev/log') to be tested still.

Change-Id: I2f356ed6d456d6f0ca23b7bbf3943861865ff929
Related-Bug: #1597433
2016-10-07 12:41:45 -04:00
Diana Clarke b90df7c9c7 Patch mkisofs calls
The nova unit tests recently started to fail on systems lacking mkisofs
(like mac osx). Skip these mkisofs calls by patching _make_iso9660.

Change-Id: I350aafa878616f74df506c1bc9ee5f26ea06fe97
Closes-Bug: #1630420
2016-10-07 12:14:30 -04:00
Jenkins 0967572f1e Merge "Fix drop_move_claim() on revert resize" 2016-10-07 16:13:34 +00:00
Jenkins 38c4516f8a Merge "Change log level to debug for migrations pairing" 2016-10-07 16:00:42 +00:00
Jenkins f57cc519fd Merge "[placement] reorder middleware to correct logging context" 2016-10-07 12:11:29 +00:00
Jenkins 1feda57285 Merge "[placement] Allow both /placement and /placement/ to work" 2016-10-07 12:10:49 +00:00
Jenkins 51486d183b Merge "Remove unnecessary credential sanitation for logging" 2016-10-07 12:10:09 +00:00
Jenkins 3f98e025eb Merge "[placement] ensure that allow headers are native strings" 2016-10-07 12:09:26 +00:00
Jenkins 152d5e45ef Merge "Delete traces of in-progress snapshot on VM being deleted" 2016-10-07 11:38:35 +00:00
Jenkins 582017212d Merge "Catch DevicePathInUse in attach_volume" 2016-10-06 22:47:20 +00:00
Jenkins cd44884e7b Merge "conf: Trivial cleanup of console.py" 2016-10-06 22:03:53 +00:00
Jenkins 2e65c58462 Merge "conf: Trivial cleanup of compute.py" 2016-10-06 22:03:15 +00:00