Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1586007

Summary: Exception when reading raw bytes
Product: [oVirt] ovirt-engine-sdk-python Reporter: Ales Musil <amusil>
Component: CoreAssignee: Ondra Machacek <omachace>
Status: CLOSED DUPLICATE QA Contact: Pavel Stehlik <pstehlik>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: ---CC: bugs, dholler, juan.hernandez, mburman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-06 07:19:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Log
none
Output causing problems none

Description Ales Musil 2018-06-05 09:55:49 UTC
Created attachment 1447785 [details]
Log

Description of problem:

When the ovirt-sdk reader encounters raw bytes it will throw exception: 
Entity: line 80: parser error : PCDATA invalid Char value 1



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

python-ovirt-engine-sdk4-4.2.6-2.el7ev.x86_64

How reproducible:

100%

Steps to Reproduce:
1. List service that contains raw bytes
2.
3.



Additional info:

Contact me if you need help with reproducing this bug.

Comment 1 Ales Musil 2018-06-05 09:56:38 UTC
Created attachment 1447787 [details]
Output causing problems

Comment 2 Ondra Machacek 2018-06-06 07:00:11 UTC
I think this is an issue in the API/backend. API is returning raw binary data instead a string. As far as I understand it returns:

<link_layer_discovery_protocol_element>
   <name>X</name>
   <oui>123</oui>
   <properties>
     <property>
       <name>somename</name>
       <value>[26B blob data]</value>
     </property>
   </properties>
   <subtype>3</subtype>
   <type>127</type>
 </link_layer_discovery_protocol_element>

I think the API should parse the binary data and tranform to appropriate string based on specification or if we need to return binary data, we should return BASE64 encoding string.

Dominik, I see you wrote GetLldpVDSCommand::parseTlv, can you please confirm if property value could be binary data?

Comment 3 Dominik Holler 2018-06-06 07:19:18 UTC
> Dominik, I see you wrote GetLldpVDSCommand::parseTlv, can you please confirm if
> property value could be binary data?

The property should not contain binary data, but it does sometimes. This is already tracked in #1551623.

*** This bug has been marked as a duplicate of bug 1551623 ***