diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-20 10:42:42 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-20 10:42:42 +0000 |
commit | 07b827b24be90120e333312f34ecc350600c21c1 (patch) | |
tree | 3a300a750bc24e24dd0784a66283b89cf94dc5b9 /lib/custodian | |
parent | e6ae4c75010355ce1a1f4b93473ea024450c204c (diff) |
Updated comments
Diffstat (limited to 'lib/custodian')
-rw-r--r-- | lib/custodian/alerter.rb | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/lib/custodian/alerter.rb b/lib/custodian/alerter.rb index 198716f..2a86bbe 100644 --- a/lib/custodian/alerter.rb +++ b/lib/custodian/alerter.rb @@ -19,10 +19,27 @@ require 'ipaddr' class Alerter + # + # Details of the test case which we're going to raise/clear. + # attr_reader :details + + # + # The currently allocated IP-ranges which belong to Bytemark. + # + # These are used to test if an alert refers to a machine outwith our + # network. + # BYTEMARK_RANGES = %w(80.68.80.0/20 89.16.160.0/19 212.110.160.0/19 46.43.0.0/18 91.223.58.0/24 213.138.96.0/19 5.153.224.0/21 2001:41c8::/32).collect{|i| IPAddr.new(i)} + + + # + # Constructor. + # + # Save the details away. + # def initialize( test_details ) @details = test_details end @@ -32,7 +49,8 @@ class Alerter # - # Expand to a message indicating whether a hostname is inside bytemark. + # Expand to a message indicating whether a hostname is inside + # the Bytemark network. # def expand_inside_bytemark( host ) @@ -98,8 +116,13 @@ class Alerter end + + + # - # Raise the alert. + # Generate an alert-message which will be raised via mauve. + # + # TODO: Refactor into common code: raise/clear duplicate too much. # def raise( detail ) @@ -168,8 +191,12 @@ class Alerter end + + + # + # Generate an alert-message which will be cleared via mauve. # - # Clear the alert. + # TODO: Refactor into common code: raise/clear duplicate too much. # def clear |