Mark PublicIPs as deprecated & rename to DeprecatedPublicIPs in the latest API

We need to keep them in the API so that we can round-trip between versions.
This commit is contained in:
Justin Santa Barbara
2015-05-22 18:12:46 -04:00
parent 2197c8da5a
commit e49ad95462
16 changed files with 57 additions and 53 deletions

View File

@@ -1611,21 +1611,21 @@ func TestValidateService(t *testing.T) {
{
name: "invalid publicIPs localhost",
tweakSvc: func(s *api.Service) {
s.Spec.PublicIPs = []string{"127.0.0.1"}
s.Spec.DeprecatedPublicIPs = []string{"127.0.0.1"}
},
numErrs: 1,
},
{
name: "invalid publicIPs",
tweakSvc: func(s *api.Service) {
s.Spec.PublicIPs = []string{"0.0.0.0"}
s.Spec.DeprecatedPublicIPs = []string{"0.0.0.0"}
},
numErrs: 1,
},
{
name: "valid publicIPs host",
tweakSvc: func(s *api.Service) {
s.Spec.PublicIPs = []string{"myhost.mydomain"}
s.Spec.DeprecatedPublicIPs = []string{"myhost.mydomain"}
},
numErrs: 0,
},