Sha256: f5e17d93bf49e56f9cdc26762e7bf8ffc9f46828e730511017edb957c1943533

Contents?: true

Size: 700 Bytes

Versions: 1

Compression:

Stored size: 700 Bytes

Contents

require 'sloe'
require 'ruby-debug'

describe Sloe do
  context "invoked with block" do
    before(:all) do
      @login = {
        :target => 'capella',
        :username => 'dgethings',
        :password => 'mcisamilf'
      }
      @hostname = ''
    end

    it "calls Netconf RPC" do
      Sloe::Device.new( @login ) { |dut| 
        sw_info = dut.rpc.get_system_information
        @hostname = sw_info.xpath('//host-name').text
      }
      @hostname.should include @login[:target]
    end

    it "calls SNMP RPC" do
      Sloe::Device.new ( @login ) { |dut| 
        @hostname = dut.snmp.get_value( 'sysName.0' ).to_s
      }
      @hostname.should include @login[:target]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sloe-0.3.2 spec/blocks_spec.rb