rbeapi 0.2.0 → 0.3.0
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.
- data/.gitignore +1 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +4 -0
- data/README.md +9 -9
- data/Rakefile +20 -0
- data/lib/rbeapi/api/bgp.rb +770 -0
- data/lib/rbeapi/api/dns.rb +32 -31
- data/lib/rbeapi/api/interfaces.rb +106 -87
- data/lib/rbeapi/api/ipinterfaces.rb +27 -42
- data/lib/rbeapi/api/logging.rb +9 -19
- data/lib/rbeapi/api/mlag.rb +60 -90
- data/lib/rbeapi/api/ntp.rb +12 -17
- data/lib/rbeapi/api/ospf.rb +9 -26
- data/lib/rbeapi/api/radius.rb +29 -43
- data/lib/rbeapi/api/snmp.rb +54 -83
- data/lib/rbeapi/api/staticroutes.rb +68 -21
- data/lib/rbeapi/api/stp.rb +41 -49
- data/lib/rbeapi/api/switchports.rb +41 -68
- data/lib/rbeapi/api/system.rb +6 -12
- data/lib/rbeapi/api/tacacs.rb +12 -21
- data/lib/rbeapi/api/varp.rb +25 -26
- data/lib/rbeapi/api/vlans.rb +19 -28
- data/lib/rbeapi/api.rb +30 -21
- data/lib/rbeapi/client.rb +3 -1
- data/lib/rbeapi/version.rb +1 -1
- data/rbeapi.spec.tmpl +4 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/system/api_ospf_interfaces_spec.rb +16 -0
- data/spec/system/api_ospf_spec.rb +14 -0
- data/spec/system/api_varp_interfaces_spec.rb +16 -0
- data/spec/system/rbeapi/api/dns_spec.rb +66 -0
- data/spec/system/rbeapi/api/interfaces_base_spec.rb +4 -4
- data/spec/system/rbeapi/api/interfaces_ethernet_spec.rb +6 -6
- data/spec/system/rbeapi/api/interfaces_portchannel_spec.rb +6 -6
- data/spec/system/rbeapi/api/interfaces_vxlan_spec.rb +4 -4
- data/spec/system/rbeapi/api/ipinterfaces_spec.rb +44 -0
- data/spec/system/rbeapi/api/logging_spec.rb +18 -2
- data/spec/system/rbeapi/api/mlag_spec.rb +94 -2
- data/spec/system/rbeapi/api/ntp_spec.rb +14 -0
- data/spec/system/rbeapi/api/snmp_spec.rb +105 -0
- data/spec/system/rbeapi/api/stp_interfaces_spec.rb +43 -6
- data/spec/system/rbeapi/api/stp_spec.rb +18 -6
- data/spec/system/rbeapi/api/switchports_spec.rb +75 -3
- data/spec/system/rbeapi/api/system_spec.rb +16 -0
- data/spec/system/rbeapi/api/vlans_spec.rb +28 -0
- data/spec/unit/rbeapi/api/bgp/bgp_neighbors_spec.rb +289 -0
- data/spec/unit/rbeapi/api/bgp/bgp_spec.rb +192 -0
- data/spec/unit/rbeapi/api/bgp/fixture_bgp.text +101 -0
- data/spec/unit/rbeapi/api/interfaces/base_spec.rb +7 -13
- data/spec/unit/rbeapi/api/interfaces/ethernet_spec.rb +3 -3
- data/spec/unit/rbeapi/api/interfaces/portchannel_spec.rb +11 -16
- data/spec/unit/rbeapi/api/interfaces/vxlan_spec.rb +15 -21
- data/spec/unit/rbeapi/api/mlag/default_spec.rb +13 -19
- data/spec/unit/rbeapi/api/staticroutes/default_spec.rb +138 -0
- data/spec/unit/rbeapi/api/staticroutes/fixture_staticroutes.text +5 -0
- data/spec/unit/rbeapi/api/vlans/default_spec.rb +4 -4
- metadata +15 -4
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
Ruby Client for eAPI
|
2
2
|
====================
|
3
3
|
|
4
|
+
## v0.3.0, August, 2015
|
5
|
+
|
6
|
+
- API Change: Eliminated overloading the value option in command_builder. When
|
7
|
+
the value is set it is used as a value in building the command. When the value
|
8
|
+
is false then the command is negated. This doesn’t allow a value to be
|
9
|
+
specified when the command is negated.
|
10
|
+
- APIs updated to take advantage of command_builder()
|
11
|
+
- Add staticroutes API
|
12
|
+
- Fix issue which would cause the module to fail to load when $HOME was not set
|
13
|
+
- Fix builds (all_rpms) to work on Ubuntu
|
14
|
+
- Fix rbeapi rubygem RPM requires
|
15
|
+
|
4
16
|
## v0.2.0, July, 2015
|
5
17
|
|
6
18
|
- Change the default transport to https
|
data/Gemfile
CHANGED
@@ -22,6 +22,10 @@ group :development, :test do
|
|
22
22
|
gem 'pry', require: false
|
23
23
|
gem 'pry-doc', require: false
|
24
24
|
gem 'pry-stack_explorer', require: false
|
25
|
+
gem 'rbeapi', '0.3.0', path: '.'
|
26
|
+
gem 'ci_reporter_rspec', require: false
|
27
|
+
gem 'simplecov-json', require: false
|
28
|
+
gem 'simplecov-rcov', require: false
|
25
29
|
end
|
26
30
|
|
27
31
|
# vim:ft=ruby
|
data/README.md
CHANGED
@@ -227,14 +227,14 @@ and uploaded to [RubyGems](https://rubygems.org/).
|
|
227
227
|
Copy the RPMs to an EOS device then run the 'swix create' command.
|
228
228
|
Examples:
|
229
229
|
Puppet Open Source:
|
230
|
-
cd /mnt/flash; swix create rbeapi-0.
|
231
|
-
rubygem-rbeapi-0.
|
230
|
+
cd /mnt/flash; swix create rbeapi-0.3.0-1.swix \
|
231
|
+
rubygem-rbeapi-0.3.0-1.eos4.noarch.rpm \
|
232
232
|
rubygem-inifile-3.0.0-2.eos4.noarch.rpm \
|
233
233
|
rubygem-netaddr-1.5.0-1.eos4.noarch.rpm \
|
234
234
|
rubygem-net_http_unix-0.2.1-2.eos4.noarch.rpm
|
235
235
|
Puppet-enterprise:
|
236
|
-
cd/mnt/flash; swix create pe-rbeapi-0.
|
237
|
-
pe-rubygem-rbeapi-0.
|
236
|
+
cd/mnt/flash; swix create pe-rbeapi-0.3.0-1.swix \
|
237
|
+
pe-rubygem-rbeapi-0.3.0-1.eos4.noarch.rpm \
|
238
238
|
pe-rubygem-inifile-3.0.0-2.eos4.noarch.rpm \
|
239
239
|
pe-rubygem-netaddr-1.5.0-1.eos4.noarch.rpm
|
240
240
|
```
|
@@ -244,13 +244,13 @@ and uploaded to [RubyGems](https://rubygems.org/).
|
|
244
244
|
Arista# copy <URI-to-RPMs> flash:
|
245
245
|
Arista# bash
|
246
246
|
-bash-4.1# cd /mnt/flash/
|
247
|
-
-bash-4.1# swix create pe-rbeapi-0.
|
247
|
+
-bash-4.1# swix create pe-rbeapi-0.3.0-1.swix \
|
248
248
|
pe-rubygem-rbeapi-0.1.0-1.eos4.noarch.rpm \
|
249
249
|
pe-rubygem-inifile-3.0.0-1.eos4.noarch.rpm \
|
250
250
|
pe-rubygem-netaddr-1.5.0-1.eos4.noarch.rpm
|
251
251
|
-bash-4.1# exit
|
252
|
-
Arista# copy flash:pe-rbeapi-0.
|
253
|
-
Arista# extension pe-rbeapi-0.
|
252
|
+
Arista# copy flash:pe-rbeapi-0.3.0-1.swix extension:
|
253
|
+
Arista# extension pe-rbeapi-0.3.0-1.swix
|
254
254
|
Arista# copy installed-extensions boot-extensions
|
255
255
|
```
|
256
256
|
|
@@ -258,8 +258,8 @@ and uploaded to [RubyGems](https://rubygems.org/).
|
|
258
258
|
|
259
259
|
On EOS:
|
260
260
|
```
|
261
|
-
Arista# no extension pe-rbeapi-0.
|
262
|
-
Arista# extension pe-rbeapi-0.
|
261
|
+
Arista# no extension pe-rbeapi-0.2.0-1.swix
|
262
|
+
Arista# extension pe-rbeapi-0.3.0-1.swix
|
263
263
|
Arista# copy installed-extensions boot-extensions
|
264
264
|
```
|
265
265
|
|
data/Rakefile
CHANGED
@@ -105,3 +105,23 @@ end
|
|
105
105
|
task release: :build do
|
106
106
|
system "gem push rbeapi-#{Rbeapi::VERSION}.gem"
|
107
107
|
end
|
108
|
+
|
109
|
+
require 'ci/reporter/rake/rspec'
|
110
|
+
desc 'Prep CI RSpec tests'
|
111
|
+
task :ci_prep do
|
112
|
+
require 'rubygems'
|
113
|
+
begin
|
114
|
+
gem 'ci_reporter'
|
115
|
+
require 'ci/reporter/rake/rspec'
|
116
|
+
ENV['CI_REPORTS'] = 'results'
|
117
|
+
rescue LoadError
|
118
|
+
puts 'Missing ci_reporter gem. You must have the ci_reporter gem installed'\
|
119
|
+
' to run the CI spec tests'
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
desc 'Run the CI RSpec tests'
|
124
|
+
task ci_spec: [:ci_prep, 'ci:setup:rspec', :spec]
|
125
|
+
|
126
|
+
require 'rspec/core/rake_task'
|
127
|
+
RSpec::Core::RakeTask.new(:spec)
|