Skip to content
This repository has been archived by the owner on Jan 16, 2019. It is now read-only.

Modified infinite value of optical powers from -40 to -100 and added another unit test #139

Merged
merged 2 commits into from
Apr 24, 2017

Conversation

kaage
Copy link
Contributor

@kaage kaage commented Apr 20, 2017

This was made because of current infinite value of -40.0 (or 0.0 in some cases) can be completely valid value for optical power. -100.0 is far enough for anyone to mistakenly think as valid value.

@coveralls
Copy link

coveralls commented Apr 20, 2017

Coverage Status

Coverage remained the same at 67.33% when pulling 542c357 on kaage:develop into c069f54 on napalm-automation:develop.

@coveralls
Copy link

coveralls commented Apr 22, 2017

Coverage Status

Coverage increased (+0.09%) to 67.422% when pulling 515c2d4 on kaage:develop into c069f54 on napalm-automation:develop.

@kaage kaage changed the title Modified infinite value of optical powers from -40 to -100 Modified infinite value of optical powers from -40 to -100 and added another unit test Apr 22, 2017
int_brief = split_list[0]
output_power = split_list[3]
input_power = split_list[4]

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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,
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@ktbyers ktbyers merged commit f77c85e into napalm-automation:develop Apr 24, 2017
@ktbyers ktbyers added this to the 0.6.2 milestone May 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants