class HMSLocalServerRestService {

    @RequestMapping( value = { "/{host_id}/bootoptions", "/{host_id}/chassisidentify", "/{host_id}/selinfo" },
                     method = RequestMethod.PUT )
    @ResponseBody
    public ResponseEntity<Object> putMirrorHostInfo( @RequestBody( required = false ) String body, HttpMethod method,
                                                     HttpServletRequest request, HttpServletResponse response )
        throws HMSRestException, URISyntaxException, JsonParseException, JsonMappingException, IOException
    {
        ResponseEntity<Object> nodes;
        String path = request.getServletPath() + request.getPathInfo();
        try
        {
            String query = request.getQueryString();
            HttpMethod httpMethod = HttpMethod.valueOf( request.getMethod() );
            String contentType = request.getContentType();
            HmsOobAgentRestTemplate<String> restTemplate = new HmsOobAgentRestTemplate<String>( body, contentType );
            nodes = restTemplate.exchange( httpMethod, path, query, Object.class );
        }
        catch ( HttpStatusCodeException e )
        {
            HttpHeaders headers = new HttpHeaders();
            headers.setContentType( MediaType.APPLICATION_JSON );
            nodes = new ResponseEntity<Object>( e.getResponseBodyAsString(), headers, e.getStatusCode() );
        }
        catch ( Exception e )
        {
            throw new HMSRestException( HttpStatus.INTERNAL_SERVER_ERROR.value(), "Server Error",
                                        "Exception while connecting to hms." + ( ( path != null ) ? path : "" ) );
        }
        return nodes;
    }

}