@webob.dec.wsgify
@microversion.version_handler(1.2)
@util.check_accept('application/json')
def get_resource_class(req):
 name = util.wsgi_path_item(req.environ, 'name')
 context = req.environ['placement.context']
 rc = objects.ResourceClass.get_by_name(context, name)
 req.response.body = encodeutils.to_utf8(jsonutils.dumps(_serialize_resource_class(req.environ, rc)))
 req.response.content_type = 'application/json'
 return req.response

@ webob . dec . wsgify @ microversion . version_handler ( 1.2 ) @ util . check_accept ( 'application/json' ) def get_resource_class ( req ) : name = util . wsgi_path_item ( req . environ , 'name' ) context = req . environ [ 'placement.context' ] rc = objects . ResourceClass . get_by_name ( context , name ) req . response . body = encodeutils . to_utf8 ( jsonutils . dumps ( _serialize_resource_class ( req . environ , rc ) ) ) req . response . content_type = 'application/json' return req . response
get a single resource class .