fusioninventory / fusioninventory-for-glpi

FusionInventory plugin for GLPI
http://www.FusionInventory.org/
GNU Affero General Public License v3.0
362 stars 150 forks source link

SKUNUMBER of Toshiba computers #330

Open ddurieux opened 9 years ago

ddurieux commented 9 years ago

Author Name: David Durieux (@ddurieux) Original Redmine Issue: 756, http://forge.fusioninventory.org/issues/756 Original Date: 2011-04-04


SKUNUMBER not get correctly on toshiba laptop. On dmidecode :

System Information
        Manufacturer: TOSHIBA
        Product Name: Satellite R630
        Version: PT31LE-01800EFR
        Serial Number: XA201220H
        UUID: 68405E00-E5BE-11DF-801C-B05981201220
        Wake-up Type: Power Switch
        SKU Number: 0000000000
        Family: 0000000000

SKUNUMBER is Version, in my case "PT31LE-01800EFR"

ddurieux commented 9 years ago

Original Redmine Comment Author Name: Gonéri Le Bouder (Gonéri Le Bouder) Original Date: 2011-04-06T09:43:14Z


Another TOSHIBA machine with the same Version line.

Handle 0x0001, DMI type 1, 25 bytes
System Information
        Manufacturer: TOSHIBA
        Product Name: Satellite 2410
        Version: PS241E-5J851-FR
        Serial Number: X2735244G
        UUID: 7FB4EA00-07CB-18F3-8041-CAD582735244
        Wake-up Type: Power Switch
ddurieux commented 9 years ago

Original Redmine Comment Author Name: Gonéri Le Bouder (Gonéri Le Bouder) Original Date: 2011-04-06T20:17:09Z


I'm not a big fan of the idea but we can create a specific case for TOSHIBA. Do you display the SKU in GLPI?

ddurieux commented 9 years ago

Original Redmine Comment Author Name: Gonéri Le Bouder (Gonéri Le Bouder) Original Date: 2011-04-08T09:21:41Z


This part of the code had been heavily changed since the 2.1.x branch.

ddurieux commented 9 years ago

Original Redmine Comment Author Name: Gonéri Le Bouder (Gonéri Le Bouder) Original Date: 2011-08-12T16:40:49Z


I found this different cases.

Serial Number: PS241E-5J851-FR SKU Number: 0000000000

Version: PT31LE-01800EFR SKU Number: 0000000000

Version: PSU30U-054012 SKU Number: Not Specified

Version: PSPB9U-04N026 SKU Number: 012345678912345678912345678

Version: PSAD6U-00R00D SKU Number: 012345678912345678912345678

Version: PSM40E-05M00XG3 SKU Number missing

ddurieux commented 9 years ago

Original Redmine Comment Author Name: Guillaume Rousse (@guillomovitch) Original Date: 2012-03-05T10:57:06Z


Please attach full dmidecode output.

ddurieux commented 9 years ago

Original Redmine Comment Author Name: Guillaume Rousse (@guillomovitch) Original Date: 2012-03-05T10:58:01Z


Ouch, I didn't read carefully enough, it's not a parsing bug :(

ddurieux commented 9 years ago

Original Redmine Comment Author Name: Guillaume Rousse (@guillomovitch) Original Date: 2012-03-05T11:00:39Z


Workaround suggestion: if sku number is blatantly invalid, as determined by a blacklist, use version instead. It doesn't need too much code, and its impact should be limited.

ddurieux commented 9 years ago

Original Redmine Comment Author Name: Gonéri Le Bouder (Gonéri Le Bouder) Original Date: 2012-03-05T11:43:38Z


Since this is not exactly the SKU number anymore but a number generated from a list of criteria, can we add a new key like HARDWARE/MANUFACTURER_MODEL_ID to store the information. This way, the server can select the to use the raw information or not.

ddurieux commented 9 years ago

Original Redmine Comment Author Name: Guillaume Rousse (@guillomovitch) Original Date: 2012-03-05T12:35:12Z


How to populate this key ?

ddurieux commented 9 years ago

Original Redmine Comment Author Name: Gonéri Le Bouder (Gonéri Le Bouder) Original Date: 2012-03-05T13:46:07Z


What about (pseudo code):

if (toshiba):
  HARDWARE/MANUFACTURER_MODEL_ID==Version
elsif (SKU Number):
  HARDWARE/MANUFACTURER_MODEL_ID==SKU Number
elsif (PartNumber):
  HARDWARE/MANUFACTURER_MODEL_ID==PartNumber
ddurieux commented 9 years ago

Original Redmine Comment Author Name: Gonéri Le Bouder (Gonéri Le Bouder) Original Date: 2012-03-05T14:44:46Z


Since this part will be shared between the different OS/arch, this should be done in FusionInventory::Agent::Task::Inventory::Inventory just before the final file generation.

ddurieux commented 9 years ago

Original Redmine Comment Author Name: Guillaume Rousse (@guillomovitch) Original Date: 2012-03-06T22:09:43Z


Actually, I'd prefer to keep the intelligence on server side, and just have the agent report the raw information.

ddurieux commented 9 years ago

Original Redmine Comment Author Name: Gonéri Le Bouder (Gonéri Le Bouder) Original Date: 2013-04-04T13:52:00Z


Hi Guillaume,

I agree. I redispatch the feature request to FI4G.