[placement] Unregister the ResourceClassList object

Unregister the ResourceClassList object because we do not need RPC
and versioning for the objects in nova.objects.resource_provider.

There are two primary changes here:

* unregistering the ResourceClassList class
* where objects.ResourceClassList is used, point directly to the
  nova.objects.resource_provider package instead

Partially-Implements: bp placement-deregister-objects
Change-Id: I109cceb08050b2714c2a2409bf4674f718ab29d6
This commit is contained in:
Chris Dent 2017-09-08 15:54:10 +01:00
parent d947b286aa
commit daded82ae3

@ -23,6 +23,7 @@ from nova.api.openstack.placement import wsgi_wrapper
from nova import exception
from nova.i18n import _
from nova import objects
from nova.objects import resource_provider as rp_obj
POST_RC_SCHEMA_V1_2 = {
@ -153,7 +154,7 @@ def list_resource_classes(req):
a collection of resource classes.
"""
context = req.environ['placement.context']
rcs = objects.ResourceClassList.get_all(context)
rcs = rp_obj.ResourceClassList.get_all(context)
response = req.response
response.body = encodeutils.to_utf8(jsonutils.dumps(