def reboot(self, client):
        """Execute reboot command on instance."""
        self._set_init_system(client)

        reboot_cmd = "{sudo} '{stop_ssh};{reboot}'".format(
            sudo=self.get_sudo_exec_wrapper(),
            stop_ssh=self.get_stop_ssh_service_cmd(),
            reboot=self.get_reboot_cmd()
        )

        try:
            ipa_utils.execute_ssh_command(
                client,
                reboot_cmd
            )
        except Exception as error:
            raise IpaDistroException(
                'An error occurred rebooting instance: %s' % error
            )
        ipa_utils.clear_cache()
def reboot ( self , client ) : self . _set_init_system ( client ) reboot_cmd = "{sudo} '{stop_ssh};{reboot}'" . format ( sudo = self . get_sudo_exec_wrapper ( ) , stop_ssh = self . get_stop_ssh_service_cmd ( ) , reboot = self . get_reboot_cmd ( ) ) try : ipa_utils . execute_ssh_command ( client , reboot_cmd ) except Exception as error : raise IpaDistroException ( 'An error occurred rebooting instance: %s' % error ) ipa_utils . clear_cache ( )
Execute reboot command on instance.