Custom field names not decoded in SOAP ACCOUNTINFO

Bug #1248582 reported by Jeff Gehlbach
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OCS Inventory: Server
Fix Committed
Low
mortheres

Bug Description

In the ACCOUNTINFO section of the results of the "get_computers_V1" and "get_snmp_V1" SOAP services, the names and values of custom fields are represented as opaque references such as "fields_3" or "1&&&2". This makes the fields' names and values meaningless to SOAP clients unless those clients have prior knowledge of the mappings of these names.

I've created a fix for this, which I've submitted to frankb for shepherding upstream. Creating this issue so that there's a more concrete record since I'm temporarily working on a different set of projects. The commit message from my bzrsend follows.

  Enhance handling of custom fields (i.e. other than TAG) in ACCOUNTINFO element
  of get_computers_V1 and get_snmp_V1 SOAP call results. Now
  ACCOUNTINFO/ENTRY.Name is resolved to the symbolic name of the field rather
  than e.g. 'fields_3'. Also, value of ACCOUNTINFO/ENTRY for custom field types
  CHECKBOX, RADIOBUTTON, and SELECT is now resolved to textual values. So where
  before we got:

  <ACCOUNTINFO>
   <ENTRY Name="fields_3">1</ENTRY>
   <ENTRY Name="fields_4>1&&&2</ENTRY>
  </ACCOUNTINFO>

  Now we get:

  <ACCOUNTINFO>
   <ENTRY NAME="FOO">Un</ENTRY>
   <ENTRY NAME="BAR">Deux</ENTRY>
   <ENTRY NAME="BAR">Trois</ENTRY>
  </ACCOUNTINFO>

Revision history for this message
Jeff Gehlbach (jeffg-m) wrote :
Frank (frank-bourdeau)
Changed in ocsinventory-ocsreports:
assignee: nobody → mortheres (mortheres)
importance: Undecided → Low
Revision history for this message
mortheres (mortheres) wrote :

Hi,

Thanks a lot for this patch. This true that custom fields were not completly integrated in OCS SOAP engine. Thanks to your patch, it is now resolved :D :D.

Your patch has been commited in revision 713 of ocsinventory-server/stable-2.1 branch: http://bazaar.launchpad.net/~ocsinventory-dev/ocsinventory-server/stable-2.1/revision/713

It will included in OCS 2.1 final release :) :).

Kind regards,

--
Guillaume

affects: ocsinventory-ocsreports → ocsinventory-server
Changed in ocsinventory-server:
status: New → Fix Committed
milestone: none → 2.1
Revision history for this message
Jeff Gehlbach (jeffg-m) wrote :

Salut, Guillaume!

On 11/06/2013 04:35 PM, mortheres wrote:
> Thanks a lot for this patch. This true that custom fields were not
> completly integrated in OCS SOAP engine. Thanks to your patch, it is now
> resolved :D :D.

That's a big relief, since the ultimate success of our client's project was depending on this work and I didn't want them to run a fork of 2.1rc1 forever ;) So big thanks to you for accepting the patch.

Bon week-end,
-jeff

Revision history for this message
Ronny Trommer (r-trommer) wrote :

This issue is not fixed for SNMP devices.

Changed in ocsinventory-server:
status: Fix Committed → Incomplete
Revision history for this message
mortheres (mortheres) wrote :

Hi,

Indeed, it did not work for SNMP devices. It has been fixed in revision 721 of ocsinventory-ser/stable-2.1 branch: http://bazaar.launchpad.net/~ocsinventory-dev/ocsinventory-server/stable-2.1/revision/721

Kind regards,

--
Guillaume

Changed in ocsinventory-server:
status: Incomplete → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.