'Edit a node.
:param node: Node to edit.
:type node: :class:`libcloud.compute.base.Node`
:param params: Node parameters to update.
:type params: ``dict``
:return Edited node.
:rtype: :class:`libcloud.compute.base.Node`'

def ex_edit_node(self, node, params):

    data = {}
    data['name'] = node.name
    data['cpu'] = node.extra['cpu']
    data['mem'] = node.extra['mem']
    data['vnc_password'] = node.extra['vnc_password']
    nics = copy.deepcopy(node.extra.get('nics', []))
    data['nics'] = nics
    data.update(params)
    action = ('/servers/%s/' % node.id)
    response = self.connection.request(action=action, method='PUT', data=data).object
    node = self._to_node(data=response)
    return node
