Skip to content

Commit

Permalink
gcp: spot_delete
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Mar 19, 2024
1 parent e1d8f12 commit cd4f874
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kvirt/providers/gcp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,8 @@ def create(self, name, virttype=None, profile='', flavor=None, plan='kvirt', cpu
if 'scheduling' not in body:
body['scheduling'] = {}
body['scheduling']['provisioningModel'] = 'SPOT'
if overrides.get('spot_delete', False):
body['scheduling']['instanceTerminationAction'] = 'DELETE'
if overrides.get('preemptible', False):
if 'scheduling' not in body:
body['scheduling'] = {}
Expand Down

0 comments on commit cd4f874

Please sign in to comment.