Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Commit dcb43b2

Browse files
committed
add termination_time
1 parent cf41966 commit dcb43b2

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

packet/Device.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def __init__(self, data, manager):
2222
self.spot_price_max = data.get('spot_price_max')
2323
self.state = data['state']
2424
self.tags = data['tags']
25+
self.termination_time = data.get('termination_time')
2526
self.updated_at = data['updated_at']
2627
self.user = data['user']
2728

packet/Manager.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def create_device(self,
8686
spot_instance=False,
8787
spot_price_max=-1,
8888
tags={},
89+
termination_time=None,
8990
userdata=''):
9091

9192
params = {
@@ -109,6 +110,7 @@ def create_device(self,
109110
if spot_instance:
110111
params['spot_instance'] = spot_instance
111112
params['spot_price_max'] = spot_price_max
113+
params['termination_time'] = termination_time
112114
data = self.call_api('projects/%s/devices' % project_id, type='POST', params=params)
113115
return Device(data, self)
114116

0 commit comments

Comments
 (0)