From af95c66f33dd618586cf2f2a32155dcb8686a79d Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Tue, 30 Jun 2026 16:38:27 -0400 Subject: [PATCH] Add issu and nssu support flags --- changes/mm.added | 1 + pyntc/devices/jnpr_device.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 changes/mm.added diff --git a/changes/mm.added b/changes/mm.added new file mode 100644 index 00000000..89f03afc --- /dev/null +++ b/changes/mm.added @@ -0,0 +1 @@ +Added issu and nssu upgrade choices for install on juniper devices. \ No newline at end of file diff --git a/pyntc/devices/jnpr_device.py b/pyntc/devices/jnpr_device.py index b6431204..bb916293 100644 --- a/pyntc/devices/jnpr_device.py +++ b/pyntc/devices/jnpr_device.py @@ -507,7 +507,7 @@ def file_copy_remote_exists(self, src, dest=None, **kwargs): return True return False - def install_os(self, image_name, checksum, reboot=True, hashing_algorithm="md5"): + def install_os(self, image_name, checksum, reboot=True, hashing_algorithm="md5", issu=False, nssu=False): """Install OS on device and reboot. Args: @@ -515,7 +515,8 @@ def install_os(self, image_name, checksum, reboot=True, hashing_algorithm="md5") reboot (bool): Whether to reboot the device after setting the boot options. Defaults to true. checksum (str): The checksum of the file. hashing_algorithm (str): The hashing algorithm to use. Valid values are 'md5', 'sha1', and 'sha256'. Defaults to 'md5'. - + issu (bool): Whether to perform an In-Service Software Upgrade (ISSU). Defaults to false. + nssu (bool): Whether to perform a Non-Stop Software Upgrade (NSSU). Defaults to false. """ install_ok = self.sw.install( package=image_name, @@ -524,6 +525,8 @@ def install_os(self, image_name, checksum, reboot=True, hashing_algorithm="md5") progress=True, validate=True, no_copy=True, + issu=issu, + nssu=nssu, timeout=3600, )