Commit graph

6 commits

Author SHA1 Message Date
Nalin Dahyabhai
cb0bb94c68 Avoid parsing image metadata
Avoid parsing metadata that the image library keeps in order to find an
image's top layer and creation date; instead, use the values which the
storage library now makes available, which will be correct once we merge
PR #654 or something like it.

Instead of assuming the last blob which was added for the image was the
manifest, read it directly and compute its digest ourselves.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-26 16:33:02 -04:00
Nalin Dahyabhai
7e9ac9700b Avoid duplicate image configuration parsing logic
Don't bother trying to find and parse the image's configuration blob
after we've already done it; just reuse the value.  This frees us from
making the assumption that the last blob which was committed to local
storage was the image's configuration blob.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-26 12:43:22 -04:00
Nalin Dahyabhai
8957156c41 Parse out image names as repotags and repodigests
Parse the set of image names as tagged references, canonical references,
or repository names to which we add the default tag, and return them in
libkpod.ImageData reports.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-26 12:43:22 -04:00
Nalin Dahyabhai
2e50006f1c Avoid using lower-level storage APIs
Switch from using the lower-level storage APIs (accessing LayerStore,
ImageStore, and ContainerStore types directly) in favor of the
higher-level ones that take care of synchronization and locking for us.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-07-25 13:29:49 -04:00
Ryan Cole
c1706475c0 move functions supporting rmi command to libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 16:17:26 -04:00
Ryan Cole
14864f820e move code supporting push, pull, and inspect to libkpod and libkpod/image
Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-24 14:35:36 -04:00
Renamed from cmd/kpod/imageData.go (Browse further)