This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 445767 - confichannel.createOrUpdatePath not accepting binary files
confichannel.createOrUpdatePath not accepting binary files
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
510
All Linux
medium Severity medium
: ---
: ---
Assigned To: Partha Aji
Steve Salevan
:
Depends On:
Blocks: 429319
  Show dependency treegraph
 
Reported: 2008-05-08 19:03 EDT by Partha Aji
Modified: 2010-10-22 20:51 EDT (History)
1 user (show)

See Also:
Fixed In Version: sat511
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-08-13 15:03:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Partha Aji 2008-05-08 19:03:55 EDT
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 17:23:22 EDT
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 11:29:11 EDT
Moving to ON_QA
Comment 4 Brandon Perkins 2008-07-01 17:18:55 EDT
Verified.
Comment 6 Brandon Perkins 2008-08-13 15:03:42 EDT
5.1.1 Satellite is now GA, bugs Closed for Current Release.
Comment 7 Brandon Perkins 2008-08-13 15:08:48 EDT
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.