Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ValidateRuntimeClassUpdate (0.26 sec)

  1. pkg/apis/node/validation/validation.go

    	}
    	if rc.Scheduling != nil {
    		allErrs = append(allErrs, validateScheduling(rc.Scheduling, field.NewPath("scheduling"))...)
    	}
    
    	return allErrs
    }
    
    // ValidateRuntimeClassUpdate validates an update to the object
    func ValidateRuntimeClassUpdate(new, old *node.RuntimeClass) field.ErrorList {
    	allErrs := apivalidation.ValidateObjectMetaUpdate(&new.ObjectMeta, &old.ObjectMeta, field.NewPath("metadata"))
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 10 19:08:24 UTC 2022
    - 3.2K bytes
    - Viewed (0)
  2. pkg/registry/node/runtimeclass/strategy.go

    func (strategy) ValidateUpdate(ctx context.Context, obj, old runtime.Object) field.ErrorList {
    	newObj := obj.(*node.RuntimeClass)
    	errorList := validation.ValidateRuntimeClass(newObj)
    	return append(errorList, validation.ValidateRuntimeClassUpdate(newObj, old.(*node.RuntimeClass))...)
    }
    
    // WarningsOnUpdate returns warnings for the given update.
    func (strategy) WarningsOnUpdate(ctx context.Context, obj, old runtime.Object) []string {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 09 08:17:32 UTC 2022
    - 3.6K bytes
    - Viewed (0)
  3. pkg/apis/node/validation/validation_test.go

    		t.Run(test.name, func(t *testing.T) {
    			// So we don't need to write it in every test case...
    			test.old.ObjectMeta.ResourceVersion = "1"
    			test.new.ObjectMeta.ResourceVersion = "1"
    
    			errs := ValidateRuntimeClassUpdate(&test.new, &test.old)
    			if test.expectError {
    				assert.NotEmpty(t, errs)
    			} else {
    				assert.Empty(t, errs)
    			}
    		})
    	}
    }
    
    func TestValidateOverhead(t *testing.T) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 02 07:48:42 UTC 2023
    - 6.4K bytes
    - Viewed (0)
Back to top