1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-07 06:44:52 +01:00

12 Commits

Author SHA1 Message Date
Brent Baude
1f67164a96 Fix outdated container image message (BZ 1434430)
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
2017-03-21 17:54:06 +00:00
Brent Baude
ce57e8e43d Atomic/update.py: Updating a local image
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
2017-03-16 13:45:32 +00:00
Brent Baude
4e781bf777 Running command inside running container fails
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
2017-03-16 13:45:32 +00:00
Brent Baude
358b97003e Refactor Scan
Refactor scan to use the backends as well as container and
image objects.

Closes: #919
Approved by: giuseppe
2017-02-28 14:47:12 +00:00
Brent Baude
2ebeb1decd Fix run behavior
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
2017-02-08 00:38:38 +00:00
Brent Baude
c7aafb3314 Refactor Pull, Update, Install, Run
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
2017-01-17 22:16:36 +00:00
Brent Baude
9f6612a9a2 Refactor atomic stop
Refactoring of atomic stop to use container objects and the new backend
methods.

Closes: #798
Approved by: rhatdan
2016-12-14 15:45:39 +00:00
Brent Baude
e405c6a048 Refactor containers verb
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
2016-12-09 14:05:49 +00:00
Brent Baude
ef984ed066 Refactor images
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
2016-11-29 21:47:05 +00:00
Brent Baude
16c761447c backends: has image|container return objects
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
2016-11-22 15:38:13 +00:00
Giuseppe Scrivano
35dceef3e1 backends: add skeleton for ostree backend
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

backend: fix pylint issues for ostree backend

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Add layer object, image object updates, pylint

layer.py: Add layer object
image.py: Add fq name propert, image equality methods, and remote inspection.
backends.py: Begin documentation of common methods
_docker.py: Adding methods: pull, make_remote_image, layers
Full pylint run and cleanups.  Passes all tests.

Closes: #757
Approved by: baude
2016-11-22 15:38:13 +00:00
Brent Baude
5e4ef83304 Add refactoring structure
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
2016-11-22 15:38:13 +00:00