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
Added support for Raritan PDU2 mib PDUs #1472
Conversation
Tested with Raritan PX3-1730V-V2
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.
Code works for me. I have only general nitpicks mentioned inline, and as mentioned on Slack, curiousness regarding the apparent option to have master/slave PDUs.
python/nav/mibs/pdu2_mib.py
Outdated
from twisted.internet.defer import returnValue | ||
from nav.mibs.mibretriever import MibRetriever | ||
|
||
UNIT_MAP = { |
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.
The standardised unit names should probably be imported from the nav.models.manage.Sensor
model. Units that are new to NAV should also there probably be added there, unless they sound completely esoteric.
python/nav/mibs/pdu2_mib.py
Outdated
'cm': 'meters', | ||
'meters': 'meters', | ||
'rpm': 'rpm', | ||
'degrees': 'degrees', |
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.
I realize the name comes from the MIB, but does it refer to angles or temperatures? :D
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.
There are different entries for degrees celsius and fahrenheit, so I assume it must be some sort of angle.
python/nav/mibs/pdu2_mib.py
Outdated
] | ||
|
||
|
||
class PDU2(MibRetriever): |
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.
I would prefer all MIB retrievers to end with the Mib
suffix.
Tested with Raritan PX3-1730V-V2