Skip to content

Commit

Permalink
dcache-frontend: add "Requires admin role" to alarms methods (Swagger)
Browse files Browse the repository at this point in the history
To make the alarms Swagger annotations consistent across the RESTful services.

Target: master
Request: 4.2
Request: 4.1
Acked-by: Paul
  • Loading branch information
alrossi committed Jun 11, 2018
1 parent 429e8ab commit 78787fe
Showing 1 changed file with 10 additions and 10 deletions.
Expand Up @@ -120,7 +120,7 @@ public final class AlarmsResources {
private AlarmsInfoService service;


@ApiOperation(value = "General information about alarms service.",
@ApiOperation(value = "General information about alarms service. Requires admin role.",
hidden = true)
@GET
@Produces(MediaType.APPLICATION_JSON)
Expand All @@ -131,7 +131,7 @@ public String info() {


@GET
@ApiOperation("Provides a filtered list of log entries.")
@ApiOperation("Provides a filtered list of log entries. Requires admin role.")
@ApiResponses({
@ApiResponse(code = 400, message = "Bad request"),
@ApiResponse(code = 403, message = "Alarm service only accessible to admin users."),
Expand Down Expand Up @@ -191,7 +191,7 @@ public List<LogEntry> getAlarms(@ApiParam("Number of entries to skip in director

@PATCH
@Path("logentries") // collection of all LogEntry.
@ApiOperation("Batch request to update or delete the indicated alarms.")
@ApiOperation("Batch request to update or delete the indicated alarms. Requires admin role.")
@ApiResponses({
@ApiResponse(code = 400, message = "Bad request"),
@ApiResponse(code = 403, message = "Alarm service only accessible to admin users."),
Expand Down Expand Up @@ -268,7 +268,7 @@ public Response bulkUpdateOrDelete(@ApiParam(value = "A JSON object "


@GET
@ApiOperation(value = "Request for a single log entry.", hidden = true)
@ApiOperation(value = "Request for a single log entry. Requires admin role.", hidden = true)
@Path("/logentries/{key}")
@Produces(MediaType.APPLICATION_JSON)
public LogEntry getLogEntry(@ApiParam("The log entry to provide.")
Expand All @@ -279,7 +279,7 @@ public LogEntry getLogEntry(@ApiParam("The log entry to provide.")


@PATCH
@ApiOperation("Request to open or close the indicated log entry.")
@ApiOperation("Request to open or close the indicated log entry. Requires admin role.")
@ApiResponses({
@ApiResponse(code = 400, message = "Bad request"),
@ApiResponse(code = 403, message = "Alarm service only accessible to admin users."),
Expand Down Expand Up @@ -319,7 +319,7 @@ public Response updateAlarmEntry(@ApiParam("The identifier for the specific log


@DELETE
@ApiOperation("Delete a specific log entry.")
@ApiOperation("Delete a specific log entry. Requires admin role.")
@ApiResponses({
@ApiResponse(code = 400, message = "Bad request"),
@ApiResponse(code = 403, message = "Alarm service only accessible to admin users."),
Expand Down Expand Up @@ -350,7 +350,7 @@ public Response deleteAlarmEntry(@ApiParam("The identifier for the specific log


@GET
@ApiOperation("Request the current mapping of all alarm types to priorities.")
@ApiOperation("Request the current mapping of all alarm types to priorities. Requires admin role.")
@ApiResponses({
@ApiResponse(code = 403, message = "Alarm service only accessible to admin users.")
})
Expand All @@ -367,7 +367,7 @@ public Map<String, String> getPriorities() {


@GET
@ApiOperation("Request the current mapping of an alarm type to its priority.")
@ApiOperation("Request the current mapping of an alarm type to its priority. Requires admin role.")
@ApiResponses({
@ApiResponse(code = 403, message = "Alarm service only accessible to admin users.")
})
Expand All @@ -385,7 +385,7 @@ public String getPriority(@ApiParam("The alarm type.")


@PUT
@ApiOperation(value="Change the priority of the given alarm type.",
@ApiOperation(value="Change the priority of the given alarm type. Requires admin role.",
hidden=true)
@Path("/priorities/{type}")
@Produces(MediaType.APPLICATION_JSON)
Expand All @@ -398,7 +398,7 @@ public Response updatePriority(@ApiParam("The alarm type.")


@DELETE
@ApiOperation(value="Reset the priority of the given alarm to the default.",
@ApiOperation(value="Reset the priority of the given alarm to the default. Requires admin role.",
hidden=true)
@Path("/priorities/{type}")
@Produces(MediaType.APPLICATION_JSON)
Expand Down

0 comments on commit 78787fe

Please sign in to comment.