Accepting request 357896 from Cloud:OpenStack:Factory
- switch to version from pypi This is the version used by OpenStack networking-cisco - update to 0.4.7: * Add support for netconf 1.1 * Fix multiple RPC error handling * Add support for cancel-commit and persist param * Add more examples * Add Huawei device support * Add cli command support for hpcomware v7 devices * Add H3C support, Support H3C CLI,Action,Get_bulk,Save,Rollback,etc. * Add alcatel lucent support * Rewrite multiple error handling * Add coveralls support, with shield in README.md * Set severity level to higher when multiple * Simplify logging and multi-error reporting * Keep stacktrace of errors * Check for known hosts on hostkey_verify only * Add check for device sending back null error_text * Fix RPC.raise_mode * Specifying hostkey_verify=False should not load_known_hosts * Check the correct field on rpc-error element * Nexus exec_command operation * Allow specifying multiple cmd elements in Cisco Nexus * Update rpc for nested rpc-errors * Prevent race condition in threading * Prevent hanging in session close * Support for paramiko ProxyCommand via ~/.ssh/config parsing * Add Juniper-specific commit operations * Add Huawei devices support * Tests/Travis support OBS-URL: https://build.opensuse.org/request/show/357896 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-ncclient?expand=0&rev=4
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7749b9ce7f5ad5a702bf312b378ba182d08304324656cb5150c40b45a7ee3fe7
|
||||
size 35856
|
3
ncclient-0.4.7.tar.gz
Normal file
3
ncclient-0.4.7.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:21d7782588d3b0440ae12a985fad8d26f158bb9d8c386d7a5df043e142ab5135
|
||||
size 60224
|
@@ -1,110 +0,0 @@
|
||||
From cc429a1b83b65b4ab39d917774d34603473afcba Mon Sep 17 00:00:00 2001
|
||||
From: envydd <ddutta@gmail.com>
|
||||
Date: Mon, 8 Aug 2011 22:15:13 -0700
|
||||
Subject: [PATCH 1/2] This commit has the changes required for ncclient to work
|
||||
with the Nexus family of devices from Cisco
|
||||
|
||||
Conflicts:
|
||||
ncclient/operations/rpc.py
|
||||
ncclient/xml_.py
|
||||
---
|
||||
ncclient/operations/rpc.py | 9 ++++++++-
|
||||
ncclient/xml_.py | 10 +++++++++-
|
||||
2 files changed, 17 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ncclient/operations/rpc.py b/ncclient/operations/rpc.py
|
||||
index a476e18..d30907b 100644
|
||||
--- a/ncclient/operations/rpc.py
|
||||
+++ b/ncclient/operations/rpc.py
|
||||
@@ -12,6 +12,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
+# Debojyoti Dutta added some code for interoperability with Cisco's
|
||||
+# Nexus family of switches. Tested with Nexus 7000 series.
|
||||
+
|
||||
from threading import Event, Lock
|
||||
from uuid import uuid1
|
||||
|
||||
@@ -256,7 +259,11 @@ class RPC(object):
|
||||
|
||||
def _wrap(self, subele):
|
||||
# internal use
|
||||
- ele = new_ele("rpc", {"message-id": self._id})
|
||||
+ ele = new_ele("rpc", {"message-id": self._id},
|
||||
+ **{"xmlns":BASE_NS_1_0,
|
||||
+ "xmlns:nxos":"http://www.cisco.com/nxos:1.0",
|
||||
+ "xmlns:if":"http://www.cisco.com/nxos:1.0:if_manager"
|
||||
+ })
|
||||
ele.append(subele)
|
||||
return to_xml(ele)
|
||||
|
||||
diff --git a/ncclient/xml_.py b/ncclient/xml_.py
|
||||
index 9e94ef0..c22b0f1 100644
|
||||
--- a/ncclient/xml_.py
|
||||
+++ b/ncclient/xml_.py
|
||||
@@ -13,6 +13,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
+# Debojyoti Dutta added some code for interoperability with Cisco's
|
||||
+# Nexus family of switches. Tested with Nexus 7000 series.
|
||||
+
|
||||
"Methods for creating, parsing, and dealing with XML and ElementTree objects."
|
||||
|
||||
from cStringIO import StringIO
|
||||
@@ -29,6 +32,10 @@ class XMLError(NCClientError): pass
|
||||
|
||||
#: Base NETCONF namespace
|
||||
BASE_NS_1_0 = "urn:ietf:params:xml:ns:netconf:base:1.0"
|
||||
+# NXOS_1_0
|
||||
+NXOS_1_0 = "http://www.cisco.com/nxos:1.0"
|
||||
+# NXOS_IF
|
||||
+NXOS_IF = "http://www.cisco.com/nxos:1.0:if_manager"
|
||||
#: Namespace for Tail-f core data model
|
||||
TAILF_AAA_1_1 = "http://tail-f.com/ns/aaa/1.1"
|
||||
#: Namespace for Tail-f execd data model
|
||||
@@ -51,6 +58,8 @@ register_namespace.func_doc = "ElementTree's namespace map determines the prefix
|
||||
|
||||
for (ns, pre) in {
|
||||
BASE_NS_1_0: 'nc',
|
||||
+ NXOS_1_0: 'nxos',
|
||||
+ NXOS_IF: 'if',
|
||||
TAILF_AAA_1_1: 'aaa',
|
||||
TAILF_EXECD_1_1: 'execd',
|
||||
CISCO_CPI_1_0: 'cpi',
|
||||
@@ -105,4 +114,3 @@ def validated_element(x, tags=None, attrs=None):
|
||||
new_ele = lambda tag, attrs={}, **extra: ET.Element(qualify(tag), attrs, **extra)
|
||||
|
||||
sub_ele = lambda parent, tag, attrs={}, **extra: ET.SubElement(parent, qualify(tag), attrs, **extra)
|
||||
-
|
||||
--
|
||||
1.8.1.4
|
||||
|
||||
From 71aa03550d34ec45983ec2ceab821a73f7b8278e Mon Sep 17 00:00:00 2001
|
||||
From: Edgar Magana <emagana@gmail.com>
|
||||
Date: Thu, 24 May 2012 14:56:53 -0700
|
||||
Subject: [PATCH 2/2] Changing the subsystem from netconf to xmlagent
|
||||
|
||||
---
|
||||
ncclient/transport/ssh.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/ncclient/transport/ssh.py b/ncclient/transport/ssh.py
|
||||
index 14082da..886ac91 100644
|
||||
--- a/ncclient/transport/ssh.py
|
||||
+++ b/ncclient/transport/ssh.py
|
||||
@@ -204,8 +204,8 @@ class SSHSession(Session):
|
||||
self._connected = True # there was no error authenticating
|
||||
|
||||
c = self._channel = self._transport.open_session()
|
||||
- c.set_name("netconf")
|
||||
- c.invoke_subsystem("netconf")
|
||||
+ c.set_name("xmlagent")
|
||||
+ c.invoke_subsystem("xmlagent")
|
||||
|
||||
self._post_connect()
|
||||
|
||||
--
|
||||
1.8.1.4
|
||||
|
22
pr-109.patch
Normal file
22
pr-109.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
From 955cb0dd3e4246575e79867236930c1348bdb5bf Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Bechtold <tbechtold@suse.com>
|
||||
Date: Fri, 5 Feb 2016 10:32:50 +0100
|
||||
Subject: [PATCH] Lower required lxml version
|
||||
|
||||
ncclient doesn't use any features of the newest lxml module.
|
||||
So lower the requirement.
|
||||
This is useful for distributions (in my case SLES) which don't
|
||||
have the latest and greatest version.
|
||||
---
|
||||
requirements.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: ncclient-0.4.7/requirements.txt
|
||||
===================================================================
|
||||
--- ncclient-0.4.7.orig/requirements.txt
|
||||
+++ ncclient-0.4.7/requirements.txt
|
||||
@@ -1,3 +1,3 @@
|
||||
setuptools>0.6
|
||||
paramiko>=1.7.7.1
|
||||
-lxml>=3.3.0
|
||||
+lxml>=3.1
|
@@ -1,3 +1,54 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 5 10:00:39 UTC 2016 - tbechtold@suse.com
|
||||
|
||||
- switch to version from pypi
|
||||
This is the version used by OpenStack networking-cisco
|
||||
- update to 0.4.7:
|
||||
* Add support for netconf 1.1
|
||||
* Fix multiple RPC error handling
|
||||
* Add support for cancel-commit and persist param
|
||||
* Add more examples
|
||||
* Add Huawei device support
|
||||
* Add cli command support for hpcomware v7 devices
|
||||
* Add H3C support, Support H3C CLI,Action,Get_bulk,Save,Rollback,etc.
|
||||
* Add alcatel lucent support
|
||||
* Rewrite multiple error handling
|
||||
* Add coveralls support, with shield in README.md
|
||||
* Set severity level to higher when multiple
|
||||
* Simplify logging and multi-error reporting
|
||||
* Keep stacktrace of errors
|
||||
* Check for known hosts on hostkey_verify only
|
||||
* Add check for device sending back null error_text
|
||||
* Fix RPC.raise_mode
|
||||
* Specifying hostkey_verify=False should not load_known_hosts
|
||||
* Check the correct field on rpc-error element
|
||||
* Nexus exec_command operation
|
||||
* Allow specifying multiple cmd elements in Cisco Nexus
|
||||
* Update rpc for nested rpc-errors
|
||||
* Prevent race condition in threading
|
||||
* Prevent hanging in session close
|
||||
* Support for paramiko ProxyCommand via ~/.ssh/config parsing
|
||||
* Add Juniper-specific commit operations
|
||||
* Add Huawei devices support
|
||||
* Tests/Travis support
|
||||
* ioproc transport support for Juniper devices
|
||||
* Update Cisco CSR device handler
|
||||
* Fix issue with locked method missing device handler
|
||||
* Fix for namespace definition with lxml
|
||||
* Add missing SessionError exception
|
||||
* Update docs for Nexus device handler
|
||||
* Docstring fixes
|
||||
* Typos
|
||||
* Minor bugfixes
|
||||
* Add an example for Cisco CSR1000v
|
||||
- Remove nexus-support.patch . Applied upstream.
|
||||
- Adjust Requires according to requirements.txt
|
||||
- Split documentation into extra -doc package
|
||||
- Add pr-109.patch . This lowers the lxml requirement so this
|
||||
package works with SLE12.
|
||||
- Stop using openstack-suse-macros for now. This fixes the build
|
||||
for openSUSE 13.2 and SLE11SP3
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 29 10:26:26 UTC 2015 - tbechtold@suse.com
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-ncclient
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,21 +17,19 @@
|
||||
|
||||
|
||||
Name: python-ncclient
|
||||
Version: 0.3.2
|
||||
Version: 0.4.7
|
||||
Release: 0
|
||||
Url: https://github.com/CiscoSystems/ncclient
|
||||
Url: https://github.com/ncclient/ncclient
|
||||
Summary: Python NETCONF protocol library
|
||||
License: Apache-2.0
|
||||
Group: Development/Languages/Python
|
||||
Source: ncclient-%{version}.tar.gz
|
||||
# Forward ported from https://github.com/CiscoSystems/ncclient required for the
|
||||
# quantum nexus plugin to work with nexus switches
|
||||
Patch0: nexus-support.patch
|
||||
# PATCH-FIX-UPSTREAM pr-109.patch -- https://github.com/ncclient/ncclient/pull/109
|
||||
Patch0: pr-109.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: openstack-suse-macros
|
||||
BuildRequires: python-base
|
||||
# Documentation requirements:
|
||||
BuildRequires: python-Sphinx
|
||||
BuildRequires: python-setuptools
|
||||
Requires: python-lxml >= 3.1
|
||||
Requires: python-paramiko >= 1.7.7.1
|
||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||
@@ -43,20 +41,34 @@ BuildArch: noarch
|
||||
ncclient is a Python library that facilitates client-side scripting
|
||||
and application development around the NETCONF protocol.
|
||||
|
||||
%package doc
|
||||
Summary: Python NETCONF protocol library - Documentation
|
||||
Group: Documentation/HTML
|
||||
BuildRequires: python-Sphinx
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description doc
|
||||
This package contains documentation files for %{name}.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n leopoul-ncclient-3304dc4
|
||||
%setup -q -n ncclient-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
%{__python2} setup.py build
|
||||
python setup.py build
|
||||
cd docs && make html && rm build/html/.buildinfo
|
||||
|
||||
%install
|
||||
%{__python2} setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
python2 setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc LICENSE
|
||||
%{python_sitelib}/*
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE README examples docs/build/html
|
||||
%{python2_sitelib}/*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user