class HMSLocalServerRestService {

    @RequestMapping( value = { "/{host_id}" }, method = RequestMethod.PUT )
    public @ResponseBody ResponseEntity<Object> updateNode( @PathVariable String host_id,
                                                            @RequestParam( "action" ) String action,
                                                            @RequestBody( required = false ) String body,
                                                            HttpMethod method, HttpServletRequest request,
                                                            HttpServletResponse response )
        throws HMSRestException, URISyntaxException, JsonParseException, JsonMappingException, IOException
    {
        try
        {
            if ( InventoryLoader.getInstance().getNode( host_id ) != null )
            {
                NodeAdminStatus nodeAdminAction = NodeAdminStatus.valueOf( action );
                ServerNode node = InventoryLoader.getInstance().getNodeMap().get( host_id );
                node.setAdminStatus( nodeAdminAction );

                BaseResponse baseResponse = new BaseResponse();
                baseResponse.setStatusMessage( String.format( "Admin status for node %s successfully changed to %s.",
                                                              host_id, nodeAdminAction ) );
                baseResponse.setStatusCode( HttpStatus.OK.value() );
                return new ResponseEntity<Object>( baseResponse, HttpStatus.OK );
            }
            else
                throw new HMSRestException( Status.NOT_FOUND.getStatusCode(), "Invalid Request",
                                            "Can't find host with id " + host_id );

        }
        catch ( IllegalArgumentException e )
        {
            logger.info( "Action not of type NodeOperationalStatus" );
        }

        return putMirrorHostInfo( body, method, request, response );
    }

}