This repository was archived by the owner on Oct 10, 2020. It is now read-only.
dbus: Add convenience method for scan results lookup#874
Closed
baude wants to merge 1 commit intoprojectatomic:masterfrom
Closed
dbus: Add convenience method for scan results lookup#874baude wants to merge 1 commit intoprojectatomic:masterfrom
baude wants to merge 1 commit intoprojectatomic:masterfrom
Conversation
Member
Author
|
@larskarlitski PTAL |
6442eec to
3b6ffbe
Compare
larskarlitski
suggested changes
Feb 8, 2017
Contributor
larskarlitski
left a comment
There was a problem hiding this comment.
Great, thanks. Please rename the D-Bus method to GetScanResultsById() to be consistent with the other methods.
rhatdan
reviewed
Feb 8, 2017
atomic_dbus_client.py
Outdated
| def get_scan_results_by_id(self, iid): | ||
| return self.dbus_object.get_scan_results_by_id(iid, dbus_interface="org.atomic") | ||
|
|
||
|
|
Member
There was a problem hiding this comment.
Do we want all these open lines?
3b6ffbe to
be1d60e
Compare
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.
be1d60e to
6193594
Compare
Member
Author
|
@rhatdan this is ready for merge |
Member
|
📌 Commit 6193594 has been approved by |
Member
Author
rh-atomic-bot
pushed a commit
that referenced
this pull request
Feb 8, 2017
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
|
💔 Test failed - status-redhatci |
Contributor
|
@rh-atomic-bot retry |
rh-atomic-bot
pushed a commit
that referenced
this pull request
Feb 8, 2017
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
|
💔 Test failed - status-redhatci |
Member
|
@rh-atomic-bot retry |
|
☀️ Test successful - status-redhatci |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.get_scan_results_by_id('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.