Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for HasSupport (0.26 sec)

  1. staging/src/k8s.io/cli-runtime/pkg/resource/fallback_query_param_verifier.go

    // secondary attempts to determine support. If the GVK supports the query param,
    // nil is returned.
    func (f *fallbackQueryParamVerifier) HasSupport(gvk schema.GroupVersionKind) error {
    	err := f.primary.HasSupport(gvk)
    	// If an error was returned from the primary OpenAPI endpoint,
    	// we fallback to check the secondary OpenAPI endpoint for
    	// any error *except* "paramUnsupportedError".
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 10 19:13:54 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/cli-runtime/pkg/resource/query_param_verifier_test.go

    		queryParam:    QueryParamFieldValidation,
    	}
    
    	err := fieldValidationVerifier.HasSupport(schema.GroupVersionKind{Group: "", Version: "v1", Kind: "NodeProxyOptions"})
    	if err == nil {
    		t.Fatalf("NodeProxyOptions doesn't support fieldValidation, yet no error found")
    	}
    
    	err = fieldValidationVerifier.HasSupport(schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Pod"})
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 01:23:27 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/cli-runtime/pkg/resource/query_param_verifier.go

    type Verifier interface {
    	HasSupport(gvk schema.GroupVersionKind) error
    }
    
    // VerifiableQueryParam is a query parameter who's enablement on the
    // apiserver can be determined by evaluating the OpenAPI for a specific
    // GVK.
    type VerifiableQueryParam string
    
    const (
    	QueryParamFieldValidation VerifiableQueryParam = "fieldValidation"
    )
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 01:23:27 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/cli-runtime/pkg/resource/fallback_query_param_verifier_test.go

    			// secondary verifier should not be called.
    			secondary := &failingVerifier{name: "secondary", t: t}
    			verifier := NewFallbackQueryParamVerifier(primary, secondary)
    			err := verifier.HasSupport(tc.gvk)
    			if tc.expectedSupports && err != nil {
    				t.Errorf("Expected supports, but returned err for GVK (%s)", tc.gvk)
    			} else if !tc.expectedSupports && err == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 10 18:30:16 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  5. staging/src/k8s.io/cli-runtime/pkg/resource/query_param_verifier_v3.go

    type queryParamVerifierV3 struct {
    	finder     CRDFinder
    	root       openapi3.Root
    	queryParam VerifiableQueryParam
    }
    
    var namespaceGVK = schema.GroupVersionKind{Group: "", Version: "v1", Kind: "Namespace"}
    
    // HasSupport returns nil error if the passed GVK supports the parameter
    // (stored in struct; usually "fieldValidation") for Patch endpoint.
    // Returns an error if the passed GVK does not support the query param,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 18 01:23:27 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  6. staging/src/k8s.io/cli-runtime/pkg/resource/query_param_verifier_v3_test.go

    			verifier := &queryParamVerifierV3{
    				finder: NewCRDFinder(func() ([]schema.GroupKind, error) {
    					return tc.crds, nil
    				}),
    				root:       root,
    				queryParam: tc.queryParam,
    			}
    			err := verifier.HasSupport(tc.gvk)
    			if tc.expectedSupports && err != nil {
    				t.Errorf("Expected supports, but returned err for GVK (%s)", tc.gvk)
    			} else if !tc.expectedSupports && err == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 12 04:44:45 UTC 2023
    - 5.9K bytes
    - Viewed (0)
Back to top