Bug 1586007 - Exception when reading raw bytes
Summary: Exception when reading raw bytes
Keywords:
Status: CLOSED DUPLICATE of bug 1551623
Alias: None
Product: ovirt-engine-sdk-python
Classification: oVirt
Component: Core
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Ondra Machacek
QA Contact: Pavel Stehlik
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-05 09:55 UTC by Ales Musil
Modified: 2018-06-06 07:19 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-06-06 07:19:18 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)
Log (9.80 KB, text/plain)
2018-06-05 09:55 UTC, Ales Musil
no flags Details
Output causing problems (7.51 KB, application/xml)
2018-06-05 09:56 UTC, Ales Musil
no flags Details

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 ***


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