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.
Files changed (57) hide show
  1. data/.gitignore +1 -0
  2. data/CHANGELOG.md +12 -0
  3. data/Gemfile +4 -0
  4. data/README.md +9 -9
  5. data/Rakefile +20 -0
  6. data/lib/rbeapi/api/bgp.rb +770 -0
  7. data/lib/rbeapi/api/dns.rb +32 -31
  8. data/lib/rbeapi/api/interfaces.rb +106 -87
  9. data/lib/rbeapi/api/ipinterfaces.rb +27 -42
  10. data/lib/rbeapi/api/logging.rb +9 -19
  11. data/lib/rbeapi/api/mlag.rb +60 -90
  12. data/lib/rbeapi/api/ntp.rb +12 -17
  13. data/lib/rbeapi/api/ospf.rb +9 -26
  14. data/lib/rbeapi/api/radius.rb +29 -43
  15. data/lib/rbeapi/api/snmp.rb +54 -83
  16. data/lib/rbeapi/api/staticroutes.rb +68 -21
  17. data/lib/rbeapi/api/stp.rb +41 -49
  18. data/lib/rbeapi/api/switchports.rb +41 -68
  19. data/lib/rbeapi/api/system.rb +6 -12
  20. data/lib/rbeapi/api/tacacs.rb +12 -21
  21. data/lib/rbeapi/api/varp.rb +25 -26
  22. data/lib/rbeapi/api/vlans.rb +19 -28
  23. data/lib/rbeapi/api.rb +30 -21
  24. data/lib/rbeapi/client.rb +3 -1
  25. data/lib/rbeapi/version.rb +1 -1
  26. data/rbeapi.spec.tmpl +4 -0
  27. data/spec/spec_helper.rb +8 -0
  28. data/spec/system/api_ospf_interfaces_spec.rb +16 -0
  29. data/spec/system/api_ospf_spec.rb +14 -0
  30. data/spec/system/api_varp_interfaces_spec.rb +16 -0
  31. data/spec/system/rbeapi/api/dns_spec.rb +66 -0
  32. data/spec/system/rbeapi/api/interfaces_base_spec.rb +4 -4
  33. data/spec/system/rbeapi/api/interfaces_ethernet_spec.rb +6 -6
  34. data/spec/system/rbeapi/api/interfaces_portchannel_spec.rb +6 -6
  35. data/spec/system/rbeapi/api/interfaces_vxlan_spec.rb +4 -4
  36. data/spec/system/rbeapi/api/ipinterfaces_spec.rb +44 -0
  37. data/spec/system/rbeapi/api/logging_spec.rb +18 -2
  38. data/spec/system/rbeapi/api/mlag_spec.rb +94 -2
  39. data/spec/system/rbeapi/api/ntp_spec.rb +14 -0
  40. data/spec/system/rbeapi/api/snmp_spec.rb +105 -0
  41. data/spec/system/rbeapi/api/stp_interfaces_spec.rb +43 -6
  42. data/spec/system/rbeapi/api/stp_spec.rb +18 -6
  43. data/spec/system/rbeapi/api/switchports_spec.rb +75 -3
  44. data/spec/system/rbeapi/api/system_spec.rb +16 -0
  45. data/spec/system/rbeapi/api/vlans_spec.rb +28 -0
  46. data/spec/unit/rbeapi/api/bgp/bgp_neighbors_spec.rb +289 -0
  47. data/spec/unit/rbeapi/api/bgp/bgp_spec.rb +192 -0
  48. data/spec/unit/rbeapi/api/bgp/fixture_bgp.text +101 -0
  49. data/spec/unit/rbeapi/api/interfaces/base_spec.rb +7 -13
  50. data/spec/unit/rbeapi/api/interfaces/ethernet_spec.rb +3 -3
  51. data/spec/unit/rbeapi/api/interfaces/portchannel_spec.rb +11 -16
  52. data/spec/unit/rbeapi/api/interfaces/vxlan_spec.rb +15 -21
  53. data/spec/unit/rbeapi/api/mlag/default_spec.rb +13 -19
  54. data/spec/unit/rbeapi/api/staticroutes/default_spec.rb +138 -0
  55. data/spec/unit/rbeapi/api/staticroutes/fixture_staticroutes.text +5 -0
  56. data/spec/unit/rbeapi/api/vlans/default_spec.rb +4 -4
  57. metadata +15 -4
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  *.rbc
3
3
  /.config
4
4
  /coverage/
5
+ /results/
5
6
  /InstalledFiles
6
7
  /pkg/
7
8
  /spec/reports/
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.2.0-1.swix \
231
- rubygem-rbeapi-0.2.0-1.eos4.noarch.rpm \
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.2.0-1.swix \
237
- pe-rubygem-rbeapi-0.2.0-1.eos4.noarch.rpm \
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.2.0-1.swix \
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.2.0-1.swix extension:
253
- Arista# extension pe-rbeapi-0.2.0-1.swix
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.1.0-2.swix
262
- Arista# extension pe-rbeapi-0.2.0-1.swix
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)