Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions linode_api4/groups/obj.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from deprecated import deprecated

from linode_api4.errors import UnexpectedResponseError
from linode_api4.groups import Group
from linode_api4.objects import Base, ObjectStorageCluster, ObjectStorageKeys
Expand All @@ -9,8 +11,14 @@ class ObjectStorageGroup(Group):
available clusters and managing keys.
"""

@deprecated(
reason="deprecated to use regions list API for listing available OJB clusters"
)
def clusters(self, *filters):
"""
This endpoint will be deprecated to use the regions list API to list available OBJ clusters,
and a new access key API will directly expose the S3 endpoint hostname.

Returns a list of available Object Storage Clusters. You may filter
this query to return only Clusters that are available in a specific region::

Expand Down
8 changes: 8 additions & 0 deletions linode_api4/groups/object_storage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from urllib import parse

from deprecated import deprecated

from linode_api4.errors import UnexpectedResponseError
from linode_api4.groups import Group
from linode_api4.objects import (
Expand All @@ -19,8 +21,14 @@ class ObjectStorageGroup(Group):
available clusters, buckets, and managing keys and TLS/SSL certs, etc.
"""

@deprecated(
reason="deprecated to use regions list API for listing available OJB clusters"
)
def clusters(self, *filters):
"""
This endpoint will be deprecated to use the regions list API to list available OBJ clusters,
and a new access key API will directly expose the S3 endpoint hostname.

Returns a list of available Object Storage Clusters. You may filter
this query to return only Clusters that are available in a specific region::

Expand Down
8 changes: 8 additions & 0 deletions linode_api4/objects/object_storage.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from urllib import parse

from deprecated import deprecated

from linode_api4.errors import UnexpectedResponseError
from linode_api4.objects import (
Base,
Expand Down Expand Up @@ -463,8 +465,14 @@ def access(self, cluster, bucket_name, permissions):
}


@deprecated(

@yec-akamai yec-akamai May 29, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we need to deprecate the cluster-view, I assume that we want to deprecate the ObjectStorageCluster class. I'm also wondering if we should move the function buckets_in_cluster from here to the obj_storage group.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good idea 馃憤

reason="deprecated to use regions list API for viewing available OJB clusters"
)
class ObjectStorageCluster(Base):
"""
This class will be deprecated to use the regions list to view available OBJ clusters,
and a new access key API will directly expose the S3 endpoint hostname.

A cluster where Object Storage is available.

API documentation: https://www.linode.com/docs/api/object-storage/#cluster-view
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = ["requests", "polling"]
dependencies = ["requests", "polling", "deprecated"]
dynamic = ["version"]

[project.optional-dependencies]
Expand Down