def delete_composed_node(nodeid):
nodes_url = get_base_resource_url("Nodes")
delete_url = nodes_url + '/' + str(nodeid)
resp = send_request(delete_url, "DELETE")
if resp.status_code == http_client.NO_CONTENT:
# we should return 200 status code instead of 204, because 204 means
# 'No Content', the message in resp_dict will be ignored in that way
return exception.confirmation(
confirm_code="DELETED",
confirm_detail="This composed node has been deleted successfully.")
else:
raise exception.RedfishException(resp.json(),
status_code=resp.status_code)
评论列表
文章目录