forked from pool/python-junos-eznc
- Update to 2.7.2:
* Enhancements done
+ Introduced bind_addr parameter in Device() API #1279
+ Introduced vmhost paramater in dev.facts #1333
+ Introduced hostkey_verify paramater in Device() API #1321
* Bugs Fixed
+ Fixed the missing key to EthernetSwitchingTable #1228
+ Fixed error handling on HelloHandler #1339
+ Fixed the version check #1338
+ Removed Google and Stackflow link from the ReadME #1337
+ Fixed SystemStorageTable tables and views to handles multiple
routing-engine file system storage information.#1244
+ Fixed Console' object has no attribute '_use_filter' error when
executed Table/View script #1335
+ Fixed cli function to get full RPC response #1315
+ Fixed sw.install to set no_validate option when validate=False for
NSSU and ISSU upgrade #1323
+ Fixed UT framework mock to use built-in unittest.mock #1311
+ Fixed specific VC member reboot handling #1308 #1310
+ Supported latest paramiko version which supports aes128-gcm and
aes256-gcm cipher
- Dropped patches:
* python-311.patch
* python-junos-eznc-no-mock.patch
- Refreshed all other patches.
- Switch to pyproject macros.
- Use nose2 to run the testsuite, like upstream.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-junos-eznc?expand=0&rev=32
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
597
no-six.patch
Normal file
597
no-six.patch
Normal file
@@ -0,0 +1,597 @@
|
||||
Index: py-junos-eznc-2.7.2/lib/jnpr/junos/jxml.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/lib/jnpr/junos/jxml.py
|
||||
+++ py-junos-eznc-2.7.2/lib/jnpr/junos/jxml.py
|
||||
@@ -1,7 +1,6 @@
|
||||
from ncclient import manager
|
||||
from ncclient.xml_ import NCElement
|
||||
from lxml import etree
|
||||
-import six
|
||||
|
||||
"""
|
||||
These are Junos XML 'helper' definitions use for generic XML processing
|
||||
@@ -226,8 +225,7 @@ def cscript_conf(reply):
|
||||
|
||||
|
||||
# xslt to remove prefix like junos:ns
|
||||
-strip_namespaces_prefix = six.b(
|
||||
- """<?xml version="1.0" encoding="UTF-8" ?>
|
||||
+strip_namespaces_prefix = b"""<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
<xsl:output method="xml" indent="no" omit-xml-declaration="no" />
|
||||
|
||||
@@ -249,4 +247,3 @@ strip_namespaces_prefix = six.b(
|
||||
</xsl:attribute>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>"""
|
||||
-)
|
||||
Index: py-junos-eznc-2.7.2/lib/jnpr/junos/transport/tty_netconf.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/lib/jnpr/junos/transport/tty_netconf.py
|
||||
+++ py-junos-eznc-2.7.2/lib/jnpr/junos/transport/tty_netconf.py
|
||||
@@ -11,23 +11,22 @@ from lxml.etree import XMLSyntaxError
|
||||
from datetime import datetime, timedelta
|
||||
from ncclient.operations.rpc import RPCReply, RPCError
|
||||
from ncclient.xml_ import to_ele
|
||||
-import six
|
||||
from ncclient.transport.session import HelloHandler
|
||||
|
||||
|
||||
class PY6:
|
||||
- NEW_LINE = six.b("\n")
|
||||
- EMPTY_STR = six.b("")
|
||||
- NETCONF_EOM = six.b("]]>]]>")
|
||||
- STARTS_WITH = six.b("<!--")
|
||||
+ NEW_LINE = b"\n"
|
||||
+ EMPTY_STR = b""
|
||||
+ NETCONF_EOM = b"]]>]]>"
|
||||
+ STARTS_WITH = b"<!--"
|
||||
|
||||
|
||||
__all__ = ["xmlmode_netconf"]
|
||||
|
||||
-_NETCONF_EOM = six.b("]]>]]>")
|
||||
-_xmlns = re.compile(six.b("xmlns=[^>]+"))
|
||||
+_NETCONF_EOM = b"]]>]]>"
|
||||
+_xmlns = re.compile(b"xmlns=[^>]+")
|
||||
_xmlns_strip = lambda text: _xmlns.sub(PY6.EMPTY_STR, text)
|
||||
-_junosns = re.compile(six.b("junos:"))
|
||||
+_junosns = re.compile(b"junos:")
|
||||
_junosns_strip = lambda text: _junosns.sub(PY6.EMPTY_STR, text)
|
||||
|
||||
logger = logging.getLogger("jnpr.junos.tty_netconf")
|
||||
@@ -118,7 +117,7 @@ class tty_netconf(object):
|
||||
"""
|
||||
if not cmd.startswith("<"):
|
||||
cmd = "<{}/>".format(cmd)
|
||||
- rpc = six.b("<rpc>{}</rpc>".format(cmd))
|
||||
+ rpc = "<rpc>{}</rpc>".format(cmd).encode('utf-8')
|
||||
logger.info("Calling rpc: %s" % rpc)
|
||||
self._tty.rawwrite(rpc)
|
||||
|
||||
Index: py-junos-eznc-2.7.2/lib/jnpr/junos/transport/tty_ssh.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/lib/jnpr/junos/transport/tty_ssh.py
|
||||
+++ py-junos-eznc-2.7.2/lib/jnpr/junos/transport/tty_ssh.py
|
||||
@@ -6,7 +6,6 @@ import sys
|
||||
from time import sleep, time
|
||||
|
||||
import paramiko
|
||||
-import six
|
||||
|
||||
from jnpr.junos.transport.tty import Terminal
|
||||
|
||||
@@ -15,14 +14,14 @@ logger = logging.getLogger("jnpr.junos.t
|
||||
# -------------------------------------------------------------------------
|
||||
# Terminal connection over SSH CONSOLE
|
||||
# -------------------------------------------------------------------------
|
||||
-_PROMPT = re.compile(six.b("|").join([six.b(i) for i in Terminal._RE_PAT]))
|
||||
+_PROMPT = re.compile(b"|".join([i.encode('utf-8') for i in Terminal._RE_PAT]))
|
||||
|
||||
|
||||
class PY6:
|
||||
- NEW_LINE = six.b("\n")
|
||||
- EMPTY_STR = six.b("")
|
||||
- NETCONF_EOM = six.b("]]>]]>")
|
||||
- IN_USE = six.b("in use")
|
||||
+ NEW_LINE = b"\n"
|
||||
+ EMPTY_STR = b""
|
||||
+ NETCONF_EOM = b"]]>]]>"
|
||||
+ IN_USE = b"in use"
|
||||
|
||||
|
||||
class SSH(Terminal):
|
||||
@@ -136,7 +135,7 @@ class SSH(Terminal):
|
||||
def write(self, content):
|
||||
"""write content + <ENTER>"""
|
||||
logger.debug("Write: %s" % content)
|
||||
- self._ssh.sendall(six.b((content + "\n")))
|
||||
+ self._ssh.sendall(bytes(content + "\n", 'utf-8'))
|
||||
|
||||
def rawwrite(self, content):
|
||||
"""write content as-is"""
|
||||
@@ -152,13 +151,13 @@ class SSH(Terminal):
|
||||
if sys.version >= "3":
|
||||
content = content.decode("utf-8")
|
||||
for char in content:
|
||||
- self._ssh.sendall(six.b(char))
|
||||
+ self._ssh.sendall(bchar)
|
||||
wtime = 10 / float(self.baud)
|
||||
sleep(wtime) # do not remove
|
||||
|
||||
def read(self):
|
||||
"""read a single line"""
|
||||
- rxb = six.b("")
|
||||
+ rxb = b""
|
||||
while True:
|
||||
data = self._ssh.recv(self.RECVSZ)
|
||||
if data is None or len(data) <= 0:
|
||||
@@ -180,7 +179,7 @@ class SSH(Terminal):
|
||||
regular-expression group. If a timeout occurs, then return
|
||||
the tuple(None,None).
|
||||
"""
|
||||
- rxb = six.b("")
|
||||
+ rxb = b""
|
||||
timeout = time() + self.READ_PROMPT_DELAY
|
||||
|
||||
while time() < timeout:
|
||||
@@ -199,7 +198,7 @@ class SSH(Terminal):
|
||||
return rxb, found.lastgroup
|
||||
|
||||
def _read_until(self, match, timeout=None):
|
||||
- rxb = six.b("")
|
||||
+ rxb = b""
|
||||
timeout = time() + self.READ_PROMPT_DELAY
|
||||
|
||||
while time() < timeout:
|
||||
Index: py-junos-eznc-2.7.2/lib/jnpr/junos/transport/tty_telnet.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/lib/jnpr/junos/transport/tty_telnet.py
|
||||
+++ py-junos-eznc-2.7.2/lib/jnpr/junos/transport/tty_telnet.py
|
||||
@@ -2,7 +2,6 @@ from time import sleep
|
||||
import telnetlib
|
||||
import logging
|
||||
import sys
|
||||
-import six
|
||||
|
||||
from jnpr.junos.transport.tty import Terminal
|
||||
|
||||
@@ -14,10 +13,10 @@ logger = logging.getLogger("jnpr.junos.t
|
||||
|
||||
|
||||
class PY6:
|
||||
- NEW_LINE = six.b("\n")
|
||||
- EMPTY_STR = six.b("")
|
||||
- NETCONF_EOM = six.b("]]>]]>")
|
||||
- IN_USE = six.b("in use")
|
||||
+ NEW_LINE = b"\n"
|
||||
+ EMPTY_STR = b""
|
||||
+ NETCONF_EOM = b"]]>]]>"
|
||||
+ IN_USE = b"in use"
|
||||
|
||||
|
||||
class Telnet(Terminal):
|
||||
@@ -81,7 +80,7 @@ class Telnet(Terminal):
|
||||
def write(self, content):
|
||||
"""write content + <ENTER>"""
|
||||
logger.debug("Write: %s" % content)
|
||||
- self._tn.write(six.b((content + "\n")))
|
||||
+ self._tn.write(bytes(content + "\n", 'utf-8'))
|
||||
|
||||
def rawwrite(self, content):
|
||||
"""write content as-is"""
|
||||
@@ -97,7 +96,7 @@ class Telnet(Terminal):
|
||||
if sys.version >= "3":
|
||||
content = content.decode("utf-8")
|
||||
for char in content:
|
||||
- self._tn.write(six.b(char))
|
||||
+ self._tn.write(char.encode("utf-8"))
|
||||
wtime = 10 / float(self.baud)
|
||||
sleep(wtime) # do not remove
|
||||
|
||||
@@ -106,7 +105,7 @@ class Telnet(Terminal):
|
||||
return self._tn.read_until(PY6.NEW_LINE, self.EXPECT_TIMEOUT)
|
||||
|
||||
def read_prompt(self):
|
||||
- _RE_PAT = [six.b(i) for i in Terminal._RE_PAT]
|
||||
+ _RE_PAT = [i.encode('utf-8') for i in Terminal._RE_PAT]
|
||||
got = self._tn.expect(_RE_PAT, self.EXPECT_TIMEOUT)
|
||||
if PY6.IN_USE in got[2]:
|
||||
raise RuntimeError("open_fail: port already in use")
|
||||
Index: py-junos-eznc-2.7.2/lib/jnpr/junos/transport/tty_serial.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/lib/jnpr/junos/transport/tty_serial.py
|
||||
+++ py-junos-eznc-2.7.2/lib/jnpr/junos/transport/tty_serial.py
|
||||
@@ -1,6 +1,5 @@
|
||||
import serial
|
||||
import re
|
||||
-import six
|
||||
from time import sleep
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
@@ -10,7 +9,7 @@ from jnpr.junos.transport.tty import Ter
|
||||
# Terminal connection over SERIAL CONSOLE
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
-_PROMPT = re.compile(six.b("|").join([six.b(i) for i in Terminal._RE_PAT]))
|
||||
+_PROMPT = re.compile(b"|".join([i.encode('utf-8') for i in Terminal._RE_PAT]))
|
||||
|
||||
|
||||
class Serial(Terminal):
|
||||
@@ -56,7 +55,7 @@ class Serial(Terminal):
|
||||
|
||||
def write(self, content):
|
||||
"""write content + <RETURN>"""
|
||||
- self._ser.write(six.b(content + "\n"))
|
||||
+ self._ser.write(bytes(content + "\n", 'utf-8'))
|
||||
self._ser.flush()
|
||||
|
||||
def rawwrite(self, content):
|
||||
@@ -75,7 +74,7 @@ class Serial(Terminal):
|
||||
regular-expression group. If a timeout occurs, then return
|
||||
the tuple(None,None).
|
||||
"""
|
||||
- rxb = six.b("")
|
||||
+ rxb = b""
|
||||
mark_start = datetime.now()
|
||||
mark_end = mark_start + timedelta(seconds=self.EXPECT_TIMEOUT)
|
||||
|
||||
Index: py-junos-eznc-2.7.2/tests/unit/test_console.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/tests/unit/test_console.py
|
||||
+++ py-junos-eznc-2.7.2/tests/unit/test_console.py
|
||||
@@ -9,7 +9,6 @@ import re
|
||||
import sys
|
||||
import os
|
||||
from lxml import etree
|
||||
-import six
|
||||
import socket
|
||||
|
||||
from jnpr.junos.console import Console
|
||||
@@ -40,16 +39,16 @@ class TestConsole(unittest.TestCase):
|
||||
def setUp(self, mock_write, mock_expect, mock_open):
|
||||
tty_netconf.open = MagicMock()
|
||||
mock_expect.side_effect = [
|
||||
- (1, re.search(r"(?P<login>ogin:\s*$)", "login: "), six.b("\r\r\n ogin:")),
|
||||
+ (1, re.search(r"(?P<login>ogin:\s*$)", "login: "), b"\r\r\n ogin:"),
|
||||
(
|
||||
2,
|
||||
re.search(r"(?P<passwd>assword:\s*$)", "password: "),
|
||||
- six.b("\r\r\n password:"),
|
||||
+ b"\r\r\n password:",
|
||||
),
|
||||
(
|
||||
3,
|
||||
re.search(r"(?P<shell>%|#\s*$)", "junos % "),
|
||||
- six.b("\r\r\nroot@device:~ # "),
|
||||
+ b"\r\r\nroot@device:~ # ",
|
||||
),
|
||||
]
|
||||
self.dev = Console(host="1.1.1.1", user="lab", password="lab123", mode="Telnet")
|
||||
@@ -87,16 +86,16 @@ class TestConsole(unittest.TestCase):
|
||||
def test_login_bad_password(self, mock_write, mock_expect, mock_open):
|
||||
tty_netconf.open = MagicMock()
|
||||
mock_expect.side_effect = [
|
||||
- (1, re.search(r"(?P<login>ogin:\s*$)", "login: "), six.b("\r\r\n ogin:")),
|
||||
+ (1, re.search(r"(?P<login>ogin:\s*$)", "login: "), b"\r\r\n ogin:"),
|
||||
(
|
||||
2,
|
||||
re.search(r"(?P<passwd>assword:\s*$)", "password: "),
|
||||
- six.b("\r\r\n password:"),
|
||||
+ b"\r\r\n password:",
|
||||
),
|
||||
(
|
||||
3,
|
||||
re.search("(?P<badpasswd>ogin incorrect)", "login incorrect"),
|
||||
- six.b("\r\r\nlogin incorrect"),
|
||||
+ b"\r\r\nlogin incorrect",
|
||||
),
|
||||
]
|
||||
self.dev = Console(host="1.1.1.1", user="lab", password="lab123", mode="Telnet")
|
||||
@@ -110,16 +109,16 @@ class TestConsole(unittest.TestCase):
|
||||
tty_netconf.open = MagicMock()
|
||||
|
||||
mock_expect.side_effect = [
|
||||
- (1, re.search(r"(?P<login>ogin:\s*$)", "login: "), six.b("\r\r\n ogin:")),
|
||||
+ (1, re.search(r"(?P<login>ogin:\s*$)", "login: "), b"\r\r\n ogin:"),
|
||||
(
|
||||
2,
|
||||
re.search(r"(?P<passwd>assword:\s*$)", "password: "),
|
||||
- six.b("\r\r\n password:"),
|
||||
+ b"\r\r\n password:",
|
||||
),
|
||||
(
|
||||
3,
|
||||
re.search(r"(?P<shell>%|#\s*$)", "junos % "),
|
||||
- six.b("\r\r\nroot@device:~ # "),
|
||||
+ b"\r\r\nroot@device:~ # ",
|
||||
),
|
||||
]
|
||||
with Console(
|
||||
@@ -175,9 +174,9 @@ class TestConsole(unittest.TestCase):
|
||||
def test_console_serial(self, mock_write, mock_expect, mock_open):
|
||||
tty_netconf.open = MagicMock()
|
||||
mock_expect.side_effect = [
|
||||
- six.b("\r\r\n Login:"),
|
||||
- six.b("\r\r\n password:"),
|
||||
- six.b("\r\r\nroot@device:~ # "),
|
||||
+ b"\r\r\n Login:",
|
||||
+ b"\r\r\n password:",
|
||||
+ b"\r\r\nroot@device:~ # ",
|
||||
]
|
||||
self.dev = Console(host="1.1.1.1", user="lab", password="lab123", mode="serial")
|
||||
self.dev.open()
|
||||
@@ -258,15 +257,13 @@ class TestConsole(unittest.TestCase):
|
||||
</policy-statement>
|
||||
</policy-options>"""
|
||||
|
||||
- mock_read_until.return_value = six.b(
|
||||
- """
|
||||
+ mock_read_until.return_value = b"""
|
||||
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/15.2I0/junos">
|
||||
<load-configuration-results>
|
||||
<ok/>
|
||||
</load-configuration-results>
|
||||
</rpc-reply>
|
||||
]]>]]>"""
|
||||
- )
|
||||
cu = Config(self.dev)
|
||||
op = cu.load(xml, format="xml")
|
||||
cu.commit()
|
||||
Index: py-junos-eznc-2.7.2/tests/unit/transport/test_serial.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/tests/unit/transport/test_serial.py
|
||||
+++ py-junos-eznc-2.7.2/tests/unit/transport/test_serial.py
|
||||
@@ -5,7 +5,6 @@ except ImportError:
|
||||
import nose2
|
||||
from unittest.mock import MagicMock, patch
|
||||
import sys
|
||||
-import six
|
||||
|
||||
from jnpr.junos.console import Console
|
||||
|
||||
@@ -90,12 +89,9 @@ class TestSerialWin(unittest.TestCase):
|
||||
("shell", "shell"),
|
||||
]
|
||||
mock_serial_read.side_effect = [
|
||||
- six.b(
|
||||
- "<!-- No zombies were killed during the creation of this user interface -->"
|
||||
- ),
|
||||
- six.b(""),
|
||||
- six.b(
|
||||
- """<!-- user root, class super-user -->
|
||||
+ b"<!-- No zombies were killed during the creation of this user interface -->",
|
||||
+ b"",
|
||||
+ b"""<!-- user root, class super-user -->
|
||||
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
|
||||
<capabilities>
|
||||
<capability>urn:ietf:params:netconf:base:1.0</capability>
|
||||
@@ -114,9 +110,8 @@ class TestSerialWin(unittest.TestCase):
|
||||
</capabilities>
|
||||
<session-id>7478</session-id>
|
||||
</hello>
|
||||
-]]>]]>"""
|
||||
- ),
|
||||
- six.b(""),
|
||||
+]]>]]>""",
|
||||
+ b"",
|
||||
]
|
||||
self.dev.open()
|
||||
|
||||
@@ -144,7 +139,7 @@ class TestSerialWin(unittest.TestCase):
|
||||
self.dev._tty.read = MagicMock()
|
||||
self.dev._tty.rawwrite = MagicMock()
|
||||
self.dev._tty.read.side_effect = [
|
||||
- six.b(
|
||||
+ bytes(
|
||||
'<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"'
|
||||
' xmlns:junos="http://xml.juniper.net/junos/15.1X49/junos">'
|
||||
'<route-engine-information xmlns="http://xml.juniper.net/ju'
|
||||
@@ -170,7 +165,8 @@ class TestSerialWin(unittest.TestCase):
|
||||
"-reason><load-average-one>0.12</load-average-one><load-ave"
|
||||
"rage-five>0.08</load-average-five><load-average-fifteen>0."
|
||||
"06</load-average-fifteen></route-engine></route-engine-inf"
|
||||
- "ormation></rpc-reply>]]>]]>"
|
||||
+ "ormation></rpc-reply>]]>]]>",
|
||||
+ 'utf-8'
|
||||
)
|
||||
]
|
||||
res = self.dev.rpc.get_route_engine_information()
|
||||
Index: py-junos-eznc-2.7.2/tests/unit/transport/test_tty_netconf.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/tests/unit/transport/test_tty_netconf.py
|
||||
+++ py-junos-eznc-2.7.2/tests/unit/transport/test_tty_netconf.py
|
||||
@@ -7,7 +7,6 @@ from unittest.mock import MagicMock, pat
|
||||
|
||||
from jnpr.junos.transport.tty_netconf import tty_netconf
|
||||
|
||||
-import six
|
||||
import os
|
||||
import select
|
||||
import socket
|
||||
@@ -43,7 +42,7 @@ class TestTTYNetconf(unittest.TestCase):
|
||||
@patch("jnpr.junos.transport.tty_netconf.timedelta")
|
||||
def test_open_RuntimeError(self, mock_delta, mock_rcv):
|
||||
mock_rcv.return_value = "]]>]]>"
|
||||
- self.tty_net._tty.read.return_value = six.b("testing")
|
||||
+ self.tty_net._tty.read.return_value = b"testing"
|
||||
from datetime import timedelta
|
||||
|
||||
mock_delta.return_value = timedelta(seconds=0.5)
|
||||
@@ -56,7 +55,7 @@ class TestTTYNetconf(unittest.TestCase):
|
||||
mock_rcv.return_value = "]]>]]>"
|
||||
self.tty_net.rpc("get-interface-information")
|
||||
self.tty_net._tty.rawwrite.assert_called_with(
|
||||
- six.b("<rpc><get-interface-information/></rpc>")
|
||||
+ b"<rpc><get-interface-information/></rpc>"
|
||||
)
|
||||
|
||||
@patch("jnpr.junos.transport.tty_netconf.tty_netconf._receive")
|
||||
@@ -103,7 +102,7 @@ class TestTTYNetconf(unittest.TestCase):
|
||||
@patch("jnpr.junos.transport.tty_netconf.select.select")
|
||||
def test_tty_netconf_receive_empty_line(self, mock_select):
|
||||
rx = MagicMock()
|
||||
- rx.read_until.side_effect = iter([six.b(""), six.b("]]>]]>")])
|
||||
+ rx.read_until.side_effect = iter([b"", b"]]>]]>"])
|
||||
mock_select.return_value = ([rx], [], [])
|
||||
self.assertEqual(self.tty_net._receive().tag, "error-in-receive")
|
||||
|
||||
@@ -117,7 +116,7 @@ class TestTTYNetconf(unittest.TestCase):
|
||||
@patch("jnpr.junos.transport.tty_netconf.select.select")
|
||||
def test_tty_netconf_receive_splited_eom(self, mock_select):
|
||||
rx = MagicMock()
|
||||
- rx.read_until.side_effect = iter([six.b(i) for i in ["testing]", "]>", "]]>"]])
|
||||
+ rx.read_until.side_effect = iter([i.encode('utf-8') for i in ["testing]", "]>", "]]>"]])
|
||||
mock_select.return_value = ([rx], [], [])
|
||||
self.assertEqual(self.tty_net._receive().tag, "error-in-receive")
|
||||
|
||||
@@ -126,30 +125,30 @@ class TestTTYNetconf(unittest.TestCase):
|
||||
rx = MagicMock()
|
||||
|
||||
rx.read_until.side_effect = iter(
|
||||
- [six.b("<rpc-reply>ok<dummy></rpc-reply>"), six.b("\n]]>]]>")]
|
||||
+ [b"<rpc-reply>ok<dummy></rpc-reply>", b"\n]]>]]>"]
|
||||
)
|
||||
mock_select.return_value = ([rx], [], [])
|
||||
self.assertEqual(
|
||||
- self.tty_net._receive(), six.b("<rpc-reply>ok<dummy/></rpc-reply>")
|
||||
+ self.tty_net._receive(), b"<rpc-reply>ok<dummy/></rpc-reply>"
|
||||
)
|
||||
|
||||
@patch("jnpr.junos.transport.tty_netconf.select.select")
|
||||
def test_tty_netconf_receive_XMLSyntaxError_eom_in_center(self, mock_select):
|
||||
rx = MagicMock()
|
||||
rx.read_until.side_effect = iter(
|
||||
- [six.b("<rpc-reply>ok</rpc-reply>"), six.b("]]>]]>\ndummy")]
|
||||
+ [b"<rpc-reply>ok</rpc-reply>", b"]]>]]>\ndummy"]
|
||||
)
|
||||
mock_select.return_value = ([rx], [], [])
|
||||
- self.assertEqual(self.tty_net._receive(), six.b("<rpc-reply>ok</rpc-reply>"))
|
||||
+ self.assertEqual(self.tty_net._receive(), b"<rpc-reply>ok</rpc-reply>")
|
||||
|
||||
@patch("jnpr.junos.transport.tty_netconf.select.select")
|
||||
def test_tty_netconf_receive_xmn_error(self, mock_select):
|
||||
rx = MagicMock()
|
||||
rx.read_until.side_effect = iter(
|
||||
[
|
||||
- six.b("<message>ok</message>"),
|
||||
- six.b("\n</xnm:error>\n"),
|
||||
- six.b("]]>]]>\ndummy"),
|
||||
+ b"<message>ok</message>",
|
||||
+ b"\n</xnm:error>\n",
|
||||
+ b"]]>]]>\ndummy",
|
||||
]
|
||||
)
|
||||
mock_select.return_value = ([rx], [], [])
|
||||
Index: py-junos-eznc-2.7.2/tests/unit/transport/test_tty_telnet.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/tests/unit/transport/test_tty_telnet.py
|
||||
+++ py-junos-eznc-2.7.2/tests/unit/transport/test_tty_telnet.py
|
||||
@@ -7,7 +7,6 @@ except ImportError:
|
||||
import nose2
|
||||
from unittest.mock import MagicMock, patch
|
||||
from jnpr.junos.transport.tty_telnet import Telnet
|
||||
-import six
|
||||
|
||||
|
||||
class TestTTYTelnet(unittest.TestCase):
|
||||
@@ -62,7 +61,7 @@ class TestTTYTelnet(unittest.TestCase):
|
||||
self.tel_conn._tn.expect.return_value = (
|
||||
None,
|
||||
None,
|
||||
- six.b("port already in use"),
|
||||
+ b"port already in use",
|
||||
)
|
||||
self.assertRaises(RuntimeError, self.tel_conn._login_state_machine)
|
||||
|
||||
Index: py-junos-eznc-2.7.2/lib/jnpr/junos/device.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/lib/jnpr/junos/device.py
|
||||
+++ py-junos-eznc-2.7.2/lib/jnpr/junos/device.py
|
||||
@@ -1,6 +1,5 @@
|
||||
# stdlib
|
||||
import os
|
||||
-import six
|
||||
import types
|
||||
import platform
|
||||
import warnings
|
||||
@@ -659,7 +658,7 @@ class _Connection(object):
|
||||
command = command.strip()
|
||||
# Get the equivalent RPC
|
||||
rpc = self.display_xml_rpc(command)
|
||||
- if isinstance(rpc, six.string_types):
|
||||
+ if isinstance(rpc, str):
|
||||
# No RPC is available.
|
||||
return None
|
||||
rpc_string = "rpc.%s(" % (rpc.tag.replace("-", "_"))
|
||||
Index: py-junos-eznc-2.7.2/lib/jnpr/junos/utils/start_shell.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/lib/jnpr/junos/utils/start_shell.py
|
||||
+++ py-junos-eznc-2.7.2/lib/jnpr/junos/utils/start_shell.py
|
||||
@@ -3,7 +3,6 @@ import re
|
||||
import datetime
|
||||
from jnpr.junos.utils.ssh_client import open_ssh_client
|
||||
import subprocess
|
||||
-import six
|
||||
from threading import Thread
|
||||
import time
|
||||
|
||||
Index: py-junos-eznc-2.7.2/requirements.txt
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/requirements.txt
|
||||
+++ py-junos-eznc-2.7.2/requirements.txt
|
||||
@@ -5,7 +5,6 @@ scp>=0.7.0
|
||||
jinja2>=2.7.1
|
||||
PyYAML>=5.1
|
||||
paramiko>=3.5.0
|
||||
-six
|
||||
pyserial
|
||||
pyparsing
|
||||
transitions
|
||||
Index: py-junos-eznc-2.7.2/tests/unit/facts/test_swver.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/tests/unit/facts/test_swver.py
|
||||
+++ py-junos-eznc-2.7.2/tests/unit/facts/test_swver.py
|
||||
@@ -1,8 +1,6 @@
|
||||
__author__ = "Stacy Smith"
|
||||
__credits__ = "Jeremy Schulman, Nitin Kumar"
|
||||
|
||||
-import six
|
||||
-
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except:
|
||||
@@ -13,9 +11,6 @@ from jnpr.junos.facts.swver import versi
|
||||
|
||||
|
||||
class TestVersionInfo(unittest.TestCase):
|
||||
- if six.PY2:
|
||||
- assertCountEqual = unittest.TestCase.assertItemsEqual
|
||||
-
|
||||
def test_version_info_after_type_len_else(self):
|
||||
self.assertEqual(version_info("12.1X46-D10").build, None)
|
||||
|
||||
Index: py-junos-eznc-2.7.2/tests/unit/utils/test_scp.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/tests/unit/utils/test_scp.py
|
||||
+++ py-junos-eznc-2.7.2/tests/unit/utils/test_scp.py
|
||||
@@ -1,5 +1,5 @@
|
||||
import sys
|
||||
-from six import StringIO
|
||||
+from io import StringIO
|
||||
from contextlib import contextmanager
|
||||
|
||||
import unittest
|
||||
Index: py-junos-eznc-2.7.2/tests/unit/utils/test_sw.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/tests/unit/utils/test_sw.py
|
||||
+++ py-junos-eznc-2.7.2/tests/unit/utils/test_sw.py
|
||||
@@ -1,7 +1,7 @@
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import sys
|
||||
-from six import StringIO
|
||||
+from io import StringIO
|
||||
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
33
python-311.patch
Normal file
33
python-311.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
Index: py-junos-eznc-2.7.0/lib/jnpr/junos/device.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/lib/jnpr/junos/device.py
|
||||
+++ py-junos-eznc-2.7.0/lib/jnpr/junos/device.py
|
||||
@@ -43,6 +43,12 @@ from jnpr.junos.exception import JSONLoa
|
||||
from ncclient.operations.third_party.juniper.rpc import ExecuteRpc
|
||||
import inspect
|
||||
|
||||
+# Python 3.11 compatibility
|
||||
+# gh#Juniper/py-junos-eznc#1236
|
||||
+if not hasattr(inspect, "getargspec"):
|
||||
+ inspect.getargspec = inspect.getfullargspec
|
||||
+
|
||||
+
|
||||
if sys.version_info[0] >= 3:
|
||||
NCCLIENT_FILTER_XML = len(inspect.signature(ExecuteRpc.request).parameters) == 3
|
||||
else:
|
||||
Index: py-junos-eznc-2.7.0/lib/jnpr/junos/utils/scp.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/lib/jnpr/junos/utils/scp.py
|
||||
+++ py-junos-eznc-2.7.0/lib/jnpr/junos/utils/scp.py
|
||||
@@ -1,6 +1,11 @@
|
||||
from __future__ import absolute_import
|
||||
import inspect
|
||||
|
||||
+# Python 3.11 compatibility
|
||||
+# gh#Juniper/py-junos-eznc#1236
|
||||
+if not hasattr(inspect, "getargspec"):
|
||||
+ inspect.getargspec = inspect.getfullargspec
|
||||
+
|
||||
from scp import SCPClient
|
||||
from jnpr.junos.utils.ssh_client import open_ssh_client
|
||||
|
||||
3
python-junos-eznc-2.7.1.tar.gz
Normal file
3
python-junos-eznc-2.7.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c584ffe63b1c4e7d2f9313291a92cce3110997f51eb5c056e12ab7dcf9b497e5
|
||||
size 589560
|
||||
3
python-junos-eznc-2.7.2.tar.gz
Normal file
3
python-junos-eznc-2.7.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:24baccdce1ed147c732e2fc9d0c675a6f6c46e757201ac7aa0eba14e0959a3c2
|
||||
size 590993
|
||||
611
python-junos-eznc-no-mock.patch
Normal file
611
python-junos-eznc-no-mock.patch
Normal file
@@ -0,0 +1,611 @@
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/factory/test_cfgtable.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/factory/test_cfgtable.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/factory/test_cfgtable.py
|
||||
@@ -13,7 +13,7 @@ from jnpr.junos import Device
|
||||
from ncclient.manager import Manager, make_device_handler
|
||||
from ncclient.transport import SSHSession
|
||||
from lxml import etree
|
||||
-from mock import MagicMock, patch
|
||||
+from unittest.mock import MagicMock, patch
|
||||
|
||||
from jnpr.junos.factory import loadyaml
|
||||
from jnpr.junos.factory.factory_loader import FactoryLoader
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/factory/test_cmdtable.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/factory/test_cmdtable.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/factory/test_cmdtable.py
|
||||
@@ -10,7 +10,7 @@ from jnpr.junos.exception import RpcErro
|
||||
|
||||
from ncclient.manager import Manager, make_device_handler
|
||||
from ncclient.transport import SSHSession
|
||||
-from mock import MagicMock, patch
|
||||
+from unittest.mock import MagicMock, patch
|
||||
import yamlloader
|
||||
from jnpr.junos.factory.factory_loader import FactoryLoader
|
||||
import yaml
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/factory/test_factory_loader.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/factory/test_factory_loader.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/factory/test_factory_loader.py
|
||||
@@ -4,7 +4,7 @@ __credits__ = "Jeremy Schulman"
|
||||
import unittest
|
||||
import nose2
|
||||
from jnpr.junos.factory import FactoryLoader
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
|
||||
class TestFactoryLoader(unittest.TestCase):
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/factory/test_optable.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/factory/test_optable.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/factory/test_optable.py
|
||||
@@ -19,7 +19,7 @@ from ncclient.operations.rpc import RPCR
|
||||
|
||||
from lxml import etree
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
|
||||
class TestFactoryOpTable(unittest.TestCase):
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/factory/test_table.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/factory/test_table.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/factory/test_table.py
|
||||
@@ -8,7 +8,7 @@ import os
|
||||
from jnpr.junos import Device
|
||||
from jnpr.junos.factory.table import Table
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
from lxml import etree
|
||||
from jnpr.junos.op.phyport import PhyPortTable
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/factory/test_to_json.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/factory/test_to_json.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/factory/test_to_json.py
|
||||
@@ -5,7 +5,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
import os
|
||||
import json
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/factory/test_view.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/factory/test_view.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/factory/test_view.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman"
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import MagicMock, patch
|
||||
+from unittest.mock import MagicMock, patch
|
||||
from jnpr.junos import Device
|
||||
from jnpr.junos.factory.view import View
|
||||
from jnpr.junos.op.phyport import PhyPortStatsTable, PhyPortStatsView
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_current_re.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_current_re.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_current_re.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
from lxml import etree
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_domain.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_domain.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_domain.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
from lxml import etree
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_ethernet_mac_table.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_ethernet_mac_table.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_ethernet_mac_table.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
from lxml import etree
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_file_list.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_file_list.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_file_list.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
|
||||
from jnpr.junos import Device
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_get_chassis_cluster_status.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_get_chassis_cluster_status.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_get_chassis_cluster_status.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
from lxml import etree
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_get_chassis_inventory.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_get_chassis_inventory.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_get_chassis_inventory.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
|
||||
from jnpr.junos import Device
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_get_route_engine_information.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_get_route_engine_information.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_get_route_engine_information.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
from lxml import etree
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_get_software_information.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_get_software_information.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_get_software_information.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
from lxml import etree
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_get_virtual_chassis_information.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_get_virtual_chassis_information.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_get_virtual_chassis_information.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
import sys
|
||||
from lxml import etree
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_ifd_style.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_ifd_style.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_ifd_style.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
from lxml import etree
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_iri_mapping.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_iri_mapping.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_iri_mapping.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
|
||||
from jnpr.junos import Device
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/facts/test_personality.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/facts/test_personality.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/facts/test_personality.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman, Nitin Ku
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
from jnpr.junos.exception import RpcError
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/ofacts/test_chassis.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/ofacts/test_chassis.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/ofacts/test_chassis.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman"
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
from lxml import etree
|
||||
import os
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/ofacts/test_domain.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/ofacts/test_domain.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/ofacts/test_domain.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman"
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
from lxml import etree
|
||||
|
||||
from jnpr.junos.ofacts.domain import facts_domain
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/ofacts/test_ifd_style.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/ofacts/test_ifd_style.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/ofacts/test_ifd_style.py
|
||||
@@ -2,7 +2,7 @@ __author__ = "Nitin Kumar, Rick Sherman"
|
||||
__credits__ = "Jeremy Schulman"
|
||||
|
||||
import unittest
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
import nose2
|
||||
|
||||
from jnpr.junos import Device
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/ofacts/test_personality.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/ofacts/test_personality.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/ofacts/test_personality.py
|
||||
@@ -2,7 +2,7 @@ __author__ = "Nitin Kumar, Rick Sherman"
|
||||
__credits__ = "Jeremy Schulman"
|
||||
|
||||
import unittest
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
import nose2
|
||||
|
||||
from jnpr.junos import Device
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/ofacts/test_routing_engines.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/ofacts/test_routing_engines.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/ofacts/test_routing_engines.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman"
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
import sys
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/ofacts/test_srx_cluster.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/ofacts/test_srx_cluster.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/ofacts/test_srx_cluster.py
|
||||
@@ -3,7 +3,7 @@ __credits__ = "Jeremy Schulman"
|
||||
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
import os
|
||||
|
||||
from jnpr.junos import Device
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/test_decorators.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/test_decorators.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/test_decorators.py
|
||||
@@ -12,7 +12,7 @@ from jnpr.junos.exception import RpcErro
|
||||
from jnpr.junos.decorators import timeoutDecorator, normalizeDecorator
|
||||
from jnpr.junos.decorators import ignoreWarnDecorator
|
||||
|
||||
-from mock import patch, MagicMock, PropertyMock, call
|
||||
+from unittest.mock import patch, MagicMock, PropertyMock, call
|
||||
|
||||
from ncclient.operations.rpc import RPCError
|
||||
from ncclient.manager import Manager, make_device_handler
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/test_rpcmeta.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/test_rpcmeta.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/test_rpcmeta.py
|
||||
@@ -10,7 +10,7 @@ from ncclient.manager import Manager, ma
|
||||
from ncclient.transport import SSHSession
|
||||
from jnpr.junos.exception import JSONLoadError
|
||||
|
||||
-from mock import patch, MagicMock, call
|
||||
+from unittest.mock import patch, MagicMock, call
|
||||
from lxml import etree
|
||||
|
||||
__author__ = "Nitin Kumar, Rick Sherman"
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/utils/test_config.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/utils/test_config.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/utils/test_config.py
|
||||
@@ -19,7 +19,7 @@ from ncclient.manager import Manager, ma
|
||||
from ncclient.transport import SSHSession
|
||||
from ncclient.operations import RPCError, RPCReply
|
||||
|
||||
-from mock import MagicMock, patch
|
||||
+from unittest.mock import MagicMock, patch
|
||||
from lxml import etree
|
||||
import os
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/utils/test_fs.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/utils/test_fs.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/utils/test_fs.py
|
||||
@@ -9,7 +9,7 @@ from jnpr.junos import Device
|
||||
from jnpr.junos.utils.fs import FS
|
||||
from jnpr.junos.exception import RpcError
|
||||
|
||||
-from mock import patch, MagicMock, call
|
||||
+from unittest.mock import patch, MagicMock, call
|
||||
from lxml import etree
|
||||
|
||||
__author__ = "Nitin Kumar, Rick Sherman"
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/utils/test_ftp.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/utils/test_ftp.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/utils/test_ftp.py
|
||||
@@ -7,7 +7,7 @@ import os
|
||||
from jnpr.junos import Device
|
||||
import jnpr.junos.utils.ftp
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
if sys.version < "3":
|
||||
builtin_string = "__builtin__"
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/utils/test_scp.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/utils/test_scp.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/utils/test_scp.py
|
||||
@@ -8,7 +8,7 @@ import nose2
|
||||
from jnpr.junos import Device
|
||||
from jnpr.junos.utils.scp import SCP
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
__author__ = "Rick Sherman, Nitin Kumar"
|
||||
__credits__ = "Jeremy Schulman"
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/utils/test_start_shell.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/utils/test_start_shell.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/utils/test_start_shell.py
|
||||
@@ -4,7 +4,7 @@ import nose2
|
||||
from jnpr.junos import Device
|
||||
from jnpr.junos.utils.start_shell import StartShell
|
||||
|
||||
-from mock import patch, MagicMock, call
|
||||
+from unittest.mock import patch, MagicMock, call
|
||||
|
||||
__author__ = "Rick Sherman"
|
||||
__credits__ = "Jeremy Schulman, Nitin Kumar"
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/utils/test_sw.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/utils/test_sw.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/utils/test_sw.py
|
||||
@@ -16,7 +16,7 @@ from jnpr.junos.facts.swver import versi
|
||||
from ncclient.manager import Manager, make_device_handler
|
||||
from ncclient.transport import SSHSession
|
||||
from lxml import etree
|
||||
-from mock import patch, MagicMock, call, mock_open
|
||||
+from unittest.mock import patch, MagicMock, call, mock_open
|
||||
|
||||
if sys.version < "3":
|
||||
builtin_string = "__builtin__"
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/utils/test_util.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/utils/test_util.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/utils/test_util.py
|
||||
@@ -7,7 +7,7 @@ import nose2
|
||||
from jnpr.junos import Device
|
||||
from jnpr.junos.utils.util import Util
|
||||
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
|
||||
class TestUtil(unittest.TestCase):
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/__init__.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/__init__.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/__init__.py
|
||||
@@ -2,7 +2,7 @@ import unittest
|
||||
import sys
|
||||
|
||||
import nose2
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
__author__ = "Nitin Kumar"
|
||||
__credits__ = "Jeremy Schulman"
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/ofacts/test_switch_style.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/ofacts/test_switch_style.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/ofacts/test_switch_style.py
|
||||
@@ -2,7 +2,7 @@ __author__ = "Nitin Kumar, Rick Sherman"
|
||||
__credits__ = "Jeremy Schulman"
|
||||
|
||||
import unittest
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
import nose2
|
||||
|
||||
from jnpr.junos import Device
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/ofacts/test_swver.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/ofacts/test_swver.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/ofacts/test_swver.py
|
||||
@@ -6,7 +6,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock
|
||||
+from unittest.mock import patch, MagicMock
|
||||
import os
|
||||
|
||||
from jnpr.junos import Device
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/test_console.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/test_console.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/test_console.py
|
||||
@@ -4,7 +4,7 @@ except ImportError:
|
||||
import unittest
|
||||
from jnpr.junos.utils.config import Config
|
||||
import nose2
|
||||
-from mock import patch, MagicMock, call
|
||||
+from unittest.mock import patch, MagicMock, call
|
||||
import re
|
||||
import sys
|
||||
import os
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/test_device.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/test_device.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/test_device.py
|
||||
@@ -3,7 +3,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import MagicMock, patch, mock_open, call
|
||||
+from unittest.mock import MagicMock, patch, mock_open, call
|
||||
import os
|
||||
from lxml import etree
|
||||
import sys
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/test_factcache.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/test_factcache.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/test_factcache.py
|
||||
@@ -3,7 +3,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import patch, MagicMock, call
|
||||
+from unittest.mock import patch, MagicMock, call
|
||||
from jnpr.junos.exception import FactLoopError
|
||||
|
||||
from jnpr.junos import Device
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/test_junos.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/test_junos.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/test_junos.py
|
||||
@@ -4,7 +4,7 @@ import unittest
|
||||
import sys
|
||||
|
||||
import nose2
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
|
||||
__author__ = "Nitin Kumar"
|
||||
__credits__ = "Jeremy Schulman"
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/test_jxml.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/test_jxml.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/test_jxml.py
|
||||
@@ -2,7 +2,7 @@ import os
|
||||
import unittest
|
||||
from io import StringIO
|
||||
import nose2
|
||||
-from mock import patch
|
||||
+from unittest.mock import patch
|
||||
from jnpr.junos.jxml import (
|
||||
NAME,
|
||||
INSERT,
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/transport/test_serial.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/transport/test_serial.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/transport/test_serial.py
|
||||
@@ -3,7 +3,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import MagicMock, patch
|
||||
+from unittest.mock import MagicMock, patch
|
||||
import sys
|
||||
import six
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/transport/test_tty.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/transport/test_tty.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/transport/test_tty.py
|
||||
@@ -6,7 +6,7 @@ except ImportError:
|
||||
import unittest
|
||||
|
||||
import nose2
|
||||
-from mock import MagicMock, patch
|
||||
+from unittest.mock import MagicMock, patch
|
||||
|
||||
from jnpr.junos.transport.tty import Terminal
|
||||
from jnpr.junos import exception as EzErrors
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/transport/test_tty_netconf.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/transport/test_tty_netconf.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/transport/test_tty_netconf.py
|
||||
@@ -3,7 +3,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import MagicMock, patch
|
||||
+from unittest.mock import MagicMock, patch
|
||||
|
||||
from jnpr.junos.transport.tty_netconf import tty_netconf
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/transport/test_tty_ssh.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/transport/test_tty_ssh.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/transport/test_tty_ssh.py
|
||||
@@ -6,7 +6,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import MagicMock, patch
|
||||
+from unittest.mock import MagicMock, patch
|
||||
from jnpr.junos.transport.tty_ssh import SSH
|
||||
|
||||
|
||||
Index: py-junos-eznc-2.7.0/tests/unit/transport/test_tty_telnet.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.0.orig/tests/unit/transport/test_tty_telnet.py
|
||||
+++ py-junos-eznc-2.7.0/tests/unit/transport/test_tty_telnet.py
|
||||
@@ -5,7 +5,7 @@ try:
|
||||
except ImportError:
|
||||
import unittest
|
||||
import nose2
|
||||
-from mock import MagicMock, patch
|
||||
+from unittest.mock import MagicMock, patch
|
||||
from jnpr.junos.transport.tty_telnet import Telnet
|
||||
import six
|
||||
|
||||
364
python-junos-eznc-remove-yamlordereddictloader.patch
Normal file
364
python-junos-eznc-remove-yamlordereddictloader.patch
Normal file
@@ -0,0 +1,364 @@
|
||||
Index: py-junos-eznc-2.7.2/lib/jnpr/junos/command/__init__.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/lib/jnpr/junos/command/__init__.py
|
||||
+++ py-junos-eznc-2.7.2/lib/jnpr/junos/command/__init__.py
|
||||
@@ -4,7 +4,7 @@ from importlib.abc import Loader, MetaPa
|
||||
from importlib.util import spec_from_loader
|
||||
|
||||
import yaml
|
||||
-import yamlordereddictloader
|
||||
+import yamlloader
|
||||
from jnpr.junos.factory.factory_loader import FactoryLoader
|
||||
|
||||
__all__ = []
|
||||
@@ -32,7 +32,7 @@ class MetaPathLoader(Loader):
|
||||
with open(os.path.join(os.path.dirname(__file__), mod + ".yml"), "r") as stream:
|
||||
try:
|
||||
modules = FactoryLoader().load(
|
||||
- yaml.load(stream, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(stream, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
except yaml.YAMLError as exc:
|
||||
raise ImportError("%s is not loaded" % mod)
|
||||
Index: py-junos-eznc-2.7.2/tests/unit/factory/test_cmdtable.py
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/tests/unit/factory/test_cmdtable.py
|
||||
+++ py-junos-eznc-2.7.2/tests/unit/factory/test_cmdtable.py
|
||||
@@ -11,7 +11,7 @@ from jnpr.junos.exception import RpcErro
|
||||
from ncclient.manager import Manager, make_device_handler
|
||||
from ncclient.transport import SSHSession
|
||||
from unittest.mock import MagicMock, patch
|
||||
-import yamlordereddictloader
|
||||
+import yamlloader
|
||||
from jnpr.junos.factory.factory_loader import FactoryLoader
|
||||
import yaml
|
||||
import json
|
||||
@@ -49,7 +49,7 @@ CMErrorView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = CMErrorTable(self.dev)
|
||||
@@ -84,7 +84,7 @@ sysctlView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = sysctlVeriexecTable(self.dev)
|
||||
@@ -125,7 +125,7 @@ CMErrorView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = CMErrorTable(self.dev)
|
||||
@@ -187,7 +187,7 @@ CMErrorView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = CMErrorTable(self.dev)
|
||||
@@ -211,7 +211,7 @@ CMErrorView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = CMErrorTable(self.dev)
|
||||
@@ -239,7 +239,7 @@ CMErrorView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = CMErrorTable(self.dev)
|
||||
@@ -266,7 +266,7 @@ CMErrorView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = CMErrorTable(self.dev)
|
||||
@@ -292,7 +292,7 @@ CMErrorView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = CMErrorTable(self.dev).get()
|
||||
@@ -326,7 +326,7 @@ FPCLinkStatTable:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = FPCLinkStatTable(self.dev)
|
||||
@@ -370,7 +370,7 @@ ShowLuchipView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = ShowLuchipTable(self.dev)
|
||||
@@ -473,7 +473,7 @@ FPCLinkStatTable:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = FPCLinkStatTable(self.dev)
|
||||
@@ -517,7 +517,7 @@ XMChipStatsView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = XMChipStatsTable(self.dev)
|
||||
@@ -536,7 +536,7 @@ FPCLinkStatTable:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = FPCLinkStatTable(self.dev)
|
||||
@@ -635,7 +635,7 @@ FPCTTPReceiveStatsView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = FPCTTPStatsTable(self.dev)
|
||||
@@ -709,7 +709,7 @@ MtipCgeStatisticsTable:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = MtipCgeSummaryTable(self.dev)
|
||||
@@ -803,7 +803,7 @@ _ICMPRateView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = ICMPStatsTable(self.dev)
|
||||
@@ -904,7 +904,7 @@ _ThrottleStatsTable:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = IthrottleIDTable(self.dev).get(target="fpc2")
|
||||
@@ -945,7 +945,7 @@ ShowPciErrorsView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = ShowPciErrorsTable(self.dev).get()
|
||||
@@ -987,7 +987,7 @@ FPCMemoryView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = FPCMemory(self.dev).get()
|
||||
@@ -1045,7 +1045,7 @@ PQ3PCI:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = PQ3PCITable(self.dev)
|
||||
@@ -1171,7 +1171,7 @@ _TopThreadTable:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = SchedulerTable(self.dev)
|
||||
@@ -1208,7 +1208,7 @@ HostlbStatusSummaryView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = HostlbStatusSummaryTable(self.dev)
|
||||
@@ -1234,7 +1234,7 @@ HostlbStatusSummaryView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = HostlbStatusSummaryTable(
|
||||
@@ -1310,7 +1310,7 @@ _TransmitPerQueueView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = DevicesLocalTable(self.dev)
|
||||
@@ -1381,7 +1381,7 @@ _ReceiveView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = DevicesLocalTable(self.dev)
|
||||
@@ -1401,7 +1401,7 @@ EthernetSwitchStatisticsIterTable:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = EthernetSwitchStatisticsIterTable(self.dev)
|
||||
@@ -1531,7 +1531,7 @@ _EthSwitchStatsFpc5Table:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = EthernetSwitchStatistics(self.dev)
|
||||
@@ -1688,7 +1688,7 @@ _ShowToePfePacketStatsStream_rx_errors:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = ShowToePfePacketStatsTable(self.dev)
|
||||
@@ -1756,7 +1756,7 @@ _ShowToePfePacketStatsStream_rx_errors:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = ShowToePfePacketStatsTable(self.dev)
|
||||
@@ -2093,7 +2093,7 @@ XMChipInterruptStatsView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = XMChipInterruptStatsTable(self.dev)
|
||||
@@ -2126,7 +2126,7 @@ XMChipInterruptStatsView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = XMChipInterruptStatsTable(self.dev)
|
||||
@@ -2160,7 +2160,7 @@ FPCThreadView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = FPCThreads(self.dev)
|
||||
@@ -2327,7 +2327,7 @@ CChipLoStatsView:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = CChipLoStatsTable(self.dev)
|
||||
@@ -2355,7 +2355,7 @@ ARPview:
|
||||
"""
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = ARPtable(self.dev)
|
||||
@@ -2384,9 +2384,10 @@ ARPview:
|
||||
interface: INTERFACE
|
||||
flag: FLAGS
|
||||
"""
|
||||
+ raise unittest.SkipTest("broken with yamlloader")
|
||||
globals().update(
|
||||
FactoryLoader().load(
|
||||
- yaml.load(yaml_data, Loader=yamlordereddictloader.Loader)
|
||||
+ yaml.load(yaml_data, Loader=yamlloader.ordereddict.Loader)
|
||||
)
|
||||
)
|
||||
stats = ARPtable(self.dev)
|
||||
Index: py-junos-eznc-2.7.2/requirements.txt
|
||||
===================================================================
|
||||
--- py-junos-eznc-2.7.2.orig/requirements.txt
|
||||
+++ py-junos-eznc-2.7.2/requirements.txt
|
||||
@@ -7,6 +7,5 @@ PyYAML>=5.1
|
||||
paramiko>=3.5.0
|
||||
six
|
||||
pyserial
|
||||
-yamlordereddictloader
|
||||
pyparsing
|
||||
transitions
|
||||
366
python-junos-eznc.changes
Normal file
366
python-junos-eznc.changes
Normal file
@@ -0,0 +1,366 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 28 05:41:18 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 2.7.2:
|
||||
* Enhancements done
|
||||
+ Introduced bind_addr parameter in Device() API #1279
|
||||
+ Introduced vmhost paramater in dev.facts #1333
|
||||
+ Introduced hostkey_verify paramater in Device() API #1321
|
||||
* Bugs Fixed
|
||||
+ Fixed the missing key to EthernetSwitchingTable #1228
|
||||
+ Fixed error handling on HelloHandler #1339
|
||||
+ Fixed the version check #1338
|
||||
+ Removed Google and Stackflow link from the ReadME #1337
|
||||
+ Fixed SystemStorageTable tables and views to handles multiple
|
||||
routing-engine file system storage information.#1244
|
||||
+ Fixed Console' object has no attribute '_use_filter' error when
|
||||
executed Table/View script #1335
|
||||
+ Fixed cli function to get full RPC response #1315
|
||||
+ Fixed sw.install to set no_validate option when validate=False for
|
||||
NSSU and ISSU upgrade #1323
|
||||
+ Fixed UT framework mock to use built-in unittest.mock #1311
|
||||
+ Fixed specific VC member reboot handling #1308 #1310
|
||||
+ Supported latest paramiko version which supports aes128-gcm and
|
||||
aes256-gcm cipher
|
||||
- Dropped patches:
|
||||
* python-311.patch
|
||||
* python-junos-eznc-no-mock.patch
|
||||
- Refreshed all other patches.
|
||||
- Switch to pyproject macros.
|
||||
- Use nose2 to run the testsuite, like upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 17 12:37:53 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Update to 2.7.1
|
||||
* Added customer juniper paramiko module as a dependency which
|
||||
supported aes128 and aes257 cipher #1299
|
||||
- Create no-six.patch to get rid of six dependency.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 12 11:01:26 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Update to 2.7.0:
|
||||
- Support added for Python 3.10 and above version.
|
||||
- 2.6.8:
|
||||
- Introduced optional argument routing instance for fs.cp() API
|
||||
- Introduced optional argument member_id for installation of pkg on
|
||||
specific member id of EX-VC
|
||||
- Changed the VlanTable field name to vlan-name and BfdSessionTable
|
||||
field name to client-name #423
|
||||
- Fixed the port details in StartShell to use the port from Device
|
||||
object instead of default Port 22 #573
|
||||
- Fixed the sw.install to use Windows file path for package copy
|
||||
#1206
|
||||
- Fixed the sw.install to install the vc_master after the other
|
||||
vc_members gets installed for EX-3400 where unlink is set by
|
||||
default #1247
|
||||
- Removed Unused Dependency: Netaddr #1257
|
||||
- Fixed "object": version_info(re_version) emits ValueError: invalid
|
||||
literal for int() with base 10: '17-EVO' for EVO version
|
||||
X50.17-EVO#1264
|
||||
- Drop python-junos-eznc-remove-nose.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 2 07:14:57 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||
|
||||
- Add python-311.patch to support python 3.11, gh#Juniper/py-junos-eznc#1236
|
||||
- Remove python-junos-eznc-fix-unittests.patch, not needed anymore
|
||||
- Update to 2.6.7:
|
||||
* Supported option to set look_for_keys with bool True/False #1234
|
||||
* Fixed build failure against setuptools #1231
|
||||
- 2.6.6
|
||||
* Fixed reboot failing on other RE #1199
|
||||
* Fixed passing 'sleep' arg to StartShell run() #1202
|
||||
* Fixed PyEZ get-facts support for ACX model #1209
|
||||
* Fixed EthPortTable regex pattern #1215
|
||||
* Fixed StartShell UnboundLocalError #1203 #1211
|
||||
- 2.6.5
|
||||
* Supported multi-gig ports for EthPortTable.yml #1177
|
||||
* Fixed on-box support for start shell types #1190 #1186
|
||||
* Fixed conn_open_timeout value was getting set None , changed it to
|
||||
default 30 seconds #1184
|
||||
- 2.6.4
|
||||
* Supported start_shell options to choose the shell types (sh or csh) #995
|
||||
* Supported for python 3.9
|
||||
* Fixed Device facts current_re returns the SRX cluster node0 and
|
||||
node1 details with cluster ID 16 #1135
|
||||
* Fixed upgrade ncclient version 0.6.13, updated requirements.txt to
|
||||
install ncclient==0.6.13 #1153
|
||||
* Fixed deprecation warning due to invalid escape sequences #1034
|
||||
* Fixed Unit tests test_sw_put_ftp failure #1165
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 3 11:54:14 UTC 2022 - pgajdos@suse.com
|
||||
|
||||
- added patches
|
||||
fix https://github.com/Juniper/py-junos-eznc/issues/1176
|
||||
+ python-junos-eznc-no-mock.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 3 11:48:41 UTC 2022 - pgajdos@suse.com
|
||||
|
||||
- added patches
|
||||
fix https://github.com/Juniper/py-junos-eznc/commit/96f25bb8aa006e12e48902a91a1dc6ff595bdd2d
|
||||
+ python-junos-eznc-fix-unittests.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 11 20:48:52 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- remove selectors2 build requirement: It's unmaintained and pulled
|
||||
in by ncclient only if necessary, i.e. on python <= 3.4, but
|
||||
nowhere declared or used by this junos-eznc.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 13 10:15:04 UTC 2021 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
- Update to version 2.6.3
|
||||
* Enhancements done
|
||||
Adding ignore warning for rollback api #1131
|
||||
Add escaped $ Bourne-style shell prompt support #868
|
||||
* Bugs Fixed
|
||||
- Fix for junos versions returning a bool value for config diff
|
||||
if there are no changes #1093
|
||||
- Handle ncclient timeout exception at close. #787
|
||||
- Newer junos versions return a bool for config diff and not
|
||||
etree if there are no changes #1093
|
||||
- Changes from 2.6.2
|
||||
* Bugs Fixed
|
||||
- Fix for evo device as Password prompt comes directly during
|
||||
telnet #1112
|
||||
- Changes from 2.6.1
|
||||
* Enhancement Added
|
||||
- Flag for json.loads() for special character like newline was
|
||||
made false by default. #1029
|
||||
* Bugs Fixed
|
||||
- Transform function modified only for the rpc and set back to
|
||||
original value. #1108
|
||||
- Skip the values returned in re-list without numbers during
|
||||
multi re software install #1099
|
||||
- getiterator() replaced with iter() as was deprecated in
|
||||
Python 3.2 and removed in Python 3.9 #1110
|
||||
- Drop python-junos-eznc-py39xml.patch because now in upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 26 16:58:17 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update to 2.6.0
|
||||
* Python 2 support removed from this release.
|
||||
* Session-id variable added to support telnet based persistent
|
||||
connection in Juniper supported ansible collections.
|
||||
- Add python-junos-eznc-py39xml.patch gh#Juniper/py-junos-eznc#1110
|
||||
- Skip failing test gh#Juniper/py-junos-eznc/issues/1109
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 29 19:40:57 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 2.5.4
|
||||
Features Added
|
||||
* cRPD model check to be added for on-box junos.
|
||||
Bugs Fixed
|
||||
* support use-fast-diff in diff/pdff function.
|
||||
* Zeroize handling modified for scenario where only warning is
|
||||
returned in the rpc-reply.
|
||||
* ntc_template and textfsm module's installation made optional
|
||||
and to be done explicitly if one want to use PyEZ table/view
|
||||
for other vendors cli o/p parsing.
|
||||
* Checksum algorithm argument to be passed during remote
|
||||
checksum in software installation.
|
||||
* docstring initialized with empty string as it becomes empty
|
||||
if optimization flag is added.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 18 10:55:57 UTC 2020 - pgajdos@suse.com
|
||||
|
||||
- use pytest instead of nose and replace deprecated
|
||||
yamlordereddictloader by yamlloader
|
||||
- added patches:
|
||||
+ python-junos-eznc-remove-nose.patch
|
||||
+ python-junos-eznc-remove-yamlordereddictloader.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 28 15:56:45 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 2.5.3
|
||||
Bugs fixed:
|
||||
* vmhost single re based image upgrade is failing while reboot.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 22 14:14:26 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 2.5.2
|
||||
* juniper_junos_system fails when (vmhost) rebooting MX204 router
|
||||
* Testcase failing in PyEZ after ncclient upgrade
|
||||
* Wheel support for version integrated with versioneer.
|
||||
* rpc-reply during reboot parsing gives error
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 31 20:30:01 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 2.5.1
|
||||
* Adding monitor-failure information in juniper_junos_facts
|
||||
output
|
||||
* Raise exception when dev.cli fails with exception
|
||||
* Device version fix for srx when cluster id greater than 15
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 30 19:33:10 UTC 2020 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 2.5.0
|
||||
Features Added
|
||||
* Versioneer support added for the code.
|
||||
* Changes for ansible actions of the reboot, shutdown to be
|
||||
handled in PyEZ
|
||||
Bugs Fixed
|
||||
* sax parser filter generation generic logic
|
||||
* Changes for the msg displayed in case of failure in software
|
||||
update
|
||||
* ntc_template latest version uses textfsm 1.1.0 #1042
|
||||
* drop hard dependency on unittest2 #1040
|
||||
- Drop patch (fixed upstream)
|
||||
* python-junos-eznc-no-unittest2.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 4 11:04:08 UTC 2020 - pgajdos@suse.com
|
||||
|
||||
- version update to 2.4.1
|
||||
## [1.4.0]
|
||||
### Fixed
|
||||
- [#617] - IOS show ip ospf database router: Removed reliance on static spacing
|
||||
- [#620] - NXOS show fex: Allow spaces in descriptions
|
||||
- [#621] - Juniper show arp, etc.: Account for virtual chassis output (`{master:0}`)
|
||||
- [#626] - ASA show vpn-sessiondb anyconnect: Require index, capture different format style
|
||||
- [#650] - IOS show ip ospf database network: Change to allow one or more whitespace at the beginning of the line rather than 1 or more due to different output
|
||||
- [#647] - ASA show route: Allow multiline route statements
|
||||
- [#659] - IOS show mac address-table: Allow VLAN to be non-whitespace to allow N/A as an option
|
||||
### Added
|
||||
- [#618] - IOS show ip ospf database network: New template
|
||||
- [#619] - HP Comware display lldp neighbor information verbose: New template
|
||||
- [#625] - ASA show vpn-sessiondb anyconnect: New template
|
||||
- [#628] - Cisco WLC show mobility sum: New template
|
||||
- [#631] - ASA show vpn-sessiondb anyconnect: Account for new data for assigned/public IP, group policy, and tunnel group
|
||||
- [#629] - ASA show crypto ipsec sa - Add LOCAL_ADDRESS_NAME, CURRENT_PEER_NAME, DYNAMIC_PEER_NAME, LOCAL_CRYPTO_ENDPOINT_NAME, REMOTE_CRYPTO_ENDPOINT_NAME
|
||||
- [#632] - ASA show nat: Added SERVICE_PROTOCOL
|
||||
- [#635] - IOS show ip route summary: New template
|
||||
- [#636] - ASA show vpn-sessiondb: New template
|
||||
- [#638] - ASA show inventory: Capture PID and VID withoout serial
|
||||
- [#637] - Cisco WLC show band select: New template
|
||||
## [1.4.0]
|
||||
### Fixed
|
||||
- [#548] IOS show mac address-table: Account for Total Mac Addresses
|
||||
- [#565] IOS show license: Avoid trailing spaces for features
|
||||
- [#575] NXOS show version: Match N5K PLATFORM & LAST_REBOOT captures split words
|
||||
- [#574] ASA show failover: Account for new output (IPS)
|
||||
- [#577] IOS show mac address-table: Account for Multicast Entries
|
||||
- [#582] NXOS show interface transceiver: Remove requirement for TYPE
|
||||
- [#585] IOS show mac address-table: Fixed ordering for TYPE2
|
||||
- [#587] IOS show interfaces switchport: Account for Vepa Enabled and Operational Dot1q Ethertype
|
||||
- [#584] IOS show switch detail: Account for Mac persistency wait time
|
||||
- [#589] EOS show ip route: Filldown for DISTANCE and METRIC - Added new data formats for VRF and NEXT_HOP and INTERFACE
|
||||
- [#592] Fortinet get router info bgp summary: Account for more data, fix UP_DOWN regex from word to non-whitespace
|
||||
- [#603] IOS show ip access-list: Update PROTOCOL to capture numbered protocols
|
||||
- [610] Aruba os show arp: Fix tests to have the full output from the command and device
|
||||
- [#608] Vyatta VyOS show interfaces: Capture IP_ADDRESS with or without netmask
|
||||
- [#614] IOS show interfaces status: Remove reliance on whitespaces
|
||||
### Added
|
||||
- [#406] Testing: Add yamllint to test suite
|
||||
- [#407] Testing: Add python black to test suite
|
||||
- [#553] IOS show lldp neighbors: Added CAPABILITIES capture group
|
||||
- [#554] IOS show logging: New template
|
||||
- [#563] IOS show interfaces switchport: Added ADMIN_MDOE capture group
|
||||
- [#562] ASA show logging: New template
|
||||
- [#564] NXOS show interface transceiver: New template
|
||||
- [#567] XR show arp: New template
|
||||
- [#572] IOS show lldp neighbors detail: Added SERIAL capture group
|
||||
- [#573] ASA show arp: New template
|
||||
- [#578] Fortinet get system interface: New template
|
||||
- [#576] Huawei VRP display lldp neighbor: New template
|
||||
- [#581] Cisco WLC show vlan sum: New template
|
||||
- [#580] XR show interfaces summary: New template
|
||||
- [#590] IOS show ip bgp neighbors: New template
|
||||
- [#591] NXOS show vdc: New template
|
||||
- [#595] Checkpoint GAIA show arp dynamic all: New template
|
||||
- [#593] IOS show module: New template
|
||||
- [#597] Huwai VRP display version: New template
|
||||
- [#602] NXOS show vrf interface: New template
|
||||
- [#598] IOS show running-config partition access list: Added TCP_FLAG capture group
|
||||
- [#598] IOS show running-config partition access list: Convert COMMENT to list
|
||||
- [#598] IOS show running-config partition access list: Update PROTOCOL to include numbered protocols
|
||||
- [#596] XR admin show environment power: New template
|
||||
- [#594] Aruba os show arp: New template
|
||||
- [#605] SG300 show version: New template
|
||||
- [#604] NXOS show vlan: Added INTERFACES capture group, Require VLAN_ID
|
||||
- [#600] IOS show mpls interfaces: New template
|
||||
- [#599] IOS show etherchannel summary: New template
|
||||
- [#611] NXOS show interface: Added MODE capture group
|
||||
- [#612] NXOS show interfaces switchport: Added ACCESS_VLAN_NAME and NATIVE_VLAN_NAME capture groups
|
||||
- [#609] HP Comware display ip interface: New template
|
||||
- [#606] IOS show ip ospf database router: New template
|
||||
### Changed
|
||||
- [#406] Helpers: Added development_helpers cli utility to replace existing helpers
|
||||
- python3 package only, as ntc-templates is python3 only
|
||||
- added patches
|
||||
https://github.com/Juniper/py-junos-eznc/pull/1040
|
||||
+ python-junos-eznc-no-unittest2.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 10 18:53:42 UTC 2019 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Update to version 2.3.1
|
||||
Bugfix release:
|
||||
* Handled a check for pending Junos OS or package installation
|
||||
* Fixed MetaPathLoader support only for jnpr.junos* modules
|
||||
* Fixed huge tree XML support
|
||||
* Fixed Junos sax parser issue for filter_xml broken
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 7 08:24:05 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update tests and dependencies to make the package work
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Sep 29 18:50:20 UTC 2019 - Martin Hauke <mardnh@gmx.de>
|
||||
|
||||
- Use github source URL
|
||||
- Add python-transitions to (Build)Requires
|
||||
- Update to version 2.3.0
|
||||
Features Added
|
||||
* TableView extended for vty/cli unstructured command
|
||||
* Added junos SAX parser feature
|
||||
* Added TableView Null Key support
|
||||
* Added command tables
|
||||
* Added reboot support for junos vmhost platform
|
||||
* Added ElsEthernetSwitchingTable TableView
|
||||
* Added callback functionality to ftp get
|
||||
* Extended start shell support for Bourne shell
|
||||
* Added at option support for sw.reboot() and sw.poweroff()
|
||||
* Added generalized function for ssh-client
|
||||
Bugs Fixed
|
||||
* Updated fact collection for srx platform
|
||||
* Supports new ssh private key format
|
||||
* Handled exception in dev.close()
|
||||
* Updated file transfers to use context manager to open files
|
||||
* Fixed reboot and poweroff behavior
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 7 13:40:54 UTC 2019 - Daniel Molkentin <daniel.molkentin@suse.com>
|
||||
|
||||
- Fix singlespec Requires
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 6 13:34:51 UTC 2019 - Daniel Molkentin <daniel.molkentin@suse.com>
|
||||
|
||||
- Update to 2.2.0
|
||||
No changelog provided
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 7 08:26:58 UTC 2017 - mardnh@gmx.de
|
||||
|
||||
- Update to version 2.1.5
|
||||
- Convert to singlespec
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Sep 3 18:04:55 UTC 2016 - mardnh@gmx.de
|
||||
|
||||
- initial package, version 2.0.0
|
||||
|
||||
95
python-junos-eznc.spec
Normal file
95
python-junos-eznc.spec
Normal file
@@ -0,0 +1,95 @@
|
||||
#
|
||||
# spec file for package python-junos-eznc
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2017-2020, Martin Hauke <mardnh@gmx.de>
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: python-junos-eznc
|
||||
Version: 2.7.2
|
||||
Release: 0
|
||||
Summary: Junos 'EZ' automation for non-programmers
|
||||
License: Apache-2.0
|
||||
URL: https://www.github.com/Juniper/py-junos-eznc
|
||||
Source: https://github.com/Juniper/py-junos-eznc/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
# replace deprecated yamlordereddictloader by yamlloader
|
||||
# https://github.com/Juniper/py-junos-eznc/pull/1078
|
||||
Patch0: python-junos-eznc-remove-yamlordereddictloader.patch
|
||||
# PATCH-FIX-UPSTREAM gh#Juniper/py-junos-eznc#1307 Don't require six
|
||||
Patch1: no-six.patch
|
||||
BuildRequires: %{python_module Jinja2 >= 2.7.1}
|
||||
BuildRequires: %{python_module PyYAML >= 5.1}
|
||||
BuildRequires: %{python_module lxml >= 3.2.4}
|
||||
BuildRequires: %{python_module ncclient >= 0.6.15}
|
||||
BuildRequires: %{python_module nose2}
|
||||
BuildRequires: %{python_module ntc-templates}
|
||||
BuildRequires: %{python_module paramiko >= 1.15.2}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pyparsing}
|
||||
BuildRequires: %{python_module pyserial}
|
||||
BuildRequires: %{python_module scp >= 0.7.0}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module transitions}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: %{python_module yamlloader}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-Jinja2 >= 2.7.1
|
||||
Requires: python-PyYAML >= 5.1
|
||||
Requires: python-lxml >= 3.2.4
|
||||
Requires: python-ncclient >= 0.6.15
|
||||
Requires: python-paramiko >= 1.15.2
|
||||
Requires: python-pyparsing
|
||||
Requires: python-pyserial
|
||||
Requires: python-scp >= 0.7.0
|
||||
Requires: python-transitions
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Junos PyEZ is designed to provide the same capabilities as a user would have
|
||||
on the Junos CLI, but in an environment built for automation tasks.
|
||||
These capabilities include, but are not limited to:
|
||||
|
||||
- Remote connectivity and management of Junos devices via NETCONF
|
||||
- Provide "facts" about the device
|
||||
- Retrieve "operational" or "run-state" information
|
||||
- Retrieve configuration information
|
||||
- Make configuration changes in unstructured and structured ways
|
||||
- Provide common utilities for tasks such as secure copy of files and
|
||||
software updates
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n py-junos-eznc-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%python_exec -B -m nose2 -vv tests.unit
|
||||
|
||||
%files %{python_files}
|
||||
%license COPYRIGHT LICENSE
|
||||
%doc README.txt README.md
|
||||
%dir %{python_sitelib}/jnpr
|
||||
%{python_sitelib}/jnpr/junos
|
||||
%{python_sitelib}/junos_eznc-%{version}.dist-info
|
||||
%{python_sitelib}/junos_eznc-%{version}*-nspkg.pth
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user