class ServerRestService {

    @PUT
    @Path( "/{host_id}/chassisidentify" )
    @Consumes( MediaType.APPLICATION_JSON )
    @Produces( "application/json" )
    public BaseResponse chassisIdentify( @PathParam( "host_id" ) String host_id,
                                         ChassisIdentifyOptions chassisIdentifyOptions )
        throws HMSRestException
    {

        if ( !serverConnector.getNodeMap().containsKey( host_id ) )
            throw new HMSRestException( Status.NOT_FOUND.getStatusCode(), "Invalid Request",
                                        "Can't find host with id " + host_id );
        else
        {
            BaseResponse response = new BaseResponse();
            ServerNode node = (ServerNode) serverConnector.getNodeMap().get( host_id );

            try
            {
                executeTask( node, TaskType.ChassisIdentify, chassisIdentifyOptions );
                response.setStatusCode( Status.ACCEPTED.getStatusCode() );
            }
            catch ( HmsResourceBusyException e )
            {
                throw new HMSRestException( Status.INTERNAL_SERVER_ERROR.getStatusCode(), Constants.RESOURCE_BUSY,
                                            e.getMessage() );
            }
            catch ( HmsException e )
            {
                response.setStatusCode( Status.INTERNAL_SERVER_ERROR.getStatusCode() );
                response.setErrorMessage( "Error while sending Chassis Identify Command." );
                if ( e instanceof HMSRestException )
                {
                    throw e;
                }
                else
                {
                    throw new HMSRestException( Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Server Error",
                                                e.getMessage() );
                }
            }
            catch ( Exception e )
            {
                response.setStatusCode( Status.INTERNAL_SERVER_ERROR.getStatusCode() );
                response.setErrorMessage( "Error while sending Chassis Identify Command." );
                throw new HMSRestException( Status.INTERNAL_SERVER_ERROR.getStatusCode(), "Server Error",
                                            e.getMessage() );
            }

            response.setStatusMessage( "Chassis Identify Succeeded." );
            return response;
        }
    }

}