Browse code

Remove interim env var LCOW_API_PLATFORM_IF_OMITTED

Signed-off-by: John Howard <jhoward@microsoft.com>

John Howard authored on 2018/02/10 05:03:22
Showing 2 changed files
... ...
@@ -7,7 +7,6 @@ import (
7 7
 	"fmt"
8 8
 	"io"
9 9
 	"net/http"
10
-	"os"
11 10
 	"runtime"
12 11
 	"strconv"
13 12
 	"strings"
... ...
@@ -71,17 +70,7 @@ func newImageBuildOptions(ctx context.Context, r *http.Request) (*types.ImageBui
71 71
 	options.Target = r.FormValue("target")
72 72
 	options.RemoteContext = r.FormValue("remote")
73 73
 	if versions.GreaterThanOrEqualTo(version, "1.32") {
74
-		// TODO @jhowardmsft. The following environment variable is an interim
75
-		// measure to allow the daemon to have a default platform if omitted by
76
-		// the client. This allows LCOW and WCOW to work with a down-level CLI
77
-		// for a short period of time, as the CLI changes can't be merged
78
-		// until after the daemon changes have been merged. Once the CLI is
79
-		// updated, this can be removed. PR for CLI is currently in
80
-		// https://github.com/docker/cli/pull/474.
81 74
 		apiPlatform := r.FormValue("platform")
82
-		if system.LCOWSupported() && apiPlatform == "" {
83
-			apiPlatform = os.Getenv("LCOW_API_PLATFORM_IF_OMITTED")
84
-		}
85 75
 		p := system.ParsePlatform(apiPlatform)
86 76
 		if err := system.ValidatePlatform(p); err != nil {
87 77
 			return nil, errdefs.InvalidParameter(errors.Errorf("invalid platform: %s", err))
... ...
@@ -6,7 +6,6 @@ import (
6 6
 	"fmt"
7 7
 	"io"
8 8
 	"net/http"
9
-	"os"
10 9
 	"strconv"
11 10
 	"strings"
12 11
 
... ...
@@ -86,17 +85,7 @@ func (s *imageRouter) postImagesCreate(ctx context.Context, w http.ResponseWrite
86 86
 
87 87
 	version := httputils.VersionFromContext(ctx)
88 88
 	if versions.GreaterThanOrEqualTo(version, "1.32") {
89
-		// TODO @jhowardmsft. The following environment variable is an interim
90
-		// measure to allow the daemon to have a default platform if omitted by
91
-		// the client. This allows LCOW and WCOW to work with a down-level CLI
92
-		// for a short period of time, as the CLI changes can't be merged
93
-		// until after the daemon changes have been merged. Once the CLI is
94
-		// updated, this can be removed. PR for CLI is currently in
95
-		// https://github.com/docker/cli/pull/474.
96 89
 		apiPlatform := r.FormValue("platform")
97
-		if system.LCOWSupported() && apiPlatform == "" {
98
-			apiPlatform = os.Getenv("LCOW_API_PLATFORM_IF_OMITTED")
99
-		}
100 90
 		platform = system.ParsePlatform(apiPlatform)
101 91
 		if err = system.ValidatePlatform(platform); err != nil {
102 92
 			err = fmt.Errorf("invalid platform: %s", err)