This patch adds the ability to detect and manage GPU and Disk expansion
bays, and either add their internal components into the device
corresponding to the blade server, or into a dedicated device.
It takes advantage of the work made by @cyrinux on GPU bays management, and
applies the same principle to the external disk bays, but harmonize the
inventory management:
- If no argument is specified on the command line, the GPU cards, RAID
controllers and their attached disks are added in the blade device,
and the device corresponding to an expansion device is deleted.
- If the `--expansion-as-device` option is specified on the command
line, a dedicated device corresponding to the expansion bay is
created, and the GPUs, RAID card and attached disks are removed from
the blade device and added to the expansion device.
This patch adds an option to clear remaining devices in the context of a
new device replacing an old one with the same name but with a different
hardware.
The serial leading to the bug is described below:
- A first server is registered under name `A` with serial `X`
- A second server is registered under name `B` with serial `Y`
- The server with serial `X` is decomissionned, but not removed
- The server with serial `Y` is reinstalled with name `A`
In this case, a device with serial `X` is well found, and netbox agent
tries to update its name. But this raises an error because of the unique
constraint on name, as another device already holds this name.
The proposed solution to handle this situation is to delete any device
with same `name` but different `serial` before handling a device.
As this is not necessarily the expected behavior, it can be enabled by
using the `--purge-old-devices` to avoid breaking existing inventory.
* Add "ProLiant BL460c Gen10 Graphics Exp"
* Add GPU expansion support for HP_ProLiant_BL460c_Gen10_Graphics_Exp
* Add ProLiant BL460c Graphics Expansion Blade support in README
* Dont crash if vendor other than HP
* Typo
* Adds support for:
* sets the tenant for IP addresses and Devices.
* setting device tags
* setting the blade, chassis, and server roles.
Co-authored-by: Thomas Davis <tdavis@nersc.gov>
Co-authored-by: Solvik <solvik@solvik.fr>
Add ability to create Virtual Machine in netbox with an auto-detecting feature (currently VirtualBox, Xen, Hyper-V, VMWare, GCP)
One caveat, I made the choice not to report the disk as Netbox model allow only one size but VM often have multiples.
Also, lot of code refactoring to be able to use create_or_update function style, fixing a lot of corner case
* rework network part by ignoring devices and ip from config file
* update config file
* associate slave device to bond device with Netbox LAG
* update README
* make sure every interface attribute is ok
* some fixes after test
* tox
* add ipmi feature
* fix bug in LAG
* ipmi class
* update README
* network update
* delete print
* update README