@@ -17,7 +17,8 @@ def __init__(
17
17
"""
18
18
Helper to create a DSS Instance
19
19
20
- :param object client: :class:`dataikuapi.fm.fmclient`
20
+ :param client: The FM client
21
+ :type client: :class:`dataikuapi.fm.fmclient`
21
22
:param str label: The label of the instance
22
23
:param str instance_settings_template: The instance settings template id this instance should be based on
23
24
:param str virtual_network: The virtual network where the instance should be spawned
@@ -37,7 +38,7 @@ def with_dss_node_type(self, dss_node_type):
37
38
"""
38
39
Set the DSS Node type of the instance to create
39
40
40
- :param str dss_node_type: Optional , the type of the dss node to create. Supports "design", "automation ordeployer ". Defaults to "design"
41
+ :param str dss_node_type: Optional , the type of the dss node to create. Supports "design", "automation" or "deployer ". Defaults to "design"
41
42
:rtype: :class:`dataikuapi.fm.instances.FMInstanceCreator`
42
43
"""
43
44
if dss_node_type not in ["design" , "automation" , "deployer" ]:
@@ -51,7 +52,7 @@ def with_cloud_instance_type(self, cloud_instance_type):
51
52
"""
52
53
Set the machine type for the DSS Instance
53
54
54
- :param str cloud_instance_type
55
+ :param str cloud_instance_type: the machine type to be used for the instance
55
56
:rtype: :class:`dataikuapi.fm.instances.FMInstanceCreator`
56
57
"""
57
58
self .data ["cloudInstanceType" ] = cloud_instance_type
@@ -69,11 +70,12 @@ def with_data_volume_options(
69
70
"""
70
71
Set the options of the data volume to use with the DSS Instance
71
72
72
- :param str data_volume_type: Optional, Data volume type
73
- :param int data_volume_size: Optional, Data volume initial size
74
- :param int data_volume_size_max: Optional, Data volume maximum size
75
- :param int data_volume_IOPS: Optional, Data volume IOPS
76
- :param object data_volume_encryption: Optional, a :class:`dataikuapi.fm.instances.FMInstanceEncryptionMode` setting the encryption mode of the data volume
73
+ :param str data_volume_type: Optional, data volume type
74
+ :param int data_volume_size: Optional, data volume initial size
75
+ :param int data_volume_size_max: Optional, data volume maximum size
76
+ :param int data_volume_IOPS: Optional, data volume IOPS
77
+ :param data_volume_encryption: Optional, encryption mode of the data volume
78
+ :type data_volume_encryption: :class:`dataikuapi.fm.instances.FMInstanceEncryptionMode`
77
79
:param str data_volume_encryption_key: Optional, the encryption key to use when data_volume_encryption_key is FMInstanceEncryptionMode.CUSTOM
78
80
:rtype: :class:`dataikuapi.fm.instances.FMInstanceCreator`
79
81
"""
@@ -135,7 +137,7 @@ def create(self):
135
137
"""
136
138
Create the DSS instance
137
139
138
- :return: Created DSS Instance
140
+ :return: a newly created DSS instance
139
141
:rtype: :class:`dataikuapi.fm.instances.FMAWSInstance`
140
142
"""
141
143
instance = self .client ._perform_tenant_json (
@@ -149,7 +151,7 @@ def create(self):
149
151
"""
150
152
Create the DSS instance
151
153
152
- :return: Created DSS Instance
154
+ :return: a newly created DSS instance
153
155
:rtype: :class:`dataikuapi.fm.instances.FMAzureInstance`
154
156
"""
155
157
instance = self .client ._perform_tenant_json (
@@ -163,7 +165,7 @@ def create(self):
163
165
"""
164
166
Create the DSS instance
165
167
166
- :return: Created DSS Instance
168
+ :return: a newly created DSS instance
167
169
:rtype: :class:`dataikuapi.fm.instances.FMGCPInstance`
168
170
"""
169
171
instance = self .client ._perform_tenant_json (
@@ -175,7 +177,12 @@ def create(self):
175
177
class FMInstance (object ):
176
178
"""
177
179
A handle to interact with a DSS instance.
178
- Do not create this directly, use :meth:`FMClient.get_instance` or :meth: `FMClient.new_instance_creator`
180
+ Do not create this directly, use :meth:`dataikuapi.fmclient.FMClient.get_instance` or
181
+
182
+ * :meth:`dataikuapi.fmclient.FMClientAWS.new_instance_creator`
183
+ * :meth:`dataikuapi.fmclient.FMClientAzure.new_instance_creator`
184
+ * :meth:`dataikuapi.fmclient.FMClientGCP.new_instance_creator`
185
+
179
186
"""
180
187
181
188
def __init__ (self , client , instance_data ):
@@ -187,8 +194,8 @@ def reprovision(self):
187
194
"""
188
195
Reprovision the physical DSS instance
189
196
190
- :return: A :class:`~dataikuapi.fm.future.FMFuture` representing the reprovision process
191
- :rtype: :class:`~ dataikuapi.fm.future.FMFuture`
197
+ :return: the `Future` object representing the reprovision process
198
+ :rtype: :class:`dataikuapi.fm.future.FMFuture`
192
199
"""
193
200
future = self .client ._perform_tenant_json (
194
201
"GET" , "/instances/%s/actions/reprovision" % self .id
@@ -199,8 +206,8 @@ def deprovision(self):
199
206
"""
200
207
Deprovision the physical DSS instance
201
208
202
- :return: A :class:`~dataikuapi.fm.future.FMFuture` representing the deprovision process
203
- :rtype: :class:`~ dataikuapi.fm.future.FMFuture`
209
+ :return: the `Future` object representing the deprovision process
210
+ :rtype: :class:`dataikuapi.fm.future.FMFuture`
204
211
"""
205
212
future = self .client ._perform_tenant_json (
206
213
"GET" , "/instances/%s/actions/deprovision" % self .id
@@ -211,8 +218,8 @@ def restart_dss(self):
211
218
"""
212
219
Restart the DSS running on the physical instance
213
220
214
- :return: A :class:`~dataikuapi.fm.future.FMFuture` representing the restart process
215
- :rtype: :class:`~ dataikuapi.fm.future.FMFuture`
221
+ :return: the `Future` object representing the restart process
222
+ :rtype: :class:`dataikuapi.fm.future.FMFuture`
216
223
"""
217
224
future = self .client ._perform_tenant_json (
218
225
"GET" , "/instances/%s/actions/restart-dss" % self .id
@@ -221,7 +228,7 @@ def restart_dss(self):
221
228
222
229
def save (self ):
223
230
"""
224
- Update the Instance.
231
+ Update the instance
225
232
"""
226
233
self .client ._perform_tenant_empty (
227
234
"PUT" , "/instances/%s" % self .id , body = self .instance_data
@@ -233,6 +240,9 @@ def save(self):
233
240
def get_status (self ):
234
241
"""
235
242
Get the physical DSS instance's status
243
+
244
+ :return: the instance status
245
+ :rtype: :class:`dataikuapi.fm.instances.FMInstanceStatus`
236
246
"""
237
247
status = self .client ._perform_tenant_json (
238
248
"GET" , "/instances/%s/status" % self .id
@@ -243,8 +253,8 @@ def delete(self):
243
253
"""
244
254
Delete the DSS instance
245
255
246
- :return: A :class:`~dataikuapi.fm.future.FMFuture` representing the deletion process
247
- :rtype: :class:`~ dataikuapi.fm.future.FMFuture`
256
+ :return: the `Future` object representing the deletion process
257
+ :rtype: :class:`dataikuapi.fm.future.FMFuture`
248
258
"""
249
259
future = self .client ._perform_tenant_json (
250
260
"GET" , "/instances/%s/actions/delete" % self .id
@@ -269,8 +279,8 @@ def reset_user_password(self, username, password):
269
279
270
280
:param string username: login
271
281
:param string password: new password
272
- :return: A :class:`~dataikuapi.fm.future.FMFuture` representing the password reset process
273
- :rtype: :class:`~ dataikuapi.fm.future.FMFuture`
282
+ :return: the `Future` object representing the password reset process
283
+ :rtype: :class:`dataikuapi.fm.future.FMFuture`
274
284
"""
275
285
future = self .client ._perform_tenant_json (
276
286
"GET" , "/instances/%s/actions/reset-user-password" % self .id , params = { 'userName' :username , 'password' :password }
@@ -281,8 +291,8 @@ def replay_setup_actions(self):
281
291
"""
282
292
Replay the setup actions on the DSS instance
283
293
284
- :return: A :class:`~dataikuapi.fm.future.FMFuture` representing the replay process
285
- :rtype: :class:`~ dataikuapi.fm.future.FMFuture`
294
+ :return: the `Future` object representing the replay process
295
+ :rtype: :class:`dataikuapi.fm.future.FMFuture`
286
296
"""
287
297
future = self .client ._perform_tenant_json (
288
298
"GET" , "/instances/%s/actions/replay-setup-actions" % self .id
@@ -291,7 +301,7 @@ def replay_setup_actions(self):
291
301
292
302
def set_automated_snapshots (self , enable , period , keep = 0 ):
293
303
"""
294
- Set the automated snapshots policy for this instance
304
+ Set the automated snapshot policy for this instance
295
305
296
306
:param boolean enable: Enable the automated snapshots
297
307
:param int period: The time period between 2 snapshot in hours
@@ -308,7 +318,7 @@ def set_custom_certificate(self, pem_data):
308
318
309
319
Only needed when Virtual Network HTTPS Strategy is set to Custom Certificate
310
320
311
- param: str pem_data: The SSL certificate
321
+ :param str pem_data: The SSL certificate
312
322
"""
313
323
self .instance_data ["sslCertificatePEM" ] = pem_data
314
324
return self
@@ -320,7 +330,7 @@ def set_custom_certificate(self, pem_data):
320
330
321
331
def list_snapshots (self ):
322
332
"""
323
- List all snapshots of this instance
333
+ List all the snapshots of this instance
324
334
325
335
:return: list of snapshots
326
336
:rtype: list of :class:`dataikuapi.fm.instances.FMSnapshot`
@@ -341,7 +351,7 @@ def get_snapshot(self, snapshot_id):
341
351
342
352
def snapshot (self , reason_for_snapshot = None ):
343
353
"""
344
- Create a snapshot of the DSS instance
354
+ Create a snapshot of the instance
345
355
346
356
:return: Snapshot
347
357
:rtype: :class:`dataikuapi.fm.instances.FMSnapshot`
@@ -357,7 +367,7 @@ def set_elastic_ip(self, enable, elasticip_allocation_id):
357
367
Set a public elastic ip for this instance
358
368
359
369
:param boolan enable: Enable the elastic ip allocation
360
- :param str elaticip_allocation_id : AWS ElasticIP allocation ID
370
+ :param str elasticip_allocation_id : AWS ElasticIP allocation ID
361
371
"""
362
372
self .instance_data ["awsAssignElasticIP" ] = enable
363
373
self .instance_data ["awsElasticIPAllocationId" ] = elasticip_allocation_id
@@ -399,7 +409,7 @@ class FMInstanceEncryptionMode(Enum):
399
409
400
410
class FMInstanceStatus (dict ):
401
411
"""A class holding read-only information about an Instance.
402
- This class should not be created directly. Instead, use :meth:`FMInstance.get_info `
412
+ This class should not be created directly. Instead, use :meth:`FMInstance.get_status `
403
413
"""
404
414
405
415
def __init__ (self , data ):
@@ -435,8 +445,8 @@ def reprovision(self):
435
445
"""
436
446
Reprovision the physical DSS instance from this snapshot
437
447
438
- :return: A :class:`~dataikuapi.fm.future.FMFuture` representing the reprovision process
439
- :rtype: :class:`~ dataikuapi.fm.future.FMFuture`
448
+ :return: the `Future` object representing the reprovision process
449
+ :rtype: :class:`dataikuapi.fm.future.FMFuture`
440
450
"""
441
451
future = self .client ._perform_tenant_json (
442
452
"POST" , "/instances/%s/snapshots/%s/reprovision" % (self .instance_id , self .snapshot_id )
@@ -447,8 +457,8 @@ def delete(self):
447
457
"""
448
458
Delete the snapshot
449
459
450
- :return: A :class:`~dataikuapi.fm.future.FMFuture` representing the deletion process
451
- :rtype: :class:`~ dataikuapi.fm.future.FMFuture`
460
+ :return: the `Future` object representing the deletion process
461
+ :rtype: :class:`dataikuapi.fm.future.FMFuture`
452
462
"""
453
463
future = self .client ._perform_tenant_json (
454
464
"DELETE" , "/instances/%s/snapshots/%s" % (self .instance_id , self .snapshot_id )
0 commit comments