Commit Graph

318 Commits (a57967f47b82d9f179bde273090572b44c059848)

Author SHA1 Message Date
k8s-merge-robot 5acdb92126 Merge pull request #21177 from laushinka/spelling-fixes
Auto commit by PR queue bot
2016-02-18 10:29:49 -08:00
Piotr Szczesniak c02e966d65 Applied comments from the review 2016-02-18 14:18:39 +01:00
laushinka 7ef585be22 Spelling fixes inspired by github.com/client9/misspell 2016-02-18 06:58:05 +07:00
Daniel Smith 74400c33ae changes for cross-group moves 2016-02-15 21:39:00 +01:00
deads2k f89bd83664 fix group mapping and encoding order 2016-02-15 08:49:17 -05:00
Kris 4c58302b5b Adding dynamic client 2016-02-12 11:49:00 -08:00
Clayton Coleman b8582f73da Ensure public conversion name packages are imported
The name of the package a public function is in may not be inside the
current package set, so it needs to be imported.
2016-02-08 17:24:44 -05:00
k8s-merge-robot f769ecdabc Merge pull request #20487 from deads2k/fix-unstructured
Auto commit by PR queue bot
2016-02-06 06:49:13 -08:00
deads2k 067ecb4b60 expose unstructured scheme as codec 2016-02-04 11:14:16 -05:00
deads2k 26b91926b2 fix version detection for error 2016-02-04 08:20:41 -05:00
Clayton Coleman 60b66665e1 Move conversion.Scheme to runtime
There is only one type registry to rule them all
2016-01-30 14:12:40 -05:00
Clayton Coleman 6b2f70d553 Provide a JSON and YAML serializer, and a versioning wrapper
Add a recognizer that is capable of sniffing content type from data by
asking each serializer to try to decode - this is for a "universal
decoder/deserializer" which can be used by client logic.

Add codec factory, which provides the core primitives for content type
negotiation. Codec factories depend only on schemes, serializers, and
groupversion pairs.
2016-01-22 00:12:49 -05:00
Clayton Coleman 63a7a41ddf Simplify Codec and split responsibilities
Break Codec into two general purpose interfaces, Encoder and Decoder,
and move parameter codec responsibilities to ParameterCodec.

Make unversioned types explicit when registering - these types go
through conversion without modification.

Switch to use "__internal" instead of "" to represent the internal
version. Future commits will also add group defaulting (so that "" is
expanded internally into a known group version, and only cleared during
set).

For embedded types like runtime.Object -> runtime.RawExtension, put the
responsibility on the caller of Decode/Encode to handle transformation
into destination serialization. Future commits will expand RawExtension
and Unknown to accept a content encoding as well as bytes.

Make Unknown a bit more powerful and use it to carry unrecognized types.
2016-01-21 23:18:32 -05:00
Clayton Coleman 6582b4c2ea Remove codec awareness from conversion
Allow convertors to be specialized, some cleanup to how conversion
functions are stored internally to allow better reuse.
2016-01-21 23:18:32 -05:00
Clayton Coleman 3c1451af91 Use public conversion methods to avoid reflection
Replace many of the remaining s.Convert() invocations with direct
execution, and make generated methods public. Removes 10% of the
allocations during decode of a pod and ~20-40% of the total CPU time.
2015-12-29 10:38:42 -05:00
Clayton Coleman 173718059d Slice conversion requires destination package 2015-12-18 19:05:21 -05:00
k8s-merge-robot e309583ff1 Merge pull request #18473 from smarterclayton/change_runtime_object
Auto commit by PR queue bot
2015-12-16 04:24:22 -08:00
Clayton Coleman 8f203a28f1 Change runtime.Object signature 2015-12-15 13:36:25 -05:00
deads2k 6e33403abf update CodecFor for GroupVersion 2015-12-15 10:56:00 -05:00
k8s-merge-robot 266ab4a796 Merge pull request #18487 from smarterclayton/guard_encode_decode
Auto commit by PR queue bot
2015-12-13 23:08:18 -08:00
Clayton Coleman 1e21054134 Hide common codec methods under helpers
The pending codec -> conversion split changes the signature of
Encode and Decode to be more complicated. Create a stub helper
with the exact semantics of today and do the simple mechanical
refactor here to reduce the cost of that change.
2015-12-09 21:15:02 -05:00
deads2k 519b4e80d1 update NewObject for groupversionkind 2015-12-09 08:13:15 -05:00
deads2k 2ee3dfe415 update testapi to eliminate redundant fields 2015-12-07 15:54:26 -05:00
deads2k f764e0099c Update ObjectTyper to GroupVersion 2015-12-07 08:35:05 -05:00
Clayton Coleman ac9fd648d3 Strip go2idl instructions from generated swagger doc
Ignore doc lines starting with +
2015-12-05 18:15:49 -05:00
Clayton Coleman 9fea762917 Add protobuf preparation objects, guarded by proto tag 2015-12-05 18:15:48 -05:00
Clayton Coleman 8046bb46df Update conversions to handle primitive conversion 2015-11-26 11:45:25 -05:00
deads2k ed95a6d77f update scheme to use GroupVersion 2015-11-25 12:15:48 -05:00
deads2k 47e496364d update generators for groupVersion 2015-11-25 12:14:06 -05:00
deads2k 68b0572974 internal versions 2015-11-25 12:14:06 -05:00
deads2k 6231404682 update decoder to use GroupVersion 2015-11-25 12:14:06 -05:00
k8s-merge-robot 06ef4b0a83 Merge pull request #17156 from feihujiang/moveListFunctionsFromRuntimeToMetaPackage
Auto commit by PR queue bot
2015-11-23 14:13:25 -08:00
feihujiang ad79fa6e84 Move list functions from runtime to meta package 2015-11-20 09:20:55 +08:00
Wojciech Tyczynski d7b098b0e9 Add DecodeParametersInto method to Codec. 2015-11-18 09:56:04 +01:00
k8s-merge-robot 9981f99949 Merge pull request #16849 from feihujiang/cleanupDeprecatedV1beta1Content
Auto commit by PR queue bot
2015-11-07 04:15:32 -08:00
feihujiang eac8d6a997 Cleanup the content of deprecated V1beta1 2015-11-06 13:42:51 +08:00
Wojciech Tyczynski ce95f68d2a Changes in codec interfaces 2015-11-05 13:52:22 +01:00
kargakis ef36b3e4f6 deep-copies: Structs cannot be nil 2015-10-12 15:21:30 +02:00
Brendan Burns deb3514c02 Fix ExtractList to work with v1.List 2015-10-07 15:48:38 -07:00
Brian Grant 313918f561 Merge pull request #14148 from brendandburns/perf
Add a method for encoding directly to a io.Writer and use it for HTTP
2015-09-25 13:19:58 -07:00
Tim Hockin fd91d3f0ec Make patch-up conversions simpler
Rather than an "all or nothing" approach to defining a custom conversion
function (which seems destined to cause problems eventually), this is an
attempt to make it possible to call the auto-generated code and then "fix it
up".

Specifically, consider you have a fooBar struct.  If you don't define a
conversion for FooBar, you will get a generated function like:
    convert_v1_FooBar_To_api_FooBar()

Before this PR, if you define your own conversion function, you get no
generated function.  After this PR you get:
    autoconvert_v1_FooBar_To_api_FooBar()
...which you can call yourself in your custom function.
2015-09-24 17:21:07 -07:00
Brendan Burns 8998219686 Add a method for encoding directly to a io.Writer and use it for HTTPx 2015-09-24 15:52:09 -07:00
tummychow 78ce5da988 Move util.StringSet into its own package
A lot of packages use StringSet, but they don't use anything else from
the util package. Moving StringSet into another package will shrink
their dependency trees significantly.
2015-09-10 12:04:15 -07:00
Chao Xu 9fc79e9d99 refactor testapi and test scripts to prepare for multiple API groups. 2015-09-04 18:01:32 -07:00
Anastasis Andronidis 9f21ae21e8 swagger type documentation generator 2015-08-22 02:26:03 +02:00
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
Clayton Coleman 4b16a87096 Simplify api_installer and setup methods 2015-03-09 14:39:31 -04:00
Daniel Smith 1fdf749211 fix e2e failure 2015-03-02 15:03:56 -08:00
Daniel Smith c4822dc060 Revert "Revert "Adding converter functions to convert field label selectors to internal version before matching""
This reverts commit 5f35a67002.
2015-03-02 15:00:09 -08:00
Zach Loafman 5f35a67002 Revert "Adding converter functions to convert field label selectors to internal version before matching" 2015-02-28 11:42:49 -08:00
Daniel Smith d68c738fcf Merge pull request #4575 from nikhiljindal/versionedFieldSelector
Adding converter functions to convert field label selectors to internal version before matching
2015-02-27 16:33:15 -08:00
nikhiljindal 48e7945f65 Versioning the field selectors 2015-02-27 16:10:59 -08:00
Brendan Burns 877f605dc0 Add specific errors for missing kind and version. 2015-02-26 11:19:04 -08:00
Clayton Coleman dc3b327951 Allow runtime.SetList() on an api.List
SetList doesn't allow api.List
2015-02-14 23:37:23 -05:00
Tim Hockin 1ddb68d8d7 Sketch: a third take on defaulting values 2015-02-02 22:35:58 -08:00
Clayton Coleman c2b79e52d4 Merge pull request #4027 from deads2k/deads-raw-extension
handle omitted rawExtension
2015-02-02 15:03:37 -05:00
deads2k fe398938e8 handle omitted rawExtension 2015-02-02 14:53:22 -05:00
Clayton Coleman a7c9a12286 Add name generation and normalize common create flows
Adds `ObjectMeta.GenerateName`, an optional string field that defines
name generation behavior if a Name is not provided.

Adds `pkg/api/rest`, which defines the default Kubernetes API pattern
for creation (and will cover update as well). Will allow registries
and REST objects to be merged by moving logic on api out of those places.

Add `pkg/api/rest/resttest`, which will be the test suite that verifies
a RESTStorage object follows the Kubernetes API conventions and begin
reducing our duplicated tests.
2015-02-02 14:44:53 -05:00
Brendan Burns 99b9785881 Merge pull request #3836 from mfojtik/extract_list_ptr
Ensure the ptr is pointing to reflect.Slice in ExtractList
2015-01-27 10:00:33 -08:00
Michal Fojtik ae3f10a397 Ensure the ptr is pointing to reflect.Slice in ExtractList 2015-01-27 18:02:37 +01:00
Mike Danese d77743a07c gimports nits 2015-01-26 22:42:29 -08:00
Michal Fojtik e7df8aa098 Fix ExtractList to support extraction from generic api.List{} 2015-01-23 22:13:37 +01:00
Clayton Coleman 5f6caaba2e Add TypeAccessor to api/meta for objects without Object/ListMeta
Adding objects that have TypeMeta (use runtime.Scheme) but do not
expose ObjectMeta/ListMeta (because they are not Kube API objects)
and wanted to get the simpler access path for in memory objects.
2015-01-20 17:37:24 -05:00
Clayton Coleman 8a833ca701 Add a List type that can contain arbitrary objects
Supports objects that the core schema may not recognize and
preserves them unmodified as runtime.Unknown
2014-12-09 10:31:17 -05:00
Clayton Coleman db2c59ff61 Allow conversion between []runtime.Object and []runtime.RawExtension
This allows generic lists with unrecognized objects to be roundtripped
between internal and external objects.
2014-12-09 10:31:17 -05:00
Clayton Coleman 1eaa5c41f9 RawExtension was not properly marshalled
MarshalJSON can't use a pointer to a struct for RawExtension:

http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
2014-12-09 10:31:14 -05:00
Clayton Coleman 714dbf4522 Shrink runtime.TypeMeta to be equivalent to api TypeMeta
Remove unused fuzzing
2014-12-07 20:49:07 -05:00
Clayton Coleman 84d84c50c2 Add a strongly typed error for unrecognized kind/type/version 2014-12-07 20:48:16 -05:00
derekwaynecarr ef25520baa make selfLink namespace aware 2014-12-05 17:37:11 -05:00
Sam Ghods 6399854240 Remove unused YAML tags and GetYAML/SetYAML methods
Unneeded after move to ghodss/yaml.
2014-12-02 16:25:28 -08:00
Sam Ghods 9a9a1e0939 Move from go-yaml/yaml to ghodss/yaml 2014-12-02 16:24:05 -08:00
Daniel Smith 8d762c996a Remove boilerplate coversion functions 2014-11-24 12:57:34 -08:00
Tim Hockin 95a9098311 fix 'go vet' warnings 2014-11-21 09:45:28 +08:00
Clayton Coleman 39882a3555 Allow Create/Update/Delete kubectl commands to handle arbitrary objects
* Ensure kubectl uses abstractions from other parts of Kube
* Begin adding abstractions that allow arbitrary objects
* Refactor "update" to more closely match allowed behavior
2014-11-04 10:44:56 -05:00
Clayton Coleman 778a50d00b Introduce ObjectConvertor for conversion to known API versions
Will allow clients to transform internal objects to a version
suitable for external output.
2014-11-04 10:34:15 -05:00
Daniel Smith b28234fac6 Fix self linking of objects returned in lists. 2014-10-30 15:04:11 -07:00
Daniel Smith 5ac88dbe2e Merge pull request #2055 from smarterclayton/define_an_interface_for_typing
Make DataVersionAndKind public on runtime.Scheme
2014-10-29 10:29:39 -07:00
Daniel Smith 94e736e286 Merge pull request #2009 from smarterclayton/unify_meta
Unify Accessor for ObjectMeta/TypeMeta/ListMeta
2014-10-29 09:58:46 -07:00
Clayton Coleman 58715527aa Make DataVersionAndKind public on runtime.Scheme
Add a new ObjectTyper interface that clients can depend on for
converting between data and object to version and kind.
2014-10-29 12:10:55 -04:00
Vojtech Vitek (V-Teq) 90809c270d Use conversion.EnforcePtr() where appropriate
Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-10-28 16:36:09 +01:00
Clayton Coleman 66ace4c270 Begin to unify ResourceVersioner and SelfLinker
Create a new MetadataAccessor interface that combines both
and use it where previously latest.ResourceVersioner and SelfLinker
were being used.

Adds Namespace to the get/set interface. Adds TODO about future
fast path for metadata (as per thockin's comment)
2014-10-27 16:00:55 -04:00
Vojtech Vitek (V-Teq) 6a6f24b126 Fix reflect panic in runtime/conversion
Fixes `panic: reflect: call of reflect.Value.Type on zero Value`
when calling conversion.EnforcePtr() or
runtime.Scheme.ObjectVersionAndKind() from default type switch.

Signed-off-by: Vojtech Vitek (V-Teq) <vvitek@redhat.com>
2014-10-27 06:01:14 +01:00
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman 35eaf90255 Add UID to MetaAccessor and Ref 2014-10-22 22:59:15 -04:00
Clayton Coleman 1ccb86c760 Rename methods in api/meta to be cleaner 2014-10-22 22:59:12 -04:00
Clayton Coleman 64d98cba73 Move typemeta.go to api/meta/meta.go
Prepares for the meta object to front multiple underlying types
when TypeMeta and ObjectMeta is split in internal and v1beta3, but
combined in v1beta1 and v1beta2
2014-10-22 22:28:06 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Vojtech Vitek (V-Teq) 755d4d441a Fix typos 2014-10-21 18:57:20 +02:00
Clayton Coleman 73dba3a613 Move FindTypeMeta into the proper file 2014-10-13 23:29:40 -04:00
Clayton Coleman 485106e270 Remove unused code 2014-10-13 23:29:39 -04:00
Clayton Coleman 13992837ea Use one copy of EnforcePtr 2014-10-13 23:29:39 -04:00
Clayton Coleman d488e238dd Genericize MetaInsertionFactory into a simpler interface
The common path code for MIF goes through a conversion cycle - it
can also be done through reflection. This simplifies the Create/Update
methods into Interpret (return version) and Update (through reflection).

In addition it uses only one MetaFactory implementation across all of
our packages which reduces a bit of duplication.
2014-10-13 23:29:39 -04:00
Tim Hockin d84816aaec Merge pull request #1709 from erictune/move_line
Fix format specifiers in Printf-type functions.
2014-10-09 20:40:35 -07:00
Eric Tune 800284164a Fix format specifiers in Printf-type functions. 2014-10-09 17:06:32 -07:00
Clayton Coleman 5382627e6a Move Codec functions to their own file 2014-10-09 17:25:23 -04:00
Clayton Coleman 935e97d59d Move ObjectDiff into util 2014-10-09 17:23:43 -04:00
Clayton Coleman 82bcdd3b3b Make ResourceVersion a string internally instead of uint64
Allows us to define different watch versioning regimes in the future
as well as to encode information with the resource version.

This changes /watch/resources?resourceVersion=3 to start the watch at
4 instead of 3, which means clients can read a resource version and
then send it back to the server. Clients should no longer do math on
resource versions.
2014-10-07 19:00:26 -04:00
Daniel Smith ee107d3fad fix extra un-cosmetic extraneous code. 2014-10-07 14:08:18 -07:00
Daniel Smith 0212c9b29a Merge pull request #1623 from smarterclayton/rename_jsonbase
Rename JSONBase -> TypeMeta in preparation for v1beta3
2014-10-07 10:50:28 -07:00
Joe Beda c7e88427dc Merge pull request #1619 from VojtechVitek/typo
Fix typo
2014-10-07 09:04:04 -07:00
Clayton Coleman d3e51a0f24 Rename JSONBase -> TypeMeta in preparation for v1beta3
Will make subsequent refactor much easier
2014-10-07 11:12:16 -04:00
Vojtech Vitek (V-Teq) 0ffb1d7fec Fix typo 2014-10-07 14:14:00 +02:00
Clayton Coleman 305db35422 Add a Log method on Scheme for better debugging 2014-10-05 17:17:25 -04:00
Daniel Smith 6ac7578699 Add GetReference() 2014-09-26 17:40:07 -07:00
Daniel Smith 75b93cf7e9 Add SelfLinker 2014-09-26 14:51:13 -07:00
Daniel Smith 957b16053a restore test that somehow vanished + add SetList 2014-09-25 12:07:07 -07:00
Clayton Coleman fece926e2b Remove unnecessary EmbeddedObjects
Clarify the tests in embedded_test.go to indicate that unmarshalling
of an internal object (runtime.EmbeddedObject) will not work.  Instead,
consumers should decode raw external objects.
2014-09-22 16:03:07 -04:00
Clayton Coleman 9a0add3c96 runtime.RawExtension must copy the buffer, not use it 2014-09-22 15:57:37 -04:00
Clayton Coleman 61e3ce7ddc Make runtime less global for Codec
* Make Codec separate from Scheme
* Move EncodeOrDie off Scheme to take a Codec
* Make Copy work without a Codec
* Create a "latest" package that imports all versions and
  sets global defaults for "most recent encoding"
  * v1beta1 is the current "latest", v1beta2 exists
  * Kill DefaultCodec, replace it with "latest.Codec"
  * This updates the client and etcd to store the latest known version
* EmbeddedObject is per schema and per package now
* Move runtime.DefaultScheme to api.Scheme
* Split out WatchEvent since it's not an API object today, treat it
like a special object in api
* Kill DefaultResourceVersioner, instead place it on "latest" (as the
  package that understands all packages)
* Move objDiff to runtime.ObjectDiff
2014-09-16 16:26:43 -04:00
Daniel Smith 44f340f127 Remove custom scheme stuff
As separate commit to make it easy to get back-- I'm not completely
convince we won't want this in the future.
2014-09-15 13:15:46 -07:00
Daniel Smith b8c955ea17 Fixes:
* Fix kubecfg test, which was writing an internal object straight to yaml
* Address review comments
2014-09-15 13:15:46 -07:00
Daniel Smith 52d2c221b8 pkg/runtime now has a well defined api pluggability model. 2014-09-15 13:15:46 -07:00
Daniel Smith 7d50aa8ba8 Add ExtractList to runtime. 2014-09-12 16:51:07 -07:00
Daniel Smith 0d30a656ef Do interface{} -> runtime.Object rename everywhere 2014-09-07 22:19:24 -07:00
Daniel Smith 1c2b65788d Rename Codec and ResourceVersioner to add Default in front, to allow for types of those names 2014-09-07 22:19:24 -07:00
Daniel Smith 77edb91032 Add Object type to runtime, make runtime test pass. 2014-09-07 22:19:24 -07:00
Daniel Smith 7790961011 Rename Object to EmbeddedObject 2014-09-05 14:43:35 -07:00
Joe Beda 3c0a736908 Fix/expand kubecfg unit tests 2014-09-04 13:25:39 -07:00
Daniel Smith a63966e73c Combine pkg/apitools and pkg/api/common and call the result pkg/runtime 2014-09-02 11:15:44 -07:00