Hello community,

here is the log from the commit of package python-junos-eznc for 
openSUSE:Factory checked in at 2020-08-04 20:22:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-junos-eznc (Old)
 and      /work/SRC/openSUSE:Factory/.python-junos-eznc.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-junos-eznc"

Tue Aug  4 20:22:15 2020 rev:5 rq:824188 version:2.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-junos-eznc/python-junos-eznc.changes      
2020-07-01 14:27:13.762867008 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-junos-eznc.new.3592/python-junos-eznc.changes
    2020-08-04 20:22:30.849002370 +0200
@@ -1,0 +2,9 @@
+Fri Jul 31 20:30:01 UTC 2020 - Martin Hauke <[email protected]>
+
+- 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
+
+-------------------------------------------------------------------

Old:
----
  python-junos-eznc-2.5.0.tar.gz

New:
----
  python-junos-eznc-2.5.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-junos-eznc.spec ++++++
--- /var/tmp/diff_new_pack.elOKdq/_old  2020-08-04 20:22:32.229002546 +0200
+++ /var/tmp/diff_new_pack.elOKdq/_new  2020-08-04 20:22:32.233002546 +0200
@@ -20,7 +20,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-junos-eznc
-Version:        2.5.0
+Version:        2.5.1
 Release:        0
 Summary:        Junos 'EZ' automation for non-programmers
 License:        Apache-2.0

++++++ python-junos-eznc-2.5.0.tar.gz -> python-junos-eznc-2.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-junos-eznc-2.5.0/Dockerfile 
new/py-junos-eznc-2.5.1/Dockerfile
--- old/py-junos-eznc-2.5.0/Dockerfile  2020-06-30 14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/Dockerfile  2020-07-29 09:01:44.000000000 +0200
@@ -1,32 +1,31 @@
-FROM alpine:3.6
+FROM alpine:3.12
 
 LABEL net.juniper.description="Junos PyEZ library for Python in a lightweight 
container." \
       net.juniper.maintainer="Stephen Steiner <[email protected]>"
 
-RUN mkdir /source \
-    && mkdir /scripts
-
 WORKDIR /source
 
 ## Copy project inside the container
-ADD setup.py setup.py
-ADD versioneer.py versioneer.py
-ADD setup.cfg setup.cfg
-ADD requirements.txt requirements.txt
-ADD lib lib
+ADD setup.* ./
+ADD versioneer.py .
+ADD requirements.txt .
+ADD lib lib 
+ADD entrypoint.sh /usr/local/bin/.
 
-## Install dependancies and Pyez
+## Install dependancies and PyEZ
 RUN apk add --no-cache build-base python3-dev py-lxml \
     libxslt-dev libxml2-dev libffi-dev openssl-dev curl \
-    ca-certificates openssl wget \
-    && pip3 install -r requirements.txt \
+    ca-certificates py3-pip bash \
+    && pip install -U pip \
+    && pip install -r requirements.txt \
     && apk del -r --purge gcc make g++ \
     && ln -s /usr/bin/python3 /usr/bin/python \
-    && pip3 install . \
+    && pip install . \
     && rm -rf /source/* \
-    && rm -rf /var/cache/apk/* \
-    && rm -rf setup.cfg versioneer.py
+    && chmod +x /usr/local/bin/entrypoint.sh
 
 WORKDIR /scripts
 
 VOLUME /scripts
+
+ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-junos-eznc-2.5.0/MANIFEST.in 
new/py-junos-eznc-2.5.1/MANIFEST.in
--- old/py-junos-eznc-2.5.0/MANIFEST.in 2020-06-30 14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/MANIFEST.in 2020-07-29 09:01:44.000000000 +0200
@@ -1,3 +1,4 @@
 include requirements.txt
 recursive-include lib *.yml
 include versioneer.py
+include lib/jnpr/junos/_version.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-junos-eznc-2.5.0/README.md 
new/py-junos-eznc-2.5.1/README.md
--- old/py-junos-eznc-2.5.0/README.md   2020-06-30 14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/README.md   2020-07-29 09:01:44.000000000 +0200
@@ -66,7 +66,7 @@
 
 ## PIP
 
-Installation requires Python 2.7 or >=3.5 and associated `pip` tool
+Installation requires Python >=3.5 and associated `pip` tool
 
     pip install junos-eznc
 
@@ -80,13 +80,28 @@
 
 ## Docker
 
-Move to the local directory which contains your script(s) and run the container
+### Interactive Docker Usage
 
-`docker run -it --rm --name pyez -v "$(pwd)":/scripts juniper/pyez sh`
+Move to the local directory which contains your script(s) and run the 
container. Running the container in this manner will put you into an 
interactive Bash session.
 
-Your local scripts will be mounted to /scripts in the container
+`docker run -it [ --rm ] [ --name pyez ] -v $PWD:/scripts juniper/pyez`
 
-`cd scripts`
+Your local scripts will be mounted to /scripts in the container.
+
+### Microservice Usage
+
+This image can also be used as a Python "executable" with the required Python 
PyEZ libraries pre-installed. To use the image in this way, mount the volume 
which contains the Python script and pass the script name as an argument to 
`docker run`. Optionally, you may also pass in a `requirements.txt` file to 
install additional python packages via `pip`. To add OS packages (Alpine 
Linux), provide a file with a list of packages --one per line-- and either 
reference it as an env var (`$APK`) or mount it to the container 
`/extras/apk.txt`. To add additional Python packages (via pip), provide a 
`requirements.txt` file and pass it in as an env var (`$REQ`) or mount it to 
the container at `/extras/requirements.txt`.
+
+`Usage: `docker run -it [ --rm ] -v some/dir:/scripts juniper/pyez [ 
myscript.py ]`
+
+Example:
+
+```bash
+$ docker run -it --rm -v $PWD:/scripts juniper/pyez tmp.py
+tmp.py
+{'2RE': False, 'HOME': '/var/home/lab', 'RE0': {'mastership_state': 'master', 
'status': 'OK', 'model': 'RE-SRX210H-POE', 'last_reboot_reason': '0x1:power 
cycle/failure', 'up_time': '36 days, 11 hours, 49 minutes, 59 seconds'}, 'RE1': 
None, 'RE_hw_mi': False, 'current_re': ['master', 'node', 'fwdd', 'member', 
'pfem', 'backup', 're0', 'fpc0.pic0'], 'domain': None, 'fqdn': 
'fw1.localdomain', 'hostname': 'fw1.localdomain', 'hostname_info': {'re0': 
'fw1.localdomain'}, 'ifd_style': 'CLASSIC', 'junos_info': {'re0': {'text': 
'12.1X44-D40.2', 'object': junos.version_info(major=(12, 1), type=X, minor=(44, 
'D', 40), build=2)}}, 'master': 'RE0', 'model': 'SRX210H-POE', 'model_info': 
{'re0': 'SRX210H-POE'}, 'personality': 'SRX_BRANCH', 're_info': {'default': 
{'0': {'mastership_state': 'master', 'status': 'OK', 'model': 'RE-SRX210H-POE', 
'last_reboot_reason': '0x1:power cycle/failure'}, 'default': 
{'mastership_state': 'master', 'status': 'OK', 'model': 'RE-SRX210H-POE', 
'last_reboot_reason': '0x1:power cycle/failure'}}}, 're_master': {'default': 
'0'}, 'serialnumber': 'AE3009AA0101', 'srx_cluster': False, 'srx_cluster_id': 
None, 'srx_cluster_redundancy_group': None, 'switch_style': 'VLAN', 
'vc_capable': False, 'vc_fabric': None, 'vc_master': None, 'vc_mode': None, 
'version': '12.1X44-D40.2', 'version_RE0': '12.1X44-D40.2', 'version_RE1': 
None, 'version_info': junos.version_info(major=(12, 1), type=X, minor=(44, 'D', 
40), build=2), 'virtual': False}
+done
+```
 
 See 
[DOCKER-EXAMPLES.md](https://github.com/Juniper/py-junos-eznc/blob/master/DOCKER-EXAMPLES.md)
 for some example usage.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-junos-eznc-2.5.0/entrypoint.sh 
new/py-junos-eznc-2.5.1/entrypoint.sh
--- old/py-junos-eznc-2.5.0/entrypoint.sh       1970-01-01 01:00:00.000000000 
+0100
+++ new/py-junos-eznc-2.5.1/entrypoint.sh       2020-07-29 09:01:44.000000000 
+0200
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+set +e
+
+## Functions
+function apk_add {
+    echo "Installing additional OS packages"
+    while IFS= read -r pkg
+        do
+        echo "Installing ${pkg}"
+        apk add --no-cache -q "${pkg}"
+        done < "$1"
+}
+
+function pip_install {
+        echo "Installing Python packages"
+        pip install -r $1
+}
+
+function run_scripts {
+    echo "Executing defined script"
+    python3 "$1"
+}
+
+## Manually defined variables will take precedence
+
+if [ "$APK" ]; then APK=$APK
+elif [ -f "/extras/apk.txt" ]; then APK="/extras/apk.txt"
+else APK=''
+fi
+
+if [ "$REQ" ]; then REQ=$REQ
+elif [ -f "/extras/requirements.txt" ];then REQ="/extras/requirements.txt"
+else REQ=''
+fi
+
+if [ "$1" ]; then SCRIPT=$1
+else SCRIPT=''
+fi
+
+## Install extras, run scripts, or start a shell session
+[[ -z "$APK" ]] || apk_add "$APK"
+[[ -z "$REQ" ]] || pip_install "$REQ"
+[[ -z "$SCRIPT" ]]  && /bin/bash || run_scripts "$SCRIPT"
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-junos-eznc-2.5.0/lib/jnpr/junos/__init__.py 
new/py-junos-eznc-2.5.1/lib/jnpr/junos/__init__.py
--- old/py-junos-eznc-2.5.0/lib/jnpr/junos/__init__.py  2020-06-30 
14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/lib/jnpr/junos/__init__.py  2020-07-29 
09:01:44.000000000 +0200
@@ -12,7 +12,6 @@
 import yaml
 import logging
 
-__version__ = version.VERSION
 __date__ = version.DATE
 
 # import time
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-junos-eznc-2.5.0/lib/jnpr/junos/_version.py 
new/py-junos-eznc-2.5.1/lib/jnpr/junos/_version.py
--- old/py-junos-eznc-2.5.0/lib/jnpr/junos/_version.py  2020-06-30 
14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/lib/jnpr/junos/_version.py  2020-07-29 
09:01:44.000000000 +0200
@@ -22,9 +22,9 @@
     # setup.py/versioneer.py will grep for the variable names, so they must
     # each be defined on a line of their own. _version.py will just call
     # get_keywords().
-    git_refnames = " (HEAD -> master, tag: 2.5.0)"
-    git_full = "03a664fe4b11a509cc7f8cf936f1c9c5eb76ed3f"
-    git_date = "2020-06-30 17:36:55 +0530"
+    git_refnames = " (HEAD -> master, tag: 2.5.1)"
+    git_full = "bfb6e25cab81bf74217b685ebe0fd5716dbeea60"
+    git_date = "2020-07-29 12:31:44 +0530"
     keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
     return keywords
 
@@ -40,7 +40,7 @@
     cfg = VersioneerConfig()
     cfg.VCS = "git"
     cfg.style = "pep440"
-    cfg.tag_prefix = "v"
+    cfg.tag_prefix = ""
     cfg.parentdir_prefix = "None"
     cfg.versionfile_source = "lib/jnpr/junos/_version.py"
     cfg.verbose = False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-junos-eznc-2.5.0/lib/jnpr/junos/device.py 
new/py-junos-eznc-2.5.1/lib/jnpr/junos/device.py
--- old/py-junos-eznc-2.5.0/lib/jnpr/junos/device.py    2020-06-30 
14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/lib/jnpr/junos/device.py    2020-07-29 
09:01:44.000000000 +0200
@@ -724,12 +724,18 @@
             if rsp.tag == "rpc":
                 return rsp[0]
             return rsp
-        except EzErrors.ConnectClosedError as ex:
+        except (
+            EzErrors.ConnectClosedError,
+            EzErrors.RpcError,
+            EzErrors.RpcTimeoutError,
+        ) as ex:
             raise ex
-        except EzErrors.RpcError as ex:
-            return "invalid command: %s: %s" % (command, ex)
         except Exception as ex:
-            return "invalid command: " + command
+            warnings.warn(
+                "An unknown exception occurred : %s - please report." % ex,
+                RuntimeWarning,
+            )
+            raise ex
 
     # ------------------------------------------------------------------------
     # execute
@@ -828,7 +834,7 @@
         # Something unexpected happened - raise it up
         except Exception as err:
             warnings.warn(
-                "An unknown exception occured - please report.", RuntimeWarning
+                "An unknown exception occurred - please report.", 
RuntimeWarning
             )
             raise
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/lib/jnpr/junos/factory/optable.py 
new/py-junos-eznc-2.5.1/lib/jnpr/junos/factory/optable.py
--- old/py-junos-eznc-2.5.0/lib/jnpr/junos/factory/optable.py   2020-06-30 
14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/lib/jnpr/junos/factory/optable.py   2020-07-29 
09:01:44.000000000 +0200
@@ -91,7 +91,7 @@
     """
     Used to generate xml object from Table/view to be used in SAX parsing
     Args:
-        obj: self object which contains table/view details
+    obj: self object which contains table/view details
 
     Returns: lxml etree object to be used as sax parser input
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/lib/jnpr/junos/facts/current_re.py 
new/py-junos-eznc-2.5.1/lib/jnpr/junos/facts/current_re.py
--- old/py-junos-eznc-2.5.0/lib/jnpr/junos/facts/current_re.py  2020-06-30 
14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/lib/jnpr/junos/facts/current_re.py  2020-07-29 
09:01:44.000000000 +0200
@@ -64,7 +64,7 @@
                                 octets = ip.split(".", 3)
                                 # The 2nd octet will be cluster-id << 4
                                 cluster_id_octet = str(
-                                    int(device.facts["srx_cluster_id"]) << 4
+                                    (int(device.facts["srx_cluster_id"]) & 
0x000F) << 4
                                 )
                                 # node0 will have an IP of
                                 #     129.<cluster_id_octet>.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/lib/jnpr/junos/facts/get_chassis_cluster_status.py 
new/py-junos-eznc-2.5.1/lib/jnpr/junos/facts/get_chassis_cluster_status.py
--- old/py-junos-eznc-2.5.0/lib/jnpr/junos/facts/get_chassis_cluster_status.py  
2020-06-30 14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/lib/jnpr/junos/facts/get_chassis_cluster_status.py  
2020-07-29 09:01:44.000000000 +0200
@@ -62,12 +62,14 @@
                                 stats.findall("redundancy-group-status"),
                                 stats.findall("preempt"),
                                 stats.findall("failover-mode"),
+                                stats.findall("monitor-failures"),
                             ):
                                 redundancy_group[group_id][node[0].text] = {
                                     "priority": node[1].text,
                                     "status": node[2].text,
                                     "preempt": node[3].text,
                                     "failover_mode": node[4].text,
+                                    "monitor-failures": node[5].text,
                                 }
     except RpcError:
         # Likely a device that doesn't implement the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-junos-eznc-2.5.0/lib/jnpr/junos/utils/config.py 
new/py-junos-eznc-2.5.1/lib/jnpr/junos/utils/config.py
--- old/py-junos-eznc-2.5.0/lib/jnpr/junos/utils/config.py      2020-06-30 
14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/lib/jnpr/junos/utils/config.py      2020-07-29 
09:01:44.000000000 +0200
@@ -177,8 +177,9 @@
         Perform a commit check.  If the commit check passes, this function
         will return ``True``.  If the commit-check results in warnings, they
         are reported and available in the Exception errs.
+
         :param int timeout: If provided the command will wait for completion
-                            using the provided value as timeout (seconds).     
  
+                            using the provided value as timeout (seconds).
 
         :returns: ``True`` if commit-check is successful (no errors)
         :raises CommitError: When errors detected in candidate configuration.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-junos-eznc-2.5.0/lib/jnpr/junos/utils/sw.py 
new/py-junos-eznc-2.5.1/lib/jnpr/junos/utils/sw.py
--- old/py-junos-eznc-2.5.0/lib/jnpr/junos/utils/sw.py  2020-06-30 
14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/lib/jnpr/junos/utils/sw.py  2020-07-29 
09:01:44.000000000 +0200
@@ -851,9 +851,9 @@
           (Optional) Additional keyword arguments are passed through to the
           "package add" RPC.
 
-        :returns:
-            * ``True`` when the installation is successful
-            * ``False`` otherwise
+        :returns: tuple(<status>, <msg>)
+            * status : ``True`` when the installation is successful and 
``False`` otherwise
+            * msg : msg received as response or error message created
         """
         if issu is True and nssu is True:
             raise TypeError("install function can either take issu or nssu not 
both")
@@ -1206,7 +1206,7 @@
             then the action is performed on the other REs in the system.
 
         :returns:
-            *rpc response message (string) if command successful
+            * rpc response message (string) if command successful
         """
         if self._dev.facts["_is_linux"]:
             cmd = E("request-shutdown-halt")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-junos-eznc-2.5.0/lib/jnpr/junos/version.py 
new/py-junos-eznc-2.5.1/lib/jnpr/junos/version.py
--- old/py-junos-eznc-2.5.0/lib/jnpr/junos/version.py   2020-06-30 
14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/lib/jnpr/junos/version.py   2020-07-29 
09:01:44.000000000 +0200
@@ -1,11 +1,12 @@
-VERSION = "2.4.2.dev0"
-DATE = "2020-Apr-29"
+VERSION = "2.5.0"
+DATE = "2020-Jun-15"
 
 # Augment with the internal version if present
 try:
-    from jnpr.junos.internal_version import INTERNAL_VERSION
+    from ._version import get_versions
 
-    VERSION += "+internal." + str(INTERNAL_VERSION)
+    VERSION = get_versions()["version"]
+    del get_versions
 except ImportError:
     # No internal version
     pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/tests/unit/factory/rpc-reply/get-configuration-user.xml 
new/py-junos-eznc-2.5.1/tests/unit/factory/rpc-reply/get-configuration-user.xml
--- 
old/py-junos-eznc-2.5.0/tests/unit/factory/rpc-reply/get-configuration-user.xml 
    2020-06-30 14:06:55.000000000 +0200
+++ 
new/py-junos-eznc-2.5.1/tests/unit/factory/rpc-reply/get-configuration-user.xml 
    2020-07-29 09:01:44.000000000 +0200
@@ -1,21 +1,22 @@
-<rpc-reply xmlns:junos="http://xml.juniper.net/junos/12.1X46/junos";>
-       <configuration junos:commit-seconds="1400665891" 
junos:commit-localtime="2014-05-21 09:51:31 UTC" junos:commit-user="rick">
-               <system>
-                       <login>
-                               <user group="global">
-                                       <name group="global">test</name>
-                                       <full-name group="member0">Test 
User</full-name>
-                                       <uid group="global">928</uid>
-                                       <class group="global">superuser</class>
-                                       <undocumented><shell 
group="global">csh</shell></undocumented>
-                                       <authentication group="global">
-                                               <encrypted-password 
group="global">$encryptedpass.</encrypted-password>
-                                       </authentication>
-                               </user>
-                       </login>
-               </system>
-       </configuration>
+<rpc-reply xmlns:junos="http://xml.juniper.net/junos/12.1X46/junos";>
+        <configuration junos:commit-seconds="1400665891" 
junos:commit-localtime="2014-05-21 09:51:31 UTC" junos:commit-user="rick">
+                <system>
+                        <login>
+                                <user group="global">
+                                        <name group="global">test</name>
+                                        <full-name group="member0">Test 
User</full-name>
+                                        <uid group="global">928</uid>
+                                        <class group="global">superuser</class>
+                                        <undocumented><shell 
group="global">csh</shell></undocumented>
+                                        <authentication group="global">
+                                                <encrypted-password 
group="global">$encryptedpass.</encrypted-password>
+                                        </authentication>
+                                </user>
+                        </login>
+                </system>
+        </configuration>
     <cli>
         <banner></banner>
-    </cli>     
-</rpc-reply>
\ No newline at end of file
+    </cli>
+</rpc-reply>
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/tests/unit/factory/rpc-reply/user.xml 
new/py-junos-eznc-2.5.1/tests/unit/factory/rpc-reply/user.xml
--- old/py-junos-eznc-2.5.0/tests/unit/factory/rpc-reply/user.xml       
2020-06-30 14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/tests/unit/factory/rpc-reply/user.xml       
2020-07-29 09:01:44.000000000 +0200
@@ -1,4 +1,4 @@
-<configuration changed-seconds="1435177642" changed-localtime="2015-06-24 
13:27:22 PDT">
+<configuration changed-seconds="1435177642" changed-localtime="2015-06-24 
13:27:22 PDT">
     <system group="global">
         <login group="global">
             <user group="global">
@@ -11,4 +11,5 @@
             </user>
         </login>
     </system>
-</configuration>
\ No newline at end of file
+</configuration>
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/tests/unit/facts/rpc-reply/vc_mmvc_get-virtual-chassis-information.xml
 
new/py-junos-eznc-2.5.1/tests/unit/facts/rpc-reply/vc_mmvc_get-virtual-chassis-information.xml
--- 
old/py-junos-eznc-2.5.0/tests/unit/facts/rpc-reply/vc_mmvc_get-virtual-chassis-information.xml
      2020-06-30 14:06:55.000000000 +0200
+++ 
new/py-junos-eznc-2.5.1/tests/unit/facts/rpc-reply/vc_mmvc_get-virtual-chassis-information.xml
      2020-07-29 09:01:44.000000000 +0200
@@ -1,4 +1,4 @@
-<rpc-reply xmlns:junos="http://xml.juniper.net/junos/13.2X51/junos";>
+<rpc-reply xmlns:junos="http://xml.juniper.net/junos/13.2X51/junos";>
     <virtual-chassis-information>
         <virtual-chassis-id-information>
             <virtual-chassis-id>f0e9.b6b2.378b</virtual-chassis-id>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/tests/unit/facts/rpc-reply/vc_mmvcf_get-virtual-chassis-information.xml
 
new/py-junos-eznc-2.5.1/tests/unit/facts/rpc-reply/vc_mmvcf_get-virtual-chassis-information.xml
--- 
old/py-junos-eznc-2.5.0/tests/unit/facts/rpc-reply/vc_mmvcf_get-virtual-chassis-information.xml
     2020-06-30 14:06:55.000000000 +0200
+++ 
new/py-junos-eznc-2.5.1/tests/unit/facts/rpc-reply/vc_mmvcf_get-virtual-chassis-information.xml
     2020-07-29 09:01:44.000000000 +0200
@@ -1,4 +1,4 @@
-<rpc-reply xmlns:junos="http://xml.juniper.net/junos/13.2X51/junos";>
+<rpc-reply xmlns:junos="http://xml.juniper.net/junos/13.2X51/junos";>
     <virtual-chassis-information>
         <virtual-chassis-id-information junos:style="fabric">
             <virtual-chassis-id>f0e9.b6b2.378b</virtual-chassis-id>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/tests/unit/facts/test_current_re.py 
new/py-junos-eznc-2.5.1/tests/unit/facts/test_current_re.py
--- old/py-junos-eznc-2.5.0/tests/unit/facts/test_current_re.py 2020-06-30 
14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/tests/unit/facts/test_current_re.py 2020-07-29 
09:01:44.000000000 +0200
@@ -44,6 +44,18 @@
         self.assertEqual(self.dev.facts["current_re"], ["node0", "primary"])
 
     @patch("jnpr.junos.Device.execute")
+    def test_current_re_fact_srx_cluster_primary_id_255(self, mock_execute):
+        mock_execute.side_effect = self._mock_manager_current_re_srx_primary
+        self.dev.facts._cache["srx_cluster_id"] = "255"
+        self.assertEqual(self.dev.facts["current_re"], ["node0", "primary"])
+
+    @patch("jnpr.junos.Device.execute")
+    def test_current_re_fact_srx_cluster_primary_id_31(self, mock_execute):
+        mock_execute.side_effect = self._mock_manager_current_re_srx_primary
+        self.dev.facts._cache["srx_cluster_id"] = "31"
+        self.assertEqual(self.dev.facts["current_re"], ["node0", "primary"])
+
+    @patch("jnpr.junos.Device.execute")
     def test_current_re_fact_srx_cluster_secondary(self, mock_execute):
         mock_execute.side_effect = self._mock_manager_current_re_srx_secondary
         self.dev.facts._cache["srx_cluster_id"] = "15"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/tests/unit/ofacts/rpc-reply/get-virtual-chassis-information.xml
 
new/py-junos-eznc-2.5.1/tests/unit/ofacts/rpc-reply/get-virtual-chassis-information.xml
--- 
old/py-junos-eznc-2.5.0/tests/unit/ofacts/rpc-reply/get-virtual-chassis-information.xml
     2020-06-30 14:06:55.000000000 +0200
+++ 
new/py-junos-eznc-2.5.1/tests/unit/ofacts/rpc-reply/get-virtual-chassis-information.xml
     2020-07-29 09:01:44.000000000 +0200
@@ -1,4 +1,4 @@
-<rpc-reply xmlns:junos="http://xml.juniper.net/junos/14.2I0/junos";>
+<rpc-reply xmlns:junos="http://xml.juniper.net/junos/14.2I0/junos";>
        <virtual-chassis-information>
                <preprovisioned-virtual-chassis-information>
                        <virtual-chassis-id>4b43.17d9.1dcf</virtual-chassis-id>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/tests/unit/ofacts/rpc-reply/get-virtual-chassis-information_mmvcf.xml
 
new/py-junos-eznc-2.5.1/tests/unit/ofacts/rpc-reply/get-virtual-chassis-information_mmvcf.xml
--- 
old/py-junos-eznc-2.5.0/tests/unit/ofacts/rpc-reply/get-virtual-chassis-information_mmvcf.xml
       2020-06-30 14:06:55.000000000 +0200
+++ 
new/py-junos-eznc-2.5.1/tests/unit/ofacts/rpc-reply/get-virtual-chassis-information_mmvcf.xml
       2020-07-29 09:01:44.000000000 +0200
@@ -1,4 +1,4 @@
-<rpc-reply xmlns:junos="http://xml.juniper.net/junos/13.2X51/junos";>
+<rpc-reply xmlns:junos="http://xml.juniper.net/junos/13.2X51/junos";>
     <virtual-chassis-information>
         <virtual-chassis-id-information junos:style="fabric">
             <virtual-chassis-id>f0e9.b6b2.378b</virtual-chassis-id>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/tests/unit/rpc-reply/get-permission-denied.xml 
new/py-junos-eznc-2.5.1/tests/unit/rpc-reply/get-permission-denied.xml
--- old/py-junos-eznc-2.5.0/tests/unit/rpc-reply/get-permission-denied.xml      
2020-06-30 14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/tests/unit/rpc-reply/get-permission-denied.xml      
2020-07-29 09:01:44.000000000 +0200
@@ -1,7 +1,7 @@
-<rpc-error xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" 
xmlns:junos="http://xml.juniper.net/junos/12.1X46/junos"; 
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
-       <error-severity>error</error-severity>
-       <error-info>
-               <bad-element>get-permission-denied</bad-element>
-       </error-info>
-       <error-message>permission denied</error-message>
+<rpc-error xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" 
xmlns:junos="http://xml.juniper.net/junos/12.1X46/junos"; 
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0">
+        <error-severity>error</error-severity>
+        <error-info>
+                <bad-element>get-permission-denied</bad-element>
+        </error-info>
+        <error-message>permission denied</error-message>
 </rpc-error>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/py-junos-eznc-2.5.0/tests/unit/test_device.py 
new/py-junos-eznc-2.5.1/tests/unit/test_device.py
--- old/py-junos-eznc-2.5.0/tests/unit/test_device.py   2020-06-30 
14:06:55.000000000 +0200
+++ new/py-junos-eznc-2.5.1/tests/unit/test_device.py   2020-07-29 
09:01:44.000000000 +0200
@@ -710,16 +710,26 @@
             "get-system-uptime-information",
         )
 
-    def test_device_cli_exception(self):
-        self.dev.rpc.cli = MagicMock(side_effect=AttributeError)
-        val = self.dev.cli("show version")
-        self.assertEqual(val, "invalid command: show version")
+    def test_device_cli_connection_exception(self):
+        self.dev.connected = False
+        self.assertRaises(EzErrors.ConnectClosedError, self.dev.cli, "foo")
 
     @patch("jnpr.junos.Device.execute")
     def test_device_cli_rpc_exception(self, mock_execute):
         mock_execute.side_effect = self._mock_manager
-        val = self.dev.cli("foo")
-        self.assertEqual(val, "invalid command: foo: RpcError")
+        self.assertRaises(EzErrors.RpcError, self.dev.cli, "foo")
+
+    def test_device_cli_timeout_exception(self):
+        self.dev._conn.rpc = MagicMock(side_effect=TimeoutExpiredError)
+        self.assertRaises(EzErrors.RpcTimeoutError, self.dev.cli, "foo")
+
+    @patch("jnpr.junos.device.warnings")
+    def test_device_cli_unknown_exception(self, mock_warnings):
+        class MyException(Exception):
+            pass
+
+        self.dev._conn.rpc = MagicMock(side_effect=MyException)
+        self.assertRaises(MyException, self.dev.cli, "foo")
 
     @patch("jnpr.junos.Device.execute")
     def test_device_display_xml_rpc(self, mock_execute):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/tests/unit/utils/rpc-reply/request-package-rollback-multi-error.xml
 
new/py-junos-eznc-2.5.1/tests/unit/utils/rpc-reply/request-package-rollback-multi-error.xml
--- 
old/py-junos-eznc-2.5.0/tests/unit/utils/rpc-reply/request-package-rollback-multi-error.xml
 2020-06-30 14:06:55.000000000 +0200
+++ 
new/py-junos-eznc-2.5.1/tests/unit/utils/rpc-reply/request-package-rollback-multi-error.xml
 2020-07-29 09:01:44.000000000 +0200
@@ -1,22 +1,22 @@
-<rpc-reply xmlns:junos="http://xml.juniper.net/junos/14.2I0/junos";>
+<rpc-reply xmlns:junos="http://xml.juniper.net/junos/14.2I0/junos";>
     <multi-routing-engine-results>
 
-               <multi-routing-engine-item>
+                <multi-routing-engine-item>
 
-                       <re-name>fpc0</re-name>
+                        <re-name>fpc0</re-name>
+
+                        <output>JUNOS version "D10.2" will become active at 
next reboot</output>
+                        <package-result>0</package-result>
+                </multi-routing-engine-item>
 
-                       <output>JUNOS version "D10.2" will become active at 
next reboot</output>
-                       <package-result>0</package-result>
-               </multi-routing-engine-item>    
-        
         <multi-routing-engine-item>
-            
+
             <re-name>member1</re-name>
-            
+
             <output>ERROR: cannot locate jroute-14.2I20140424_0657_ramas: 
rollback aborted</output>
             <package-result>1</package-result>
         </multi-routing-engine-item>
-        
+
     </multi-routing-engine-results>
     <cli>
         <banner>{master:member1-re0}</banner>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/py-junos-eznc-2.5.0/tests/unit/utils/rpc-reply/request-package-validate.xml 
new/py-junos-eznc-2.5.1/tests/unit/utils/rpc-reply/request-package-validate.xml
--- 
old/py-junos-eznc-2.5.0/tests/unit/utils/rpc-reply/request-package-validate.xml 
    2020-06-30 14:06:55.000000000 +0200
+++ 
new/py-junos-eznc-2.5.1/tests/unit/utils/rpc-reply/request-package-validate.xml 
    2020-07-29 09:01:44.000000000 +0200
@@ -1,40 +1,40 @@
 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" 
xmlns:junos="http://xml.juniper.net/junos/10.4R3/junos";>
-    <cli>
-        <ignore-signals>
-            hup
-        </ignore-signals>
-    </cli>
-    <output>
-        Checking compatibility with configuration
-        Initializing...
-        rm: /var/validate/chroot/var/etc/pam.conf: Operation not permitted
-        rm: /var/validate/chroot/var/etc: Directory not empty
-        rm: /var/validate/chroot/var: Directory not empty
-        rm: /var/validate/chroot: Directory not empty
-        Using jbase-13.2I20140401_1054_katharh
-        Using /var/tmp/py-extensions-i386-13.2I20140430_1237_katharh.tgz
-        Checking py-extensions-i386 requirements on /
-        Verified py-extensions-i386-13.2I20140430_1237_katharh signed by 
PackageDevelopment_13_2_0
-        Registering py-extensions-i386 as unsupported
-        Using jruntime-13.2I20140401_1054_katharh
-        Using jkernel-13.2I20140401_1054_katharh
-        Using jroute-13.2I20140401_1054_katharh
-        Using jcrypto-13.2I20140401_1054_katharh
-        cp: /var/validate/chroot/var/etc/pam.conf: Operation not permitted
-        Hardware Database regeneration succeeded
-        Validating against /config/juniper.conf.gz
-        mgd: error: schema: dbs_remap_daemon_index: could not find daemon name 
'analyticsd'
-        mgd: warning: schema: init: 'logical-systems-vlans' contains-node 
'juniper-config vlans': not found
-        mgd: error: rename failed for /var/etc/pam.conf
-        mgd: commit complete
-        Validation succeeded
-        rm: /var/validate/chroot/var/etc/pam.conf: Operation not permitted
-        rm: /var/validate/chroot/var/etc: Directory not empty
-        rm: /var/validate/chroot/var: Directory not empty
-        rm: /var/validate/chroot: Directory not empty
-    </output>
-    <package-result>0</package-result>
-    <cli>
-        <banner></banner>
-    </cli>
+    <cli>
+        <ignore-signals>
+            hup
+        </ignore-signals>
+    </cli>
+    <output>
+        Checking compatibility with configuration
+        Initializing...
+        rm: /var/validate/chroot/var/etc/pam.conf: Operation not permitted
+        rm: /var/validate/chroot/var/etc: Directory not empty
+        rm: /var/validate/chroot/var: Directory not empty
+        rm: /var/validate/chroot: Directory not empty
+        Using jbase-13.2I20140401_1054_katharh
+        Using /var/tmp/py-extensions-i386-13.2I20140430_1237_katharh.tgz
+        Checking py-extensions-i386 requirements on /
+        Verified py-extensions-i386-13.2I20140430_1237_katharh signed by 
PackageDevelopment_13_2_0
+        Registering py-extensions-i386 as unsupported
+        Using jruntime-13.2I20140401_1054_katharh
+        Using jkernel-13.2I20140401_1054_katharh
+        Using jroute-13.2I20140401_1054_katharh
+        Using jcrypto-13.2I20140401_1054_katharh
+        cp: /var/validate/chroot/var/etc/pam.conf: Operation not permitted
+        Hardware Database regeneration succeeded
+        Validating against /config/juniper.conf.gz
+        mgd: error: schema: dbs_remap_daemon_index: could not find daemon name 
'analyticsd'
+        mgd: warning: schema: init: 'logical-systems-vlans' contains-node 
'juniper-config vlans': not found
+        mgd: error: rename failed for /var/etc/pam.conf
+        mgd: commit complete
+        Validation succeeded
+        rm: /var/validate/chroot/var/etc/pam.conf: Operation not permitted
+        rm: /var/validate/chroot/var/etc: Directory not empty
+        rm: /var/validate/chroot/var: Directory not empty
+        rm: /var/validate/chroot: Directory not empty
+    </output>
+    <package-result>0</package-result>
+    <cli>
+        <banner></banner>
+    </cli>
 </rpc-reply>


Reply via email to