Skip to content

Commit 40977ac

Browse files
authored
Moving oraclebmc package into a src/ subdirectory and adding some documentation (#22)
1 parent bfa6e95 commit 40977ac

File tree

200 files changed

+532
-437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+532
-437
lines changed

docs/api/index.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,22 @@ Load Balancer
155155
.. autofunction:: to_dict
156156

157157
.. autoclass:: Sentinel
158+
159+
=========
160+
Request
161+
=========
162+
.. module:: oraclebmc.request
163+
164+
.. autoclass:: Request
165+
:members:
166+
:undoc-members:
167+
168+
=========
169+
Response
170+
=========
171+
.. module:: oraclebmc.response
172+
173+
.. autoclass:: Response
174+
:members:
175+
:undoc-members:
176+

oraclebmc/response.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def open_relative(*path):
1818
return io.open(filename, mode="r", encoding="utf-8")
1919

2020

21-
with open_relative("oraclebmc", "version.py") as fd:
21+
with open_relative("src", "oraclebmc", "version.py") as fd:
2222
version = re.search(
2323
r"^__version__\s*=\s*['\"]([^'\"]*)['\"]",
2424
fd.read(), re.MULTILINE).group(1)
@@ -47,7 +47,8 @@ def open_relative(*path):
4747
long_description=readme,
4848
author="Oracle",
4949
author_email="[email protected]",
50-
packages=find_packages(exclude=["docs", "tests*"]),
50+
packages=find_packages(where="src"),
51+
package_dir={"": "src"},
5152
include_package_data=True,
5253
install_requires=requires,
5354
license="Universal Permissive License 1.0 or Apache License 2.0",
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

oraclebmc/core/blockstorage_client.py renamed to src/oraclebmc/core/blockstorage_client.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def create_volume(self, create_volume_details, **kwargs):
5858
has been deleted and purged from the system, then a retry of the original creation request
5959
may be rejected).
6060
61-
:return: A Response object with data of type Volume
62-
:rtype: Volume
61+
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.Volume`
62+
:rtype: :class:`~oraclebmc.response.Response`
6363
"""
6464
resource_path = "/volumes"
6565
method = "POST"
@@ -110,8 +110,8 @@ def create_volume_backup(self, create_volume_backup_details, **kwargs):
110110
has been deleted and purged from the system, then a retry of the original creation request
111111
may be rejected).
112112
113-
:return: A Response object with data of type VolumeBackup
114-
:rtype: VolumeBackup
113+
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.VolumeBackup`
114+
:rtype: :class:`~oraclebmc.response.Response`
115115
"""
116116
resource_path = "/volumeBackups"
117117
method = "POST"
@@ -158,8 +158,8 @@ def delete_volume(self, volume_id, **kwargs):
158158
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
159159
will be updated or deleted only if the etag you provide matches the resource's current etag value.
160160
161-
:return: A Response object with data of type None
162-
:rtype: None
161+
:return: A :class:`~oraclebmc.response.Response` object with data of type None
162+
:rtype: :class:`~oraclebmc.response.Response`
163163
"""
164164
resource_path = "/volumes/{volumeId}"
165165
method = "DELETE"
@@ -205,8 +205,8 @@ def delete_volume_backup(self, volume_backup_id, **kwargs):
205205
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
206206
will be updated or deleted only if the etag you provide matches the resource's current etag value.
207207
208-
:return: A Response object with data of type None
209-
:rtype: None
208+
:return: A :class:`~oraclebmc.response.Response` object with data of type None
209+
:rtype: :class:`~oraclebmc.response.Response`
210210
"""
211211
resource_path = "/volumeBackups/{volumeBackupId}"
212212
method = "DELETE"
@@ -247,8 +247,8 @@ def get_volume(self, volume_id, **kwargs):
247247
:param str volume_id: (required)
248248
The OCID of the volume.
249249
250-
:return: A Response object with data of type Volume
251-
:rtype: Volume
250+
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.Volume`
251+
:rtype: :class:`~oraclebmc.response.Response`
252252
"""
253253
resource_path = "/volumes/{volumeId}"
254254
method = "GET"
@@ -283,8 +283,8 @@ def get_volume_backup(self, volume_backup_id, **kwargs):
283283
:param str volume_backup_id: (required)
284284
The OCID of the volume backup.
285285
286-
:return: A Response object with data of type VolumeBackup
287-
:rtype: VolumeBackup
286+
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.VolumeBackup`
287+
:rtype: :class:`~oraclebmc.response.Response`
288288
"""
289289
resource_path = "/volumeBackups/{volumeBackupId}"
290290
method = "GET"
@@ -330,8 +330,8 @@ def list_volume_backups(self, compartment_id, **kwargs):
330330
:param str page: (optional)
331331
The value of the `opc-next-page` response header from the previous \"List\" call.
332332
333-
:return: A Response object with data of type list[VolumeBackup]
334-
:rtype: list[VolumeBackup]
333+
:return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.core.models.VolumeBackup`
334+
:rtype: :class:`~oraclebmc.response.Response`
335335
"""
336336
resource_path = "/volumeBackups"
337337
method = "GET"
@@ -389,8 +389,8 @@ def list_volumes(self, compartment_id, **kwargs):
389389
:param str page: (optional)
390390
The value of the `opc-next-page` response header from the previous \"List\" call.
391391
392-
:return: A Response object with data of type list[Volume]
393-
:rtype: list[Volume]
392+
:return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.core.models.Volume`
393+
:rtype: :class:`~oraclebmc.response.Response`
394394
"""
395395
resource_path = "/volumes"
396396
method = "GET"
@@ -443,8 +443,8 @@ def update_volume(self, volume_id, update_volume_details, **kwargs):
443443
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
444444
will be updated or deleted only if the etag you provide matches the resource's current etag value.
445445
446-
:return: A Response object with data of type Volume
447-
:rtype: Volume
446+
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.Volume`
447+
:rtype: :class:`~oraclebmc.response.Response`
448448
"""
449449
resource_path = "/volumes/{volumeId}"
450450
method = "PUT"
@@ -495,8 +495,8 @@ def update_volume_backup(self, volume_backup_id, update_volume_backup_details, *
495495
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
496496
will be updated or deleted only if the etag you provide matches the resource's current etag value.
497497
498-
:return: A Response object with data of type VolumeBackup
499-
:rtype: VolumeBackup
498+
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.VolumeBackup`
499+
:rtype: :class:`~oraclebmc.response.Response`
500500
"""
501501
resource_path = "/volumeBackups/{volumeBackupId}"
502502
method = "PUT"

0 commit comments

Comments
 (0)