code: func ValidateNodeUpdate(node, oldNode *api.Node) field.ErrorList {
  	allErrs := ValidateObjectMetaUpdate(&node.ObjectMeta, &oldNode.ObjectMeta, field.NewPath("metadata"))
  
  	// TODO: Enable the code once we have better api object.status update model. Currently,
  	// anyone can update node status.
  	// if !api.Semantic.DeepEqual(node.Status, api.NodeStatus{}) {
  	// 	allErrs = append(allErrs, field.Invalid("status", node.Status, "must be empty"))
  	// }
  
  	// Validte no duplicate addresses in node status.
  	addresses := make(map[api.NodeAddress]bool)
  	for i, address := range node.Status.Addresses {
  		if _, ok := addresses[address]; ok {
  			allErrs = append(allErrs, field.Duplicate(field.NewPath("status", "addresses").Index(i), address))
  		}
  		addresses[address] = true
  	}
  
  	// TODO: move reset function to its own location
  	// Ignore metadata changes now that they have been tested
  	oldNode.ObjectMeta = node.ObjectMeta
  	// Allow users to update capacity
  	oldNode.Status.Capacity = node.Status.Capacity
  	// Allow the controller manager to assign a CIDR to a node.
  	oldNode.Spec.PodCIDR = node.Spec.PodCIDR
  	// Allow users to unschedule node
  	oldNode.Spec.Unschedulable = node.Spec.Unschedulable
  	// Clear status
  	oldNode.Status = node.Status
  
  	// TODO: Add a 'real' error type for this error and provide print actual diffs.
  	if !api.Semantic.DeepEqual(oldNode, node) {
  		glog.V(4).Infof("Update failed validation %#v vs %#v", oldNode, node)
  		allErrs = append(allErrs, field.Forbidden(field.NewPath(""), "node updates may only change labels or capacity"))
  	}
  
  	return allErrs
  }
docs: // ValidateNodeUpdate tests to make sure a node update can be applied.  Modifies oldNode.