Skip to content

Commit c2268a1

Browse files
committed
gitflow-feature-stash: add-coupon-support
1 parent 9cbb385 commit c2268a1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

datacrunch/instances/instances.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ def create(self,
350350
startup_script_id: str = None,
351351
volumes: List[Dict] = None,
352352
os_volume: Dict = None,
353-
is_spot: bool = False) -> Instance:
353+
is_spot: bool = False,
354+
coupon: str = None) -> Instance:
354355
"""Creates (deploys) a new instance
355356
356357
:param instance_type: instance type. e.g. '8V100.48M'
@@ -373,6 +374,8 @@ def create(self,
373374
:type os_volume: Dict, optional
374375
:param is_spot: Is spot instance
375376
:type is_spot: bool, optional
377+
:param coupon: coupon code
378+
:type is_spot: str, optional
376379
:return: the new instance object
377380
:rtype: id
378381
"""
@@ -386,7 +389,8 @@ def create(self,
386389
"location": location,
387390
"os_volume": os_volume,
388391
"volumes": volumes,
389-
"is_spot": is_spot
392+
"is_spot": is_spot,
393+
"coupon": coupon
390394
}
391395
id = self._http_client.post(INSTANCES_ENDPOINT, json=payload).text
392396
instance = self.get_by_id(id)

0 commit comments

Comments
 (0)