Bug 823798 - lookupFileInfo and createOrUpdatePath issues for binary files
Summary: lookupFileInfo and createOrUpdatePath issues for binary files
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 550
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Matej Kollar
URL:
Whiteboard:
Depends On:
Blocks: sat550-blockers sat550-post-ga, sat550-test-blockers
TreeView+ depends on / blocked
 
Reported: 2012-05-22 07:47 UTC by Jan Pazdziora
Modified: 2012-10-15 13:47 UTC (History)
6 users (show)

Fixed In Version: spacewalk-java-1.7.54-67
Doc Type: Bug Fix
Doc Text:
Clone Of: 801463
Environment:
Last Closed: 2012-10-15 13:47:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora 2012-05-22 07:47:24 UTC
+++ 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 07:47:55 UTC
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 14:35:50 UTC
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 14:42:30 UTC
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 10:34:23 UTC
Updating API documentation ...

spacewalk.git: 93ba1b23f92a1404635cf6dde5293d30f08e18b0

Comment 10 Matej Kollar 2012-06-22 08:36:59 UTC
I verify that functionality for

  configchannel.createOrUpdatePath
  configchannel.lookupFileInfo

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.