Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 46 for NewNotFound (0.21 sec)

  1. cmd/kubeadm/app/util/apiclient/idempotency_test.go

    			setupClient: func(client *clientsetfake.Clientset) {
    				client.PrependReactor("get", "configmaps", func(clientgotesting.Action) (bool, runtime.Object, error) {
    					return true, nil, apierrors.NewNotFound(schema.GroupResource{}, "name")
    				})
    				client.PrependReactor("create", "configmaps", func(clientgotesting.Action) (bool, runtime.Object, error) {
    					return true, nil, nil
    				})
    			},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Feb 18 11:14:32 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  2. cmd/kubeadm/app/util/apiclient/init_dryrun.go

    	// This can only happen on an upgrade; and in that case the ClientBackedDryRunGetter impl will be used
    	return true, nil, apierrors.NewNotFound(action.GetResource().GroupResource(), "clusterrolebinding not found")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 01 07:17:50 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/api/errors/errors_test.go

    	}
    
    	if !IsConflict(NewConflict(resource("tests"), "2", errors.New("message"))) {
    		t.Errorf("expected to be %s", metav1.StatusReasonAlreadyExists)
    	}
    	if !IsNotFound(NewNotFound(resource("tests"), "3")) {
    		t.Errorf("expected to be %s", metav1.StatusReasonNotFound)
    	}
    	if !IsInvalid(NewInvalid(kind("Test"), "2", nil)) {
    		t.Errorf("expected to be %s", metav1.StatusReasonInvalid)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Oct 28 07:31:28 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  4. pkg/controller/history/controller_history.go

    	if err != nil {
    		return err
    	}
    	obj, found, err := fh.indexer.GetByKey(key)
    	if err != nil {
    		return err
    	}
    	if !found {
    		return errors.NewNotFound(apps.Resource("controllerrevisions"), revision.Name)
    	}
    	return fh.indexer.Delete(obj)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 13:33:52 UTC 2021
    - 18.2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/api/errors/errors.go

    			break
    		}
    		return &StatusError{ErrStatus: status}
    	}
    	return &UnexpectedObjectError{obj}
    }
    
    // NewNotFound returns a new error which indicates that the resource of the kind and the name was not found.
    func NewNotFound(qualifiedResource schema.GroupResource, name string) *StatusError {
    	return &StatusError{metav1.Status{
    		Status: metav1.StatusFailure,
    		Code:   http.StatusNotFound,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 21 03:41:32 UTC 2022
    - 30.5K bytes
    - Viewed (0)
  6. pkg/controller/volume/persistentvolume/testing/testing.go

    			logger.V(4).Info("GetVolume: found volume", "volumeName", volume.Name)
    			return true, volume.DeepCopy(), nil
    		}
    		logger.V(4).Info("GetVolume: volume not found", "volumeName", name)
    		return true, nil, apierrors.NewNotFound(action.GetResource().GroupResource(), name)
    
    	case action.Matches("get", "persistentvolumeclaims"):
    		name := action.(core.GetAction).GetName()
    		nameSpace := action.(core.GetAction).GetNamespace()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 20.1K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/cmd/token_test.go

    	var buf bytes.Buffer
    	fakeClient := &fake.Clientset{}
    	fakeClient.AddReactor("get", "secrets", func(action core.Action) (handled bool, ret runtime.Object, err error) {
    		return true, nil, apierrors.NewNotFound(v1.Resource("secrets"), "foo")
    	})
    
    	testCases := []struct {
    		name          string
    		token         string
    		usages        []string
    		extraGroups   []string
    		printJoin     bool
    		expectedError bool
    	}{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 05:47:48 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  8. pkg/kubelet/util/manager/watch_based_manager.go

    	}
    	obj, exists, err := item.store.GetByKey(c.key(namespace, name))
    	if err != nil {
    		return nil, err
    	}
    	if !exists {
    		return nil, apierrors.NewNotFound(c.groupResource, name)
    	}
    	if object, ok := obj.(runtime.Object); ok {
    		// If the returned object is immutable, stop the reflector.
    		//
    		// NOTE: we may potentially not even start the reflector if the object is
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  9. pkg/controller/namespace/deletion/namespaced_resources_deleter_test.go

    		if action.GetNamespace() == "ns1" {
    			// simulate the flakes resource not existing when ns1 is processed
    			return true, nil, errors.NewNotFound(schema.GroupResource{}, "")
    		}
    		return false, nil, nil
    	}
    	mockMetadataClient := metadatafake.NewSimpleMetadataClient(metadatafake.NewTestScheme())
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 07:34:23 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/patch.go

    	return objToUpdate, nil
    }
    
    func (p *jsonPatcher) createNewObject(_ context.Context) (runtime.Object, error) {
    	return nil, errors.NewNotFound(p.resource.GroupResource(), p.name)
    }
    
    type jsonPatchOp struct {
    	Op    string      `json:"op"`
    	Path  string      `json:"path"`
    	From  string      `json:"from"`
    	Value interface{} `json:"value"`
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 28.5K bytes
    - Viewed (0)
Back to top