dellcloudedge/barclamp-crowbar — pull request #190 by cloudedge (2012-09-11 19:44:01+00:00)
Title: Fix issue where UI assumes using eth0 for Switch-Unit-Port [1/5]

This is a minor fix to iterate the array rather than just
use the 0 item in it

Because the code was the same for name, port, and unit, I
moved the code into a shared subroutine and reduced the
overall code complexity.

I did NOT attempt to optimize this to reduce the calls
by storing the data instad of iterating each time.

crowbar_framework/app/models/node_object.rb | 41 ++++++++++----------------
1 files changed, 16 insertions(+), 25 deletions(-)