netconf 0.2.2 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ require 'net/netconf/transport'
7
7
  require 'net/netconf/ssh'
8
8
 
9
9
  module Netconf
10
- VERSION = "0.2.2"
10
+ VERSION = "0.2.4"
11
11
 
12
12
  NAMESPACE = "urn:ietf:params:xml:ns:netconf:base:1.0"
13
13
 
@@ -127,7 +127,13 @@ module Netconf
127
127
 
128
128
  Netconf::RPC::set_exception( rpc, Netconf::EditError )
129
129
  @trans.rpc_exec( rpc )
130
- end
130
+ end # load_configuration
131
+
132
+ def command( cmd_str, attrs = nil )
133
+ rpc = Nokogiri::XML("<rpc><command>#{cmd_str}</command></rpc>").root
134
+ Netconf::RPC.add_attributes( rpc.at('command'), attrs ) if attrs
135
+ @trans.rpc_exec( rpc )
136
+ end
131
137
 
132
138
  end # module: JUNOS
133
139
  end # module: RPC
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netconf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-01-14 00:00:00.000000000 Z
13
+ date: 2013-01-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri