sloe 0.8.7 → 0.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Guardfile +23 -0
- data/LICENSE.txt +17 -18
- data/README.md +2 -0
- data/Rakefile +54 -4
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/sloe.rb +1 -4
- data/lib/sloe/common.rb +27 -19
- data/lib/sloe/expectations.rb +134 -0
- data/lib/sloe/version.rb +1 -1
- data/sloe.gemspec +31 -23
- data/spec/blocks_spec.rb +29 -40
- data/spec/methods_spec.rb +48 -72
- data/spec/sloe_spec.rb +7 -0
- data/spec/spec_helper.rb +8 -3
- metadata +121 -28
- data/.rspec +0 -2
- data/mibs/JUNIPER-EXPERIMENT-MIB.yaml +0 -10
- data/mibs/JUNIPER-SP-MIB.yaml +0 -46
- data/test +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16095fc62fe323dba21e6f0fd5be40a97ceee1f2
|
4
|
+
data.tar.gz: f80dab3882c5ffa2be95f1aac98c7d7789fe734f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2c1136ab9ff1dd2be045a04e953e8b81aecef629b1a2b62d666fea66f582b3dfe40d059cb94b09662c414fb28c2c9c81b38fd744ac89cf1c9eab51a64c690ed
|
7
|
+
data.tar.gz: ae2a27f5345e33f6903bb6ad750c457e1d8d50830e00f796029860d88592774abc0bc74f34bd3a79e2a6e36602175d9190baf573203d8fd932e745f2606743da
|
data/.gitignore
CHANGED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
sloe
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.2.1
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at dgethings@juniper.net. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Guardfile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
2
|
+
# watch /lib/ files
|
3
|
+
watch(%r{^lib/(.+).rb$}) do |m|
|
4
|
+
"spec/#{m[1]}_spec.rb"
|
5
|
+
end
|
6
|
+
|
7
|
+
# watch /spec/ files
|
8
|
+
watch(%r{^spec/(.+).rb$}) do |m|
|
9
|
+
"spec/#{m[1]}.rb"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
guard :bundler do
|
14
|
+
require 'guard/bundler'
|
15
|
+
require 'guard/bundler/verify'
|
16
|
+
helper = Guard::Bundler::Verify.new
|
17
|
+
|
18
|
+
files = ['Gemfile']
|
19
|
+
files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
|
20
|
+
|
21
|
+
# Assume files are symlinked from somewhere
|
22
|
+
files.each { |file| watch(helper.real_path(file)) }
|
23
|
+
end
|
data/LICENSE.txt
CHANGED
@@ -1,22 +1,21 @@
|
|
1
|
-
|
1
|
+
The MIT License (MIT)
|
2
2
|
|
3
|
-
|
3
|
+
Copyright (c) 2016 David Gethings
|
4
4
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
the following conditions:
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
12
11
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
15
14
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
OF
|
22
|
-
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1,8 +1,58 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
2
|
require 'rspec/core/rake_task'
|
3
|
-
require '
|
3
|
+
require 'pry-byebug'
|
4
4
|
|
5
|
-
RSpec::Core::RakeTask.new
|
5
|
+
RSpec::Core::RakeTask.new(:spec) do |task|
|
6
|
+
task.rspec_opts = ['--color', '--format', 'doc']
|
7
|
+
end
|
6
8
|
|
7
|
-
task default:
|
8
|
-
task
|
9
|
+
task default: :spec
|
10
|
+
task spec: ['vm:start']
|
11
|
+
|
12
|
+
require 'rubocop/rake_task'
|
13
|
+
RuboCop::RakeTask.new
|
14
|
+
|
15
|
+
namespace :vm do
|
16
|
+
require 'derelict'
|
17
|
+
desc 'list VMs'
|
18
|
+
task :list do
|
19
|
+
Dir.chdir 'vqfx10k' do
|
20
|
+
puts FileList['*'].select { |d| File.directory?(d) }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
desc 'given VM(s) state'
|
25
|
+
task :status, :name do |_, args|
|
26
|
+
raise ArgumentError, 'missing vagrant project name' unless args.name
|
27
|
+
|
28
|
+
project = Derelict.instance('/usr/local').connect 'vqfx10k/' + args.name
|
29
|
+
(1..args.name.match(/\d/)[0].to_i).each do |n|
|
30
|
+
vm = project.vm("vqfx#{n}".to_sym)
|
31
|
+
puts "vqfx#{n} status is #{vm.state}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
desc 'start given VM(s)'
|
36
|
+
task :start, :na do |_, args|
|
37
|
+
raise ArgumentError, 'missing vagrant project name' unless args.name
|
38
|
+
|
39
|
+
project = Derelict.instance('/usr/local').connect 'vqfx10k/' + args.name
|
40
|
+
(1..args.name.match(/\d/)[0].to_i).each do |n|
|
41
|
+
res = project.vm("vqfx#{n}".to_sym).up!
|
42
|
+
raise "failed to start vqfx#{n}: res.stderr" unless res.success?
|
43
|
+
puts "vqfx#{n} status is " + project.vm("vqfx#{n}".to_sym).state.to_s
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
desc 'stop given VM(s)'
|
48
|
+
task :stop, :name do |_, args|
|
49
|
+
raise ArgumentError, 'missing vagrant project name' unless args.name
|
50
|
+
|
51
|
+
project = Derelict.instance('/usr/local').connect 'vqfx10k/' + args.name
|
52
|
+
(1..args.name.match(/\d/)[0].to_i).each do |n|
|
53
|
+
res = project.vm("vqfx#{n}".to_sym).halt!
|
54
|
+
raise "failed to start vqfx#{n}: res.stderr" unless res.success?
|
55
|
+
puts "vqfx#{n} status is " + project.vm("vqfx#{n}".to_sym).state.to_s
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "sloe"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/sloe.rb
CHANGED
data/lib/sloe/common.rb
CHANGED
@@ -2,21 +2,23 @@ require 'net/scp'
|
|
2
2
|
require 'snmp'
|
3
3
|
|
4
4
|
module Sloe
|
5
|
-
#
|
5
|
+
# Inherits from {http://rubydoc.info/gems/netconf/Netconf/SSH Netconf::SSH}
|
6
6
|
class Common < Netconf::SSH
|
7
|
-
|
8
7
|
# Provides access to the SNMP object
|
9
8
|
attr_reader :snmp
|
10
9
|
attr_accessor :logging
|
11
10
|
|
12
11
|
# Create Sloe::Common object.
|
13
|
-
# Accepts arguments for
|
12
|
+
# Accepts arguments for
|
13
|
+
# {http://rubydoc.info/gems/netconf/Netconf/SSH:initialize Netconf::SSH#new}
|
14
|
+
# {http://rubydoc.info/gems/snmp/SNMP/Manager:initialize SNMP::Manager#new}
|
14
15
|
def initialize(args, &block)
|
15
16
|
@snmp_args = {
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
17
|
+
host: args[:target],
|
18
|
+
mib_dir: args[:mib_dir],
|
19
|
+
mib_modules: args[:mib_modules],
|
20
|
+
community: args[:community],
|
21
|
+
port: args[:snmp_port]
|
20
22
|
}
|
21
23
|
@snmp = SNMP::Manager.new(@snmp_args)
|
22
24
|
|
@@ -24,13 +26,13 @@ module Sloe
|
|
24
26
|
# they must be needed/enabled. This also requires extending
|
25
27
|
# Netconf::RPC::Executor.method_missing(), which is done below
|
26
28
|
self.logging = args[:logging]
|
27
|
-
|
29
|
+
|
28
30
|
if block_given?
|
29
|
-
super(
|
31
|
+
super(args, &block)
|
30
32
|
return
|
31
33
|
else
|
32
34
|
super(args)
|
33
|
-
|
35
|
+
open
|
34
36
|
self
|
35
37
|
end
|
36
38
|
end
|
@@ -42,20 +44,18 @@ module Netconf
|
|
42
44
|
class Transport
|
43
45
|
attr_accessor :logging
|
44
46
|
|
45
|
-
def initialize(
|
46
|
-
|
47
|
+
def initialize(&block)
|
47
48
|
@state = :NETCONF_CLOSED
|
48
49
|
@os_type = @args[:os_type] || Netconf::DEFAULT_OS_TYPE
|
49
|
-
|
50
|
-
@rpc = Netconf::RPC::Executor.new(
|
50
|
+
|
51
|
+
@rpc = Netconf::RPC::Executor.new(self, @os_type, self.logging)
|
51
52
|
@rpc_message_id = 1
|
52
53
|
|
53
54
|
if block_given?
|
54
|
-
open(
|
55
|
+
open(&block = nil) # do not pass this block to open()
|
55
56
|
yield self
|
56
|
-
close
|
57
|
+
close
|
57
58
|
end
|
58
|
-
|
59
59
|
end
|
60
60
|
end
|
61
61
|
module RPC
|
@@ -65,10 +65,10 @@ module Netconf
|
|
65
65
|
@trans = trans
|
66
66
|
@logging = logging
|
67
67
|
begin
|
68
|
-
extend Netconf::RPC::const_get( os_type )
|
68
|
+
extend Netconf::RPC::const_get( os_type )
|
69
69
|
rescue NameError
|
70
70
|
# no extensions available ...
|
71
|
-
end
|
71
|
+
end
|
72
72
|
end
|
73
73
|
|
74
74
|
def method_missing( method, params = nil, attrs = nil )
|
@@ -86,4 +86,12 @@ module Netconf
|
|
86
86
|
end
|
87
87
|
end
|
88
88
|
end
|
89
|
+
class SSH
|
90
|
+
def scp
|
91
|
+
@scp ||= Net::SCP.start(@args[:target],
|
92
|
+
@args[:username],
|
93
|
+
password: @args[:password],
|
94
|
+
port: @args[:port] || 22)
|
95
|
+
end
|
96
|
+
end
|
89
97
|
end
|
@@ -0,0 +1,134 @@
|
|
1
|
+
# include it globally in a spec_helper.rb file <tt>require</tt>d
|
2
|
+
# from your spec file(s):
|
3
|
+
# require 'sloe/expectations'
|
4
|
+
#
|
5
|
+
# RSpec::configure do |config|
|
6
|
+
# config.include(Sloe::Expectations::Ixia)
|
7
|
+
# config.include(Sloe::Expectations::Junos)
|
8
|
+
# end
|
9
|
+
module Sloe
|
10
|
+
module Expectations
|
11
|
+
module Ixia
|
12
|
+
def have_no_packet_loss
|
13
|
+
HaveNoPacketLoss.new
|
14
|
+
end
|
15
|
+
|
16
|
+
def have_packet_loss_duration_less_than(duration)
|
17
|
+
HavePacketLossDurationLessThan.new(duration)
|
18
|
+
end
|
19
|
+
|
20
|
+
class HavePacketLossDurationLessThan
|
21
|
+
def initialize(duration)
|
22
|
+
@duration = duration
|
23
|
+
end
|
24
|
+
|
25
|
+
def match(actual)
|
26
|
+
@lossy_flows = actual.select do |row|
|
27
|
+
if row['Packet Loss Duration (ms)'].to_f > @duration.to_f
|
28
|
+
"#{row['Traffic Item']}\t #{row['Source/Dest Endpoint Pair']}:\t\t #{row['Packet Loss Duration (ms)']}\n"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
@lossy_flows.size == 0
|
32
|
+
end
|
33
|
+
|
34
|
+
def failure_message_for_should
|
35
|
+
@lossy_flows
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
class HaveNoPacketLoss
|
40
|
+
def match(actual)
|
41
|
+
@lossy_flows = actual.select do |row|
|
42
|
+
if row['Loss %'].to_f > 0.0
|
43
|
+
"#{row['Source/Dest Endpoint Pair']}:\t\t#{row['Loss %']}\n"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
@lossy_flows.size == 0
|
47
|
+
end
|
48
|
+
|
49
|
+
def failure_message_for_should
|
50
|
+
@lossy_flows
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
class Junos
|
56
|
+
def have_pim_neighbor_on_all_interfaces
|
57
|
+
HavePimNeighborOnAllInterfaces.new
|
58
|
+
end
|
59
|
+
|
60
|
+
def non_jnpr_sfp
|
61
|
+
NonJnprSfp.new
|
62
|
+
end
|
63
|
+
|
64
|
+
def have_all_ospf_neighbors_as(state)
|
65
|
+
HaveAllOspfNeighborsAs.new(state)
|
66
|
+
end
|
67
|
+
|
68
|
+
def have_all_bgp_peers_as(state)
|
69
|
+
HaveAllBgpPeersAs.new(state)
|
70
|
+
end
|
71
|
+
|
72
|
+
class HaveAllOspfNeighborsAs
|
73
|
+
def initialize(state)
|
74
|
+
@state = state
|
75
|
+
end
|
76
|
+
|
77
|
+
def match(actual)
|
78
|
+
data = XmlSimple.xml_in(actual.to_xml)
|
79
|
+
@no_match = data['ospf-neighbor'].select do |neighbor|
|
80
|
+
if neighbor['ospf-neighbor-state'][0] != @state
|
81
|
+
"#{neighbor['neighbor-address'][0]} state is #{neighbor['os
|
82
|
+
pf-neighbor-state'][0]}"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
@no_match.size == 0
|
86
|
+
end
|
87
|
+
|
88
|
+
def failure_message
|
89
|
+
@no_match
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
class NonJnprSfp
|
94
|
+
def match(actual)
|
95
|
+
actual.text.strip != "NON-JNPR"
|
96
|
+
end
|
97
|
+
|
98
|
+
def failure_message_for_should_not
|
99
|
+
'Found NON Juniper SFP on chassis'
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
class HaveAllBgpPeersAs
|
104
|
+
def match(actual)
|
105
|
+
@no_match = actual.xpath('//bgp-peer').each do |peer|
|
106
|
+
if peer.xpath('peer-state').text != @state
|
107
|
+
"#{peer.xpath('peer-address').text} state is #{peer.xpath('peer-state').text}"
|
108
|
+
end
|
109
|
+
end
|
110
|
+
@no_match.size == 0
|
111
|
+
end
|
112
|
+
|
113
|
+
def failure_message
|
114
|
+
@no_match
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
class HavePimNeighborOnAllInterfaces
|
119
|
+
def match(actual)
|
120
|
+
@pim_int_without_neighbor = actual.xpath('//pim-interface[contains(pim-interface-name,"ae")]').map do |int|
|
121
|
+
if int.xpath('neighbor-count').text.to_i == 0
|
122
|
+
"#{int.xpath('pim-interface-name').text} has no neighbors"
|
123
|
+
end
|
124
|
+
end
|
125
|
+
@pim_int_without_neighbor.size == 0
|
126
|
+
end
|
127
|
+
|
128
|
+
def failure_message_for_should
|
129
|
+
@pim_int_without_neighbor
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
end
|
data/lib/sloe/version.rb
CHANGED
data/sloe.gemspec
CHANGED
@@ -1,34 +1,42 @@
|
|
1
|
-
#
|
1
|
+
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'sloe/version'
|
5
5
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'sloe'
|
8
|
+
spec.version = Sloe::VERSION
|
9
|
+
spec.authors = ['David Gethings']
|
10
|
+
spec.email = ['dgjnpr@gmail.com']
|
11
|
+
spec.homepage = 'https://github.com/dgjnpr/Sloe'
|
12
|
+
spec.license = 'MIT'
|
13
|
+
spec.description = <<-DESC
|
13
14
|
Sloe uses NETCONF and/or SNMP to gather data regarding a network device. Designed to help with automated testing this gem can also be used with things like Ruby on Rails
|
14
15
|
DESC
|
15
|
-
|
16
|
+
spec.summary = <<-SUMM
|
16
17
|
A one stop shop for collecting data from a network device using NETCONF or SNMP
|
17
18
|
SUMM
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
gem.add_development_dependency('rspec', '~> 2.12')
|
23
|
-
gem.add_development_dependency('yard')
|
24
|
-
# gem.add_development_dependency('pry-debugger')
|
25
|
-
gem.add_development_dependency('simplecov')
|
26
|
-
gem.add_development_dependency('ci_reporter')
|
27
|
-
gem.add_development_dependency('rake')
|
28
|
-
gem.add_development_dependency('rubocop', '~> 0.39')
|
20
|
+
spec.add_dependency 'snmp', '~> 1.1'
|
21
|
+
spec.add_dependency 'netconf', '~> 0.3'
|
22
|
+
spec.add_dependency 'net-scp', '~> 1.0'
|
29
23
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
24
|
+
# vagrant requires no later than 1.10.6
|
25
|
+
spec.add_development_dependency 'bundler', '= 1.10.6'
|
26
|
+
spec.add_development_dependency 'rspec', '~> 2.99'
|
27
|
+
spec.add_development_dependency 'yard', '~> 0.8'
|
28
|
+
spec.add_development_dependency 'pry-byebug', '~> 3.3'
|
29
|
+
spec.add_development_dependency 'simplecov', '~> 0.11'
|
30
|
+
spec.add_development_dependency 'rake', '~> 11.1'
|
31
|
+
spec.add_development_dependency 'rubocop', '~> 0.39'
|
32
|
+
spec.add_development_dependency 'envyable', '~> 1.0'
|
33
|
+
spec.add_development_dependency 'guard', '~> 2.13'
|
34
|
+
spec.add_development_dependency 'guard-rspec', '~> 4.6'
|
35
|
+
spec.add_development_dependency 'guard-bundler', '~> 2.1'
|
36
|
+
spec.add_development_dependency 'derelict', '~> 0.6'
|
37
|
+
|
38
|
+
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
39
|
+
spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
40
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
41
|
+
spec.require_paths = ['lib']
|
34
42
|
end
|
data/spec/blocks_spec.rb
CHANGED
@@ -1,52 +1,41 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Sloe do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
let(:host) { ENV['hosts'].split(':').first }
|
5
|
+
let(:login) do
|
6
|
+
{
|
7
|
+
target: Envyable.load('/tmp/env.yaml', host)['ip_address'],
|
8
|
+
username: 'root',
|
9
|
+
password: 'Juniper',
|
10
|
+
port: Envyable.load('/tmp/env.yaml', host)['ssh_port'],
|
11
|
+
snmp_port: 1161
|
12
|
+
}
|
13
|
+
end
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
15
|
+
context 'invoked with block' do
|
16
|
+
it 'calls Netconf RPC' do
|
17
|
+
hostname = ''
|
18
|
+
Sloe::Device.new(login) do |dut|
|
19
|
+
hostname = dut.rpc.get_system_information.xpath('//host-name').text
|
20
|
+
end
|
21
|
+
expect(hostname).to include host
|
20
22
|
end
|
21
23
|
|
22
|
-
it
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
it 'calls SNMP RPC' do
|
25
|
+
hostname = ''
|
26
|
+
Sloe::Device.new(login) do |dut|
|
27
|
+
hostname = dut.snmp.get_value('sysName.0').to_s
|
28
|
+
end
|
29
|
+
expect(hostname).to include host
|
27
30
|
end
|
28
|
-
|
29
31
|
end
|
30
32
|
|
31
|
-
context
|
32
|
-
|
33
|
-
|
34
|
-
:target => 'capella',
|
35
|
-
:username => 'netconf',
|
36
|
-
:password => 'netconf'
|
37
|
-
}
|
33
|
+
context 'Junos extensions' do
|
34
|
+
it 'Sloe::Junos responds to Junos specific RPCs' do
|
35
|
+
expect(Sloe::Junos.new(login).rpc).to respond_to(:lock_configuration)
|
38
36
|
end
|
39
|
-
|
40
|
-
|
41
|
-
Sloe::Junos.new ( @login ) { |dut|
|
42
|
-
dut.rpc.respond_to?(:lock_configuration).should be true
|
43
|
-
}
|
44
|
-
end
|
45
|
-
it "Sloe::Device does not respond to Junos specific RPCs" do
|
46
|
-
Sloe::Device.new ( @login ) { |dut|
|
47
|
-
dut.rpc.respond_to?(:lock_configuration).should be false
|
48
|
-
}
|
37
|
+
it 'Sloe::Device does not respond to Junos specific RPCs' do
|
38
|
+
expect(Sloe::Device.new(login).rpc).to_not respond_to(:lock_configuration)
|
49
39
|
end
|
50
|
-
|
51
40
|
end
|
52
|
-
end
|
41
|
+
end
|
data/spec/methods_spec.rb
CHANGED
@@ -1,107 +1,83 @@
|
|
1
|
-
require '
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Sloe do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
:
|
11
|
-
:
|
12
|
-
:
|
4
|
+
let(:host) { ENV['hosts'].split(':').first }
|
5
|
+
let(:jnx_mibs) do
|
6
|
+
Dir.glob('./mibs/JUNIPER-*.yaml').map { |f| File.basename(f, '.yaml') }
|
7
|
+
end
|
8
|
+
let(:login) do
|
9
|
+
{
|
10
|
+
target: Envyable.load('/tmp/env.yaml', host)['ip_address'],
|
11
|
+
username: 'root',
|
12
|
+
password: 'Juniper',
|
13
|
+
port: Envyable.load('/tmp/env.yaml', host)['ssh_port'],
|
14
|
+
mib_dir: './mibs',
|
15
|
+
mib_modules: %w{SNMPv2-SMI SNMPv2-MIB IF-MIB IP-MIB TCP-MIB UDP-MIB}.concat(jnx_mibs),
|
16
|
+
snmp_port: 1161
|
13
17
|
}
|
14
|
-
|
15
|
-
@dut = Sloe::Junos.new(@args)
|
16
18
|
end
|
19
|
+
subject(:dut) { Sloe::Junos.new(login) }
|
17
20
|
|
18
|
-
context
|
19
|
-
it
|
20
|
-
|
21
|
+
context 'SNMP API' do
|
22
|
+
it 'snmp.get_value returns valid value' do
|
23
|
+
expect(dut.snmp.get_value('sysDescr.0')).to include('Juniper Networks')
|
21
24
|
end
|
22
|
-
it
|
23
|
-
|
24
|
-
@pdu.varbind_list.should have(1).item
|
25
|
+
it 'snmp.get returns one PDU' do
|
26
|
+
expect(dut.snmp.get('sysDescr.0').varbind_list.size).to eq(1)
|
25
27
|
end
|
26
|
-
it
|
27
|
-
|
28
|
-
@pdu.varbind_list.should have(5).items
|
28
|
+
it 'snmp.get_bulk returns a list of PDUs' do
|
29
|
+
expect(dut.snmp.get_bulk(0, 5, 'system').varbind_list.size).to eq(5)
|
29
30
|
end
|
30
|
-
it
|
31
|
-
|
32
|
-
@pdu.varbind_list.should have(1).item
|
31
|
+
it 'snmp.get_next returns one PDU' do
|
32
|
+
expect(dut.snmp.get_next('system').varbind_list.size).to eq(1)
|
33
33
|
end
|
34
|
-
it
|
35
|
-
|
34
|
+
it 'snmp.walk returns a list of PDUs' do
|
35
|
+
vbs = []
|
36
|
+
dut.snmp.walk('system') { |vb| vbs << vb }
|
37
|
+
expect(vbs.size).to be > 0
|
36
38
|
end
|
37
39
|
end
|
38
40
|
|
39
|
-
context
|
40
|
-
it
|
41
|
-
|
41
|
+
context 'JNX Enterprise MIBs' do
|
42
|
+
it 'jnxCmCfgChgLatestUser.0 has a valid value' do
|
43
|
+
expect(dut.snmp.get_value('jnxCmCfgChgLatestUser.0')).not_to eq(SNMP::NoSuchObject)
|
42
44
|
end
|
43
45
|
end
|
44
46
|
|
45
|
-
context
|
46
|
-
it
|
47
|
-
|
47
|
+
context 'NETCONF API' do
|
48
|
+
it 'rpc.get_interface_information functions without error' do
|
49
|
+
expect { dut.rpc.get_interface_information }.not_to raise_error
|
48
50
|
end
|
49
|
-
it
|
50
|
-
|
51
|
+
it 'rpc.get_ospf_neighbor_information functions without error' do
|
52
|
+
expect { dut.rpc.get_ospf_neighbor_information }.not_to raise_error
|
51
53
|
end
|
52
54
|
end
|
53
55
|
|
54
|
-
context
|
55
|
-
it
|
56
|
-
|
56
|
+
context 'SCP API' do
|
57
|
+
it 'scp.download() functions without error' do
|
58
|
+
expect { dut.scp.download!('/config/juniper.conf.gz', '/var/tmp/juniper.conf.gz') }.not_to raise_error
|
57
59
|
File.delete('/var/tmp/juniper.conf.gz')
|
58
60
|
end
|
59
|
-
it
|
61
|
+
it 'scp.upload() functions without error' do
|
60
62
|
File.new('/var/tmp/test', 'w+')
|
61
|
-
|
62
|
-
|
63
|
+
expect { dut.scp.upload!('/var/tmp/test', 'test') }.not_to raise_error
|
64
|
+
dut.rpc.file_delete(path: 'test')
|
63
65
|
File.delete('/var/tmp/test')
|
64
66
|
end
|
65
67
|
end
|
66
68
|
|
67
|
-
context
|
69
|
+
context 'CLI API' do
|
68
70
|
it "cli('show version') functions without error" do
|
69
|
-
|
71
|
+
expect { dut.cli('show version') }.not_to raise_error
|
70
72
|
end
|
71
73
|
it "cli('show version') contains OS information" do
|
72
|
-
|
73
|
-
@dut.cli("show version").should =~ /JUNOS Base OS/
|
74
|
+
expect(dut.cli('show version')).to include('JUNOS Base OS')
|
74
75
|
end
|
75
76
|
it "cli('show version', :foo => 'bar') still contains OS information" do
|
76
|
-
|
77
|
-
@dut.cli("show version", :foo => 'bar').should =~ /JUNOS Base OS/
|
77
|
+
expect(dut.cli('show version', foo: 'bar')).to include('JUNOS Base OS')
|
78
78
|
end
|
79
79
|
it "cli('clear interface statistics') empty reply does not cause an error" do
|
80
|
-
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
context "Helper methods" do
|
85
|
-
before( :all ) do
|
86
|
-
Dir.mkdir( 'configs' )
|
87
|
-
@apply = File.open( "configs/capella-apply.set", "w" )
|
88
|
-
@apply.write( 'set system location building "In a galaxy far, far, away"' )
|
89
|
-
@apply.close
|
90
|
-
|
91
|
-
@delete = File.open( "configs/capella-delete.set", "w" )
|
92
|
-
@delete.write( 'delete system location')
|
93
|
-
@delete.close
|
94
|
-
end
|
95
|
-
|
96
|
-
it "setup() with default args updates the router config" do
|
97
|
-
lambda { @dut.setup() }.should_not raise_error
|
98
|
-
end
|
99
|
-
it "clearup() with default args updates the router config" do
|
100
|
-
lambda { @dut.clearup() }.should_not raise_error
|
101
|
-
end
|
102
|
-
|
103
|
-
after(:all) do
|
104
|
-
FileUtils.rm_rf( 'configs' )
|
80
|
+
expect { dut.cli('clear interface statistics fxp0') }.not_to raise_error
|
105
81
|
end
|
106
82
|
end
|
107
|
-
end
|
83
|
+
end
|
data/spec/sloe_spec.rb
ADDED
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
+
require 'pry-byebug'
|
2
|
+
require 'envyable'
|
3
|
+
require 'simplecov'
|
4
|
+
SimpleCov.start
|
5
|
+
|
6
|
+
lib = File.expand_path('../../lib', __FILE__)
|
7
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
1
8
|
require 'sloe'
|
2
9
|
require 'sloe/junos'
|
3
|
-
# require 'pry-debugger'
|
4
|
-
require 'simplecov'
|
5
10
|
|
6
|
-
|
11
|
+
Envyable.load('/tmp/env.yaml', 'host_list')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sloe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Gethings
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: snmp
|
@@ -52,76 +52,90 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.10.6
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.10.6
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '2.
|
75
|
+
version: '2.99'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '2.
|
82
|
+
version: '2.99'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: yard
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - "
|
87
|
+
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
89
|
+
version: '0.8'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- - "
|
94
|
+
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
96
|
+
version: '0.8'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
98
|
+
name: pry-byebug
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- - "
|
101
|
+
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
103
|
+
version: '3.3'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- - "
|
108
|
+
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
110
|
+
version: '3.3'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: simplecov
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- - "
|
115
|
+
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
117
|
+
version: '0.11'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- - "
|
122
|
+
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
124
|
+
version: '0.11'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rake
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- - "
|
129
|
+
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
131
|
+
version: '11.1'
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- - "
|
136
|
+
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
138
|
+
version: '11.1'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: rubocop
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,24 +150,103 @@ dependencies:
|
|
136
150
|
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0.39'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: envyable
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - "~>"
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '1.0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - "~>"
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '1.0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: guard
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '2.13'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - "~>"
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '2.13'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: guard-rspec
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '4.6'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '4.6'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: guard-bundler
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '2.1'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '2.1'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: derelict
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - "~>"
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0.6'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - "~>"
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0.6'
|
139
223
|
description: |
|
140
224
|
Sloe uses NETCONF and/or SNMP to gather data regarding a network device. Designed to help with automated testing this gem can also be used with things like Ruby on Rails
|
141
225
|
email:
|
142
226
|
- dgjnpr@gmail.com
|
143
|
-
executables:
|
227
|
+
executables:
|
228
|
+
- console
|
229
|
+
- setup
|
144
230
|
extensions: []
|
145
231
|
extra_rdoc_files: []
|
146
232
|
files:
|
147
233
|
- ".gitignore"
|
148
|
-
- ".
|
234
|
+
- ".ruby-gemset"
|
235
|
+
- ".ruby-version"
|
236
|
+
- ".travis.yml"
|
237
|
+
- CODE_OF_CONDUCT.md
|
149
238
|
- Gemfile
|
239
|
+
- Guardfile
|
150
240
|
- LICENSE.txt
|
151
241
|
- README.md
|
152
242
|
- Rakefile
|
243
|
+
- bin/console
|
244
|
+
- bin/setup
|
153
245
|
- lib/import-mibs.rb
|
154
246
|
- lib/sloe.rb
|
155
247
|
- lib/sloe/common.rb
|
156
248
|
- lib/sloe/device.rb
|
249
|
+
- lib/sloe/expectations.rb
|
157
250
|
- lib/sloe/ixia.rb
|
158
251
|
- lib/sloe/junos.rb
|
159
252
|
- lib/sloe/version.rb
|
@@ -301,7 +394,6 @@ files:
|
|
301
394
|
- mibs/JUNIPER-DOM-MIB.yaml
|
302
395
|
- mibs/JUNIPER-EVENT-MIB.yaml
|
303
396
|
- mibs/JUNIPER-EX-SMI.yaml
|
304
|
-
- mibs/JUNIPER-EXPERIMENT-MIB.yaml
|
305
397
|
- mibs/JUNIPER-FIREWALL-MIB.yaml
|
306
398
|
- mibs/JUNIPER-HOSTRESOURCES-MIB.yaml
|
307
399
|
- mibs/JUNIPER-IF-MIB.yaml
|
@@ -336,7 +428,6 @@ files:
|
|
336
428
|
- mibs/JUNIPER-SCU-MIB.yaml
|
337
429
|
- mibs/JUNIPER-SMI.yaml
|
338
430
|
- mibs/JUNIPER-SONET-MIB.yaml
|
339
|
-
- mibs/JUNIPER-SP-MIB.yaml
|
340
431
|
- mibs/JUNIPER-SUBSCRIBER-MIB.yaml
|
341
432
|
- mibs/JUNIPER-SYSLOG-MIB.yaml
|
342
433
|
- mibs/JUNIPER-TRACEROUTE-MIB.yaml
|
@@ -494,10 +585,11 @@ files:
|
|
494
585
|
- sloe.gemspec
|
495
586
|
- spec/blocks_spec.rb
|
496
587
|
- spec/methods_spec.rb
|
588
|
+
- spec/sloe_spec.rb
|
497
589
|
- spec/spec_helper.rb
|
498
|
-
- test
|
499
590
|
homepage: https://github.com/dgjnpr/Sloe
|
500
|
-
licenses:
|
591
|
+
licenses:
|
592
|
+
- MIT
|
501
593
|
metadata: {}
|
502
594
|
post_install_message:
|
503
595
|
rdoc_options: []
|
@@ -523,5 +615,6 @@ summary: A one stop shop for collecting data from a network device using NETCONF
|
|
523
615
|
test_files:
|
524
616
|
- spec/blocks_spec.rb
|
525
617
|
- spec/methods_spec.rb
|
618
|
+
- spec/sloe_spec.rb
|
526
619
|
- spec/spec_helper.rb
|
527
620
|
has_rdoc:
|
data/.rspec
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
---
|
2
|
-
jnxExperiment: 1.3.6.1.4.1.2636.5
|
3
|
-
jnxBgpM2Experiment: 1.3.6.1.4.1.2636.5.1
|
4
|
-
jnxLdapExperiment: 1.3.6.1.4.1.2636.5.2
|
5
|
-
jnxBfdExperiment: 1.3.6.1.4.1.2636.5.3
|
6
|
-
jnxOspfv3Experiment: 1.3.6.1.4.1.2636.5.4
|
7
|
-
jnxExampleMibRoot: 1.3.6.1.4.1.2636.5.5
|
8
|
-
jnxInternalMibRoot: 1.3.6.1.4.1.2636.5.6
|
9
|
-
jnxP2mpExperiment: 1.3.6.1.4.1.2636.5.7
|
10
|
-
|
data/mibs/JUNIPER-SP-MIB.yaml
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
---
|
2
|
-
jnxSpMIB: 1.3.6.1.4.1.2636.3.32
|
3
|
-
jnxSpNotifications: 1.3.6.1.4.1.2636.3.32.0
|
4
|
-
jnxSpNotificationPrefix: 1.3.6.1.4.1.2636.3.32.0.0
|
5
|
-
jnxSpSvcSet: 1.3.6.1.4.1.2636.3.32.1
|
6
|
-
jnxSpSvcSetTable: 1.3.6.1.4.1.2636.3.32.1.1
|
7
|
-
jnxSpSvcSetEntry: 1.3.6.1.4.1.2636.3.32.1.1.1
|
8
|
-
jnxSpSvcSetName: 1.3.6.1.4.1.2636.3.32.1.1.1.1
|
9
|
-
jnxSpSvcSetSvcType: 1.3.6.1.4.1.2636.3.32.1.1.1.2
|
10
|
-
jnxSpSvcSetTypeIndex: 1.3.6.1.4.1.2636.3.32.1.1.1.3
|
11
|
-
jnxSpSvcSetIfName: 1.3.6.1.4.1.2636.3.32.1.1.1.4
|
12
|
-
jnxSpSvcSetIfIndex: 1.3.6.1.4.1.2636.3.32.1.1.1.5
|
13
|
-
jnxSpSvcSetMemoryUsage: 1.3.6.1.4.1.2636.3.32.1.1.1.6
|
14
|
-
jnxSpSvcSetCpuUtil: 1.3.6.1.4.1.2636.3.32.1.1.1.7
|
15
|
-
jnxSpSvcSetSvcStyle: 1.3.6.1.4.1.2636.3.32.1.1.1.8
|
16
|
-
jnxSpSvcSetMemLimitPktDrops: 1.3.6.1.4.1.2636.3.32.1.1.1.9
|
17
|
-
jnxSpSvcSetCpuLimitPktDrops: 1.3.6.1.4.1.2636.3.32.1.1.1.10
|
18
|
-
jnxSpSvcSetFlowLimitPktDrops: 1.3.6.1.4.1.2636.3.32.1.1.1.11
|
19
|
-
jnxSpSvcSetSvcTypeTable: 1.3.6.1.4.1.2636.3.32.1.2
|
20
|
-
jnxSpSvcSetSvcTypeEntry: 1.3.6.1.4.1.2636.3.32.1.2.1
|
21
|
-
jnxSpSvcSetSvcTypeIndex: 1.3.6.1.4.1.2636.3.32.1.2.1.1
|
22
|
-
jnxSpSvcSetSvcTypeIfName: 1.3.6.1.4.1.2636.3.32.1.2.1.2
|
23
|
-
jnxSpSvcSetSvcTypeName: 1.3.6.1.4.1.2636.3.32.1.2.1.3
|
24
|
-
jnxSpSvcSetSvcTypeSvcSets: 1.3.6.1.4.1.2636.3.32.1.2.1.4
|
25
|
-
jnxSpSvcSetSvcTypeMemoryUsage: 1.3.6.1.4.1.2636.3.32.1.2.1.5
|
26
|
-
jnxSpSvcSetSvcTypePctMemoryUsage: 1.3.6.1.4.1.2636.3.32.1.2.1.6
|
27
|
-
jnxSpSvcSetSvcTypeCpuUtil: 1.3.6.1.4.1.2636.3.32.1.2.1.7
|
28
|
-
jnxSpSvcSetIfTable: 1.3.6.1.4.1.2636.3.32.1.3
|
29
|
-
jnxSpSvcSetIfEntry: 1.3.6.1.4.1.2636.3.32.1.3.1
|
30
|
-
jnxSpSvcSetIfTableName: 1.3.6.1.4.1.2636.3.32.1.3.1.1
|
31
|
-
jnxSpSvcSetIfSvcSets: 1.3.6.1.4.1.2636.3.32.1.3.1.2
|
32
|
-
jnxSpSvcSetIfMemoryUsage: 1.3.6.1.4.1.2636.3.32.1.3.1.3
|
33
|
-
jnxSpSvcSetIfPctMemoryUsage: 1.3.6.1.4.1.2636.3.32.1.3.1.4
|
34
|
-
jnxSpSvcSetIfPolMemoryUsage: 1.3.6.1.4.1.2636.3.32.1.3.1.5
|
35
|
-
jnxSpSvcSetIfPctPolMemoryUsage: 1.3.6.1.4.1.2636.3.32.1.3.1.6
|
36
|
-
jnxSpSvcSetIfMemoryZone: 1.3.6.1.4.1.2636.3.32.1.3.1.7
|
37
|
-
jnxSpSvcSetIfCpuUtil: 1.3.6.1.4.1.2636.3.32.1.3.1.8
|
38
|
-
jnxFlowLimitTrapVars: 1.3.6.1.4.1.2636.3.32.2
|
39
|
-
jnxSpSvcSetFlowLimitUtil: 1.3.6.1.4.1.2636.3.32.2.1
|
40
|
-
jnxSpSvcSetNameUtil: 1.3.6.1.4.1.2636.3.32.2.2
|
41
|
-
jnxSpSvcSetZoneEntered: 1.3.6.1.4.1.2636.3.32.0.0.1
|
42
|
-
jnxSpSvcSetZoneExited: 1.3.6.1.4.1.2636.3.32.0.0.2
|
43
|
-
jnxSpSvcSetCpuExceeded: 1.3.6.1.4.1.2636.3.32.0.0.3
|
44
|
-
jnxSpSvcSetCpuOk: 1.3.6.1.4.1.2636.3.32.0.0.4
|
45
|
-
jnxSpSvcSetFlowLimitUtilized: 1.3.6.1.4.1.2636.3.32.0.1
|
46
|
-
|