# HG changeset patch # User Mahlon E. Smith # Date 1504126502 25200 # Node ID 4548e58c8c66d2b36d3a517439cd585b0348d402 # Parent 71578fe8e9ec8aa52b8c4d43dae92e86f6af8fb3 Use the new #node_properties method, convery from .rvmrc diff -r 71578fe8e9ec -r 4548e58c8c66 .ruby-gemset --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.ruby-gemset Wed Aug 30 13:55:02 2017 -0700 @@ -0,0 +1,1 @@ +arborist-snmp diff -r 71578fe8e9ec -r 4548e58c8c66 .ruby-version --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.ruby-version Wed Aug 30 13:55:02 2017 -0700 @@ -0,0 +1,1 @@ +2.4 diff -r 71578fe8e9ec -r 4548e58c8c66 .rvmrc --- a/.rvmrc Wed Sep 07 15:25:50 2016 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -environment_id="ruby-2.3@arborist-snmp" - -if [[ -d "${rvm_path:-$HOME/.rvm}/environments" - && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]] -then - \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id" - for __hook in "${rvm_path:-$HOME/.rvm}/hooks/after_use"* - do - if [[ -f "${__hook}" && -x "${__hook}" && -s "${__hook}" ]] - then \. "${__hook}" || true - fi - done - unset __hook - if (( ${rvm_use_flag:=1} >= 2 )) # display only when forced - then - if [[ $- == *i* ]] # check for interactive shells - then printf "%b" "Using: $(tput setaf 2 2>/dev/null)$GEM_HOME$(tput sgr0 2>/dev/null)\n" # show the user the ruby and gemset they are using in green - else printf "%b" "Using: $GEM_HOME\n" # don't use colors in non-interactive shells - fi - fi -else - # If the environment file has not yet been created, use the RVM CLI to select. - rvm --create "$environment_id" || { - echo "Failed to create RVM environment '${environment_id}'." - return 1 - } -fi diff -r 71578fe8e9ec -r 4548e58c8c66 Rakefile --- a/Rakefile Wed Sep 07 15:25:50 2016 -0700 +++ b/Rakefile Wed Aug 30 13:55:02 2017 -0700 @@ -44,7 +44,7 @@ EOF s.required_ruby_version = '>= 2' - s.add_dependency 'arborist', "~> 1.0" + s.add_dependency 'arborist', "~> 0.1" s.add_dependency 'snmp', "~> 1.2" end diff -r 71578fe8e9ec -r 4548e58c8c66 lib/arborist/monitor/snmp.rb --- a/lib/arborist/monitor/snmp.rb Wed Sep 07 15:25:50 2016 -0700 +++ b/lib/arborist/monitor/snmp.rb Wed Aug 30 13:55:02 2017 -0700 @@ -23,7 +23,7 @@ log_to :arborist # The version of this library. - VERSION = '0.3.0' + VERSION = '0.3.1' # Global defaults for instances of this monitor # @@ -34,6 +34,14 @@ port: 161 } + # Always request the node addresses and any config. + USED_PROPERTIES = [ :addresses, :config ].freeze + + ### Return the properties used by this monitor. + def self::node_properties + return USED_PROPERTIES + end + ### Connect to the SNMP daemon and yield. ###