Commit Graph

24 Commits (4586f8ce29f675f66cedf2e2198fb82932ce3777)

Author SHA1 Message Date
Clayton Coleman bddef32193 Prepare EtcdHelper to extract more data from Node
In order to support graceful deletion, the resource object will
need access to the TTL value in etcd.  Also, in the future we
may want to get the creation index (distinct from modifiedindex)
and expose it to clients.  Change EtcdResourceVersioner to be
more type specific (objects vs lists) and provide a default
implementation that relies on the internal API convention.

Also, rename etcd_tools.go to etcd_helper.go and split a few
things up.
2015-03-16 15:33:50 -04:00
Clayton Coleman 4ca90e0343 FakeEtcdClient should return KeyNotFound on Delete 2015-03-16 14:22:03 -04:00
Clayton Coleman 143015025a Support TTL in genericetcd#Update 2015-03-16 14:22:01 -04:00
Salvatore Dario Minonne 925fa6baf8 Adding fields selector 2015-03-10 22:13:10 +01:00
Brendan Burns 2700871b04 Merge pull request #5013 from smarterclayton/misc_fixup
Small cleanups to a number of client behaviors
2015-03-06 15:41:34 +01:00
Salvatore Dario Minonne 75f2efb500 moving ParseSelector to Parse for labels only. 2015-03-05 22:39:36 +01:00
Daniel Smith 4cd59e629a Merge pull request #5010 from smarterclayton/update_resource_version
genericetcd.Etcd should test resourceVersion
2015-03-04 14:49:05 -08:00
Mike Danese e1ca63f569 SetObj and CreateObj optionally accept an object to fill with the result of the get 2015-03-04 10:38:42 -08:00
Clayton Coleman a52b0f2619 Switch List/Watch to ListPredicate/WatchPredicate 2015-03-04 10:48:05 -05:00
Clayton Coleman 3d52aac13c genericetcd.Etcd should test resourceVersion
Also fix that Update was returning AlreadyExists instead of
NotFound (when create is disabled) and that Update when CreateOnUpdate
was true was not populating the returned object.

Added more tests
2015-03-03 19:54:43 -05:00
Clayton Coleman 247e467217 Collapse pod REST+Registry to a single object using generic/etcd 2015-02-16 10:09:27 -05:00
Clayton Coleman 23d199ded9 Make generic etcd more powerful and return operations from etcd
When we complete an operation, etcd usually provides a response
object.  Return that object up instead of querying etcd twice.
2015-02-13 13:11:33 -05:00
saadali a41f520bf0 Add "Update Event" to Kubernetes API 2015-02-05 00:07:51 -08:00
Yu-Ju Hong 4a72addaeb Factor out API defaulting from validation logic
Currently, the validation logic validates fields in an object and supply default
values wherever applies. This change factors out defaulting to a set of
defaulting callback functions for decoding (see #1502 for more discussion).

 * This change is based on pull request 2587.

 * Most defaulting has been migrated to defaults.go where the defaulting
   functions are added.

 * validation_test.go and converter_test.go have been adapted to not testing the
   default values.

 * Fixed all tests with that create invalid objects with the absence of
   defaulting logic.
2015-02-03 00:55:42 -08:00
derekwaynecarr 92e2c2b302 Updated default function names, keyroot to keyrootfunc 2014-12-15 10:42:13 -05:00
derekwaynecarr 6353612f40 Update generic etcd to enable namespace scoped resources 2014-12-15 10:42:13 -05:00
markturansky 8af4ccb111 v1beta3 Pod refactor 2014-11-18 09:25:42 -05:00
Daniel Smith 178d0af795 Fix watch for events; add test for interface implementation so it won't break again. 2014-11-12 15:22:08 -08: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
Clayton Coleman 644eb70085 Refactor tests to split ObjectMeta from TypeMeta 2014-10-24 11:22:21 -04:00
Clayton Coleman bb77a5d15f Rename ID -> Name 2014-10-22 15:00:26 -04:00
Daniel Smith b1a6b3eee8 Split generic; add test, address other review comments 2014-10-10 15:47:34 -07:00
Daniel Smith d3d9f7ac8b ObjectDiff moved after rebase 2014-10-10 15:47:34 -07:00
Daniel Smith 9a9362e896 Add generic registry object so we can stop rewriting this code 2014-10-10 15:46:49 -07:00