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>
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
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
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
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
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
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
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
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
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
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