Esempio n. 1
0
// Validate validates a new ReplicaSet.
func (rsStrategy) Validate(ctx api.Context, obj runtime.Object) field.ErrorList {
	rs := obj.(*extensions.ReplicaSet)
	return validation.ValidateReplicaSet(rs)
}
Esempio n. 2
0
// ValidateUpdate is the default update validation for an end user.
func (rsStrategy) ValidateUpdate(ctx api.Context, obj, old runtime.Object) field.ErrorList {
	validationErrorList := validation.ValidateReplicaSet(obj.(*extensions.ReplicaSet))
	updateErrorList := validation.ValidateReplicaSetUpdate(obj.(*extensions.ReplicaSet), old.(*extensions.ReplicaSet))
	return append(validationErrorList, updateErrorList...)
}