Class: Netconf::NetconfClient::RpcResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/util/client/netconf/netconf_client.rb

Overview

Base class for netconf responses

Uses REXML xpath queries to gather any errors

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorsObject (readonly)

Returns the value of attribute errors.



214
215
216
# File 'lib/util/client/netconf/netconf_client.rb', line 214

def errors
  @errors
end

Instance Method Details

#errors?Boolean

Returns:

  • (Boolean)


226
227
228
# File 'lib/util/client/netconf/netconf_client.rb', line 226

def errors?
  !@errors.empty?
end

#errors_as_stringObject



216
217
218
219
220
221
222
223
224
# File 'lib/util/client/netconf/netconf_client.rb', line 216

def errors_as_string
  s = StringIO.new
  @errors.each do |e|
    e.each do |k, v|
      s.write("#{k} => #{v}\n")
    end
  end
  s.string
end

#responseObject



230
231
232
# File 'lib/util/client/netconf/netconf_client.rb', line 230

def response
  @doc
end