Bug 555326

Summary: CRM #1942512 - API configchannel.lookupFileInfo doesn't return the file contents
Product: Red Hat Satellite 5 Reporter: Tomas Lestach <tlestach>
Component: APIAssignee: Tomas Lestach <tlestach>
Status: CLOSED DEFERRED QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 520CC: cperry, tao, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 519985 Environment:
Last Closed: 2010-01-18 14:30:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 519985    
Bug Blocks: 468734    

Description Tomas Lestach 2010-01-14 13:36:35 UTC
+++ This bug was initially created as a clone of Bug #519985 +++

Escalated to Bugzilla from IssueTracker

--- Additional comment from tao on 2009-08-27 17:21:57 EDT ---

Event posted on 08-27-2009 01:38am EDT by pmutha

State whether Satellite or RHN hosted 
- Satellite v5.2
 
Indicate the platform(s) (architectures) the problem is being reported against.
- RHEL 4 U7 i386 platform.

Provide clear and concise problem description as it is understood at the time of escalation
- API configchannel.lookupFileInfo doesn't return the file contents even though the documentation says it should.



How Reproducible
- Always

Steps to Reproduce
- Sample API 
#!/usr/bin/python

import xmlrpclib
server_url='https://<satellite-fqdn>/rpc/api'
xmlrpclib.Server(server_url)
sc = xmlrpclib.Server(server_url)
sk = sc.auth.login('<username>', '<password>')
result = sc.configchannel.lookupFileInfo(sk,'<config channel>',["<config-file-path>"])
print result[0]['contents']




Observed Behavior
- {'binary': False, 'macro-start-delimiter': '{|', 'group': 'root', 'creation': <DateTime '20090806T17:12:17' at 2b96c6b73ef0>, 'modified': <DateTime '20090806T17:12:17' at 2b96c6b73f38>, 'macro-end-delimiter': '|}', 'channel': 'akash-test-config-channel', 'owner': 'root', 'path': '/tmp/plain.sh', 'permissions': 644, 'type': 'file', 'md5': '482cd68390050eaf68a3feb4d0561afe', 'revision': 3}

Traceback (most recent call last):
  File "lookupfileinfo.py", line 11, in ?
    print result[0]['contents']
KeyError: 'contents'


Expected Behavior
- Contents of the file should have been displayed as the file was text file instead of traceback.
"this is test-1 file"

Action Required from SEG 
- We have also tested this against Satellite v5.3 and it works fine as expected. Contents of text file are displayed.
So would like a confirmation from SEG if this was a bug on Satellite v5.2.

Have attached satellite-debug of the test satellite on which issue was reproduced.
Let me know if you need any other details on this.

Regards,
Paresh
This event sent from IssueTracker by xdmoon  [Support Engineering Group]
 issue 335390

--- Additional comment from xdmoon on 2009-08-27 17:24:21 EDT ---

For Engineering: this BZ is to make sure above bug goes through QA.

Comment 1 Tomas Lestach 2010-01-14 13:46:24 UTC
Because the problem isn't present in sat53 anymore, customers can issue a hotfix request.

Comment 2 Tomas Lestach 2010-01-18 14:30:24 UTC
Reopened original bug, so closing this one.