Skip to content

Commit 27cf90b

Browse files
Merge pull request #2 from garthy/add_model_ref_and_fixup
Add model docs and links to model docs, Add return types, Fixup format
2 parents 3ee14a0 + 198ca20 commit 27cf90b

File tree

6 files changed

+131
-3
lines changed

6 files changed

+131
-3
lines changed

docs/api/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@ Virtual Network
134134

135135
.. autofunction:: to_dict
136136

137-
.. autoclass:: Sentinel
137+
.. autoclass:: Sentinel

oraclebmc/core/blockstorage_client.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def create_volume(self, create_volume_details, **kwargs):
5959
may be rejected).
6060
6161
:return: A Response object with data of type Volume
62+
:rtype: Volume
6263
"""
6364
resource_path = "/volumes"
6465
method = "POST"
@@ -110,6 +111,7 @@ def create_volume_backup(self, create_volume_backup_details, **kwargs):
110111
may be rejected).
111112
112113
:return: A Response object with data of type VolumeBackup
114+
:rtype: VolumeBackup
113115
"""
114116
resource_path = "/volumeBackups"
115117
method = "POST"
@@ -157,6 +159,7 @@ def delete_volume(self, volume_id, **kwargs):
157159
will be updated or deleted only if the etag you provide matches the resource's current etag value.
158160
159161
:return: A Response object with data of type None
162+
:rtype: None
160163
"""
161164
resource_path = "/volumes/{volumeId}"
162165
method = "DELETE"
@@ -203,6 +206,7 @@ def delete_volume_backup(self, volume_backup_id, **kwargs):
203206
will be updated or deleted only if the etag you provide matches the resource's current etag value.
204207
205208
:return: A Response object with data of type None
209+
:rtype: None
206210
"""
207211
resource_path = "/volumeBackups/{volumeBackupId}"
208212
method = "DELETE"
@@ -244,6 +248,7 @@ def get_volume(self, volume_id, **kwargs):
244248
The OCID of the volume.
245249
246250
:return: A Response object with data of type Volume
251+
:rtype: Volume
247252
"""
248253
resource_path = "/volumes/{volumeId}"
249254
method = "GET"
@@ -279,6 +284,7 @@ def get_volume_backup(self, volume_backup_id, **kwargs):
279284
The OCID of the volume backup.
280285
281286
:return: A Response object with data of type VolumeBackup
287+
:rtype: VolumeBackup
282288
"""
283289
resource_path = "/volumeBackups/{volumeBackupId}"
284290
method = "GET"
@@ -325,6 +331,7 @@ def list_volume_backups(self, compartment_id, **kwargs):
325331
The value of the `opc-next-page` response header from the previous \"List\" call.
326332
327333
:return: A Response object with data of type list[VolumeBackup]
334+
:rtype: list[VolumeBackup]
328335
"""
329336
resource_path = "/volumeBackups"
330337
method = "GET"
@@ -383,6 +390,7 @@ def list_volumes(self, compartment_id, **kwargs):
383390
The value of the `opc-next-page` response header from the previous \"List\" call.
384391
385392
:return: A Response object with data of type list[Volume]
393+
:rtype: list[Volume]
386394
"""
387395
resource_path = "/volumes"
388396
method = "GET"
@@ -436,6 +444,7 @@ def update_volume(self, volume_id, update_volume_details, **kwargs):
436444
will be updated or deleted only if the etag you provide matches the resource's current etag value.
437445
438446
:return: A Response object with data of type Volume
447+
:rtype: Volume
439448
"""
440449
resource_path = "/volumes/{volumeId}"
441450
method = "PUT"
@@ -487,6 +496,7 @@ def update_volume_backup(self, volume_backup_id, update_volume_backup_details, *
487496
will be updated or deleted only if the etag you provide matches the resource's current etag value.
488497
489498
:return: A Response object with data of type VolumeBackup
499+
:rtype: VolumeBackup
490500
"""
491501
resource_path = "/volumeBackups/{volumeBackupId}"
492502
method = "PUT"

oraclebmc/core/compute_client.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def attach_volume(self, attach_volume_details, **kwargs):
4343
may be rejected).
4444
4545
:return: A Response object with data of type VolumeAttachment
46+
:rtype: VolumeAttachment
4647
"""
4748
resource_path = "/volumeAttachments/"
4849
method = "POST"
@@ -103,6 +104,7 @@ def capture_console_history(self, capture_console_history_details, **kwargs):
103104
may be rejected).
104105
105106
:return: A Response object with data of type ConsoleHistory
107+
:rtype: ConsoleHistory
106108
"""
107109
resource_path = "/instanceConsoleHistories/"
108110
method = "POST"
@@ -156,6 +158,7 @@ def create_image(self, create_image_details, **kwargs):
156158
may be rejected).
157159
158160
:return: A Response object with data of type Image
161+
:rtype: Image
159162
"""
160163
resource_path = "/images/"
161164
method = "POST"
@@ -198,6 +201,7 @@ def delete_console_history(self, instance_console_history_id, **kwargs):
198201
will be updated or deleted only if the etag you provide matches the resource's current etag value.
199202
200203
:return: A Response object with data of type None
204+
:rtype: None
201205
"""
202206
resource_path = "/instanceConsoleHistories/{instanceConsoleHistoryId}"
203207
method = "DELETE"
@@ -244,6 +248,7 @@ def delete_image(self, image_id, **kwargs):
244248
will be updated or deleted only if the etag you provide matches the resource's current etag value.
245249
246250
:return: A Response object with data of type None
251+
:rtype: None
247252
"""
248253
resource_path = "/images/{imageId}"
249254
method = "DELETE"
@@ -293,6 +298,7 @@ def detach_volume(self, volume_attachment_id, **kwargs):
293298
will be updated or deleted only if the etag you provide matches the resource's current etag value.
294299
295300
:return: A Response object with data of type None
301+
:rtype: None
296302
"""
297303
resource_path = "/volumeAttachments/{volumeAttachmentId}"
298304
method = "DELETE"
@@ -336,6 +342,7 @@ def get_console_history(self, instance_console_history_id, **kwargs):
336342
The OCID of the console history.
337343
338344
:return: A Response object with data of type ConsoleHistory
345+
:rtype: ConsoleHistory
339346
"""
340347
resource_path = "/instanceConsoleHistories/{instanceConsoleHistoryId}"
341348
method = "GET"
@@ -379,6 +386,7 @@ def get_console_history_content(self, instance_console_history_id, **kwargs):
379386
Length of the snapshot data to retrieve.
380387
381388
:return: A Response object with data of type bytes
389+
:rtype: bytes
382390
"""
383391
resource_path = "/instanceConsoleHistories/{instanceConsoleHistoryId}/data"
384392
method = "GET"
@@ -427,6 +435,7 @@ def get_image(self, image_id, **kwargs):
427435
The OCID of the image.
428436
429437
:return: A Response object with data of type Image
438+
:rtype: Image
430439
"""
431440
resource_path = "/images/{imageId}"
432441
method = "GET"
@@ -462,6 +471,7 @@ def get_instance(self, instance_id, **kwargs):
462471
The OCID of the instance.
463472
464473
:return: A Response object with data of type Instance
474+
:rtype: Instance
465475
"""
466476
resource_path = "/instances/{instanceId}"
467477
method = "GET"
@@ -497,6 +507,7 @@ def get_volume_attachment(self, volume_attachment_id, **kwargs):
497507
The OCID of the volume attachment.
498508
499509
:return: A Response object with data of type VolumeAttachment
510+
:rtype: VolumeAttachment
500511
"""
501512
resource_path = "/volumeAttachments/{volumeAttachmentId}"
502513
method = "GET"
@@ -562,6 +573,7 @@ def instance_action(self, instance_id, action, **kwargs):
562573
will be updated or deleted only if the etag you provide matches the resource's current etag value.
563574
564575
:return: A Response object with data of type Instance
576+
:rtype: Instance
565577
"""
566578
resource_path = "/instances/{instanceId}"
567579
method = "POST"
@@ -645,6 +657,7 @@ def launch_instance(self, launch_instance_details, **kwargs):
645657
may be rejected).
646658
647659
:return: A Response object with data of type Instance
660+
:rtype: Instance
648661
"""
649662
resource_path = "/instances/"
650663
method = "POST"
@@ -698,6 +711,7 @@ def list_console_histories(self, compartment_id, **kwargs):
698711
The OCID of the instance.
699712
700713
:return: A Response object with data of type list[ConsoleHistory]
714+
:rtype: list[ConsoleHistory]
701715
"""
702716
resource_path = "/instanceConsoleHistories/"
703717
method = "GET"
@@ -772,6 +786,7 @@ def list_images(self, compartment_id, **kwargs):
772786
The value of the `opc-next-page` response header from the previous \"List\" call.
773787
774788
:return: A Response object with data of type list[Image]
789+
:rtype: list[Image]
775790
"""
776791
resource_path = "/images/"
777792
method = "GET"
@@ -841,6 +856,7 @@ def list_instances(self, compartment_id, **kwargs):
841856
The value of the `opc-next-page` response header from the previous \"List\" call.
842857
843858
:return: A Response object with data of type list[Instance]
859+
:rtype: list[Instance]
844860
"""
845861
resource_path = "/instances/"
846862
method = "GET"
@@ -905,6 +921,7 @@ def list_shapes(self, compartment_id, **kwargs):
905921
The OCID of an image.
906922
907923
:return: A Response object with data of type list[Shape]
924+
:rtype: list[Shape]
908925
"""
909926
resource_path = "/shapes"
910927
method = "GET"
@@ -972,6 +989,7 @@ def list_vnic_attachments(self, compartment_id, **kwargs):
972989
The OCID of the VNIC.
973990
974991
:return: A Response object with data of type list[VnicAttachment]
992+
:rtype: list[VnicAttachment]
975993
"""
976994
resource_path = "/vnicAttachments/"
977995
method = "GET"
@@ -1043,6 +1061,7 @@ def list_volume_attachments(self, compartment_id, **kwargs):
10431061
The OCID of the volume.
10441062
10451063
:return: A Response object with data of type list[VolumeAttachment]
1064+
:rtype: list[VolumeAttachment]
10461065
"""
10471066
resource_path = "/volumeAttachments/"
10481067
method = "GET"
@@ -1101,6 +1120,7 @@ def terminate_instance(self, instance_id, **kwargs):
11011120
will be updated or deleted only if the etag you provide matches the resource's current etag value.
11021121
11031122
:return: A Response object with data of type None
1123+
:rtype: None
11041124
"""
11051125
resource_path = "/instances/{instanceId}"
11061126
method = "DELETE"
@@ -1157,6 +1177,7 @@ def update_image(self, image_id, update_image_details, **kwargs):
11571177
will be updated or deleted only if the etag you provide matches the resource's current etag value.
11581178
11591179
:return: A Response object with data of type Image
1180+
:rtype: Image
11601181
"""
11611182
resource_path = "/images/{imageId}"
11621183
method = "PUT"
@@ -1218,6 +1239,7 @@ def update_instance(self, instance_id, update_instance_details, **kwargs):
12181239
will be updated or deleted only if the etag you provide matches the resource's current etag value.
12191240
12201241
:return: A Response object with data of type Instance
1242+
:rtype: Instance
12211243
"""
12221244
resource_path = "/instances/{instanceId}"
12231245
method = "PUT"

0 commit comments

Comments
 (0)