Bug 823798 - lookupFileInfo and createOrUpdatePath issues for binary files
lookupFileInfo and createOrUpdatePath issues for binary files
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Tomas Lestach
Matej Kollar
Depends On:
Blocks: sat550-blockers sat550-post-ga/sat550-test-blockers
  Show dependency treegraph
Reported: 2012-05-22 03:47 EDT by Jan Pazdziora
Modified: 2012-10-15 09:47 EDT (History)
6 users (show)

See Also:
Fixed In Version: spacewalk-java-1.7.54-67
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 801463
Last Closed: 2012-10-15 09:47:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Pazdziora 2012-05-22 03:47:24 EDT
+++ This bug was initially created as a clone of Bug #801463 +++

In the latest 1.7 release of spacewalk, lookupFileInfo still returns an empty content for binary files, while getEncodedFileRevision does return the content (base64 encoded I guess). Also createOrUpdatePath has no means to specify that the uploaded file is binary.
So what I suggest:

- either change lookupFileInfo to always return base64 encoded contents, or create a new API call lookupEncodedFileInfo for that
- add the "binary" option createOrUpdatePath, so we can specify that a file is binary
Comment 1 Jan Pazdziora 2012-05-22 03:47:55 EDT
Tomas Lestach 2012-03-13 11:54:32 CET

I fixed several issues for binary config files. Some of them:

 configchannel.createOrUpdatePath now accepts also binary attribute
 configchannel.createOrUpdatePath - fixed handling of binary files
 configchannel.lookupFileInfo now returns base64 encoded content for binary files

I recommend to upload xml config files base64 encoded. 

spacewalk.git: b77a05778a707b5fb12b932b78e44d01f3a188de

If you see any other issues, please open another BZ. (I tried to address as many as possible within this one.)

Changing the RFE to a bugfix BZ as the upload of binary files via API was broken.
Comment 4 Matej Kollar 2012-06-19 10:35:50 EDT
Everything works almost like charm, except combination

>   , "binary": True
>   , "contents_enc64": False

After discussion with assignee we came to conclusion that this behavior might need some reconsideration (some input checking or at least documentation expansion), so switching back to assigned...
Comment 6 Matej Kollar 2012-06-19 10:42:30 EDT
I forgot to mention that mentioned "except" part of Comment #4 is about configchannel.createOrUpdatePath, expetially "path info" parameter.
Comment 7 Tomas Lestach 2012-06-20 06:34:23 EDT
Updating API documentation ...

spacewalk.git: 93ba1b23f92a1404635cf6dde5293d30f08e18b0
Comment 10 Matej Kollar 2012-06-22 04:36:59 EDT
I verify that functionality for


works the way that (at least from my point of view) can be understood from documentation. (Also configchannel.lookupFileInfo returns content for binary files, just to explicitly say...).

Note You need to log in before you can comment on or make changes to this bug.