def on_get(self, req, resp, name):
"""
Handles retrieval of an existing Network.
:param req: Request instance that will be passed through.
:type req: falcon.Request
:param resp: Response instance that will be passed through.
:type resp: falcon.Response
:param name: The friendly name of the network.
:type address: str
"""
try:
store_manager = cherrypy.engine.publish('get-store-manager')[0]
network = store_manager.get(Network.new(name=name))
resp.status = falcon.HTTP_200
req.context['model'] = network
except:
resp.status = falcon.HTTP_404
return
评论列表
文章目录