func (v *Namespace) handle(req *nsRequest) admission.Response {
	parent := req.ns.Annotations[api.SubnamespaceOf]
	if parent != "" && req.op == v1beta1.Delete {
		msg := fmt.Sprintf("The namespace %s is a subnamespace. Please delete the anchor from the parent namespace %s to delete the subnamespace.", req.ns.Name, parent)
		return deny(metav1.StatusReasonForbidden, msg)
	}

	return v.checkForest(req)
}
// handle implements the non-boilerplate logic of this validator, allowing it to be more easily unit
// tested (ie without constructing a full admission.Request).
handle implements the non-boilerplate logic of this validator, allowing it to be more easily unit
tested .
// handle implements the non - boilerplate logic of this validator allowing it to be more easily unit // tested ( ie without constructing a full admission . Request ) .
func (v *Namespace) handle(req *nsRequest) admission.Response {
	parent := req.ns.Annotations[api.SubnamespaceOf]
	if parent != "" && req.op == v1beta1.Delete {
		msg := fmt.Sprintf("The namespace %s is a subnamespace. Please delete the anchor from the parent namespace %s to delete the subnamespace.", req.ns.Name, parent)
		return deny(metav1.StatusReasonForbidden, msg)
	}
	return v.checkForest(req)
}
func ( v * Namespace ) handle ( req * nsRequest ) admission . Response { parent := req . ns . Annotations [ api . SubnamespaceOf ] if parent != " " && req . op == v1beta1 . Delete { msg := fmt . Sprintf ( " " , req . ns . Name , parent ) return deny ( metav1 . StatusReasonForbidden , msg ) } return v . checkForest ( req ) }
handle implements the non-boilerplate logic of this validator, allowing it to be more easily unit
tested .
handle implements the non - boilerplate logic of this validator allowing it to be more easily unit tested .