From 5b0a4847390d5b22b5ff7972518ad1f64f896871 Mon Sep 17 00:00:00 2001 From: John Starks Date: Tue, 15 Mar 2016 19:26:02 -0700 Subject: [PATCH] Add os.version and os.features to platform spec These changes are needed to differentiate Windows images. Signed-off-by: John Starks --- docs/spec/manifest-v2-2.md | 11 +++++++++++ manifest/manifestlist/manifestlist.go | 10 +++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/spec/manifest-v2-2.md b/docs/spec/manifest-v2-2.md index 7449e5807..305457206 100755 --- a/docs/spec/manifest-v2-2.md +++ b/docs/spec/manifest-v2-2.md @@ -89,6 +89,17 @@ image manifest based on the Content-Type returned in the HTTP response. The os field specifies the operating system, for example `linux` or `windows`. + - **`os.version`** *string* + + The optional os.version field specifies the operating system version, + for example `10.0.10586`. + + - **`os.features`** *array* + + The optional os.features field specifies an array of strings, + each listing a required OS feature (for example on Windows + `win32k`). + - **`variant`** *string* The optional variant field specifies a variant of the CPU, for diff --git a/manifest/manifestlist/manifestlist.go b/manifest/manifestlist/manifestlist.go index 49e2b1afd..a2082ec02 100644 --- a/manifest/manifestlist/manifestlist.go +++ b/manifest/manifestlist/manifestlist.go @@ -47,11 +47,19 @@ type PlatformSpec struct { // OS specifies the operating system, for example `linux` or `windows`. OS string `json:"os"` + // OSVersion is an optional field specifying the operating system + // version, for example `10.0.10586`. + OSVersion string `json:"os.version,omitempty"` + + // OSFeatures is an optional field specifying an array of strings, + // each listing a required OS feature (for example on Windows `win32k`). + OSFeatures []string `json:"os.features,omitempty"` + // Variant is an optional field specifying a variant of the CPU, for // example `ppc64le` to specify a little-endian version of a PowerPC CPU. Variant string `json:"variant,omitempty"` - // Features is an optional field specifuing an array of strings, each + // Features is an optional field specifying an array of strings, each // listing a required CPU feature (for example `sse4` or `aes`). Features []string `json:"features,omitempty"` }