MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / update_cloud_server

Function update_cloud_server

web/pgadmin/misc/cloud/__init__.py:221–241  ·  view source on GitHub ↗

Update Cloud Server.

()

Source from the content-addressed store, hash-verified

219)
220@pga_login_required
221def update_cloud_server():
222 """Update Cloud Server."""
223 server_data = json.loads(request.data)
224 status, server = update_server(server_data)
225
226 if not status:
227 return make_json_response(
228 status=410, success=0, errormsg=sanitize_external_text(server)
229 )
230
231 return make_json_response(
232 success=1,
233 data={'node': {
234 'sid': server.id,
235 'gid': server.servergroup_id,
236 '_type': 'server',
237 'icon': 'icon-server-not-connected',
238 'id': 'server_{}'.format(server.id),
239 'label': server.name
240 }}
241 )

Callers

nothing calls this directly

Calls 3

make_json_responseFunction · 0.90
sanitize_external_textFunction · 0.90
update_serverFunction · 0.85

Tested by

no test coverage detected