When running an image with atomic run, if the container already exists,
we were accidently displaying a message stating that the container's
image was old. This was due to an invalid comparison between the container's
image id and the image's id. The comparison was failing because we were
comparing two different variables and not the ids.
This was reported in bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=1434430
Closes: #945
Approved by: rhatdan
If the image is built (and updated) locally, we need to handle this
differently than if the image came from a registry. We now
can try/except our way through things and properly handle.
Closes: #938
Approved by: rhatdan
An exception was being thrown when trying to run a command inside
an already running container. For example:
sudo atomic run foobar echo true
The problem was a lack of a setter for user_command in the container
object as well as some mishandled string <-> list conversions.
Closes: #938
Approved by: rhatdan
There were bugs in the run behavior in several scenarios:
* running an image with a command
* running a container that is stopped with and without a command
* running a container that is running with and without a command
Closes: #880
Approved by: rhatdan
Refactor several of the atomic verbs and subverbs to take advantage
of object refactoring.
Also, do not pull images with skopeo if the local image is already
at the latest.
$ sudo python ./atomic --debug pull busybox
Namespace(_class=<class 'Atomic.pull.Pull'>, assumeyes=False, debug=True, func='pull_image', image='busybox', reg_type=None, storage='docker')
Latest version of busybox already present.
Closes: #825
Approved by: baude
With the exception of fstrim, the containers verb has now been
refactored. It primarily now uses the containers object in its
implementation.
Closes: #792
Approved by: rhatdan
Covers all but verify and generate. This is a refactoring of the
images subverbs (i.e. info, version, delete, ...)
Added in a unittest for list and info.
Closes: #771
Approved by: baude
If the has_image|has_container evals to True, then return
the proper object; else None
Add unittest structure for backends/backendutils.py
We want to make sure we have a good backend/backendutils
unittest. This should simplify unittests for all backends.
refactor.py: Remove the file used to help mini-test the
refactoring work. It is not needed by upstream and was
only including during the development phases.
Closes: #757
Approved by: baude
Atomic/backendutils.py: Class for working with unknown backend
Atomic/objects/image|layer|container.py: classes for objects
Atomic/backends/backend|_docker|_ostree.py: Abstract backends for ostree and docker
Closes: #757
Approved by: baude