Skip to content

Commit

Permalink
Merge branch 'dev' into proj/multicluster-obj
Browse files Browse the repository at this point in the history
  • Loading branch information
zliang-akamai authored Jun 18, 2024
2 parents 8d47be4 + 77e3a84 commit 4889f50
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions linode_api4/objects/object_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,9 @@ def access_modify(
}

resp = self._client.post(
"/object-storage/buckets/{}/{}/access".format(
parse.quote(str(self.cluster)), parse.quote(str(self.id))
),
f"{self.api_endpoint}/access",
data=drop_null_keys(params),
model=self,
)

if "errors" in resp:
Expand Down Expand Up @@ -140,10 +139,9 @@ def access_update(
}

resp = self._client.put(
"/object-storage/buckets/{}/{}/access".format(
parse.quote(str(self.cluster)), parse.quote(str(self.id))
),
f"{self.api_endpoint}/access",
data=drop_null_keys(params),
model=self,
)

if "errors" in resp:
Expand All @@ -165,9 +163,8 @@ def ssl_cert_delete(self):
"""

resp = self._client.delete(
"/object-storage/buckets/{}/{}/ssl".format(
parse.quote(str(self.cluster)), parse.quote(str(self.id))
)
f"{self.api_endpoint}/ssl",
model=self,
)

if "error" in resp:
Expand All @@ -190,9 +187,8 @@ def ssl_cert(self):
:rtype: MappedObject
"""
result = self._client.get(
"/object-storage/buckets/{}/{}/ssl".format(
parse.quote(str(self.cluster)), parse.quote(str(self.id))
)
f"{self.api_endpoint}/ssl",
model=self,
)

if not "ssl" in result:
Expand Down Expand Up @@ -233,10 +229,9 @@ def ssl_cert_upload(self, certificate, private_key):
"private_key": private_key,
}
result = self._client.post(
"/object-storage/buckets/{}/{}/ssl".format(
parse.quote(str(self.cluster)), parse.quote(str(self.id))
),
f"{self.api_endpoint}/ssl",
data=params,
model=self,
)

if not "ssl" in result:
Expand Down Expand Up @@ -300,10 +295,9 @@ def contents(
"page_size": page_size,
}
result = self._client.get(
"/object-storage/buckets/{}/{}/object-list".format(
parse.quote(str(self.cluster)), parse.quote(str(self.id))
),
f"{self.api_endpoint}/object-list",
data=drop_null_keys(params),
model=self,
)

if not "data" in result:
Expand Down

0 comments on commit 4889f50

Please sign in to comment.