示例#1
0
class RpcController(wsgi.Controller):
    def __init__(self):
        self.rptrpc = ComputeAPI()

    def show(self, req, id=None):
        """
        builder = views_versions.get_view_builder(req)
        if id not in versions.VERSIONS:
            raise webob.exc.HTTPNotFound()

        return builder.build_version(versions.VERSIONS[id])
        """
        ctx = context.RequestContext()
        return self.rptrpc.showMessage(ctx, id)
示例#2
0
 def __init__(self):
     self.rptrpc = ComputeAPI()