Hello community,
here is the log from the commit of package python-ciscoconfparse for
openSUSE:Factory checked in at 2020-04-13 12:54:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-ciscoconfparse (Old)
and /work/SRC/openSUSE:Factory/.python-ciscoconfparse.new.3248 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-ciscoconfparse"
Mon Apr 13 12:54:36 2020 rev:13 rq:793532 version:1.5.3
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-ciscoconfparse/python-ciscoconfparse.changes
2020-02-27 14:39:21.738282879 +0100
+++
/work/SRC/openSUSE:Factory/.python-ciscoconfparse.new.3248/python-ciscoconfparse.changes
2020-04-13 12:54:42.736685374 +0200
@@ -1,0 +2,10 @@
+Sun Apr 12 17:00:23 UTC 2020 - Martin Hauke <[email protected]>
+
+- Update to version 1.5.3
+ * Fix IPv6Obj().packed and IPv6Obj().exploded
+ * add IPv4Obj().packed and IPv4Obj().exploded
+- Update to version 1.5.2
+ * Add __add__() and __sub__() to IPv4Obj() and IPv6Obj();
+ * remove use of IPv6Obj().broadcast in IPv6Obj().__contains__()
+
+-------------------------------------------------------------------
Old:
----
ciscoconfparse-1.5.1.tar.gz
New:
----
ciscoconfparse-1.5.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-ciscoconfparse.spec ++++++
--- /var/tmp/diff_new_pack.qhfYzY/_old 2020-04-13 12:54:43.392685659 +0200
+++ /var/tmp/diff_new_pack.qhfYzY/_new 2020-04-13 12:54:43.392685659 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-ciscoconfparse
-Version: 1.5.1
+Version: 1.5.3
Release: 0
Summary: Library for parsing, querying and modifying Cisco IOS-style
configurations
License: GPL-3.0-or-later
++++++ ciscoconfparse-1.5.1.tar.gz -> ciscoconfparse-1.5.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ciscoconfparse-1.5.1/CHANGES
new/ciscoconfparse-1.5.3/CHANGES
--- old/ciscoconfparse-1.5.1/CHANGES 2020-02-20 09:32:17.000000000 +0100
+++ new/ciscoconfparse-1.5.3/CHANGES 2020-04-12 17:53:07.000000000 +0200
@@ -1,3 +1,5 @@
+1.5.3 20200412 Fix IPv6Obj().packed and IPv6Obj().exploded; add
IPv4Obj().packed and IPv4Obj().exploded
+1.5.2 20200412 Add __add__() and __sub__() to IPv4Obj() and IPv6Obj();
remove use of IPv6Obj().broadcast in IPv6Obj().__contains__()
1.5.1 20200223 Remove embedded junos debugging
1.5.0 20200223 Complete rewrite of junos parser (fix Github issue #70);
deprecate support for Python 3.4
1.4.11 20191205 Github issue #170 Explicitly close() open filehandles
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ciscoconfparse-1.5.1/PKG-INFO
new/ciscoconfparse-1.5.3/PKG-INFO
--- old/ciscoconfparse-1.5.1/PKG-INFO 2020-02-20 09:34:59.000000000 +0100
+++ new/ciscoconfparse-1.5.3/PKG-INFO 2020-04-12 17:56:08.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ciscoconfparse
-Version: 1.5.1
+Version: 1.5.3
Summary: Parse, Audit, Query, Build, and Modify Cisco IOS-style configurations
Home-page: http://www.pennington.net/py/ciscoconfparse/
Author: David Michael Pennington
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ciscoconfparse-1.5.1/ciscoconfparse/ccp_util.py
new/ciscoconfparse-1.5.3/ciscoconfparse/ccp_util.py
--- old/ciscoconfparse-1.5.1/ciscoconfparse/ccp_util.py 2019-11-22
16:17:05.000000000 +0100
+++ new/ciscoconfparse-1.5.3/ciscoconfparse/ccp_util.py 2020-04-12
17:51:45.000000000 +0200
@@ -169,6 +169,10 @@
self.network_object = IPv4Network(str(arg)+'/32')
self.ip_object = IPv4Address(str(arg).split('/')[0])
return None
+ elif isinstance(arg, int):
+ self.ip_object = IPv4Address(arg)
+ self.network_object = IPv4Network(str(self.ip_object)+'/32',
strict=False)
+ return None
else:
raise ValueError(
"IPv4Obj doesn't understand how to parse {0}".format(arg))
@@ -249,6 +253,16 @@
self.__repr__(), val)
raise ValueError(errmsg)
+ def __add__(self, val):
+ """Add an integer to IPv4Obj() and return an integer"""
+ assert isinstance(val, int)
+ return self.as_decimal + val
+
+ def __sub__(self, val):
+ """Subtract an integer from IPv4Obj() and return an integer"""
+ assert isinstance(val, int)
+ return self.as_decimal - val
+
def __contains__(self, val):
# Used for "foo in bar"... python calls bar.__contains__(foo)
try:
@@ -304,6 +318,16 @@
return self.prefixlen
@property
+ def exploded(self):
+ """Returns the IPv4 object in exploded form"""
+ return self.ip_object.exploded
+
+ @property
+ def packed(self):
+ """Returns the IPv4 object in packed binary form"""
+ return self.ip_object.packed
+
+ @property
def broadcast(self):
"""Returns the broadcast address as an IPv4Address object."""
if sys.version_info[0] < 3:
@@ -449,6 +473,11 @@
self.network_object = IPv6Network(str(arg)+'/128')
self.ip_object = IPv6Address(str(arg).split('/')[0])
return None
+ elif isinstance(arg, int):
+ self.ip_object = IPv6Address(arg)
+ self.network_object = IPv6Network(str(self.ip_object)+'/128',
+ strict=False)
+ return None
else:
raise ValueError(
"IPv6Obj doesn't understand how to parse {0}".format(arg))
@@ -513,6 +542,16 @@
self.__repr__(), val)
raise ValueError(errmsg)
+ def __add__(self, val):
+ """Add an integer to IPv6Obj() and return an integer"""
+ assert isinstance(val, int)
+ return self.as_decimal + val
+
+ def __sub__(self, val):
+ """Subtract an integer from IPv6Obj() and return an integer"""
+ assert isinstance(val, int)
+ return self.as_decimal - val
+
def __contains__(self, val):
# Used for "foo in bar"... python calls bar.__contains__(foo)
try:
@@ -523,9 +562,10 @@
# val, this object cannot contain val
return False
else:
+ # NOTE: We cannot use the same algorithm as
IPv4Obj.__contains__() because IPv6Obj doesn't have .broadcast
#return (val.network in self.network)
return (self.network<=val.network) and \
- (self.broadcast>=val.broadcast)
+
((self.as_decimal+self.numhosts-1)>=(val.as_decimal+val.numhosts-1))
except (Exception) as e:
raise ValueError(
@@ -575,12 +615,12 @@
@property
def exploded(self):
"""Returns the IPv6 object in exploded form"""
- return self.network_object.exploded
+ return self.ip_object.exploded
@property
def packed(self):
- """Returns the IPv6 object in packed form"""
- return self.network_object.packed
+ """Returns the IPv6 object in packed binary form"""
+ return self.ip_object.packed
@property
def broadcast(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ciscoconfparse-1.5.1/ciscoconfparse/version
new/ciscoconfparse-1.5.3/ciscoconfparse/version
--- old/ciscoconfparse-1.5.1/ciscoconfparse/version 2020-02-20
09:30:18.000000000 +0100
+++ new/ciscoconfparse-1.5.3/ciscoconfparse/version 2020-04-12
17:53:15.000000000 +0200
@@ -1 +1 @@
-1.5.1
+1.5.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ciscoconfparse-1.5.1/ciscoconfparse.egg-info/PKG-INFO
new/ciscoconfparse-1.5.3/ciscoconfparse.egg-info/PKG-INFO
--- old/ciscoconfparse-1.5.1/ciscoconfparse.egg-info/PKG-INFO 2020-02-20
09:34:55.000000000 +0100
+++ new/ciscoconfparse-1.5.3/ciscoconfparse.egg-info/PKG-INFO 2020-04-12
17:56:05.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: ciscoconfparse
-Version: 1.5.1
+Version: 1.5.3
Summary: Parse, Audit, Query, Build, and Modify Cisco IOS-style configurations
Home-page: http://www.pennington.net/py/ciscoconfparse/
Author: David Michael Pennington