Skip to content

Commit

Permalink
Merge pull request #115 from douglasgabriel/support_indentify_leds
Browse files Browse the repository at this point in the history
Supporting differents identify leds name of physical servers on refresh
  • Loading branch information
agrare authored Nov 21, 2017
2 parents d6d5117 + 64fd5c8 commit c0b7889
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,16 +372,9 @@ def parse_asset_details(node)
end

def find_loc_led_state(leds)
loc_led_state = ""
unless leds.nil?
leds.each do |led|
if led["name"] == "Identify"
loc_led_state = led["state"]
break
end
end
end
loc_led_state
identification_led_names = %w(Identify Identification)
identification_led = leds.to_a.find { |led| identification_led_names.include?(led["name"]) }
identification_led.try(:[], "state")
end

def discover_ip_physical_infra
Expand Down

0 comments on commit c0b7889

Please sign in to comment.