def on_delete(self, req, resp, name, address):
"""
Handles DELETE requests for individual hosts in a Cluster.
This removes a single host from the cluster, idempotently.
: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 name of the Cluster being requested.
:type name: str
:param address: The address of the Host being requested.
:type address: str
"""
try:
util.etcd_cluster_remove_host(name, address)
resp.status = falcon.HTTP_200
except KeyError:
resp.status = falcon.HTTP_404
评论列表
文章目录