Eric Fried f2d088b04e Stop using PlacementDirect
PlacementDirect was integrated into a functional test suite when it was
first created as a way to prove that it worked [1] and demonstrate how
to use it.

However, it was a pain then, because the interceptor needs to be created
every time you want to use it; and since extracted placement started
diverging from in-tree placement, other problems started cropping up
(see the associated bug).

So this commit removes the use of PlacementDirect from nova. Details:

- test_report_client now uses PlacementFixture. So all the `with
  interceptor` context management is gone. This accounts for the vast
  majority of the apparent change, which is just outdenting those
  contexts.
- SchedulerReportClientTestBase, which was doing some hocus pocus to
  wrap the SchedulerReportClient such that we could do some microversion
  checks, is removed. The test suite simply instantiates the
  microversion-checking wrapper class directly as the client used by the
  test cases.
- We were taking advantage of a PlacementDirect feature allowing us to
  default to the latest microversion if not explicitly specified in the
  request. Without this, we had to add the `version` kwarg to some of
  the calls we were making to SchedulerReportClient primitives
  (get/put/post/delete).
- A piece of test_update_from_provider_tree was using a
  deliberately-broken interceptor to prove that the code in question
  wasn't hitting the API. We replace this with a non-callable mock on
  the Adapter's request method.
- test_global_request_id was taking advantage of the interceptor to
  validate that the global request ID was making it to the "other side"
  of the API boundary. This was fun, but overkill. We now simply assert
  that the correct HTTP header is making it into the ksa Adapter's
  request method.
- Functional test suite test_resource_tracker.IronicResourceTrackerTest
  was inheriting from the SchedulerReportClientTestBase class, but not
  using the interceptor anywhere. Can't tell you why that was done. So
  now it just uses the plain old test.TestCase like everyone else.

[1] This commit does remove all of nova's testing of PlacementDirect.
However, it is still tested in the placement repository itself:
https://github.com/openstack/placement/blob/69b9659a457b6d715ed47e6bd6d3b923d548c620/placement/tests/functional/test_direct.py

Change-Id: Icb889c09a69e7c5cbf9330e5d9917d6ab3ac3dc5
Related-Bug: #1818560
2020-03-05 07:36:37 -06:00
2020-01-14 21:25:56 +00:00
2020-03-05 07:36:37 -06:00
2019-04-28 20:06:15 +00:00
2019-04-19 19:45:52 +00:00
2020-01-17 11:30:40 +00:00
2017-11-24 16:51:12 -05:00
2019-10-23 07:21:23 +00:00
2018-01-12 17:05:11 +08:00
2017-09-07 15:42:31 +02:00
2017-03-02 11:50:48 +00:00
2020-01-17 11:30:40 +00:00

==============
OpenStack Nova
==============

.. image:: https://governance.openstack.org/tc/badges/nova.svg
    :target: https://governance.openstack.org/tc/reference/tags/index.html

.. Change things from this point on


OpenStack Nova provides a cloud computing fabric controller, supporting a wide
variety of compute technologies, including: libvirt (KVM, Xen, LXC and more),
Hyper-V, VMware, XenServer, OpenStack Ironic and PowerVM.

Use the following resources to learn more.

API
---

To learn how to use Nova's API, consult the documentation available online at:

- `Compute API Guide <https://docs.openstack.org/api-guide/compute/>`__
- `Compute API Reference <https://docs.openstack.org/api-ref/compute/>`__

For more information on OpenStack APIs, SDKs and CLIs in general, refer to:

- `OpenStack for App Developers <https://www.openstack.org/appdev/>`__
- `Development resources for OpenStack clouds
  <https://developer.openstack.org/>`__

Operators
---------

To learn how to deploy and configure OpenStack Nova, consult the documentation
available online at:

- `OpenStack Nova <https://docs.openstack.org/nova/>`__

In the unfortunate event that bugs are discovered, they should be reported to
the appropriate bug tracker. If you obtained the software from a 3rd party
operating system vendor, it is often wise to use their own bug tracker for
reporting problems. In all other cases use the master OpenStack bug tracker,
available at:

- `Bug Tracker <https://bugs.launchpad.net/nova>`__

Developers
----------

For information on how to contribute to Nova, please see the contents of the
CONTRIBUTING.rst.

Any new code must follow the development guidelines detailed in the HACKING.rst
file, and pass all unit tests.

Further developer focused documentation is available at:

- `Official Nova Documentation <https://docs.openstack.org/nova/>`__
- `Official Client Documentation
  <https://docs.openstack.org/python-novaclient/>`__

Other Information
-----------------

During each `Summit`_ and `Project Team Gathering`_, we agree on what the whole
community wants to focus on for the upcoming release. The plans for nova can
be found at:

- `Nova Specs <http://specs.openstack.org/openstack/nova-specs/>`__

.. _Summit: https://www.openstack.org/summit/
.. _Project Team Gathering: https://www.openstack.org/ptg/
S
Description
No description provided
Readme 258 MiB
Languages
Python 97.5%
Smarty 2.3%
Shell 0.2%