Skip to content

Commit

Permalink
Moving oraclebmc package into a src/ subdirectory and adding some doc…
Browse files Browse the repository at this point in the history
…umentation (#22)
  • Loading branch information
mross22 authored Jun 29, 2017
1 parent bfa6e95 commit 40977ac
Show file tree
Hide file tree
Showing 200 changed files with 532 additions and 437 deletions.
19 changes: 19 additions & 0 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,22 @@ Load Balancer
.. autofunction:: to_dict

.. autoclass:: Sentinel

=========
Request
=========
.. module:: oraclebmc.request

.. autoclass:: Request
:members:
:undoc-members:

=========
Response
=========
.. module:: oraclebmc.response

.. autoclass:: Response
:members:
:undoc-members:

23 changes: 0 additions & 23 deletions oraclebmc/response.py

This file was deleted.

5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def open_relative(*path):
return io.open(filename, mode="r", encoding="utf-8")


with open_relative("oraclebmc", "version.py") as fd:
with open_relative("src", "oraclebmc", "version.py") as fd:
version = re.search(
r"^__version__\s*=\s*['\"]([^'\"]*)['\"]",
fd.read(), re.MULTILINE).group(1)
Expand Down Expand Up @@ -47,7 +47,8 @@ def open_relative(*path):
long_description=readme,
author="Oracle",
author_email="[email protected]",
packages=find_packages(exclude=["docs", "tests*"]),
packages=find_packages(where="src"),
package_dir={"": "src"},
include_package_data=True,
install_requires=requires,
license="Universal Permissive License 1.0 or Apache License 2.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def create_volume(self, create_volume_details, **kwargs):
has been deleted and purged from the system, then a retry of the original creation request
may be rejected).
:return: A Response object with data of type Volume
:rtype: Volume
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.Volume`
:rtype: :class:`~oraclebmc.response.Response`
"""
resource_path = "/volumes"
method = "POST"
Expand Down Expand Up @@ -110,8 +110,8 @@ def create_volume_backup(self, create_volume_backup_details, **kwargs):
has been deleted and purged from the system, then a retry of the original creation request
may be rejected).
:return: A Response object with data of type VolumeBackup
:rtype: VolumeBackup
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.VolumeBackup`
:rtype: :class:`~oraclebmc.response.Response`
"""
resource_path = "/volumeBackups"
method = "POST"
Expand Down Expand Up @@ -158,8 +158,8 @@ def delete_volume(self, volume_id, **kwargs):
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
will be updated or deleted only if the etag you provide matches the resource's current etag value.
:return: A Response object with data of type None
:rtype: None
:return: A :class:`~oraclebmc.response.Response` object with data of type None
:rtype: :class:`~oraclebmc.response.Response`
"""
resource_path = "/volumes/{volumeId}"
method = "DELETE"
Expand Down Expand Up @@ -205,8 +205,8 @@ def delete_volume_backup(self, volume_backup_id, **kwargs):
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
will be updated or deleted only if the etag you provide matches the resource's current etag value.
:return: A Response object with data of type None
:rtype: None
:return: A :class:`~oraclebmc.response.Response` object with data of type None
:rtype: :class:`~oraclebmc.response.Response`
"""
resource_path = "/volumeBackups/{volumeBackupId}"
method = "DELETE"
Expand Down Expand Up @@ -247,8 +247,8 @@ def get_volume(self, volume_id, **kwargs):
:param str volume_id: (required)
The OCID of the volume.
:return: A Response object with data of type Volume
:rtype: Volume
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.Volume`
:rtype: :class:`~oraclebmc.response.Response`
"""
resource_path = "/volumes/{volumeId}"
method = "GET"
Expand Down Expand Up @@ -283,8 +283,8 @@ def get_volume_backup(self, volume_backup_id, **kwargs):
:param str volume_backup_id: (required)
The OCID of the volume backup.
:return: A Response object with data of type VolumeBackup
:rtype: VolumeBackup
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.VolumeBackup`
:rtype: :class:`~oraclebmc.response.Response`
"""
resource_path = "/volumeBackups/{volumeBackupId}"
method = "GET"
Expand Down Expand Up @@ -330,8 +330,8 @@ def list_volume_backups(self, compartment_id, **kwargs):
:param str page: (optional)
The value of the `opc-next-page` response header from the previous \"List\" call.
:return: A Response object with data of type list[VolumeBackup]
:rtype: list[VolumeBackup]
:return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.core.models.VolumeBackup`
:rtype: :class:`~oraclebmc.response.Response`
"""
resource_path = "/volumeBackups"
method = "GET"
Expand Down Expand Up @@ -389,8 +389,8 @@ def list_volumes(self, compartment_id, **kwargs):
:param str page: (optional)
The value of the `opc-next-page` response header from the previous \"List\" call.
:return: A Response object with data of type list[Volume]
:rtype: list[Volume]
:return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.core.models.Volume`
:rtype: :class:`~oraclebmc.response.Response`
"""
resource_path = "/volumes"
method = "GET"
Expand Down Expand Up @@ -443,8 +443,8 @@ def update_volume(self, volume_id, update_volume_details, **kwargs):
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
will be updated or deleted only if the etag you provide matches the resource's current etag value.
:return: A Response object with data of type Volume
:rtype: Volume
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.Volume`
:rtype: :class:`~oraclebmc.response.Response`
"""
resource_path = "/volumes/{volumeId}"
method = "PUT"
Expand Down Expand Up @@ -495,8 +495,8 @@ def update_volume_backup(self, volume_backup_id, update_volume_backup_details, *
parameter to the value of the etag from a previous GET or POST response for that resource. The resource
will be updated or deleted only if the etag you provide matches the resource's current etag value.
:return: A Response object with data of type VolumeBackup
:rtype: VolumeBackup
:return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.core.models.VolumeBackup`
:rtype: :class:`~oraclebmc.response.Response`
"""
resource_path = "/volumeBackups/{volumeBackupId}"
method = "PUT"
Expand Down
Loading

0 comments on commit 40977ac

Please sign in to comment.