Skip to content

Commit 917f00b

Browse files
committed
add update method
1 parent f9c7399 commit 917f00b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pyhpipam/core/api.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,12 @@ def delete_entity(self, controller, controller_path, **kwargs):
120120
_path = '{}/{}'.format(controller, controller_path)
121121

122122
return self._query(token=self._api_token, method=DELETE, path=_path)
123+
124+
def update_entity(self, controller, data, **kwargs):
125+
_path = controller
126+
_controller_path = kwargs.pop('controller_path', None)
127+
128+
if _controller_path:
129+
_path = '{}/{}'.format(_path, _controller_path)
130+
131+
return self._query(token=self._api_token, method=PATCH, path=_path, data=data)

0 commit comments

Comments
 (0)