Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/mm.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added issu and nssu upgrade choices for install on juniper devices.
7 changes: 5 additions & 2 deletions pyntc/devices/jnpr_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,15 +507,16 @@ 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:
image_name (str): Name of image.
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,
Expand All @@ -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,
)

Expand Down
Loading