Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for FieldValueForbidden (0.46 sec)

  1. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation.go

    	if reason == nil {
    		return field.Invalid(fldPath, value, detail)
    	}
    	switch *reason {
    	case apiextensions.FieldValueForbidden:
    		return field.Forbidden(fldPath, detail)
    	case apiextensions.FieldValueRequired:
    		return field.Required(fldPath, detail)
    	case apiextensions.FieldValueDuplicate:
    		return field.Duplicate(fldPath, value)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 20 18:21:31 UTC 2024
    - 32.2K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/validation_test.go

    				}
    			}
    		})
    	}
    }
    
    func TestReasonAndFldPath(t *testing.T) {
    	forbiddenReason := func() *apiextensions.FieldValueErrorReason {
    		r := apiextensions.FieldValueForbidden
    		return &r
    	}()
    	tests := []struct {
    		name   string
    		schema *schema.Structural
    		obj    interface{}
    		errors field.ErrorList
    	}{
    		{name: "Return error based on input reason",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 17:14:10 UTC 2024
    - 159.9K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation.go

    	StaticEstimatedCRDCostLimit = 100000000
    
    	MaxSelectableFields = 8
    )
    
    var supportedValidationReason = sets.NewString(
    	string(apiextensions.FieldValueRequired),
    	string(apiextensions.FieldValueForbidden),
    	string(apiextensions.FieldValueInvalid),
    	string(apiextensions.FieldValueDuplicate),
    )
    
    // ValidateCustomResourceDefinition statically validates
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 82.6K bytes
    - Viewed (0)
  4. pkg/apis/core/validation/validation_test.go

    			podSec:    &core.PodSpec{SecurityContext: validWindowsSC},
    			expectErr: false,
    		},
    		"invalid SC, windows, error": {
    			podSec:      &core.PodSpec{SecurityContext: invalidWindowsSC},
    			errorType:   "FieldValueForbidden",
    			errorDetail: "cannot be set for a windows pod",
    			expectErr:   true,
    		},
    	}
    	for k, v := range cases {
    		t.Run(k, func(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 22:40:29 UTC 2024
    - 857.7K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/validation/validation_test.go

    												return &r
    											}(),
    										},
    										{
    											Rule: "true",
    											Reason: func() *apiextensions.FieldValueErrorReason {
    												r := apiextensions.FieldValueForbidden
    												return &r
    											}(),
    										},
    									},
    								},
    							},
    						},
    					},
    				},
    				Status: apiextensions.CustomResourceDefinitionStatus{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 349.4K bytes
    - Viewed (0)
  6. pkg/generated/openapi/zz_generated.openapi.go

    returned to the caller when a request fails this validation rule. The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. The currently supported reasons are: \"FieldValueInvalid\", \"FieldValueForbidden\", \"FieldValueRequired\", \"FieldValueDuplicate\". If not set, default to use \"FieldValueInvalid\". All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid.\n\nPossible...
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 18:37:07 UTC 2024
    - 3M bytes
    - Viewed (0)
  7. api/openapi-spec/swagger.json

    returned to the caller when a request fails this validation rule. The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. The currently supported reasons are: \"FieldValueInvalid\", \"FieldValueForbidden\", \"FieldValueRequired\", \"FieldValueDuplicate\". If not set, default to use \"FieldValueInvalid\". All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid.",...
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 18:37:07 UTC 2024
    - 3.1M bytes
    - Viewed (0)
Back to top