Commit Graph

14 Commits

Author SHA1 Message Date
Dan Walsh 5531c8da65 Move storage/storage go objects to storage.
There is no reason for the extra directory level.

Also fixup some go lint issues
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2017-05-16 17:25:11 -04:00
Dan Walsh 473f49f004 Remove Get prefix on method calls.
Go validate suggests that you should not use functions that begin with Get,
unless you have to.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2017-05-10 11:04:46 -04:00
Nalin Dahyabhai 944b102691 Add truncindex to look up by short IDs
Add a truncindex to the layer, image, and container stores, so that
layers, images, and containers can also be referred to by truncated
versions of their IDs in any place where we previously accepted names.

For containers, we don't add a truncated index for referring to
containers by layer ID, because there doesn't appear to be a minimum
length in truncindex, and we don't want to mistakenly treat a truncated
but not sufficiently-unique container ID as a layer ID, which would
likely resolve to some other different container.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-03-06 13:53:46 -05:00
Nalin Dahyabhai 321373adb4 Add GetContainerDirectory/GetContainerRunDirectory
Add GetContainerDirectory and GetContainerRunDirectory methods to the
store, for getting the location of a directory in which the caller can
manage data directly.

This breaks the general model of keeping the library's caller from
having to bother with where things are stored once the library is
initialized, but is added so that ocid won't have to manage the
directory in which it's dropping files to be picked up by other
binaries, in particular configuration files that it's leaving for runc.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-09-23 14:24:22 -04:00
Nalin Dahyabhai 87dfe2feb0 Rename Mall objects to Store objects
Rename the Mall interface to Store, and the Store interface to
FileBasedStore.  This is why you don't want me naming things, people.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-08-31 17:34:33 -04:00
Nalin Dahyabhai cd93e0ef62 List big data items in image(s)/container(s)
When listing information about images or containers, list the names of
their big data items, too.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-08-29 14:07:05 -04:00
Nalin Dahyabhai 1510f55fb9 Add list-image-data/list-container-data
Add a way to get a list of the data items that we've got attached to
either an image or a container.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-08-19 14:48:11 -04:00
Nalin Dahyabhai cfec7d383f Add big-data lookasides to containers
Add a BigDataStore interface to the container store, too, so that
callers can use it to store items like container configurations, which
can get pretty complex.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-08-19 14:13:57 -04:00
Nalin Dahyabhai 1accfee67e Capitalize the help text for recently-added options
Capitalize the first word of the help text that we've added for the -j
and -n options, to match the other help text.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-21 14:10:04 -04:00
Nalin Dahyabhai 8b7e1ea6d7 Support multiple names for things
Support attaching multiple names (instead of the previous optional one)
to layers, images, and containers.  Add SetNames() and GetNames()
methods that accept an ID for any type of item.  The CLI wrappers can
now be passed multiple -n/--name options.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-21 13:26:21 -04:00
Nalin Dahyabhai b50f33bf70 Add --json to many of the CLI commands
Add a --json flag to most of the CLI commands, to force output that
would have gone to stdout to be output as JSON instead of whatever form
it would otherwise take.  Error messages sent to stderr are still plain
text.

Use this chance to rework the wrapping logic so that it's more
consistent: commands that take multiple IDs attempt the specified
operation on all of them, and report errors afterward.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-20 17:47:43 -04:00
Nalin Dahyabhai 0764afb669 Fix gofmt/golint/go vet errors
Fix multiple errors flagged by gofmt, golint, and go vet checks.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-18 17:35:50 -04:00
Nalin Dahyabhai 60ff079996 Rename: cow/cowman -> storage/oci-storage
Rename the library module and CLI wrapper.
Rename daemon/graphdriver to drivers.
Catch up vendoring to match modules we've pruned.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-18 17:35:50 -04:00
Nalin Dahyabhai c28495d8f2 Rename from cow/cowman to storage/oci-storage
Rename the cow module and cowman tool to storage and oci-storage,
respectively.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-07-18 17:35:50 -04:00