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

threshold error: no minimum or maximum defined #506

Open
jstanley23 opened this issue Mar 27, 2018 · 0 comments
Open

threshold error: no minimum or maximum defined #506

jstanley23 opened this issue Mar 27, 2018 · 0 comments

Comments

@jstanley23
Copy link

jstanley23 commented Mar 27, 2018

When setting minval and maxval on a threshold (Duration for example), if the value is set to 0 in the yaml the method getMinval and getMaxval will return None. If 0 is set to both min and max, you will get an event "threshold error: no minimum or maximum defined".

To work around this, you need to set the value to '0' in the yaml, so that the property is a string instead of int.

>>> th = dmd.unrestrictedTraverse('/zport/dmd/Devices/Network/Viptela/VEdge/PNC/rrdTemplates/VipPS/thresholds/Power Supply State')
>>> th.getMinval(th)
>>> th.getMaxval(th)
>>> th.maxval
0
>>> th.minval
0
>>> t = dmd.unrestrictedTraverse('/zport/dmd/Devices/Network/Viptela/VEdge/PNC/rrdTemplates/VipTemperature/thresholds/Temperature State')
>>> t.getMinval(t)
0
>>> t.getMaxval(t)
0
>>> t.minval
'0'
>>> t.maxval
'0'
>>>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant