Sha256: 84d74e7fbccb40a78ceadf3254fb108fb836243558fd3d7de90e53560dd39330

Contents?: true

Size: 552 Bytes

Versions: 20

Compression:

Stored size: 552 Bytes

Contents

# frozen_string_literal: true

require_relative '../../../../puppet/util/network_device'
require_relative '../../../../puppet/util/network_device/transport'

class Puppet::Util::NetworkDevice::Transport::Base
  attr_accessor :user, :password, :host, :port
  attr_accessor :default_prompt, :timeout

  def initialize
    @timeout = 10
  end

  def send(cmd)
  end

  def expect(prompt)
  end

  def command(cmd, options = {})
    send(cmd)
    expect(options[:prompt] || default_prompt) do |output|
      yield output if block_given?
    end
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/util/network_device/transport/base.rb
puppet-8.3.0-x86-mingw32 lib/puppet/util/network_device/transport/base.rb
puppet-8.3.0-x64-mingw32 lib/puppet/util/network_device/transport/base.rb
puppet-8.3.0-universal-darwin lib/puppet/util/network_device/transport/base.rb
puppet-8.3.1 lib/puppet/util/network_device/transport/base.rb
puppet-8.3.1-x86-mingw32 lib/puppet/util/network_device/transport/base.rb
puppet-8.3.1-x64-mingw32 lib/puppet/util/network_device/transport/base.rb
puppet-8.3.1-universal-darwin lib/puppet/util/network_device/transport/base.rb
puppet-8.2.0 lib/puppet/util/network_device/transport/base.rb
puppet-8.2.0-x86-mingw32 lib/puppet/util/network_device/transport/base.rb
puppet-8.2.0-x64-mingw32 lib/puppet/util/network_device/transport/base.rb
puppet-8.2.0-universal-darwin lib/puppet/util/network_device/transport/base.rb
puppet-8.1.0 lib/puppet/util/network_device/transport/base.rb
puppet-8.1.0-x86-mingw32 lib/puppet/util/network_device/transport/base.rb
puppet-8.1.0-x64-mingw32 lib/puppet/util/network_device/transport/base.rb
puppet-8.1.0-universal-darwin lib/puppet/util/network_device/transport/base.rb
puppet-8.0.1 lib/puppet/util/network_device/transport/base.rb
puppet-8.0.1-x86-mingw32 lib/puppet/util/network_device/transport/base.rb
puppet-8.0.1-x64-mingw32 lib/puppet/util/network_device/transport/base.rb
puppet-8.0.1-universal-darwin lib/puppet/util/network_device/transport/base.rb