Skip to content

Commit 8bec937

Browse files
Merge pull request #36 from Exabyte-io/feature/SOF-7708
feature/SOF-7708 update: pass params in update
2 parents 1c18995 + 8201844 commit 8bec937

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/cicd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ concurrency:
99
jobs:
1010

1111
run-linter:
12-
runs-on: ubuntu-20.04
12+
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
1515
python-version: [3.10.13]
@@ -33,7 +33,7 @@ jobs:
3333
python-version: ${{ matrix.python-version }}
3434

3535
run-tests:
36-
runs-on: ubuntu-20.04
36+
runs-on: ubuntu-latest
3737
strategy:
3838
matrix:
3939
python-version: [3.10.13]

exabyte_api_client/endpoints/entity.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,20 @@ def delete(self, id_):
6363
"""
6464
return self.request("DELETE", "/".join((self.name, id_)), headers=self.headers)
6565

66-
def update(self, id_, modifier):
66+
def update(self, id_, modifier, parameters=None):
6767
"""
6868
Updates a entity with given ID.
6969
7070
Args:
7171
id_ (str): entity ID.
7272
modifier (dict): a dictionary of key-values to update entity with.
73+
parameters (dict): additional request parameters.
7374
7475
Returns:
7576
dict: updated entity.
7677
"""
77-
return self.request("PATCH", "/".join((self.name, id_)), data=json.dumps(modifier), headers=self.headers)
78+
return self.request("PATCH", "/".join((self.name, id_)), data=json.dumps(modifier), headers=self.headers,
79+
params=parameters)
7880

7981
def create(self, config, owner_id=None):
8082
"""

0 commit comments

Comments
 (0)