ramnes
bdc450ef6a
Make flake8 and isort happy
2021-07-09 11:10:43 +02:00
Cyril Levis
794f9787f0
NVME inventory fix.
...
The inventory crash with default nvme-cli version 1.8.1 on Centos7.
2021-07-09 11:00:41 +02:00
Solvik Blum
86527af1c0
lint
2021-05-18 13:59:04 +02:00
Solvik Blum
b738f4bfef
fix last few bugs due to pynetbox 6 upgrade
2021-05-14 10:00:50 +02:00
Solvik Blum
aaea0a2477
fix ipv6 cleanup on interface with only one ipv6 and not ipv4
2021-05-12 20:11:20 +02:00
Solvik Blum
9eafcbf215
this MR will drop compatibility with versions < 2.9
2021-05-12 19:41:35 +02:00
Solvik Blum
576eb07dd7
make inventory compatible
2021-05-12 19:41:01 +02:00
Solvik Blum
337e272eea
fix ipv6 deletion with regex
2021-05-12 19:41:01 +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
Solvik Blum
1d98d3c8e9
fix ip association
2021-05-12 19:41:01 +02:00
Solvik Blum
dc582b5de6
change .interface foreignkey with .assigned_object
2021-05-12 19:41:01 +02:00
Solvik
c4eb8f34ac
add 25G compatibility ( #185 )
2021-05-12 15:50:16 +02:00
Laurent Marchaud
2a1196b52d
Add support for Supermicro TwinPro devices ( #180 )
2020-12-18 17:23:37 +01:00
Solvik
77a84b365f
fix ugly supermicro blade support ( #178 )
2020-12-15 11:32:11 +01:00
Cyrinux
0f2cb531ae
Fix inventory crash on nvme binary too old or absent ( #170 )
...
* When nvme binary absent or too old and no json output, this crash the inventory, i prefer just pass nvme inventory and continue
* log if nvme-cli is not installed
2020-10-14 12:40:19 +02:00
Cyrinux
00653628c6
Truncate GPU product name to 50 characteres. ( #169 )
...
Example: Hi1710 [iBMC Intelligent Management system chip w/VGA support]
This product is too long, the api want max_length = 50 ...
2020-10-14 12:39:57 +02:00
Cyrinux
7999244096
Check if lldpctl present, and log debug if no lldpctl output. ( #171 )
2020-10-14 12:39:40 +02:00
Cyrinux
137728be1f
Add "ProLiant BL460c Gen10 Graphics Exp" support and GPU expansion bay ( #165 )
...
* 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
2020-09-18 12:29:17 +02:00
Cyrinux
0fe17c9687
Add GPU inventory support ( #164 )
...
* Add GPU support
* Some update in the doc
2020-09-18 12:29:05 +02:00
Anton A. Grishin
28955612be
fix allocated_draw for inactive PSU ( #168 )
...
Co-authored-by: Anton Grishyn <grishin@maxpay.com>
2020-09-07 14:20:32 +02:00
Cyrinux
e20e6a7dee
Fix travis ( #162 )
2020-08-24 12:52:25 +02:00
Cyrinux
e95a66d93a
Add HP Moonshot 1500 support ( #161 )
...
* Add HP Moonshot 1500 support
2020-08-20 18:03:36 +02:00
Solvik Blum
f8c0732c2b
fix agent crash on server creation if not blade
2020-07-29 00:45:24 +02:00
Solvik Blum
18e3480574
fix supermicro dmidecode parsing
2020-07-13 21:04:45 +02:00
Solvik Blum
839d9a908c
better handling supermicro products (blade or not blade)
2020-07-11 15:56:10 +02:00
Solvik Blum
70146b8614
fix not passing tenant when tenants exist in Netbox
2020-07-11 15:33:34 +02:00
Solvik Blum
9611400b22
move ssl_verify under 'netbox' config
2020-07-11 15:28:04 +02:00
Solvik Blum
53cb29a6d4
fix import order
2020-07-11 15:14:33 +02:00
strus38
70e5d407f5
Fix indentation
2020-07-08 22:19:39 +02:00
strus38
0894e645a8
Fix indentation
2020-07-08 10:02:45 +02:00
strus38
95d2ae420e
Fix indentation
2020-07-08 09:47:48 +02:00
strus38
275e1850c6
Adding the --no_ssl_verify option to support Netbox connection with https and untrusted certificates
2020-07-08 09:36:13 +02:00
Ryan Jones
9aedb46530
small fix to add recognition of RHEV- Virtual machines ( #150 )
2020-07-07 20:08:35 +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
bd5037996b
make the agent work if only a datacenter is specified ( #143 )
2020-07-01 18:51:57 +02:00
Cyrinux
a896d118d7
* Loop on nvme disk ( #138 )
...
* Remove vendor and product (not present, make crash)
* Use firmware version for version
2020-06-23 21:01:32 +02:00
Solvik
feec16c4fe
fix latest flake8 error ( #135 )
2020-06-15 15:46:09 +02:00
Solvik Blum
b94f246196
some power fixes
2020-06-14 18:29:28 +02:00
Cyrinux
754a284fd1
Add openvpn TUN and TAP interfaces support, change type to Virtual and remove mac address ( #132 )
...
* Add Tun and Tap support, change type to Virtual and remove mac address
* Simplify
* Resimplify
2020-06-14 18:18:13 +02:00
Cyrinux
683e6cacb1
Fix HP raid controller parsing ( #131 )
...
* Some messages about the cache for example, with indentation level 0 break the parsing.
I ignore line indentation if indentation level and line dont match REGEXP_CONTROLLER_HP.
```bash
DC1|server-01:~# hpacucli ctrl all show detail
Smart Array P244br in Slot 0 (Embedded)
A cache backup failure has occurred. Please execute the "reenablecache" command
to enable the cache. Your controller may require a reboot after the operation
to complete the cache recovery process.
Bus Interface: PCI
Slot: 0
Serial Number: PDZVU0WLM241FP
Cache Serial Number: PDZVU0WLM241FP
RAID 6 (ADG) Status: Enabled
Controller Status: OK
Hardware Revision: B
Firmware Version: 7.00-0
...
```
* Remove whitespace
2020-06-10 15:24:43 +02:00
Cyrinux
41f0b04d00
Add missing N/A fallback on DIMM memory ( #129 )
2020-06-09 09:05:35 +02:00
Cyrinux
9dedbea47a
Some fixes that prevent crash on register and update ( #128 )
2020-06-08 14:16:50 +02:00
Solvik
28fc87c9e2
handle netbox 2.8 deprecation of _choices method ( #127 )
2020-05-23 13:23:51 +02:00
Solvik Blum
29d2bff805
fix flake8 errors
2020-05-22 13:23:28 +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
Solvik
312f472e9c
fix ethtool class in case ethtool works but returns nothing ( #123 )
2020-04-19 12:19:28 +02:00
ThomasADavis
dc4f90d490
handle sockets with no cpu installed. should fix #117 ( #118 )
2020-02-21 09:13:02 +01:00
Solvik
5590f39131
Fix agent, wasn't working anymore ( #115 )
...
Bad rebase made dmidecode calls fail
2020-02-16 20:24:40 +01:00
ThomasADavis
a5bc16d3b1
Adds a generic vendor for unrecognizable systems ( #105 )
...
Co-authored-by: Solvik <solvik@solvik.fr>
2020-02-03 00:38:23 +01:00
ramnes
bab2d26ad0
Setup tests
2020-02-02 20:24:01 +01:00
ThomasADavis
2280169cd9
Use choices api ( #107 )
...
* Ask netbox for choices using the API
2020-01-28 11:18:56 +01:00
ThomasADavis
405cce3995
Gets the right chassis serial number ( #104 )
2020-01-25 12:03:30 +01:00
Solvik
6497261708
better error handling when DeviceRole or DeviceType don't exist ( #91 )
2019-10-23 12:14:50 +02:00
gardar
8ef94272a1
Update inventory.py ( #89 )
...
Replace all special characters in slug with a dash rather than just spaces and dots
2019-10-21 14:32:22 +02:00
Solvik
a1297813ef
fix rack comparison while updating location ( #84 )
2019-09-12 17:47:41 +02:00
Solvik
06328e745c
Revert "fix rack comparison while updating location ( #82 )" ( #83 )
...
This reverts commit e9ec69bc3b
.
2019-09-12 17:43:39 +02:00
Solvik
e9ec69bc3b
fix rack comparison while updating location ( #82 )
2019-09-12 12:03:13 +02:00
Solvik
5f851ec619
add config to set hostname command ( #81 )
2019-09-12 11:15:12 +02:00
Solvik
93af39e780
do not initialize RAID class when scanning for binary raid (to be reworked obviously) ( #80 )
2019-09-12 11:12:32 +02:00
Solvik
9f7f29c190
fix rack association ( #79 )
2019-09-11 17:35:27 +02:00
Solvik
458d1f83c2
fix {'part_id': ['This field may not be null.']} error ( #78 )
2019-09-11 14:22:32 +02:00
Solvik
8c25ab483d
add more vendors ( #76 )
2019-09-11 14:22:07 +02:00
Solvik
a0106675e0
handle more PSU dmidecode format ( #75 )
2019-09-11 10:37:31 +02:00
Solvik
4303312b17
fix PSU power parsing ( #74 )
2019-09-10 14:48:16 +02:00
Solvik
93c6444105
more strip from shitty dmidecode ( #73 )
2019-09-10 14:46:04 +02:00
Solvik
5c1e15f9e6
strip dmidecode data, because vendor dont ( #72 )
2019-09-10 13:39:22 +02:00
Solvik
0cf2d4fa90
fix raid creation on server's registration ( #71 )
2019-09-10 11:51:05 +02:00
Solvik
d402b5620c
add omreport RAID support ( #69 )
2019-09-10 11:44:23 +02:00
Solvik
ba8f58180e
make InventoryItem's name attribute <50 char for memory DIMM ( #67 )
2019-09-09 16:52:25 +02:00
Solvik
f68fed18b4
handle multiple vlans in lldp ( #66 )
2019-09-09 15:32:14 +02:00
Solvik
fb68907efd
parse lldp only if configuration says so ( #63 )
2019-09-09 12:25:11 +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
8d0168acb5
Add power supply support ( #56 )
2019-09-05 13:47:10 +02:00
Solvik
1c44ab36fb
fix inventory typo ( #59 )
2019-09-04 11:18:44 +02:00
Solvik
d12ac49d50
new config system ( #53 )
2019-09-03 13:16:37 +02:00
Solvik
c5707e8413
do not make netbox call if lldp doesnt return switch ip and interface ( #54 )
2019-09-03 11:57:17 +02:00
Solvik
197a8babaf
Handle anycast IP ( #51 )
2019-08-30 11:06:16 +02:00
ThomasADavis
6ec08e8669
Several minor fixes ( #47 )
...
Several minor fixes:
- raid_array check should return an empty array, not NoneType
- not all systems will have IPv6 defined, handle this case
- Vendor Supermicro was incomplete.
2019-08-29 17:33:27 +02:00
Solvik
0faee59bde
Supermicro server can guess their slot via the config file ( #50 )
2019-08-29 16:13:04 +02:00
Solvik
136a356cec
Fix QCT vendor class ( #48 )
2019-08-28 12:06:45 +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
Solvik
1902b24c13
add QCT as vendor ( #45 )
2019-08-26 16:39:36 +02:00
Solvik
0e8b470062
Add Supermicro as a vendor ( #44 )
2019-08-26 15:38:44 +02:00
Solvik
8de682f46d
add ipv6 addresses ( #43 )
2019-08-26 14:02:07 +02:00
Solvik
33c55340b7
Add LLDP auto cabling ( #41 )
2019-08-26 11:05:41 +02:00
Solvik
5826966ea4
support HPE BL460c Gen10 and its stupid dmidecode info ( #39 )
2019-08-21 16:17:01 +02:00
Solvik Blum
fddac3c5e5
typo in dmidecode for dell
2019-08-20 13:50:38 +02:00
Solvik
770a97bc57
create server/rack/chassis with Rack location if found ( #34 )
2019-08-14 11:17:24 +02:00
Solvik
955579df0d
make sure to update IPMI interface when mac changed ( #32 )
2019-08-12 17:21:46 +02:00
Solvik
980f14236f
Fix late comments ( #29 )
...
* more fixes
* add external binary requirements
* better error handling for bonding
2019-08-09 13:26:51 +02:00
Solvik
2988a8bd6a
Rework all network part ( #21 )
...
* 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
2019-08-09 12:08:11 +02:00
Solvik Blum
9519a43277
fixes
2019-08-08 14:46:06 +02:00
Solvik Blum
048fa22b1e
fix blade slot
2019-08-08 14:37:02 +02:00
Solvik
a7d766a5fb
Merge pull request #19 from Solvik/feature/python3.5
...
be python3.4 compatible
2019-08-08 10:43:09 +02:00
Solvik Blum
896a011173
simpler way to be python3.4 compatibble
2019-08-08 10:42:43 +02:00
Solvik Blum
14e061159d
ignore unused statement
2019-08-07 15:37:14 +02:00
Solvik Blum
b60860e0f5
fix bug while testing server creation
2019-08-07 15:36:47 +02:00
Solvik Blum
d7af66b325
fix bug while testing debug with an interface not existing while updating
2019-08-07 15:36:24 +02:00
Solvik Blum
49731644fd
fix bug while testing debug
2019-08-07 15:36:03 +02:00