-
Notifications
You must be signed in to change notification settings - Fork 12
Feat(Format): handle PDU #164
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
base: main
Are you sure you want to change the base?
Conversation
|
I would appreciate your initial opinion. Related specification : https://outline.teclib.com/doc/inventaire-des-pdus-oEGY3aIdjg#h-inventaire-auto |
|
Seems correct after a quick review :) |
|
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. |
|
OK for me 👍 |
|
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> |
|
|
| "pdu": { | ||
| "type": "object", | ||
| "title": "Power Distribution Unit inventory", | ||
| "properties": { | ||
| "type": { | ||
| "type": "string", | ||
| "title": "PDU type" | ||
| }, | ||
| "plugs": { | ||
| "title": "List of plugs of pdu", | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "required": [ | ||
| "name" | ||
| ], | ||
| "properties": { | ||
| "name": { | ||
| "type": "string", | ||
| "title": "Plug name" | ||
| }, | ||
| "number": { | ||
| "type": "integer", | ||
| "title": "Plug number" | ||
| }, | ||
| "type": { | ||
| "type": "string", | ||
| "title": "Plug type" | ||
| } | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to move this property under "network_device" properties. At the same level than "credentials" for example.
Handle
PDUinventory from SNMPNeeded 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:
pduobjectnameProperties:
name:stringmodel:stringtype:string(required)credentials:integersysdescr:stringplugs:arrayof objectsList 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.