1
0
mirror of https://github.com/projectatomic/atomic.git synced 2026-02-06 21:45:24 +01:00

22 Commits

Author SHA1 Message Date
Dan Walsh
84cc530db2 Move subparser code to submodules.
cli setup should happen in the submodules, for submodules that exist.
Also fix alphabetic order of command verbs.

Closes: #564
Approved by: giuseppe
2016-08-30 10:52:48 +00:00
Dan Walsh
c79c00bf96 Fix up many failures when running atomic with overlay backend
Atomic mount blows up do to badly Camel Case on Graphdriver
Atomic umount blows up because it was not able to remove temporary container
Atomic diff blows up since overlayfs does not mount with a rootfs.
Atomic help blows up also because there is no rootfs directory.

Cleanup atomic help for Overlayfs back end

Closes: #535
Approved by: rhatdan
2016-08-15 20:20:47 +00:00
Brent Baude
6159b9e78b Atomic/diff.py: Fix --json output/formatting
With the tty changes, we were sending a str to the
util.output_json method which expects a dict|json.

Closes: #525
Approved by: rhatdan
2016-08-09 17:15:24 +00:00
Giuseppe Scrivano
ce89eb8ea9 diff: fix --srpms when Python3 is used
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #503
Approved by: cgwalters
2016-07-29 10:50:54 +00:00
Jhon Honce
d8b1a5e08e Refactor to use util.write_* functions
Signed-off-by: Jhon Honce <jhonce@redhat.com>
2016-07-25 12:57:36 -07:00
Dan Walsh
17e887ace7 Lots of cleanups for pylint and python3-lint warnings
Closes: #463
Approved by: jlebon
2016-07-14 22:02:54 +00:00
AmartC
e52f183ad9 Changes made to diff using json
Closes: #442
Approved by: rhatdan
2016-06-23 22:11:50 +00:00
AmartC
14241ea5d3 Changes made to diff and atomic_dbus.
Also note that for atomic_client, there was cases added to handle the other Atomic features which were already in atomic_dbus such as version, verify and storage.

Closes: #437
Approved by: rhatdan
2016-06-23 15:32:31 +00:00
Brent Baude
35c18bc67d Atomic/diff: Improve docs and output messages for diff
https://github.com/projectatomic/atomic/issues/378 points out that
when an rpm diff is done with --names-only, the output messaging was
not clear enough.  Reworked the man page, --help, and output message
to clarify that when --names-only is used, it only compares RPMs
based on names and NOT versions.

Nice find by Micah.

Closes: #381
Approved by: rhatdan
2016-05-11 18:52:44 +00:00
Brent Baude
26742240f0 Atomic/diff.py: Do not hide SelectionMatchError and clean-up
Previously, the raise of SelectionMatchError was not getting to
stderr so diff would fail silently.  We now write the error to
stderr and clean up any mounts and dm devices created.

Closes: #368
Approved by: rhatdan
2016-05-02 21:35:08 +00:00
Giuseppe Scrivano
ec646291bc atomic: rename writeOut to write_out
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-04-18 20:27:32 +02:00
Brent Baude
dcbe9b5b92 Atomic/diff.py Add release to version, name, and epoch of RPM
When an RPM diff was performed between two docker objects, we
previously only store the name, version, and epoch of the RPM for
comparision.  It turns out versioning information is also done in
the release portion as well.

This addresses https://github.com/projectatomic/atomic/issues/315
2016-03-04 14:36:51 -06:00
Brent Baude
758ab4d7af Atomic Diff: RPMS arent being collected
Due to very small bug, the function that collects the
operating system version and RPMs was not being called.
2015-12-15 13:02:07 -06:00
Brent Baude
327f152d4b BUGFIX: Atomic diff leaks FD (BZ # 1285006)
Under the condition that you diff two images and one or both
of the images are not RPM based, no cleanup of the mounts and
dm devices was done. This was reported via BZ #1285006.

We now handle the exit and cleanup differently which counts
for this condition.

Also added a try/except for catching control-c, where if found
it will clean up the mounts and dm devices.
2015-12-10 11:02:00 -06:00
Dan Walsh
ec5ab037da Use from . import methods 2015-11-30 16:16:51 -05:00
Brent Baude
d9fed17a13 Move lengthy subfunctions to classes
Set a pattern where if an atomic subfunction
is lengthy, then we can break that out into its own class.
This reduces the overall size of the Atomic class and allows
new development and debug to be cleaner.

Instead of using the func function of argparser, we pass
the Class and Function that should be run as variables. For
example, the Atomic verify subfunction would now be:

    _class=Atomic.Atomic, func='verify'

The defined class is instantiated after parseargs is run.  We
then perform the set_args and call the function.
2015-11-30 14:53:21 -06:00
Dan Walsh
ca5243baad Fix output of diff to work on python3 2015-11-24 11:10:42 -05:00
Dan Walsh
1577419951 I merged Colins patch instead of mine
This reverses my previous patch
2015-11-24 09:21:30 -05:00
Daniel J Walsh
a9aede9da3 Merge pull request #229 from cgwalters/pylint-pyrpm
diff: Quiet pylint warning
2015-11-24 09:20:26 -05:00
Dan Walsh
df23b26d95 Fix bogus pylint error 2015-11-24 08:58:36 -05:00
Colin Walters
40901254fe diff: Quiet pylint warning
It doesn't understand native code bindings.
2015-11-23 21:36:57 -05:00
Brent Baude
6e24d6bcdb Introduce 'atomic diff'
Allow users to diff between two docker images|container. There
    are two types of diffs that can be run -- a file diff or an
    RPM diff.  The file diff is always the default.  The RPM diff
    can be added with -r.  The file diff can be excluded with -n.
2015-11-23 15:46:06 -06:00