@webob.dec.wsgify
@microversion.version_handler(1.2)
@util.check_accept('application/json')
def list_resource_classes(req):
 context = req.environ['placement.context']
 rcs = objects.ResourceClassList.get_all(context)
 response = req.response
 response.body = encodeutils.to_utf8(jsonutils.dumps(_serialize_resource_classes(req.environ, rcs)))
 response.content_type = 'application/json'
 return response

@ webob . dec . wsgify @ microversion . version_handler ( 1.2 ) @ util . check_accept ( 'application/json' ) def list_resource_classes ( req ) : context = req . environ [ 'placement.context' ] rcs = objects . ResourceClassList . get_all ( context ) response = req . response response . body = encodeutils . to_utf8 ( jsonutils . dumps ( _serialize_resource_classes ( req . environ , rcs ) ) ) response . content_type = 'application/json' return response
get a list of resource classes .