Merge pull request #28587 from wojtek-t/remove_codec_from_content_config

Automatic merge from submit-queue

Remove Codec from ContentConfig.

This is the remaining cleanup after adding NegotiatedSerializer to ContentConfig.
This commit is contained in:
k8s-merge-robot
2016-07-08 21:12:24 -07:00
committed by GitHub
43 changed files with 260 additions and 264 deletions

View File

@@ -222,7 +222,3 @@ func (c *RESTClient) Delete() *Request {
func (c *RESTClient) APIVersion() unversioned.GroupVersion {
return *c.contentConfig.GroupVersion
}
func (c *RESTClient) Codec() runtime.Codec {
return c.contentConfig.Codec
}

View File

@@ -143,15 +143,6 @@ type ContentConfig struct {
// NegotiatedSerializer is used for obtaining encoders and decoders for multiple
// supported media types.
NegotiatedSerializer runtime.NegotiatedSerializer
// Codec specifies the encoding and decoding behavior for runtime.Objects passed
// to a RESTClient or Client. Required when initializing a RESTClient, optional
// when initializing a Client.
//
// DEPRECATED: Please use NegotiatedSerializer instead.
// Codec is currently used only in some tests and will be removed soon.
// All production setups should use NegotiatedSerializer.
Codec runtime.Codec
}
// RESTClientFor returns a RESTClient that satisfies the requested attributes on a client Config

View File

@@ -273,7 +273,6 @@ func (obj NotAnAPIObject) SetGroupVersionKind(gvk *unversioned.GroupVersionKind)
func defaultContentConfig() ContentConfig {
return ContentConfig{
GroupVersion: testapi.Default.GroupVersion(),
Codec: testapi.Default.Codec(),
NegotiatedSerializer: testapi.Default.NegotiatedSerializer(),
}
}