Skip to content

Feat(Format): handle PDU#164

Draft
stonebuzz wants to merge 9 commits into
glpi-project:mainfrom
stonebuzz:feat_pdu
Draft

Feat(Format): handle PDU#164
stonebuzz wants to merge 9 commits into
glpi-project:mainfrom
stonebuzz:feat_pdu

Conversation

@stonebuzz

@stonebuzz stonebuzz commented Jan 28, 2026

Copy link
Copy Markdown
Collaborator

Handle PDU inventory from SNMP

Needed by : glpi-project/glpi#22863

fixes : https://github.com/glpi-project/Professional-Services/issues/27

Here’s the English summary of this updated PDU structure:

  • Main object: pdu

    • Type: object
    • Required property: name

Properties:

  1. name: string

    • The name of the PDU.
  2. model: string

    • The model of the PDU.
  3. type: string (required)

    • The type of PDU.
  4. credentials: integer

    • Reference to glpi snmpcredentials_id (optional).
  5. sysdescr: string

    • Remote device system description.
  6. plugs: array of objects

    • List of the PDU’s plugs.

    • Each plug is an object with:

      • name: string (required) — Name of the plug.
      • number: string (optional) — Plug number.
      • type: string (optional) — Plug type.

@stonebuzz stonebuzz marked this pull request as draft January 28, 2026 10:22
@stonebuzz

Copy link
Copy Markdown
Collaborator Author

@g-bougard @trasher

I would appreciate your initial opinion.

Related specification : https://outline.teclib.com/doc/inventaire-des-pdus-oEGY3aIdjg#h-inventaire-auto

@trasher

trasher commented Jan 28, 2026

Copy link
Copy Markdown
Collaborator

Seems correct after a quick review :)

@stonebuzz

Copy link
Copy Markdown
Collaborator Author

Thanks @trasher

I suggest keeping this as a draft for now, while I finish implementing the feature. I may need to make some adjustments along the way if necessary.

@trasher

trasher commented Jan 28, 2026

Copy link
Copy Markdown
Collaborator

OK for me 👍

Comment thread inventory.schema.json Outdated
@stonebuzz

stonebuzz commented Jan 29, 2026

Copy link
Copy Markdown
Collaborator Author

Example with minimalist XML file

<?xml version="1.0" encoding="UTF-8" ?>
<REQUEST>
  <CONTENT>
    <DEVICE>
      <FIRMWARES>
        <DESCRIPTION>APC Rack PDU Firmware</DESCRIPTION>
        <MANUFACTURER>APC</MANUFACTURER>
        <NAME>AP8853</NAME>
        <TYPE>PDU</TYPE>
        <VERSION>v6.9.6</VERSION>
      </FIRMWARES>
      <INFO>
        <COMMENTS>APC Rack PDU Switched, 2G, Metered-by-Outlet</COMMENTS>
        <CONTACT>Schneider Electric Support</CONTACT>
        <FIRMWARE>6.9.6</FIRMWARE>
        <ID>1</ID>
        <IPS>
          <IP>192.168.1.50</IP>
        </IPS>
        <LOCATION>DataCenter_Room_01_Rack_A4</LOCATION>
        <MAC>00:C0:B7:65:DE:01</MAC>
        <MANUFACTURER>APC</MANUFACTURER>
        <MODEL>AP8853</MODEL>
        <NAME>PDU-MASTER-RACK-A4</NAME>
        <SERIAL>ZA133456789</SERIAL>
        <TYPE>PDU</TYPE>
        <UPTIME>45:12:30.22</UPTIME>
      </INFO>
      <PDU>
        <TYPE>C13/C19</TYPE>
        <PLUGS>
          <NAME>Plug_A1</NAME>
          <NUMBER>1</NUMBER>
          <TYPE>C13</TYPE>
        </PLUGS>
        <PLUGS>
          <NAME>Plug_A2</NAME>
          <NUMBER>2</NUMBER>
          <TYPE>C14</TYPE>
        </PLUGS>
      </PDU>
    </DEVICE>
    <MODULEVERSION>4.1</MODULEVERSION>
    <PROCESSNUMBER>1</PROCESSNUMBER>
  </CONTENT>
  <DEVICEID>APC-PDU-001</DEVICEID>
  <QUERY>SNMPQUERY</QUERY>
</REQUEST>

@stonebuzz

Copy link
Copy Markdown
Collaborator Author

type and number have been added to Plug

Comment thread inventory.schema.json Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants