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

640 Commits

Author SHA1 Message Date
Brent Baude
ecdd24b98c backends: has image|container return objects
If the has_image|has_container evals to True, then return
the proper object; else None

Closes: #750
Approved by: baude
2016-11-08 17:16:19 +00:00
Giuseppe Scrivano
0ba3e35ffb syscontainers: fix installation
bug introduced by:

syscontainers: use image instead of self.args.image

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

Closes: #751
Approved by: baude
2016-11-08 16:24:55 +00:00
Brent Baude
7649c4214c WIP 2016-11-07 15:17:12 -06:00
Brent Baude
ed763d4c2d Full pylint run and cleanups. Passes all tests. 2016-11-07 13:15:53 -06:00
Giuseppe Scrivano
128eee7dde backend: fix pylint issues for ostree backend
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-11-07 13:15:53 -06:00
Giuseppe Scrivano
11de9d29a2 backends: add skeleton for ostree backend
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-11-07 13:15:53 -06:00
Giuseppe Scrivano
def55d5e35 syscontainers: use image instead of self.args.image
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-11-07 13:15:53 -06:00
Giuseppe Scrivano
f0d28ae47d syscontainers: get_containers accept what containers to inspect
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-11-07 13:15:53 -06:00
Giuseppe Scrivano
27b64818f4 syscontainers: allow to specify what image to pull
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2016-11-07 13:15:53 -06:00
Brent Baude
802836f43d WIP refactor 2016-11-07 13:15:53 -06:00
Dan Walsh
eccc9739a6 Bump to V1.14.0-dev 2016-11-07 10:20:22 -05:00
Dan Walsh
8046db2999 Bump to V1.13.8 2016-11-07 10:10:18 -05:00
Dan Walsh
569c5d57fb Return image if exact match
Closes: #748
Approved by: rhatdan
2016-11-07 14:51:21 +00:00
Brent Baude
d280be087d Atomic/discovery.py: Python3 byte vs str fixes
In code paths with Python 3, when dealing with remote registries,
we find that under certain conditions values are set as bytes which
need to be encoded/decoded to work properly with things like json
and ord().

Closes: #747
Approved by: rhatdan
2016-11-05 09:04:31 +00:00
Dan Walsh
4c3ea60df5 Revert accidental commit 2016-11-03 15:59:45 -04:00
Dan Walsh
1d01980dfe Bump to V1.16.7 2016-11-03 11:22:48 -04:00
Brent Baude
0a347975c4 Atomic/verify.py: Ensure probes use fq name
When walking the layers of an image in atomic verify, we need to be sure
we use a fq image name when probing.  In cases where the tagging includes
a non-fq image name, we were not.  This resolves Bugzilla 1377952.

Closes: #744
Approved by: baude
2016-11-03 14:30:46 +00:00
Dan Walsh
a45a2a9dad Bump to v1.13.6 2016-11-01 14:03:15 -04:00
Brent Baude
8a46a639c4 Atomic/mount.py: Handle self.options == None
When using the dbus interface to perform a scan, self.options
was being set to None.  This tripped a condition with the
setting of args where it could not be iterated.  We now ensure
self.options is not None prior to the iteration.

Closes: #743
Approved by: rhatdan
2016-11-01 17:31:12 +00:00
Aaron Weitekamp
b17944dad4 return empty dict in get_registry_configs()
Closes: #742
Approved by: rhatdan
2016-11-01 14:46:07 +00:00
Dan Walsh
3d9567b332 Bump to v1.13.5 2016-10-31 15:14:45 -04:00
Brent Baude
6f8a60eacc Atomic/sign.py: Ensure image tag is included in signing.
The previous change where we removed the tag from the write
file location impacted the signing because the tag was also
being omitted. This ensures the tag is omitted from the file
path but included in the call skopeo standalone-sign.

Closes: #741
Approved by: rhatdan
2016-10-31 15:45:08 +00:00
Dan Walsh
0331180c90 Bump to v1.13.4 2016-10-28 14:36:39 -04:00
Brent Baude
18609b254f Atomic/sign.py: Remove tag from signing path
It looks like skopeo removed the tag from the signing path
after 7.3.1.  Removing tag in atomic as well.

Closes: #738
Approved by: rhatdan
2016-10-28 14:35:10 +00:00
Brent Baude
adc4788a03 Atomic/sign.py: Fix manifest digest for write location
The manifests produced by Atomic were incorrect resulting in
an incorrect hash being used to sign.  This also resulted in
the signature path being incorrect. Contributing to the failure
was the json serialization which is now not used.

Closes: #737
Approved by: rhatdan
2016-10-28 12:51:21 +00:00
Dan Walsh
5a075e82aa Bump to v1.13.3 2016-10-27 10:02:36 -04:00
Dan Walsh
28579aea79 Cleanup of dbus interfaces
Rename atomic_client to atomic_dbus_client, so it is easier to understand.
Cleanup a couple of errors causin dbus to break.

Closes: #732
Approved by: rhatdan
2016-10-27 13:37:16 +00:00
Dan Walsh
04b0913cb5 Revert atomic host dbus support
OSTree commands already have Cockpit/dbus support.  Users should
call them directly.

Closes: #733
Approved by: cgwalters
2016-10-26 18:57:44 +00:00
Jonathan Lebon
d2b6a875d1 Atomic/trust.py: handle older gpg2 outputs
1. Decode gpg2 output as UTF-8.
2. Use startswith() and require ':' to be more strict.
3. Handle older gpg2 outputs in which the User-ID is part of the 'pub'
   line.

Closes: #724
Approved by: rhatdan
2016-10-26 18:46:48 +00:00
Giuseppe Scrivano
b6806b031e syscontainers: fix introspection on CentOS 7
older gobject-introspection versions convert these objects to an array
instead of a dictionary.  Add a workaround for both versions of it.

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

Closes: #724
Approved by: rhatdan
2016-10-26 18:46:48 +00:00
Dan Walsh
02cf630c45 Just exec rpmostree if in tty mode
If running from dbus continue to return output.

Closes: #731
Approved by: cgwalters
2016-10-26 15:23:58 +00:00
Brent Baude
3b723f4222 Atomic/util.py: Strip port in Decompose class
When determining if a registry name is a registry name, you have to strip
the port or it will fail.  For example:

```
python -c 'from Atomic.util import Decompose; print(Decompose("localhost:5000/somethingibuilt:latest").all)'
('', 'localhost:5000', 'somethingibuilt', 'latest', '')
```

Note how the localhost:5000 ends up in the repo "field".  With this fix:

```
python -c 'from Atomic.util import Decompose; print(Decompose("localhost:5000/somethingibuilt:latest").all)'
('localhost:5000', '', 'somethingibuilt', 'latest', '')
```

Now ends up in the registry field.

Closes: #729
Approved by: baude
2016-10-26 01:03:28 +00:00
Dan Walsh
df21ba3d56 Fix handling of args for host.py
Closes: #727
Approved by: cgwalters
2016-10-25 15:04:09 +00:00
Dan Walsh
97dc6098a0 Bump to v1.13.2 2016-10-24 17:50:45 -04:00
Dan Walsh
2c22274359 Change host.py to work both from CLI and from dbus interface
Closes: #723
Approved by: rhatdan
2016-10-24 21:39:23 +00:00
Dan Walsh
f9c6571c78 Don't switch to json, let dbus handle this
Closes: #723
Approved by: rhatdan
2016-10-24 21:39:23 +00:00
Dan Walsh
8c28d61592 Fix container handling bug in atomic container
Closes: #723
Approved by: rhatdan
2016-10-24 21:39:23 +00:00
Dan Walsh
b110e73c88 Refactor Trust code to work with dbus interface
Closes: #723
Approved by: rhatdan
2016-10-24 21:39:23 +00:00
Brent Baude
a60a3fedad Atomic/atomic.py: Explore RepoTags for Fq name
In cases where the input name is not fully-qualified and
the local image is tagged more than once, we iterate repotags
in an attempt to figure out the fq name.  If this fails, we
raise a ValueError like before.

Closes: #718
Approved by: rhatdan
2016-10-24 14:56:28 +00:00
yuqi-zhang
fb3779349e Add --storage option to image-related commands
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
2016-10-24 09:27:00 +00:00
petervo
ab30d45a24 syscontainers: Fix docker: and dockertar: installs
Closes: #721
Approved by: rhatdan
2016-10-23 10:19:04 +00:00
Brent Baude
9a0114c284 Atomic: Prune unused methods
Removing unused methods to reduce our code counts which will
come in handy when refactoring occurs.

Closes: #717
Approved by: rhatdan
2016-10-21 15:37:27 +00:00
Brent Baude
07d4e01c6b Atomic/verify.py: Smooth out verify issues
Several long-term issues existed for verify including some
munging of information between layers under certain
conditions.  This PR addresses these issues by simplifying
the way things are to be inspected.

Example output as follows:

```
$ atomic verify docker.io/library/busybox
$ atomic verify docker.io/ubuntu

docker.io/ubuntu:latest contains the following images:

NAME                           LOCAL VERSION        REMOTE VERSION       DIFFERS
docker.io/ubuntu:latest        44776f55294a30e89d6a f753707788c5c100f194 Yes

registry.access.redhat.com/rhel7/rsyslog:latest contains the following images:

NAME                           LOCAL VERSION        REMOTE VERSION       DIFFERS
rhel7/rsyslog                  rhel7/rsyslog-7.2-21 rhel7/rsyslog-7.2-29 Yes
rhel7/rhel                     rhel7/rhel-7.2-56    rhel7/rhel-7.2-104   Yes

$
```

Closes: #714
Approved by: baude
2016-10-19 20:41:49 +00:00
Brent Baude
11468d40c4 Atomic/images.py: Enable filter for dangling.
The dangling filter was being omitted from the filter list
when running atomic images list.

Closes: #715
Approved by: rhatdan
2016-10-18 19:25:56 +00:00
Giuseppe Scrivano
41cc884b62 syscontainers: fix version
also now "version" returns None instead of raising an exception when
the Docker daemon cannot be reached.  This is needed so that atomic
can work without a docker daemon as well.

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

Closes: #711
Approved by: rhatdan
2016-10-18 12:16:57 +00:00
Brent Baude
112abcf2ac Atomic/info.py: Fix info and version
The atomic image version subcommand was broken.  Among the issues
was it called the wrong method, attempted to obtain the image
if not locally present, and outputted incorrect information. Some
of the problems were described in:

     https://github.com/projectatomic/atomic/issues/708

The version method has been redone to obtain the correct information.  It
no longer attempts to obtain the image if not present. It raises an
error.

Also, moved the version method into info and performed a pep8 clean up.

Example output now appears like:

```
atomic --debug version -r docker.io/busybox

IMAGE NAME                                     VERSION   IMAGE ID
10.3.11.254:5000/baude/busybox:latest          None      e02e811dd08f
  Tag: docker.io/busybox:latest
  Tag: localhost:5000/busybox:latest

atomic --debug version -r registry.access.redhat.com/rhel7/rsyslog

IMAGE NAME                                               VERSION                IMAGE ID
registry.access.redhat.com/rhel7/rsyslog:latest          rhel7/rsyslog-7.2-21   53f20e902da7
registry.access.redhat.com/rhel7.2:7.2-56                rhel7/rhel-7.2-56      1a9b3357bac5

```

Closes: #710
Approved by: baude
2016-10-14 19:53:03 +00:00
Dan Walsh
aed68da24c Fix run to use command and args, to make help message correct
Closes: #695
Approved by: rhatdan
2016-10-14 15:04:26 +00:00
Aaron Weitekamp
6d909022fc trust show GPG key ID
Closes: #702
Approved by: rhatdan
2016-10-13 20:59:03 +00:00
Aaron Weitekamp
8d23c2bffa remove sigstore config with trust delete 2016-10-13 13:34:20 -04:00
Jonathan Lebon
b227b2a8b3 syscontainers.py: decode systemctl output
Closes: #684
Approved by: cgwalters
2016-10-13 16:37:01 +00:00