File tree Expand file tree Collapse file tree 4 files changed +21
-6
lines changed
Expand file tree Collapse file tree 4 files changed +21
-6
lines changed Original file line number Diff line number Diff line change 11Changelog
22=========
33
4+ v1.0.10 (2022-10-18)
5+ -------------------
6+
7+ * Added support for adding a coupon code when deploying a new instance
8+
49v1.0.9 (2022-09-16)
510-------------------
611
Original file line number Diff line number Diff line change @@ -36,17 +36,23 @@ Code Contribution:
3636
37375. Make your local changes
3838
39- 6. Run tests::
39+ 6. Install dependencies for test::
40+
41+ pip3 install -e .[test]
42+
43+ pip3 install -U pytest
44+
45+ 7. Run tests::
4046
4147 pytest
4248
43- 7 . Commit and push::
49+ 8 . Commit and push::
4450
4551 git commit .am "Detailed commit message"
4652
4753 git push origin {branch-name}
4854
49- 8 . Submit a pull request in GitHub.
55+ 9 . Submit a pull request in GitHub.
5056
5157Pull Request Guidelines
5258------------------------
Original file line number Diff line number Diff line change 1- VERSION = '1.0.9 '
1+ VERSION = '1.0.10 '
Original file line number Diff line number Diff 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 )
You can’t perform that action at this time.
0 commit comments