2 Copyright The Kubernetes Authors.
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
8 http://www.apache.org/licenses/LICENSE-2.0
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
17 // Code generated by client-gen. DO NOT EDIT.
22 v1alpha1 "ovn4nfv-k8s-plugin/pkg/apis/k8s/v1alpha1"
24 v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
25 labels "k8s.io/apimachinery/pkg/labels"
26 schema "k8s.io/apimachinery/pkg/runtime/schema"
27 types "k8s.io/apimachinery/pkg/types"
28 watch "k8s.io/apimachinery/pkg/watch"
29 testing "k8s.io/client-go/testing"
32 // FakeNetworkChainings implements NetworkChainingInterface
33 type FakeNetworkChainings struct {
38 var networkchainingsResource = schema.GroupVersionResource{Group: "k8s.plugin.opnfv.org", Version: "v1alpha1", Resource: "networkchainings"}
40 var networkchainingsKind = schema.GroupVersionKind{Group: "k8s.plugin.opnfv.org", Version: "v1alpha1", Kind: "NetworkChaining"}
42 // Get takes name of the networkChaining, and returns the corresponding networkChaining object, and an error if there is any.
43 func (c *FakeNetworkChainings) Get(name string, options v1.GetOptions) (result *v1alpha1.NetworkChaining, err error) {
45 Invokes(testing.NewGetAction(networkchainingsResource, c.ns, name), &v1alpha1.NetworkChaining{})
50 return obj.(*v1alpha1.NetworkChaining), err
53 // List takes label and field selectors, and returns the list of NetworkChainings that match those selectors.
54 func (c *FakeNetworkChainings) List(opts v1.ListOptions) (result *v1alpha1.NetworkChainingList, err error) {
56 Invokes(testing.NewListAction(networkchainingsResource, networkchainingsKind, c.ns, opts), &v1alpha1.NetworkChainingList{})
62 label, _, _ := testing.ExtractFromListOptions(opts)
64 label = labels.Everything()
66 list := &v1alpha1.NetworkChainingList{ListMeta: obj.(*v1alpha1.NetworkChainingList).ListMeta}
67 for _, item := range obj.(*v1alpha1.NetworkChainingList).Items {
68 if label.Matches(labels.Set(item.Labels)) {
69 list.Items = append(list.Items, item)
75 // Watch returns a watch.Interface that watches the requested networkChainings.
76 func (c *FakeNetworkChainings) Watch(opts v1.ListOptions) (watch.Interface, error) {
78 InvokesWatch(testing.NewWatchAction(networkchainingsResource, c.ns, opts))
82 // Create takes the representation of a networkChaining and creates it. Returns the server's representation of the networkChaining, and an error, if there is any.
83 func (c *FakeNetworkChainings) Create(networkChaining *v1alpha1.NetworkChaining) (result *v1alpha1.NetworkChaining, err error) {
85 Invokes(testing.NewCreateAction(networkchainingsResource, c.ns, networkChaining), &v1alpha1.NetworkChaining{})
90 return obj.(*v1alpha1.NetworkChaining), err
93 // Update takes the representation of a networkChaining and updates it. Returns the server's representation of the networkChaining, and an error, if there is any.
94 func (c *FakeNetworkChainings) Update(networkChaining *v1alpha1.NetworkChaining) (result *v1alpha1.NetworkChaining, err error) {
96 Invokes(testing.NewUpdateAction(networkchainingsResource, c.ns, networkChaining), &v1alpha1.NetworkChaining{})
101 return obj.(*v1alpha1.NetworkChaining), err
104 // UpdateStatus was generated because the type contains a Status member.
105 // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus().
106 func (c *FakeNetworkChainings) UpdateStatus(networkChaining *v1alpha1.NetworkChaining) (*v1alpha1.NetworkChaining, error) {
108 Invokes(testing.NewUpdateSubresourceAction(networkchainingsResource, "status", c.ns, networkChaining), &v1alpha1.NetworkChaining{})
113 return obj.(*v1alpha1.NetworkChaining), err
116 // Delete takes name of the networkChaining and deletes it. Returns an error if one occurs.
117 func (c *FakeNetworkChainings) Delete(name string, options *v1.DeleteOptions) error {
119 Invokes(testing.NewDeleteAction(networkchainingsResource, c.ns, name), &v1alpha1.NetworkChaining{})
124 // DeleteCollection deletes a collection of objects.
125 func (c *FakeNetworkChainings) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
126 action := testing.NewDeleteCollectionAction(networkchainingsResource, c.ns, listOptions)
128 _, err := c.Fake.Invokes(action, &v1alpha1.NetworkChainingList{})
132 // Patch applies the patch and returns the patched networkChaining.
133 func (c *FakeNetworkChainings) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.NetworkChaining, err error) {
135 Invokes(testing.NewPatchSubresourceAction(networkchainingsResource, c.ns, name, pt, data, subresources...), &v1alpha1.NetworkChaining{})
140 return obj.(*v1alpha1.NetworkChaining), err