Piotr Szczesniak
eb01d49783
Merge pull request #12556 from uluyol/copynilinterface
...
Properly handle nil interfaces in DeepCopy.
2015-08-12 09:54:02 +02:00
Muhammed Uluyol
bc8bc37282
Properly handle nil interfaces in DeepCopy.
...
Running reflect.ValueOf(X) where X is a nil interface will return
a zero Value. We cannot get the type (because no concrete type is
known) and cannot check if the Value is nil later on due to the way
reflect.Value works. So we should handle this case by immediately
returning nil. We cannot type-assert a nil interface to another
interface type (as no concrete type is assigned), so we must add
another check to see if the returned interface is nil.
2015-08-11 17:59:32 -07:00
Muhammed Uluyol
4d5899955e
Remove redundant tests. We already check that no changes have been made in hack/verify-generated-*.sh.
2015-08-11 16:51:44 -07:00
Kris Rousey
565189f5b8
Correcting all go vet errors
2015-08-11 13:55:37 -07:00
Paul Weil
26d80cdb7f
use package from out value
2015-08-10 14:00:20 -04:00
Marek Grabowski
5f9cefc1d8
Merge pull request #12441 from vlajos/typofixes-vlajos-20150807
...
typofix - https://github.com/vlajos/misspell_fixer
2015-08-10 16:33:52 +02:00
Veres Lajos
9f77e49109
typofix - https://github.com/vlajos/misspell_fixer
2015-08-08 22:31:48 +01:00
Kris Rousey
6e64a63a84
Adding a way to decode to a specified version.
...
This is largely needed as a way to get a versioned client without
requiring everyone to switch to versioned types at once.
2015-08-07 14:16:24 -07:00
Mike Danese
8e33cbfa28
rewrite go imports
2015-08-05 17:30:03 -07:00
Alex Mohr
366b382901
Merge pull request #10200 from caesarxuchao/resthandler-validate-version
...
verify and default APIVersion in createHandler, verify APIVersion in UpdateResource
2015-08-04 13:09:31 -07:00
Chao Xu
664d20c572
Add DecodeIntoWithSpecifiedVersionKind() to Decoder interface.
...
The function validate/default the body with the passed in apiVersion and Kind.
It's called in createHandler and UpdateResource
2015-08-03 15:30:00 -07:00
Clayton Coleman
532e1ca20c
Update generator tests to passing
2015-07-30 15:15:28 -04:00
Clayton Coleman
0f9fdcafea
Revert "Revert "Improve conversion to support multiple packages""
...
This reverts commit 94a387d5d1
.
2015-07-30 15:15:14 -04:00
Mike Danese
94a387d5d1
Revert "Improve conversion to support multiple packages"
2015-07-30 10:51:40 -07:00
Clayton Coleman
732647ea97
Improve conversion to support multiple packages
...
OpenShift uses multiple API packages (types are split) which
Kube will also eventually have as we introduce more plugins.
These changes make the generators able to handle importing different
API object packages into a single generator function.
2015-07-29 17:05:54 -04:00
Tim Hockin
1c3233a1d4
Remove v1beta3
2015-07-23 17:21:27 -07:00
Zach Loafman
e5670c104d
Merge pull request #10604 from nikhiljindal/v1
...
Updating scripts to use v1 instead of v1beta3
2015-07-01 15:54:17 -07:00
nikhiljindal
274792d7bb
Stop exposing v1beta3 by default
2015-07-01 14:38:02 -07:00
nikhiljindal
2e9e46dd08
Updating scripts to use v1 instead of v1beta3
2015-07-01 00:23:16 -07:00
Clayton Coleman
6970dda54e
Use runtime.Copier instead of hardcoding api.Scheme
...
Allow other schemes to be supported by etcd_helper.go
runtime.Scheme.Copy() should be using the built in DeepCopy()
2015-06-26 14:50:33 -04:00
Daniel Smith
47294dd326
Revert "Revert "Test Service creation -> endpoint generation latency""
...
This reverts commit 654857114e
.
2015-06-11 18:34:31 -07:00
Brendan Burns
654857114e
Revert "Test Service creation -> endpoint generation latency"
2015-06-09 21:24:00 -07:00
Daniel Smith
aa9bdcbc4a
add missing endpoints field label conversion function
2015-06-08 16:23:21 -07:00
Chao Xu
0a7dc87b05
address nikhiljindal's comments in #9225
2015-06-04 10:20:29 -07:00
Chao Xu
b61658d064
add v1 item in pkg/runtime/helper_test.go
2015-06-03 16:05:40 -07:00
Chao Xu
0d81f5901b
add v1 items to runtime/unstructured_test.go
2015-06-03 15:09:49 -07:00
Wojciech Tyczynski
33318f0162
Use generated DeepCopy methods.
2015-05-28 09:03:27 +02:00
Wojciech Tyczynski
b2280db724
Deep-copy functions autogeneration.
2015-05-26 21:16:26 +02:00
Wojciech Tyczynski
de0a1d179f
Fix ordering of conversion methods.
2015-05-21 19:41:48 +02:00
Tim Hockin
70c94fad6d
Don't rename api imports in conversions
2015-05-19 11:21:21 -07:00
Wojciech Tyczynski
9a93206774
Script for automatically generate conversions.
2015-05-19 02:17:58 +02:00
Wojciech Tyczynski
108615d081
Refactor conversion generator
2015-05-15 15:11:18 +02:00
Wojciech Tyczynski
b52a4e60fc
Fix convertion generator for manually written ones
2015-05-14 13:51:34 +02:00
Wojciech Tyczynski
c2f2faeb07
Generate conversion methods for v1 api.
2015-05-13 14:20:59 +02:00
Wojciech Tyczynski
5578dc99e3
Improvements for conversions generator
2015-05-11 12:21:11 +02:00
deads2k
0d796c184d
fix DeepCopy to properly support runtime.EmbeddedObject
2015-05-05 10:36:39 -04:00
Eric Paris
6b3a6e6b98
Make copyright ownership statement generic
...
Instead of saying "Google Inc." (which is not always correct) say "The
Kubernetes Authors", which is generic.
2015-05-01 17:49:56 -04:00
Clayton Coleman
1a8845af61
Merge pull request #7490 from smarterclayton/alter_list
...
Do not automatically decode runtime.RawExtension
2015-05-01 16:48:26 -04:00
Cesar Wong
f72ee1f72b
Handle conversion of boolean query parameters with a value of "false"
2015-04-30 09:26:06 -04:00
Clayton Coleman
12ba4e2452
Do not automatically decode runtime.RawExtension
...
Make clients opt in to decoding objects that are stored
in the generic api.List object by invoking runtime.DecodeList()
with a set of schemes. Makes it easier to handle unknown
schema objects because decoding is in the control of the code.
Add runtime.Unstructured, which is a simple in memory
representation of an external object.
2015-04-29 12:53:07 -04:00
Wojciech Tyczynski
7f919a44c2
Generate conversions for v1beta3 package.
2015-04-24 09:18:12 +02:00
Wojciech Tyczynski
ea314d55f7
Create benchmarks for conversions.
2015-04-22 16:27:23 +02:00
Clayton Coleman
545a5a865f
List output with differing types should be more resilient
...
kubectl get can output a series of objects as a List in versioned
form, but not all API objects are available in the same schema.
Make the act of converting a []runtime.Object to api.List more
robust and add a test to verify its behavior in Get.
Makes it easier for client code to output unified objects.
2015-04-20 14:44:16 -04:00
Prashanth Balasubramanian
a7864aa230
Scheduler uses TTLStore for assumed pods
2015-04-08 15:01:04 -07:00
Clayton Coleman
870da687d0
Add more extensive tests to apiserver for variations in version
...
Formalize v1beta1 and v1beta3 style APIs in our test cases.
2015-03-27 15:03:58 -04:00
Clayton Coleman
eb0eff69fe
Move watch to being a resthandler resource and expose it on LIST
...
GET /pods?watch=true&resourceVersion=10
will now function equivalent to GET /watch/pods.
2015-03-27 15:03:58 -04:00
Clayton Coleman
1618c39a46
Convert List query parameters via object conversion
...
Convert url.Values -> an object, with appropriate versioning. ListOptions
should also expose parameter names to swagger.
2015-03-27 15:03:57 -04:00
Clayton Coleman
ea32b89e5e
Allow map[string][]string to be converted to an object
...
Will allow query parameters to be converted to versioned objects.
2015-03-24 17:25:45 -04:00
Clayton Coleman
71abc99dbe
Expose a ToJSON and runtime.YAMLDecoder helper
...
Enables clients to optionally handle YAML
2015-03-20 00:03:56 -04:00
nikhiljindal
790a8bbd23
Adding conversion functions for event field selectors
2015-03-12 14:10:51 -07:00