Browse code

Remove registry v2 code path

As this feature requires more testing it is much safter to get the
underlying changes into the codebase first then enable the feature in
another release after proper testing and verification can be done.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>

Michael Crosby authored on 2014/10/04 07:24:14
Showing 1 changed files
... ...
@@ -75,6 +75,7 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status {
75 75
 	if n := len(job.Args); n != 1 && n != 2 {
76 76
 		return job.Errorf("Usage: %s IMAGE [TAG]", job.Name)
77 77
 	}
78
+
78 79
 	var (
79 80
 		localName   = job.Args[0]
80 81
 		tag         string
... ...
@@ -83,6 +84,7 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status {
83 83
 		metaHeaders map[string][]string
84 84
 		mirrors     []string
85 85
 	)
86
+
86 87
 	if len(job.Args) > 1 {
87 88
 		tag = job.Args[1]
88 89
 	}
... ...
@@ -132,18 +134,6 @@ func (s *TagStore) CmdPull(job *engine.Job) engine.Status {
132 132
 		mirrors = s.mirrors
133 133
 	}
134 134
 
135
-	if isOfficial || endpoint.Version == registry.APIVersion2 {
136
-		j := job.Eng.Job("trust_update_base")
137
-		if err = j.Run(); err != nil {
138
-			return job.Errorf("error updating trust base graph: %s", err)
139
-		}
140
-
141
-		if err := s.pullV2Repository(job.Eng, r, job.Stdout, localName, remoteName, tag, sf, job.GetenvBool("parallel")); err == nil {
142
-			return engine.StatusOK
143
-		} else if err != registry.ErrDoesNotExist {
144
-			log.Errorf("Error from V2 registry: %s", err)
145
-		}
146
-	}
147 135
 	if err = s.pullRepository(r, job.Stdout, localName, remoteName, tag, sf, job.GetenvBool("parallel"), mirrors); err != nil {
148 136
 		return job.Error(err)
149 137
 	}