... | ... |
@@ -1,911 +1,926 @@ |
1 | 1 |
{ |
2 |
- "ImportPath": "github.com/openshift/origin", |
|
3 |
- "GoVersion": "go1.3.1", |
|
4 |
- "Packages": [ |
|
5 |
- "./..." |
|
6 |
- ], |
|
7 |
- "Deps": [ |
|
8 |
- { |
|
9 |
- "ImportPath": "bitbucket.org/ww/goautoneg", |
|
10 |
- "Comment": "null-5", |
|
11 |
- "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" |
|
12 |
- }, |
|
13 |
- { |
|
14 |
- "ImportPath": "code.google.com/p/go-uuid/uuid", |
|
15 |
- "Comment": "null-12", |
|
16 |
- "Rev": "7dda39b2e7d5e265014674c5af696ba4186679e9" |
|
17 |
- }, |
|
18 |
- { |
|
19 |
- "ImportPath": "code.google.com/p/go.exp/inotify", |
|
20 |
- "Comment": "null-75", |
|
21 |
- "Rev": "bd8df7009305d6ada223ea3c95b94c0f38bfa119" |
|
22 |
- }, |
|
23 |
- { |
|
24 |
- "ImportPath": "code.google.com/p/go.net/spdy", |
|
25 |
- "Comment": "null-240", |
|
26 |
- "Rev": "937a34c9de13c766c814510f76bca091dee06028" |
|
27 |
- }, |
|
28 |
- { |
|
29 |
- "ImportPath": "code.google.com/p/goauth2/oauth", |
|
30 |
- "Comment": "weekly-50", |
|
31 |
- "Rev": "7fc9d958c83464bd7650240569bf93a102266e6a" |
|
32 |
- }, |
|
33 |
- { |
|
34 |
- "ImportPath": "code.google.com/p/google-api-go-client/compute/v1", |
|
35 |
- "Comment": "release-105", |
|
36 |
- "Rev": "98c78185197025f935947caac56a7b6d022f89d2" |
|
37 |
- }, |
|
38 |
- { |
|
39 |
- "ImportPath": "code.google.com/p/google-api-go-client/container/v1beta1", |
|
40 |
- "Comment": "release-105", |
|
41 |
- "Rev": "98c78185197025f935947caac56a7b6d022f89d2" |
|
42 |
- }, |
|
43 |
- { |
|
44 |
- "ImportPath": "code.google.com/p/google-api-go-client/googleapi", |
|
45 |
- "Comment": "release-105", |
|
46 |
- "Rev": "98c78185197025f935947caac56a7b6d022f89d2" |
|
47 |
- }, |
|
48 |
- { |
|
49 |
- "ImportPath": "github.com/AdRoll/goamz/aws", |
|
50 |
- "Rev": "c73835dc8fc6958baf8df8656864ee4d6d04b130" |
|
51 |
- }, |
|
52 |
- { |
|
53 |
- "ImportPath": "github.com/AdRoll/goamz/s3", |
|
54 |
- "Rev": "c73835dc8fc6958baf8df8656864ee4d6d04b130" |
|
55 |
- }, |
|
56 |
- { |
|
57 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/admission", |
|
58 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
59 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
60 |
- }, |
|
61 |
- { |
|
62 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/api", |
|
63 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
64 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
65 |
- }, |
|
66 |
- { |
|
67 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver", |
|
68 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
69 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
70 |
- }, |
|
71 |
- { |
|
72 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/authenticator", |
|
73 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
74 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
75 |
- }, |
|
76 |
- { |
|
77 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/authorizer", |
|
78 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
79 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
80 |
- }, |
|
81 |
- { |
|
82 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/handlers", |
|
83 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
84 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
85 |
- }, |
|
86 |
- { |
|
87 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/user", |
|
88 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
89 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
90 |
- }, |
|
91 |
- { |
|
92 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities", |
|
93 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
94 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
95 |
- }, |
|
96 |
- { |
|
97 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/client", |
|
98 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
99 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
100 |
- }, |
|
101 |
- { |
|
102 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/clientauth", |
|
103 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
104 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
105 |
- }, |
|
106 |
- { |
|
107 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider", |
|
108 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
109 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
110 |
- }, |
|
111 |
- { |
|
112 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/controller", |
|
113 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
114 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
115 |
- }, |
|
116 |
- { |
|
117 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/conversion", |
|
118 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
119 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
120 |
- }, |
|
121 |
- { |
|
122 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/credentialprovider", |
|
123 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
124 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
125 |
- }, |
|
126 |
- { |
|
127 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/fields", |
|
128 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
129 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
130 |
- }, |
|
131 |
- { |
|
132 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/healthz", |
|
133 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
134 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
135 |
- }, |
|
136 |
- { |
|
137 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/httplog", |
|
138 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
139 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
140 |
- }, |
|
141 |
- { |
|
142 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl", |
|
143 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
144 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
145 |
- }, |
|
146 |
- { |
|
147 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet", |
|
148 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
149 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
150 |
- }, |
|
151 |
- { |
|
152 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/labels", |
|
153 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
154 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
155 |
- }, |
|
156 |
- { |
|
157 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/master", |
|
158 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
159 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
160 |
- }, |
|
161 |
- { |
|
162 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/probe", |
|
163 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
164 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
165 |
- }, |
|
166 |
- { |
|
167 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/proxy", |
|
168 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
169 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
170 |
- }, |
|
171 |
- { |
|
172 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/controller", |
|
173 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
174 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
175 |
- }, |
|
176 |
- { |
|
177 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/endpoint", |
|
178 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
179 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
180 |
- }, |
|
181 |
- { |
|
182 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/etcd", |
|
183 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
184 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
185 |
- }, |
|
186 |
- { |
|
187 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/event", |
|
188 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
189 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
190 |
- }, |
|
191 |
- { |
|
192 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic", |
|
193 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
194 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
195 |
- }, |
|
196 |
- { |
|
197 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/limitrange", |
|
198 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
199 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
200 |
- }, |
|
201 |
- { |
|
202 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/minion", |
|
203 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
204 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
205 |
- }, |
|
206 |
- { |
|
207 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/namespace", |
|
208 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
209 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
210 |
- }, |
|
211 |
- { |
|
212 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/pod", |
|
213 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
214 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
215 |
- }, |
|
216 |
- { |
|
217 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/resourcequota", |
|
218 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
219 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
220 |
- }, |
|
221 |
- { |
|
222 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/secret", |
|
223 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
224 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
225 |
- }, |
|
226 |
- { |
|
227 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/service", |
|
228 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
229 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
230 |
- }, |
|
231 |
- { |
|
232 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/resourcequota", |
|
233 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
234 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
235 |
- }, |
|
236 |
- { |
|
237 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime", |
|
238 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
239 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
240 |
- }, |
|
241 |
- { |
|
242 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/scheduler", |
|
243 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
244 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
245 |
- }, |
|
246 |
- { |
|
247 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/service", |
|
248 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
249 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
250 |
- }, |
|
251 |
- { |
|
252 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/tools", |
|
253 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
254 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
255 |
- }, |
|
256 |
- { |
|
257 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/types", |
|
258 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
259 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
260 |
- }, |
|
261 |
- { |
|
262 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/ui", |
|
263 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
264 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
265 |
- }, |
|
266 |
- { |
|
267 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/util", |
|
268 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
269 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
270 |
- }, |
|
271 |
- { |
|
272 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/version", |
|
273 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
274 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
275 |
- }, |
|
276 |
- { |
|
277 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/volume", |
|
278 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
279 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
280 |
- }, |
|
281 |
- { |
|
282 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/watch", |
|
283 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
284 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
285 |
- }, |
|
286 |
- { |
|
287 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/admit", |
|
288 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
289 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
290 |
- }, |
|
291 |
- { |
|
292 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/limitranger", |
|
293 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
294 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
295 |
- }, |
|
296 |
- { |
|
297 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/namespace/exists", |
|
298 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
299 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
300 |
- }, |
|
301 |
- { |
|
302 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/namespace/lifecycle", |
|
303 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
304 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
305 |
- }, |
|
306 |
- { |
|
307 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/resourcedefaults", |
|
308 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
309 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
310 |
- }, |
|
311 |
- { |
|
312 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/resourcequota", |
|
313 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
314 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
315 |
- }, |
|
316 |
- { |
|
317 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/auth/authenticator/token/tokenfile", |
|
318 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
319 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
320 |
- }, |
|
321 |
- { |
|
322 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler", |
|
323 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
324 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
325 |
- }, |
|
326 |
- { |
|
327 |
- "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/third_party/golang/netutil", |
|
328 |
- "Comment": "v0.13.1-dev-641-gf057a25", |
|
329 |
- "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
330 |
- }, |
|
331 |
- { |
|
332 |
- "ImportPath": "github.com/RangelReale/osin", |
|
333 |
- "Rev": "1f4e9754a8931fbd9834ab11592f358418efc9ff" |
|
334 |
- }, |
|
335 |
- { |
|
336 |
- "ImportPath": "github.com/RangelReale/osincli", |
|
337 |
- "Rev": "23618ea0fc3faa3f43954ce8ff48e31f5c784212" |
|
338 |
- }, |
|
339 |
- { |
|
340 |
- "ImportPath": "github.com/Sirupsen/logrus", |
|
341 |
- "Comment": "v0.6.6-2-g2cea0f0", |
|
342 |
- "Rev": "2cea0f0d141f56fae06df5b813ec4119d1c8ccbd" |
|
343 |
- }, |
|
344 |
- { |
|
345 |
- "ImportPath": "github.com/abbot/go-http-auth", |
|
346 |
- "Rev": "c0ef4539dfab4d21c8ef20ba2924f9fc6f186d35" |
|
347 |
- }, |
|
348 |
- { |
|
349 |
- "ImportPath": "github.com/awalterschulze/gographviz", |
|
350 |
- "Rev": "20d1f693416d9be045340150094aa42035a41c9e" |
|
351 |
- }, |
|
352 |
- { |
|
353 |
- "ImportPath": "github.com/beorn7/perks/quantile", |
|
354 |
- "Rev": "b965b613227fddccbfffe13eae360ed3fa822f8d" |
|
355 |
- }, |
|
356 |
- { |
|
357 |
- "ImportPath": "github.com/coreos/etcd/config", |
|
358 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
359 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
360 |
- }, |
|
361 |
- { |
|
362 |
- "ImportPath": "github.com/coreos/etcd/discovery", |
|
363 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
364 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
365 |
- }, |
|
366 |
- { |
|
367 |
- "ImportPath": "github.com/coreos/etcd/error", |
|
368 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
369 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
370 |
- }, |
|
371 |
- { |
|
372 |
- "ImportPath": "github.com/coreos/etcd/etcd", |
|
373 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
374 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
375 |
- }, |
|
376 |
- { |
|
377 |
- "ImportPath": "github.com/coreos/etcd/http", |
|
378 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
379 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
380 |
- }, |
|
381 |
- { |
|
382 |
- "ImportPath": "github.com/coreos/etcd/log", |
|
383 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
384 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
385 |
- }, |
|
386 |
- { |
|
387 |
- "ImportPath": "github.com/coreos/etcd/metrics", |
|
388 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
389 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
390 |
- }, |
|
391 |
- { |
|
392 |
- "ImportPath": "github.com/coreos/etcd/mod", |
|
393 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
394 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
395 |
- }, |
|
396 |
- { |
|
397 |
- "ImportPath": "github.com/coreos/etcd/pkg/btrfs", |
|
398 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
399 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
400 |
- }, |
|
401 |
- { |
|
402 |
- "ImportPath": "github.com/coreos/etcd/pkg/http", |
|
403 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
404 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
405 |
- }, |
|
406 |
- { |
|
407 |
- "ImportPath": "github.com/coreos/etcd/pkg/strings", |
|
408 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
409 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
410 |
- }, |
|
411 |
- { |
|
412 |
- "ImportPath": "github.com/coreos/etcd/server", |
|
413 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
414 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
415 |
- }, |
|
416 |
- { |
|
417 |
- "ImportPath": "github.com/coreos/etcd/store", |
|
418 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
419 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
420 |
- }, |
|
421 |
- { |
|
422 |
- "ImportPath": "github.com/coreos/etcd/third_party/bitbucket.org/kardianos/osext", |
|
423 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
424 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
425 |
- }, |
|
426 |
- { |
|
427 |
- "ImportPath": "github.com/coreos/etcd/third_party/code.google.com/p/gogoprotobuf/proto", |
|
428 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
429 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
430 |
- }, |
|
431 |
- { |
|
432 |
- "ImportPath": "github.com/coreos/etcd/third_party/github.com/BurntSushi/toml", |
|
433 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
434 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
435 |
- }, |
|
436 |
- { |
|
437 |
- "ImportPath": "github.com/coreos/etcd/third_party/github.com/coreos/go-etcd/etcd", |
|
438 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
439 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
440 |
- }, |
|
441 |
- { |
|
442 |
- "ImportPath": "github.com/coreos/etcd/third_party/github.com/coreos/go-log/log", |
|
443 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
444 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
445 |
- }, |
|
446 |
- { |
|
447 |
- "ImportPath": "github.com/coreos/etcd/third_party/github.com/coreos/go-systemd/journal", |
|
448 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
449 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
450 |
- }, |
|
451 |
- { |
|
452 |
- "ImportPath": "github.com/coreos/etcd/third_party/github.com/goraft/raft", |
|
453 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
454 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
455 |
- }, |
|
456 |
- { |
|
457 |
- "ImportPath": "github.com/coreos/etcd/third_party/github.com/gorilla/context", |
|
458 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
459 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
460 |
- }, |
|
461 |
- { |
|
462 |
- "ImportPath": "github.com/coreos/etcd/third_party/github.com/gorilla/mux", |
|
463 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
464 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
465 |
- }, |
|
466 |
- { |
|
467 |
- "ImportPath": "github.com/coreos/etcd/third_party/github.com/mreiferson/go-httpclient", |
|
468 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
469 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
470 |
- }, |
|
471 |
- { |
|
472 |
- "ImportPath": "github.com/coreos/etcd/third_party/github.com/rcrowley/go-metrics", |
|
473 |
- "Comment": "v0.4.3-7-gfc2afe1", |
|
474 |
- "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
475 |
- }, |
|
476 |
- { |
|
477 |
- "ImportPath": "github.com/coreos/go-etcd/etcd", |
|
478 |
- "Comment": "v0.2.0-rc1-120-g23142f6", |
|
479 |
- "Rev": "23142f6773a676cc2cae8dd0cb90b2ea761c853f" |
|
480 |
- }, |
|
481 |
- { |
|
482 |
- "ImportPath": "github.com/coreos/go-systemd/activation", |
|
483 |
- "Comment": "v2-27-g97e243d", |
|
484 |
- "Rev": "97e243d21a8e232e9d8af38ba2366dfcfceebeba" |
|
485 |
- }, |
|
486 |
- { |
|
487 |
- "ImportPath": "github.com/coreos/go-systemd/daemon", |
|
488 |
- "Comment": "v2-27-g97e243d", |
|
489 |
- "Rev": "97e243d21a8e232e9d8af38ba2366dfcfceebeba" |
|
490 |
- }, |
|
491 |
- { |
|
492 |
- "ImportPath": "github.com/coreos/go-systemd/dbus", |
|
493 |
- "Comment": "v2-27-g97e243d", |
|
494 |
- "Rev": "97e243d21a8e232e9d8af38ba2366dfcfceebeba" |
|
495 |
- }, |
|
496 |
- { |
|
497 |
- "ImportPath": "github.com/davecgh/go-spew/spew", |
|
498 |
- "Rev": "1aaf839fb07e099361e445273993ccd9adc21b07" |
|
499 |
- }, |
|
500 |
- { |
|
501 |
- "ImportPath": "github.com/daviddengcn/go-colortext", |
|
502 |
- "Rev": "b5c0891944c2f150ccc9d02aecf51b76c14c2948" |
|
503 |
- }, |
|
504 |
- { |
|
505 |
- "ImportPath": "github.com/docker/distribution", |
|
506 |
- "Comment": "v2.0.0-alpha.3-30-g06fcf05", |
|
507 |
- "Rev": "06fcf053e7b45aa8608c6bf32e8d3227b31d3747" |
|
508 |
- }, |
|
509 |
- { |
|
510 |
- "ImportPath": "github.com/docker/docker/builder/command", |
|
511 |
- "Comment": "v1.4.1-1714-ged66853", |
|
512 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
513 |
- }, |
|
514 |
- { |
|
515 |
- "ImportPath": "github.com/docker/docker/builder/parser", |
|
516 |
- "Comment": "v1.4.1-1714-ged66853", |
|
517 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
518 |
- }, |
|
519 |
- { |
|
520 |
- "ImportPath": "github.com/docker/docker/pkg/archive", |
|
521 |
- "Comment": "v1.4.1-1714-ged66853", |
|
522 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
523 |
- }, |
|
524 |
- { |
|
525 |
- "ImportPath": "github.com/docker/docker/pkg/fileutils", |
|
526 |
- "Comment": "v1.4.1-1714-ged66853", |
|
527 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
528 |
- }, |
|
529 |
- { |
|
530 |
- "ImportPath": "github.com/docker/docker/pkg/ioutils", |
|
531 |
- "Comment": "v1.4.1-1714-ged66853", |
|
532 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
533 |
- }, |
|
534 |
- { |
|
535 |
- "ImportPath": "github.com/docker/docker/pkg/mount", |
|
536 |
- "Comment": "v1.4.1-1714-ged66853", |
|
537 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
538 |
- }, |
|
539 |
- { |
|
540 |
- "ImportPath": "github.com/docker/docker/pkg/parsers", |
|
541 |
- "Comment": "v1.4.1-1714-ged66853", |
|
542 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
543 |
- }, |
|
544 |
- { |
|
545 |
- "ImportPath": "github.com/docker/docker/pkg/pools", |
|
546 |
- "Comment": "v1.4.1-1714-ged66853", |
|
547 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
548 |
- }, |
|
549 |
- { |
|
550 |
- "ImportPath": "github.com/docker/docker/pkg/promise", |
|
551 |
- "Comment": "v1.4.1-1714-ged66853", |
|
552 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
553 |
- }, |
|
554 |
- { |
|
555 |
- "ImportPath": "github.com/docker/docker/pkg/symlink", |
|
556 |
- "Comment": "v1.4.1-1714-ged66853", |
|
557 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
558 |
- }, |
|
559 |
- { |
|
560 |
- "ImportPath": "github.com/docker/docker/pkg/system", |
|
561 |
- "Comment": "v1.4.1-1714-ged66853", |
|
562 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
563 |
- }, |
|
564 |
- { |
|
565 |
- "ImportPath": "github.com/docker/docker/pkg/tarsum", |
|
566 |
- "Comment": "v1.4.1-1714-ged66853", |
|
567 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
568 |
- }, |
|
569 |
- { |
|
570 |
- "ImportPath": "github.com/docker/docker/pkg/term", |
|
571 |
- "Comment": "v1.4.1-1714-ged66853", |
|
572 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
573 |
- }, |
|
574 |
- { |
|
575 |
- "ImportPath": "github.com/docker/docker/pkg/units", |
|
576 |
- "Comment": "v1.4.1-1714-ged66853", |
|
577 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
578 |
- }, |
|
579 |
- { |
|
580 |
- "ImportPath": "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar", |
|
581 |
- "Comment": "v1.4.1-1714-ged66853", |
|
582 |
- "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
583 |
- }, |
|
584 |
- { |
|
585 |
- "ImportPath": "github.com/docker/libcontainer", |
|
586 |
- "Comment": "v1.4.0-52-gd7dea0e", |
|
587 |
- "Rev": "d7dea0e925315bab640115053204c16718839b1e" |
|
588 |
- }, |
|
589 |
- { |
|
590 |
- "ImportPath": "github.com/docker/libtrust", |
|
591 |
- "Rev": "c54fbb67c1f1e68d7d6f8d2ad7c9360404616a41" |
|
592 |
- }, |
|
593 |
- { |
|
594 |
- "ImportPath": "github.com/docker/spdystream", |
|
595 |
- "Rev": "e731c8f9f19ffd7e51a469a2de1580c1dfbb4fae" |
|
596 |
- }, |
|
597 |
- { |
|
598 |
- "ImportPath": "github.com/elazarl/go-bindata-assetfs", |
|
599 |
- "Rev": "ae4665cf2d188c65764c73fe4af5378acc549510" |
|
600 |
- }, |
|
601 |
- { |
|
602 |
- "ImportPath": "github.com/emicklei/go-restful", |
|
603 |
- "Comment": "v1.1.3-26-g977ac8f", |
|
604 |
- "Rev": "977ac8fcbcd2ee33319246f7c91d4b426402dc70" |
|
605 |
- }, |
|
606 |
- { |
|
607 |
- "ImportPath": "github.com/evanphx/json-patch", |
|
608 |
- "Rev": "7dd4489c2eb6073e5a9d7746c3274c5b5f0387df" |
|
609 |
- }, |
|
610 |
- { |
|
611 |
- "ImportPath": "github.com/fsouza/go-dockerclient", |
|
612 |
- "Rev": "bd32742a065748632a860c9ffd8adf42cc4e140f" |
|
613 |
- }, |
|
614 |
- { |
|
615 |
- "ImportPath": "github.com/getsentry/raven-go", |
|
616 |
- "Rev": "86cd4063c535cbbcbf43d84424dbd5911ab1b818" |
|
617 |
- }, |
|
618 |
- { |
|
619 |
- "ImportPath": "github.com/ghodss/yaml", |
|
620 |
- "Rev": "588cb435e59ee8b6c2795482887755841ad67207" |
|
621 |
- }, |
|
622 |
- { |
|
623 |
- "ImportPath": "github.com/godbus/dbus", |
|
624 |
- "Comment": "0-7-g939230d", |
|
625 |
- "Rev": "939230d2086a4f1870e04c52e0a376c25bae0ec4" |
|
626 |
- }, |
|
627 |
- { |
|
628 |
- "ImportPath": "github.com/golang/glog", |
|
629 |
- "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed" |
|
630 |
- }, |
|
631 |
- { |
|
632 |
- "ImportPath": "github.com/golang/groupcache/lru", |
|
633 |
- "Rev": "604ed5785183e59ae2789449d89e73f3a2a77987" |
|
634 |
- }, |
|
635 |
- { |
|
636 |
- "ImportPath": "github.com/golang/protobuf/proto", |
|
637 |
- "Rev": "7f07925444bb51fa4cf9dfe6f7661876f8852275" |
|
638 |
- }, |
|
639 |
- { |
|
640 |
- "ImportPath": "github.com/google/cadvisor/api", |
|
641 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
642 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
643 |
- }, |
|
644 |
- { |
|
645 |
- "ImportPath": "github.com/google/cadvisor/container", |
|
646 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
647 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
648 |
- }, |
|
649 |
- { |
|
650 |
- "ImportPath": "github.com/google/cadvisor/events", |
|
651 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
652 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
653 |
- }, |
|
654 |
- { |
|
655 |
- "ImportPath": "github.com/google/cadvisor/fs", |
|
656 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
657 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
658 |
- }, |
|
659 |
- { |
|
660 |
- "ImportPath": "github.com/google/cadvisor/healthz", |
|
661 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
662 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
663 |
- }, |
|
664 |
- { |
|
665 |
- "ImportPath": "github.com/google/cadvisor/http", |
|
666 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
667 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
668 |
- }, |
|
669 |
- { |
|
670 |
- "ImportPath": "github.com/google/cadvisor/info/v1", |
|
671 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
672 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
673 |
- }, |
|
674 |
- { |
|
675 |
- "ImportPath": "github.com/google/cadvisor/info/v2", |
|
676 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
677 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
678 |
- }, |
|
679 |
- { |
|
680 |
- "ImportPath": "github.com/google/cadvisor/manager", |
|
681 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
682 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
683 |
- }, |
|
684 |
- { |
|
685 |
- "ImportPath": "github.com/google/cadvisor/metrics", |
|
686 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
687 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
688 |
- }, |
|
689 |
- { |
|
690 |
- "ImportPath": "github.com/google/cadvisor/pages", |
|
691 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
692 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
693 |
- }, |
|
694 |
- { |
|
695 |
- "ImportPath": "github.com/google/cadvisor/storage", |
|
696 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
697 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
698 |
- }, |
|
699 |
- { |
|
700 |
- "ImportPath": "github.com/google/cadvisor/summary", |
|
701 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
702 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
703 |
- }, |
|
704 |
- { |
|
705 |
- "ImportPath": "github.com/google/cadvisor/utils", |
|
706 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
707 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
708 |
- }, |
|
709 |
- { |
|
710 |
- "ImportPath": "github.com/google/cadvisor/validate", |
|
711 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
712 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
713 |
- }, |
|
714 |
- { |
|
715 |
- "ImportPath": "github.com/google/cadvisor/version", |
|
716 |
- "Comment": "0.10.1-106-gfd9f7e0", |
|
717 |
- "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
718 |
- }, |
|
719 |
- { |
|
720 |
- "ImportPath": "github.com/google/gofuzz", |
|
721 |
- "Rev": "bbcb9da2d746f8bdbd6a936686a0a6067ada0ec5" |
|
722 |
- }, |
|
723 |
- { |
|
724 |
- "ImportPath": "github.com/gorilla/context", |
|
725 |
- "Rev": "215affda49addc4c8ef7e2534915df2c8c35c6cd" |
|
726 |
- }, |
|
727 |
- { |
|
728 |
- "ImportPath": "github.com/gorilla/handlers", |
|
729 |
- "Rev": "4ef72b2795a418935d497c8db213080be06f8850" |
|
730 |
- }, |
|
731 |
- { |
|
732 |
- "ImportPath": "github.com/gorilla/mux", |
|
733 |
- "Rev": "8096f47503459bcc74d1f4c487b7e6e42e5746b5" |
|
734 |
- }, |
|
735 |
- { |
|
736 |
- "ImportPath": "github.com/gorilla/securecookie", |
|
737 |
- "Rev": "1b0c7f6e9ab3d7f500fd7d50c7ad835ff428139b" |
|
738 |
- }, |
|
739 |
- { |
|
740 |
- "ImportPath": "github.com/gorilla/sessions", |
|
741 |
- "Rev": "aa5e036e6c44aec69a32eb41097001978b29ad31" |
|
742 |
- }, |
|
743 |
- { |
|
744 |
- "ImportPath": "github.com/imdario/mergo", |
|
745 |
- "Comment": "0.1.3-8-g6633656", |
|
746 |
- "Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc" |
|
747 |
- }, |
|
748 |
- { |
|
749 |
- "ImportPath": "github.com/jteeuwen/go-bindata", |
|
750 |
- "Comment": "v3.0.7-2-gf94581b", |
|
751 |
- "Rev": "f94581bd91620d0ccd9c22bb1d2de13f6a605857" |
|
752 |
- }, |
|
753 |
- { |
|
754 |
- "ImportPath": "github.com/kr/pty", |
|
755 |
- "Comment": "release.r56-25-g05017fc", |
|
756 |
- "Rev": "05017fcccf23c823bfdea560dcc958a136e54fb7" |
|
757 |
- }, |
|
758 |
- { |
|
759 |
- "ImportPath": "github.com/matttproud/golang_protobuf_extensions/ext", |
|
760 |
- "Rev": "ba7d65ac66e9da93a714ca18f6d1bc7a0c09100c" |
|
761 |
- }, |
|
762 |
- { |
|
763 |
- "ImportPath": "github.com/miekg/dns", |
|
764 |
- "Rev": "3f504e8dabd5d562e997d19ce0200aa41973e1b2" |
|
765 |
- }, |
|
766 |
- { |
|
767 |
- "ImportPath": "github.com/openshift/source-to-image/pkg/api", |
|
768 |
- "Comment": "v0.2-8-gc0c154e", |
|
769 |
- "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
770 |
- }, |
|
771 |
- { |
|
772 |
- "ImportPath": "github.com/openshift/source-to-image/pkg/build", |
|
773 |
- "Comment": "v0.2-8-gc0c154e", |
|
774 |
- "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
775 |
- }, |
|
776 |
- { |
|
777 |
- "ImportPath": "github.com/openshift/source-to-image/pkg/docker", |
|
778 |
- "Comment": "v0.2-8-gc0c154e", |
|
779 |
- "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
780 |
- }, |
|
781 |
- { |
|
782 |
- "ImportPath": "github.com/openshift/source-to-image/pkg/errors", |
|
783 |
- "Comment": "v0.2-8-gc0c154e", |
|
784 |
- "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
785 |
- }, |
|
786 |
- { |
|
787 |
- "ImportPath": "github.com/openshift/source-to-image/pkg/git", |
|
788 |
- "Comment": "v0.2-8-gc0c154e", |
|
789 |
- "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
790 |
- }, |
|
791 |
- { |
|
792 |
- "ImportPath": "github.com/openshift/source-to-image/pkg/scripts", |
|
793 |
- "Comment": "v0.2-8-gc0c154e", |
|
794 |
- "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
795 |
- }, |
|
796 |
- { |
|
797 |
- "ImportPath": "github.com/openshift/source-to-image/pkg/tar", |
|
798 |
- "Comment": "v0.2-8-gc0c154e", |
|
799 |
- "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
800 |
- }, |
|
801 |
- { |
|
802 |
- "ImportPath": "github.com/openshift/source-to-image/pkg/util", |
|
803 |
- "Comment": "v0.2-8-gc0c154e", |
|
804 |
- "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
805 |
- }, |
|
806 |
- { |
|
807 |
- "ImportPath": "github.com/pkg/profile", |
|
808 |
- "Rev": "c795610ec6e479e5795f7852db65ea15073674a6" |
|
809 |
- }, |
|
810 |
- { |
|
811 |
- "ImportPath": "github.com/prometheus/client_golang/model", |
|
812 |
- "Comment": "0.2.0-5-gde5f7a2", |
|
813 |
- "Rev": "de5f7a2db9d883392ce3ad667087280fe1ff9cea" |
|
814 |
- }, |
|
815 |
- { |
|
816 |
- "ImportPath": "github.com/prometheus/client_golang/prometheus", |
|
817 |
- "Comment": "0.2.0-5-gde5f7a2", |
|
818 |
- "Rev": "de5f7a2db9d883392ce3ad667087280fe1ff9cea" |
|
819 |
- }, |
|
820 |
- { |
|
821 |
- "ImportPath": "github.com/prometheus/client_golang/text", |
|
822 |
- "Comment": "0.2.0-5-gde5f7a2", |
|
823 |
- "Rev": "de5f7a2db9d883392ce3ad667087280fe1ff9cea" |
|
824 |
- }, |
|
825 |
- { |
|
826 |
- "ImportPath": "github.com/prometheus/client_model/go", |
|
827 |
- "Comment": "model-0.0.2-12-gfa8ad6f", |
|
828 |
- "Rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6" |
|
829 |
- }, |
|
830 |
- { |
|
831 |
- "ImportPath": "github.com/prometheus/procfs", |
|
832 |
- "Rev": "6c34ef819e19b4e16f410100ace4aa006f0e3bf8" |
|
833 |
- }, |
|
834 |
- { |
|
835 |
- "ImportPath": "github.com/skynetservices/skydns/backends/etcd", |
|
836 |
- "Comment": "2.0.1d-54-g5c2bf88", |
|
837 |
- "Rev": "5c2bf889497b9857586b4fd6703fdc1b7d5638bd" |
|
838 |
- }, |
|
839 |
- { |
|
840 |
- "ImportPath": "github.com/skynetservices/skydns/cache", |
|
841 |
- "Comment": "2.0.1d-54-g5c2bf88", |
|
842 |
- "Rev": "5c2bf889497b9857586b4fd6703fdc1b7d5638bd" |
|
843 |
- }, |
|
844 |
- { |
|
845 |
- "ImportPath": "github.com/skynetservices/skydns/msg", |
|
846 |
- "Comment": "2.0.1d-54-g5c2bf88", |
|
847 |
- "Rev": "5c2bf889497b9857586b4fd6703fdc1b7d5638bd" |
|
848 |
- }, |
|
849 |
- { |
|
850 |
- "ImportPath": "github.com/skynetservices/skydns/server", |
|
851 |
- "Comment": "2.0.1d-54-g5c2bf88", |
|
852 |
- "Rev": "5c2bf889497b9857586b4fd6703fdc1b7d5638bd" |
|
853 |
- }, |
|
854 |
- { |
|
855 |
- "ImportPath": "github.com/spf13/cobra", |
|
856 |
- "Rev": "79bd93d369fb73d640179208d4e2b1a748915567" |
|
857 |
- }, |
|
858 |
- { |
|
859 |
- "ImportPath": "github.com/spf13/pflag", |
|
860 |
- "Rev": "11b7cf8387a31f278486eaad758162830eca8c73" |
|
861 |
- }, |
|
862 |
- { |
|
863 |
- "ImportPath": "github.com/stretchr/objx", |
|
864 |
- "Rev": "d40df0cc104c06eae2dfe03d7dddb83802d52f9a" |
|
865 |
- }, |
|
866 |
- { |
|
867 |
- "ImportPath": "github.com/stretchr/testify/assert", |
|
868 |
- "Rev": "e4ec8152c15fc46bd5056ce65997a07c7d415325" |
|
869 |
- }, |
|
870 |
- { |
|
871 |
- "ImportPath": "github.com/stretchr/testify/mock", |
|
872 |
- "Rev": "e4ec8152c15fc46bd5056ce65997a07c7d415325" |
|
873 |
- }, |
|
874 |
- { |
|
875 |
- "ImportPath": "golang.org/x/net/context", |
|
876 |
- "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" |
|
877 |
- }, |
|
878 |
- { |
|
879 |
- "ImportPath": "golang.org/x/net/html", |
|
880 |
- "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" |
|
881 |
- }, |
|
882 |
- { |
|
883 |
- "ImportPath": "golang.org/x/net/websocket", |
|
884 |
- "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" |
|
885 |
- }, |
|
886 |
- { |
|
887 |
- "ImportPath": "golang.org/x/oauth2", |
|
888 |
- "Rev": "2e66694fea36dc820636630792a55cdc6987e05b" |
|
889 |
- }, |
|
890 |
- { |
|
891 |
- "ImportPath": "google.golang.org/appengine", |
|
892 |
- "Rev": "6aa67407028217c352e215f5af320a429d0bcf5f" |
|
893 |
- }, |
|
894 |
- { |
|
895 |
- "ImportPath": "google.golang.org/cloud/compute/metadata", |
|
896 |
- "Rev": "2e43671e4ad874a7bca65746ff3edb38e6e93762" |
|
897 |
- }, |
|
898 |
- { |
|
899 |
- "ImportPath": "google.golang.org/cloud/internal", |
|
900 |
- "Rev": "2e43671e4ad874a7bca65746ff3edb38e6e93762" |
|
901 |
- }, |
|
902 |
- { |
|
903 |
- "ImportPath": "gopkg.in/yaml.v2", |
|
904 |
- "Rev": "d466437aa4adc35830964cffc5b5f262c63ddcb4" |
|
905 |
- }, |
|
906 |
- { |
|
907 |
- "ImportPath": "speter.net/go/exp/math/dec/inf", |
|
908 |
- "Rev": "42ca6cd68aa922bc3f32f1e056e61b65945d9ad7" |
|
909 |
- } |
|
910 |
- ] |
|
2 |
+ "ImportPath": "github.com/openshift/origin", |
|
3 |
+ "GoVersion": "go1.3.1", |
|
4 |
+ "Packages": [ |
|
5 |
+ "./..." |
|
6 |
+ ], |
|
7 |
+ "Deps": [ |
|
8 |
+ { |
|
9 |
+ "ImportPath": "bitbucket.org/ww/goautoneg", |
|
10 |
+ "Comment": "null-5", |
|
11 |
+ "Rev": "75cd24fc2f2c2a2088577d12123ddee5f54e0675" |
|
12 |
+ }, |
|
13 |
+ { |
|
14 |
+ "ImportPath": "code.google.com/p/go-uuid/uuid", |
|
15 |
+ "Comment": "null-12", |
|
16 |
+ "Rev": "7dda39b2e7d5e265014674c5af696ba4186679e9" |
|
17 |
+ }, |
|
18 |
+ { |
|
19 |
+ "ImportPath": "code.google.com/p/go.exp/inotify", |
|
20 |
+ "Comment": "null-75", |
|
21 |
+ "Rev": "bd8df7009305d6ada223ea3c95b94c0f38bfa119" |
|
22 |
+ }, |
|
23 |
+ { |
|
24 |
+ "ImportPath": "code.google.com/p/go.net/spdy", |
|
25 |
+ "Comment": "null-240", |
|
26 |
+ "Rev": "937a34c9de13c766c814510f76bca091dee06028" |
|
27 |
+ }, |
|
28 |
+ { |
|
29 |
+ "ImportPath": "code.google.com/p/goauth2/oauth", |
|
30 |
+ "Comment": "weekly-50", |
|
31 |
+ "Rev": "7fc9d958c83464bd7650240569bf93a102266e6a" |
|
32 |
+ }, |
|
33 |
+ { |
|
34 |
+ "ImportPath": "code.google.com/p/google-api-go-client/compute/v1", |
|
35 |
+ "Comment": "release-105", |
|
36 |
+ "Rev": "98c78185197025f935947caac56a7b6d022f89d2" |
|
37 |
+ }, |
|
38 |
+ { |
|
39 |
+ "ImportPath": "code.google.com/p/google-api-go-client/container/v1beta1", |
|
40 |
+ "Comment": "release-105", |
|
41 |
+ "Rev": "98c78185197025f935947caac56a7b6d022f89d2" |
|
42 |
+ }, |
|
43 |
+ { |
|
44 |
+ "ImportPath": "code.google.com/p/google-api-go-client/googleapi", |
|
45 |
+ "Comment": "release-105", |
|
46 |
+ "Rev": "98c78185197025f935947caac56a7b6d022f89d2" |
|
47 |
+ }, |
|
48 |
+ { |
|
49 |
+ "ImportPath": "github.com/AdRoll/goamz/aws", |
|
50 |
+ "Rev": "c73835dc8fc6958baf8df8656864ee4d6d04b130" |
|
51 |
+ }, |
|
52 |
+ { |
|
53 |
+ "ImportPath": "github.com/AdRoll/goamz/s3", |
|
54 |
+ "Rev": "c73835dc8fc6958baf8df8656864ee4d6d04b130" |
|
55 |
+ }, |
|
56 |
+ { |
|
57 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/admission", |
|
58 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
59 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
60 |
+ }, |
|
61 |
+ { |
|
62 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/api", |
|
63 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
64 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
65 |
+ }, |
|
66 |
+ { |
|
67 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver", |
|
68 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
69 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
70 |
+ }, |
|
71 |
+ { |
|
72 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/authenticator", |
|
73 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
74 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
75 |
+ }, |
|
76 |
+ { |
|
77 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/authorizer", |
|
78 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
79 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
80 |
+ }, |
|
81 |
+ { |
|
82 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/handlers", |
|
83 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
84 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
85 |
+ }, |
|
86 |
+ { |
|
87 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/auth/user", |
|
88 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
89 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
90 |
+ }, |
|
91 |
+ { |
|
92 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities", |
|
93 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
94 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
95 |
+ }, |
|
96 |
+ { |
|
97 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/client", |
|
98 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
99 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
100 |
+ }, |
|
101 |
+ { |
|
102 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/clientauth", |
|
103 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
104 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
105 |
+ }, |
|
106 |
+ { |
|
107 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/cloudprovider", |
|
108 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
109 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
110 |
+ }, |
|
111 |
+ { |
|
112 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/controller", |
|
113 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
114 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
115 |
+ }, |
|
116 |
+ { |
|
117 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/conversion", |
|
118 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
119 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
120 |
+ }, |
|
121 |
+ { |
|
122 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/credentialprovider", |
|
123 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
124 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
125 |
+ }, |
|
126 |
+ { |
|
127 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/fields", |
|
128 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
129 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
130 |
+ }, |
|
131 |
+ { |
|
132 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/healthz", |
|
133 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
134 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
135 |
+ }, |
|
136 |
+ { |
|
137 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/httplog", |
|
138 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
139 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
140 |
+ }, |
|
141 |
+ { |
|
142 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl", |
|
143 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
144 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
145 |
+ }, |
|
146 |
+ { |
|
147 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet", |
|
148 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
149 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
150 |
+ }, |
|
151 |
+ { |
|
152 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/labels", |
|
153 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
154 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
155 |
+ }, |
|
156 |
+ { |
|
157 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/master", |
|
158 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
159 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
160 |
+ }, |
|
161 |
+ { |
|
162 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/probe", |
|
163 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
164 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
165 |
+ }, |
|
166 |
+ { |
|
167 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/proxy", |
|
168 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
169 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
170 |
+ }, |
|
171 |
+ { |
|
172 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/controller", |
|
173 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
174 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
175 |
+ }, |
|
176 |
+ { |
|
177 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/endpoint", |
|
178 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
179 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
180 |
+ }, |
|
181 |
+ { |
|
182 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/etcd", |
|
183 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
184 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
185 |
+ }, |
|
186 |
+ { |
|
187 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/event", |
|
188 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
189 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
190 |
+ }, |
|
191 |
+ { |
|
192 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic", |
|
193 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
194 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
195 |
+ }, |
|
196 |
+ { |
|
197 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/limitrange", |
|
198 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
199 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
200 |
+ }, |
|
201 |
+ { |
|
202 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/minion", |
|
203 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
204 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
205 |
+ }, |
|
206 |
+ { |
|
207 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/namespace", |
|
208 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
209 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
210 |
+ }, |
|
211 |
+ { |
|
212 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/pod", |
|
213 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
214 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
215 |
+ }, |
|
216 |
+ { |
|
217 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/resourcequota", |
|
218 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
219 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
220 |
+ }, |
|
221 |
+ { |
|
222 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/secret", |
|
223 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
224 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
225 |
+ }, |
|
226 |
+ { |
|
227 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/service", |
|
228 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
229 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
230 |
+ }, |
|
231 |
+ { |
|
232 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/resourcequota", |
|
233 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
234 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
235 |
+ }, |
|
236 |
+ { |
|
237 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/runtime", |
|
238 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
239 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
240 |
+ }, |
|
241 |
+ { |
|
242 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/scheduler", |
|
243 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
244 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
245 |
+ }, |
|
246 |
+ { |
|
247 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/service", |
|
248 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
249 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
250 |
+ }, |
|
251 |
+ { |
|
252 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/tools", |
|
253 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
254 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
255 |
+ }, |
|
256 |
+ { |
|
257 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/types", |
|
258 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
259 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
260 |
+ }, |
|
261 |
+ { |
|
262 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/ui", |
|
263 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
264 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
265 |
+ }, |
|
266 |
+ { |
|
267 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/util", |
|
268 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
269 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
270 |
+ }, |
|
271 |
+ { |
|
272 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/version", |
|
273 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
274 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
275 |
+ }, |
|
276 |
+ { |
|
277 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/volume", |
|
278 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
279 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
280 |
+ }, |
|
281 |
+ { |
|
282 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/pkg/watch", |
|
283 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
284 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
285 |
+ }, |
|
286 |
+ { |
|
287 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/admit", |
|
288 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
289 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
290 |
+ }, |
|
291 |
+ { |
|
292 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/limitranger", |
|
293 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
294 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
295 |
+ }, |
|
296 |
+ { |
|
297 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/namespace/exists", |
|
298 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
299 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
300 |
+ }, |
|
301 |
+ { |
|
302 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/namespace/lifecycle", |
|
303 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
304 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
305 |
+ }, |
|
306 |
+ { |
|
307 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/resourcedefaults", |
|
308 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
309 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
310 |
+ }, |
|
311 |
+ { |
|
312 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/resourcequota", |
|
313 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
314 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
315 |
+ }, |
|
316 |
+ { |
|
317 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/auth/authenticator/token/tokenfile", |
|
318 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
319 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
320 |
+ }, |
|
321 |
+ { |
|
322 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler", |
|
323 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
324 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
325 |
+ }, |
|
326 |
+ { |
|
327 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/api", |
|
328 |
+ "Comment": "v0.12.0-1094-gcb7c781", |
|
329 |
+ "Rev": "cb7c781da50a2f248f84f6407fe50479f625052f" |
|
330 |
+ }, |
|
331 |
+ { |
|
332 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/algorithmprovider", |
|
333 |
+ "Comment": "v0.12.0-1094-gcb7c781", |
|
334 |
+ "Rev": "cb7c781da50a2f248f84f6407fe50479f625052f" |
|
335 |
+ }, |
|
336 |
+ { |
|
337 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/scheduler/factory", |
|
338 |
+ "Comment": "v0.12.0-1094-gcb7c781", |
|
339 |
+ "Rev": "cb7c781da50a2f248f84f6407fe50479f625052f" |
|
340 |
+ }, |
|
341 |
+ { |
|
342 |
+ "ImportPath": "github.com/GoogleCloudPlatform/kubernetes/third_party/golang/netutil", |
|
343 |
+ "Comment": "v0.13.1-dev-641-gf057a25", |
|
344 |
+ "Rev": "f057a25b5d37a496c1ce25fbe1dc1b1971266240" |
|
345 |
+ }, |
|
346 |
+ { |
|
347 |
+ "ImportPath": "github.com/RangelReale/osin", |
|
348 |
+ "Rev": "1f4e9754a8931fbd9834ab11592f358418efc9ff" |
|
349 |
+ }, |
|
350 |
+ { |
|
351 |
+ "ImportPath": "github.com/RangelReale/osincli", |
|
352 |
+ "Rev": "23618ea0fc3faa3f43954ce8ff48e31f5c784212" |
|
353 |
+ }, |
|
354 |
+ { |
|
355 |
+ "ImportPath": "github.com/Sirupsen/logrus", |
|
356 |
+ "Comment": "v0.6.6-2-g2cea0f0", |
|
357 |
+ "Rev": "2cea0f0d141f56fae06df5b813ec4119d1c8ccbd" |
|
358 |
+ }, |
|
359 |
+ { |
|
360 |
+ "ImportPath": "github.com/abbot/go-http-auth", |
|
361 |
+ "Rev": "c0ef4539dfab4d21c8ef20ba2924f9fc6f186d35" |
|
362 |
+ }, |
|
363 |
+ { |
|
364 |
+ "ImportPath": "github.com/awalterschulze/gographviz", |
|
365 |
+ "Rev": "20d1f693416d9be045340150094aa42035a41c9e" |
|
366 |
+ }, |
|
367 |
+ { |
|
368 |
+ "ImportPath": "github.com/beorn7/perks/quantile", |
|
369 |
+ "Rev": "b965b613227fddccbfffe13eae360ed3fa822f8d" |
|
370 |
+ }, |
|
371 |
+ { |
|
372 |
+ "ImportPath": "github.com/coreos/etcd/config", |
|
373 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
374 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
375 |
+ }, |
|
376 |
+ { |
|
377 |
+ "ImportPath": "github.com/coreos/etcd/discovery", |
|
378 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
379 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
380 |
+ }, |
|
381 |
+ { |
|
382 |
+ "ImportPath": "github.com/coreos/etcd/error", |
|
383 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
384 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
385 |
+ }, |
|
386 |
+ { |
|
387 |
+ "ImportPath": "github.com/coreos/etcd/etcd", |
|
388 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
389 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
390 |
+ }, |
|
391 |
+ { |
|
392 |
+ "ImportPath": "github.com/coreos/etcd/http", |
|
393 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
394 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
395 |
+ }, |
|
396 |
+ { |
|
397 |
+ "ImportPath": "github.com/coreos/etcd/log", |
|
398 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
399 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
400 |
+ }, |
|
401 |
+ { |
|
402 |
+ "ImportPath": "github.com/coreos/etcd/metrics", |
|
403 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
404 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
405 |
+ }, |
|
406 |
+ { |
|
407 |
+ "ImportPath": "github.com/coreos/etcd/mod", |
|
408 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
409 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
410 |
+ }, |
|
411 |
+ { |
|
412 |
+ "ImportPath": "github.com/coreos/etcd/pkg/btrfs", |
|
413 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
414 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
415 |
+ }, |
|
416 |
+ { |
|
417 |
+ "ImportPath": "github.com/coreos/etcd/pkg/http", |
|
418 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
419 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
420 |
+ }, |
|
421 |
+ { |
|
422 |
+ "ImportPath": "github.com/coreos/etcd/pkg/strings", |
|
423 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
424 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
425 |
+ }, |
|
426 |
+ { |
|
427 |
+ "ImportPath": "github.com/coreos/etcd/server", |
|
428 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
429 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
430 |
+ }, |
|
431 |
+ { |
|
432 |
+ "ImportPath": "github.com/coreos/etcd/store", |
|
433 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
434 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
435 |
+ }, |
|
436 |
+ { |
|
437 |
+ "ImportPath": "github.com/coreos/etcd/third_party/bitbucket.org/kardianos/osext", |
|
438 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
439 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
440 |
+ }, |
|
441 |
+ { |
|
442 |
+ "ImportPath": "github.com/coreos/etcd/third_party/code.google.com/p/gogoprotobuf/proto", |
|
443 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
444 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
445 |
+ }, |
|
446 |
+ { |
|
447 |
+ "ImportPath": "github.com/coreos/etcd/third_party/github.com/BurntSushi/toml", |
|
448 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
449 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
450 |
+ }, |
|
451 |
+ { |
|
452 |
+ "ImportPath": "github.com/coreos/etcd/third_party/github.com/coreos/go-etcd/etcd", |
|
453 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
454 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
455 |
+ }, |
|
456 |
+ { |
|
457 |
+ "ImportPath": "github.com/coreos/etcd/third_party/github.com/coreos/go-log/log", |
|
458 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
459 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
460 |
+ }, |
|
461 |
+ { |
|
462 |
+ "ImportPath": "github.com/coreos/etcd/third_party/github.com/coreos/go-systemd/journal", |
|
463 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
464 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
465 |
+ }, |
|
466 |
+ { |
|
467 |
+ "ImportPath": "github.com/coreos/etcd/third_party/github.com/goraft/raft", |
|
468 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
469 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
470 |
+ }, |
|
471 |
+ { |
|
472 |
+ "ImportPath": "github.com/coreos/etcd/third_party/github.com/gorilla/context", |
|
473 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
474 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
475 |
+ }, |
|
476 |
+ { |
|
477 |
+ "ImportPath": "github.com/coreos/etcd/third_party/github.com/gorilla/mux", |
|
478 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
479 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
480 |
+ }, |
|
481 |
+ { |
|
482 |
+ "ImportPath": "github.com/coreos/etcd/third_party/github.com/mreiferson/go-httpclient", |
|
483 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
484 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
485 |
+ }, |
|
486 |
+ { |
|
487 |
+ "ImportPath": "github.com/coreos/etcd/third_party/github.com/rcrowley/go-metrics", |
|
488 |
+ "Comment": "v0.4.3-7-gfc2afe1", |
|
489 |
+ "Rev": "fc2afe1ed2510d3c8c9ff41fc36d0da2c929a1c7" |
|
490 |
+ }, |
|
491 |
+ { |
|
492 |
+ "ImportPath": "github.com/coreos/go-etcd/etcd", |
|
493 |
+ "Comment": "v0.2.0-rc1-120-g23142f6", |
|
494 |
+ "Rev": "23142f6773a676cc2cae8dd0cb90b2ea761c853f" |
|
495 |
+ }, |
|
496 |
+ { |
|
497 |
+ "ImportPath": "github.com/coreos/go-systemd/activation", |
|
498 |
+ "Comment": "v2-27-g97e243d", |
|
499 |
+ "Rev": "97e243d21a8e232e9d8af38ba2366dfcfceebeba" |
|
500 |
+ }, |
|
501 |
+ { |
|
502 |
+ "ImportPath": "github.com/coreos/go-systemd/daemon", |
|
503 |
+ "Comment": "v2-27-g97e243d", |
|
504 |
+ "Rev": "97e243d21a8e232e9d8af38ba2366dfcfceebeba" |
|
505 |
+ }, |
|
506 |
+ { |
|
507 |
+ "ImportPath": "github.com/coreos/go-systemd/dbus", |
|
508 |
+ "Comment": "v2-27-g97e243d", |
|
509 |
+ "Rev": "97e243d21a8e232e9d8af38ba2366dfcfceebeba" |
|
510 |
+ }, |
|
511 |
+ { |
|
512 |
+ "ImportPath": "github.com/davecgh/go-spew/spew", |
|
513 |
+ "Rev": "1aaf839fb07e099361e445273993ccd9adc21b07" |
|
514 |
+ }, |
|
515 |
+ { |
|
516 |
+ "ImportPath": "github.com/daviddengcn/go-colortext", |
|
517 |
+ "Rev": "b5c0891944c2f150ccc9d02aecf51b76c14c2948" |
|
518 |
+ }, |
|
519 |
+ { |
|
520 |
+ "ImportPath": "github.com/docker/distribution", |
|
521 |
+ "Comment": "v2.0.0-alpha.3-30-g06fcf05", |
|
522 |
+ "Rev": "06fcf053e7b45aa8608c6bf32e8d3227b31d3747" |
|
523 |
+ }, |
|
524 |
+ { |
|
525 |
+ "ImportPath": "github.com/docker/docker/builder/command", |
|
526 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
527 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
528 |
+ }, |
|
529 |
+ { |
|
530 |
+ "ImportPath": "github.com/docker/docker/builder/parser", |
|
531 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
532 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
533 |
+ }, |
|
534 |
+ { |
|
535 |
+ "ImportPath": "github.com/docker/docker/pkg/archive", |
|
536 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
537 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
538 |
+ }, |
|
539 |
+ { |
|
540 |
+ "ImportPath": "github.com/docker/docker/pkg/fileutils", |
|
541 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
542 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
543 |
+ }, |
|
544 |
+ { |
|
545 |
+ "ImportPath": "github.com/docker/docker/pkg/ioutils", |
|
546 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
547 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
548 |
+ }, |
|
549 |
+ { |
|
550 |
+ "ImportPath": "github.com/docker/docker/pkg/mount", |
|
551 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
552 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
553 |
+ }, |
|
554 |
+ { |
|
555 |
+ "ImportPath": "github.com/docker/docker/pkg/parsers", |
|
556 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
557 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
558 |
+ }, |
|
559 |
+ { |
|
560 |
+ "ImportPath": "github.com/docker/docker/pkg/pools", |
|
561 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
562 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
563 |
+ }, |
|
564 |
+ { |
|
565 |
+ "ImportPath": "github.com/docker/docker/pkg/promise", |
|
566 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
567 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
568 |
+ }, |
|
569 |
+ { |
|
570 |
+ "ImportPath": "github.com/docker/docker/pkg/symlink", |
|
571 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
572 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
573 |
+ }, |
|
574 |
+ { |
|
575 |
+ "ImportPath": "github.com/docker/docker/pkg/system", |
|
576 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
577 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
578 |
+ }, |
|
579 |
+ { |
|
580 |
+ "ImportPath": "github.com/docker/docker/pkg/tarsum", |
|
581 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
582 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
583 |
+ }, |
|
584 |
+ { |
|
585 |
+ "ImportPath": "github.com/docker/docker/pkg/term", |
|
586 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
587 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
588 |
+ }, |
|
589 |
+ { |
|
590 |
+ "ImportPath": "github.com/docker/docker/pkg/units", |
|
591 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
592 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
593 |
+ }, |
|
594 |
+ { |
|
595 |
+ "ImportPath": "github.com/docker/docker/vendor/src/code.google.com/p/go/src/pkg/archive/tar", |
|
596 |
+ "Comment": "v1.4.1-1714-ged66853", |
|
597 |
+ "Rev": "ed6685369740035b0af9675bf9add52d0af7657b" |
|
598 |
+ }, |
|
599 |
+ { |
|
600 |
+ "ImportPath": "github.com/docker/libcontainer", |
|
601 |
+ "Comment": "v1.4.0-52-gd7dea0e", |
|
602 |
+ "Rev": "d7dea0e925315bab640115053204c16718839b1e" |
|
603 |
+ }, |
|
604 |
+ { |
|
605 |
+ "ImportPath": "github.com/docker/libtrust", |
|
606 |
+ "Rev": "c54fbb67c1f1e68d7d6f8d2ad7c9360404616a41" |
|
607 |
+ }, |
|
608 |
+ { |
|
609 |
+ "ImportPath": "github.com/docker/spdystream", |
|
610 |
+ "Rev": "e731c8f9f19ffd7e51a469a2de1580c1dfbb4fae" |
|
611 |
+ }, |
|
612 |
+ { |
|
613 |
+ "ImportPath": "github.com/elazarl/go-bindata-assetfs", |
|
614 |
+ "Rev": "ae4665cf2d188c65764c73fe4af5378acc549510" |
|
615 |
+ }, |
|
616 |
+ { |
|
617 |
+ "ImportPath": "github.com/emicklei/go-restful", |
|
618 |
+ "Comment": "v1.1.3-26-g977ac8f", |
|
619 |
+ "Rev": "977ac8fcbcd2ee33319246f7c91d4b426402dc70" |
|
620 |
+ }, |
|
621 |
+ { |
|
622 |
+ "ImportPath": "github.com/evanphx/json-patch", |
|
623 |
+ "Rev": "7dd4489c2eb6073e5a9d7746c3274c5b5f0387df" |
|
624 |
+ }, |
|
625 |
+ { |
|
626 |
+ "ImportPath": "github.com/fsouza/go-dockerclient", |
|
627 |
+ "Rev": "bd32742a065748632a860c9ffd8adf42cc4e140f" |
|
628 |
+ }, |
|
629 |
+ { |
|
630 |
+ "ImportPath": "github.com/getsentry/raven-go", |
|
631 |
+ "Rev": "86cd4063c535cbbcbf43d84424dbd5911ab1b818" |
|
632 |
+ }, |
|
633 |
+ { |
|
634 |
+ "ImportPath": "github.com/ghodss/yaml", |
|
635 |
+ "Rev": "588cb435e59ee8b6c2795482887755841ad67207" |
|
636 |
+ }, |
|
637 |
+ { |
|
638 |
+ "ImportPath": "github.com/godbus/dbus", |
|
639 |
+ "Comment": "0-7-g939230d", |
|
640 |
+ "Rev": "939230d2086a4f1870e04c52e0a376c25bae0ec4" |
|
641 |
+ }, |
|
642 |
+ { |
|
643 |
+ "ImportPath": "github.com/golang/glog", |
|
644 |
+ "Rev": "44145f04b68cf362d9c4df2182967c2275eaefed" |
|
645 |
+ }, |
|
646 |
+ { |
|
647 |
+ "ImportPath": "github.com/golang/groupcache/lru", |
|
648 |
+ "Rev": "604ed5785183e59ae2789449d89e73f3a2a77987" |
|
649 |
+ }, |
|
650 |
+ { |
|
651 |
+ "ImportPath": "github.com/golang/protobuf/proto", |
|
652 |
+ "Rev": "7f07925444bb51fa4cf9dfe6f7661876f8852275" |
|
653 |
+ }, |
|
654 |
+ { |
|
655 |
+ "ImportPath": "github.com/google/cadvisor/api", |
|
656 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
657 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
658 |
+ }, |
|
659 |
+ { |
|
660 |
+ "ImportPath": "github.com/google/cadvisor/container", |
|
661 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
662 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
663 |
+ }, |
|
664 |
+ { |
|
665 |
+ "ImportPath": "github.com/google/cadvisor/events", |
|
666 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
667 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
668 |
+ }, |
|
669 |
+ { |
|
670 |
+ "ImportPath": "github.com/google/cadvisor/fs", |
|
671 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
672 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
673 |
+ }, |
|
674 |
+ { |
|
675 |
+ "ImportPath": "github.com/google/cadvisor/healthz", |
|
676 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
677 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
678 |
+ }, |
|
679 |
+ { |
|
680 |
+ "ImportPath": "github.com/google/cadvisor/http", |
|
681 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
682 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
683 |
+ }, |
|
684 |
+ { |
|
685 |
+ "ImportPath": "github.com/google/cadvisor/info/v1", |
|
686 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
687 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
688 |
+ }, |
|
689 |
+ { |
|
690 |
+ "ImportPath": "github.com/google/cadvisor/info/v2", |
|
691 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
692 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
693 |
+ }, |
|
694 |
+ { |
|
695 |
+ "ImportPath": "github.com/google/cadvisor/manager", |
|
696 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
697 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
698 |
+ }, |
|
699 |
+ { |
|
700 |
+ "ImportPath": "github.com/google/cadvisor/metrics", |
|
701 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
702 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
703 |
+ }, |
|
704 |
+ { |
|
705 |
+ "ImportPath": "github.com/google/cadvisor/pages", |
|
706 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
707 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
708 |
+ }, |
|
709 |
+ { |
|
710 |
+ "ImportPath": "github.com/google/cadvisor/storage", |
|
711 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
712 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
713 |
+ }, |
|
714 |
+ { |
|
715 |
+ "ImportPath": "github.com/google/cadvisor/summary", |
|
716 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
717 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
718 |
+ }, |
|
719 |
+ { |
|
720 |
+ "ImportPath": "github.com/google/cadvisor/utils", |
|
721 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
722 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
723 |
+ }, |
|
724 |
+ { |
|
725 |
+ "ImportPath": "github.com/google/cadvisor/validate", |
|
726 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
727 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
728 |
+ }, |
|
729 |
+ { |
|
730 |
+ "ImportPath": "github.com/google/cadvisor/version", |
|
731 |
+ "Comment": "0.10.1-106-gfd9f7e0", |
|
732 |
+ "Rev": "fd9f7e0e820c7916e052e2180ee51e5ef8ad6614" |
|
733 |
+ }, |
|
734 |
+ { |
|
735 |
+ "ImportPath": "github.com/google/gofuzz", |
|
736 |
+ "Rev": "bbcb9da2d746f8bdbd6a936686a0a6067ada0ec5" |
|
737 |
+ }, |
|
738 |
+ { |
|
739 |
+ "ImportPath": "github.com/gorilla/context", |
|
740 |
+ "Rev": "215affda49addc4c8ef7e2534915df2c8c35c6cd" |
|
741 |
+ }, |
|
742 |
+ { |
|
743 |
+ "ImportPath": "github.com/gorilla/handlers", |
|
744 |
+ "Rev": "4ef72b2795a418935d497c8db213080be06f8850" |
|
745 |
+ }, |
|
746 |
+ { |
|
747 |
+ "ImportPath": "github.com/gorilla/mux", |
|
748 |
+ "Rev": "8096f47503459bcc74d1f4c487b7e6e42e5746b5" |
|
749 |
+ }, |
|
750 |
+ { |
|
751 |
+ "ImportPath": "github.com/gorilla/securecookie", |
|
752 |
+ "Rev": "1b0c7f6e9ab3d7f500fd7d50c7ad835ff428139b" |
|
753 |
+ }, |
|
754 |
+ { |
|
755 |
+ "ImportPath": "github.com/gorilla/sessions", |
|
756 |
+ "Rev": "aa5e036e6c44aec69a32eb41097001978b29ad31" |
|
757 |
+ }, |
|
758 |
+ { |
|
759 |
+ "ImportPath": "github.com/imdario/mergo", |
|
760 |
+ "Comment": "0.1.3-8-g6633656", |
|
761 |
+ "Rev": "6633656539c1639d9d78127b7d47c622b5d7b6dc" |
|
762 |
+ }, |
|
763 |
+ { |
|
764 |
+ "ImportPath": "github.com/jteeuwen/go-bindata", |
|
765 |
+ "Comment": "v3.0.7-2-gf94581b", |
|
766 |
+ "Rev": "f94581bd91620d0ccd9c22bb1d2de13f6a605857" |
|
767 |
+ }, |
|
768 |
+ { |
|
769 |
+ "ImportPath": "github.com/kr/pty", |
|
770 |
+ "Comment": "release.r56-25-g05017fc", |
|
771 |
+ "Rev": "05017fcccf23c823bfdea560dcc958a136e54fb7" |
|
772 |
+ }, |
|
773 |
+ { |
|
774 |
+ "ImportPath": "github.com/matttproud/golang_protobuf_extensions/ext", |
|
775 |
+ "Rev": "ba7d65ac66e9da93a714ca18f6d1bc7a0c09100c" |
|
776 |
+ }, |
|
777 |
+ { |
|
778 |
+ "ImportPath": "github.com/miekg/dns", |
|
779 |
+ "Rev": "3f504e8dabd5d562e997d19ce0200aa41973e1b2" |
|
780 |
+ }, |
|
781 |
+ { |
|
782 |
+ "ImportPath": "github.com/openshift/source-to-image/pkg/api", |
|
783 |
+ "Comment": "v0.2-8-gc0c154e", |
|
784 |
+ "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
785 |
+ }, |
|
786 |
+ { |
|
787 |
+ "ImportPath": "github.com/openshift/source-to-image/pkg/build", |
|
788 |
+ "Comment": "v0.2-8-gc0c154e", |
|
789 |
+ "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
790 |
+ }, |
|
791 |
+ { |
|
792 |
+ "ImportPath": "github.com/openshift/source-to-image/pkg/docker", |
|
793 |
+ "Comment": "v0.2-8-gc0c154e", |
|
794 |
+ "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
795 |
+ }, |
|
796 |
+ { |
|
797 |
+ "ImportPath": "github.com/openshift/source-to-image/pkg/errors", |
|
798 |
+ "Comment": "v0.2-8-gc0c154e", |
|
799 |
+ "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
800 |
+ }, |
|
801 |
+ { |
|
802 |
+ "ImportPath": "github.com/openshift/source-to-image/pkg/git", |
|
803 |
+ "Comment": "v0.2-8-gc0c154e", |
|
804 |
+ "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
805 |
+ }, |
|
806 |
+ { |
|
807 |
+ "ImportPath": "github.com/openshift/source-to-image/pkg/scripts", |
|
808 |
+ "Comment": "v0.2-8-gc0c154e", |
|
809 |
+ "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
810 |
+ }, |
|
811 |
+ { |
|
812 |
+ "ImportPath": "github.com/openshift/source-to-image/pkg/tar", |
|
813 |
+ "Comment": "v0.2-8-gc0c154e", |
|
814 |
+ "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
815 |
+ }, |
|
816 |
+ { |
|
817 |
+ "ImportPath": "github.com/openshift/source-to-image/pkg/util", |
|
818 |
+ "Comment": "v0.2-8-gc0c154e", |
|
819 |
+ "Rev": "c0c154efcba27ea5693c428bfe28560c220b4850" |
|
820 |
+ }, |
|
821 |
+ { |
|
822 |
+ "ImportPath": "github.com/pkg/profile", |
|
823 |
+ "Rev": "c795610ec6e479e5795f7852db65ea15073674a6" |
|
824 |
+ }, |
|
825 |
+ { |
|
826 |
+ "ImportPath": "github.com/prometheus/client_golang/model", |
|
827 |
+ "Comment": "0.2.0-5-gde5f7a2", |
|
828 |
+ "Rev": "de5f7a2db9d883392ce3ad667087280fe1ff9cea" |
|
829 |
+ }, |
|
830 |
+ { |
|
831 |
+ "ImportPath": "github.com/prometheus/client_golang/prometheus", |
|
832 |
+ "Comment": "0.2.0-5-gde5f7a2", |
|
833 |
+ "Rev": "de5f7a2db9d883392ce3ad667087280fe1ff9cea" |
|
834 |
+ }, |
|
835 |
+ { |
|
836 |
+ "ImportPath": "github.com/prometheus/client_golang/text", |
|
837 |
+ "Comment": "0.2.0-5-gde5f7a2", |
|
838 |
+ "Rev": "de5f7a2db9d883392ce3ad667087280fe1ff9cea" |
|
839 |
+ }, |
|
840 |
+ { |
|
841 |
+ "ImportPath": "github.com/prometheus/client_model/go", |
|
842 |
+ "Comment": "model-0.0.2-12-gfa8ad6f", |
|
843 |
+ "Rev": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6" |
|
844 |
+ }, |
|
845 |
+ { |
|
846 |
+ "ImportPath": "github.com/prometheus/procfs", |
|
847 |
+ "Rev": "6c34ef819e19b4e16f410100ace4aa006f0e3bf8" |
|
848 |
+ }, |
|
849 |
+ { |
|
850 |
+ "ImportPath": "github.com/skynetservices/skydns/backends/etcd", |
|
851 |
+ "Comment": "2.0.1d-54-g5c2bf88", |
|
852 |
+ "Rev": "5c2bf889497b9857586b4fd6703fdc1b7d5638bd" |
|
853 |
+ }, |
|
854 |
+ { |
|
855 |
+ "ImportPath": "github.com/skynetservices/skydns/cache", |
|
856 |
+ "Comment": "2.0.1d-54-g5c2bf88", |
|
857 |
+ "Rev": "5c2bf889497b9857586b4fd6703fdc1b7d5638bd" |
|
858 |
+ }, |
|
859 |
+ { |
|
860 |
+ "ImportPath": "github.com/skynetservices/skydns/msg", |
|
861 |
+ "Comment": "2.0.1d-54-g5c2bf88", |
|
862 |
+ "Rev": "5c2bf889497b9857586b4fd6703fdc1b7d5638bd" |
|
863 |
+ }, |
|
864 |
+ { |
|
865 |
+ "ImportPath": "github.com/skynetservices/skydns/server", |
|
866 |
+ "Comment": "2.0.1d-54-g5c2bf88", |
|
867 |
+ "Rev": "5c2bf889497b9857586b4fd6703fdc1b7d5638bd" |
|
868 |
+ }, |
|
869 |
+ { |
|
870 |
+ "ImportPath": "github.com/spf13/cobra", |
|
871 |
+ "Rev": "79bd93d369fb73d640179208d4e2b1a748915567" |
|
872 |
+ }, |
|
873 |
+ { |
|
874 |
+ "ImportPath": "github.com/spf13/pflag", |
|
875 |
+ "Rev": "11b7cf8387a31f278486eaad758162830eca8c73" |
|
876 |
+ }, |
|
877 |
+ { |
|
878 |
+ "ImportPath": "github.com/stretchr/objx", |
|
879 |
+ "Rev": "d40df0cc104c06eae2dfe03d7dddb83802d52f9a" |
|
880 |
+ }, |
|
881 |
+ { |
|
882 |
+ "ImportPath": "github.com/stretchr/testify/assert", |
|
883 |
+ "Rev": "e4ec8152c15fc46bd5056ce65997a07c7d415325" |
|
884 |
+ }, |
|
885 |
+ { |
|
886 |
+ "ImportPath": "github.com/stretchr/testify/mock", |
|
887 |
+ "Rev": "e4ec8152c15fc46bd5056ce65997a07c7d415325" |
|
888 |
+ }, |
|
889 |
+ { |
|
890 |
+ "ImportPath": "golang.org/x/net/context", |
|
891 |
+ "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" |
|
892 |
+ }, |
|
893 |
+ { |
|
894 |
+ "ImportPath": "golang.org/x/net/html", |
|
895 |
+ "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" |
|
896 |
+ }, |
|
897 |
+ { |
|
898 |
+ "ImportPath": "golang.org/x/net/websocket", |
|
899 |
+ "Rev": "cbcac7bb8415db9b6cb4d1ebab1dc9afbd688b97" |
|
900 |
+ }, |
|
901 |
+ { |
|
902 |
+ "ImportPath": "golang.org/x/oauth2", |
|
903 |
+ "Rev": "2e66694fea36dc820636630792a55cdc6987e05b" |
|
904 |
+ }, |
|
905 |
+ { |
|
906 |
+ "ImportPath": "google.golang.org/appengine", |
|
907 |
+ "Rev": "6aa67407028217c352e215f5af320a429d0bcf5f" |
|
908 |
+ }, |
|
909 |
+ { |
|
910 |
+ "ImportPath": "google.golang.org/cloud/compute/metadata", |
|
911 |
+ "Rev": "2e43671e4ad874a7bca65746ff3edb38e6e93762" |
|
912 |
+ }, |
|
913 |
+ { |
|
914 |
+ "ImportPath": "google.golang.org/cloud/internal", |
|
915 |
+ "Rev": "2e43671e4ad874a7bca65746ff3edb38e6e93762" |
|
916 |
+ }, |
|
917 |
+ { |
|
918 |
+ "ImportPath": "gopkg.in/yaml.v2", |
|
919 |
+ "Rev": "d466437aa4adc35830964cffc5b5f262c63ddcb4" |
|
920 |
+ }, |
|
921 |
+ { |
|
922 |
+ "ImportPath": "speter.net/go/exp/math/dec/inf", |
|
923 |
+ "Rev": "42ca6cd68aa922bc3f32f1e056e61b65945d9ad7" |
|
924 |
+ } |
|
925 |
+ ] |
|
911 | 926 |
} |
... | ... |
@@ -687,9 +687,6 @@ func GetDockerPodStatus(client DockerInterface, manifest api.PodSpec, podFullNam |
687 | 687 |
} |
688 | 688 |
} |
689 | 689 |
|
690 |
- if podStatus.PodIP == "" { |
|
691 |
- return nil, ErrNoPodInfraContainerInPod |
|
692 |
- } |
|
693 | 690 |
if len(statuses) == 0 && podStatus.PodIP == "" { |
694 | 691 |
return nil, ErrNoContainersInPod |
695 | 692 |
} |
... | ... |
@@ -58,7 +58,7 @@ func walkJSONFiles(inDir string, fn func(name, path string, data []byte)) error |
58 | 58 |
func TestExampleObjectSchemas(t *testing.T) { |
59 | 59 |
// Allow privileged containers |
60 | 60 |
// TODO: make this configurable and not the default https://github.com/openshift/origin/issues/662 |
61 |
- kubelet.SetupCapabilities(true) |
|
61 |
+ kubelet.SetupCapabilities(true, nil) |
|
62 | 62 |
cases := map[string]map[string]runtime.Object{ |
63 | 63 |
"../examples/hello-openshift": { |
64 | 64 |
"hello-pod": &kapi.Pod{}, |
... | ... |
@@ -272,7 +272,7 @@ osc new-app php mysql |
272 | 272 |
echo "new-app: ok" |
273 | 273 |
|
274 | 274 |
osc get routes |
275 |
-osc create -f test/integration/fixtures/test-route.json create routes |
|
275 |
+osc create -f test/integration/fixtures/test-route.json |
|
276 | 276 |
osc delete routes testroute |
277 | 277 |
echo "routes: ok" |
278 | 278 |
|
... | ... |
@@ -337,6 +337,7 @@ echo "ui-project-commands: ok" |
337 | 337 |
# Test deleting and recreating a project |
338 | 338 |
osadm new-project recreated-project --admin="createuser1" |
339 | 339 |
osc delete project recreated-project |
340 |
+osc delete project recreated-project |
|
340 | 341 |
osadm new-project recreated-project --admin="createuser2" |
341 | 342 |
osc describe policybinding master -n recreated-project | grep createuser2 |
342 | 343 |
echo "ex new-project: ok" |
... | ... |
@@ -1,23 +1,23 @@ |
1 | 1 |
package validation |
2 | 2 |
|
3 | 3 |
import ( |
4 |
- errs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
5 | 4 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation" |
6 | 5 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
6 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
7 | 7 |
|
8 | 8 |
authorizationapi "github.com/openshift/origin/pkg/authorization/api" |
9 | 9 |
) |
10 | 10 |
|
11 | 11 |
// ValidatePolicyBinding tests required fields for a PolicyBinding. |
12 |
-func ValidatePolicyBinding(policyBinding *authorizationapi.PolicyBinding) errs.ValidationErrorList { |
|
13 |
- allErrs := errs.ValidationErrorList{} |
|
12 |
+func ValidatePolicyBinding(policyBinding *authorizationapi.PolicyBinding) fielderrors.ValidationErrorList { |
|
13 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
14 | 14 |
|
15 | 15 |
if len(policyBinding.Name) == 0 { |
16 |
- allErrs = append(allErrs, errs.NewFieldRequired("name")) |
|
16 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("name")) |
|
17 | 17 |
} |
18 | 18 |
|
19 | 19 |
if len(policyBinding.PolicyRef.Namespace) == 0 { |
20 |
- allErrs = append(allErrs, errs.NewFieldRequired("policyRef.Namespace")) |
|
20 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("policyRef.Namespace")) |
|
21 | 21 |
} |
22 | 22 |
|
23 | 23 |
allErrs = append(allErrs, validation.ValidateLabels(policyBinding.Labels, "labels")...) |
... | ... |
@@ -25,11 +25,11 @@ func ValidatePolicyBinding(policyBinding *authorizationapi.PolicyBinding) errs.V |
25 | 25 |
} |
26 | 26 |
|
27 | 27 |
// ValidateRole tests required fields for a Role. |
28 |
-func ValidateRole(role *authorizationapi.Role) errs.ValidationErrorList { |
|
29 |
- allErrs := errs.ValidationErrorList{} |
|
28 |
+func ValidateRole(role *authorizationapi.Role) fielderrors.ValidationErrorList { |
|
29 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
30 | 30 |
|
31 | 31 |
if len(role.Name) == 0 { |
32 |
- allErrs = append(allErrs, errs.NewFieldRequired("name")) |
|
32 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("name")) |
|
33 | 33 |
} |
34 | 34 |
|
35 | 35 |
allErrs = append(allErrs, validation.ValidateLabels(role.Labels, "labels")...) |
... | ... |
@@ -37,17 +37,17 @@ func ValidateRole(role *authorizationapi.Role) errs.ValidationErrorList { |
37 | 37 |
} |
38 | 38 |
|
39 | 39 |
// ValidateRoleBinding tests required fields for a RoleBinding. |
40 |
-func ValidateRoleBinding(roleBinding *authorizationapi.RoleBinding) errs.ValidationErrorList { |
|
41 |
- allErrs := errs.ValidationErrorList{} |
|
40 |
+func ValidateRoleBinding(roleBinding *authorizationapi.RoleBinding) fielderrors.ValidationErrorList { |
|
41 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
42 | 42 |
|
43 | 43 |
if len(roleBinding.Name) == 0 { |
44 |
- allErrs = append(allErrs, errs.NewFieldRequired("name")) |
|
44 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("name")) |
|
45 | 45 |
} |
46 | 46 |
|
47 | 47 |
if len(roleBinding.RoleRef.Namespace) == 0 { |
48 |
- allErrs = append(allErrs, errs.NewFieldRequired("roleRef.namespace")) |
|
48 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("roleRef.namespace")) |
|
49 | 49 |
} else if !util.IsDNS1123Subdomain(roleBinding.RoleRef.Namespace) { |
50 |
- allErrs = append(allErrs, errs.NewFieldInvalid("roleRef.namespace", roleBinding.RoleRef.Namespace, "roleRef.namespace must be a valid subdomain")) |
|
50 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("roleRef.namespace", roleBinding.RoleRef.Namespace, "roleRef.namespace must be a valid subdomain")) |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
allErrs = append(allErrs, validation.ValidateLabels(roleBinding.Labels, "labels")...) |
... | ... |
@@ -2,7 +2,6 @@ package policy |
2 | 2 |
|
3 | 3 |
import ( |
4 | 4 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
5 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
6 | 5 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
7 | 6 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
8 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -17,7 +16,7 @@ type REST struct { |
17 | 17 |
} |
18 | 18 |
|
19 | 19 |
// NewREST creates a new REST for policies. |
20 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
20 |
+func NewREST(registry Registry) *REST { |
|
21 | 21 |
return &REST{registry} |
22 | 22 |
} |
23 | 23 |
|
... | ... |
@@ -5,7 +5,6 @@ import ( |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 | 7 |
kerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
8 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -22,7 +21,7 @@ type REST struct { |
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
// NewREST creates a new REST for policyBindings. |
25 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
25 |
+func NewREST(registry Registry) *REST { |
|
26 | 26 |
return &REST{registry} |
27 | 27 |
} |
28 | 28 |
|
... | ... |
@@ -4,7 +4,6 @@ import ( |
4 | 4 |
"fmt" |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
8 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
9 | 8 |
|
10 | 9 |
authorizationapi "github.com/openshift/origin/pkg/authorization/api" |
... | ... |
@@ -17,7 +16,7 @@ type REST struct { |
17 | 17 |
} |
18 | 18 |
|
19 | 19 |
// NewREST creates a new REST for policies. |
20 |
-func NewREST(authorizer authorizer.Authorizer) apiserver.RESTStorage { |
|
20 |
+func NewREST(authorizer authorizer.Authorizer) *REST { |
|
21 | 21 |
return &REST{authorizer} |
22 | 22 |
} |
23 | 23 |
|
... | ... |
@@ -5,7 +5,6 @@ import ( |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 | 7 |
kerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
8 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -20,7 +19,7 @@ type REST struct { |
20 | 20 |
} |
21 | 21 |
|
22 | 22 |
// NewREST creates a new REST for policies. |
23 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
23 |
+func NewREST(registry Registry) *REST { |
|
24 | 24 |
return &REST{registry} |
25 | 25 |
} |
26 | 26 |
|
... | ... |
@@ -5,7 +5,6 @@ import ( |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 | 7 |
kerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
8 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
11 | 10 |
|
... | ... |
@@ -21,7 +20,7 @@ type REST struct { |
21 | 21 |
} |
22 | 22 |
|
23 | 23 |
// NewREST creates a new REST for policies. |
24 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
24 |
+func NewREST(registry Registry) *REST { |
|
25 | 25 |
return &REST{registry} |
26 | 26 |
} |
27 | 27 |
|
... | ... |
@@ -5,7 +5,6 @@ import ( |
5 | 5 |
"fmt" |
6 | 6 |
|
7 | 7 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
8 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/auth/user" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
11 | 10 |
|
... | ... |
@@ -19,7 +18,7 @@ type REST struct { |
19 | 19 |
} |
20 | 20 |
|
21 | 21 |
// NewREST creates a new REST for policies. |
22 |
-func NewREST(authorizer authorizer.Authorizer) apiserver.RESTStorage { |
|
22 |
+func NewREST(authorizer authorizer.Authorizer) *REST { |
|
23 | 23 |
return &REST{authorizer} |
24 | 24 |
} |
25 | 25 |
|
... | ... |
@@ -3,26 +3,26 @@ package validation |
3 | 3 |
import ( |
4 | 4 |
"net/url" |
5 | 5 |
|
6 |
- errs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
7 | 6 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation" |
8 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
8 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
9 | 9 |
|
10 | 10 |
buildapi "github.com/openshift/origin/pkg/build/api" |
11 | 11 |
imageapi "github.com/openshift/origin/pkg/image/api" |
12 | 12 |
) |
13 | 13 |
|
14 | 14 |
// ValidateBuild tests required fields for a Build. |
15 |
-func ValidateBuild(build *buildapi.Build) errs.ValidationErrorList { |
|
16 |
- allErrs := errs.ValidationErrorList{} |
|
15 |
+func ValidateBuild(build *buildapi.Build) fielderrors.ValidationErrorList { |
|
16 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
17 | 17 |
if len(build.Name) == 0 { |
18 |
- allErrs = append(allErrs, errs.NewFieldRequired("name")) |
|
18 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("name")) |
|
19 | 19 |
} else if !util.IsDNS1123Subdomain(build.Name) { |
20 |
- allErrs = append(allErrs, errs.NewFieldInvalid("name", build.Name, "name must be a valid subdomain")) |
|
20 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("name", build.Name, "name must be a valid subdomain")) |
|
21 | 21 |
} |
22 | 22 |
if len(build.Namespace) == 0 { |
23 |
- allErrs = append(allErrs, errs.NewFieldRequired("namespace")) |
|
23 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("namespace")) |
|
24 | 24 |
} else if !util.IsDNS1123Subdomain(build.Namespace) { |
25 |
- allErrs = append(allErrs, errs.NewFieldInvalid("namespace", build.Namespace, "namespace must be a valid subdomain")) |
|
25 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("namespace", build.Namespace, "namespace must be a valid subdomain")) |
|
26 | 26 |
} |
27 | 27 |
allErrs = append(allErrs, validation.ValidateLabels(build.Labels, "labels")...) |
28 | 28 |
allErrs = append(allErrs, validateBuildParameters(&build.Parameters).Prefix("parameters")...) |
... | ... |
@@ -30,17 +30,17 @@ func ValidateBuild(build *buildapi.Build) errs.ValidationErrorList { |
30 | 30 |
} |
31 | 31 |
|
32 | 32 |
// ValidateBuildConfig tests required fields for a Build. |
33 |
-func ValidateBuildConfig(config *buildapi.BuildConfig) errs.ValidationErrorList { |
|
34 |
- allErrs := errs.ValidationErrorList{} |
|
33 |
+func ValidateBuildConfig(config *buildapi.BuildConfig) fielderrors.ValidationErrorList { |
|
34 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
35 | 35 |
if len(config.Name) == 0 { |
36 |
- allErrs = append(allErrs, errs.NewFieldRequired("name")) |
|
36 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("name")) |
|
37 | 37 |
} else if !util.IsDNS1123Subdomain(config.Name) { |
38 |
- allErrs = append(allErrs, errs.NewFieldInvalid("name", config.Name, "name must be a valid subdomain")) |
|
38 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("name", config.Name, "name must be a valid subdomain")) |
|
39 | 39 |
} |
40 | 40 |
if len(config.Namespace) == 0 { |
41 |
- allErrs = append(allErrs, errs.NewFieldRequired("namespace")) |
|
41 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("namespace")) |
|
42 | 42 |
} else if !util.IsDNS1123Subdomain(config.Namespace) { |
43 |
- allErrs = append(allErrs, errs.NewFieldInvalid("namespace", config.Namespace, "namespace must be a valid subdomain")) |
|
43 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("namespace", config.Namespace, "namespace must be a valid subdomain")) |
|
44 | 44 |
} |
45 | 45 |
allErrs = append(allErrs, validation.ValidateLabels(config.Labels, "labels")...) |
46 | 46 |
for i := range config.Triggers { |
... | ... |
@@ -51,10 +51,10 @@ func ValidateBuildConfig(config *buildapi.BuildConfig) errs.ValidationErrorList |
51 | 51 |
return allErrs |
52 | 52 |
} |
53 | 53 |
|
54 |
-func ValidateBuildRequest(request *buildapi.BuildRequest) errs.ValidationErrorList { |
|
55 |
- allErrs := errs.ValidationErrorList{} |
|
54 |
+func ValidateBuildRequest(request *buildapi.BuildRequest) fielderrors.ValidationErrorList { |
|
55 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
56 | 56 |
if len(request.Name) == 0 { |
57 |
- allErrs = append(allErrs, errs.NewFieldRequired("name")) |
|
57 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("name")) |
|
58 | 58 |
} |
59 | 59 |
if request.Revision != nil { |
60 | 60 |
allErrs = append(allErrs, validateRevision(request.Revision).Prefix("revision")...) |
... | ... |
@@ -62,8 +62,8 @@ func ValidateBuildRequest(request *buildapi.BuildRequest) errs.ValidationErrorLi |
62 | 62 |
return allErrs |
63 | 63 |
} |
64 | 64 |
|
65 |
-func validateBuildParameters(params *buildapi.BuildParameters) errs.ValidationErrorList { |
|
66 |
- allErrs := errs.ValidationErrorList{} |
|
65 |
+func validateBuildParameters(params *buildapi.BuildParameters) fielderrors.ValidationErrorList { |
|
66 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
67 | 67 |
isCustomBuild := params.Strategy.Type == buildapi.CustomBuildStrategyType |
68 | 68 |
// Validate 'source' and 'output' for all build types except Custom build |
69 | 69 |
// where they are optional and validated only if present. |
... | ... |
@@ -81,40 +81,40 @@ func validateBuildParameters(params *buildapi.BuildParameters) errs.ValidationEr |
81 | 81 |
return allErrs |
82 | 82 |
} |
83 | 83 |
|
84 |
-func validateSource(input *buildapi.BuildSource) errs.ValidationErrorList { |
|
85 |
- allErrs := errs.ValidationErrorList{} |
|
84 |
+func validateSource(input *buildapi.BuildSource) fielderrors.ValidationErrorList { |
|
85 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
86 | 86 |
if input.Type != buildapi.BuildSourceGit { |
87 |
- allErrs = append(allErrs, errs.NewFieldRequired("type")) |
|
87 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("type")) |
|
88 | 88 |
} |
89 | 89 |
if input.Git == nil { |
90 |
- allErrs = append(allErrs, errs.NewFieldRequired("git")) |
|
90 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("git")) |
|
91 | 91 |
} else { |
92 | 92 |
allErrs = append(allErrs, validateGitSource(input.Git).Prefix("git")...) |
93 | 93 |
} |
94 | 94 |
return allErrs |
95 | 95 |
} |
96 | 96 |
|
97 |
-func validateGitSource(git *buildapi.GitBuildSource) errs.ValidationErrorList { |
|
98 |
- allErrs := errs.ValidationErrorList{} |
|
97 |
+func validateGitSource(git *buildapi.GitBuildSource) fielderrors.ValidationErrorList { |
|
98 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
99 | 99 |
if len(git.URI) == 0 { |
100 |
- allErrs = append(allErrs, errs.NewFieldRequired("uri")) |
|
100 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("uri")) |
|
101 | 101 |
} else if !isValidURL(git.URI) { |
102 |
- allErrs = append(allErrs, errs.NewFieldInvalid("uri", git.URI, "uri is not a valid url")) |
|
102 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("uri", git.URI, "uri is not a valid url")) |
|
103 | 103 |
} |
104 | 104 |
return allErrs |
105 | 105 |
} |
106 | 106 |
|
107 |
-func validateRevision(revision *buildapi.SourceRevision) errs.ValidationErrorList { |
|
108 |
- allErrs := errs.ValidationErrorList{} |
|
107 |
+func validateRevision(revision *buildapi.SourceRevision) fielderrors.ValidationErrorList { |
|
108 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
109 | 109 |
if len(revision.Type) == 0 { |
110 |
- allErrs = append(allErrs, errs.NewFieldRequired("type")) |
|
110 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("type")) |
|
111 | 111 |
} |
112 | 112 |
// TODO: validate other stuff |
113 | 113 |
return allErrs |
114 | 114 |
} |
115 | 115 |
|
116 |
-func validateOutput(output *buildapi.BuildOutput) errs.ValidationErrorList { |
|
117 |
- allErrs := errs.ValidationErrorList{} |
|
116 |
+func validateOutput(output *buildapi.BuildOutput) fielderrors.ValidationErrorList { |
|
117 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
118 | 118 |
|
119 | 119 |
// TODO: make part of a generic ValidateObjectReference method upstream. |
120 | 120 |
if output.To != nil { |
... | ... |
@@ -124,44 +124,44 @@ func validateOutput(output *buildapi.BuildOutput) errs.ValidationErrorList { |
124 | 124 |
output.To.Kind = kind |
125 | 125 |
} |
126 | 126 |
if kind != "ImageRepository" { |
127 |
- allErrs = append(allErrs, errs.NewFieldInvalid("to.kind", kind, "the target of build output must be 'ImageRepository'")) |
|
127 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("to.kind", kind, "the target of build output must be 'ImageRepository'")) |
|
128 | 128 |
} |
129 | 129 |
if len(name) == 0 { |
130 |
- allErrs = append(allErrs, errs.NewFieldRequired("to.name")) |
|
130 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("to.name")) |
|
131 | 131 |
} else if !util.IsDNS1123Subdomain(name) { |
132 |
- allErrs = append(allErrs, errs.NewFieldInvalid("to.name", name, "name must be a valid subdomain")) |
|
132 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("to.name", name, "name must be a valid subdomain")) |
|
133 | 133 |
} |
134 | 134 |
if len(namespace) != 0 && !util.IsDNS1123Subdomain(namespace) { |
135 |
- allErrs = append(allErrs, errs.NewFieldInvalid("to.namespace", namespace, "namespace must be a valid subdomain")) |
|
135 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("to.namespace", namespace, "namespace must be a valid subdomain")) |
|
136 | 136 |
} |
137 | 137 |
} |
138 | 138 |
|
139 | 139 |
if len(output.DockerImageReference) != 0 { |
140 | 140 |
if _, err := imageapi.ParseDockerImageReference(output.DockerImageReference); err != nil { |
141 |
- allErrs = append(allErrs, errs.NewFieldInvalid("dockerImageReference", output.DockerImageReference, err.Error())) |
|
141 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("dockerImageReference", output.DockerImageReference, err.Error())) |
|
142 | 142 |
} |
143 | 143 |
} |
144 | 144 |
return allErrs |
145 | 145 |
} |
146 | 146 |
|
147 |
-func validateBuildConfigOutput(output *buildapi.BuildOutput) errs.ValidationErrorList { |
|
148 |
- allErrs := errs.ValidationErrorList{} |
|
147 |
+func validateBuildConfigOutput(output *buildapi.BuildOutput) fielderrors.ValidationErrorList { |
|
148 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
149 | 149 |
if len(output.DockerImageReference) != 0 && output.To != nil { |
150 |
- allErrs = append(allErrs, errs.NewFieldInvalid("dockerImageReference", output.DockerImageReference, "only one of 'dockerImageReference' and 'to' may be set")) |
|
150 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("dockerImageReference", output.DockerImageReference, "only one of 'dockerImageReference' and 'to' may be set")) |
|
151 | 151 |
} |
152 | 152 |
return allErrs |
153 | 153 |
} |
154 | 154 |
|
155 |
-func validateStrategy(strategy *buildapi.BuildStrategy) errs.ValidationErrorList { |
|
156 |
- allErrs := errs.ValidationErrorList{} |
|
155 |
+func validateStrategy(strategy *buildapi.BuildStrategy) fielderrors.ValidationErrorList { |
|
156 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
157 | 157 |
|
158 | 158 |
switch { |
159 | 159 |
case len(strategy.Type) == 0: |
160 |
- allErrs = append(allErrs, errs.NewFieldRequired("type")) |
|
160 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("type")) |
|
161 | 161 |
|
162 | 162 |
case strategy.Type == buildapi.STIBuildStrategyType: |
163 | 163 |
if strategy.STIStrategy == nil { |
164 |
- allErrs = append(allErrs, errs.NewFieldRequired("stiStrategy")) |
|
164 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("stiStrategy")) |
|
165 | 165 |
} else { |
166 | 166 |
allErrs = append(allErrs, validateSTIStrategy(strategy.STIStrategy).Prefix("stiStrategy")...) |
167 | 167 |
} |
... | ... |
@@ -172,35 +172,35 @@ func validateStrategy(strategy *buildapi.BuildStrategy) errs.ValidationErrorList |
172 | 172 |
} |
173 | 173 |
case strategy.Type == buildapi.CustomBuildStrategyType: |
174 | 174 |
if strategy.CustomStrategy == nil { |
175 |
- allErrs = append(allErrs, errs.NewFieldRequired("customStrategy")) |
|
175 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("customStrategy")) |
|
176 | 176 |
} else { |
177 | 177 |
// CustomBuildStrategy requires 'image' to be specified in JSON |
178 | 178 |
if len(strategy.CustomStrategy.Image) == 0 { |
179 |
- allErrs = append(allErrs, errs.NewFieldRequired("image")) |
|
179 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("image")) |
|
180 | 180 |
} |
181 | 181 |
} |
182 | 182 |
default: |
183 |
- allErrs = append(allErrs, errs.NewFieldInvalid("type", strategy.Type, "type is not in the enumerated list")) |
|
183 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("type", strategy.Type, "type is not in the enumerated list")) |
|
184 | 184 |
} |
185 | 185 |
|
186 | 186 |
return allErrs |
187 | 187 |
} |
188 | 188 |
|
189 |
-func validateSTIStrategy(strategy *buildapi.STIBuildStrategy) errs.ValidationErrorList { |
|
190 |
- allErrs := errs.ValidationErrorList{} |
|
189 |
+func validateSTIStrategy(strategy *buildapi.STIBuildStrategy) fielderrors.ValidationErrorList { |
|
190 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
191 | 191 |
if (strategy.From == nil || len(strategy.From.Name) == 0) && len(strategy.Image) == 0 { |
192 |
- allErrs = append(allErrs, errs.NewFieldRequired("from")) |
|
192 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("from")) |
|
193 | 193 |
} |
194 | 194 |
if (strategy.From != nil && len(strategy.From.Name) != 0) && len(strategy.Image) != 0 { |
195 |
- allErrs = append(allErrs, errs.NewFieldInvalid("image", strategy.Image, "only one of 'image' and 'from' may be set")) |
|
195 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("image", strategy.Image, "only one of 'image' and 'from' may be set")) |
|
196 | 196 |
} |
197 | 197 |
return allErrs |
198 | 198 |
} |
199 | 199 |
|
200 |
-func validateTrigger(trigger *buildapi.BuildTriggerPolicy) errs.ValidationErrorList { |
|
201 |
- allErrs := errs.ValidationErrorList{} |
|
200 |
+func validateTrigger(trigger *buildapi.BuildTriggerPolicy) fielderrors.ValidationErrorList { |
|
201 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
202 | 202 |
if len(trigger.Type) == 0 { |
203 |
- allErrs = append(allErrs, errs.NewFieldRequired("type")) |
|
203 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("type")) |
|
204 | 204 |
return allErrs |
205 | 205 |
} |
206 | 206 |
|
... | ... |
@@ -215,19 +215,19 @@ func validateTrigger(trigger *buildapi.BuildTriggerPolicy) errs.ValidationErrorL |
215 | 215 |
switch trigger.Type { |
216 | 216 |
case buildapi.GithubWebHookBuildTriggerType: |
217 | 217 |
if trigger.GithubWebHook == nil { |
218 |
- allErrs = append(allErrs, errs.NewFieldRequired("github")) |
|
218 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("github")) |
|
219 | 219 |
} else { |
220 | 220 |
allErrs = append(allErrs, validateWebHook(trigger.GithubWebHook).Prefix("github")...) |
221 | 221 |
} |
222 | 222 |
case buildapi.GenericWebHookBuildTriggerType: |
223 | 223 |
if trigger.GenericWebHook == nil { |
224 |
- allErrs = append(allErrs, errs.NewFieldRequired("generic")) |
|
224 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("generic")) |
|
225 | 225 |
} else { |
226 | 226 |
allErrs = append(allErrs, validateWebHook(trigger.GenericWebHook).Prefix("generic")...) |
227 | 227 |
} |
228 | 228 |
case buildapi.ImageChangeBuildTriggerType: |
229 | 229 |
if trigger.ImageChange == nil { |
230 |
- allErrs = append(allErrs, errs.NewFieldRequired("imageChange")) |
|
230 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("imageChange")) |
|
231 | 231 |
} else { |
232 | 232 |
allErrs = append(allErrs, validateImageChange(trigger.ImageChange).Prefix("imageChange")...) |
233 | 233 |
} |
... | ... |
@@ -235,31 +235,31 @@ func validateTrigger(trigger *buildapi.BuildTriggerPolicy) errs.ValidationErrorL |
235 | 235 |
return allErrs |
236 | 236 |
} |
237 | 237 |
|
238 |
-func validateTriggerPresence(params map[buildapi.BuildTriggerType]bool, t buildapi.BuildTriggerType) errs.ValidationErrorList { |
|
239 |
- allErrs := errs.ValidationErrorList{} |
|
238 |
+func validateTriggerPresence(params map[buildapi.BuildTriggerType]bool, t buildapi.BuildTriggerType) fielderrors.ValidationErrorList { |
|
239 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
240 | 240 |
for triggerType, present := range params { |
241 | 241 |
if triggerType != t && present { |
242 |
- allErrs = append(allErrs, errs.NewFieldInvalid(string(triggerType), "", "triggerType wasn't found")) |
|
242 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid(string(triggerType), "", "triggerType wasn't found")) |
|
243 | 243 |
} |
244 | 244 |
} |
245 | 245 |
return allErrs |
246 | 246 |
} |
247 | 247 |
|
248 |
-func validateImageChange(imageChange *buildapi.ImageChangeTrigger) errs.ValidationErrorList { |
|
249 |
- allErrs := errs.ValidationErrorList{} |
|
248 |
+func validateImageChange(imageChange *buildapi.ImageChangeTrigger) fielderrors.ValidationErrorList { |
|
249 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
250 | 250 |
if len(imageChange.Image) == 0 { |
251 |
- allErrs = append(allErrs, errs.NewFieldRequired("image")) |
|
251 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("image")) |
|
252 | 252 |
} |
253 | 253 |
if len(imageChange.From.Name) == 0 { |
254 |
- allErrs = append(allErrs, errs.ValidationErrorList{errs.NewFieldRequired("name")}.Prefix("from")...) |
|
254 |
+ allErrs = append(allErrs, fielderrors.ValidationErrorList{fielderrors.NewFieldRequired("name")}.Prefix("from")...) |
|
255 | 255 |
} |
256 | 256 |
return allErrs |
257 | 257 |
} |
258 | 258 |
|
259 |
-func validateWebHook(webHook *buildapi.WebHookTrigger) errs.ValidationErrorList { |
|
260 |
- allErrs := errs.ValidationErrorList{} |
|
259 |
+func validateWebHook(webHook *buildapi.WebHookTrigger) fielderrors.ValidationErrorList { |
|
260 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
261 | 261 |
if len(webHook.Secret) == 0 { |
262 |
- allErrs = append(allErrs, errs.NewFieldRequired("secret")) |
|
262 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("secret")) |
|
263 | 263 |
} |
264 | 264 |
return allErrs |
265 | 265 |
} |
... | ... |
@@ -4,7 +4,7 @@ import ( |
4 | 4 |
"testing" |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 |
- errs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
7 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
8 | 8 |
|
9 | 9 |
buildapi "github.com/openshift/origin/pkg/build/api" |
10 | 10 |
) |
... | ... |
@@ -142,7 +142,7 @@ func TestBuildConfigValidationOutputFailure(t *testing.T) { |
142 | 142 |
func TestValidateBuildRequest(t *testing.T) { |
143 | 143 |
testCases := map[string]*buildapi.BuildRequest{ |
144 | 144 |
"": {ObjectMeta: kapi.ObjectMeta{Name: "requestName"}}, |
145 |
- string(errs.ValidationErrorTypeRequired) + "name": {}, |
|
145 |
+ string(fielderrors.ValidationErrorTypeRequired) + "name": {}, |
|
146 | 146 |
} |
147 | 147 |
|
148 | 148 |
for desc, tc := range testCases { |
... | ... |
@@ -154,7 +154,7 @@ func TestValidateBuildRequest(t *testing.T) { |
154 | 154 |
t.Errorf("%s: Unexpected validation result: %v", desc, errors) |
155 | 155 |
} |
156 | 156 |
if len(desc) > 0 { |
157 |
- err := errors[0].(*errs.ValidationError) |
|
157 |
+ err := errors[0].(*fielderrors.ValidationError) |
|
158 | 158 |
errDesc := string(err.Type) + err.Field |
159 | 159 |
if desc != errDesc { |
160 | 160 |
t.Errorf("Unexpected validation result for %s: expected %s, got %s", err.Field, desc, errDesc) |
... | ... |
@@ -165,13 +165,13 @@ func TestValidateBuildRequest(t *testing.T) { |
165 | 165 |
|
166 | 166 |
func TestValidateSource(t *testing.T) { |
167 | 167 |
errorCases := map[string]*buildapi.BuildSource{ |
168 |
- string(errs.ValidationErrorTypeRequired) + "git.uri": { |
|
168 |
+ string(fielderrors.ValidationErrorTypeRequired) + "git.uri": { |
|
169 | 169 |
Type: buildapi.BuildSourceGit, |
170 | 170 |
Git: &buildapi.GitBuildSource{ |
171 | 171 |
URI: "", |
172 | 172 |
}, |
173 | 173 |
}, |
174 |
- string(errs.ValidationErrorTypeInvalid) + "git.uri": { |
|
174 |
+ string(fielderrors.ValidationErrorTypeInvalid) + "git.uri": { |
|
175 | 175 |
Type: buildapi.BuildSourceGit, |
176 | 176 |
Git: &buildapi.GitBuildSource{ |
177 | 177 |
URI: "::", |
... | ... |
@@ -183,7 +183,7 @@ func TestValidateSource(t *testing.T) { |
183 | 183 |
if len(errors) != 1 { |
184 | 184 |
t.Errorf("%s: Unexpected validation result: %v", desc, errors) |
185 | 185 |
} |
186 |
- err := errors[0].(*errs.ValidationError) |
|
186 |
+ err := errors[0].(*fielderrors.ValidationError) |
|
187 | 187 |
errDesc := string(err.Type) + err.Field |
188 | 188 |
if desc != errDesc { |
189 | 189 |
t.Errorf("Unexpected validation result for %s: expected %s, got %s", err.Field, desc, errDesc) |
... | ... |
@@ -197,7 +197,7 @@ func TestValidateBuildParameters(t *testing.T) { |
197 | 197 |
*buildapi.BuildParameters |
198 | 198 |
}{ |
199 | 199 |
{ |
200 |
- string(errs.ValidationErrorTypeInvalid) + "output.dockerImageReference", |
|
200 |
+ string(fielderrors.ValidationErrorTypeInvalid) + "output.dockerImageReference", |
|
201 | 201 |
&buildapi.BuildParameters{ |
202 | 202 |
Source: buildapi.BuildSource{ |
203 | 203 |
Type: buildapi.BuildSourceGit, |
... | ... |
@@ -216,7 +216,7 @@ func TestValidateBuildParameters(t *testing.T) { |
216 | 216 |
}, |
217 | 217 |
}, |
218 | 218 |
{ |
219 |
- string(errs.ValidationErrorTypeInvalid) + "output.to.kind", |
|
219 |
+ string(fielderrors.ValidationErrorTypeInvalid) + "output.to.kind", |
|
220 | 220 |
&buildapi.BuildParameters{ |
221 | 221 |
Source: buildapi.BuildSource{ |
222 | 222 |
Type: buildapi.BuildSourceGit, |
... | ... |
@@ -238,7 +238,7 @@ func TestValidateBuildParameters(t *testing.T) { |
238 | 238 |
}, |
239 | 239 |
}, |
240 | 240 |
{ |
241 |
- string(errs.ValidationErrorTypeRequired) + "output.to.name", |
|
241 |
+ string(fielderrors.ValidationErrorTypeRequired) + "output.to.name", |
|
242 | 242 |
&buildapi.BuildParameters{ |
243 | 243 |
Source: buildapi.BuildSource{ |
244 | 244 |
Type: buildapi.BuildSourceGit, |
... | ... |
@@ -257,7 +257,7 @@ func TestValidateBuildParameters(t *testing.T) { |
257 | 257 |
}, |
258 | 258 |
}, |
259 | 259 |
{ |
260 |
- string(errs.ValidationErrorTypeInvalid) + "output.to.name", |
|
260 |
+ string(fielderrors.ValidationErrorTypeInvalid) + "output.to.name", |
|
261 | 261 |
&buildapi.BuildParameters{ |
262 | 262 |
Source: buildapi.BuildSource{ |
263 | 263 |
Type: buildapi.BuildSourceGit, |
... | ... |
@@ -279,7 +279,7 @@ func TestValidateBuildParameters(t *testing.T) { |
279 | 279 |
}, |
280 | 280 |
}, |
281 | 281 |
{ |
282 |
- string(errs.ValidationErrorTypeInvalid) + "output.to.namespace", |
|
282 |
+ string(fielderrors.ValidationErrorTypeInvalid) + "output.to.namespace", |
|
283 | 283 |
&buildapi.BuildParameters{ |
284 | 284 |
Source: buildapi.BuildSource{ |
285 | 285 |
Type: buildapi.BuildSourceGit, |
... | ... |
@@ -301,7 +301,7 @@ func TestValidateBuildParameters(t *testing.T) { |
301 | 301 |
}, |
302 | 302 |
}, |
303 | 303 |
{ |
304 |
- string(errs.ValidationErrorTypeInvalid) + "strategy.type", |
|
304 |
+ string(fielderrors.ValidationErrorTypeInvalid) + "strategy.type", |
|
305 | 305 |
&buildapi.BuildParameters{ |
306 | 306 |
Source: buildapi.BuildSource{ |
307 | 307 |
Type: buildapi.BuildSourceGit, |
... | ... |
@@ -316,7 +316,7 @@ func TestValidateBuildParameters(t *testing.T) { |
316 | 316 |
}, |
317 | 317 |
}, |
318 | 318 |
{ |
319 |
- string(errs.ValidationErrorTypeRequired) + "strategy.type", |
|
319 |
+ string(fielderrors.ValidationErrorTypeRequired) + "strategy.type", |
|
320 | 320 |
&buildapi.BuildParameters{ |
321 | 321 |
Source: buildapi.BuildSource{ |
322 | 322 |
Type: buildapi.BuildSourceGit, |
... | ... |
@@ -333,7 +333,7 @@ func TestValidateBuildParameters(t *testing.T) { |
333 | 333 |
// invalid because both image and from are specified in the |
334 | 334 |
// sti strategy definition |
335 | 335 |
{ |
336 |
- string(errs.ValidationErrorTypeInvalid) + "strategy.stiStrategy.image", |
|
336 |
+ string(fielderrors.ValidationErrorTypeInvalid) + "strategy.stiStrategy.image", |
|
337 | 337 |
&buildapi.BuildParameters{ |
338 | 338 |
Source: buildapi.BuildSource{ |
339 | 339 |
Type: buildapi.BuildSourceGit, |
... | ... |
@@ -358,7 +358,7 @@ func TestValidateBuildParameters(t *testing.T) { |
358 | 358 |
// invalid because neither image nor from are specified in the |
359 | 359 |
// sti strategy definition |
360 | 360 |
{ |
361 |
- string(errs.ValidationErrorTypeRequired) + "strategy.stiStrategy.from", |
|
361 |
+ string(fielderrors.ValidationErrorTypeRequired) + "strategy.stiStrategy.from", |
|
362 | 362 |
&buildapi.BuildParameters{ |
363 | 363 |
Source: buildapi.BuildSource{ |
364 | 364 |
Type: buildapi.BuildSourceGit, |
... | ... |
@@ -382,7 +382,7 @@ func TestValidateBuildParameters(t *testing.T) { |
382 | 382 |
if len(errors) != 1 { |
383 | 383 |
t.Errorf("%s: Unexpected validation result: %v", config.err, errors) |
384 | 384 |
} |
385 |
- err := errors[0].(*errs.ValidationError) |
|
385 |
+ err := errors[0].(*fielderrors.ValidationError) |
|
386 | 386 |
errDesc := string(err.Type) + err.Field |
387 | 387 |
if config.err != errDesc { |
388 | 388 |
t.Errorf("Unexpected validation result for %s: expected %s, got %s", err.Field, config.err, errDesc) |
... | ... |
@@ -448,22 +448,22 @@ func TestValidateBuildParametersSuccess(t *testing.T) { |
448 | 448 |
func TestValidateTrigger(t *testing.T) { |
449 | 449 |
tests := map[string]struct { |
450 | 450 |
trigger buildapi.BuildTriggerPolicy |
451 |
- expected []*errs.ValidationError |
|
451 |
+ expected []*fielderrors.ValidationError |
|
452 | 452 |
}{ |
453 | 453 |
"trigger without type": { |
454 | 454 |
trigger: buildapi.BuildTriggerPolicy{}, |
455 |
- expected: []*errs.ValidationError{errs.NewFieldRequired("type")}, |
|
455 |
+ expected: []*fielderrors.ValidationError{fielderrors.NewFieldRequired("type")}, |
|
456 | 456 |
}, |
457 | 457 |
"github type with no github webhook": { |
458 | 458 |
trigger: buildapi.BuildTriggerPolicy{Type: buildapi.GithubWebHookBuildTriggerType}, |
459 |
- expected: []*errs.ValidationError{errs.NewFieldRequired("github")}, |
|
459 |
+ expected: []*fielderrors.ValidationError{fielderrors.NewFieldRequired("github")}, |
|
460 | 460 |
}, |
461 | 461 |
"github trigger with no secret": { |
462 | 462 |
trigger: buildapi.BuildTriggerPolicy{ |
463 | 463 |
Type: buildapi.GithubWebHookBuildTriggerType, |
464 | 464 |
GithubWebHook: &buildapi.WebHookTrigger{}, |
465 | 465 |
}, |
466 |
- expected: []*errs.ValidationError{errs.NewFieldRequired("github.secret")}, |
|
466 |
+ expected: []*fielderrors.ValidationError{fielderrors.NewFieldRequired("github.secret")}, |
|
467 | 467 |
}, |
468 | 468 |
"github trigger with generic webhook": { |
469 | 469 |
trigger: buildapi.BuildTriggerPolicy{ |
... | ... |
@@ -472,18 +472,18 @@ func TestValidateTrigger(t *testing.T) { |
472 | 472 |
Secret: "secret101", |
473 | 473 |
}, |
474 | 474 |
}, |
475 |
- expected: []*errs.ValidationError{errs.NewFieldInvalid("generic", "", "long description")}, |
|
475 |
+ expected: []*fielderrors.ValidationError{fielderrors.NewFieldInvalid("generic", "", "long description")}, |
|
476 | 476 |
}, |
477 | 477 |
"generic trigger with no generic webhook": { |
478 | 478 |
trigger: buildapi.BuildTriggerPolicy{Type: buildapi.GenericWebHookBuildTriggerType}, |
479 |
- expected: []*errs.ValidationError{errs.NewFieldRequired("generic")}, |
|
479 |
+ expected: []*fielderrors.ValidationError{fielderrors.NewFieldRequired("generic")}, |
|
480 | 480 |
}, |
481 | 481 |
"generic trigger with no secret": { |
482 | 482 |
trigger: buildapi.BuildTriggerPolicy{ |
483 | 483 |
Type: buildapi.GenericWebHookBuildTriggerType, |
484 | 484 |
GenericWebHook: &buildapi.WebHookTrigger{}, |
485 | 485 |
}, |
486 |
- expected: []*errs.ValidationError{errs.NewFieldRequired("generic.secret")}, |
|
486 |
+ expected: []*fielderrors.ValidationError{fielderrors.NewFieldRequired("generic.secret")}, |
|
487 | 487 |
}, |
488 | 488 |
"generic trigger with github webhook": { |
489 | 489 |
trigger: buildapi.BuildTriggerPolicy{ |
... | ... |
@@ -492,7 +492,7 @@ func TestValidateTrigger(t *testing.T) { |
492 | 492 |
Secret: "secret101", |
493 | 493 |
}, |
494 | 494 |
}, |
495 |
- expected: []*errs.ValidationError{errs.NewFieldInvalid("github", "", "long github description")}, |
|
495 |
+ expected: []*fielderrors.ValidationError{fielderrors.NewFieldInvalid("github", "", "long github description")}, |
|
496 | 496 |
}, |
497 | 497 |
"valid github trigger": { |
498 | 498 |
trigger: buildapi.BuildTriggerPolicy{ |
... | ... |
@@ -520,7 +520,7 @@ func TestValidateTrigger(t *testing.T) { |
520 | 520 |
continue |
521 | 521 |
} |
522 | 522 |
err := errors[0] |
523 |
- validationError := err.(*errs.ValidationError) |
|
523 |
+ validationError := err.(*fielderrors.ValidationError) |
|
524 | 524 |
if validationError.Type != test.expected[0].Type { |
525 | 525 |
t.Errorf("%s: Unexpected error type: %s", desc, validationError.Type) |
526 | 526 |
} |
... | ... |
@@ -168,7 +168,7 @@ func (bc *BuildPodController) HandlePod(pod *kapi.Pod) error { |
168 | 168 |
case kapi.PodSucceeded, kapi.PodFailed: |
169 | 169 |
// Check the exit codes of all the containers in the pod |
170 | 170 |
nextStatus = buildapi.BuildStatusComplete |
171 |
- for _, info := range pod.Status.Info { |
|
171 |
+ for _, info := range pod.Status.ContainerStatuses { |
|
172 | 172 |
if info.State.Termination != nil && info.State.Termination.ExitCode != 0 { |
173 | 173 |
nextStatus = buildapi.BuildStatusFailed |
174 | 174 |
break |
... | ... |
@@ -144,8 +144,8 @@ func mockPod(status kapi.PodPhase, exitCode int) *kapi.Pod { |
144 | 144 |
ObjectMeta: kapi.ObjectMeta{Name: "name"}, |
145 | 145 |
Status: kapi.PodStatus{ |
146 | 146 |
Phase: status, |
147 |
- Info: kapi.PodInfo{ |
|
148 |
- "container1": kapi.ContainerStatus{ |
|
147 |
+ ContainerStatuses: []kapi.ContainerStatus{ |
|
148 |
+ { |
|
149 | 149 |
State: kapi.ContainerState{ |
150 | 150 |
Termination: &kapi.ContainerStateTerminated{ExitCode: exitCode}, |
151 | 151 |
}, |
... | ... |
@@ -80,12 +80,7 @@ func setupDockerSecrets(pod *kapi.Pod, pushSecret string) { |
80 | 80 |
Name: pushSecret, |
81 | 81 |
VolumeSource: kapi.VolumeSource{ |
82 | 82 |
Secret: &kapi.SecretVolumeSource{ |
83 |
- Target: kapi.ObjectReference{ |
|
84 |
- Kind: "Secret", |
|
85 |
- Name: pushSecret, |
|
86 |
- // TODO: Remove the namespace once it gets fixed upstream |
|
87 |
- Namespace: pod.Namespace, |
|
88 |
- }, |
|
83 |
+ SecretName: pushSecret, |
|
89 | 84 |
}, |
90 | 85 |
}, |
91 | 86 |
} |
... | ... |
@@ -6,7 +6,6 @@ import ( |
6 | 6 |
"code.google.com/p/go-uuid/uuid" |
7 | 7 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
8 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
9 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
12 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -22,7 +21,7 @@ type REST struct { |
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
// NewREST creates a new REST for builds. |
25 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
25 |
+func NewREST(registry Registry) *REST { |
|
26 | 26 |
return &REST{registry} |
27 | 27 |
} |
28 | 28 |
|
... | ... |
@@ -6,7 +6,6 @@ import ( |
6 | 6 |
"code.google.com/p/go-uuid/uuid" |
7 | 7 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
8 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
9 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
12 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -22,7 +21,7 @@ type REST struct { |
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
// NewREST creates a new REST for BuildConfig. |
25 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
25 |
+func NewREST(registry Registry) *REST { |
|
26 | 26 |
return &REST{registry} |
27 | 27 |
} |
28 | 28 |
|
... | ... |
@@ -2,13 +2,14 @@ package buildlog |
2 | 2 |
|
3 | 3 |
import ( |
4 | 4 |
"fmt" |
5 |
+ "net/http" |
|
6 |
+ "net/url" |
|
5 | 7 |
|
6 | 8 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
8 | 9 |
kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
9 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
10 | 11 |
|
11 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
12 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
12 | 13 |
"github.com/openshift/origin/pkg/build/api" |
13 | 14 |
"github.com/openshift/origin/pkg/build/registry/build" |
14 | 15 |
buildutil "github.com/openshift/origin/pkg/build/util" |
... | ... |
@@ -36,7 +37,7 @@ func (r RealPodControl) getPod(namespace, name string) (*kapi.Pod, error) { |
36 | 36 |
// NewREST creates a new REST for BuildLog |
37 | 37 |
// Takes build registry and pod client to get necessary attributes to assemble |
38 | 38 |
// URL to which the request shall be redirected in order to get build logs. |
39 |
-func NewREST(b build.Registry, pn kclient.PodsNamespacer) apiserver.RESTStorage { |
|
39 |
+func NewREST(b build.Registry, pn kclient.PodsNamespacer) *REST { |
|
40 | 40 |
return &REST{ |
41 | 41 |
BuildRegistry: b, |
42 | 42 |
PodControl: RealPodControl{pn}, |
... | ... |
@@ -44,10 +45,10 @@ func NewREST(b build.Registry, pn kclient.PodsNamespacer) apiserver.RESTStorage |
44 | 44 |
} |
45 | 45 |
|
46 | 46 |
// Redirector implementation |
47 |
-func (r *REST) ResourceLocation(ctx kapi.Context, id string) (string, error) { |
|
47 |
+func (r *REST) ResourceLocation(ctx kapi.Context, id string) (*url.URL, http.RoundTripper, error) { |
|
48 | 48 |
build, err := r.BuildRegistry.GetBuild(ctx, id) |
49 | 49 |
if err != nil { |
50 |
- return "", errors.NewFieldNotFound("Build", id) |
|
50 |
+ return nil, nil, fielderrors.NewFieldNotFound("Build", id) |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
// TODO: these must be status errors, not field errors |
... | ... |
@@ -55,7 +56,7 @@ func (r *REST) ResourceLocation(ctx kapi.Context, id string) (string, error) { |
55 | 55 |
buildPodName := buildutil.GetBuildPodName(build) |
56 | 56 |
pod, err := r.PodControl.getPod(build.Namespace, buildPodName) |
57 | 57 |
if err != nil { |
58 |
- return "", errors.NewFieldNotFound("Pod.Name", buildPodName) |
|
58 |
+ return nil, nil, fielderrors.NewFieldNotFound("Pod.Name", buildPodName) |
|
59 | 59 |
} |
60 | 60 |
|
61 | 61 |
buildPodHost := pod.Status.Host |
... | ... |
@@ -67,7 +68,7 @@ func (r *REST) ResourceLocation(ctx kapi.Context, id string) (string, error) { |
67 | 67 |
// Pod in which build take place can't be in the Pending or Unknown phase, |
68 | 68 |
// cause no containers are present in the Pod in those phases. |
69 | 69 |
if pod.Status.Phase == kapi.PodPending || pod.Status.Phase == kapi.PodUnknown { |
70 |
- return "", errors.NewFieldInvalid("Pod.Status", pod.Status.Phase, "must be Running, Succeeded or Failed") |
|
70 |
+ return nil, nil, fielderrors.NewFieldInvalid("Pod.Status", pod.Status.Phase, "must be Running, Succeeded or Failed") |
|
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
switch build.Status { |
... | ... |
@@ -76,10 +77,12 @@ func (r *REST) ResourceLocation(ctx kapi.Context, id string) (string, error) { |
76 | 76 |
case api.BuildStatusComplete, api.BuildStatusFailed: |
77 | 77 |
// Do not follow the Complete and Failed logs as the streaming already finished. |
78 | 78 |
default: |
79 |
- return "", errors.NewFieldInvalid("build.Status", build.Status, "must be Running, Complete or Failed") |
|
79 |
+ return nil, nil, fielderrors.NewFieldInvalid("build.Status", build.Status, "must be Running, Complete or Failed") |
|
80 | 80 |
} |
81 | 81 |
|
82 |
- return location, nil |
|
82 |
+ return &url.URL{ |
|
83 |
+ Host: location, |
|
84 |
+ }, nil, nil |
|
83 | 85 |
} |
84 | 86 |
|
85 | 87 |
func (r *REST) New() runtime.Object { |
... | ... |
@@ -5,7 +5,7 @@ import ( |
5 | 5 |
"testing" |
6 | 6 |
|
7 | 7 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
8 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
8 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
9 | 9 |
|
10 | 10 |
"github.com/openshift/origin/pkg/build/api" |
11 | 11 |
"github.com/openshift/origin/pkg/build/registry/test" |
... | ... |
@@ -37,11 +37,11 @@ func (p *podControl) getPod(namespace, podName string) (*kapi.Pod, error) { |
37 | 37 |
// is evaluating the outcome based only on build state. |
38 | 38 |
func TestRegistryResourceLocation(t *testing.T) { |
39 | 39 |
expectedLocations := map[api.BuildStatus]string{ |
40 |
- api.BuildStatusComplete: fmt.Sprintf("foo-host:%d/containerLogs/%s/running/foo-container", |
|
40 |
+ api.BuildStatusComplete: fmt.Sprintf("//foo-host:%d/containerLogs/%s/running/foo-container", |
|
41 | 41 |
kubernetes.NodePort, kapi.NamespaceDefault), |
42 |
- api.BuildStatusFailed: fmt.Sprintf("foo-host:%d/containerLogs/%s/running/foo-container", |
|
42 |
+ api.BuildStatusFailed: fmt.Sprintf("//foo-host:%d/containerLogs/%s/running/foo-container", |
|
43 | 43 |
kubernetes.NodePort, kapi.NamespaceDefault), |
44 |
- api.BuildStatusRunning: fmt.Sprintf("foo-host:%d/containerLogs/%s/running/foo-container?follow=1", |
|
44 |
+ api.BuildStatusRunning: fmt.Sprintf("//foo-host:%d/containerLogs/%s/running/foo-container?follow=1", |
|
45 | 45 |
kubernetes.NodePort, kapi.NamespaceDefault), |
46 | 46 |
api.BuildStatusNew: "", |
47 | 47 |
api.BuildStatusPending: "", |
... | ... |
@@ -104,9 +104,14 @@ func resourceLocationHelper(buildStatus api.BuildStatus, podPhase string, ctx ka |
104 | 104 |
expectedBuild := mockBuild(buildStatus, podPhase) |
105 | 105 |
buildRegistry := test.BuildRegistry{Build: expectedBuild} |
106 | 106 |
storage := REST{&buildRegistry, &podControl{}} |
107 |
- redirector := apiserver.Redirector(&storage) |
|
108 |
- location, err := redirector.ResourceLocation(ctx, "foo-build") |
|
109 |
- return location, err |
|
107 |
+ redirector := rest.Redirector(&storage) |
|
108 |
+ location, _, err := redirector.ResourceLocation(ctx, "foo-build") |
|
109 |
+ |
|
110 |
+ if location != nil { |
|
111 |
+ return location.String(), err |
|
112 |
+ } |
|
113 |
+ |
|
114 |
+ return "", err |
|
110 | 115 |
} |
111 | 116 |
|
112 | 117 |
func mockPod(podPhase kapi.PodPhase) *kapi.Pod { |
... | ... |
@@ -118,7 +118,7 @@ func NewCmdNewApplication(fullName string, f *clientcmd.Factory, out io.Writer) |
118 | 118 |
for _, item := range result.List.Items { |
119 | 119 |
switch t := item.(type) { |
120 | 120 |
case *kapi.Service: |
121 |
- fmt.Fprintf(os.Stderr, "Service %q created at %s:%d to talk to pods over port %d.\n", t.Name, t.Spec.PortalIP, t.Spec.Port, t.Spec.ContainerPort.IntVal) |
|
121 |
+ fmt.Fprintf(os.Stderr, "Service %q created at %s:%d to talk to pods over port %d.\n", t.Name, t.Spec.PortalIP, t.Spec.Port, t.Spec.TargetPort.IntVal) |
|
122 | 122 |
case *buildapi.BuildConfig: |
123 | 123 |
fmt.Fprintf(os.Stderr, "A build was created - you can run `osc start-build %s` to start it.\n", t.Name) |
124 | 124 |
case *imageapi.ImageRepository: |
... | ... |
@@ -5,8 +5,10 @@ import ( |
5 | 5 |
"io" |
6 | 6 |
"strings" |
7 | 7 |
|
8 |
+ kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
|
8 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta" |
9 | 10 |
cmdutil "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/util" |
11 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/resource" |
|
10 | 12 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
11 | 13 |
"github.com/golang/glog" |
12 | 14 |
"github.com/spf13/cobra" |
... | ... |
@@ -94,22 +96,25 @@ func NewCmdProcess(fullName string, f *clientcmd.Factory, out io.Writer) *cobra. |
94 | 94 |
checkErr(err) |
95 | 95 |
} |
96 | 96 |
} else { |
97 |
- schema, err := f.Validator() |
|
98 |
- checkErr(err) |
|
99 |
- cfg, err := f.ClientConfig() |
|
100 |
- checkErr(err) |
|
101 |
- var ( |
|
102 |
- ok bool |
|
103 |
- data []byte |
|
104 |
- ) |
|
105 |
- mapping, _, _, data, err = cmdutil.ResourceFromFile(filename, typer, mapper, schema, cfg.Version) |
|
106 |
- checkErr(err) |
|
107 |
- obj, err := mapping.Codec.Decode(data) |
|
97 |
+ obj, err := resource.NewBuilder(mapper, typer, f.ClientMapperForCommand(cmd)). |
|
98 |
+ NamespaceParam(namespace).RequireNamespace(). |
|
99 |
+ FilenameParam(filename). |
|
100 |
+ Do(). |
|
101 |
+ Object() |
|
102 |
+ |
|
108 | 103 |
checkErr(err) |
104 |
+ |
|
105 |
+ var ok bool |
|
109 | 106 |
templateObj, ok = obj.(*api.Template) |
110 | 107 |
if !ok { |
111 | 108 |
checkErr(fmt.Errorf("cannot convert input to Template")) |
112 | 109 |
} |
110 |
+ |
|
111 |
+ version, kind, err := kapi.Scheme.ObjectVersionAndKind(templateObj) |
|
112 |
+ checkErr(err) |
|
113 |
+ if mapping, err = mapper.RESTMapping(kind, version); err != nil { |
|
114 |
+ checkErr(err) |
|
115 |
+ } |
|
113 | 116 |
} |
114 | 117 |
|
115 | 118 |
if cmd.Flag("value").Changed { |
... | ... |
@@ -114,8 +114,8 @@ func mkPod(status kapi.PodPhase, exitCode int) *kapi.Pod { |
114 | 114 |
ObjectMeta: kapi.ObjectMeta{Name: "PodName"}, |
115 | 115 |
Status: kapi.PodStatus{ |
116 | 116 |
Phase: status, |
117 |
- Info: kapi.PodInfo{ |
|
118 |
- "container1": kapi.ContainerStatus{ |
|
117 |
+ ContainerStatuses: []kapi.ContainerStatus{ |
|
118 |
+ { |
|
119 | 119 |
State: kapi.ContainerState{ |
120 | 120 |
Termination: &kapi.ContainerStateTerminated{ExitCode: exitCode}, |
121 | 121 |
}, |
... | ... |
@@ -111,7 +111,7 @@ func NewCmdBuildChain(f *clientcmd.Factory, parentName, name string) *cobra.Comm |
111 | 111 |
} |
112 | 112 |
namespaces := make([]string, 0) |
113 | 113 |
if all { |
114 |
- nsList, err := kc.Namespaces().List(labels.Everything()) |
|
114 |
+ nsList, err := kc.Namespaces().List(labels.Everything(), fields.Everything()) |
|
115 | 115 |
checkErr(err) |
116 | 116 |
for _, ns := range nsList.Items { |
117 | 117 |
namespaces = append(namespaces, ns.Name) |
... | ... |
@@ -716,9 +716,9 @@ func expectedService(name string, port int, proto kapi.Protocol) map[string]kapi |
716 | 716 |
Name: name, |
717 | 717 |
}, |
718 | 718 |
Spec: kapi.ServiceSpec{ |
719 |
- Port: port, |
|
720 |
- Protocol: proto, |
|
721 |
- ContainerPort: util.NewIntOrStringFromInt(port), |
|
719 |
+ Port: port, |
|
720 |
+ Protocol: proto, |
|
721 |
+ TargetPort: util.NewIntOrStringFromInt(port), |
|
722 | 722 |
Selector: map[string]string{ |
723 | 723 |
"deploymentconfig": name, |
724 | 724 |
}, |
... | ... |
@@ -4,9 +4,10 @@ import ( |
4 | 4 |
"io/ioutil" |
5 | 5 |
"path" |
6 | 6 |
|
7 |
- "github.com/ghodss/yaml" |
|
8 |
- |
|
7 |
+ kyaml "github.com/GoogleCloudPlatform/kubernetes/pkg/util/yaml" |
|
9 | 8 |
configapi "github.com/openshift/origin/pkg/cmd/server/api" |
9 |
+ |
|
10 |
+ "github.com/ghodss/yaml" |
|
10 | 11 |
) |
11 | 12 |
|
12 | 13 |
func ReadMasterConfig(filename string) (*configapi.MasterConfig, error) { |
... | ... |
@@ -16,6 +17,10 @@ func ReadMasterConfig(filename string) (*configapi.MasterConfig, error) { |
16 | 16 |
} |
17 | 17 |
|
18 | 18 |
config := &configapi.MasterConfig{} |
19 |
+ data, err = kyaml.ToJSON(data) |
|
20 |
+ if err != nil { |
|
21 |
+ return nil, err |
|
22 |
+ } |
|
19 | 23 |
|
20 | 24 |
if err := Codec.DecodeInto(data, config); err != nil { |
21 | 25 |
return nil, err |
... | ... |
@@ -39,9 +44,10 @@ func WriteNode(config *configapi.NodeConfig) ([]byte, error) { |
39 | 39 |
if err != nil { |
40 | 40 |
return nil, err |
41 | 41 |
} |
42 |
+ |
|
42 | 43 |
content, err := yaml.JSONToYAML(json) |
43 | 44 |
if err != nil { |
44 | 45 |
return nil, err |
45 | 46 |
} |
46 |
- return content, nil |
|
47 |
+ return content, err |
|
47 | 48 |
} |
... | ... |
@@ -6,60 +6,60 @@ import ( |
6 | 6 |
"os" |
7 | 7 |
"strings" |
8 | 8 |
|
9 |
- errs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
10 | 9 |
kvalidation "github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation" |
10 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
11 | 11 |
|
12 | 12 |
"github.com/openshift/origin/pkg/cmd/server/api" |
13 | 13 |
) |
14 | 14 |
|
15 |
-func ValidateBindAddress(bindAddress string) errs.ValidationErrorList { |
|
16 |
- allErrs := errs.ValidationErrorList{} |
|
15 |
+func ValidateBindAddress(bindAddress string) fielderrors.ValidationErrorList { |
|
16 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
17 | 17 |
|
18 | 18 |
if len(bindAddress) == 0 { |
19 |
- allErrs = append(allErrs, errs.NewFieldRequired("bindAddress")) |
|
19 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("bindAddress")) |
|
20 | 20 |
} else if _, _, err := net.SplitHostPort(bindAddress); err != nil { |
21 |
- allErrs = append(allErrs, errs.NewFieldInvalid("bindAddress", bindAddress, "must be a host:port")) |
|
21 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("bindAddress", bindAddress, "must be a host:port")) |
|
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
return allErrs |
25 | 25 |
} |
26 | 26 |
|
27 |
-func ValidateServingInfo(info api.ServingInfo) errs.ValidationErrorList { |
|
28 |
- allErrs := errs.ValidationErrorList{} |
|
27 |
+func ValidateServingInfo(info api.ServingInfo) fielderrors.ValidationErrorList { |
|
28 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
29 | 29 |
|
30 | 30 |
allErrs = append(allErrs, ValidateBindAddress(info.BindAddress)...) |
31 | 31 |
|
32 | 32 |
if len(info.ServerCert.CertFile) > 0 { |
33 | 33 |
if _, err := os.Stat(info.ServerCert.CertFile); err != nil { |
34 |
- allErrs = append(allErrs, errs.NewFieldInvalid("certFile", info.ServerCert.CertFile, "could not read file")) |
|
34 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("certFile", info.ServerCert.CertFile, "could not read file")) |
|
35 | 35 |
} |
36 | 36 |
|
37 | 37 |
if len(info.ServerCert.KeyFile) == 0 { |
38 |
- allErrs = append(allErrs, errs.NewFieldRequired("keyFile")) |
|
38 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("keyFile")) |
|
39 | 39 |
} else if _, err := os.Stat(info.ServerCert.KeyFile); err != nil { |
40 |
- allErrs = append(allErrs, errs.NewFieldInvalid("keyFile", info.ServerCert.KeyFile, "could not read file")) |
|
40 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("keyFile", info.ServerCert.KeyFile, "could not read file")) |
|
41 | 41 |
} |
42 | 42 |
|
43 | 43 |
if len(info.ClientCA) > 0 { |
44 | 44 |
if _, err := os.Stat(info.ClientCA); err != nil { |
45 |
- allErrs = append(allErrs, errs.NewFieldInvalid("clientCA", info.ClientCA, "could not read file")) |
|
45 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("clientCA", info.ClientCA, "could not read file")) |
|
46 | 46 |
} |
47 | 47 |
} |
48 | 48 |
} else { |
49 | 49 |
if len(info.ServerCert.KeyFile) > 0 { |
50 |
- allErrs = append(allErrs, errs.NewFieldInvalid("keyFile", info.ServerCert.KeyFile, "cannot specify a keyFile without a certFile")) |
|
50 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("keyFile", info.ServerCert.KeyFile, "cannot specify a keyFile without a certFile")) |
|
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
if len(info.ClientCA) > 0 { |
54 |
- allErrs = append(allErrs, errs.NewFieldInvalid("clientCA", info.ClientCA, "cannot specify a clientCA without a certFile")) |
|
54 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("clientCA", info.ClientCA, "cannot specify a clientCA without a certFile")) |
|
55 | 55 |
} |
56 | 56 |
} |
57 | 57 |
|
58 | 58 |
return allErrs |
59 | 59 |
} |
60 | 60 |
|
61 |
-func ValidateKubeConfig(path string, field string) errs.ValidationErrorList { |
|
62 |
- allErrs := errs.ValidationErrorList{} |
|
61 |
+func ValidateKubeConfig(path string, field string) fielderrors.ValidationErrorList { |
|
62 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
63 | 63 |
|
64 | 64 |
allErrs = append(allErrs, ValidateFile(path, field)...) |
65 | 65 |
// TODO: load and parse |
... | ... |
@@ -67,8 +67,8 @@ func ValidateKubeConfig(path string, field string) errs.ValidationErrorList { |
67 | 67 |
return allErrs |
68 | 68 |
} |
69 | 69 |
|
70 |
-func ValidateKubernetesMasterConfig(config *api.KubernetesMasterConfig) errs.ValidationErrorList { |
|
71 |
- allErrs := errs.ValidationErrorList{} |
|
70 |
+func ValidateKubernetesMasterConfig(config *api.KubernetesMasterConfig) fielderrors.ValidationErrorList { |
|
71 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
72 | 72 |
|
73 | 73 |
if len(config.MasterIP) > 0 { |
74 | 74 |
allErrs = append(allErrs, ValidateSpecifiedIP(config.MasterIP, "masterIP")...) |
... | ... |
@@ -76,7 +76,7 @@ func ValidateKubernetesMasterConfig(config *api.KubernetesMasterConfig) errs.Val |
76 | 76 |
|
77 | 77 |
if len(config.ServicesSubnet) > 0 { |
78 | 78 |
if _, _, err := net.ParseCIDR(strings.TrimSpace(config.ServicesSubnet)); err != nil { |
79 |
- allErrs = append(allErrs, errs.NewFieldInvalid("servicesSubnet", config.ServicesSubnet, "must be a valid CIDR notation IP range (e.g. 172.30.17.0/24)")) |
|
79 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("servicesSubnet", config.ServicesSubnet, "must be a valid CIDR notation IP range (e.g. 172.30.17.0/24)")) |
|
80 | 80 |
} |
81 | 81 |
} |
82 | 82 |
|
... | ... |
@@ -87,38 +87,38 @@ func ValidateKubernetesMasterConfig(config *api.KubernetesMasterConfig) errs.Val |
87 | 87 |
return allErrs |
88 | 88 |
} |
89 | 89 |
|
90 |
-func ValidateSpecifiedIP(ipString string, field string) errs.ValidationErrorList { |
|
91 |
- allErrs := errs.ValidationErrorList{} |
|
90 |
+func ValidateSpecifiedIP(ipString string, field string) fielderrors.ValidationErrorList { |
|
91 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
92 | 92 |
|
93 | 93 |
ip := net.ParseIP(ipString) |
94 | 94 |
if ip == nil { |
95 |
- allErrs = append(allErrs, errs.NewFieldInvalid(field, ipString, "must be a valid IP")) |
|
95 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid(field, ipString, "must be a valid IP")) |
|
96 | 96 |
} else if ip.IsUnspecified() { |
97 |
- allErrs = append(allErrs, errs.NewFieldInvalid(field, ipString, "cannot be an unspecified IP")) |
|
97 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid(field, ipString, "cannot be an unspecified IP")) |
|
98 | 98 |
} |
99 | 99 |
|
100 | 100 |
return allErrs |
101 | 101 |
} |
102 | 102 |
|
103 |
-func ValidateURL(urlString string, field string) (*url.URL, errs.ValidationErrorList) { |
|
104 |
- allErrs := errs.ValidationErrorList{} |
|
103 |
+func ValidateURL(urlString string, field string) (*url.URL, fielderrors.ValidationErrorList) { |
|
104 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
105 | 105 |
|
106 | 106 |
urlObj, err := url.Parse(urlString) |
107 | 107 |
if err != nil { |
108 |
- allErrs = append(allErrs, errs.NewFieldInvalid(field, urlString, "must be a valid URL")) |
|
108 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid(field, urlString, "must be a valid URL")) |
|
109 | 109 |
return nil, allErrs |
110 | 110 |
} |
111 | 111 |
if len(urlObj.Scheme) == 0 { |
112 |
- allErrs = append(allErrs, errs.NewFieldInvalid(field, urlString, "must contain a scheme (e.g. http://)")) |
|
112 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid(field, urlString, "must contain a scheme (e.g. http://)")) |
|
113 | 113 |
} |
114 | 114 |
if len(urlObj.Host) == 0 { |
115 |
- allErrs = append(allErrs, errs.NewFieldInvalid(field, urlString, "must contain a host")) |
|
115 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid(field, urlString, "must contain a host")) |
|
116 | 116 |
} |
117 | 117 |
return urlObj, allErrs |
118 | 118 |
} |
119 | 119 |
|
120 |
-func ValidateAssetConfig(config *api.AssetConfig) errs.ValidationErrorList { |
|
121 |
- allErrs := errs.ValidationErrorList{} |
|
120 |
+func ValidateAssetConfig(config *api.AssetConfig) fielderrors.ValidationErrorList { |
|
121 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
122 | 122 |
|
123 | 123 |
allErrs = append(allErrs, ValidateServingInfo(config.ServingInfo).Prefix("servingInfo")...) |
124 | 124 |
|
... | ... |
@@ -128,15 +128,15 @@ func ValidateAssetConfig(config *api.AssetConfig) errs.ValidationErrorList { |
128 | 128 |
} |
129 | 129 |
if urlObj != nil { |
130 | 130 |
if !strings.HasSuffix(urlObj.Path, "/") { |
131 |
- allErrs = append(allErrs, errs.NewFieldInvalid("publicURL", config.PublicURL, "must have a trailing slash in path")) |
|
131 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("publicURL", config.PublicURL, "must have a trailing slash in path")) |
|
132 | 132 |
} |
133 | 133 |
} |
134 | 134 |
|
135 | 135 |
return allErrs |
136 | 136 |
} |
137 | 137 |
|
138 |
-func ValidateMasterConfig(config *api.MasterConfig) errs.ValidationErrorList { |
|
139 |
- allErrs := errs.ValidationErrorList{} |
|
138 |
+func ValidateMasterConfig(config *api.MasterConfig) fielderrors.ValidationErrorList { |
|
139 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
140 | 140 |
|
141 | 141 |
allErrs = append(allErrs, ValidateServingInfo(config.ServingInfo).Prefix("servingInfo")...) |
142 | 142 |
|
... | ... |
@@ -146,14 +146,14 @@ func ValidateMasterConfig(config *api.MasterConfig) errs.ValidationErrorList { |
146 | 146 |
if colocated { |
147 | 147 |
publicURL, _ := url.Parse(config.AssetConfig.PublicURL) |
148 | 148 |
if publicURL.Path == "/" { |
149 |
- allErrs = append(allErrs, errs.NewFieldInvalid("assetConfig.publicURL", config.AssetConfig.PublicURL, "path can not be / when colocated with master API")) |
|
149 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("assetConfig.publicURL", config.AssetConfig.PublicURL, "path can not be / when colocated with master API")) |
|
150 | 150 |
} |
151 | 151 |
} |
152 | 152 |
|
153 | 153 |
if config.OAuthConfig != nil && config.OAuthConfig.AssetPublicURL != config.AssetConfig.PublicURL { |
154 | 154 |
allErrs = append(allErrs, |
155 |
- errs.NewFieldInvalid("assetConfig.publicURL", config.AssetConfig.PublicURL, "must match oauthConfig.assetPublicURL"), |
|
156 |
- errs.NewFieldInvalid("oauthConfig.assetPublicURL", config.OAuthConfig.AssetPublicURL, "must match assetConfig.publicURL"), |
|
155 |
+ fielderrors.NewFieldInvalid("assetConfig.publicURL", config.AssetConfig.PublicURL, "must match oauthConfig.assetPublicURL"), |
|
156 |
+ fielderrors.NewFieldInvalid("oauthConfig.assetPublicURL", config.OAuthConfig.AssetPublicURL, "must match assetConfig.publicURL"), |
|
157 | 157 |
) |
158 | 158 |
} |
159 | 159 |
|
... | ... |
@@ -178,8 +178,8 @@ func ValidateMasterConfig(config *api.MasterConfig) errs.ValidationErrorList { |
178 | 178 |
return allErrs |
179 | 179 |
} |
180 | 180 |
|
181 |
-func ValidatePolicyConfig(config api.PolicyConfig) errs.ValidationErrorList { |
|
182 |
- allErrs := errs.ValidationErrorList{} |
|
181 |
+func ValidatePolicyConfig(config api.PolicyConfig) fielderrors.ValidationErrorList { |
|
182 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
183 | 183 |
|
184 | 184 |
allErrs = append(allErrs, ValidateFile(config.BootstrapPolicyFile, "bootstrapPolicyFile")...) |
185 | 185 |
allErrs = append(allErrs, ValidateNamespace(config.MasterAuthorizationNamespace, "masterAuthorizationNamespace")...) |
... | ... |
@@ -188,23 +188,23 @@ func ValidatePolicyConfig(config api.PolicyConfig) errs.ValidationErrorList { |
188 | 188 |
return allErrs |
189 | 189 |
} |
190 | 190 |
|
191 |
-func ValidateNamespace(namespace, field string) errs.ValidationErrorList { |
|
192 |
- allErrs := errs.ValidationErrorList{} |
|
191 |
+func ValidateNamespace(namespace, field string) fielderrors.ValidationErrorList { |
|
192 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
193 | 193 |
|
194 | 194 |
if len(namespace) == 0 { |
195 |
- allErrs = append(allErrs, errs.NewFieldRequired(field)) |
|
195 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired(field)) |
|
196 | 196 |
} else if ok, _ := kvalidation.ValidateNamespaceName(namespace, false); !ok { |
197 |
- allErrs = append(allErrs, errs.NewFieldInvalid(field, namespace, "must be a valid namespace")) |
|
197 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid(field, namespace, "must be a valid namespace")) |
|
198 | 198 |
} |
199 | 199 |
|
200 | 200 |
return allErrs |
201 | 201 |
} |
202 | 202 |
|
203 |
-func ValidateNodeConfig(config *api.NodeConfig) errs.ValidationErrorList { |
|
204 |
- allErrs := errs.ValidationErrorList{} |
|
203 |
+func ValidateNodeConfig(config *api.NodeConfig) fielderrors.ValidationErrorList { |
|
204 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
205 | 205 |
|
206 | 206 |
if len(config.NodeName) == 0 { |
207 |
- allErrs = append(allErrs, errs.NewFieldRequired("nodeName")) |
|
207 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("nodeName")) |
|
208 | 208 |
} |
209 | 209 |
|
210 | 210 |
allErrs = append(allErrs, ValidateServingInfo(config.ServingInfo).Prefix("servingInfo")...) |
... | ... |
@@ -215,26 +215,26 @@ func ValidateNodeConfig(config *api.NodeConfig) errs.ValidationErrorList { |
215 | 215 |
} |
216 | 216 |
|
217 | 217 |
if len(config.NetworkContainerImage) == 0 { |
218 |
- allErrs = append(allErrs, errs.NewFieldRequired("networkContainerImage")) |
|
218 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("networkContainerImage")) |
|
219 | 219 |
} |
220 | 220 |
|
221 | 221 |
return allErrs |
222 | 222 |
} |
223 | 223 |
|
224 |
-func ValidateFile(path string, field string) errs.ValidationErrorList { |
|
225 |
- allErrs := errs.ValidationErrorList{} |
|
224 |
+func ValidateFile(path string, field string) fielderrors.ValidationErrorList { |
|
225 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
226 | 226 |
|
227 | 227 |
if len(path) == 0 { |
228 |
- allErrs = append(allErrs, errs.NewFieldRequired(field)) |
|
228 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired(field)) |
|
229 | 229 |
} else if _, err := os.Stat(path); err != nil { |
230 |
- allErrs = append(allErrs, errs.NewFieldInvalid(field, path, "could not read file")) |
|
230 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid(field, path, "could not read file")) |
|
231 | 231 |
} |
232 | 232 |
|
233 | 233 |
return allErrs |
234 | 234 |
} |
235 | 235 |
|
236 |
-func ValidateAllInOneConfig(master *api.MasterConfig, node *api.NodeConfig) errs.ValidationErrorList { |
|
237 |
- allErrs := errs.ValidationErrorList{} |
|
236 |
+func ValidateAllInOneConfig(master *api.MasterConfig, node *api.NodeConfig) fielderrors.ValidationErrorList { |
|
237 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
238 | 238 |
|
239 | 239 |
allErrs = append(allErrs, ValidateMasterConfig(master).Prefix("masterConfig")...) |
240 | 240 |
|
... | ... |
@@ -131,7 +131,8 @@ func (c *MasterConfig) RunMinionController() { |
131 | 131 |
if err != nil { |
132 | 132 |
glog.Fatalf("Failure to create kubelet client: %v", err) |
133 | 133 |
} |
134 |
- minionController := minioncontroller.NewNodeController(nil, "", c.NodeHosts, nodeResources, c.KubeClient, kubeletClient, 10, 5*time.Minute) |
|
134 |
+ |
|
135 |
+ minionController := minioncontroller.NewNodeController(nil, "", c.NodeHosts, nodeResources, c.KubeClient, kubeletClient, nil, 10, 5*time.Minute) |
|
135 | 136 |
minionController.Run(10*time.Second, true, true) |
136 | 137 |
|
137 | 138 |
glog.Infof("Started Kubernetes Minion Controller") |
... | ... |
@@ -123,7 +123,7 @@ func (c *NodeConfig) RunKubelet() { |
123 | 123 |
// Allow privileged containers |
124 | 124 |
// TODO: make this configurable and not the default https://github.com/openshift/origin/issues/662 |
125 | 125 |
recorder := record.FromSource(kapi.EventSource{Component: "kubelet", Host: c.NodeHost}) |
126 |
- kubelet.SetupCapabilities(true) |
|
126 |
+ kubelet.SetupCapabilities(true, []string{}) |
|
127 | 127 |
cfg := kconfig.NewPodConfig(kconfig.PodConfigNotificationSnapshotAndUpdates, recorder) |
128 | 128 |
kconfig.NewSourceApiserver(c.Client, c.NodeHost, cfg.Channel("api")) |
129 | 129 |
gcPolicy := kubelet.ContainerGCPolicy{ |
... | ... |
@@ -156,10 +156,8 @@ func (c *NodeConfig) RunKubelet() { |
156 | 156 |
5*time.Minute, |
157 | 157 |
recorder, |
158 | 158 |
cadvisorInterface, |
159 |
- 20*time.Second, |
|
160 |
- 1*time.Minute, |
|
161 | 159 |
imageGCPolicy, |
162 |
- ) |
|
160 |
+ nil) |
|
163 | 161 |
if err != nil { |
164 | 162 |
glog.Fatalf("Couldn't run kubelet: %s", err) |
165 | 163 |
} |
... | ... |
@@ -23,6 +23,7 @@ import ( |
23 | 23 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
24 | 24 |
kapierror "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
25 | 25 |
klatest "github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest" |
26 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
26 | 27 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
27 | 28 |
kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
28 | 29 |
kmaster "github.com/GoogleCloudPlatform/kubernetes/pkg/master" |
... | ... |
@@ -178,7 +179,7 @@ func (c *MasterConfig) InstallProtectedAPI(container *restful.Container) []strin |
178 | 178 |
} |
179 | 179 |
|
180 | 180 |
// initialize OpenShift API |
181 |
- storage := map[string]apiserver.RESTStorage{ |
|
181 |
+ storage := map[string]rest.Storage{ |
|
182 | 182 |
"builds": buildregistry.NewREST(buildEtcd), |
183 | 183 |
"builds/clone": buildClone, |
184 | 184 |
"buildConfigs": buildconfigregistry.NewREST(buildEtcd), |
... | ... |
@@ -6,7 +6,6 @@ import ( |
6 | 6 |
"net/url" |
7 | 7 |
"strconv" |
8 | 8 |
|
9 |
- "github.com/ghodss/yaml" |
|
10 | 9 |
"github.com/spf13/pflag" |
11 | 10 |
|
12 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
... | ... |
@@ -17,6 +16,8 @@ import ( |
17 | 17 |
latestconfigapi "github.com/openshift/origin/pkg/cmd/server/api/latest" |
18 | 18 |
"github.com/openshift/origin/pkg/cmd/server/bootstrappolicy" |
19 | 19 |
cmdutil "github.com/openshift/origin/pkg/cmd/util" |
20 |
+ |
|
21 |
+ "github.com/ghodss/yaml" |
|
20 | 22 |
) |
21 | 23 |
|
22 | 24 |
// MasterArgs is a struct that the command stores flag values into. It holds a partially complete set of parameters for starting the master |
... | ... |
@@ -385,7 +386,6 @@ func (args MasterArgs) GetEtcdAddress() (*url.URL, error) { |
385 | 385 |
etcdAddr := net.JoinHostPort(getHost(*masterAddr), strconv.Itoa(args.EtcdAddr.DefaultPort)) |
386 | 386 |
return url.Parse(args.EtcdAddr.DefaultScheme + "://" + etcdAddr) |
387 | 387 |
} |
388 |
- |
|
389 | 388 |
func (args MasterArgs) GetKubernetesPublicAddress() (*url.URL, error) { |
390 | 389 |
if args.KubernetesPublicAddr.Provided { |
391 | 390 |
return args.KubernetesPublicAddr.URL, nil |
... | ... |
@@ -444,9 +444,10 @@ func WriteMaster(config *configapi.MasterConfig) ([]byte, error) { |
444 | 444 |
if err != nil { |
445 | 445 |
return nil, err |
446 | 446 |
} |
447 |
+ |
|
447 | 448 |
content, err := yaml.JSONToYAML(json) |
448 | 449 |
if err != nil { |
449 | 450 |
return nil, err |
450 | 451 |
} |
451 |
- return content, nil |
|
452 |
+ return content, err |
|
452 | 453 |
} |
... | ... |
@@ -9,7 +9,6 @@ import ( |
9 | 9 |
"strings" |
10 | 10 |
|
11 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/master/ports" |
12 |
- "github.com/ghodss/yaml" |
|
13 | 12 |
"github.com/golang/glog" |
14 | 13 |
"github.com/spf13/pflag" |
15 | 14 |
|
... | ... |
@@ -110,11 +109,7 @@ func WriteNode(config *configapi.NodeConfig) ([]byte, error) { |
110 | 110 |
if err != nil { |
111 | 111 |
return nil, err |
112 | 112 |
} |
113 |
- content, err := yaml.JSONToYAML(json) |
|
114 |
- if err != nil { |
|
115 |
- return nil, err |
|
116 |
- } |
|
117 |
- return content, nil |
|
113 |
+ return json, err |
|
118 | 114 |
} |
119 | 115 |
|
120 | 116 |
// defaultHostname returns the default hostname for this system. |
... | ... |
@@ -20,6 +20,7 @@ import ( |
20 | 20 |
_ "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/admit" |
21 | 21 |
_ "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/limitranger" |
22 | 22 |
_ "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/namespace/exists" |
23 |
+ _ "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/namespace/lifecycle" |
|
23 | 24 |
_ "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/resourcedefaults" |
24 | 25 |
_ "github.com/GoogleCloudPlatform/kubernetes/plugin/pkg/admission/resourcequota" |
25 | 26 |
) |
... | ... |
@@ -16,6 +16,7 @@ import ( |
16 | 16 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities" |
17 | 17 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record" |
18 | 18 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
19 |
+ kyaml "github.com/GoogleCloudPlatform/kubernetes/pkg/util/yaml" |
|
19 | 20 |
|
20 | 21 |
"github.com/openshift/origin/pkg/cmd/server/admin" |
21 | 22 |
configapi "github.com/openshift/origin/pkg/cmd/server/api" |
... | ... |
@@ -277,7 +278,7 @@ func ReadMasterConfig(filename string) (*configapi.MasterConfig, error) { |
277 | 277 |
} |
278 | 278 |
|
279 | 279 |
config := &configapi.MasterConfig{} |
280 |
- |
|
280 |
+ data, err = kyaml.ToJSON(data) |
|
281 | 281 |
if err := configapilatest.Codec.DecodeInto(data, config); err != nil { |
282 | 282 |
return nil, err |
283 | 283 |
} |
... | ... |
@@ -1,9 +1,9 @@ |
1 | 1 |
package validation |
2 | 2 |
|
3 | 3 |
import ( |
4 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
5 | 4 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation" |
6 | 5 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
6 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
7 | 7 |
|
8 | 8 |
deployapi "github.com/openshift/origin/pkg/deploy/api" |
9 | 9 |
) |
... | ... |
@@ -12,34 +12,34 @@ import ( |
12 | 12 |
// The upstream validation API isn't factored currently to allow this; we'll make a PR to |
13 | 13 |
// upstream and fix when it goes in. |
14 | 14 |
|
15 |
-func ValidateDeployment(deployment *deployapi.Deployment) errors.ValidationErrorList { |
|
15 |
+func ValidateDeployment(deployment *deployapi.Deployment) fielderrors.ValidationErrorList { |
|
16 | 16 |
errs := validateDeploymentStrategy(&deployment.Strategy).Prefix("strategy") |
17 | 17 |
if len(deployment.Name) == 0 { |
18 |
- errs = append(errs, errors.NewFieldRequired("name")) |
|
18 |
+ errs = append(errs, fielderrors.NewFieldRequired("name")) |
|
19 | 19 |
} else if !util.IsDNS1123Subdomain(deployment.Name) { |
20 |
- errs = append(errs, errors.NewFieldInvalid("name", deployment.Name, "name must be a valid subdomain")) |
|
20 |
+ errs = append(errs, fielderrors.NewFieldInvalid("name", deployment.Name, "name must be a valid subdomain")) |
|
21 | 21 |
} |
22 | 22 |
if len(deployment.Namespace) == 0 { |
23 |
- errs = append(errs, errors.NewFieldRequired("namespace")) |
|
23 |
+ errs = append(errs, fielderrors.NewFieldRequired("namespace")) |
|
24 | 24 |
} else if !util.IsDNS1123Subdomain(deployment.Namespace) { |
25 |
- errs = append(errs, errors.NewFieldInvalid("namespace", deployment.Namespace, "namespace must be a valid subdomain")) |
|
25 |
+ errs = append(errs, fielderrors.NewFieldInvalid("namespace", deployment.Namespace, "namespace must be a valid subdomain")) |
|
26 | 26 |
} |
27 | 27 |
errs = append(errs, validation.ValidateLabels(deployment.Labels, "labels")...) |
28 | 28 |
errs = append(errs, validation.ValidateReplicationControllerSpec(&deployment.ControllerTemplate).Prefix("controllerTemplate")...) |
29 | 29 |
return errs |
30 | 30 |
} |
31 | 31 |
|
32 |
-func ValidateDeploymentConfig(config *deployapi.DeploymentConfig) errors.ValidationErrorList { |
|
33 |
- errs := errors.ValidationErrorList{} |
|
32 |
+func ValidateDeploymentConfig(config *deployapi.DeploymentConfig) fielderrors.ValidationErrorList { |
|
33 |
+ errs := fielderrors.ValidationErrorList{} |
|
34 | 34 |
if len(config.Name) == 0 { |
35 |
- errs = append(errs, errors.NewFieldRequired("name")) |
|
35 |
+ errs = append(errs, fielderrors.NewFieldRequired("name")) |
|
36 | 36 |
} else if !util.IsDNS1123Subdomain(config.Name) { |
37 |
- errs = append(errs, errors.NewFieldInvalid("name", config.Name, "name must be a valid subdomain")) |
|
37 |
+ errs = append(errs, fielderrors.NewFieldInvalid("name", config.Name, "name must be a valid subdomain")) |
|
38 | 38 |
} |
39 | 39 |
if len(config.Namespace) == 0 { |
40 |
- errs = append(errs, errors.NewFieldRequired("namespace")) |
|
40 |
+ errs = append(errs, fielderrors.NewFieldRequired("namespace")) |
|
41 | 41 |
} else if !util.IsDNS1123Subdomain(config.Namespace) { |
42 |
- errs = append(errs, errors.NewFieldInvalid("namespace", config.Namespace, "namespace must be a valid subdomain")) |
|
42 |
+ errs = append(errs, fielderrors.NewFieldInvalid("namespace", config.Namespace, "namespace must be a valid subdomain")) |
|
43 | 43 |
} |
44 | 44 |
errs = append(errs, validation.ValidateLabels(config.Labels, "labels")...) |
45 | 45 |
|
... | ... |
@@ -51,11 +51,11 @@ func ValidateDeploymentConfig(config *deployapi.DeploymentConfig) errors.Validat |
51 | 51 |
return errs |
52 | 52 |
} |
53 | 53 |
|
54 |
-func ValidateDeploymentConfigRollback(rollback *deployapi.DeploymentConfigRollback) errors.ValidationErrorList { |
|
55 |
- result := errors.ValidationErrorList{} |
|
54 |
+func ValidateDeploymentConfigRollback(rollback *deployapi.DeploymentConfigRollback) fielderrors.ValidationErrorList { |
|
55 |
+ result := fielderrors.ValidationErrorList{} |
|
56 | 56 |
|
57 | 57 |
if len(rollback.Spec.From.Name) == 0 { |
58 |
- result = append(result, errors.NewFieldRequired("spec.from.name")) |
|
58 |
+ result = append(result, fielderrors.NewFieldRequired("spec.from.name")) |
|
59 | 59 |
} |
60 | 60 |
|
61 | 61 |
if len(rollback.Spec.From.Kind) == 0 { |
... | ... |
@@ -63,23 +63,23 @@ func ValidateDeploymentConfigRollback(rollback *deployapi.DeploymentConfigRollba |
63 | 63 |
} |
64 | 64 |
|
65 | 65 |
if rollback.Spec.From.Kind != "ReplicationController" { |
66 |
- result = append(result, errors.NewFieldInvalid("spec.from.kind", rollback.Spec.From.Kind, "the kind of the rollback target must be 'ReplicationController'")) |
|
66 |
+ result = append(result, fielderrors.NewFieldInvalid("spec.from.kind", rollback.Spec.From.Kind, "the kind of the rollback target must be 'ReplicationController'")) |
|
67 | 67 |
} |
68 | 68 |
|
69 | 69 |
return result |
70 | 70 |
} |
71 | 71 |
|
72 |
-func validateDeploymentStrategy(strategy *deployapi.DeploymentStrategy) errors.ValidationErrorList { |
|
73 |
- errs := errors.ValidationErrorList{} |
|
72 |
+func validateDeploymentStrategy(strategy *deployapi.DeploymentStrategy) fielderrors.ValidationErrorList { |
|
73 |
+ errs := fielderrors.ValidationErrorList{} |
|
74 | 74 |
|
75 | 75 |
if len(strategy.Type) == 0 { |
76 |
- errs = append(errs, errors.NewFieldRequired("type")) |
|
76 |
+ errs = append(errs, fielderrors.NewFieldRequired("type")) |
|
77 | 77 |
} |
78 | 78 |
|
79 | 79 |
switch strategy.Type { |
80 | 80 |
case deployapi.DeploymentStrategyTypeCustom: |
81 | 81 |
if strategy.CustomParams == nil { |
82 |
- errs = append(errs, errors.NewFieldRequired("customParams")) |
|
82 |
+ errs = append(errs, fielderrors.NewFieldRequired("customParams")) |
|
83 | 83 |
} else { |
84 | 84 |
errs = append(errs, validateCustomParams(strategy.CustomParams).Prefix("customParams")...) |
85 | 85 |
} |
... | ... |
@@ -88,26 +88,26 @@ func validateDeploymentStrategy(strategy *deployapi.DeploymentStrategy) errors.V |
88 | 88 |
return errs |
89 | 89 |
} |
90 | 90 |
|
91 |
-func validateCustomParams(params *deployapi.CustomDeploymentStrategyParams) errors.ValidationErrorList { |
|
92 |
- errs := errors.ValidationErrorList{} |
|
91 |
+func validateCustomParams(params *deployapi.CustomDeploymentStrategyParams) fielderrors.ValidationErrorList { |
|
92 |
+ errs := fielderrors.ValidationErrorList{} |
|
93 | 93 |
|
94 | 94 |
if len(params.Image) == 0 { |
95 |
- errs = append(errs, errors.NewFieldRequired("image")) |
|
95 |
+ errs = append(errs, fielderrors.NewFieldRequired("image")) |
|
96 | 96 |
} |
97 | 97 |
|
98 | 98 |
return errs |
99 | 99 |
} |
100 | 100 |
|
101 |
-func validateTrigger(trigger *deployapi.DeploymentTriggerPolicy) errors.ValidationErrorList { |
|
102 |
- errs := errors.ValidationErrorList{} |
|
101 |
+func validateTrigger(trigger *deployapi.DeploymentTriggerPolicy) fielderrors.ValidationErrorList { |
|
102 |
+ errs := fielderrors.ValidationErrorList{} |
|
103 | 103 |
|
104 | 104 |
if len(trigger.Type) == 0 { |
105 |
- errs = append(errs, errors.NewFieldRequired("type")) |
|
105 |
+ errs = append(errs, fielderrors.NewFieldRequired("type")) |
|
106 | 106 |
} |
107 | 107 |
|
108 | 108 |
if trigger.Type == deployapi.DeploymentTriggerOnImageChange { |
109 | 109 |
if trigger.ImageChangeParams == nil { |
110 |
- errs = append(errs, errors.NewFieldRequired("imageChangeParams")) |
|
110 |
+ errs = append(errs, fielderrors.NewFieldRequired("imageChangeParams")) |
|
111 | 111 |
} else { |
112 | 112 |
errs = append(errs, validateImageChangeParams(trigger.ImageChangeParams).Prefix("imageChangeParams")...) |
113 | 113 |
} |
... | ... |
@@ -116,35 +116,35 @@ func validateTrigger(trigger *deployapi.DeploymentTriggerPolicy) errors.Validati |
116 | 116 |
return errs |
117 | 117 |
} |
118 | 118 |
|
119 |
-func validateImageChangeParams(params *deployapi.DeploymentTriggerImageChangeParams) errors.ValidationErrorList { |
|
120 |
- errs := errors.ValidationErrorList{} |
|
119 |
+func validateImageChangeParams(params *deployapi.DeploymentTriggerImageChangeParams) fielderrors.ValidationErrorList { |
|
120 |
+ errs := fielderrors.ValidationErrorList{} |
|
121 | 121 |
|
122 | 122 |
if len(params.From.Name) != 0 { |
123 | 123 |
if len(params.From.Kind) == 0 { |
124 | 124 |
params.From.Kind = "ImageRepository" |
125 | 125 |
} |
126 | 126 |
if params.From.Kind != "ImageRepository" { |
127 |
- errs = append(errs, errors.NewFieldInvalid("from.kind", params.From.Kind, "only 'ImageRepository' is allowed")) |
|
127 |
+ errs = append(errs, fielderrors.NewFieldInvalid("from.kind", params.From.Kind, "only 'ImageRepository' is allowed")) |
|
128 | 128 |
} |
129 | 129 |
|
130 | 130 |
if !util.IsDNS1123Subdomain(params.From.Name) { |
131 |
- errs = append(errs, errors.NewFieldInvalid("from.name", params.From.Name, "name must be a valid subdomain")) |
|
131 |
+ errs = append(errs, fielderrors.NewFieldInvalid("from.name", params.From.Name, "name must be a valid subdomain")) |
|
132 | 132 |
} |
133 | 133 |
if len(params.From.Namespace) != 0 && !util.IsDNS1123Subdomain(params.From.Namespace) { |
134 |
- errs = append(errs, errors.NewFieldInvalid("from.namespace", params.From.Namespace, "namespace must be a valid subdomain")) |
|
134 |
+ errs = append(errs, fielderrors.NewFieldInvalid("from.namespace", params.From.Namespace, "namespace must be a valid subdomain")) |
|
135 | 135 |
} |
136 | 136 |
|
137 | 137 |
if len(params.RepositoryName) != 0 { |
138 |
- errs = append(errs, errors.NewFieldInvalid("repositoryName", params.RepositoryName, "only one of 'from', 'repository' name may be specified")) |
|
138 |
+ errs = append(errs, fielderrors.NewFieldInvalid("repositoryName", params.RepositoryName, "only one of 'from', 'repository' name may be specified")) |
|
139 | 139 |
} |
140 | 140 |
} else { |
141 | 141 |
if len(params.RepositoryName) == 0 { |
142 |
- errs = append(errs, errors.NewFieldRequired("from")) |
|
142 |
+ errs = append(errs, fielderrors.NewFieldRequired("from")) |
|
143 | 143 |
} |
144 | 144 |
} |
145 | 145 |
|
146 | 146 |
if len(params.ContainerNames) == 0 { |
147 |
- errs = append(errs, errors.NewFieldRequired("containerNames")) |
|
147 |
+ errs = append(errs, fielderrors.NewFieldRequired("containerNames")) |
|
148 | 148 |
} |
149 | 149 |
|
150 | 150 |
return errs |
... | ... |
@@ -4,7 +4,7 @@ import ( |
4 | 4 |
"testing" |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
7 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
8 | 8 |
|
9 | 9 |
"github.com/openshift/origin/pkg/deploy/api" |
10 | 10 |
"github.com/openshift/origin/pkg/deploy/api/test" |
... | ... |
@@ -36,7 +36,7 @@ func TestValidateDeploymentOK(t *testing.T) { |
36 | 36 |
func TestValidateDeploymentMissingFields(t *testing.T) { |
37 | 37 |
errorCases := map[string]struct { |
38 | 38 |
D api.Deployment |
39 |
- T errors.ValidationErrorType |
|
39 |
+ T fielderrors.ValidationErrorType |
|
40 | 40 |
F string |
41 | 41 |
}{ |
42 | 42 |
"missing strategy.type": { |
... | ... |
@@ -45,7 +45,7 @@ func TestValidateDeploymentMissingFields(t *testing.T) { |
45 | 45 |
Strategy: api.DeploymentStrategy{}, |
46 | 46 |
ControllerTemplate: test.OkControllerTemplate(), |
47 | 47 |
}, |
48 |
- errors.ValidationErrorTypeRequired, |
|
48 |
+ fielderrors.ValidationErrorTypeRequired, |
|
49 | 49 |
"strategy.type", |
50 | 50 |
}, |
51 | 51 |
} |
... | ... |
@@ -56,10 +56,10 @@ func TestValidateDeploymentMissingFields(t *testing.T) { |
56 | 56 |
t.Errorf("Expected failure for scenario %s", k) |
57 | 57 |
} |
58 | 58 |
for i := range errs { |
59 |
- if errs[i].(*errors.ValidationError).Type != v.T { |
|
59 |
+ if errs[i].(*fielderrors.ValidationError).Type != v.T { |
|
60 | 60 |
t.Errorf("%s: expected errors to have type %s: %v", k, v.T, errs[i]) |
61 | 61 |
} |
62 |
- if errs[i].(*errors.ValidationError).Field != v.F { |
|
62 |
+ if errs[i].(*fielderrors.ValidationError).Field != v.F { |
|
63 | 63 |
t.Errorf("%s: expected errors to have field %s: %v", k, v.F, errs[i]) |
64 | 64 |
} |
65 | 65 |
} |
... | ... |
@@ -81,7 +81,7 @@ func TestValidateDeploymentConfigOK(t *testing.T) { |
81 | 81 |
func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
82 | 82 |
errorCases := map[string]struct { |
83 | 83 |
D api.DeploymentConfig |
84 |
- T errors.ValidationErrorType |
|
84 |
+ T fielderrors.ValidationErrorType |
|
85 | 85 |
F string |
86 | 86 |
}{ |
87 | 87 |
"missing name": { |
... | ... |
@@ -89,7 +89,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
89 | 89 |
ObjectMeta: kapi.ObjectMeta{Name: "", Namespace: "bar"}, |
90 | 90 |
Template: test.OkDeploymentTemplate(), |
91 | 91 |
}, |
92 |
- errors.ValidationErrorTypeRequired, |
|
92 |
+ fielderrors.ValidationErrorTypeRequired, |
|
93 | 93 |
"name", |
94 | 94 |
}, |
95 | 95 |
"missing namespace": { |
... | ... |
@@ -97,7 +97,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
97 | 97 |
ObjectMeta: kapi.ObjectMeta{Name: "foo", Namespace: ""}, |
98 | 98 |
Template: test.OkDeploymentTemplate(), |
99 | 99 |
}, |
100 |
- errors.ValidationErrorTypeRequired, |
|
100 |
+ fielderrors.ValidationErrorTypeRequired, |
|
101 | 101 |
"namespace", |
102 | 102 |
}, |
103 | 103 |
"invalid name": { |
... | ... |
@@ -105,7 +105,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
105 | 105 |
ObjectMeta: kapi.ObjectMeta{Name: "-foo", Namespace: "bar"}, |
106 | 106 |
Template: test.OkDeploymentTemplate(), |
107 | 107 |
}, |
108 |
- errors.ValidationErrorTypeInvalid, |
|
108 |
+ fielderrors.ValidationErrorTypeInvalid, |
|
109 | 109 |
"name", |
110 | 110 |
}, |
111 | 111 |
"invalid namespace": { |
... | ... |
@@ -113,7 +113,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
113 | 113 |
ObjectMeta: kapi.ObjectMeta{Name: "foo", Namespace: "-bar"}, |
114 | 114 |
Template: test.OkDeploymentTemplate(), |
115 | 115 |
}, |
116 |
- errors.ValidationErrorTypeInvalid, |
|
116 |
+ fielderrors.ValidationErrorTypeInvalid, |
|
117 | 117 |
"namespace", |
118 | 118 |
}, |
119 | 119 |
|
... | ... |
@@ -129,7 +129,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
129 | 129 |
}, |
130 | 130 |
Template: test.OkDeploymentTemplate(), |
131 | 131 |
}, |
132 |
- errors.ValidationErrorTypeRequired, |
|
132 |
+ fielderrors.ValidationErrorTypeRequired, |
|
133 | 133 |
"triggers[0].type", |
134 | 134 |
}, |
135 | 135 |
"missing Trigger imageChangeParams.from": { |
... | ... |
@@ -145,7 +145,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
145 | 145 |
}, |
146 | 146 |
Template: test.OkDeploymentTemplate(), |
147 | 147 |
}, |
148 |
- errors.ValidationErrorTypeRequired, |
|
148 |
+ fielderrors.ValidationErrorTypeRequired, |
|
149 | 149 |
"triggers[0].imageChangeParams.from", |
150 | 150 |
}, |
151 | 151 |
"both fields illegal Trigger imageChangeParams.repositoryName": { |
... | ... |
@@ -165,7 +165,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
165 | 165 |
}, |
166 | 166 |
Template: test.OkDeploymentTemplate(), |
167 | 167 |
}, |
168 |
- errors.ValidationErrorTypeInvalid, |
|
168 |
+ fielderrors.ValidationErrorTypeInvalid, |
|
169 | 169 |
"triggers[0].imageChangeParams.repositoryName", |
170 | 170 |
}, |
171 | 171 |
"missing Trigger imageChangeParams.containerNames": { |
... | ... |
@@ -181,7 +181,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
181 | 181 |
}, |
182 | 182 |
Template: test.OkDeploymentTemplate(), |
183 | 183 |
}, |
184 |
- errors.ValidationErrorTypeRequired, |
|
184 |
+ fielderrors.ValidationErrorTypeRequired, |
|
185 | 185 |
"triggers[0].imageChangeParams.containerNames", |
186 | 186 |
}, |
187 | 187 |
"missing strategy.type": { |
... | ... |
@@ -195,7 +195,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
195 | 195 |
ControllerTemplate: test.OkControllerTemplate(), |
196 | 196 |
}, |
197 | 197 |
}, |
198 |
- errors.ValidationErrorTypeRequired, |
|
198 |
+ fielderrors.ValidationErrorTypeRequired, |
|
199 | 199 |
"template.strategy.type", |
200 | 200 |
}, |
201 | 201 |
"missing strategy.customParams": { |
... | ... |
@@ -209,7 +209,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
209 | 209 |
ControllerTemplate: test.OkControllerTemplate(), |
210 | 210 |
}, |
211 | 211 |
}, |
212 |
- errors.ValidationErrorTypeRequired, |
|
212 |
+ fielderrors.ValidationErrorTypeRequired, |
|
213 | 213 |
"template.strategy.customParams", |
214 | 214 |
}, |
215 | 215 |
"missing template.strategy.customParams.image": { |
... | ... |
@@ -224,7 +224,7 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
224 | 224 |
ControllerTemplate: test.OkControllerTemplate(), |
225 | 225 |
}, |
226 | 226 |
}, |
227 |
- errors.ValidationErrorTypeRequired, |
|
227 |
+ fielderrors.ValidationErrorTypeRequired, |
|
228 | 228 |
"template.strategy.customParams.image", |
229 | 229 |
}, |
230 | 230 |
} |
... | ... |
@@ -235,10 +235,10 @@ func TestValidateDeploymentConfigMissingFields(t *testing.T) { |
235 | 235 |
t.Errorf("Expected failure for scenario %s", k) |
236 | 236 |
} |
237 | 237 |
for i := range errs { |
238 |
- if errs[i].(*errors.ValidationError).Type != v.T { |
|
238 |
+ if errs[i].(*fielderrors.ValidationError).Type != v.T { |
|
239 | 239 |
t.Errorf("%s: expected errors to have type %s: %v", k, v.T, errs[i]) |
240 | 240 |
} |
241 |
- if errs[i].(*errors.ValidationError).Field != v.F { |
|
241 |
+ if errs[i].(*fielderrors.ValidationError).Field != v.F { |
|
242 | 242 |
t.Errorf("%s: expected errors to have field %s: %v", k, v.F, errs[i]) |
243 | 243 |
} |
244 | 244 |
} |
... | ... |
@@ -267,7 +267,7 @@ func TestValidateDeploymentConfigRollbackOK(t *testing.T) { |
267 | 267 |
func TestValidateDeploymentConfigRollbackInvalidFields(t *testing.T) { |
268 | 268 |
errorCases := map[string]struct { |
269 | 269 |
D api.DeploymentConfigRollback |
270 |
- T errors.ValidationErrorType |
|
270 |
+ T fielderrors.ValidationErrorType |
|
271 | 271 |
F string |
272 | 272 |
}{ |
273 | 273 |
"missing spec.from.name": { |
... | ... |
@@ -276,7 +276,7 @@ func TestValidateDeploymentConfigRollbackInvalidFields(t *testing.T) { |
276 | 276 |
From: kapi.ObjectReference{}, |
277 | 277 |
}, |
278 | 278 |
}, |
279 |
- errors.ValidationErrorTypeRequired, |
|
279 |
+ fielderrors.ValidationErrorTypeRequired, |
|
280 | 280 |
"spec.from.name", |
281 | 281 |
}, |
282 | 282 |
"wrong spec.from.kind": { |
... | ... |
@@ -288,7 +288,7 @@ func TestValidateDeploymentConfigRollbackInvalidFields(t *testing.T) { |
288 | 288 |
}, |
289 | 289 |
}, |
290 | 290 |
}, |
291 |
- errors.ValidationErrorTypeInvalid, |
|
291 |
+ fielderrors.ValidationErrorTypeInvalid, |
|
292 | 292 |
"spec.from.kind", |
293 | 293 |
}, |
294 | 294 |
} |
... | ... |
@@ -299,10 +299,10 @@ func TestValidateDeploymentConfigRollbackInvalidFields(t *testing.T) { |
299 | 299 |
t.Errorf("Expected failure for scenario %s", k) |
300 | 300 |
} |
301 | 301 |
for i := range errs { |
302 |
- if errs[i].(*errors.ValidationError).Type != v.T { |
|
302 |
+ if errs[i].(*fielderrors.ValidationError).Type != v.T { |
|
303 | 303 |
t.Errorf("%s: expected errors to have type %s: %v", k, v.T, errs[i]) |
304 | 304 |
} |
305 |
- if errs[i].(*errors.ValidationError).Field != v.F { |
|
305 |
+ if errs[i].(*fielderrors.ValidationError).Field != v.F { |
|
306 | 306 |
t.Errorf("%s: expected errors to have field %s: %v", k, v.F, errs[i]) |
307 | 307 |
} |
308 | 308 |
} |
... | ... |
@@ -42,7 +42,7 @@ func (c *DeployerPodController) Handle(pod *kapi.Pod) error { |
42 | 42 |
case kapi.PodSucceeded, kapi.PodFailed: |
43 | 43 |
nextStatus = deployapi.DeploymentStatusComplete |
44 | 44 |
// Detect failure based on the container state |
45 |
- for _, info := range pod.Status.Info { |
|
45 |
+ for _, info := range pod.Status.ContainerStatuses { |
|
46 | 46 |
if info.State.Termination != nil && info.State.Termination.ExitCode != 0 { |
47 | 47 |
nextStatus = deployapi.DeploymentStatusFailed |
48 | 48 |
} |
... | ... |
@@ -169,8 +169,8 @@ func okPod() *kapi.Pod { |
169 | 169 |
}, |
170 | 170 |
}, |
171 | 171 |
Status: kapi.PodStatus{ |
172 |
- Info: kapi.PodInfo{ |
|
173 |
- "container1": kapi.ContainerStatus{}, |
|
172 |
+ ContainerStatuses: []kapi.ContainerStatus{ |
|
173 |
+ {}, |
|
174 | 174 |
}, |
175 | 175 |
}, |
176 | 176 |
} |
... | ... |
@@ -185,10 +185,12 @@ func succeededPod() *kapi.Pod { |
185 | 185 |
func failedPod() *kapi.Pod { |
186 | 186 |
p := okPod() |
187 | 187 |
p.Status.Phase = kapi.PodFailed |
188 |
- p.Status.Info["container1"] = kapi.ContainerStatus{ |
|
189 |
- State: kapi.ContainerState{ |
|
190 |
- Termination: &kapi.ContainerStateTerminated{ |
|
191 |
- ExitCode: 1, |
|
188 |
+ p.Status.ContainerStatuses = []kapi.ContainerStatus{ |
|
189 |
+ { |
|
190 |
+ State: kapi.ContainerState{ |
|
191 |
+ Termination: &kapi.ContainerStateTerminated{ |
|
192 |
+ ExitCode: 1, |
|
193 |
+ }, |
|
192 | 194 |
}, |
193 | 195 |
}, |
194 | 196 |
} |
... | ... |
@@ -8,6 +8,7 @@ import ( |
8 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
9 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
10 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
11 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
11 | 12 |
|
12 | 13 |
deployapi "github.com/openshift/origin/pkg/deploy/api" |
13 | 14 |
imageapi "github.com/openshift/origin/pkg/image/api" |
... | ... |
@@ -135,17 +136,17 @@ func findReferences(dc *deployapi.DeploymentConfig) (refs triggersByRef, legacy |
135 | 135 |
} |
136 | 136 |
|
137 | 137 |
// retrieveReferences loads the repositories referenced by a deployment config |
138 |
-func retrieveReferences(client GeneratorClient, ctx kapi.Context, refs triggersByRef, legacy triggersByName) errors.ValidationErrorList { |
|
139 |
- errs := errors.ValidationErrorList{} |
|
138 |
+func retrieveReferences(client GeneratorClient, ctx kapi.Context, refs triggersByRef, legacy triggersByName) fielderrors.ValidationErrorList { |
|
139 |
+ errs := fielderrors.ValidationErrorList{} |
|
140 | 140 |
|
141 | 141 |
// fetch repositories directly |
142 | 142 |
for k, v := range refs { |
143 | 143 |
repo, err := client.GetImageRepository(kapi.WithNamespace(ctx, k.namespace), k.name) |
144 | 144 |
if err != nil { |
145 | 145 |
if errors.IsNotFound(err) { |
146 |
- errs = append(errs, errors.NewFieldNotFound(v.field, k.name)) |
|
146 |
+ errs = append(errs, fielderrors.NewFieldNotFound(v.field, k.name)) |
|
147 | 147 |
} else { |
148 |
- errs = append(errs, errors.NewFieldInvalid(v.field, k.name, err.Error())) |
|
148 |
+ errs = append(errs, fielderrors.NewFieldInvalid(v.field, k.name, err.Error())) |
|
149 | 149 |
} |
150 | 150 |
continue |
151 | 151 |
} |
... | ... |
@@ -172,7 +173,7 @@ func retrieveReferences(client GeneratorClient, ctx kapi.Context, refs triggersB |
172 | 172 |
repos, err := client.ListImageRepositories(ctx) |
173 | 173 |
if err != nil { |
174 | 174 |
for k, ref := range missing { |
175 |
- errs = append(errs, errors.NewFieldInvalid(ref.field, k, err.Error())) |
|
175 |
+ errs = append(errs, fielderrors.NewFieldInvalid(ref.field, k, err.Error())) |
|
176 | 176 |
} |
177 | 177 |
return errs |
178 | 178 |
} |
... | ... |
@@ -186,7 +187,7 @@ func retrieveReferences(client GeneratorClient, ctx kapi.Context, refs triggersB |
186 | 186 |
} |
187 | 187 |
} |
188 | 188 |
if ref.repo == nil { |
189 |
- errs = append(errs, errors.NewFieldNotFound(ref.field, k)) |
|
189 |
+ errs = append(errs, fielderrors.NewFieldNotFound(ref.field, k)) |
|
190 | 190 |
} |
191 | 191 |
} |
192 | 192 |
} |
... | ... |
@@ -210,11 +211,11 @@ func referencesByIndex(refs triggersByRef, legacy triggersByName) reposByIndex { |
210 | 210 |
return repos |
211 | 211 |
} |
212 | 212 |
|
213 |
-func replaceReferences(dc *deployapi.DeploymentConfig, repos reposByIndex) (changed bool, errs errors.ValidationErrorList) { |
|
213 |
+func replaceReferences(dc *deployapi.DeploymentConfig, repos reposByIndex) (changed bool, errs fielderrors.ValidationErrorList) { |
|
214 | 214 |
template := dc.Template.ControllerTemplate.Template |
215 | 215 |
for i, repo := range repos { |
216 | 216 |
if len(repo.Status.DockerImageRepository) == 0 { |
217 |
- errs = append(errs, errors.NewFieldInvalid(fmt.Sprintf("triggers[%d].imageChange.from", i), repo.Name, fmt.Sprintf("image repository %s/%s does not have a Docker image repository reference set and can't be used in a deployment config trigger", repo.Namespace, repo.Name))) |
|
217 |
+ errs = append(errs, fielderrors.NewFieldInvalid(fmt.Sprintf("triggers[%d].imageChange.from", i), repo.Name, fmt.Sprintf("image repository %s/%s does not have a Docker image repository reference set and can't be used in a deployment config trigger", repo.Namespace, repo.Name))) |
|
218 | 218 |
continue |
219 | 219 |
} |
220 | 220 |
params := dc.Triggers[i].ImageChangeParams |
... | ... |
@@ -222,7 +223,7 @@ func replaceReferences(dc *deployapi.DeploymentConfig, repos reposByIndex) (chan |
222 | 222 |
// get the image ref from the repo's tag history |
223 | 223 |
latest, err := imageapi.LatestTaggedImage(repo, params.Tag) |
224 | 224 |
if err != nil { |
225 |
- errs = append(errs, errors.NewFieldInvalid(fmt.Sprintf("triggers[%d].imageChange.from", i), repo.Name, err.Error())) |
|
225 |
+ errs = append(errs, fielderrors.NewFieldInvalid(fmt.Sprintf("triggers[%d].imageChange.from", i), repo.Name, err.Error())) |
|
226 | 226 |
continue |
227 | 227 |
} |
228 | 228 |
image := latest.DockerImageReference |
... | ... |
@@ -2,7 +2,6 @@ package generator |
2 | 2 |
|
3 | 3 |
import ( |
4 | 4 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
5 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
6 | 5 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
7 | 6 |
|
8 | 7 |
deployapi "github.com/openshift/origin/pkg/deploy/api" |
... | ... |
@@ -15,7 +14,7 @@ type REST struct { |
15 | 15 |
codec runtime.Codec |
16 | 16 |
} |
17 | 17 |
|
18 |
-func NewREST(generator *DeploymentConfigGenerator, codec runtime.Codec) apiserver.RESTStorage { |
|
18 |
+func NewREST(generator *DeploymentConfigGenerator, codec runtime.Codec) *REST { |
|
19 | 19 |
return &REST{generator: generator, codec: codec} |
20 | 20 |
} |
21 | 21 |
|
... | ... |
@@ -6,7 +6,6 @@ import ( |
6 | 6 |
"code.google.com/p/go-uuid/uuid" |
7 | 7 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
8 | 8 |
kerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
9 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
12 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -23,7 +22,7 @@ type REST struct { |
23 | 23 |
} |
24 | 24 |
|
25 | 25 |
// NewREST creates a new REST backed by the given registry. |
26 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
26 |
+func NewREST(registry Registry) *REST { |
|
27 | 27 |
return &REST{ |
28 | 28 |
registry: registry, |
29 | 29 |
} |
... | ... |
@@ -7,7 +7,6 @@ import ( |
7 | 7 |
|
8 | 8 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
9 | 9 |
kerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
10 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
12 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
13 | 12 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -23,7 +22,7 @@ type REST struct { |
23 | 23 |
} |
24 | 24 |
|
25 | 25 |
// NewREST creates a new REST backed by the given registry. |
26 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
26 |
+func NewREST(registry Registry) *REST { |
|
27 | 27 |
return &REST{ |
28 | 28 |
registry: registry, |
29 | 29 |
} |
... | ... |
@@ -5,8 +5,8 @@ import ( |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 | 7 |
kerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
8 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
9 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
10 | 10 |
|
11 | 11 |
deployapi "github.com/openshift/origin/pkg/deploy/api" |
12 | 12 |
"github.com/openshift/origin/pkg/deploy/api/validation" |
... | ... |
@@ -44,7 +44,7 @@ func (c Client) GenerateRollback(from, to *deployapi.DeploymentConfig, spec *dep |
44 | 44 |
} |
45 | 45 |
|
46 | 46 |
// NewREST safely creates a new REST. |
47 |
-func NewREST(generator GeneratorClient, codec runtime.Codec) apiserver.RESTStorage { |
|
47 |
+func NewREST(generator GeneratorClient, codec runtime.Codec) *REST { |
|
48 | 48 |
return &REST{ |
49 | 49 |
generator: generator, |
50 | 50 |
codec: codec, |
... | ... |
@@ -98,6 +98,6 @@ func (s *REST) Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, err |
98 | 98 |
} |
99 | 99 |
|
100 | 100 |
func newInvalidDeploymentError(rollback *deployapi.DeploymentConfigRollback, reason string) error { |
101 |
- err := kerrors.NewFieldInvalid("spec.from.name", rollback.Spec.From.Name, reason) |
|
102 |
- return kerrors.NewInvalid("DeploymentConfigRollback", "", kerrors.ValidationErrorList{err}) |
|
101 |
+ err := fielderrors.NewFieldInvalid("spec.from.name", rollback.Spec.From.Name, reason) |
|
102 |
+ return kerrors.NewInvalid("DeploymentConfigRollback", "", fielderrors.ValidationErrorList{err}) |
|
103 | 103 |
} |
... | ... |
@@ -192,10 +192,10 @@ func AddServices(objects Objects) Objects { |
192 | 192 |
Labels: t.Labels, |
193 | 193 |
}, |
194 | 194 |
Spec: kapi.ServiceSpec{ |
195 |
- ContainerPort: kutil.NewIntOrStringFromInt(p.ContainerPort), |
|
196 |
- Port: p.ContainerPort, |
|
197 |
- Selector: t.Template.ControllerTemplate.Selector, |
|
198 |
- Protocol: p.Protocol, |
|
195 |
+ TargetPort: kutil.NewIntOrStringFromInt(p.ContainerPort), |
|
196 |
+ Port: p.ContainerPort, |
|
197 |
+ Selector: t.Template.ControllerTemplate.Selector, |
|
198 |
+ Protocol: p.Protocol, |
|
199 | 199 |
}, |
200 | 200 |
}) |
201 | 201 |
break |
... | ... |
@@ -1,25 +1,25 @@ |
1 | 1 |
package validation |
2 | 2 |
|
3 | 3 |
import ( |
4 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
5 | 4 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation" |
6 | 5 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
6 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
7 | 7 |
|
8 | 8 |
"github.com/openshift/origin/pkg/image/api" |
9 | 9 |
) |
10 | 10 |
|
11 | 11 |
// ValidateImage tests required fields for an Image. |
12 |
-func ValidateImage(image *api.Image) errors.ValidationErrorList { |
|
13 |
- result := errors.ValidationErrorList{} |
|
12 |
+func ValidateImage(image *api.Image) fielderrors.ValidationErrorList { |
|
13 |
+ result := fielderrors.ValidationErrorList{} |
|
14 | 14 |
|
15 | 15 |
if len(image.Name) == 0 { |
16 |
- result = append(result, errors.NewFieldRequired("name")) |
|
16 |
+ result = append(result, fielderrors.NewFieldRequired("name")) |
|
17 | 17 |
} |
18 | 18 |
if len(image.DockerImageReference) == 0 { |
19 |
- result = append(result, errors.NewFieldRequired("dockerImageReference")) |
|
19 |
+ result = append(result, fielderrors.NewFieldRequired("dockerImageReference")) |
|
20 | 20 |
} else { |
21 | 21 |
if _, err := api.ParseDockerImageReference(image.DockerImageReference); err != nil { |
22 |
- result = append(result, errors.NewFieldInvalid("dockerImageReference", image.DockerImageReference, err.Error())) |
|
22 |
+ result = append(result, fielderrors.NewFieldInvalid("dockerImageReference", image.DockerImageReference, err.Error())) |
|
23 | 23 |
} |
24 | 24 |
} |
25 | 25 |
|
... | ... |
@@ -27,29 +27,29 @@ func ValidateImage(image *api.Image) errors.ValidationErrorList { |
27 | 27 |
} |
28 | 28 |
|
29 | 29 |
// ValidateImageRepository tests required fields for an ImageRepository. |
30 |
-func ValidateImageRepository(repo *api.ImageRepository) errors.ValidationErrorList { |
|
31 |
- result := errors.ValidationErrorList{} |
|
30 |
+func ValidateImageRepository(repo *api.ImageRepository) fielderrors.ValidationErrorList { |
|
31 |
+ result := fielderrors.ValidationErrorList{} |
|
32 | 32 |
|
33 | 33 |
if repo.Tags == nil { |
34 | 34 |
repo.Tags = make(map[string]string) |
35 | 35 |
} |
36 | 36 |
if len(repo.Name) == 0 { |
37 |
- result = append(result, errors.NewFieldRequired("name")) |
|
37 |
+ result = append(result, fielderrors.NewFieldRequired("name")) |
|
38 | 38 |
} |
39 | 39 |
if !util.IsDNS1123Subdomain(repo.Namespace) { |
40 |
- result = append(result, errors.NewFieldInvalid("namespace", repo.Namespace, "")) |
|
40 |
+ result = append(result, fielderrors.NewFieldInvalid("namespace", repo.Namespace, "")) |
|
41 | 41 |
} |
42 | 42 |
if len(repo.DockerImageRepository) != 0 { |
43 | 43 |
if _, err := api.ParseDockerImageReference(repo.DockerImageRepository); err != nil { |
44 |
- result = append(result, errors.NewFieldInvalid("dockerImageRepository", repo.DockerImageRepository, err.Error())) |
|
44 |
+ result = append(result, fielderrors.NewFieldInvalid("dockerImageRepository", repo.DockerImageRepository, err.Error())) |
|
45 | 45 |
} |
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
return result |
49 | 49 |
} |
50 | 50 |
|
51 |
-func ValidateImageRepositoryUpdate(newRepo, oldRepo *api.ImageRepository) errors.ValidationErrorList { |
|
52 |
- result := errors.ValidationErrorList{} |
|
51 |
+func ValidateImageRepositoryUpdate(newRepo, oldRepo *api.ImageRepository) fielderrors.ValidationErrorList { |
|
52 |
+ result := fielderrors.ValidationErrorList{} |
|
53 | 53 |
|
54 | 54 |
result = append(result, validation.ValidateObjectMetaUpdate(&oldRepo.ObjectMeta, &newRepo.ObjectMeta).Prefix("metadata")...) |
55 | 55 |
result = append(result, ValidateImageRepository(newRepo)...) |
... | ... |
@@ -57,8 +57,8 @@ func ValidateImageRepositoryUpdate(newRepo, oldRepo *api.ImageRepository) errors |
57 | 57 |
return result |
58 | 58 |
} |
59 | 59 |
|
60 |
-func ValidateImageRepositoryStatusUpdate(newRepo, oldRepo *api.ImageRepository) errors.ValidationErrorList { |
|
61 |
- result := errors.ValidationErrorList{} |
|
60 |
+func ValidateImageRepositoryStatusUpdate(newRepo, oldRepo *api.ImageRepository) fielderrors.ValidationErrorList { |
|
61 |
+ result := fielderrors.ValidationErrorList{} |
|
62 | 62 |
result = append(result, validation.ValidateObjectMetaUpdate(&oldRepo.ObjectMeta, &newRepo.ObjectMeta).Prefix("metadata")...) |
63 | 63 |
newRepo.Tags = oldRepo.Tags |
64 | 64 |
newRepo.DockerImageRepository = oldRepo.DockerImageRepository |
... | ... |
@@ -66,27 +66,27 @@ func ValidateImageRepositoryStatusUpdate(newRepo, oldRepo *api.ImageRepository) |
66 | 66 |
} |
67 | 67 |
|
68 | 68 |
// ValidateImageRepositoryMapping tests required fields for an ImageRepositoryMapping. |
69 |
-func ValidateImageRepositoryMapping(mapping *api.ImageRepositoryMapping) errors.ValidationErrorList { |
|
70 |
- result := errors.ValidationErrorList{} |
|
69 |
+func ValidateImageRepositoryMapping(mapping *api.ImageRepositoryMapping) fielderrors.ValidationErrorList { |
|
70 |
+ result := fielderrors.ValidationErrorList{} |
|
71 | 71 |
|
72 | 72 |
hasRepository := len(mapping.DockerImageRepository) != 0 |
73 | 73 |
hasName := len(mapping.Name) != 0 |
74 | 74 |
switch { |
75 | 75 |
case hasRepository: |
76 | 76 |
if _, err := api.ParseDockerImageReference(mapping.DockerImageRepository); err != nil { |
77 |
- result = append(result, errors.NewFieldInvalid("dockerImageRepository", mapping.DockerImageRepository, err.Error())) |
|
77 |
+ result = append(result, fielderrors.NewFieldInvalid("dockerImageRepository", mapping.DockerImageRepository, err.Error())) |
|
78 | 78 |
} |
79 | 79 |
case hasName: |
80 | 80 |
default: |
81 |
- result = append(result, errors.NewFieldRequired("name")) |
|
82 |
- result = append(result, errors.NewFieldRequired("dockerImageRepository")) |
|
81 |
+ result = append(result, fielderrors.NewFieldRequired("name")) |
|
82 |
+ result = append(result, fielderrors.NewFieldRequired("dockerImageRepository")) |
|
83 | 83 |
} |
84 | 84 |
|
85 | 85 |
if !util.IsDNS1123Subdomain(mapping.Namespace) { |
86 |
- result = append(result, errors.NewFieldInvalid("namespace", mapping.Namespace, "")) |
|
86 |
+ result = append(result, fielderrors.NewFieldInvalid("namespace", mapping.Namespace, "")) |
|
87 | 87 |
} |
88 | 88 |
if len(mapping.Tag) == 0 { |
89 |
- result = append(result, errors.NewFieldRequired("tag")) |
|
89 |
+ result = append(result, fielderrors.NewFieldRequired("tag")) |
|
90 | 90 |
} |
91 | 91 |
if errs := ValidateImage(&mapping.Image).Prefix("image"); len(errs) != 0 { |
92 | 92 |
result = append(result, errs...) |
... | ... |
@@ -4,7 +4,7 @@ import ( |
4 | 4 |
"testing" |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
7 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
8 | 8 |
"github.com/openshift/origin/pkg/image/api" |
9 | 9 |
) |
10 | 10 |
|
... | ... |
@@ -21,17 +21,17 @@ func TestValidateImageOK(t *testing.T) { |
21 | 21 |
func TestValidateImageMissingFields(t *testing.T) { |
22 | 22 |
errorCases := map[string]struct { |
23 | 23 |
I api.Image |
24 |
- T errors.ValidationErrorType |
|
24 |
+ T fielderrors.ValidationErrorType |
|
25 | 25 |
F string |
26 | 26 |
}{ |
27 | 27 |
"missing Name": { |
28 | 28 |
api.Image{DockerImageReference: "ref"}, |
29 |
- errors.ValidationErrorTypeRequired, |
|
29 |
+ fielderrors.ValidationErrorTypeRequired, |
|
30 | 30 |
"name", |
31 | 31 |
}, |
32 | 32 |
"missing DockerImageReference": { |
33 | 33 |
api.Image{ObjectMeta: kapi.ObjectMeta{Name: "foo"}}, |
34 |
- errors.ValidationErrorTypeRequired, |
|
34 |
+ fielderrors.ValidationErrorTypeRequired, |
|
35 | 35 |
"dockerImageReference", |
36 | 36 |
}, |
37 | 37 |
} |
... | ... |
@@ -44,7 +44,7 @@ func TestValidateImageMissingFields(t *testing.T) { |
44 | 44 |
} |
45 | 45 |
match := false |
46 | 46 |
for i := range errs { |
47 |
- if errs[i].(*errors.ValidationError).Type == v.T && errs[i].(*errors.ValidationError).Field == v.F { |
|
47 |
+ if errs[i].(*fielderrors.ValidationError).Type == v.T && errs[i].(*fielderrors.ValidationError).Field == v.F { |
|
48 | 48 |
match = true |
49 | 49 |
break |
50 | 50 |
} |
... | ... |
@@ -58,7 +58,7 @@ func TestValidateImageMissingFields(t *testing.T) { |
58 | 58 |
func TestValidateImageRepositoryMappingNotOK(t *testing.T) { |
59 | 59 |
errorCases := map[string]struct { |
60 | 60 |
I api.ImageRepositoryMapping |
61 |
- T errors.ValidationErrorType |
|
61 |
+ T fielderrors.ValidationErrorType |
|
62 | 62 |
F string |
63 | 63 |
}{ |
64 | 64 |
"missing DockerImageRepository": { |
... | ... |
@@ -75,7 +75,7 @@ func TestValidateImageRepositoryMappingNotOK(t *testing.T) { |
75 | 75 |
DockerImageReference: "openshift/ruby-19-centos", |
76 | 76 |
}, |
77 | 77 |
}, |
78 |
- errors.ValidationErrorTypeRequired, |
|
78 |
+ fielderrors.ValidationErrorTypeRequired, |
|
79 | 79 |
"dockerImageRepository", |
80 | 80 |
}, |
81 | 81 |
"missing Name": { |
... | ... |
@@ -92,7 +92,7 @@ func TestValidateImageRepositoryMappingNotOK(t *testing.T) { |
92 | 92 |
DockerImageReference: "openshift/ruby-19-centos", |
93 | 93 |
}, |
94 | 94 |
}, |
95 |
- errors.ValidationErrorTypeRequired, |
|
95 |
+ fielderrors.ValidationErrorTypeRequired, |
|
96 | 96 |
"name", |
97 | 97 |
}, |
98 | 98 |
"missing Tag": { |
... | ... |
@@ -109,7 +109,7 @@ func TestValidateImageRepositoryMappingNotOK(t *testing.T) { |
109 | 109 |
DockerImageReference: "openshift/ruby-19-centos", |
110 | 110 |
}, |
111 | 111 |
}, |
112 |
- errors.ValidationErrorTypeRequired, |
|
112 |
+ fielderrors.ValidationErrorTypeRequired, |
|
113 | 113 |
"tag", |
114 | 114 |
}, |
115 | 115 |
"missing image name": { |
... | ... |
@@ -126,7 +126,7 @@ func TestValidateImageRepositoryMappingNotOK(t *testing.T) { |
126 | 126 |
DockerImageReference: "openshift/ruby-19-centos", |
127 | 127 |
}, |
128 | 128 |
}, |
129 |
- errors.ValidationErrorTypeRequired, |
|
129 |
+ fielderrors.ValidationErrorTypeRequired, |
|
130 | 130 |
"image.name", |
131 | 131 |
}, |
132 | 132 |
"invalid repository pull spec": { |
... | ... |
@@ -144,7 +144,7 @@ func TestValidateImageRepositoryMappingNotOK(t *testing.T) { |
144 | 144 |
DockerImageReference: "openshift/ruby-19-centos", |
145 | 145 |
}, |
146 | 146 |
}, |
147 |
- errors.ValidationErrorTypeInvalid, |
|
147 |
+ fielderrors.ValidationErrorTypeInvalid, |
|
148 | 148 |
"dockerImageRepository", |
149 | 149 |
}, |
150 | 150 |
} |
... | ... |
@@ -157,7 +157,7 @@ func TestValidateImageRepositoryMappingNotOK(t *testing.T) { |
157 | 157 |
} |
158 | 158 |
match := false |
159 | 159 |
for i := range errs { |
160 |
- if errs[i].(*errors.ValidationError).Type == v.T && errs[i].(*errors.ValidationError).Field == v.F { |
|
160 |
+ if errs[i].(*fielderrors.ValidationError).Type == v.T && errs[i].(*fielderrors.ValidationError).Field == v.F { |
|
161 | 161 |
match = true |
162 | 162 |
break |
163 | 163 |
} |
... | ... |
@@ -2,7 +2,7 @@ package image |
2 | 2 |
|
3 | 3 |
import ( |
4 | 4 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
5 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
5 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
6 | 6 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
7 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
8 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -26,10 +26,10 @@ type Registry interface { |
26 | 26 |
|
27 | 27 |
// Storage is an interface for a standard REST Storage backend |
28 | 28 |
type Storage interface { |
29 |
- apiserver.RESTGracefulDeleter |
|
30 |
- apiserver.RESTLister |
|
31 |
- apiserver.RESTGetter |
|
32 |
- apiserver.ResourceWatcher |
|
29 |
+ rest.GracefulDeleter |
|
30 |
+ rest.Lister |
|
31 |
+ rest.Getter |
|
32 |
+ rest.Watcher |
|
33 | 33 |
|
34 | 34 |
Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, error) |
35 | 35 |
} |
... | ... |
@@ -4,11 +4,11 @@ import ( |
4 | 4 |
"fmt" |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
8 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
11 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
12 | 12 |
|
13 | 13 |
"github.com/openshift/origin/pkg/image/api" |
14 | 14 |
"github.com/openshift/origin/pkg/image/api/validation" |
... | ... |
@@ -24,6 +24,9 @@ type imageStrategy struct { |
24 | 24 |
// Image objects via the REST API. |
25 | 25 |
var Strategy = imageStrategy{kapi.Scheme, kapi.SimpleNameGenerator} |
26 | 26 |
|
27 |
+func (imageStrategy) PrepareForCreate(obj runtime.Object) {} |
|
28 |
+func (imageStrategy) PrepareForUpdate(obj, old runtime.Object) {} |
|
29 |
+ |
|
27 | 30 |
// NamespaceScoped is false for images. |
28 | 31 |
func (imageStrategy) NamespaceScoped() bool { |
29 | 32 |
return false |
... | ... |
@@ -34,7 +37,7 @@ func (imageStrategy) ResetBeforeCreate(obj runtime.Object) { |
34 | 34 |
} |
35 | 35 |
|
36 | 36 |
// Validate validates a new image. |
37 |
-func (imageStrategy) Validate(obj runtime.Object) errors.ValidationErrorList { |
|
37 |
+func (imageStrategy) Validate(obj runtime.Object) fielderrors.ValidationErrorList { |
|
38 | 38 |
image := obj.(*api.Image) |
39 | 39 |
return validation.ValidateImage(image) |
40 | 40 |
} |
... | ... |
@@ -2,7 +2,7 @@ package imagerepository |
2 | 2 |
|
3 | 3 |
import ( |
4 | 4 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
5 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
5 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
6 | 6 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
7 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
8 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -31,10 +31,10 @@ type Registry interface { |
31 | 31 |
|
32 | 32 |
// Storage is an interface for a standard REST Storage backend |
33 | 33 |
type Storage interface { |
34 |
- apiserver.RESTGracefulDeleter |
|
35 |
- apiserver.RESTLister |
|
36 |
- apiserver.RESTGetter |
|
37 |
- apiserver.ResourceWatcher |
|
34 |
+ rest.GracefulDeleter |
|
35 |
+ rest.Lister |
|
36 |
+ rest.Getter |
|
37 |
+ rest.Watcher |
|
38 | 38 |
|
39 | 39 |
Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, error) |
40 | 40 |
Update(ctx kapi.Context, obj runtime.Object) (runtime.Object, bool, error) |
... | ... |
@@ -43,12 +43,12 @@ type Storage interface { |
43 | 43 |
// storage puts strong typing around storage calls |
44 | 44 |
type storage struct { |
45 | 45 |
Storage |
46 |
- status apiserver.RESTUpdater |
|
46 |
+ status rest.Updater |
|
47 | 47 |
} |
48 | 48 |
|
49 | 49 |
// NewRegistry returns a new Registry interface for the given Storage. Any mismatched |
50 | 50 |
// types will panic. |
51 |
-func NewRegistry(s Storage, status apiserver.RESTUpdater) Registry { |
|
51 |
+func NewRegistry(s Storage, status rest.Updater) Registry { |
|
52 | 52 |
return &storage{s, status} |
53 | 53 |
} |
54 | 54 |
|
... | ... |
@@ -4,11 +4,11 @@ import ( |
4 | 4 |
"fmt" |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
8 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
11 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
12 | 12 |
|
13 | 13 |
"github.com/openshift/origin/pkg/image/api" |
14 | 14 |
"github.com/openshift/origin/pkg/image/api/validation" |
... | ... |
@@ -27,6 +27,9 @@ func NewStrategy(defaultRegistry DefaultRegistry) Strategy { |
27 | 27 |
return Strategy{kapi.Scheme, kapi.SimpleNameGenerator, defaultRegistry} |
28 | 28 |
} |
29 | 29 |
|
30 |
+func (Strategy) PrepareForCreate(obj runtime.Object) {} |
|
31 |
+func (Strategy) PrepareForUpdate(obj, old runtime.Object) {} |
|
32 |
+ |
|
30 | 33 |
// NamespaceScoped is true for image repositories. |
31 | 34 |
func (s Strategy) NamespaceScoped() bool { |
32 | 35 |
return true |
... | ... |
@@ -43,7 +46,7 @@ func (s Strategy) ResetBeforeCreate(obj runtime.Object) { |
43 | 43 |
} |
44 | 44 |
|
45 | 45 |
// Validate validates a new image repository. |
46 |
-func (s Strategy) Validate(obj runtime.Object) errors.ValidationErrorList { |
|
46 |
+func (s Strategy) Validate(obj runtime.Object) fielderrors.ValidationErrorList { |
|
47 | 47 |
ir := obj.(*api.ImageRepository) |
48 | 48 |
return validation.ValidateImageRepository(ir) |
49 | 49 |
} |
... | ... |
@@ -117,7 +120,7 @@ func tagsChanged(old, repo *api.ImageRepository) { |
117 | 117 |
} |
118 | 118 |
|
119 | 119 |
// ValidateUpdate is the default update validation for an end user. |
120 |
-func (s Strategy) ValidateUpdate(obj, old runtime.Object) errors.ValidationErrorList { |
|
120 |
+func (s Strategy) ValidateUpdate(obj, old runtime.Object) fielderrors.ValidationErrorList { |
|
121 | 121 |
repo := obj.(*api.ImageRepository) |
122 | 122 |
oldRepo := old.(*api.ImageRepository) |
123 | 123 |
|
... | ... |
@@ -146,7 +149,10 @@ func NewStatusStrategy(strategy Strategy) StatusStrategy { |
146 | 146 |
return StatusStrategy{strategy} |
147 | 147 |
} |
148 | 148 |
|
149 |
-func (StatusStrategy) ValidateUpdate(obj, old runtime.Object) errors.ValidationErrorList { |
|
149 |
+func (StatusStrategy) PrepareForCreate(obj runtime.Object) {} |
|
150 |
+func (StatusStrategy) PrepareForUpdate(obj, old runtime.Object) {} |
|
151 |
+ |
|
152 |
+func (StatusStrategy) ValidateUpdate(obj, old runtime.Object) fielderrors.ValidationErrorList { |
|
150 | 153 |
// TODO: merge valid fields after update |
151 | 154 |
return validation.ValidateImageRepositoryStatusUpdate(obj.(*api.ImageRepository), old.(*api.ImageRepository)) |
152 | 155 |
} |
... | ... |
@@ -9,6 +9,7 @@ import ( |
9 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
10 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
11 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
12 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
12 | 13 |
|
13 | 14 |
"github.com/openshift/origin/pkg/image/api" |
14 | 15 |
"github.com/openshift/origin/pkg/image/api/validation" |
... | ... |
@@ -47,6 +48,9 @@ func (r *REST) New() runtime.Object { |
47 | 47 |
return &api.ImageRepositoryMapping{} |
48 | 48 |
} |
49 | 49 |
|
50 |
+func (imageRepositoryMappingStrategy) PrepareForCreate(obj runtime.Object) {} |
|
51 |
+func (imageRepositoryMappingStrategy) PrepareForUpdate(obj, old runtime.Object) {} |
|
52 |
+ |
|
50 | 53 |
// NamespaceScoped is true for image repository mappings. |
51 | 54 |
func (s imageRepositoryMappingStrategy) NamespaceScoped() bool { |
52 | 55 |
return true |
... | ... |
@@ -57,7 +61,7 @@ func (s imageRepositoryMappingStrategy) ResetBeforeCreate(obj runtime.Object) { |
57 | 57 |
} |
58 | 58 |
|
59 | 59 |
// Validate validates a new ImageRepositoryMapping. |
60 |
-func (s imageRepositoryMappingStrategy) Validate(obj runtime.Object) errors.ValidationErrorList { |
|
60 |
+func (s imageRepositoryMappingStrategy) Validate(obj runtime.Object) fielderrors.ValidationErrorList { |
|
61 | 61 |
mapping := obj.(*api.ImageRepositoryMapping) |
62 | 62 |
return validation.ValidateImageRepositoryMapping(mapping) |
63 | 63 |
} |
... | ... |
@@ -130,8 +134,8 @@ func (s *REST) findRepositoryForMapping(ctx kapi.Context, mapping *api.ImageRepo |
130 | 130 |
return &list.Items[i], nil |
131 | 131 |
} |
132 | 132 |
} |
133 |
- return nil, errors.NewInvalid("imageRepositoryMapping", "", errors.ValidationErrorList{ |
|
134 |
- errors.NewFieldNotFound("dockerImageRepository", mapping.DockerImageRepository), |
|
133 |
+ return nil, errors.NewInvalid("imageRepositoryMapping", "", fielderrors.ValidationErrorList{ |
|
134 |
+ fielderrors.NewFieldNotFound("dockerImageRepository", mapping.DockerImageRepository), |
|
135 | 135 |
}) |
136 | 136 |
} |
137 | 137 |
return nil, errors.NewNotFound("ImageRepository", "") |
... | ... |
@@ -8,18 +8,18 @@ import ( |
8 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/network" |
9 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/network/exec" |
10 | 10 |
// Volume plugins |
11 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume" |
|
12 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/empty_dir" |
|
13 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/gce_pd" |
|
14 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/git_repo" |
|
15 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/host_path" |
|
16 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/nfs" |
|
17 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/kubelet/volume/secret" |
|
11 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/volume" |
|
12 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/volume/empty_dir" |
|
13 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/volume/gce_pd" |
|
14 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/volume/git_repo" |
|
15 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/volume/host_path" |
|
16 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/volume/nfs" |
|
17 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/volume/secret" |
|
18 | 18 |
) |
19 | 19 |
|
20 | 20 |
// ProbeVolumePlugins collects all volume plugins into an easy to use list. |
21 |
-func ProbeVolumePlugins() []volume.Plugin { |
|
22 |
- allPlugins := []volume.Plugin{} |
|
21 |
+func ProbeVolumePlugins() []volume.VolumePlugin { |
|
22 |
+ allPlugins := []volume.VolumePlugin{} |
|
23 | 23 |
|
24 | 24 |
// The list of plugins to probe is decided by the kubelet binary, not |
25 | 25 |
// by dynamic linking or other "magic". Plugins will be analyzed and |
... | ... |
@@ -1,109 +1,109 @@ |
1 | 1 |
package validation |
2 | 2 |
|
3 | 3 |
import ( |
4 |
- errs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
5 | 4 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
5 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
6 | 6 |
"github.com/openshift/origin/pkg/oauth/api" |
7 | 7 |
) |
8 | 8 |
|
9 |
-func ValidateAccessToken(accessToken *api.OAuthAccessToken) errs.ValidationErrorList { |
|
10 |
- allErrs := errs.ValidationErrorList{} |
|
9 |
+func ValidateAccessToken(accessToken *api.OAuthAccessToken) fielderrors.ValidationErrorList { |
|
10 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
11 | 11 |
if len(accessToken.Name) == 0 { |
12 |
- allErrs = append(allErrs, errs.NewFieldRequired("name")) |
|
12 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("name")) |
|
13 | 13 |
} |
14 | 14 |
if len(accessToken.ClientName) == 0 { |
15 |
- allErrs = append(allErrs, errs.NewFieldRequired("clientname")) |
|
15 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("clientname")) |
|
16 | 16 |
} |
17 | 17 |
if len(accessToken.UserName) == 0 { |
18 |
- allErrs = append(allErrs, errs.NewFieldRequired("username")) |
|
18 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("username")) |
|
19 | 19 |
} |
20 | 20 |
if len(accessToken.UserUID) == 0 { |
21 |
- allErrs = append(allErrs, errs.NewFieldRequired("useruid")) |
|
21 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("useruid")) |
|
22 | 22 |
} |
23 | 23 |
if len(accessToken.Namespace) != 0 { |
24 |
- allErrs = append(allErrs, errs.NewFieldInvalid("namespace", accessToken.Namespace, "namespace must be empty")) |
|
24 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("namespace", accessToken.Namespace, "namespace must be empty")) |
|
25 | 25 |
} |
26 | 26 |
allErrs = append(allErrs, validateLabels(accessToken.Labels)...) |
27 | 27 |
return allErrs |
28 | 28 |
} |
29 | 29 |
|
30 |
-func ValidateAuthorizeToken(authorizeToken *api.OAuthAuthorizeToken) errs.ValidationErrorList { |
|
31 |
- allErrs := errs.ValidationErrorList{} |
|
30 |
+func ValidateAuthorizeToken(authorizeToken *api.OAuthAuthorizeToken) fielderrors.ValidationErrorList { |
|
31 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
32 | 32 |
if len(authorizeToken.Name) == 0 { |
33 |
- allErrs = append(allErrs, errs.NewFieldRequired("name")) |
|
33 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("name")) |
|
34 | 34 |
} |
35 | 35 |
if len(authorizeToken.ClientName) == 0 { |
36 |
- allErrs = append(allErrs, errs.NewFieldRequired("clientname")) |
|
36 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("clientname")) |
|
37 | 37 |
} |
38 | 38 |
if len(authorizeToken.UserName) == 0 { |
39 |
- allErrs = append(allErrs, errs.NewFieldRequired("username")) |
|
39 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("username")) |
|
40 | 40 |
} |
41 | 41 |
if len(authorizeToken.UserUID) == 0 { |
42 |
- allErrs = append(allErrs, errs.NewFieldRequired("useruid")) |
|
42 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("useruid")) |
|
43 | 43 |
} |
44 | 44 |
if len(authorizeToken.Namespace) != 0 { |
45 |
- allErrs = append(allErrs, errs.NewFieldInvalid("namespace", authorizeToken.Namespace, "namespace must be empty")) |
|
45 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("namespace", authorizeToken.Namespace, "namespace must be empty")) |
|
46 | 46 |
} |
47 | 47 |
allErrs = append(allErrs, validateLabels(authorizeToken.Labels)...) |
48 | 48 |
return allErrs |
49 | 49 |
} |
50 | 50 |
|
51 |
-func ValidateClient(client *api.OAuthClient) errs.ValidationErrorList { |
|
52 |
- allErrs := errs.ValidationErrorList{} |
|
51 |
+func ValidateClient(client *api.OAuthClient) fielderrors.ValidationErrorList { |
|
52 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
53 | 53 |
if len(client.Name) == 0 { |
54 |
- allErrs = append(allErrs, errs.NewFieldRequired("name")) |
|
54 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("name")) |
|
55 | 55 |
} |
56 | 56 |
if len(client.Namespace) != 0 { |
57 |
- allErrs = append(allErrs, errs.NewFieldInvalid("namespace", client.Namespace, "namespace must be empty")) |
|
57 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("namespace", client.Namespace, "namespace must be empty")) |
|
58 | 58 |
} |
59 | 59 |
allErrs = append(allErrs, validateLabels(client.Labels)...) |
60 | 60 |
return allErrs |
61 | 61 |
} |
62 | 62 |
|
63 |
-func ValidateClientAuthorization(clientAuthorization *api.OAuthClientAuthorization) errs.ValidationErrorList { |
|
64 |
- allErrs := errs.ValidationErrorList{} |
|
63 |
+func ValidateClientAuthorization(clientAuthorization *api.OAuthClientAuthorization) fielderrors.ValidationErrorList { |
|
64 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
65 | 65 |
if len(clientAuthorization.Name) == 0 { |
66 |
- allErrs = append(allErrs, errs.NewFieldRequired("name")) |
|
66 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("name")) |
|
67 | 67 |
} |
68 | 68 |
if len(clientAuthorization.ClientName) == 0 { |
69 |
- allErrs = append(allErrs, errs.NewFieldRequired("clientname")) |
|
69 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("clientname")) |
|
70 | 70 |
} |
71 | 71 |
if len(clientAuthorization.UserName) == 0 { |
72 |
- allErrs = append(allErrs, errs.NewFieldRequired("username")) |
|
72 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("username")) |
|
73 | 73 |
} |
74 | 74 |
if len(clientAuthorization.UserUID) == 0 { |
75 |
- allErrs = append(allErrs, errs.NewFieldRequired("useruid")) |
|
75 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("useruid")) |
|
76 | 76 |
} |
77 | 77 |
if len(clientAuthorization.Namespace) != 0 { |
78 |
- allErrs = append(allErrs, errs.NewFieldInvalid("namespace", clientAuthorization.Namespace, "namespace must be empty")) |
|
78 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("namespace", clientAuthorization.Namespace, "namespace must be empty")) |
|
79 | 79 |
} |
80 | 80 |
allErrs = append(allErrs, validateLabels(clientAuthorization.Labels)...) |
81 | 81 |
return allErrs |
82 | 82 |
} |
83 | 83 |
|
84 |
-func ValidateClientAuthorizationUpdate(newAuth *api.OAuthClientAuthorization, oldAuth *api.OAuthClientAuthorization) errs.ValidationErrorList { |
|
84 |
+func ValidateClientAuthorizationUpdate(newAuth *api.OAuthClientAuthorization, oldAuth *api.OAuthClientAuthorization) fielderrors.ValidationErrorList { |
|
85 | 85 |
allErrs := ValidateClientAuthorization(newAuth) |
86 | 86 |
if oldAuth.Name != newAuth.Name { |
87 |
- allErrs = append(allErrs, errs.NewFieldInvalid("name", newAuth.Name, "name is not a mutable field")) |
|
87 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("name", newAuth.Name, "name is not a mutable field")) |
|
88 | 88 |
} |
89 | 89 |
if oldAuth.ClientName != newAuth.ClientName { |
90 |
- allErrs = append(allErrs, errs.NewFieldInvalid("clientname", newAuth.ClientName, "clientname is not a mutable field")) |
|
90 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("clientname", newAuth.ClientName, "clientname is not a mutable field")) |
|
91 | 91 |
} |
92 | 92 |
if oldAuth.UserName != newAuth.UserName { |
93 |
- allErrs = append(allErrs, errs.NewFieldInvalid("username", newAuth.UserName, "username is not a mutable field")) |
|
93 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("username", newAuth.UserName, "username is not a mutable field")) |
|
94 | 94 |
} |
95 | 95 |
if oldAuth.UserUID != newAuth.UserUID { |
96 |
- allErrs = append(allErrs, errs.NewFieldInvalid("useruid", newAuth.UserUID, "useruid is not a mutable field")) |
|
96 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("useruid", newAuth.UserUID, "useruid is not a mutable field")) |
|
97 | 97 |
} |
98 | 98 |
allErrs = append(allErrs, validateLabels(newAuth.Labels)...) |
99 | 99 |
return allErrs |
100 | 100 |
} |
101 | 101 |
|
102 |
-func validateLabels(labels map[string]string) errs.ValidationErrorList { |
|
103 |
- allErrs := errs.ValidationErrorList{} |
|
102 |
+func validateLabels(labels map[string]string) fielderrors.ValidationErrorList { |
|
103 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
104 | 104 |
for k := range labels { |
105 | 105 |
if !util.IsDNS952Label(k) { |
106 |
- allErrs = append(allErrs, errs.NewFieldNotSupported("label", k)) |
|
106 |
+ allErrs = append(allErrs, fielderrors.NewFieldNotSupported("label", k)) |
|
107 | 107 |
} |
108 | 108 |
} |
109 | 109 |
return allErrs |
... | ... |
@@ -4,7 +4,7 @@ import ( |
4 | 4 |
"testing" |
5 | 5 |
|
6 | 6 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
7 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
8 | 8 |
oapi "github.com/openshift/origin/pkg/oauth/api" |
9 | 9 |
) |
10 | 10 |
|
... | ... |
@@ -21,7 +21,7 @@ func TestValidateClientAuthorization(t *testing.T) { |
21 | 21 |
|
22 | 22 |
errorCases := map[string]struct { |
23 | 23 |
A oapi.OAuthClientAuthorization |
24 |
- T errors.ValidationErrorType |
|
24 |
+ T fielderrors.ValidationErrorType |
|
25 | 25 |
F string |
26 | 26 |
}{ |
27 | 27 |
"zero-length name": { |
... | ... |
@@ -30,7 +30,7 @@ func TestValidateClientAuthorization(t *testing.T) { |
30 | 30 |
UserName: "myusername", |
31 | 31 |
UserUID: "myuseruid", |
32 | 32 |
}, |
33 |
- T: errors.ValidationErrorTypeRequired, |
|
33 |
+ T: fielderrors.ValidationErrorTypeRequired, |
|
34 | 34 |
F: "name", |
35 | 35 |
}, |
36 | 36 |
"disallowed namespace": { |
... | ... |
@@ -40,7 +40,7 @@ func TestValidateClientAuthorization(t *testing.T) { |
40 | 40 |
UserName: "myusername", |
41 | 41 |
UserUID: "myuseruid", |
42 | 42 |
}, |
43 |
- T: errors.ValidationErrorTypeInvalid, |
|
43 |
+ T: fielderrors.ValidationErrorTypeInvalid, |
|
44 | 44 |
F: "namespace", |
45 | 45 |
}, |
46 | 46 |
} |
... | ... |
@@ -51,10 +51,10 @@ func TestValidateClientAuthorization(t *testing.T) { |
51 | 51 |
continue |
52 | 52 |
} |
53 | 53 |
for i := range errs { |
54 |
- if errs[i].(*errors.ValidationError).Type != v.T { |
|
54 |
+ if errs[i].(*fielderrors.ValidationError).Type != v.T { |
|
55 | 55 |
t.Errorf("%s: expected errors to have type %s: %v", k, v.T, errs[i]) |
56 | 56 |
} |
57 |
- if errs[i].(*errors.ValidationError).Field != v.F { |
|
57 |
+ if errs[i].(*fielderrors.ValidationError).Field != v.F { |
|
58 | 58 |
t.Errorf("%s: expected errors to have field %s: %v", k, v.F, errs[i]) |
59 | 59 |
} |
60 | 60 |
} |
... | ... |
@@ -71,17 +71,17 @@ func TestValidateClient(t *testing.T) { |
71 | 71 |
|
72 | 72 |
errorCases := map[string]struct { |
73 | 73 |
Client oapi.OAuthClient |
74 |
- T errors.ValidationErrorType |
|
74 |
+ T fielderrors.ValidationErrorType |
|
75 | 75 |
F string |
76 | 76 |
}{ |
77 | 77 |
"zero-length name": { |
78 | 78 |
Client: oapi.OAuthClient{}, |
79 |
- T: errors.ValidationErrorTypeRequired, |
|
79 |
+ T: fielderrors.ValidationErrorTypeRequired, |
|
80 | 80 |
F: "name", |
81 | 81 |
}, |
82 | 82 |
"disallowed namespace": { |
83 | 83 |
Client: oapi.OAuthClient{ObjectMeta: api.ObjectMeta{Name: "name", Namespace: "foo"}}, |
84 |
- T: errors.ValidationErrorTypeInvalid, |
|
84 |
+ T: fielderrors.ValidationErrorTypeInvalid, |
|
85 | 85 |
F: "namespace", |
86 | 86 |
}, |
87 | 87 |
} |
... | ... |
@@ -92,10 +92,10 @@ func TestValidateClient(t *testing.T) { |
92 | 92 |
continue |
93 | 93 |
} |
94 | 94 |
for i := range errs { |
95 |
- if errs[i].(*errors.ValidationError).Type != v.T { |
|
95 |
+ if errs[i].(*fielderrors.ValidationError).Type != v.T { |
|
96 | 96 |
t.Errorf("%s: expected errors to have type %s: %v", k, v.T, errs[i]) |
97 | 97 |
} |
98 |
- if errs[i].(*errors.ValidationError).Field != v.F { |
|
98 |
+ if errs[i].(*fielderrors.ValidationError).Field != v.F { |
|
99 | 99 |
t.Errorf("%s: expected errors to have field %s: %v", k, v.F, errs[i]) |
100 | 100 |
} |
101 | 101 |
} |
... | ... |
@@ -115,7 +115,7 @@ func TestValidateAccessTokens(t *testing.T) { |
115 | 115 |
|
116 | 116 |
errorCases := map[string]struct { |
117 | 117 |
Token oapi.OAuthAccessToken |
118 |
- T errors.ValidationErrorType |
|
118 |
+ T fielderrors.ValidationErrorType |
|
119 | 119 |
F string |
120 | 120 |
}{ |
121 | 121 |
"zero-length name": { |
... | ... |
@@ -124,7 +124,7 @@ func TestValidateAccessTokens(t *testing.T) { |
124 | 124 |
UserName: "myusername", |
125 | 125 |
UserUID: "myuseruid", |
126 | 126 |
}, |
127 |
- T: errors.ValidationErrorTypeRequired, |
|
127 |
+ T: fielderrors.ValidationErrorTypeRequired, |
|
128 | 128 |
F: "name", |
129 | 129 |
}, |
130 | 130 |
"disallowed namespace": { |
... | ... |
@@ -134,7 +134,7 @@ func TestValidateAccessTokens(t *testing.T) { |
134 | 134 |
UserName: "myusername", |
135 | 135 |
UserUID: "myuseruid", |
136 | 136 |
}, |
137 |
- T: errors.ValidationErrorTypeInvalid, |
|
137 |
+ T: fielderrors.ValidationErrorTypeInvalid, |
|
138 | 138 |
F: "namespace", |
139 | 139 |
}, |
140 | 140 |
} |
... | ... |
@@ -145,10 +145,10 @@ func TestValidateAccessTokens(t *testing.T) { |
145 | 145 |
continue |
146 | 146 |
} |
147 | 147 |
for i := range errs { |
148 |
- if errs[i].(*errors.ValidationError).Type != v.T { |
|
148 |
+ if errs[i].(*fielderrors.ValidationError).Type != v.T { |
|
149 | 149 |
t.Errorf("%s: expected errors to have type %s: %v", k, v.T, errs[i]) |
150 | 150 |
} |
151 |
- if errs[i].(*errors.ValidationError).Field != v.F { |
|
151 |
+ if errs[i].(*fielderrors.ValidationError).Field != v.F { |
|
152 | 152 |
t.Errorf("%s: expected errors to have field %s: %v", k, v.F, errs[i]) |
153 | 153 |
} |
154 | 154 |
} |
... | ... |
@@ -168,7 +168,7 @@ func TestValidateAuthorizeTokens(t *testing.T) { |
168 | 168 |
|
169 | 169 |
errorCases := map[string]struct { |
170 | 170 |
Token oapi.OAuthAuthorizeToken |
171 |
- T errors.ValidationErrorType |
|
171 |
+ T fielderrors.ValidationErrorType |
|
172 | 172 |
F string |
173 | 173 |
}{ |
174 | 174 |
"zero-length name": { |
... | ... |
@@ -177,7 +177,7 @@ func TestValidateAuthorizeTokens(t *testing.T) { |
177 | 177 |
UserName: "myusername", |
178 | 178 |
UserUID: "myuseruid", |
179 | 179 |
}, |
180 |
- T: errors.ValidationErrorTypeRequired, |
|
180 |
+ T: fielderrors.ValidationErrorTypeRequired, |
|
181 | 181 |
F: "name", |
182 | 182 |
}, |
183 | 183 |
"zero-length client name": { |
... | ... |
@@ -186,7 +186,7 @@ func TestValidateAuthorizeTokens(t *testing.T) { |
186 | 186 |
UserName: "myusername", |
187 | 187 |
UserUID: "myuseruid", |
188 | 188 |
}, |
189 |
- T: errors.ValidationErrorTypeRequired, |
|
189 |
+ T: fielderrors.ValidationErrorTypeRequired, |
|
190 | 190 |
F: "clientname", |
191 | 191 |
}, |
192 | 192 |
"zero-length user name": { |
... | ... |
@@ -195,7 +195,7 @@ func TestValidateAuthorizeTokens(t *testing.T) { |
195 | 195 |
ClientName: "myclient", |
196 | 196 |
UserUID: "myuseruid", |
197 | 197 |
}, |
198 |
- T: errors.ValidationErrorTypeRequired, |
|
198 |
+ T: fielderrors.ValidationErrorTypeRequired, |
|
199 | 199 |
F: "username", |
200 | 200 |
}, |
201 | 201 |
"zero-length user uid": { |
... | ... |
@@ -204,7 +204,7 @@ func TestValidateAuthorizeTokens(t *testing.T) { |
204 | 204 |
ClientName: "myclient", |
205 | 205 |
UserName: "myusername", |
206 | 206 |
}, |
207 |
- T: errors.ValidationErrorTypeRequired, |
|
207 |
+ T: fielderrors.ValidationErrorTypeRequired, |
|
208 | 208 |
F: "useruid", |
209 | 209 |
}, |
210 | 210 |
"disallowed namespace": { |
... | ... |
@@ -214,7 +214,7 @@ func TestValidateAuthorizeTokens(t *testing.T) { |
214 | 214 |
UserName: "myusername", |
215 | 215 |
UserUID: "myuseruid", |
216 | 216 |
}, |
217 |
- T: errors.ValidationErrorTypeInvalid, |
|
217 |
+ T: fielderrors.ValidationErrorTypeInvalid, |
|
218 | 218 |
F: "namespace", |
219 | 219 |
}, |
220 | 220 |
} |
... | ... |
@@ -225,10 +225,10 @@ func TestValidateAuthorizeTokens(t *testing.T) { |
225 | 225 |
continue |
226 | 226 |
} |
227 | 227 |
for i := range errs { |
228 |
- if errs[i].(*errors.ValidationError).Type != v.T { |
|
228 |
+ if errs[i].(*fielderrors.ValidationError).Type != v.T { |
|
229 | 229 |
t.Errorf("%s: expected errors to have type %s: %v", k, v.T, errs[i]) |
230 | 230 |
} |
231 |
- if errs[i].(*errors.ValidationError).Field != v.F { |
|
231 |
+ if errs[i].(*fielderrors.ValidationError).Field != v.F { |
|
232 | 232 |
t.Errorf("%s: expected errors to have field %s: %v", k, v.F, errs[i]) |
233 | 233 |
} |
234 | 234 |
} |
... | ... |
@@ -5,7 +5,6 @@ import ( |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 | 7 |
kerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
8 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -20,7 +19,7 @@ type REST struct { |
20 | 20 |
} |
21 | 21 |
|
22 | 22 |
// NewStorage returns a new REST. |
23 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
23 |
+func NewREST(registry Registry) *REST { |
|
24 | 24 |
return &REST{registry} |
25 | 25 |
} |
26 | 26 |
|
... | ... |
@@ -5,7 +5,6 @@ import ( |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 | 7 |
kerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
8 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -20,7 +19,7 @@ type REST struct { |
20 | 20 |
} |
21 | 21 |
|
22 | 22 |
// NewStorage returns a new REST. |
23 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
23 |
+func NewREST(registry Registry) *REST { |
|
24 | 24 |
return &REST{registry} |
25 | 25 |
} |
26 | 26 |
|
... | ... |
@@ -5,7 +5,6 @@ import ( |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 | 7 |
kerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
8 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -20,7 +19,7 @@ type REST struct { |
20 | 20 |
} |
21 | 21 |
|
22 | 22 |
// NewStorage returns a new REST. |
23 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
23 |
+func NewREST(registry Registry) *REST { |
|
24 | 24 |
return &REST{registry} |
25 | 25 |
} |
26 | 26 |
|
... | ... |
@@ -6,7 +6,6 @@ import ( |
6 | 6 |
|
7 | 7 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
8 | 8 |
kerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
9 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
12 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -21,7 +20,7 @@ type REST struct { |
21 | 21 |
} |
22 | 22 |
|
23 | 23 |
// NewStorage returns a new REST. |
24 |
-func NewREST(registry Registry) apiserver.RESTStorage { |
|
24 |
+func NewREST(registry Registry) *REST { |
|
25 | 25 |
return &REST{registry} |
26 | 26 |
} |
27 | 27 |
|
... | ... |
@@ -3,24 +3,24 @@ package validation |
3 | 3 |
import ( |
4 | 4 |
"strings" |
5 | 5 |
|
6 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
7 | 6 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
7 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
8 | 8 |
"github.com/openshift/origin/pkg/project/api" |
9 | 9 |
) |
10 | 10 |
|
11 | 11 |
// ValidateProject tests required fields for a Project. |
12 |
-func ValidateProject(project *api.Project) errors.ValidationErrorList { |
|
13 |
- result := errors.ValidationErrorList{} |
|
12 |
+func ValidateProject(project *api.Project) fielderrors.ValidationErrorList { |
|
13 |
+ result := fielderrors.ValidationErrorList{} |
|
14 | 14 |
if len(project.Name) == 0 { |
15 |
- result = append(result, errors.NewFieldRequired("name")) |
|
15 |
+ result = append(result, fielderrors.NewFieldRequired("name")) |
|
16 | 16 |
} else if !util.IsDNS1123Subdomain(project.Name) { |
17 |
- result = append(result, errors.NewFieldInvalid("name", project.Name, "does not conform to lower-cased dns1123")) |
|
17 |
+ result = append(result, fielderrors.NewFieldInvalid("name", project.Name, "does not conform to lower-cased dns1123")) |
|
18 | 18 |
} |
19 | 19 |
if len(project.Namespace) > 0 { |
20 |
- result = append(result, errors.NewFieldInvalid("namespace", project.Namespace, "must be the empty-string")) |
|
20 |
+ result = append(result, fielderrors.NewFieldInvalid("namespace", project.Namespace, "must be the empty-string")) |
|
21 | 21 |
} |
22 | 22 |
if !validateNoNewLineOrTab(project.DisplayName) { |
23 |
- result = append(result, errors.NewFieldInvalid("displayName", project.DisplayName, "may not contain a new line or tab")) |
|
23 |
+ result = append(result, fielderrors.NewFieldInvalid("displayName", project.DisplayName, "may not contain a new line or tab")) |
|
24 | 24 |
} |
25 | 25 |
return result |
26 | 26 |
} |
... | ... |
@@ -116,7 +116,7 @@ func (ac *AuthorizationCache) Run(period time.Duration) { |
116 | 116 |
namespaceReflector := cache.NewReflector( |
117 | 117 |
&cache.ListWatch{ |
118 | 118 |
ListFunc: func() (runtime.Object, error) { |
119 |
- return ac.namespaceInterface.List(labels.Everything()) |
|
119 |
+ return ac.namespaceInterface.List(labels.Everything(), fields.Everything()) |
|
120 | 120 |
}, |
121 | 121 |
WatchFunc: func(resourceVersion string) (watch.Interface, error) { |
122 | 122 |
return ac.namespaceInterface.Watch(labels.Everything(), fields.Everything(), resourceVersion) |
... | ... |
@@ -27,7 +27,7 @@ type NamespaceControllerFactory struct { |
27 | 27 |
func (factory *NamespaceControllerFactory) Create() controller.RunnableController { |
28 | 28 |
namespaceLW := &cache.ListWatch{ |
29 | 29 |
ListFunc: func() (runtime.Object, error) { |
30 |
- return factory.KubeClient.Namespaces().List(labels.Everything()) |
|
30 |
+ return factory.KubeClient.Namespaces().List(labels.Everything(), fields.Everything()) |
|
31 | 31 |
}, |
32 | 32 |
WatchFunc: func(resourceVersion string) (watch.Interface, error) { |
33 | 33 |
return factory.KubeClient.Namespaces().Watch(labels.Everything(), fields.Everything(), resourceVersion) |
... | ... |
@@ -5,7 +5,6 @@ import ( |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 | 7 |
kerrors "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
8 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
9 | 8 |
kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
... | ... |
@@ -22,7 +21,7 @@ type REST struct { |
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
// NewREST returns a RESTStorage object that will work against Project resources |
25 |
-func NewREST(client kclient.NamespaceInterface, lister projectauth.Lister) apiserver.RESTStorage { |
|
25 |
+func NewREST(client kclient.NamespaceInterface, lister projectauth.Lister) *REST { |
|
26 | 26 |
return &REST{client: client, lister: lister} |
27 | 27 |
} |
28 | 28 |
|
... | ... |
@@ -3,16 +3,16 @@ package validation |
3 | 3 |
import ( |
4 | 4 |
"strings" |
5 | 5 |
|
6 |
- errs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
7 | 6 |
kval "github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation" |
8 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
8 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
9 | 9 |
|
10 | 10 |
routeapi "github.com/openshift/origin/pkg/route/api" |
11 | 11 |
) |
12 | 12 |
|
13 | 13 |
// ValidateRoute tests if required fields in the route are set. |
14 |
-func ValidateRoute(route *routeapi.Route) errs.ValidationErrorList { |
|
15 |
- result := errs.ValidationErrorList{} |
|
14 |
+func ValidateRoute(route *routeapi.Route) fielderrors.ValidationErrorList { |
|
15 |
+ result := fielderrors.ValidationErrorList{} |
|
16 | 16 |
|
17 | 17 |
//ensure meta is set properly |
18 | 18 |
result = append(result, kval.ValidateObjectMeta(&route.ObjectMeta, true, kval.ValidatePodName)...) |
... | ... |
@@ -20,16 +20,16 @@ func ValidateRoute(route *routeapi.Route) errs.ValidationErrorList { |
20 | 20 |
//host is not required but if it is set ensure it meets DNS requirements |
21 | 21 |
if len(route.Host) > 0 { |
22 | 22 |
if !util.IsDNS1123Subdomain(route.Host) { |
23 |
- result = append(result, errs.NewFieldInvalid("host", route.Host, "Host must conform to DNS 952 subdomain conventions")) |
|
23 |
+ result = append(result, fielderrors.NewFieldInvalid("host", route.Host, "Host must conform to DNS 952 subdomain conventions")) |
|
24 | 24 |
} |
25 | 25 |
} |
26 | 26 |
|
27 | 27 |
if len(route.Path) > 0 && !strings.HasPrefix(route.Path, "/") { |
28 |
- result = append(result, errs.NewFieldInvalid("path", route.Path, "Path must begin with /")) |
|
28 |
+ result = append(result, fielderrors.NewFieldInvalid("path", route.Path, "Path must begin with /")) |
|
29 | 29 |
} |
30 | 30 |
|
31 | 31 |
if len(route.ServiceName) == 0 { |
32 |
- result = append(result, errs.NewFieldRequired("serviceName")) |
|
32 |
+ result = append(result, fielderrors.NewFieldRequired("serviceName")) |
|
33 | 33 |
} |
34 | 34 |
|
35 | 35 |
if errs := validateTLS(route.TLS); len(errs) != 0 { |
... | ... |
@@ -41,8 +41,8 @@ func ValidateRoute(route *routeapi.Route) errs.ValidationErrorList { |
41 | 41 |
|
42 | 42 |
// ValidateTLS tests fields for different types of TLS combinations are set. Called |
43 | 43 |
// by ValidateRoute. |
44 |
-func validateTLS(tls *routeapi.TLSConfig) errs.ValidationErrorList { |
|
45 |
- result := errs.ValidationErrorList{} |
|
44 |
+func validateTLS(tls *routeapi.TLSConfig) fielderrors.ValidationErrorList { |
|
45 |
+ result := fielderrors.ValidationErrorList{} |
|
46 | 46 |
|
47 | 47 |
//no termination, ignore other settings |
48 | 48 |
if tls == nil || tls.Termination == "" { |
... | ... |
@@ -52,57 +52,57 @@ func validateTLS(tls *routeapi.TLSConfig) errs.ValidationErrorList { |
52 | 52 |
//reencrypt must specify cert, key, cacert, and destination ca cert |
53 | 53 |
if tls.Termination == routeapi.TLSTerminationReencrypt { |
54 | 54 |
if len(tls.Certificate) == 0 { |
55 |
- result = append(result, errs.NewFieldRequired("certificate")) |
|
55 |
+ result = append(result, fielderrors.NewFieldRequired("certificate")) |
|
56 | 56 |
} |
57 | 57 |
|
58 | 58 |
if len(tls.Key) == 0 { |
59 |
- result = append(result, errs.NewFieldRequired("key")) |
|
59 |
+ result = append(result, fielderrors.NewFieldRequired("key")) |
|
60 | 60 |
} |
61 | 61 |
|
62 | 62 |
if len(tls.CACertificate) == 0 { |
63 |
- result = append(result, errs.NewFieldRequired("caCertificate")) |
|
63 |
+ result = append(result, fielderrors.NewFieldRequired("caCertificate")) |
|
64 | 64 |
} |
65 | 65 |
|
66 | 66 |
if len(tls.DestinationCACertificate) == 0 { |
67 |
- result = append(result, errs.NewFieldRequired("destinationCACertificate")) |
|
67 |
+ result = append(result, fielderrors.NewFieldRequired("destinationCACertificate")) |
|
68 | 68 |
} |
69 | 69 |
} |
70 | 70 |
|
71 | 71 |
//passthrough term should not specify any cert |
72 | 72 |
if tls.Termination == routeapi.TLSTerminationPassthrough { |
73 | 73 |
if len(tls.Certificate) > 0 { |
74 |
- result = append(result, errs.NewFieldInvalid("certificate", tls.Certificate, "passthrough termination does not support certificates")) |
|
74 |
+ result = append(result, fielderrors.NewFieldInvalid("certificate", tls.Certificate, "passthrough termination does not support certificates")) |
|
75 | 75 |
} |
76 | 76 |
|
77 | 77 |
if len(tls.Key) > 0 { |
78 |
- result = append(result, errs.NewFieldInvalid("key", tls.Key, "passthrough termination does not support certificates")) |
|
78 |
+ result = append(result, fielderrors.NewFieldInvalid("key", tls.Key, "passthrough termination does not support certificates")) |
|
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
if len(tls.CACertificate) > 0 { |
82 |
- result = append(result, errs.NewFieldInvalid("caCertificate", tls.CACertificate, "passthrough termination does not support certificates")) |
|
82 |
+ result = append(result, fielderrors.NewFieldInvalid("caCertificate", tls.CACertificate, "passthrough termination does not support certificates")) |
|
83 | 83 |
} |
84 | 84 |
|
85 | 85 |
if len(tls.DestinationCACertificate) > 0 { |
86 |
- result = append(result, errs.NewFieldInvalid("destinationCACertificate", tls.DestinationCACertificate, "passthrough termination does not support certificates")) |
|
86 |
+ result = append(result, fielderrors.NewFieldInvalid("destinationCACertificate", tls.DestinationCACertificate, "passthrough termination does not support certificates")) |
|
87 | 87 |
} |
88 | 88 |
} |
89 | 89 |
|
90 | 90 |
//edge cert should specify cert, key, and cacert |
91 | 91 |
if tls.Termination == routeapi.TLSTerminationEdge { |
92 | 92 |
if len(tls.Certificate) == 0 { |
93 |
- result = append(result, errs.NewFieldRequired("certificate")) |
|
93 |
+ result = append(result, fielderrors.NewFieldRequired("certificate")) |
|
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
if len(tls.Key) == 0 { |
97 |
- result = append(result, errs.NewFieldRequired("key")) |
|
97 |
+ result = append(result, fielderrors.NewFieldRequired("key")) |
|
98 | 98 |
} |
99 | 99 |
|
100 | 100 |
if len(tls.CACertificate) == 0 { |
101 |
- result = append(result, errs.NewFieldRequired("caCertificate")) |
|
101 |
+ result = append(result, fielderrors.NewFieldRequired("caCertificate")) |
|
102 | 102 |
} |
103 | 103 |
|
104 | 104 |
if len(tls.DestinationCACertificate) > 0 { |
105 |
- result = append(result, errs.NewFieldInvalid("destinationCACertificate", tls.DestinationCACertificate, "edge termination does not support destination certificates")) |
|
105 |
+ result = append(result, fielderrors.NewFieldInvalid("destinationCACertificate", tls.DestinationCACertificate, "edge termination does not support destination certificates")) |
|
106 | 106 |
} |
107 | 107 |
} |
108 | 108 |
|
... | ... |
@@ -4,8 +4,8 @@ import ( |
4 | 4 |
"fmt" |
5 | 5 |
"regexp" |
6 | 6 |
|
7 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
8 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation" |
8 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
9 | 9 |
|
10 | 10 |
"github.com/openshift/origin/pkg/template/api" |
11 | 11 |
) |
... | ... |
@@ -13,37 +13,37 @@ import ( |
13 | 13 |
var parameterNameExp = regexp.MustCompile(`^[a-zA-Z0-9\_]+$`) |
14 | 14 |
|
15 | 15 |
// ValidateParameter tests if required fields in the Parameter are set. |
16 |
-func ValidateParameter(param *api.Parameter) (errs errors.ValidationErrorList) { |
|
16 |
+func ValidateParameter(param *api.Parameter) (errs fielderrors.ValidationErrorList) { |
|
17 | 17 |
if len(param.Name) == 0 { |
18 |
- errs = append(errs, errors.NewFieldRequired("name")) |
|
18 |
+ errs = append(errs, fielderrors.NewFieldRequired("name")) |
|
19 | 19 |
return |
20 | 20 |
} |
21 | 21 |
if !parameterNameExp.MatchString(param.Name) { |
22 |
- errs = append(errs, errors.NewFieldInvalid("name", param.Name, fmt.Sprintf("does not match %v", parameterNameExp))) |
|
22 |
+ errs = append(errs, fielderrors.NewFieldInvalid("name", param.Name, fmt.Sprintf("does not match %v", parameterNameExp))) |
|
23 | 23 |
} |
24 | 24 |
return |
25 | 25 |
} |
26 | 26 |
|
27 | 27 |
// ValidateProcessedTemplate tests if required fields in the Template are set for processing |
28 |
-func ValidateProcessedTemplate(template *api.Template) errors.ValidationErrorList { |
|
28 |
+func ValidateProcessedTemplate(template *api.Template) fielderrors.ValidationErrorList { |
|
29 | 29 |
return validateTemplateBody(template) |
30 | 30 |
} |
31 | 31 |
|
32 | 32 |
// ValidateTemplate tests if required fields in the Template are set. |
33 |
-func ValidateTemplate(template *api.Template) (errs errors.ValidationErrorList) { |
|
33 |
+func ValidateTemplate(template *api.Template) (errs fielderrors.ValidationErrorList) { |
|
34 | 34 |
errs = validation.ValidateObjectMeta(&template.ObjectMeta, true, validation.ValidatePodName).Prefix("metadata") |
35 | 35 |
errs = append(errs, validateTemplateBody(template)...) |
36 | 36 |
return |
37 | 37 |
} |
38 | 38 |
|
39 | 39 |
// ValidateTemplateUpdate tests if required fields in the template are set during an update |
40 |
-func ValidateTemplateUpdate(oldTemplate, template *api.Template) errors.ValidationErrorList { |
|
40 |
+func ValidateTemplateUpdate(oldTemplate, template *api.Template) fielderrors.ValidationErrorList { |
|
41 | 41 |
errs := validation.ValidateObjectMetaUpdate(&oldTemplate.ObjectMeta, &template.ObjectMeta).Prefix("metadata") |
42 | 42 |
return errs |
43 | 43 |
} |
44 | 44 |
|
45 | 45 |
// validateTemplateBody checks the body of a template. |
46 |
-func validateTemplateBody(template *api.Template) (errs errors.ValidationErrorList) { |
|
46 |
+func validateTemplateBody(template *api.Template) (errs fielderrors.ValidationErrorList) { |
|
47 | 47 |
for i := range template.Parameters { |
48 | 48 |
paramErr := ValidateParameter(&template.Parameters[i]) |
49 | 49 |
errs = append(errs, paramErr.PrefixIndex(i).Prefix("parameters")...) |
... | ... |
@@ -5,10 +5,10 @@ import ( |
5 | 5 |
"reflect" |
6 | 6 |
|
7 | 7 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
8 |
- errs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
9 | 8 |
kmeta "github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
11 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
12 | 12 |
configapi "github.com/openshift/origin/pkg/config/api" |
13 | 13 |
deployapi "github.com/openshift/origin/pkg/deploy/api" |
14 | 14 |
) |
... | ... |
@@ -99,11 +99,11 @@ func AddObjectLabels(obj runtime.Object, labels labels.Set) error { |
99 | 99 |
} |
100 | 100 |
|
101 | 101 |
// AddConfigLabels adds new label(s) to all resources defined in the given Config. |
102 |
-func AddConfigLabels(c *configapi.Config, labels labels.Set) errs.ValidationErrorList { |
|
103 |
- itemErrors := errs.ValidationErrorList{} |
|
102 |
+func AddConfigLabels(c *configapi.Config, labels labels.Set) fielderrors.ValidationErrorList { |
|
103 |
+ itemErrors := fielderrors.ValidationErrorList{} |
|
104 | 104 |
for i, in := range c.Items { |
105 | 105 |
if err := AddObjectLabels(in, labels); err != nil { |
106 |
- reportError(&itemErrors, i, *errs.NewFieldInvalid("labels", err, fmt.Sprintf("error applying labels %v to %v", labels, in))) |
|
106 |
+ reportError(&itemErrors, i, *fielderrors.NewFieldInvalid("labels", err, fmt.Sprintf("error applying labels %v to %v", labels, in))) |
|
107 | 107 |
} |
108 | 108 |
} |
109 | 109 |
return itemErrors.Prefix("Config") |
... | ... |
@@ -4,8 +4,8 @@ import ( |
4 | 4 |
"testing" |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
7 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest/resttest" |
8 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
9 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/tools" |
10 | 10 |
|
11 | 11 |
"github.com/openshift/origin/pkg/api/latest" |
... | ... |
@@ -40,11 +40,11 @@ func validChanged() *api.Template { |
40 | 40 |
func TestStorage(t *testing.T) { |
41 | 41 |
_, helper := newHelper(t) |
42 | 42 |
storage := NewREST(helper) |
43 |
- var _ apiserver.RESTCreater = storage |
|
44 |
- var _ apiserver.RESTLister = storage |
|
45 |
- var _ apiserver.RESTGracefulDeleter = storage |
|
46 |
- var _ apiserver.RESTUpdater = storage |
|
47 |
- var _ apiserver.RESTGetter = storage |
|
43 |
+ var _ rest.Creater = storage |
|
44 |
+ var _ rest.Lister = storage |
|
45 |
+ var _ rest.GracefulDeleter = storage |
|
46 |
+ var _ rest.Updater = storage |
|
47 |
+ var _ rest.Getter = storage |
|
48 | 48 |
} |
49 | 49 |
|
50 | 50 |
func TestCreate(t *testing.T) { |
... | ... |
@@ -12,6 +12,7 @@ import ( |
12 | 12 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic" |
13 | 13 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
14 | 14 |
utilerr "github.com/GoogleCloudPlatform/kubernetes/pkg/util/errors" |
15 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
15 | 16 |
"github.com/golang/glog" |
16 | 17 |
|
17 | 18 |
"github.com/openshift/origin/pkg/template" |
... | ... |
@@ -35,12 +36,15 @@ func (templateStrategy) NamespaceScoped() bool { |
35 | 35 |
return true |
36 | 36 |
} |
37 | 37 |
|
38 |
+func (templateStrategy) PrepareForCreate(obj runtime.Object) {} |
|
39 |
+func (templateStrategy) PrepareForUpdate(obj, old runtime.Object) {} |
|
40 |
+ |
|
38 | 41 |
// ResetBeforeCreate clears fields that are not allowed to be set by end users on creation. |
39 | 42 |
func (templateStrategy) ResetBeforeCreate(obj runtime.Object) { |
40 | 43 |
} |
41 | 44 |
|
42 | 45 |
// Validate validates a new template. |
43 |
-func (templateStrategy) Validate(obj runtime.Object) errors.ValidationErrorList { |
|
46 |
+func (templateStrategy) Validate(obj runtime.Object) fielderrors.ValidationErrorList { |
|
44 | 47 |
template := obj.(*api.Template) |
45 | 48 |
return validation.ValidateTemplate(template) |
46 | 49 |
} |
... | ... |
@@ -51,7 +55,7 @@ func (templateStrategy) AllowCreateOnUpdate() bool { |
51 | 51 |
} |
52 | 52 |
|
53 | 53 |
// ValidateUpdate is the default update validation for an end user. |
54 |
-func (templateStrategy) ValidateUpdate(obj, old runtime.Object) errors.ValidationErrorList { |
|
54 |
+func (templateStrategy) ValidateUpdate(obj, old runtime.Object) fielderrors.ValidationErrorList { |
|
55 | 55 |
return validation.ValidateTemplateUpdate(obj.(*api.Template), old.(*api.Template)) |
56 | 56 |
} |
57 | 57 |
|
... | ... |
@@ -6,9 +6,9 @@ import ( |
6 | 6 |
"strings" |
7 | 7 |
|
8 | 8 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
9 |
- errs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/meta" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
11 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
12 | 12 |
configapi "github.com/openshift/origin/pkg/config/api" |
13 | 13 |
deployapi "github.com/openshift/origin/pkg/deploy/api" |
14 | 14 |
"github.com/openshift/origin/pkg/template/api" |
... | ... |
@@ -19,8 +19,8 @@ var parameterExp = regexp.MustCompile(`\$\{([a-zA-Z0-9\_]+)\}`) |
19 | 19 |
|
20 | 20 |
// reportError reports the single item validation error and properly set the |
21 | 21 |
// prefix and index to match the Config item JSON index |
22 |
-func reportError(allErrs *errs.ValidationErrorList, index int, err errs.ValidationError) { |
|
23 |
- i := errs.ValidationErrorList{} |
|
22 |
+func reportError(allErrs *fielderrors.ValidationErrorList, index int, err fielderrors.ValidationError) { |
|
23 |
+ i := fielderrors.ValidationErrorList{} |
|
24 | 24 |
*allErrs = append(*allErrs, append(i, &err).PrefixIndex(index).Prefix("item")...) |
25 | 25 |
} |
26 | 26 |
|
... | ... |
@@ -38,22 +38,22 @@ func NewProcessor(generators map[string]Generator) *Processor { |
38 | 38 |
// Parameter values using the defined set of generators first, and then it |
39 | 39 |
// substitutes all Parameter expression occurrences with their corresponding |
40 | 40 |
// values (currently in the containers' Environment variables only). |
41 |
-func (p *Processor) Process(template *api.Template) (*configapi.Config, errs.ValidationErrorList) { |
|
42 |
- templateErrors := errs.ValidationErrorList{} |
|
41 |
+func (p *Processor) Process(template *api.Template) (*configapi.Config, fielderrors.ValidationErrorList) { |
|
42 |
+ templateErrors := fielderrors.ValidationErrorList{} |
|
43 | 43 |
|
44 | 44 |
if err := p.GenerateParameterValues(template); err != nil { |
45 |
- return nil, append(templateErrors.Prefix("Template"), errs.NewFieldInvalid("parameters", err, "failure to generate parameter value")) |
|
45 |
+ return nil, append(templateErrors.Prefix("Template"), fielderrors.NewFieldInvalid("parameters", err, "failure to generate parameter value")) |
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
for i, item := range template.Objects { |
49 | 49 |
newItem, err := p.SubstituteParameters(template.Parameters, item) |
50 | 50 |
if err != nil { |
51 |
- reportError(&templateErrors, i, *errs.NewFieldNotSupported("parameters", err)) |
|
51 |
+ reportError(&templateErrors, i, *fielderrors.NewFieldNotSupported("parameters", err)) |
|
52 | 52 |
} |
53 | 53 |
// Remove namespace from the item |
54 | 54 |
itemMeta, err := meta.Accessor(newItem) |
55 | 55 |
if err != nil { |
56 |
- reportError(&templateErrors, i, *errs.NewFieldInvalid("namespace", err, "failed to remove the item namespace")) |
|
56 |
+ reportError(&templateErrors, i, *fielderrors.NewFieldInvalid("namespace", err, "failed to remove the item namespace")) |
|
57 | 57 |
} |
58 | 58 |
itemMeta.SetNamespace("") |
59 | 59 |
template.Objects[i] = newItem |
... | ... |
@@ -4,8 +4,8 @@ import ( |
4 | 4 |
"fmt" |
5 | 5 |
"strings" |
6 | 6 |
|
7 |
- errs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
8 | 7 |
kvalidation "github.com/GoogleCloudPlatform/kubernetes/pkg/api/validation" |
8 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
9 | 9 |
"github.com/openshift/origin/pkg/user/api" |
10 | 10 |
) |
11 | 11 |
|
... | ... |
@@ -75,90 +75,90 @@ func ValidateIdentityProviderUserName(name string) (bool, string) { |
75 | 75 |
return ValidateUserName(name, false) |
76 | 76 |
} |
77 | 77 |
|
78 |
-func ValidateUser(user *api.User) errs.ValidationErrorList { |
|
79 |
- allErrs := errs.ValidationErrorList{} |
|
78 |
+func ValidateUser(user *api.User) fielderrors.ValidationErrorList { |
|
79 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
80 | 80 |
allErrs = append(allErrs, kvalidation.ValidateObjectMeta(&user.ObjectMeta, false, ValidateUserName).Prefix("metadata")...) |
81 | 81 |
for index, identity := range user.Identities { |
82 | 82 |
if ok, msg := ValidateIdentityName(identity, false); !ok { |
83 |
- allErrs = append(allErrs, errs.NewFieldInvalid(fmt.Sprintf("identities[%d]", index), identity, msg)) |
|
83 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid(fmt.Sprintf("identities[%d]", index), identity, msg)) |
|
84 | 84 |
} |
85 | 85 |
} |
86 | 86 |
return allErrs |
87 | 87 |
} |
88 | 88 |
|
89 |
-func ValidateUserUpdate(user *api.User, old *api.User) errs.ValidationErrorList { |
|
90 |
- allErrs := errs.ValidationErrorList{} |
|
89 |
+func ValidateUserUpdate(user *api.User, old *api.User) fielderrors.ValidationErrorList { |
|
90 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
91 | 91 |
allErrs = append(allErrs, kvalidation.ValidateObjectMetaUpdate(&old.ObjectMeta, &user.ObjectMeta).Prefix("metadata")...) |
92 | 92 |
return allErrs |
93 | 93 |
} |
94 | 94 |
|
95 |
-func ValidateIdentity(identity *api.Identity) errs.ValidationErrorList { |
|
96 |
- allErrs := errs.ValidationErrorList{} |
|
95 |
+func ValidateIdentity(identity *api.Identity) fielderrors.ValidationErrorList { |
|
96 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
97 | 97 |
allErrs = append(allErrs, kvalidation.ValidateObjectMeta(&identity.ObjectMeta, false, ValidateIdentityName).Prefix("metadata")...) |
98 | 98 |
|
99 | 99 |
if len(identity.ProviderName) == 0 { |
100 |
- allErrs = append(allErrs, errs.NewFieldRequired("providerName")) |
|
100 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("providerName")) |
|
101 | 101 |
} else if ok, msg := ValidateIdentityProviderName(identity.ProviderName); !ok { |
102 |
- allErrs = append(allErrs, errs.NewFieldInvalid("providerName", identity.ProviderName, msg)) |
|
102 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("providerName", identity.ProviderName, msg)) |
|
103 | 103 |
} |
104 | 104 |
|
105 | 105 |
if len(identity.ProviderUserName) == 0 { |
106 |
- allErrs = append(allErrs, errs.NewFieldRequired("providerUserName")) |
|
106 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("providerUserName")) |
|
107 | 107 |
} else if ok, msg := ValidateIdentityProviderName(identity.ProviderUserName); !ok { |
108 |
- allErrs = append(allErrs, errs.NewFieldInvalid("providerUserName", identity.ProviderUserName, msg)) |
|
108 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("providerUserName", identity.ProviderUserName, msg)) |
|
109 | 109 |
} |
110 | 110 |
|
111 | 111 |
if len(identity.ProviderName) > 0 && len(identity.ProviderUserName) > 0 { |
112 | 112 |
expectedIdentityName := identity.ProviderName + ":" + identity.ProviderUserName |
113 | 113 |
if identity.Name != expectedIdentityName { |
114 |
- allErrs = append(allErrs, errs.NewFieldInvalid("user.name", identity.User.Name, fmt.Sprintf("must be %s", expectedIdentityName))) |
|
114 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("user.name", identity.User.Name, fmt.Sprintf("must be %s", expectedIdentityName))) |
|
115 | 115 |
} |
116 | 116 |
} |
117 | 117 |
|
118 | 118 |
if ok, msg := ValidateUserName(identity.User.Name, false); !ok { |
119 |
- allErrs = append(allErrs, errs.NewFieldInvalid("user.name", identity.User.Name, msg)) |
|
119 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("user.name", identity.User.Name, msg)) |
|
120 | 120 |
} |
121 | 121 |
if len(identity.User.Name) == 0 && len(identity.User.UID) != 0 { |
122 |
- allErrs = append(allErrs, errs.NewFieldInvalid("user.uid", identity.User.UID, "may not be set if user.name is empty")) |
|
122 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("user.uid", identity.User.UID, "may not be set if user.name is empty")) |
|
123 | 123 |
} |
124 | 124 |
if len(identity.User.Name) != 0 && len(identity.User.UID) == 0 { |
125 |
- allErrs = append(allErrs, errs.NewFieldRequired("user.uid")) |
|
125 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("user.uid")) |
|
126 | 126 |
} |
127 | 127 |
return allErrs |
128 | 128 |
} |
129 | 129 |
|
130 |
-func ValidateIdentityUpdate(identity *api.Identity, old *api.Identity) errs.ValidationErrorList { |
|
131 |
- allErrs := errs.ValidationErrorList{} |
|
130 |
+func ValidateIdentityUpdate(identity *api.Identity, old *api.Identity) fielderrors.ValidationErrorList { |
|
131 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
132 | 132 |
|
133 | 133 |
allErrs = append(allErrs, kvalidation.ValidateObjectMetaUpdate(&old.ObjectMeta, &identity.ObjectMeta).Prefix("metadata")...) |
134 | 134 |
|
135 | 135 |
if identity.ProviderName != old.ProviderName { |
136 |
- allErrs = append(allErrs, errs.NewFieldInvalid("providerName", identity.ProviderName, "may not change providerName")) |
|
136 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("providerName", identity.ProviderName, "may not change providerName")) |
|
137 | 137 |
} |
138 | 138 |
if identity.ProviderUserName != old.ProviderUserName { |
139 |
- allErrs = append(allErrs, errs.NewFieldInvalid("providerUserName", identity.ProviderUserName, "may not change providerUserName")) |
|
139 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("providerUserName", identity.ProviderUserName, "may not change providerUserName")) |
|
140 | 140 |
} |
141 | 141 |
|
142 | 142 |
return allErrs |
143 | 143 |
} |
144 | 144 |
|
145 |
-func ValidateUserIdentityMapping(mapping *api.UserIdentityMapping) errs.ValidationErrorList { |
|
146 |
- allErrs := errs.ValidationErrorList{} |
|
145 |
+func ValidateUserIdentityMapping(mapping *api.UserIdentityMapping) fielderrors.ValidationErrorList { |
|
146 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
147 | 147 |
allErrs = append(allErrs, kvalidation.ValidateObjectMeta(&mapping.ObjectMeta, false, ValidateIdentityName).Prefix("metadata")...) |
148 | 148 |
if len(mapping.Identity.Name) == 0 { |
149 |
- allErrs = append(allErrs, errs.NewFieldRequired("identity.name")) |
|
149 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("identity.name")) |
|
150 | 150 |
} |
151 | 151 |
if mapping.Identity.Name != mapping.Name { |
152 |
- allErrs = append(allErrs, errs.NewFieldInvalid("identity.name", mapping.Identity.Name, "must match metadata.name")) |
|
152 |
+ allErrs = append(allErrs, fielderrors.NewFieldInvalid("identity.name", mapping.Identity.Name, "must match metadata.name")) |
|
153 | 153 |
} |
154 | 154 |
if len(mapping.User.Name) == 0 { |
155 |
- allErrs = append(allErrs, errs.NewFieldRequired("user.name")) |
|
155 |
+ allErrs = append(allErrs, fielderrors.NewFieldRequired("user.name")) |
|
156 | 156 |
} |
157 | 157 |
return allErrs |
158 | 158 |
} |
159 | 159 |
|
160 |
-func ValidateUserIdentityMappingUpdate(mapping *api.UserIdentityMapping, old *api.UserIdentityMapping) errs.ValidationErrorList { |
|
161 |
- allErrs := errs.ValidationErrorList{} |
|
160 |
+func ValidateUserIdentityMappingUpdate(mapping *api.UserIdentityMapping, old *api.UserIdentityMapping) fielderrors.ValidationErrorList { |
|
161 |
+ allErrs := fielderrors.ValidationErrorList{} |
|
162 | 162 |
allErrs = append(allErrs, ValidateUserIdentityMapping(mapping)...) |
163 | 163 |
allErrs = append(allErrs, kvalidation.ValidateObjectMetaUpdate(&old.ObjectMeta, &mapping.ObjectMeta).Prefix("metadata")...) |
164 | 164 |
return allErrs |
... | ... |
@@ -2,7 +2,7 @@ package identity |
2 | 2 |
|
3 | 3 |
import ( |
4 | 4 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
5 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
5 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
6 | 6 |
|
7 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
8 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
... | ... |
@@ -30,8 +30,8 @@ func identityName(provider, identity string) string { |
30 | 30 |
// Storage is an interface for a standard REST Storage backend |
31 | 31 |
// TODO: move me somewhere common |
32 | 32 |
type Storage interface { |
33 |
- apiserver.RESTLister |
|
34 |
- apiserver.RESTGetter |
|
33 |
+ rest.Lister |
|
34 |
+ rest.Getter |
|
35 | 35 |
|
36 | 36 |
Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, error) |
37 | 37 |
Update(ctx kapi.Context, obj runtime.Object) (runtime.Object, bool, error) |
... | ... |
@@ -4,11 +4,11 @@ import ( |
4 | 4 |
"fmt" |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 |
- kerrs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
8 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
11 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
12 | 12 |
|
13 | 13 |
"github.com/openshift/origin/pkg/user/api" |
14 | 14 |
"github.com/openshift/origin/pkg/user/api/validation" |
... | ... |
@@ -23,6 +23,9 @@ type identityStrategy struct { |
23 | 23 |
// objects via the REST API. |
24 | 24 |
var Strategy = identityStrategy{kapi.Scheme} |
25 | 25 |
|
26 |
+func (identityStrategy) PrepareForCreate(obj runtime.Object) {} |
|
27 |
+func (identityStrategy) PrepareForUpdate(obj, old runtime.Object) {} |
|
28 |
+ |
|
26 | 29 |
// NamespaceScoped is false for users |
27 | 30 |
func (identityStrategy) NamespaceScoped() bool { |
28 | 31 |
return false |
... | ... |
@@ -38,7 +41,7 @@ func (identityStrategy) ResetBeforeCreate(obj runtime.Object) { |
38 | 38 |
} |
39 | 39 |
|
40 | 40 |
// Validate validates a new user |
41 |
-func (identityStrategy) Validate(obj runtime.Object) kerrs.ValidationErrorList { |
|
41 |
+func (identityStrategy) Validate(obj runtime.Object) fielderrors.ValidationErrorList { |
|
42 | 42 |
identity := obj.(*api.Identity) |
43 | 43 |
return validation.ValidateIdentity(identity) |
44 | 44 |
} |
... | ... |
@@ -49,7 +52,7 @@ func (identityStrategy) AllowCreateOnUpdate() bool { |
49 | 49 |
} |
50 | 50 |
|
51 | 51 |
// ValidateUpdate is the default update validation for an identity |
52 |
-func (identityStrategy) ValidateUpdate(obj, old runtime.Object) kerrs.ValidationErrorList { |
|
52 |
+func (identityStrategy) ValidateUpdate(obj, old runtime.Object) fielderrors.ValidationErrorList { |
|
53 | 53 |
return validation.ValidateIdentityUpdate(obj.(*api.Identity), old.(*api.Identity)) |
54 | 54 |
} |
55 | 55 |
|
... | ... |
@@ -11,6 +11,7 @@ import ( |
11 | 11 |
etcdgeneric "github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic/etcd" |
12 | 12 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
13 | 13 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/tools" |
14 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
14 | 15 |
|
15 | 16 |
"github.com/openshift/origin/pkg/user/api" |
16 | 17 |
"github.com/openshift/origin/pkg/user/api/validation" |
... | ... |
@@ -63,7 +64,7 @@ func (r *REST) Get(ctx kapi.Context, name string) (runtime.Object, error) { |
63 | 63 |
name = user.GetName() |
64 | 64 |
} |
65 | 65 |
if ok, details := validation.ValidateUserName(name, false); !ok { |
66 |
- return nil, kerrs.NewFieldInvalid("metadata.name", name, details) |
|
66 |
+ return nil, fielderrors.NewFieldInvalid("metadata.name", name, details) |
|
67 | 67 |
} |
68 | 68 |
|
69 | 69 |
return r.Etcd.Get(ctx, name) |
... | ... |
@@ -2,7 +2,7 @@ package user |
2 | 2 |
|
3 | 3 |
import ( |
4 | 4 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
5 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
5 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
6 | 6 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
7 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
8 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
... | ... |
@@ -25,8 +25,8 @@ type Registry interface { |
25 | 25 |
// Storage is an interface for a standard REST Storage backend |
26 | 26 |
// TODO: move me somewhere common |
27 | 27 |
type Storage interface { |
28 |
- apiserver.RESTLister |
|
29 |
- apiserver.RESTGetter |
|
28 |
+ rest.Lister |
|
29 |
+ rest.Getter |
|
30 | 30 |
|
31 | 31 |
Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, error) |
32 | 32 |
Update(ctx kapi.Context, obj runtime.Object) (runtime.Object, bool, error) |
... | ... |
@@ -4,11 +4,11 @@ import ( |
4 | 4 |
"fmt" |
5 | 5 |
|
6 | 6 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
7 |
- kerrs "github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
|
8 | 7 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields" |
9 | 8 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels" |
10 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/generic" |
11 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
11 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
12 | 12 |
|
13 | 13 |
"github.com/openshift/origin/pkg/user/api" |
14 | 14 |
"github.com/openshift/origin/pkg/user/api/validation" |
... | ... |
@@ -23,6 +23,9 @@ type userStrategy struct { |
23 | 23 |
// objects via the REST API. |
24 | 24 |
var Strategy = userStrategy{kapi.Scheme} |
25 | 25 |
|
26 |
+func (userStrategy) PrepareForCreate(obj runtime.Object) {} |
|
27 |
+func (userStrategy) PrepareForUpdate(obj, old runtime.Object) {} |
|
28 |
+ |
|
26 | 29 |
// NamespaceScoped is false for users |
27 | 30 |
func (userStrategy) NamespaceScoped() bool { |
28 | 31 |
return false |
... | ... |
@@ -36,7 +39,7 @@ func (userStrategy) ResetBeforeCreate(obj runtime.Object) { |
36 | 36 |
} |
37 | 37 |
|
38 | 38 |
// Validate validates a new user |
39 |
-func (userStrategy) Validate(obj runtime.Object) kerrs.ValidationErrorList { |
|
39 |
+func (userStrategy) Validate(obj runtime.Object) fielderrors.ValidationErrorList { |
|
40 | 40 |
user := obj.(*api.User) |
41 | 41 |
return validation.ValidateUser(user) |
42 | 42 |
} |
... | ... |
@@ -47,7 +50,7 @@ func (userStrategy) AllowCreateOnUpdate() bool { |
47 | 47 |
} |
48 | 48 |
|
49 | 49 |
// ValidateUpdate is the default update validation for an end user. |
50 |
-func (userStrategy) ValidateUpdate(obj, old runtime.Object) kerrs.ValidationErrorList { |
|
50 |
+func (userStrategy) ValidateUpdate(obj, old runtime.Object) fielderrors.ValidationErrorList { |
|
51 | 51 |
return validation.ValidateUserUpdate(obj.(*api.User), old.(*api.User)) |
52 | 52 |
} |
53 | 53 |
|
... | ... |
@@ -2,7 +2,7 @@ package useridentitymapping |
2 | 2 |
|
3 | 3 |
import ( |
4 | 4 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
5 |
- "github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
|
5 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
6 | 6 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
7 | 7 |
|
8 | 8 |
"github.com/openshift/origin/pkg/user/api" |
... | ... |
@@ -23,8 +23,8 @@ type Registry interface { |
23 | 23 |
// Storage is an interface for a standard REST Storage backend |
24 | 24 |
// TODO: move me somewhere common |
25 | 25 |
type Storage interface { |
26 |
- apiserver.RESTGetter |
|
27 |
- apiserver.RESTDeleter |
|
26 |
+ rest.Getter |
|
27 |
+ rest.Deleter |
|
28 | 28 |
|
29 | 29 |
Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, error) |
30 | 30 |
Update(ctx kapi.Context, obj runtime.Object) (runtime.Object, bool, error) |
... | ... |
@@ -9,6 +9,7 @@ import ( |
9 | 9 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
10 | 10 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime" |
11 | 11 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/util" |
12 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/util/fielderrors" |
|
12 | 13 |
"github.com/golang/glog" |
13 | 14 |
|
14 | 15 |
"github.com/openshift/origin/pkg/user/api" |
... | ... |
@@ -39,6 +40,9 @@ type userIdentityMappingStrategy struct { |
39 | 39 |
// objects via the REST API. |
40 | 40 |
var Strategy = userIdentityMappingStrategy{kapi.Scheme} |
41 | 41 |
|
42 |
+func (userIdentityMappingStrategy) PrepareForCreate(obj runtime.Object) {} |
|
43 |
+func (userIdentityMappingStrategy) PrepareForUpdate(obj, old runtime.Object) {} |
|
44 |
+ |
|
42 | 45 |
// New returns a new UserIdentityMapping for use with Create. |
43 | 46 |
func (r *REST) New() runtime.Object { |
44 | 47 |
return &api.UserIdentityMapping{} |
... | ... |
@@ -95,13 +99,13 @@ func (s userIdentityMappingStrategy) ResetBeforeUpdate(obj runtime.Object) { |
95 | 95 |
} |
96 | 96 |
|
97 | 97 |
// Validate validates a new UserIdentityMapping. |
98 |
-func (s userIdentityMappingStrategy) Validate(obj runtime.Object) kerrs.ValidationErrorList { |
|
98 |
+func (s userIdentityMappingStrategy) Validate(obj runtime.Object) fielderrors.ValidationErrorList { |
|
99 | 99 |
mapping := obj.(*api.UserIdentityMapping) |
100 | 100 |
return validation.ValidateUserIdentityMapping(mapping) |
101 | 101 |
} |
102 | 102 |
|
103 | 103 |
// Validate validates an updated UserIdentityMapping. |
104 |
-func (s userIdentityMappingStrategy) ValidateUpdate(obj runtime.Object, old runtime.Object) kerrs.ValidationErrorList { |
|
104 |
+func (s userIdentityMappingStrategy) ValidateUpdate(obj runtime.Object, old runtime.Object) fielderrors.ValidationErrorList { |
|
105 | 105 |
mapping := obj.(*api.UserIdentityMapping) |
106 | 106 |
oldmapping := old.(*api.UserIdentityMapping) |
107 | 107 |
return validation.ValidateUserIdentityMappingUpdate(mapping, oldmapping) |
... | ... |
@@ -187,8 +191,8 @@ func (s *REST) createOrUpdate(ctx kapi.Context, obj runtime.Object, forceCreate |
187 | 187 |
|
188 | 188 |
// Validate identity |
189 | 189 |
if kerrs.IsNotFound(identityErr) { |
190 |
- errs := kerrs.ValidationErrorList([]error{ |
|
191 |
- kerrs.NewFieldInvalid("identity.name", mapping.Identity.Name, "referenced identity does not exist"), |
|
190 |
+ errs := fielderrors.ValidationErrorList([]error{ |
|
191 |
+ fielderrors.NewFieldInvalid("identity.name", mapping.Identity.Name, "referenced identity does not exist"), |
|
192 | 192 |
}) |
193 | 193 |
return nil, false, kerrs.NewInvalid("UserIdentityMapping", mapping.Name, errs) |
194 | 194 |
} |
... | ... |
@@ -196,8 +200,8 @@ func (s *REST) createOrUpdate(ctx kapi.Context, obj runtime.Object, forceCreate |
196 | 196 |
// Get new user |
197 | 197 |
newUser, err := s.userRegistry.GetUser(ctx, mapping.User.Name) |
198 | 198 |
if kerrs.IsNotFound(err) { |
199 |
- errs := kerrs.ValidationErrorList([]error{ |
|
200 |
- kerrs.NewFieldInvalid("user.name", mapping.User.Name, "referenced user does not exist"), |
|
199 |
+ errs := fielderrors.ValidationErrorList([]error{ |
|
200 |
+ fielderrors.NewFieldInvalid("user.name", mapping.User.Name, "referenced user does not exist"), |
|
201 | 201 |
}) |
202 | 202 |
return nil, false, kerrs.NewInvalid("UserIdentityMapping", mapping.Name, errs) |
203 | 203 |
} |
... | ... |
@@ -10,6 +10,7 @@ import ( |
10 | 10 |
|
11 | 11 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
12 | 12 |
klatest "github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest" |
13 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
13 | 14 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
14 | 15 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
15 | 16 |
kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
... | ... |
@@ -208,7 +209,7 @@ func NewTestBuildOpenshift(t *testing.T) *testBuildOpenshift { |
208 | 208 |
} |
209 | 209 |
buildClone, buildConfigInstantiate := buildgenerator.NewREST(buildGenerator) |
210 | 210 |
|
211 |
- storage := map[string]apiserver.RESTStorage{ |
|
211 |
+ storage := map[string]rest.Storage{ |
|
212 | 212 |
"builds": buildregistry.NewREST(buildEtcd), |
213 | 213 |
"builds/clone": buildClone, |
214 | 214 |
"buildConfigs": buildconfigregistry.NewREST(buildEtcd), |
... | ... |
@@ -11,6 +11,7 @@ import ( |
11 | 11 |
|
12 | 12 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
13 | 13 |
klatest "github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest" |
14 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
14 | 15 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
15 | 16 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
16 | 17 |
kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
... | ... |
@@ -306,15 +307,6 @@ func assertEnvVarEquals(name string, value string, deployment *kapi.ReplicationC |
306 | 306 |
t.Fatalf("Expected env var with name %s and value %s", name, value) |
307 | 307 |
} |
308 | 308 |
|
309 |
-type podInfoGetter struct { |
|
310 |
- PodInfo kapi.PodInfo |
|
311 |
- Error error |
|
312 |
-} |
|
313 |
- |
|
314 |
-func (p *podInfoGetter) GetPodInfo(host, namespace, podID string) (kapi.PodInfo, error) { |
|
315 |
- return p.PodInfo, p.Error |
|
316 |
-} |
|
317 |
- |
|
318 | 309 |
type testOpenshift struct { |
319 | 310 |
Client *osclient.Client |
320 | 311 |
KubeClient kclient.Interface |
... | ... |
@@ -389,7 +381,7 @@ func NewTestOpenshift(t *testing.T) *testOpenshift { |
389 | 389 |
} |
390 | 390 |
buildClone, buildConfigInstantiate := buildgenerator.NewREST(buildGenerator) |
391 | 391 |
|
392 |
- storage := map[string]apiserver.RESTStorage{ |
|
392 |
+ storage := map[string]rest.Storage{ |
|
393 | 393 |
"images": imageStorage, |
394 | 394 |
"imageStreams": imageRepositoryStorage, |
395 | 395 |
"imageStreamImages": imageStreamImageStorage, |
... | ... |
@@ -11,6 +11,7 @@ import ( |
11 | 11 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
12 | 12 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/errors" |
13 | 13 |
klatest "github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest" |
14 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
14 | 15 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
15 | 16 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
16 | 17 |
kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
... | ... |
@@ -76,6 +77,10 @@ func TestImageRepositoryCreate(t *testing.T) { |
76 | 76 |
if err != nil { |
77 | 77 |
t.Fatalf("Unexpected error: %v", err) |
78 | 78 |
} |
79 |
+ |
|
80 |
+ // compareImageRepos compares everything except the status.dockerimagerepository which can be |
|
81 |
+ // changed after create |
|
82 |
+ actual.Status.DockerImageRepository = expected.Status.DockerImageRepository |
|
79 | 83 |
if !reflect.DeepEqual(expected, actual) { |
80 | 84 |
t.Errorf("unexpected object: %s", util.ObjectDiff(expected, actual)) |
81 | 85 |
} |
... | ... |
@@ -299,7 +304,7 @@ func NewTestImageOpenShift(t *testing.T) *testImageOpenshift { |
299 | 299 |
imageRepositoryStorage, imageRepositoryStatus := imagerepositoryetcd.NewREST(etcdHelper, imagerepository.DefaultRegistryFunc(func() (string, bool) { return openshift.dockerServer.URL, true })) |
300 | 300 |
imageRepositoryRegistry := imagerepository.NewRegistry(imageRepositoryStorage, imageRepositoryStatus) |
301 | 301 |
|
302 |
- storage := map[string]apiserver.RESTStorage{ |
|
302 |
+ storage := map[string]rest.Storage{ |
|
303 | 303 |
"images": imageStorage, |
304 | 304 |
"imageRepositories": imageRepositoryStorage, |
305 | 305 |
"imageRepositories/status": imageRepositoryStatus, |
... | ... |
@@ -9,6 +9,7 @@ import ( |
9 | 9 |
|
10 | 10 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
11 | 11 |
klatest "github.com/GoogleCloudPlatform/kubernetes/pkg/api/latest" |
12 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
12 | 13 |
kv1beta1 "github.com/GoogleCloudPlatform/kubernetes/pkg/api/v1beta1" |
13 | 14 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
14 | 15 |
kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
... | ... |
@@ -39,8 +40,8 @@ func TestProjectIsNamespace(t *testing.T) { |
39 | 39 |
|
40 | 40 |
// create a kube and its client |
41 | 41 |
kubeInterfaces, _ := klatest.InterfacesFor(klatest.Version) |
42 |
- namespaceStorage := namespaceetcd.NewREST(etcdHelper) |
|
43 |
- kubeStorage := map[string]apiserver.RESTStorage{ |
|
42 |
+ namespaceStorage, _, _ := namespaceetcd.NewStorage(etcdHelper) |
|
43 |
+ kubeStorage := map[string]rest.Storage{ |
|
44 | 44 |
"namespaces": namespaceStorage, |
45 | 45 |
} |
46 | 46 |
|
... | ... |
@@ -76,7 +77,7 @@ func TestProjectIsNamespace(t *testing.T) { |
76 | 76 |
|
77 | 77 |
// create an origin |
78 | 78 |
originInterfaces, _ := latest.InterfacesFor(latest.Version) |
79 |
- originStorage := map[string]apiserver.RESTStorage{ |
|
79 |
+ originStorage := map[string]rest.Storage{ |
|
80 | 80 |
"projects": projectregistry.NewREST(kubeClient.Namespaces(), nil), |
81 | 81 |
} |
82 | 82 |
osVersion := &apiserver.APIGroupVersion{ |
... | ... |
@@ -9,6 +9,7 @@ import ( |
9 | 9 |
"testing" |
10 | 10 |
|
11 | 11 |
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api" |
12 |
+ "github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest" |
|
12 | 13 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver" |
13 | 14 |
kclient "github.com/GoogleCloudPlatform/kubernetes/pkg/client" |
14 | 15 |
"github.com/GoogleCloudPlatform/kubernetes/pkg/master" |
... | ... |
@@ -53,7 +54,7 @@ func TestTemplateTransformationFromConfig(t *testing.T) { |
53 | 53 |
|
54 | 54 |
osClient := osclient.NewOrDie(&kclient.Config{Host: server.URL}) |
55 | 55 |
|
56 |
- storage := map[string]apiserver.RESTStorage{ |
|
56 |
+ storage := map[string]rest.Storage{ |
|
57 | 57 |
"templateConfigs": templateregistry.NewREST(), |
58 | 58 |
} |
59 | 59 |
|
... | ... |
@@ -138,9 +138,9 @@ func CreateServiceForPod(pod *kapi.Pod, ns string) *kapi.Service { |
138 | 138 |
Name: ns, |
139 | 139 |
}, |
140 | 140 |
Spec: kapi.ServiceSpec{ |
141 |
- Selector: map[string]string{"name": pod.Name}, |
|
142 |
- ContainerPort: kubeutil.IntOrString{Kind: kubeutil.IntstrInt, IntVal: 8080}, |
|
143 |
- Port: 8080, |
|
141 |
+ Selector: map[string]string{"name": pod.Name}, |
|
142 |
+ TargetPort: kubeutil.IntOrString{Kind: kubeutil.IntstrInt, IntVal: 8080}, |
|
143 |
+ Port: 8080, |
|
144 | 144 |
}, |
145 | 145 |
} |
146 | 146 |
if service, err := client.Services(ns).Create(service); err != nil { |