Clayton Coleman
8bef68d475
RESTMapper should take into account multiple versions
...
When a CLI command `kubectl get rc --api-version=v1beta3` is called,
the API resource name should match v1beta3, not whatever the default
RESTMapper version is. This allows the correct resource name to be
returned ("replicationcontrollers", instead of "replicationControllers").
2014-12-22 14:46:31 -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
Vojtech Vitek (V-Teq)
28f5d51a5f
Add Labels and Annotations to MetadataAccessor
2014-12-01 16:36:24 +01:00
Vojtech Vitek (V-Teq)
508724b1f8
meta_test should not depend on runtime.TypeMeta
2014-12-01 16:36:21 +01:00
Michal Fojtik
7235a9b1f0
Fix pluralization in RESTMapper when kind ends with 'y'
2014-11-25 11:33:13 +01:00
Tim Hockin
95a9098311
fix 'go vet' warnings
2014-11-21 09:45:28 +08:00
Tim Hockin
ea960711ff
Clean up error logs.
...
Use %v for errors, tidy some messages, make error messages start lowe-case
(as per go guidelines). Just accumulated nits.
2014-11-21 09:45:26 +08:00
Yuki Yugui Sonoda
864bfb65da
Fixes golint errors in pkg/api.
2014-11-14 13:14:23 +09:00
Clayton Coleman
f0c23d68f7
Add runtime.ObjectConvertor to RESTMapper
2014-11-04 10:38:00 -05:00
Clayton Coleman
dc862ae463
Return the Kind of the object with the RESTMapper
2014-11-04 10:34:47 -05:00
Clayton Coleman
191c1b975c
Define a mapping between REST resource name and kind/apiVersion
...
Allows clients to abstractly map user input to generic resource
paths as per docs/api-conventions.md
2014-11-03 17:09:06 -05: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
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
Clayton Coleman
3df1c2f29d
Use meta.Interface and meta.Accessor
2014-10-23 18:01:25 -04:00
Clayton Coleman
e5c924585c
Add support for ObjectMeta and ListMeta lookup
2014-10-22 23:56:49 -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