-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RbVmomi deserialization fails on managed object type ContentLibrary #28
Comments
Thanks for the reminder @mahcsig I was hoping the rbvmomi maintainers would fix this but now that is us :) I want to take a look at the xml that is returned for that object, I'm thinking of creating a new "base class" for these that isn't ManagedObject since that comes with certain assumptions. |
Here is the XML for a task with a <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<RetrievePropertiesResponse xmlns="urn:vim25"><returnval><obj type="Task">task-202176</obj><propSet><name>info</name><val xsi:type="TaskInfo"><key>task-202176</key><task type="Task">task-202176</task><descriptionId>com.vmware.content.Library.Update</descriptionId><entity type="ContentLibrary">clib-6424</entity><entityName>Tanzu_Content_Library</entityName><state>success</state><cancelled>false</cancelled><cancelable>true</cancelable><reason xsi:type="TaskReasonUser"><userName>Administrator</userName></reason><queueTime>2023-01-05T15:39:25.674049Z</queueTime><startTime>2023-01-05T15:39:25.845494Z</startTime><completeTime>2023-01-05T15:39:26.113964Z</completeTime><eventChainId>17541175</eventChainId><activationId>dd3b93d7-23f3-45f8-82a3-35e76402e516</activationId></val></propSet></returnval></RetrievePropertiesResponse>
</soapenv:Body>
</soapenv:Envelope> |
For readability: <?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<RetrievePropertiesResponse xmlns="urn:vim25">
<returnval>
<obj type="Task">task-202176</obj>
<propSet>
<name>info</name>
<val xsi:type="TaskInfo">
<key>task-202176</key>
<task type="Task">task-202176</task>
<descriptionId>com.vmware.content.Library.Update</descriptionId>
<entity type="ContentLibrary">clib-6424</entity>
<entityName>Tanzu_Content_Library</entityName>
<state>success</state>
<cancelled>false</cancelled>
<cancelable>true</cancelable>
<reason xsi:type="TaskReasonUser">
<userName>Administrator</userName>
</reason>
<queueTime>2023-01-05T15:39:25.674049Z</queueTime>
<startTime>2023-01-05T15:39:25.845494Z</startTime>
<completeTime>2023-01-05T15:39:26.113964Z</completeTime>
<eventChainId>17541175</eventChainId>
<activationId>dd3b93d7-23f3-45f8-82a3-35e76402e516</activationId>
</val>
</propSet>
</returnval>
</RetrievePropertiesResponse>
</soapenv:Body>
</soapenv:Envelope> |
Fix for this bug released in v3.6.0 |
@agrare @Fryguy Not sure if you want another ticket of if this one will work, but I just ran into the ContentLibraryItem object throwing the same error after an object gets deleted from the library
Thanks! |
Hey @mahcsig ! That looks like a new data type coming in that is causing the same problem. Since this issue is closed and tied to a release tag could you open a new issue for this so I can link a new PR to it? Thanks! |
Describe the bug
This is actually the same bug from vmware-archive#205, but it is now locked over there.
I ran into the same issue, but was looking to wait for the Content Library Sync to finish for some post-processing.
I know that it is not the correct way to fix this, so I didn't add a pull request, but for anyone looking to get around the issue until a proper fix is available, I was able to hack a
ContentLibrary
object in so I could view the task list and wait for the sync task. You can find it on this commit: mahcsig@46a708dIt doesn't actually work as a
ManagedObject
(it throws errors when trying to access attributes likename
), but it works enough to allow the task to load.Sorry this isn't in the proper format, but the above mentioned ticket is, and is still applicable.
The text was updated successfully, but these errors were encountered: