Class: Sloe::Expectations::Junos::HavePimNeighborOnAllInterfaces
- Inherits:
-
Object
- Object
- Sloe::Expectations::Junos::HavePimNeighborOnAllInterfaces
- Defined in:
- lib/sloe/expectations.rb
Instance Method Summary collapse
Instance Method Details
#failure_message_for_should ⇒ Object
128 129 130 |
# File 'lib/sloe/expectations.rb', line 128 def @pim_int_without_neighbor end |
#match(actual) ⇒ Object
119 120 121 122 123 124 125 126 |
# File 'lib/sloe/expectations.rb', line 119 def match(actual) @pim_int_without_neighbor = actual.xpath('//pim-interface[contains(pim-interface-name,"ae")]').map do |int| if int.xpath('neighbor-count').text.to_i == 0 "#{int.xpath('pim-interface-name').text} has no neighbors" end end @pim_int_without_neighbor.size == 0 end |