'Create new ``DeploymentState`` based on this one which updates an
existing ``NodeState`` with any known information from the given
``NodeState``.  Attributes which are set to ``None` on the given
update, indicating ignorance, will not be changed in the result.
The given ``NodeState`` will simply be added if it doesn\'t represent a
node that is already part of the ``DeploymentState`` (based on UUID
comparison).
:param NodeState node: An update for ``NodeState`` with same UUID in
this ``DeploymentState``.
:return DeploymentState: Updated with new ``NodeState``.'

def update_node(self, node_state):

    original_node = self.nodes.get(node_state.uuid)
    if (original_node is None):
        return self.transform(['nodes', node_state.uuid], node_state)
    updated_node = original_node.evolver()
    for (key, value) in node_state.items():
        if (value is not None):
            updated_node = updated_node.set(key, value)
    updated_node = updated_node.persistent()
    return self.transform(['nodes', updated_node.uuid], updated_node)
