70 The endpoint to get every bucket data
72 title =
"get_s3_bucket"
75 self.
disp.log_debug(f
"Token = {token}", title)
79 self.
disp.log_debug(f
"Bucket names: {bucket_names}", title)
80 if isinstance(bucket_names, int):
98 self.
disp.log_debug(f
"Token = {token}", title)
102 message=
"Authorisation required.",
109 self.
disp.log_debug(f
"received in {title}", table)
121 The endpoint allowing a user to stop the server.
124 Response: _description_: The data to send back to the user as a response.
126 title =
"Stop server"
132 "Non-admin user tried to stop the server.", title
136 message=
"You do not have enough privileges to run this endpoint.",
137 resp=
"privilege to low",
141 return HCI.unauthorized(content=body, content_type=CONST.CONTENT_TYPE, headers=self.
runtime_data_initialised.json_header)
144 message=
"The server is stopping",
149 self.
disp.log_debug(
"Server shutting down...", f
"{title}")
155 msg =
"The server is stopping with errors, cron exited "
156 msg += f
"with {status}."
170 return HCI.internal_server_error(content=body, content_type=CONST.CONTENT_TYPE, headers=self.
runtime_data_initialised.json_header)
171 return HCI.success(content=body, content_type=CONST.CONTENT_TYPE, headers=self.
runtime_data_initialised.json_header)
175 The endpoint to trigger a specific action.
178 id (str): _description_
179 request (Request): _description_
182 Response: _description_
184 title =
"trigger_endpoint"
192 "Non-admin user tried to trigger an action.", title
203 if isinstance(node, int):
206 message=f
"The action {id} does not exist.",
218 self.
disp.log_debug(f
"run_data = {run_data}", title)
222 self.
disp.log_debug(f
"run_data_sanitised = {run_data}", title)