Skip to content
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

Merged
merged 4 commits into from Mar 9, 2017

Conversation

sigmunau
Copy link
Contributor

@sigmunau sigmunau commented Mar 6, 2017

Tested with Raritan PX3-1730V-V2

Tested with Raritan PX3-1730V-V2
Copy link
Member

@lunkwill42 lunkwill42 left a 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.

from twisted.internet.defer import returnValue
from nav.mibs.mibretriever import MibRetriever

UNIT_MAP = {
Copy link
Member

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.

'cm': 'meters',
'meters': 'meters',
'rpm': 'rpm',
'degrees': 'degrees',
Copy link
Member

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

Copy link
Contributor Author

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.

]


class PDU2(MibRetriever):
Copy link
Member

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.

@lunkwill42 lunkwill42 added this to the 4.7.0 milestone Mar 9, 2017
@lunkwill42 lunkwill42 merged commit 733e999 into Uninett:master Mar 9, 2017
@sigmunau sigmunau deleted the raritan_px3 branch August 23, 2017 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants