Merge pull request #12119 from brendandburns/fix

Auto commit by PR queue bot
This commit is contained in:
Alex Mohr 2015-08-03 20:47:42 -07:00
commit 867f9b22c5
4 changed files with 10 additions and 1 deletions

View File

@ -35,10 +35,15 @@ func init() {
obj.LabelSelector = labels.Everything() obj.LabelSelector = labels.Everything()
obj.FieldSelector = fields.Everything() obj.FieldSelector = fields.Everything()
}, },
// TODO: see about moving this into v1/defaults.go
func(obj *PodExecOptions) { func(obj *PodExecOptions) {
obj.Stderr = true obj.Stderr = true
obj.Stdout = true obj.Stdout = true
}, },
func(obj *PodAttachOptions) {
obj.Stderr = true
obj.Stdout = true
},
) )
Scheme.AddConversionFuncs( Scheme.AddConversionFuncs(
func(in *util.Time, out *util.Time, s conversion.Scope) error { func(in *util.Time, out *util.Time, s conversion.Scope) error {

View File

@ -93,6 +93,7 @@ func init() {
"Status", "Status",
"PodLogOptions", "PodLogOptions",
"PodExecOptions", "PodExecOptions",
"PodAttachOptions",
"PodProxyOptions") "PodProxyOptions")
mapper := api.NewDefaultRESTMapper(versions, InterfacesFor, importPrefix, ignoredKinds, rootScoped) mapper := api.NewDefaultRESTMapper(versions, InterfacesFor, importPrefix, ignoredKinds, rootScoped)

View File

@ -122,7 +122,7 @@ func TestList(t *testing.T) {
} }
var nonRoundTrippableTypes = util.NewStringSet() var nonRoundTrippableTypes = util.NewStringSet()
var nonInternalRoundTrippableTypes = util.NewStringSet("List", "ListOptions", "PodExecOptions") var nonInternalRoundTrippableTypes = util.NewStringSet("List", "ListOptions", "PodExecOptions", "PodAttachOptions")
var nonRoundTrippableTypesByVersion = map[string][]string{} var nonRoundTrippableTypesByVersion = map[string][]string{}
func TestRoundTripTypes(t *testing.T) { func TestRoundTripTypes(t *testing.T) {

View File

@ -1482,6 +1482,7 @@ type PodLogOptions struct {
// PodAttachOptions is the query options to a Pod's remote attach call // PodAttachOptions is the query options to a Pod's remote attach call
// TODO: merge w/ PodExecOptions below for stdin, stdout, etc // TODO: merge w/ PodExecOptions below for stdin, stdout, etc
// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
type PodAttachOptions struct { type PodAttachOptions struct {
TypeMeta `json:",inline"` TypeMeta `json:",inline"`
@ -1503,6 +1504,8 @@ type PodAttachOptions struct {
} }
// PodExecOptions is the query options to a Pod's remote exec call // PodExecOptions is the query options to a Pod's remote exec call
// TODO: This is largely identical to PodAttachOptions above, make sure they stay in sync and see about merging
// and also when we cut V2, we should export a "StreamOptions" or somesuch that contains Stdin, Stdout, Stder and TTY
type PodExecOptions struct { type PodExecOptions struct {
TypeMeta `json:",inline"` TypeMeta `json:",inline"`