Commit graph

17 commits

Author SHA1 Message Date
13b84b4da1
feat: Run formatters 2024-10-21 12:55:54 +02:00
illes
0cff7d3477
Fix module platform has no attribute linux_distribution (#224) 2022-07-18 21:06:33 +01:00
Cyril Levis
dfb6b234ba
chore: cleanup, add device_platform in summary
Signed-off-by: Cyril Levis <git@levis.name>
2022-03-31 20:58:50 +02:00
Cyril Levis
cf2cc54da4
feat: auto-detect device platform
this platform module still works for python3.6 we use.

Signed-off-by: Cyril Levis <git@levis.name>
2022-03-31 17:33:35 +02:00
Fredrik Bergström
2a4f24f00a not failing if platform is not set 2022-03-31 11:14:26 +02:00
Fredrik Bergström
a7b965a8b5 Added platform to the config 2022-03-30 13:27:13 +02:00
Christophe Simon
e789619b34 Added disks extended attributes
This patch brings some of the physical and virtual drive attributes as
`custom_fields` to the disks inventory.

The goal is to have this information present to ease disks maintenance
when a drive becomes unavailable and its attributes can't be read anymore
from the RAID controller.

It also helps to standardize the extended disk attributes across the
different manufacturers.

As the disk physical identifers were not available under the correct
format (hexadecimal format using the `xml` output as opposed as `X:Y:Z` format
using the default `list` format), the command line parser has been
refactored to read the `list` format, rather than `xml` one in the
`omreport` raid controller parser.

As the custom fields have to be created prior being able to register
the disks extended attributes, this feature is only activated using the
`--process-virtual-drives` command line parameter, or by setting
`process_virtual_drives` to `true` in the configuration file.

The custom fields to create as `DCIM > inventory item` `Text` are described
below.

    NAME            LABEL                      DESCRIPTION
    mount_point     Mount point                Device mount point(s)
    pd_identifier   Physical disk identifier   Physical disk identifier in the RAID controller
    vd_array        Virtual drive array        Virtual drive array the disk is member of
    vd_consistency  Virtual drive consistency  Virtual disk array consistency
    vd_device       Virtual drive device       Virtual drive system device
    vd_raid_type    Virtual drive RAID         Virtual drive array RAID type
    vd_size         Virtual drive size         Virtual drive array size

In the current implementation, the disks attributes ore not updated: if
a disk with the correct serial number is found, it's sufficient to
consider it as up to date.

To force the reprocessing of the disks extended attributes, the
`--force-disk-refresh` command line option can be used: it removes all
existing disks to before populating them with the correct parsing.
Unless this option is specified, the extended attributes won't be
modified unless a disk is replaced.

It is possible to dump the physical/virtual disks map on the filesystem under
the JSON notation to ease or automate disks management. The file path has to
be provided using the `--dump-disks-map` command line parameter.
2022-03-02 15:53:38 +01:00
Solvik Blum
86527af1c0 lint 2021-05-18 13:59:04 +02:00
Solvik Blum
58c18fc2da add more compatibility, now to netbox 2.10 2021-05-12 19:41:01 +02:00
Solvik Blum
3639662961 ignore tag update for Netbox version >= 2.8 2021-05-12 19:41:01 +02:00
ThomasADavis
a60c0cd70c
Add tags,device roles,tenants.. (#110)
* 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>
2020-07-01 18:54:58 +02:00
Solvik
f06da32fc3
Virtual Machine feature (#122)
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
2020-04-19 12:28:49 +02:00
ramnes
bab2d26ad0 Setup tests 2020-02-02 20:24:01 +01:00
Solvik
8c25ab483d
add more vendors (#76) 2019-09-11 14:22:07 +02:00
Solvik
d402b5620c
add omreport RAID support (#69) 2019-09-10 11:44:23 +02:00
ThomasADavis
b7b22ae316 use lshw for inventory (#58)
* Use lshw for inventory
* Add motherboard to inventory
* Handle non raid devices
* Handle nvme drives
2019-09-05 15:13:36 +02:00
Solvik
de3c59a675
Local inventory (#16)
- Create and update CPU
- Create and update Memory
- Create and update RAID Cards (HP and Storcli)
- Create and update Physical disks
2019-08-26 16:54:48 +02:00