'Delete node
node: node to delete
nodes: optional list to delete from (e.g. self.hosts)'

def delNode(self, node, nodes=None):

    if (nodes is None):
        nodes = (self.hosts if (node in self.hosts) else (self.switches if (node in self.switches) else (self.controllers if (node in self.controllers) else [])))
    node.stop(deleteIntfs=True)
    node.terminate()
    nodes.remove(node)
    del self.nameToNode[node.name]
