@@ -40,6 +40,10 @@ async def send_request(
4040
4141 return response
4242
43+ # =============================================================================================
44+ # AUTHENTICATION-CONTROLLER API METHODS
45+ # =============================================================================================
46+
4347 async def login (self , * , username = None , password = None ):
4448 method , url , params = self ._prepare_login (username = username , password = password )
4549 return await self .send_request (method , url , params = params )
@@ -153,36 +157,36 @@ async def snapshot_get(self, uniqueId):
153157 return await self .send_request (method , url )
154158
155159 async def snapshot_add (self , parentNodeId , * , snapshotNode , snapshotData , auth = None ):
156- """
157- Upload data for the new snapshot and save it to the database. The new node is created
158- under the existing configuration node specified by ``parentNodeId``.
159-
160- API: PUT /snapshot?parentNodeId={parentNodeId}
161- """
160+ # Reusing docstrings from the threaded version
162161 method , url , params = self ._prepare_snapshot_add (
163162 parentNodeId = parentNodeId , snapshotNode = snapshotNode , snapshotData = snapshotData
164163 )
165164 return await self .send_request (method , url , params = params , auth = auth )
166165
167166 async def snapshot_update (self , * , snapshotNode , snapshotData , auth = None ):
168- """
169- Upload and update data for an existing snapshot. Both ``snapshotNode`` and ``snapshotData``
170- must have valid ``uniqueId`` fields pointing to an existing node.
171-
172- API: POST /snapshot
173- """
167+ # Reusing docstrings from the threaded version
174168 method , url , params = self ._prepare_snapshot_update (snapshotNode = snapshotNode , snapshotData = snapshotData )
175169 return await self .send_request (method , url , params = params , auth = auth )
176170
177171 async def snapshots_get (self ):
178- """
179- Returns a list of all existing snapshots (list of ``snapshotNode`` objects).
180-
181- API: GET /snapshots
182- """
172+ # Reusing docstrings from the threaded version
183173 method , url = self ._prepare_snapshots_get ()
184174 return await self .send_request (method , url )
185175
176+ # =============================================================================================
177+ # SNAPSHOT-RESTORE-CONTROLLER API METHODS
178+ # =============================================================================================
179+
180+ async def restore_node (self , nodeId , * , auth = None ):
181+ # Reusing docstrings from the threaded version
182+ method , url , url_params = self ._prepare_restore_node (nodeId = nodeId )
183+ return await self .send_request (method , url , url_params = url_params , auth = auth )
184+
185+ async def restore_items (self , * , snapshotItems , auth = None ):
186+ # Reusing docstrings from the threaded version
187+ method , url , params = self ._prepare_restore_items (snapshotItems = snapshotItems )
188+ return await self .send_request (method , url , params = params , auth = auth )
189+
186190
187191SaveRestoreAPI .node_get .__doc__ = _SaveRestoreAPI_Threads .node_get .__doc__
188192SaveRestoreAPI .nodes_get .__doc__ = _SaveRestoreAPI_Threads .nodes_get .__doc__
@@ -203,3 +207,5 @@ async def snapshots_get(self):
203207SaveRestoreAPI .snapshot_add .__doc__ = _SaveRestoreAPI_Threads .snapshot_add .__doc__
204208SaveRestoreAPI .snapshot_update .__doc__ = _SaveRestoreAPI_Threads .snapshot_update .__doc__
205209SaveRestoreAPI .snapshots_get .__doc__ = _SaveRestoreAPI_Threads .snapshots_get .__doc__
210+ SaveRestoreAPI .restore_node .__doc__ = _SaveRestoreAPI_Threads .restore_node .__doc__
211+ SaveRestoreAPI .restore_items .__doc__ = _SaveRestoreAPI_Threads .restore_items .__doc__
0 commit comments