Rename JSONBase -> TypeMeta in preparation for v1beta3

Will make subsequent refactor much easier
This commit is contained in:
Clayton Coleman
2014-10-07 11:12:16 -04:00
parent e294cef9d4
commit d3e51a0f24
69 changed files with 464 additions and 464 deletions

View File

@@ -52,7 +52,7 @@ func NewREST(registry Registry, cloud cloudprovider.Interface, machines minion.R
func (rs *REST) Create(ctx api.Context, obj runtime.Object) (<-chan runtime.Object, error) {
srv := obj.(*api.Service)
if !api.ValidNamespace(ctx, &srv.JSONBase) {
if !api.ValidNamespace(ctx, &srv.TypeMeta) {
return nil, errors.NewConflict("service", srv.Namespace, fmt.Errorf("Service.Namespace does not match the provided context"))
}
if errs := validation.ValidateService(srv); len(errs) > 0 {
@@ -176,7 +176,7 @@ func GetServiceEnvironmentVariables(ctx api.Context, registry Registry, machine
func (rs *REST) Update(ctx api.Context, obj runtime.Object) (<-chan runtime.Object, error) {
srv := obj.(*api.Service)
if !api.ValidNamespace(ctx, &srv.JSONBase) {
if !api.ValidNamespace(ctx, &srv.TypeMeta) {
return nil, errors.NewConflict("service", srv.Namespace, fmt.Errorf("Service.Namespace does not match the provided context"))
}
if errs := validation.ValidateService(srv); len(errs) > 0 {
@@ -224,7 +224,7 @@ func (rs *REST) deleteExternalLoadBalancer(service *api.Service) error {
if err != nil {
return err
}
if err := balancer.DeleteTCPLoadBalancer(service.JSONBase.ID, zone.Region); err != nil {
if err := balancer.DeleteTCPLoadBalancer(service.TypeMeta.ID, zone.Region); err != nil {
return err
}
return nil