The prune method should run without dockerd. We now switched
to using the available_backends property instead of the
backends property.
This fixes https://github.com/projectatomic/atomic/issues/869.
Closes: #871
Approved by: baude
Fix a slew of issues related to deletion of images and containers. Also
added --assume_yes to be consistent with other commands. This will benefit
dbus interaction as well given that we do not want confirmation occuring
over dbus.
Issues that were fixed:
* Proper catch and error for trying to delete all images|containers when no images|containers exist
* Catch and error when no image|container is given by user and no --all
* when --storage and --all are used, only images|containers in that backend are now deleted
* when --all is given but not --storage, all images|containers from all backends are now deleted.
* Fixed logical error when deleting containers
* Deletion of images|containers now is consistent in its confirm and abort messages.
Added unittests.
Closes: #864
Approved by: rhatdan
Ideally, the atomic CLI should be able to operate independently
of the backends it supports. For example, if dockerd is inactive,
the ostree backend and atomic cli should still work.
This requires some tweaking to the backendutils code and the work
flow. We also need to specifically know if the user passes
--storage so that we treat that as an explicit override. The work
flow is now roughly:
* a default storage can be defined in atomic.conf (was always this way)
* if not defined, defaults to docker.
* if --storage is passed, treat explictly and fail if cannot execute
* if no --storage is specified, use default. if default is not available, move
onto the next backend.
Under certain conditions when trying to delete an image, a exception
occured because obj.repotags is not populated as a list. This is OK
but wasnt being handled correctly. New conditionals to use obj.id when
this happens.
Closes: #837
Approved by: rhatdan
To try to delete all of images, we will hit error like this
"local variable 'img_obj' referenced before assignment", in
fact, the variable should be 'del_obj', it's a typo.
Signed-off-by: Alex Jia <ajia@redhat.com>
Closes: #827
Approved by: rhatdan
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
Add an optional --storage flag to the following commands:
- images delete
- info
- mount
- verify
- version
If specified, the command will only look at the specified storage
(ostree/docker) for the image to perform the action. If not
specified, the command will look through both ostree/docker for
the image (as it was before). However, if the storage is not
specified and the image exists in both ostree and docker, the
command will error and prompt the user to specify. Image inspection
also no longer forces the user to delete/rename one or the other.
This is meant to address the duplicate naming issue (where a user
can have an image in both ostree and docker with the same name).
Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com>
Closes: #720
Approved by: giuseppe
they are part of the class SystemContainers, do not repeat
system_container in the name.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #683
Approved by: rhatdan
Add missing interfaces.
Fix functions to return text, rather then displaying directly.
Change atomic_client.py to take input from command line. These args are translated into function calls in python.
Add tests scripts in tests/integration/dbus directory
Closes: #668
Approved by: rhatdan
atomic images delete --force
Should force the remove of images that are in use, not answer the prompt yes.
atomic -y|--assumeyes images delete foobar
Should force the answer to yes
Also lots of cleanups of the man page.
RGXZRNUThJOSjAFdnRc+UZvNbuIfKT7CEW9yyo4fh9mtUxZi6UYRpywKMWxWaVDu
qxOlaAHdYKJZUyt9sIC8Lx+63BomJH+LZXTVVs1UP5kZ4UaDPqypPxDXjgCulAJg
6/vn3r16SEFqtX/1ehVOTbN+I4mdkich451I/oQtWHU4vD+fk/YPNXIOZTAhPq1E
+nLoC2qsP1H6Xpvpdg8c6OB/d+yFiROpHqhAAWWfDdE/n/EoSZdvZT0OtNrCvEAn
X5TQ/Z0rQfVR5/+CZj1H+w01mwcYMNkhLW14srz7SVGf+TpbtHQzItENiK380fSM
jOlzmGbkaLORdTIDFOUCSwclHJ7dG00RDkpsE3Ou5TAzSIsu8MWg2Q++fYO0D1jw
vsMSDtZs/UwPoQgXmEBOPuT0ySBESePjqUoCnY8lR4hLKpZKMmZ9hiZ+hOLaHrMu
biGcUzXUOGfsV2UgOfR9XJ/ruBOT5LWCnYH6V3hgI0S/P5mhBuS+NvcUaF3n+3/g
RiRkYxCVGe1qpoUQEEBUPJqngubr7QLnZj+85mfzC/Afj+ikwfKhMekfIQwObIGD
hi3VDWt9tBZPn8tqR7CeQnlpHTxcHoojCMdE5T9NAbXaULIUzpAeMZ5BTyuQKsHD
lQpDIBy7+V1UHruXQOs6
=+yCq
-----END PGP SIGNATURE-----
prune: always prune OSTree references
4abc3eb8c9 changed this to be done only
when there are Docker images that are pruned as well. Change it back to
the previous behavior.
Closes: https://github.com/projectatomic/atomic/issues/496
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Closes: #497
Approved by: jlebon