Bug 445767 - confichannel.createOrUpdatePath not accepting binary files
Summary: confichannel.createOrUpdatePath not accepting binary files
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 510
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Partha Aji
QA Contact: Steve Salevan
URL:
Whiteboard:
Depends On:
Blocks: 429319
TreeView+ depends on / blocked
 
Reported: 2008-05-08 23:03 UTC by Partha Aji
Modified: 2018-10-19 21:04 UTC (History)
1 user (show)

Fixed In Version: sat511
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-08-13 19:03:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Partha Aji 2008-05-08 23:03:55 UTC
Description of problem:
At present, the createOrUpdatePath API method in configchannel namespace does
not accept binary files and throws a ISE. In xmlrpc binary contents can be
represented using base64 encoding, wrapping the contents between <base64>
</base64>. However createOrUpdatePath API method only deals with directories or
text files.

Version-Release number of selected component (if applicable): 510


How reproducible: always


Steps to Reproduce:
1. Create a config channel 'channel-foo'
2. Create/copy a binary file as '/tmp/binary'
3. Run the following script (setup the variables to your configuraiton)
"""
#!/usr/bin/env python
from xmlrpclib import Server, Binary

SATELLITE_HOST = "<your satellite host>"
SATELLITE_URL = "http://%s/rpc/api" % SATELLITE_HOST
SATELLITE_LOGIN = "admin"
SATELLITE_PASSWORD = "password"
client = xmlrpclib.Server(SATELLITE_URL, verbose=1)
key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD)
data = Binary(open("/tmp/binary","rb").read())

client.configchannel.createOrUpdatePath(key,'channel-foo', "/tmp/afoo3",False,
dict( contents = data, owner = "root", group = "root", permissions = "777"))
"""
  
Actual results:

500 ISE - typically a class cast exception in the log.

Expected results:

Proper output showing information pertaining to the create configuration file.
Additional info:

Comment 1 Partha Aji 2008-05-09 21:23:22 UTC
This has been now resolved in both trunk and 5.1.1

http://svn.rhndev.redhat.com/viewcvs?rev=172380&view=rev

Comment 2 Partha Aji 2008-06-09 15:29:11 UTC
Moving to ON_QA

Comment 4 Brandon Perkins 2008-07-01 21:18:55 UTC
Verified.

Comment 6 Brandon Perkins 2008-08-13 19:03:42 UTC
5.1.1 Satellite is now GA, bugs Closed for Current Release.

Comment 7 Brandon Perkins 2008-08-13 19:08:48 UTC
5.1.1 Satellite is now GA, bugs Closed for Current Release.


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