This repository has been archived by the owner on Sep 26, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move YARD macros definitions inside the class.
- Loading branch information
Showing
5 changed files
with
44 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,52 @@ | ||
# @!macro [attach] sinatra.get | ||
# | ||
# @overload get "$1" | ||
# | ||
# @return HTTP response. Hash formatted in the format defined by | ||
# requested output type(XML, YAML or JSON). | ||
# | ||
# | ||
# | ||
# @!macro [new] type | ||
# @param [String] :type Type is one of Nagios objects like hosts, hostgroupsroups, etc. | ||
# | ||
# @!macro [new] name | ||
# @param [String] :name | ||
# | ||
# @!macro [new] hostname | ||
# @param [String] :hostname Configured Nagios hostname | ||
# | ||
# @!macro [new] service_name | ||
# @param [String] :service_name Configured Nagios service for the host | ||
# | ||
# @!macro [new] accepted | ||
# | ||
# <b>Accepted output type modifiers:</b> | ||
# | ||
# @!macro [new] list | ||
# | ||
# - +/_list+ : Short list of available objects, depending on the | ||
# current request context: hosts, services, etc. | ||
# | ||
# @!macro [new] state | ||
# | ||
# - +/_state+ - Instead of full status information send only | ||
# current state. For hosts up/down, for services OK, Warn, | ||
# Critical, Unknown (0,1,2-1) | ||
# | ||
# @!macro [new] full | ||
# | ||
# - +/_full+ - Show full status information. When used in | ||
# /_status/_full call will display full hoststaus and | ||
# servicestatus information for each host. | ||
# | ||
# | ||
require_relative '../lib/nagira' | ||
## | ||
# Main class of Nagira application implementing RESTful API for | ||
# Nagios. | ||
# | ||
class Nagira < Sinatra::Base | ||
|
||
include OutputTypeable | ||
# @!macro [attach] sinatra.get | ||
# | ||
# @overload get "$1" | ||
# | ||
# @return HTTP response. Hash formatted in the format defined by | ||
# requested output type(XML, YAML or JSON). | ||
# | ||
# | ||
# | ||
# @!macro [new] type | ||
# @param [String] :type Type is one of Nagios objects like hosts, hostgroupsroups, etc. | ||
# | ||
# @!macro [new] name | ||
# @param [String] :name | ||
# | ||
# @!macro [new] hostname | ||
# @param [String] :hostname Configured Nagios hostname | ||
# | ||
# @!macro [new] service_name | ||
# @param [String] :service_name Configured Nagios service for the host | ||
# | ||
# @!macro [new] accepted | ||
# | ||
# <b>Accepted output type modifiers:</b> | ||
# | ||
# @!macro [new] list | ||
# | ||
# - +/_list+ : Short list of available objects, depending on the | ||
# current request context: hosts, services, etc. | ||
# | ||
# @!macro [new] state | ||
# | ||
# - +/_state+ - Instead of full status information send only | ||
# current state. For hosts up/down, for services OK, Warn, | ||
# Critical, Unknown (0,1,2-1) | ||
# | ||
# @!macro [new] full | ||
# | ||
# - +/_full+ - Show full status information. When used in | ||
# /_status/_full call will display full hoststaus and | ||
# servicestatus information for each host. | ||
# | ||
# | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters