Automation

Expand all | Collapse all

Need equivalent pyez method of request system software rollback

  • 1.  Need equivalent pyez method of request system software rollback

    Posted 02-03-2021 08:14
    Hi,
    Need equivalent command of request system software rollback <image>. Found this in the documentation under jnpr.junos.utils.sw: 
    1. rollback()
      Issues the 'request' command to do the rollback and returns the string output of the results.

      Returns Rollback results (str)

    But the ask is to rollback to a particular image from a list of images present. Not seeing the rollback() taking any arguments like image name. Any idea how this can be achieved?


  • 2.  RE: Need equivalent pyez method of request system software rollback

    Posted 02-19-2021 15:42
    The request system software rollback command does not accept image names. It reverts to the last successfully installed package.  

    https://www.juniper.net/documentation/en_US/junos/topics/reference/command-summary/request-system-software-rollback.html
    Use this command to revert to the last successfully installed package before the request system software (add | delete) command. It uses the copy stored in the /var/sw/pkg directory.

    If you want to install a specific image, you will have to perform a normal install as outlined here:
    https://www.juniper.net/documentation/en_US/junos-pyez/topics/task/program/junos-pyez-program-software-installing.html

    ------------------------------
    Benjamin Griffin
    ------------------------------



  • 3.  RE: Need equivalent pyez method of request system software rollback

    Posted 03-13-2021 08:53

    Hi Benjamin,

    In junos evolved, we do have the options to display the list of images installed and rollback to a specific version. Do we have equivalent support in pyez?

    https://www.juniper.net/documentation/en_US/junos/topics/reference/command-summary/show-system-software-list.html 
    https://www.juniper.net/documentation/en_US/junos/topics/reference/command-summary/request-system-software-rollback.html

    request system software rollback
    <no-validate>
    <package-name>
    <reboot>
    <validate>
    <with-old-snapshot-config>

    Thanks,
    Vinay