The Windows Default matcher also checks the the OS Version prefix,
however, the platforms.DefaultSpec does not include it, which means
that it won't match the matcher.
This solves the issue by adding the OS Version to the DefaultSpec.
Signed-off-by: Claudiu Belu <cbelu@cloudbasesolutions.com>
This changes platforms.Parse to hit /proc to look up CPU info only when
it's needed, instead of in init(). This makes the package a bit easier
for other packages to consume, especially clients that don't call
platforms.Parse or need to lookup CPU info.
Signed-off-by: Jason Hall <jasonhall@redhat.com>
`OnlyStrict()` returns a match comparer for a single platform.
Unlike `Only()`, `OnlyStrict()` does not match sub platforms.
So, "arm/vN" will not match "arm/vM" where M < N, and "amd64" will not also match "386".
`OnlyStrict()` matches non-canonical forms. So, "arm64" matches "arm/64/v8".
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Implements the Windows lcow differ/snapshotter responsible for managing
the creation and lifetime of lcow containers on Windows.
Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
Adds a new platform interface for matching and comparing platforms.
This new interface allows both filtering and ordering of platforms
to support running multiple platform and choosing the best platform.
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
The variant is required for platform match while pulling images
for ARM platforms. Currently, the cpuVariant only would be assigned
on linux/arm|arm64 platforms. Other platforms this variable would
be empty. So we can use this cpuVariant to initialize the Variant
field.
Change-Id: Ic065be9b502f1e662445daa61a0973bf56385b37
Signed-off-by: Wei Chen <Wei.Chen@arm.com>
Signed-off-by: Penny Zheng <Penny.Zheng@arm.com>
For supporting selection of images and runtimes in the containerized
world, there is thin support for selecting objects by platform. This
package defines a syntax to display to users that can express specific
platforms in addition to wild cards for matching platforms.
The plan is to extend this to provide support for parsing flag
arguments and displaying platform types for images. This package will
also provide a configurable matcher to allow match of platforms against
arbitrary targets, invariant to the Go compilation.
The internals are based the OCI Image Spec model.
This changeset is being submitted for feedback on the approach before
this gets larger. Specifically, review the unit tests and raise any
concerns.
Signed-off-by: Stephen J Day <stephen.day@docker.com>