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

17 Commits

Author SHA1 Message Date
baude
72a805e1ee Add verification options to dbus
There were three unused verification options normally available to the
atomic CLI but absent in the dbus API: no_validate, verbose, and
storage.  These were added to the dbus client and server.

Signed-off-by: baude <bbaude@redhat.com>

Closes: #1086
Approved by: rhatdan
2017-08-30 17:58:58 +00:00
Brent Baude
747465e1a1 dbus: Anonymous pushes should not fail on auth
When pushing an image to registry anonymously, the check for user and
password should not fail. This was reported in BZ #1453135.

Added ImagePush() to dbus_client which was lacking.

Closes: #1015
Approved by: giuseppe
2017-05-25 08:24:07 +00:00
Brent Baude
4eaab31ccb Add integrations tests for atomic_dbus_client.py
We need to make sure the atomic_dbus_client code works and if something
in atomic_dbus.py changes, the client should either be updated or still
work.

Closes: #975
Approved by: rhatdan
2017-04-21 20:12:06 +00:00
Giuseppe Scrivano
cbaa64c463 dbus: expose ImagesTag
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #958
Approved by: rhatdan
2017-04-12 21:33:58 +00:00
Giuseppe Scrivano
b4d359808f dbus: support storage argument for ImagesDelete
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>

Closes: #958
Approved by: rhatdan
2017-04-12 21:33:58 +00:00
Giuseppe Scrivano
b23a81be85 dbus: fix arguments order in ImagesDelete
Closes: #958
Approved by: rhatdan
2017-04-12 21:33:58 +00:00
Brent Baude
1b216a4919 Atomic/install.py: Record installs for later use
When installing an image, we now write a small bit of json
to /var/lib/atomic/install.json.  The json format is:

{
	<image_name>: {
			     id: <image_id>,
			     install_date: <install_date_in_utc
			 }
}

This will be used in update, run, etc to ensure that any image
with an INSTALL label is first installed.

Closes: #950
Approved by: giuseppe
2017-03-28 19:10:57 +00:00
Brent Baude
6dcca7bc44 Enable dbus install
Enable for performing atomic install over dbus.

Closes: #887
Approved by: baude
2017-02-17 16:00:06 +00:00
Brent Baude
391a80a5c7 Enable dbus stop
Add the ability to be able to stop a container via dbus.

Closes: #886
Approved by: baude
2017-02-17 15:00:30 +00:00
Brent Baude
c3648d16ce Enable Uninstall for dbus
Add the ability to uninstall and image or system container via dbus

Closes: #888
Approved by: giuseppe
2017-02-15 09:50:55 +00:00
Brent Baude
ca09ee877c Atomic/update.py: Bug fix and enable dbus
There was a bug in the update code where passing the
kwargs and the named variable force resulted in a TypeError
for multiple values existing.

Fixed by not passing the force keyword to _docker.py and
extracting the keyword from the kwargs.

Closes: #881
Approved by: rhatdan
2017-02-12 16:06:00 +00:00
Brent Baude
71735cb6af Ensure dbus diff works
Closes: #873
Approved by: rhatdan
2017-02-12 05:59:20 +00:00
Brent Baude
b9119dd037 dbus: Ensure Run() and ContainersDelete() work
Closes: #873
Approved by: rhatdan
2017-02-12 05:59:20 +00:00
Brent Baude
b0cd19353e dbus: Add convenience method for scan results lookup
In the case of cockpit, it would be preferable to be able
to lookup scan results by a container or image's id.  If the
container or image has not been scanned, we throw an exception;
otherwise we return the resulting json file as a str.

One other possible exception can be thrown when attempting to read
the desired file from the filesystem.  If the file cannot be read,
an exception will be thrown.  Either way, it is a clear indicator
that the object needs to be scanned for fresh results.

The following is a simple *python* example:

from atomic_dbus_client import AtomicDBus
ad = AtomicDBus()
results = ad.GetScanResultsById('6858a846fb6b557331e068252fd910b5dc93f8e6341e641400bf4582dc34e10d')

Note the use of the full ID.  As of now, we only look up against the full id
as opposed to the short id form which is often used.

Closes: #874
Approved by: baude
2017-02-09 14:26:08 +00:00
Jonathan Lebon
d9dc546ba2 run: add --detach and only add -t if in a TTY
This makes the default SPC_ARGS and RUN_ARGS a bit smarter. We only add
"-t" if we're attached to a terminal, otherwise Docker will fail to
start. We also add a --detach option to passthrough to `docker run`.

These options make atomic easier to use through D-Bus.

Closes: #776
Approved by: rhatdan
2016-12-05 14:43:49 +00:00
Jonathan Lebon
6ad84003fa dbus: fix Install() and Run() signatures
The 'user' parameter of Install() is a bool, not a string.
The 'command' parameter of Run() is a list of strings, not a string.

Closes: #776
Approved by: rhatdan
2016-12-05 14:43:49 +00: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