WIP: Set uid during object create

Still need to add some unit tests.

That works for me.

Will find a good home for the func

Sent from my iPhone

> On Nov 12, 2014, at 5:57 PM, Daniel Smith <notifications@github.com> wrote:
> 
> In pkg/registry/endpoint/rest.go:
> 
> > @@ -69,6 +69,8 @@ func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan apiserver.RE
> >  		return nil, fmt.Errorf("id is required: %#v", obj)
> >  	}
> >  	endpoints.CreationTimestamp = util.Now()
> > +	endpoints.UID = util.NewUUID().String()
> Suggestion: make a function which fills in an ObjectMeta with all the fields a server should set; call this function in all these places. Not sure where to put the function.
> 
> We should probably make an integration test that verifies that these get set for all POSTed objects.
> 
> —
> Reply to this email directly or view it on GitHub.
>