Skip to content

Commit

Permalink
AMBARI-23201 Integrate ViewService with Swagger (#701)
Browse files Browse the repository at this point in the history
CI failure was due to unrelated agent issue.

* AMBARI-23201 Integrate_ViewService - addition of ViewPrivilegeService,
ViewService and ViewVersionService

Change-Id: I47ed9ed0b0a34bd8983515ea84f27ab5062d2515

* AMBARI-23201 Integrate_ViewService - addition of ViewPermissionService

Change-Id: I0ac606f654369f0528e18f301f8a57a7711b8497

* AMBARI-23201 Integrate_ViewService - addition of ViewInstanceService

Change-Id: I72f9cb032dbd0c49d4e48cf4042d71d89514e4fc

* AMBARI-23201 Integrate_ViewService - addition of ViewDataMigrationService

Change-Id: I1518f9cd61649377ba996fcd0392f901339aecfb

* AMBARI-23201 Integrate_ViewService - update ViewPrivilegeRequest API doc

Change-Id: I3aaf78d827476c17ab38a7156c88263b34ca6f46

* AMBARI-23201 Integrate_ViewService - addition of ViewUrlsService

Change-Id: I9cb3df78f9f56d569d0f8f2a34cfa4da9c113ae6

* AMBARI-23201 Integrate_ViewService - fix whitespace

Change-Id: I8409da0214d88609550cf1d3bc302c2f389837c8

* AMBARI-21008 fix @Api and @path orders, make property constants consistent across all affected files

Change-Id: Ief645a3bb8267499164756efb94bf2018d05cc8d
  • Loading branch information
g-boros authored and benyoka committed Mar 29, 2018
1 parent d3b2ced commit 4727a74
Show file tree
Hide file tree
Showing 43 changed files with 1,298 additions and 933 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import org.apache.ambari.server.view.ViewDataMigrationUtility;
import org.apache.ambari.server.view.ViewRegistry;
import org.apache.ambari.view.migration.ViewDataMigrationException;
import org.apache.http.HttpStatus;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -40,8 +41,8 @@
/**
* Service responsible for data migration between view instances.
*/
@Api(tags = "Views", description = "Endpoint for view specific operations")
@Path("/views/{viewName}/versions/{version}/instances/{instanceName}/migrate")
@Api(tags = "Views", description = "Endpoint for view specific operations")
public class ViewDataMigrationService extends BaseService {
/**
* Logger.
Expand Down Expand Up @@ -70,11 +71,15 @@ public class ViewDataMigrationService extends BaseService {
*/
@PUT
@Path("{originVersion}/{originInstanceName}")
@ApiOperation(value = "Migrate view instance data", nickname = "ViewDataMigrationService#migrateData", notes = "Migrates view instance persistence data from origin view instance specified in the path params.")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successful operation"),
@ApiResponse(code = 500, message = "Server Error")}
)
@ApiOperation(value = "Migrate view instance data", notes = "Migrates view instance persistence data from origin view instance specified in the path params.")
@ApiResponses({
@ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
@ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_CLUSTER_NOT_FOUND),
@ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
@ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
@ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
@ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
})
public Response migrateData( @ApiParam(value = "view name") @PathParam("viewName") String viewName,
@ApiParam(value = "view version") @PathParam("version") String viewVersion,
@ApiParam(value = "instance name") @PathParam("instanceName") String instanceName,
Expand Down

0 comments on commit 4727a74

Please sign in to comment.