class NetconfNode

Class that represents a NetconfNode

Attributes

ip[R]

String : IP address for NETCONF protocol of NETCONF device. e.g. 172.22.11.44

password[R]

String : Admin password for logon NETCONF device. e.g. vyatta

port[R]

String : Port number of the NETCONF protocol. e.g. 830

tcp_only[R]

Boolean : True if only TCP is used to communicate with NETCONF device.

username[R]

String : Admin userid for logon to NETCONF device. e.g. vyatta

Public Class Methods

new(controller: nil, name: nil, ip_addr: nil, port_number: nil, admin_name: nil, admin_password: nil, tcp_only: false) click to toggle source

Parameters

  • controller

    Controller : The controller object through which NETCONF device is to be accessed.

  • name

    String : The name of the NETCONF node. e.g. vrouter

  • ip_addr

    String : IP address for NETCONF protocol of NETCONF device. e.g. 172.22.11.44

  • port_number

    String : Port number of the NETCONF protocol. e.g. 830

  • admin_name

    String : Admin userid for logon to NETCONF device. e.g. vyatta

  • admin_password

    String : Admin password for logon NETCONF device. e.g. vyatta

  • tcp_only

    Boolean : True if only TCP is used to communicate with NETCONF device.

Calls superclass method Node.new
# File lib/controller/netconf_node.rb, line 59
def initialize(controller: nil, name: nil, ip_addr: nil,
    port_number: nil, admin_name: nil, admin_password: nil,
    tcp_only: false)
  super(controller: controller, name: name)
  raise ArgumentError, "IP Address (ip_addr) required" unless ip_addr
  raise ArgumentError, "Port Number (port_number) required" unless port_number
  raise ArgumentError, "Admin Username (admin_name) required" unless admin_name
  raise ArgumentError, "Admin Password (admin_password) required" unless admin_password
  
  @ip = ip_addr
  @port = port_number
  @username = admin_name
  @password = admin_password
  @tcp_only = tcp_only
end