lib/junos-ez/provider.rb
### ---------------------------------------------------------------
### write configuration to Junos.  Check for errors vs. warnings.
### if there are warnings then return the result.  If there are
### errors, re-throw the exception object.  If everything was
### OK, simply return the result
### ---------------------------------------------------------------    

write configuration to Junos.  Check for errors vs. warnings.
if there are warnings then return the result.  If there are
errors, re-throw the exception object.  If everything was
OK, simply return the result
write configuration to Junos . Check for errors vs . warnings . if there are warnings then return the result . If there are errors re - throw the exception object . If everything was OK simply return the result
def write_xml_config!( xml, opts = {} )
    begin
      action = {'action' => 'replace' }
      result = @ndev.rpc.load_configuration( xml, action )
    rescue Netconf::RpcError => e      
      errs = e.rsp.xpath('//rpc-error')
      raise e unless errs.empty?
      e.rsp
    else
      result
    end
  end
def write_xml_config! ( xml , opts = { } ) begin action = { 'action' => 'replace' } result = @ndev . rpc . load_configuration ( xml , action ) rescue Netconf :: RpcError => e errs = e . rsp . xpath ( '//rpc-error' ) raise e unless errs . empty? e . rsp else result end end
write configuration to Junos.
write configuration to Junos .
xml
<not_specific>
opts
<not_specific>