diff --git a/Gemfile.lock b/Gemfile.lock index c3b2541..8de5f9c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,63 +1,75 @@ GEM remote: https://rubygems.org/ specs: - abstract_type (0.0.7) - adamantium (0.2.0) - ice_nine (~> 0.11.0) - memoizable (~> 0.4.0) - aruba (0.9.0) + activesupport (4.2.5.1) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + aruba (0.13.0) childprocess (~> 0.5.6) contracts (~> 0.9) cucumber (>= 1.3.19) ffi (~> 1.9.10) rspec-expectations (>= 2.99) thor (~> 0.19) - ast (2.1.0) - astrolabe (1.3.1) - parser (~> 2.2) + ast (2.2.0) + axiom-types (0.1.1) + descendants_tracker (~> 0.0.4) + ice_nine (~> 0.11.0) + thread_safe (~> 0.3, >= 0.3.1) bindata (2.1.0) builder (3.2.2) - childprocess (0.5.6) + childprocess (0.5.9) ffi (~> 1.0, >= 1.0.11) + codeclimate-engine-rb (0.3.1) + virtus (~> 1.0) codeclimate-test-reporter (0.4.8) simplecov (>= 0.7.1, < 1.0.0) coderay (1.1.0) - concord (0.1.5) - adamantium (~> 0.2.0) - equalizer (~> 0.0.9) - contracts (0.12.0) - coveralls (0.8.2) + coercible (1.0.0) + descendants_tracker (~> 0.0.1) + contracts (0.13.0) + coveralls (0.8.10) json (~> 1.8) rest-client (>= 1.6.8, < 2) - simplecov (~> 0.10.0) + simplecov (~> 0.11.0) term-ansicolor (~> 1.3) thor (~> 0.19.1) - cucumber (2.1.0) + tins (~> 1.6.0) + cucumber (2.3.2) builder (>= 2.1.2) - cucumber-core (~> 1.3.0) + cucumber-core (~> 1.4.0) + cucumber-wire (~> 0.0.1) diff-lcs (>= 1.1.3) - gherkin3 (~> 3.1.0) + gherkin (~> 3.2.0) multi_json (>= 1.7.5, < 2.0) multi_test (>= 0.1.2) - cucumber-core (1.3.0) - gherkin3 (~> 3.1.0) + cucumber-core (1.4.0) + gherkin (~> 3.2.0) + cucumber-wire (0.0.1) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.2.5) docile (1.1.5) - domain_name (0.5.24) + domain_name (0.5.20160128) unf (>= 0.0.5, < 1.0.0) equalizer (0.0.11) + erubis (2.7.0) ffi (1.9.10) - flay (2.6.1) + flay (2.7.0) + erubis (~> 2.7.0) ruby_parser (~> 3.0) sexp_processor (~> 4.0) flog (4.3.2) ruby_parser (~> 3.1, > 3.1.0) sexp_processor (~> 4.4) formatador (0.2.5) - gherkin3 (3.1.1) - given_core (3.7.1) + gherkin (3.2.0) + given_core (3.8.0) sorcerer (>= 0.3.7) - gli (2.13.2) + gli (2.13.4) guard (2.13.0) formatador (>= 0.2.4) listen (>= 2.7, <= 4.0) @@ -81,85 +93,84 @@ GEM rubocop (~> 0.20) http-cookie (1.0.2) domain_name (~> 0.5) - ice_nine (0.11.1) + i18n (0.7.0) + ice_nine (0.11.2) inch (0.7.0) pry sparkr (>= 0.2.0) term-ansicolor yard (~> 0.8.7.5) json (1.8.3) - listen (3.0.3) + listen (3.0.6) rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - lumberjack (1.0.9) - memoizable (0.4.2) - thread_safe (~> 0.3, >= 0.3.1) + rb-inotify (>= 0.9.7) + lumberjack (1.0.10) method_source (0.8.2) - mime-types (2.6.2) + mime-types (2.99) + minitest (5.8.4) multi_json (1.11.2) multi_test (0.1.2) - nenv (0.2.0) - netrc (0.10.3) + nenv (0.3.0) + netrc (0.11.0) notiffany (0.0.8) nenv (~> 0.1) shellany (~> 0.0) - parser (2.2.2.6) - ast (>= 1.1, < 3.0) - phut (0.6.11) - gli (~> 2.13.2) - pio (~> 0.27.0) - pry (~> 0.10.1) - pio (0.27.1) + parser (2.3.0.6) + ast (~> 2.2) + phut (0.7.7) + activesupport (~> 4.2, >= 4.2.5) + gli (~> 2.13.4) + pio (~> 0.30.0) + pry (~> 0.10.3) + pio (0.30.0) + activesupport (~> 4.2, >= 4.2.4) bindata (~> 2.1.0) powerpack (0.1.1) - private_attr (1.1.0) - procto (0.0.2) - pry (0.10.2) + pry (0.10.3) coderay (~> 1.1.0) method_source (~> 0.8.1) slop (~> 3.4) - rainbow (2.0.0) - rake (10.4.2) - rb-fsevent (0.9.6) - rb-inotify (0.9.5) + rainbow (2.1.0) + rake (10.5.0) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) ffi (>= 0.5.0) - reek (3.5.0) - parser (~> 2.2.2.5) - private_attr (~> 1.1) + reek (3.10.2) + codeclimate-engine-rb (~> 0.3.1) + parser (~> 2.3, >= 2.3.0.6) rainbow (~> 2.0) - unparser (~> 0.2.2) rest-client (1.8.0) http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 3.0) netrc (~> 0.7) - rspec (3.3.0) - rspec-core (~> 3.3.0) - rspec-expectations (~> 3.3.0) - rspec-mocks (~> 3.3.0) - rspec-core (3.3.2) - rspec-support (~> 3.3.0) - rspec-expectations (3.3.1) + rspec (3.4.0) + rspec-core (~> 3.4.0) + rspec-expectations (~> 3.4.0) + rspec-mocks (~> 3.4.0) + rspec-core (3.4.2) + rspec-support (~> 3.4.0) + rspec-expectations (3.4.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.3.0) - rspec-given (3.7.1) - given_core (= 3.7.1) + rspec-support (~> 3.4.0) + rspec-given (3.8.0) + given_core (= 3.8.0) rspec (>= 2.14.0) - rspec-mocks (3.3.2) + rspec-mocks (3.4.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.3.0) - rspec-support (3.3.0) - rubocop (0.34.2) - astrolabe (~> 1.3) - parser (>= 2.2.2.5, < 3.0) + rspec-support (~> 3.4.0) + rspec-support (3.4.1) + rubocop (0.37.2) + parser (>= 2.3.0.4, < 3.0) powerpack (~> 0.1) rainbow (>= 1.99.1, < 3.0) - ruby-progressbar (~> 1.4) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 0.3) ruby-progressbar (1.7.5) - ruby_parser (3.7.1) + ruby_parser (3.7.3) sexp_processor (~> 4.1) - sexp_processor (4.6.0) + sexp_processor (4.6.1) shellany (0.0.1) - simplecov (0.10.0) + simplecov (0.11.2) docile (~> 1.1.0) json (~> 1.8) simplecov-html (~> 0.10.0) @@ -172,23 +183,22 @@ GEM thor (0.19.1) thread_safe (0.3.5) tins (1.6.0) - trema (0.7.1) - bundler (~> 1.10.6) - gli (~> 2.13.2) - phut (~> 0.6.10) - pio (~> 0.27.1) - rake + trema (0.10.0) + bundler (~> 1.11.2) + gli (~> 2.13.4) + phut (~> 0.7.7) + pio (~> 0.30.0) + tzinfo (1.2.2) + thread_safe (~> 0.1) unf (0.1.4) unf_ext - unf_ext (0.0.7.1) - unparser (0.2.4) - abstract_type (~> 0.0.7) - adamantium (~> 0.2.0) - concord (~> 0.1.5) - diff-lcs (~> 1.2.5) - equalizer (~> 0.0.9) - parser (~> 2.2.2) - procto (~> 0.0.2) + unf_ext (0.0.7.2) + unicode-display_width (0.3.1) + virtus (1.0.5) + axiom-types (~> 0.1) + coercible (~> 1.0) + descendants_tracker (~> 0.0, >= 0.0.3) + equalizer (~> 0.0, >= 0.0.9) yard (0.8.7.6) PLATFORMS @@ -215,4 +225,4 @@ DEPENDENCIES yard BUNDLED WITH - 1.10.6 + 1.11.2 diff --git a/features/support/hooks.rb b/features/support/hooks.rb index 391b072..4589898 100644 --- a/features/support/hooks.rb +++ b/features/support/hooks.rb @@ -1,5 +1,5 @@ Before('@sudo') do - fail 'sudo authentication failed' unless system 'sudo -v' + raise 'sudo authentication failed' unless system 'sudo -v' @aruba_timeout_seconds = 5 ENV['TREMA_LOG_DIR'] = '.' ENV['TREMA_PID_DIR'] = '.' diff --git a/lib/switch_monitor.rb b/lib/switch_monitor.rb index 2525324..9e60315 100644 --- a/lib/switch_monitor.rb +++ b/lib/switch_monitor.rb @@ -19,12 +19,12 @@ def switch_disconnected(dpid) end # rubocop:disable AbcSize - def description_stats_reply(dpid, message) - logger.info "Switch #{dpid.to_hex} manufacturer = #{message.manufacturer}" - logger.info "Switch #{dpid.to_hex} hardware info = #{message.hardware}" - logger.info "Switch #{dpid.to_hex} software info = #{message.software}" - logger.info "Switch #{dpid.to_hex} serial number = #{message.serial_number}" - logger.info "Switch #{dpid.to_hex} description = #{message.datapath}" + def description_stats_reply(dpid, desc) + logger.info "Switch #{dpid.to_hex} manufacturer = #{desc.manufacturer}" + logger.info "Switch #{dpid.to_hex} hardware info = #{desc.hardware}" + logger.info "Switch #{dpid.to_hex} software info = #{desc.software}" + logger.info "Switch #{dpid.to_hex} serial number = #{desc.serial_number}" + logger.info "Switch #{dpid.to_hex} description = #{desc.datapath}" end # rubocop:enable AbcSize diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 42b551a..a723e39 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -8,7 +8,7 @@ formatters << CodeClimate::TestReporter::Formatter end -SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[*formatters] +SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(formatters) SimpleCov.start { add_filter '/vendor/' } require 'rspec/given'