Explorar el Código

remove old media type compat for plugins

Signed-off-by: Victor Vieux <vieux@docker.com>
(cherry picked from commit f644e758bd58f7b045a52b29038ae0043b0c9e3d)
Signed-off-by: Victor Vieux <vieux@docker.com>
Victor Vieux hace 8 años
padre
commit
d8e435ab6c
Se han modificado 3 ficheros con 4 adiciones y 6 borrados
  1. 1 2
      distribution/pull_v2.go
  2. 2 2
      docs/extend/config.md
  3. 1 2
      plugin/distribution/pull.go

+ 1 - 2
distribution/pull_v2.go

@@ -355,8 +355,7 @@ func (p *v2Puller) pullV2Tag(ctx context.Context, ref reference.Named) (tagUpdat
 	}
 	}
 
 
 	if m, ok := manifest.(*schema2.DeserializedManifest); ok {
 	if m, ok := manifest.(*schema2.DeserializedManifest); ok {
-		if m.Manifest.Config.MediaType == schema2.MediaTypePluginConfig ||
-			m.Manifest.Config.MediaType == "application/vnd.docker.plugin.image.v0+json" { //TODO: remove this v0 before 1.13 GA
+		if m.Manifest.Config.MediaType == schema2.MediaTypePluginConfig {
 			return false, errMediaTypePlugin
 			return false, errMediaTypePlugin
 		}
 		}
 	}
 	}

+ 2 - 2
docs/extend/config.md

@@ -14,7 +14,7 @@ keywords: "API, Usage, plugins, documentation, developer"
 -->
 -->
 
 
 
 
-# Plugin Config Version 0 of Plugin V2
+# Plugin Config Version 1 of Plugin V2
 
 
 This document outlines the format of the V0 plugin configuration. The plugin
 This document outlines the format of the V0 plugin configuration. The plugin
 config described herein was introduced in the Docker daemon in the [v1.12.0
 config described herein was introduced in the Docker daemon in the [v1.12.0
@@ -25,7 +25,7 @@ configs can be serialized to JSON format with the following media types:
 
 
 Config Type  | Media Type
 Config Type  | Media Type
 ------------- | -------------
 ------------- | -------------
-config  | "application/vnd.docker.plugin.v0+json"
+config  | "application/vnd.docker.plugin.v1+json"
 
 
 
 
 ## *Config* Field Descriptions
 ## *Config* Field Descriptions

+ 1 - 2
plugin/distribution/pull.go

@@ -153,8 +153,7 @@ func Pull(ref reference.Named, rs registry.Service, metaheader http.Header, auth
 		logrus.Debugf("pull.go: error in json.Unmarshal(): %v", err)
 		logrus.Debugf("pull.go: error in json.Unmarshal(): %v", err)
 		return nil, err
 		return nil, err
 	}
 	}
-	if m.Config.MediaType != schema2.MediaTypePluginConfig &&
-		m.Config.MediaType != "application/vnd.docker.plugin.image.v0+json" { //TODO: remove this v0 before 1.13 GA
+	if m.Config.MediaType != schema2.MediaTypePluginConfig {
 		return nil, ErrUnsupportedMediaType
 		return nil, ErrUnsupportedMediaType
 	}
 	}