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

Show overview broken out by interface capacities #548

Merged
merged 2 commits into from
May 22, 2017

Conversation

byxorna
Copy link
Contributor

@byxorna byxorna commented May 20, 2017

Fixes #545

@michaeljs1990 This updates the show overview to indicate how many of each capacity interface are present. For example, if a machine has 4x1g and 1x10g interfaces, the show overview will reflect this in a terse manner. Similarly, a machine with 1x40g nic will show that it includes a 40g nic, instead of reporting it does not have a 10g.

cc @defect @roymarantz @gtorre @qx-xp

Homogenous interfaces:
screenshot from 2017-05-20 14-09-33

Mixed interfaces:
screenshot from 2017-05-20 14-19-14

add a nicsBySpeed grouping for overview

change language for nic counts

add deprecation notice to hasGbNic methods
@byxorna byxorna force-pushed the gabe-arbitrary-interface-capacities branch from 7e0ef52 to 4284a06 Compare May 20, 2017 12:26
@michaeljs1990
Copy link
Contributor

I like this since it will also work with the strange 25GbE and 50GbE cards that could pop up in the DC.

Can we remove *GbNic functions all together instead of deprecating them? It looks like the only place they are used is in tests and show_overview.html which should be easy to switch over.

eatingthenight@lix:~/Code/collins$ grep -r hasGbNic .
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.hasGbNic must beTrue
./app/collins/util/LshwRepresentation.scala:  def hasGbNic: Boolean = nics.find { _.speed.inGigabits == 1 }.map { _ => true }.getOrElse(false)
./app/collins/util/LshwRepresentation.scala:        (hasGbNic == other.hasGbNic) &&

eatingthenight@lix:~/Code/collins$ grep -r has10GbNic .
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beTrue
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic aka "has 10 gig card" must beTrue // picked up from default in config
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./test/collins/util/parsers/LshwParserSpec.scala:          rep.has10GbNic must beFalse
./app/views/asset/show_overview.scala.html:          <td>@{if (aa.lshw.has10GbNic) "Yes" else "No"}</td>
./app/collins/util/LshwRepresentation.scala:  def has10GbNic: Boolean = nics.find { _.speed.inGigabits == 10 }.map { _ => true }.getOrElse(false)
./app/collins/util/LshwRepresentation.scala:        (has10GbNic == other.has10GbNic)

@byxorna
Copy link
Contributor Author

byxorna commented May 21, 2017

@michaeljs1990 yea, i was going to but wanted to put up the most simple diff first. I am game to gut those unnecessary methods. Next push will include that.

@byxorna
Copy link
Contributor Author

byxorna commented May 21, 2017

@michaeljs1990 removed unnecessary methods :)

Copy link
Contributor

@michaeljs1990 michaeljs1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥🔥

@byxorna byxorna merged commit 4711cc5 into tumblr:master May 22, 2017
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.

2 participants