Skip to content

Commit

Permalink
use reset_types func for reset type support
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Johnson committed Oct 28, 2022
1 parent e9f802c commit f7416e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hetzner/reset.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def observed_reboot(self, patience=300, tries=None, manual=False):
is_down = False

if tries is None:
tries = ['soft', 'hard']
if 'sw' not in self.reset_types:
tries = ['hard']
else:
tries = ['soft', 'hard']

for mode in tries:
self.server.logger.info("Trying to reboot using the %r method.",
Expand Down
1 change: 1 addition & 0 deletions hetzner/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def _rescue_action(self, method, opts=None):

self._update_status(reply)


def activate(self, bits=64, os='linux', authorized_keys=None):
"""
Activate the rescue system if necessary.
Expand Down

0 comments on commit f7416e3

Please sign in to comment.