Skip to content

Added OS Upgrade support to Junos#350

Merged
jeffkala merged 8 commits intodevelopfrom
NAPPS-683/junos-upgrades
Mar 6, 2026
Merged

Added OS Upgrade support to Junos#350
jeffkala merged 8 commits intodevelopfrom
NAPPS-683/junos-upgrades

Conversation

@gsnider2195
Copy link
Contributor

@gsnider2195 gsnider2195 commented Mar 4, 2026

What's Changed

  • Add OS Upgrade support for Junos devices
  • Fix "busy" infinite loop in _wait_for_reboot for various platforms by adding a sleep(10)
  • Minor docstring fix in ios_device.py

Sample OS Upgrade script:

jnpr = pyntc.devices.JunosDevice(host=JNPR_IP, username=JNPR_USER, password=JNPR_PASS, port=22)
src_file = pyntc.utils.models.FileCopyModel(
    download_url=FTP_URL,
    checksum=MD5_CHECKSUM,
    file_name=FILENAME,
    hashing_algorithm="md5",
    timeout=1200,
    file_size=330656851,
)
jnpr.remote_file_copy(src=src_file, dest=DEST_FILEPATH)
jnpr.save()
jnpr.install_os(image_name=DEST_FILEPATH, checksum=MD5_CHECKSUM)

TODO

  • Docs
  • Testing

Copy link
Contributor

@smk4664 smk4664 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This great so far. I don't see any issues with these commands or changes.

@gsnider2195
Copy link
Contributor Author

gsnider2195 commented Mar 5, 2026

@jeffkala I'm not sure what we're going to do about Python 3.13 support since the f5 sdk is no longer maintained and it hasn't been updated for Py3.13. Should we remove Py3.13 from CI for now?

@gsnider2195 gsnider2195 marked this pull request as ready for review March 5, 2026 00:20
@jeffkala
Copy link
Contributor

jeffkala commented Mar 5, 2026

@jeffkala I'm not sure what we're going to do about Python 3.13 support since the f5 sdk is no longer maintained and it hasn't been updated for Py3.13. Should we remove Py3.13 from CI for now?

Maybe just move it to use netmiko for f5? https://github.com/ktbyers/netmiko/blob/develop/netmiko/f5/f5_tmsh_ssh.py

@gsnider2195
Copy link
Contributor Author

@jeffkala I'm not sure what we're going to do about Python 3.13 support since the f5 sdk is no longer maintained and it hasn't been updated for Py3.13. Should we remove Py3.13 from CI for now?

Maybe just move it to use netmiko for f5? https://github.com/ktbyers/netmiko/blob/develop/netmiko/f5/f5_tmsh_ssh.py

Can that be a follow-up so it doesn't block this feature? This is supposed to be done by tomorrow and still needs changes in os upgrades.

Copy link
Contributor

@smk4664 smk4664 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! And I agree, we should remove testing for 3.13 for now as we get a plan to support F5 through Netmiko.

@gsnider2195
Copy link
Contributor Author

BTW I opened an issue in this repo to track replacing the F5 sdk library.

@jeffkala
Copy link
Contributor

jeffkala commented Mar 5, 2026

do what you need to get this passing, if turning off py3.13 is the answer short term I'm good with it.

self.native.open()

def reboot(self, wait_for_reload=False, **kwargs):
def reboot(self, wait_for_reload=False, timeout=3600, confirm=None):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure we don't need kwargs? I feel like you're right to move them, but does the backend library support passing other "things" that we need to support.

@jeffkala jeffkala merged commit 415c1bc into develop Mar 6, 2026
10 checks passed
@gsnider2195 gsnider2195 mentioned this pull request Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants