1
1
package fake
2
2
3
3
import (
4
- image "github.com/openshift/origin/pkg/image/apis/image"
5
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
6
4
labels "k8s.io/apimachinery/pkg/labels"
7
5
schema "k8s.io/apimachinery/pkg/runtime/schema"
8
6
types "k8s.io/apimachinery/pkg/types"
9
7
watch "k8s.io/apimachinery/pkg/watch"
10
8
testing "k8s.io/client-go/testing"
9
+ image "github.com/openshift/origin/pkg/image/apis/image"
10
+ v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
11
11
)
12
12
13
+
13
14
// FakeImageStreams implements ImageStreamInterface
14
15
type FakeImageStreams struct {
15
16
Fake * FakeImage
16
- ns string
17
+ ns string
17
18
}
18
19
19
20
var imagestreamsResource = schema.GroupVersionResource {Group : "image.openshift.io" , Version : "" , Resource : "imagestreams" }
@@ -24,7 +25,7 @@ var imagestreamsKind = schema.GroupVersionKind{Group: "image.openshift.io", Vers
24
25
func (c * FakeImageStreams ) Get (name string , options v1.GetOptions ) (result * image.ImageStream , err error ) {
25
26
obj , err := c .Fake .
26
27
Invokes (testing .NewGetAction (imagestreamsResource , c .ns , name ), & image.ImageStream {})
27
-
28
+
28
29
if obj == nil {
29
30
return nil , err
30
31
}
@@ -35,7 +36,7 @@ func (c *FakeImageStreams) Get(name string, options v1.GetOptions) (result *imag
35
36
func (c * FakeImageStreams ) List (opts v1.ListOptions ) (result * image.ImageStreamList , err error ) {
36
37
obj , err := c .Fake .
37
38
Invokes (testing .NewListAction (imagestreamsResource , imagestreamsKind , c .ns , opts ), & image.ImageStreamList {})
38
-
39
+
39
40
if obj == nil {
40
41
return nil , err
41
42
}
@@ -57,14 +58,14 @@ func (c *FakeImageStreams) List(opts v1.ListOptions) (result *image.ImageStreamL
57
58
func (c * FakeImageStreams ) Watch (opts v1.ListOptions ) (watch.Interface , error ) {
58
59
return c .Fake .
59
60
InvokesWatch (testing .NewWatchAction (imagestreamsResource , c .ns , opts ))
60
-
61
+
61
62
}
62
63
63
64
// Create takes the representation of a imageStream and creates it. Returns the server's representation of the imageStream, and an error, if there is any.
64
65
func (c * FakeImageStreams ) Create (imageStream * image.ImageStream ) (result * image.ImageStream , err error ) {
65
66
obj , err := c .Fake .
66
67
Invokes (testing .NewCreateAction (imagestreamsResource , c .ns , imageStream ), & image.ImageStream {})
67
-
68
+
68
69
if obj == nil {
69
70
return nil , err
70
71
}
@@ -75,7 +76,7 @@ func (c *FakeImageStreams) Create(imageStream *image.ImageStream) (result *image
75
76
func (c * FakeImageStreams ) Update (imageStream * image.ImageStream ) (result * image.ImageStream , err error ) {
76
77
obj , err := c .Fake .
77
78
Invokes (testing .NewUpdateAction (imagestreamsResource , c .ns , imageStream ), & image.ImageStream {})
78
-
79
+
79
80
if obj == nil {
80
81
return nil , err
81
82
}
@@ -87,7 +88,7 @@ func (c *FakeImageStreams) Update(imageStream *image.ImageStream) (result *image
87
88
func (c * FakeImageStreams ) UpdateStatus (imageStream * image.ImageStream ) (* image.ImageStream , error ) {
88
89
obj , err := c .Fake .
89
90
Invokes (testing .NewUpdateSubresourceAction (imagestreamsResource , "status" , c .ns , imageStream ), & image.ImageStream {})
90
-
91
+
91
92
if obj == nil {
92
93
return nil , err
93
94
}
@@ -98,25 +99,36 @@ func (c *FakeImageStreams) UpdateStatus(imageStream *image.ImageStream) (*image.
98
99
func (c * FakeImageStreams ) Delete (name string , options * v1.DeleteOptions ) error {
99
100
_ , err := c .Fake .
100
101
Invokes (testing .NewDeleteAction (imagestreamsResource , c .ns , name ), & image.ImageStream {})
101
-
102
+
102
103
return err
103
104
}
104
105
105
106
// DeleteCollection deletes a collection of objects.
106
107
func (c * FakeImageStreams ) DeleteCollection (options * v1.DeleteOptions , listOptions v1.ListOptions ) error {
107
108
action := testing .NewDeleteCollectionAction (imagestreamsResource , c .ns , listOptions )
108
-
109
+
109
110
_ , err := c .Fake .Invokes (action , & image.ImageStreamList {})
110
111
return err
111
112
}
112
113
113
114
// Patch applies the patch and returns the patched imageStream.
114
115
func (c * FakeImageStreams ) Patch (name string , pt types.PatchType , data []byte , subresources ... string ) (result * image.ImageStream , err error ) {
115
116
obj , err := c .Fake .
116
- Invokes (testing .NewPatchSubresourceAction (imagestreamsResource , c .ns , name , data , subresources ... ), & image.ImageStream {})
117
-
117
+ Invokes (testing .NewPatchSubresourceAction (imagestreamsResource , c .ns , name , data , subresources ... ), & image.ImageStream {})
118
+
118
119
if obj == nil {
119
120
return nil , err
120
121
}
121
122
return obj .(* image.ImageStream ), err
122
123
}
124
+
125
+ // Secrets takes label and field selectors, and returns the list of ImageStreams that match those selectors.
126
+ func (c * FakeImageStreams ) Secrets (opts v1.ListOptions ) (result * image.k8s .io / kubernetes / pkg / api.SecretList , err error ) {
127
+ obj , err := c .Fake .
128
+ Invokes (testing .NewListAction (imagestreamsResource , imagestreamsKind , c .ns , opts ), & image .k8s .io / kubernetes / pkg / api.SecretList {})
129
+
130
+ if obj == nil {
131
+ return nil , err
132
+ }
133
+ return obj .(* image.ImageStreamList ), err
134
+ }
0 commit comments