class HMSLocalServerRestService {

    @RequestMapping( value = { "", "/" }, method = RequestMethod.GET )
    @ResponseBody
    public Map<String, ServerNode> getAllServerNodes( @RequestBody( required = false ) String body, HttpMethod method,
                                                      HttpServletRequest request, HttpServletResponse response )
        throws HMSRestException
    {
        try
        {
            return InventoryLoader.getInstance().getNodeMap();
        }
        catch ( Exception e )
        {
            logger.error( "Error while trying to get hosts.", e );
            throw new HMSRestException( HttpStatus.INTERNAL_SERVER_ERROR.value(), "Server Error",
                                        "Exception while getting serverNodes." );
        }

    }

}