Ensure pod and manifest have a UUID in apiserver

Also has replication controller allow apiserver to automatically assign a UUID

Continues #253 and #199
Please don't commit this until I can look at it.  ETA tonight.


On Wed, Jul 2, 2014 at 5:17 PM, Daniel Smith <notifications@github.com>
wrote:

> In pkg/registry/controller_registry.go:
>
> > @@ -79,8 +80,11 @@ func (storage *ControllerRegistryStorage) Create(obj interface{}) (<-chan interf
> >  	if !ok {
> >  		return nil, fmt.Errorf("not a replication controller: %#v", obj)
> >  	}
> > -	if controller.ID == "" {
> > -		return nil, fmt.Errorf("ID should not be empty: %#v", controller)
> > +	if len(controller.ID) == 0 {
> > +		controller.ID = uuid.NewUUID().String()
> > +	}
> > +	if len(controller.DesiredState.PodTemplate.DesiredState.Manifest.ID) == 0 {
> > +		controller.DesiredState.PodTemplate.DesiredState.Manifest.ID = controller.ID
>
> Ah, even better!
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/GoogleCloudPlatform/kubernetes/pull/345/files#r14491871>
> .
>