Update client Image to have configurable platform

Separate Fetch and Pull commands in client to distinguish
between platform specific and non-platform specific operations.
`ctr images pull` with all platforms will now unpack all platforms.
`ctr content fetch` now supports platform flags.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
Derek McGowan
2018-07-13 16:11:50 -07:00
parent fb1084d9cc
commit 3a916a0f67
7 changed files with 151 additions and 60 deletions

View File

@@ -40,11 +40,11 @@ func TestOCIExport(t *testing.T) {
}
defer client.Close()
pulled, err := client.Pull(ctx, testImage)
pulled, err := client.Fetch(ctx, testImage)
if err != nil {
t.Fatal(err)
}
exportedStream, err := client.Export(ctx, &oci.V1Exporter{}, pulled.Target())
exportedStream, err := client.Export(ctx, &oci.V1Exporter{}, pulled.Target)
if err != nil {
t.Fatal(err)
}