Project cleanup (#6)

* add requirements.txt

* Create LICENSE

* add test directory

* code cleanup

* flake8 fixes and code cleanup

* setup.py and tox.ini

* more fixes
This commit is contained in:
Solvik 2019-08-04 00:00:22 +02:00 committed by GitHub
parent 9673bb00b5
commit 396c4b5d10
13 changed files with 385 additions and 59 deletions

View file

@ -1,5 +1,6 @@
from netbox_agent.server import ServerBase
class HPHost(ServerBase):
def __init__(self, *args, **kwargs):
super(HPHost, self).__init__(*args, **kwargs)
@ -10,11 +11,11 @@ class HPHost(ServerBase):
return self.get_product_name().startswith('ProLiant BL')
def _find_rack_locator(self):
'''
"""
Depending on the server, the type of the `HP ProLiant System/Rack Locator`
can change.
So we need to find it every time
'''
"""
# FIXME: make a dmidecode function get_by_dminame() ?
if self.is_blade():
for key, value in self.dmi.parse().items():