@@ -144,18 +144,22 @@ def create_with_ssh_password(self, username, password):
144
144
raise NotImplementedError ()
145
145
146
146
def create_with_ssh_key (self , ip , ssh_key_data , tags = []):
147
- """Create a gateway instance using SSH key credentials to access the host
148
-
149
- Args:
150
- ip: str
151
- The IP address of the proxy host. Used for internal
152
- communication.
153
- ssh_key_data: str
154
- The ssh key data as a string.
155
- tags: list
156
- Tags to use, e.g. "{ 'tag1': 'foo', 'tag2', 'bar' }".
157
-
158
- Returns: Worker ID
147
+ """Create a gateway instance using SSH key credentials to access the host.
148
+
149
+ Parameters
150
+ ----------
151
+ ip: str
152
+ The IP address of the proxy host. Used for internal
153
+ communication.
154
+ ssh_key_data: str
155
+ The ssh key data as a string.
156
+ tags: list
157
+ Tags to use, e.g. "{ 'tag1': 'foo', 'tag2', 'bar' }".
158
+
159
+ Returns
160
+ -------
161
+ string
162
+ Worker ID
159
163
"""
160
164
161
165
assert isinstance (
@@ -221,22 +225,26 @@ def delete(self, worker_id):
221
225
def wait_for_status (self , worker_id , status = [], timeout_secs = 1200 ):
222
226
"""Wait for K8S worker status.
223
227
224
- Args:
225
- worker_id: str
226
- The worker ID - format: '/api/v1/workers/[0-9]+'
227
- status: list[:py:class:`WorkerK8sStatus`]
228
- Status(es) to wait for. Use an empty array if you want to
229
- wait for a cluster's existence to cease.
230
- timeout_secs: int
231
- How long to wait for the status(es) before raising an
232
- exception.
233
-
234
- Returns:
235
- bool: True if status was found before timeout, otherwise False
236
-
237
- Raises:
238
- APIItemNotFoundException: if the item is not found and status is
239
- not empty
228
+ Parameters
229
+ ----------
230
+ worker_id: str
231
+ The worker ID - format: '/api/v1/workers/[0-9]+'
232
+ status: list[:py:class:`WorkerK8sStatus`]
233
+ Status(es) to wait for. Use an empty array if you want to
234
+ wait for a cluster's existence to cease.
235
+ timeout_secs: int
236
+ How long to wait for the status(es) before raising an
237
+ exception.
238
+
239
+ Returns
240
+ -------
241
+ bool
242
+ True if status was found before timeout, otherwise False
243
+
244
+ Raises
245
+ ------
246
+ APIItemNotFoundException
247
+ If the item is not found and status is not empty
240
248
APIException: if a generic API exception occurred
241
249
"""
242
250
assert isinstance (
0 commit comments