1) send DELETE /api/nodes/<node_id> request to delete discovered or provisioned nodes. This request will trigger appropriate tasks for the node (like bootstrapping, etc.)
2) send PUT /api/nodes request with data {id: <node_id>, pending_deletion: true} to mark deployed node for deletion (this needs further redeployment)
BUT it also should be Nailgun change here:
1) when UI sends DELETE request for discovered node, Nailgun should check the 'discovered' node status and NOT to bootstrap node again
In result, we have an agreement, that UI should:
1) send DELETE /api/nodes/ <node_id> request to delete discovered or provisioned nodes. This request will trigger appropriate tasks for the node (like bootstrapping, etc.)
2) send PUT /api/nodes request with data {id: <node_id>, pending_deletion: true} to mark deployed node for deletion (this needs further redeployment)
BUT it also should be Nailgun change here:
1) when UI sends DELETE request for discovered node, Nailgun should check the 'discovered' node status and NOT to bootstrap node again