• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

docs/H03-May-2022-792406

examples/H06-Mar-2021-2,0061,368

ncclient/H06-Mar-2021-5,2713,613

ncclient.egg-info/H03-May-2022-337260

LICENSEH A D06-Mar-202111.1 KiB203169

MANIFEST.inH A D06-Mar-2021159 87

PKG-INFOH A D06-Mar-202113.2 KiB337260

README.rstH A D06-Mar-20219.8 KiB316240

setup.cfgH A D06-Mar-2021264 2316

setup.pyH A D06-Mar-20212.7 KiB7744

versioneer.pyH A D06-Mar-202167 KiB1,8231,415

README.rst

1ncclient: Python library for NETCONF clients
2--------------------------------------------
3
4ncclient is a Python library that facilitates client-side scripting and
5application development around the NETCONF protocol. ``ncclient`` was
6developed by `Shikar Bhushan <http://schmizz.net>`. It is now
7maintained by `Leonidas Poulopoulos (@leopoul) <http://ncclient.org>`
8and `Einar Nilsen-Nygaard (@einarnn)`.
9
10Docs:
11`http://ncclient.readthedocs.org <http://ncclient.readthedocs.org>`_
12
13Github:
14`https://github.com/ncclient/ncclient <https://github.com/ncclient/ncclient>`_
15
16Requirements:
17^^^^^^^^^^^^^
18
19-  Python 2.7 or Python 3.4+
20-  setuptools 0.6+
21-  Paramiko 1.7+
22-  lxml 3.3.0+
23-  libxml2
24-  libxslt
25
26If you are on Debian/Ubuntu install the following libs (via aptitude or
27apt-get):
28
29-  libxml2-dev
30-  libxslt1-dev
31
32Installation:
33^^^^^^^^^^^^^
34
35::
36
37    [ncclient] $ sudo python setup.py install
38
39or via pip:
40
41::
42
43    pip install ncclient
44
45Examples:
46^^^^^^^^^
47
48::
49
50    [ncclient] $ python examples/juniper/*.py
51
52Usage
53~~~~~
54
55Get device running config
56'''''''''''''''''''''''''
57
58Use either an interactive Python console (ipython) or integrate the
59following in your code:
60
61::
62
63    from ncclient import manager
64
65    with manager.connect(host=host, port=830, username=user, hostkey_verify=False) as m:
66        c = m.get_config(source='running').data_xml
67        with open("%s.xml" % host, 'w') as f:
68            f.write(c)
69
70As of 0.4.1 ncclient integrates Juniper's and Cisco's forks, lots of new concepts
71have been introduced that ease management of Juniper and Cisco devices respectively.
72The biggest change is the introduction of device handlers in connection paramms.
73For example to invoke Juniper's functions annd params one has to re-write the above with
74**device\_params={'name':'junos'}**:
75
76::
77
78    from ncclient import manager
79
80    with manager.connect(host=host, port=830, username=user, hostkey_verify=False, device_params={'name':'junos'}) as m:
81        c = m.get_config(source='running').data_xml
82        with open("%s.xml" % host, 'w') as f:
83            f.write(c)
84
85Device handlers are easy to implement and prove to be futureproof.
86
87Supported device handlers
88'''''''''''''''''''''''''
89
90* Juniper: `device_params={'name':'junos'}`
91* Cisco:
92    - CSR: `device_params={'name':'csr'}`
93    - Nexus: `device_params={'name':'nexus'}`
94    - IOS XR: `device_params={'name':'iosxr'}`
95    - IOS XE: `device_params={'name':'iosxe'}`
96* Huawei:
97    - `device_params={'name':'huawei'}`
98    - `device_params={'name':'huaweiyang'}`
99* Nokia SR OS: `device_params={'name':'sros'}`
100* H3C: `device_params={'name':'h3c'}`
101* HP Comware: `device_params={'name':'hpcomware'}`
102* Server or anything not in above: `device_params={'name':'default'}`
103
104Changes \| brief
105~~~~~~~~~~~~~~~~
106
107**v0.6.10**
108
109* NETCONF call-home (RFC8071) support
110* YANG 1.1 `action` support
111* Nokia SR OS device handler support
112* Removal of old ALU base-r13 API documentation
113* Increased test coverage
114* Variety of bugfixes and minor enhancements from a variety of contributors since 0.6.9 (see commit history)
115* Thanks to all contributors!
116
117**v0.6.9**
118
119* Fix for breaking API change
120
121**v0.6.8**
122
123* Pulled due to accidental breaking API change
124* Variety of small updates and bugfixes, but of note:
125    - Support for namespace prefixes for XPath queries
126    - `edit-config` parameter validation
127    - Support for multiple RPC errors
128    - API to get supported device types
129    - Support for subtree filters with multiple top-level tags
130* Thanks to all contributors!
131
132**v0.6.7**
133
134- Variety of bugfixes from a variety of contributors since 0.6.6 (see commit history)
135
136**v0.6.6**
137
138- Read ssh timeout from config file if not specified in method call
139- Tox support
140- Huge XML tree parser support
141- Adding optional bind address to connect
142
143**v0.6.5**
144
145- Updated README for 0.6.5 release
146
147**v0.6.4**
148
149- Pin selectors2 to Python versions <= 3.4
150- Fix config examples to actually use the nc namespace
151- Fix: correctly set port for paramiko when using ssh_config file
152- Test: add test to check ProxyCommand uses correct port
153- Update commits for py3
154- Enhance Alcatel-Lucent-support
155- Juniper RPC: allow specifying format in CompareConfiguration
156- Parsing of NETCONF 1.1 frames no longer decodes each chunk of bytes
157- Fix filter in create_subscription
158- Validate 'with-defaults' mode based on supported modes advertised in capability URI
159
160**v0.6.3**
161
162- Fix homepage link registered with PyPi
163- SSH Host Key checking
164- Updated junos.py to resolve RestrictedUser error
165- Close the channel when closing SSH session
166- Invoke self.parse() to ensure errors, if any, have been detected before check in ok()
167
168**v0.6.2**
169
170- Migration to user selectors instead of select, allowing higher scale operations
171- Improved netconf:base:1.1 parsing
172- Graceful exit on session close
173
174**v0.6.0**
175
176- Fix use of new Python 3.7 keyword, async
177- Re-enable Python 3.7
178
179**v0.5.4**
180
181- Rollup of minor changes since 0.5.3
182- Disablement of Python 3.7 due to async keyword issue
183
184**v0.5.3**
185
186- Add notifications support
187- Add support for ecdsa keys
188- Various bug fixes
189
190**v0.5.2**
191
192- Add support for Python 3
193- Improve Junos ioproc performance
194- Performance improvements
195- Updated test cases
196- Many bug and performance fixes
197
198
199**v0.4.7**
200
201- Add support for netconf 1.1
202
203**v0.4.6**
204
205- Fix multiple RPC error generation
206- Add support for cancel-commit and persist param
207- Add more examples
208
209**v0.4.5**
210
211- Add Huawei device support
212- Add cli command support for hpcomware v7 devices
213- Add H3C support, Support H3C CLI,Action,Get_bulk,Save,Rollback,etc.
214- Add alcatel lucent support
215
216- Rewrite multiple error handling
217- Add coveralls support, with shield in README.md
218- Set severity level to higher when multiple
219- Simplify logging and multi-error reporting
220- Keep stacktrace of errors
221- Check for known hosts on hostkey_verify only
222- Add check for device sending back null error_text
223- Fix RPC.raise_mode
224- Specifying hostkey_verify=False should not load_known_hosts
225- Check the correct field on rpc-error element
226
227**v0.4.3**
228
229- Nexus exec_command operation
230- Allow specifying multiple cmd elements in Cisco Nexus
231- Update rpc for nested rpc-errors
232- Prevent race condition in threading
233- Prevent hanging in session close
234
235**v0.4.2**
236
237- Support for paramiko ProxyCommand via ~/.ssh/config parsing
238- Add Juniper-specific commit operations
239- Add Huawei devices support
240- Tests/Travis support
241- ioproc transport support for Juniper devices
242- Update Cisco CSR device handler
243- Many minor and major fixes
244
245**v0.4.1**
246
247-  Switch between replies if custom handler is found
248-  Add Juniper, Cisco and default device handlers
249-  Allow preferred SSH subsystem name in device params
250-  Allow iteration over multiple SSH subsystem names.
251
252
253
254
255Acknowledgements
256~~~~~~~~~~~~~~~~
257-  v0.6.10: @vnitinv, @omaxx, @einarnn, @musicinmybrain, @tonynii, @sstancu, Martin Volf, @fredgan, @avisom, Viktor Velichkin, @ogenstad, @earies
258-  v0.6.9: [Fred Gan](https://github.com/fredgan)
259-  v0.6.8: [Fred Gan](https://github.com/fredgan), @vnitinv, @kbijakowski, @iwanb, @badguy99, @liuyong, Andrew Mallory, William Lvory
260-  v0.6.7: @vnitinv, @chaitu-tk, @sidhujasminder, @crutcha, @markgoddard, @ganeshrn, @songxl, @doesitblend, @psikala, @xuxiaowei0512, @muffizone
261-  v0.6.6: @sstancu, @hemna, @ishayansheikh
262-  v0.6.4: @davidhankins, @mzagozen, @knobix, @markafarrell, @psikala, @moepman, @apt-itude, @yuekyang
263-  v0.6.3: @rdkls, @Anthony25, @rsmekala, @vnitinv, @siming85
264-  v0.6.2: @einarnn, @glennmatthews, @bryan-stripe, @nickylba
265-  v0.6.0: `Einar Nilsen-Nygaard`_
266-  v0.5.4: Various
267-  v0.5.3: `Justin Wilcox`_, `Stacy W. Smith`_, `Mircea Ulinic`_,
268   `Ebben Aries`_, `Einar Nilsen-Nygaard`_, `QijunPan`_
269-  v0.5.2: `Nitin Kumar`_, `Kristian Larsson`_, `palashgupta`_,
270   `Jonathan Provost`_, `Jainpriyal`_, `sharang`_, `pseguel`_,
271   `nnakamot`_, `Алексей Пастухов`_, `Christian Giese`_, `Peipei Guo`_,
272   `Time Warner Cable Openstack Team`_
273-  v0.4.7: `Einar Nilsen-Nygaard`_, `Vaibhav Bajpai`_, Norio Nakamoto
274-  v0.4.6: `Nitin Kumar`_, `Carl Moberg`_, `Stavros Kroustouris`_
275-  v0.4.5: `Sebastian Wiesinger`_, `Vincent Bernat`_, `Matthew Stone`_,
276   `Nitin Kumar`_
277-  v0.4.3: `Jeremy Schulman`_, `Ray Solomon`_, `Rick Sherman`_,
278   `subhak186`_
279-  v0.4.2: `katharh`_, `Francis Luong (Franco)`_, `Vincent Bernat`_,
280   `Juergen Brendel`_, `Quentin Loos`_, `Ray Solomon`_, `Sebastian
281   Wiesinger`_, `Ebben Aries`_
282-  v0.4.1: `Jeremy Schulman`_, `Ebben Aries`_, Juergen Brendel
283
284.. _Nitin Kumar: https://github.com/vnitinv
285.. _Kristian Larsson: https://github.com/plajjan
286.. _palashgupta: https://github.com/palashgupta
287.. _Jonathan Provost: https://github.com/JoProvost
288.. _Jainpriyal: https://github.com/Jainpriyal
289.. _sharang: https://github.com/sharang
290.. _pseguel: https://github.com/pseguel
291.. _nnakamot: https://github.com/nnakamot
292.. _Алексей Пастухов: https://github.com/p-alik
293.. _Christian Giese: https://github.com/GIC-de
294.. _Peipei Guo: https://github.com/peipeiguo
295.. _Time Warner Cable Openstack Team: https://github.com/twc-openstack
296.. _Einar Nilsen-Nygaard: https://github.com/einarnn
297.. _Vaibhav Bajpai: https://github.com/vbajpai
298.. _Carl Moberg: https://github.com/cmoberg
299.. _Stavros Kroustouris: https://github.com/kroustou
300.. _Sebastian Wiesinger: https://github.com/sebastianw
301.. _Vincent Bernat: https://github.com/vincentbernat
302.. _Matthew Stone: https://github.com/bigmstone
303.. _Jeremy Schulman: https://github.com/jeremyschulman
304.. _Ray Solomon: https://github.com/rsolomo
305.. _Rick Sherman: https://github.com/shermdog
306.. _subhak186: https://github.com/subhak186
307.. _katharh: https://github.com/katharh
308.. _Francis Luong (Franco): https://github.com/francisluong
309.. _Juergen Brendel: https://github.com/juergenbrendel
310.. _Quentin Loos: https://github.com/Kent1
311.. _Ebben Aries: https://github.com/earies
312.. _Justin Wilcox: https://github.com/jwwilcox
313.. _Stacy W. Smith: https://github.com/stacywsmith
314.. _Mircea Ulinic: https://github.com/mirceaulinic
315.. _QijunPan: https://github.com/QijunPan
316