Module: Netconf::RPC

Defined in:
lib/net/netconf/rpc.rb,
lib/net/netconf/rpc_std.rb,
lib/net/netconf/jnpr/rpc.rb

Defined Under Namespace

Modules: Builder, Junos, Standard Classes: Executor

Constant Summary collapse

MSG_END =
']]>]]>'.freeze
MSG_END_RE =
/\]\]>\]\]>[\r\n]*$/
MSG_CLOSE_SESSION =
'<rpc><close-session/></rpc>'.freeze
MSG_HELLO =
<<-EOM.freeze
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <capabilities>
    <capability>urn:ietf:params:netconf:base:1.0</capability>
  </capabilities>
</hello>
EOM

Class Method Summary collapse

Class Method Details

.add_attributes(ele_nx, attr_h) ⇒ Object


5
6
7
# File 'lib/net/netconf/rpc.rb', line 5

def self.add_attributes(ele_nx, attr_h)
  attr_h.each { |k, v| ele_nx[k] = v }
end

.get_exception(rpc_nx) ⇒ Object


13
14
15
# File 'lib/net/netconf/rpc.rb', line 13

def self.get_exception(rpc_nx)
  rpc_nx.instance_variable_get(:@netconf_exception) || Netconf::RpcError
end

.set_exception(rpc_nx, exception) ⇒ Object


9
10
11
# File 'lib/net/netconf/rpc.rb', line 9

def self.set_exception(rpc_nx, exception)
  rpc_nx.instance_variable_set(:@netconf_exception, exception)
end