-
Notifications
You must be signed in to change notification settings - Fork 40
Modified infinite value of optical powers from -40 to -100 and added another unit test #139
Conversation
kaage
commented
Apr 20, 2017
int_brief = split_list[0] | ||
output_power = split_list[3] | ||
input_power = split_list[4] | ||
|
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.
Why did this change...was there a reason for this?
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.
Yes, as in some cases split gives more items than usually. If tx/rx power has crossed warning or alarm threshold there are one or two minus or plus signs in the output. See newly added unit test as example. In this case you have to survive from variable number of list items.
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.
Yes, as in some cases split gives more items than usually. If tx/rx power has crossed warning or alarm threshold there are one or two minus or plus signs in the output. See newly added unit test as example. In this case you have to survive from variable number of list items.
"max": 0.0, | ||
"avg": 0.0, | ||
"max": -100.0, | ||
"avg": -100.0, | ||
"instant": -40.0, |
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.
Is this -40.0 right or does it need modified?
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.
-40.0 is right here as that was value reported in show interface tranceiver - output.