rbeapi 0.5.1 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +211 -76
- data/Gemfile +14 -3
- data/README.md +74 -38
- data/Rakefile +38 -17
- data/gems/inifile/inifile.spec.tmpl +31 -4
- data/gems/net_http_unix/net_http_unix.spec.tmpl +34 -8
- data/gems/netaddr/netaddr.spec.tmpl +31 -5
- data/guide/getting-started.rst +95 -64
- data/guide/installation.rst +27 -6
- data/guide/release-notes.rst +5 -1
- data/guide/testing.rst +5 -2
- data/guide/upgrading.rst +2 -0
- data/lib/rbeapi/api/dns.rb +8 -2
- data/lib/rbeapi/api/interfaces.rb +107 -21
- data/lib/rbeapi/api/ipinterfaces.rb +48 -0
- data/lib/rbeapi/api/prefixlists.rb +53 -23
- data/lib/rbeapi/api/routemaps.rb +11 -0
- data/lib/rbeapi/api/stp.rb +6 -3
- data/lib/rbeapi/api/switchports.rb +5 -11
- data/lib/rbeapi/api/system.rb +1 -1
- data/lib/rbeapi/api/users.rb +2 -0
- data/lib/rbeapi/api/varp.rb +6 -0
- data/lib/rbeapi/api/vlans.rb +44 -0
- data/lib/rbeapi/api/vrrp.rb +13 -0
- data/lib/rbeapi/client.rb +19 -4
- data/lib/rbeapi/switchconfig.rb +330 -0
- data/lib/rbeapi/version.rb +1 -1
- data/rbeapi.gemspec +2 -0
- data/rbeapi.spec.tmpl +30 -3
- data/spec/fixtures/.gitignore +1 -0
- data/spec/support/matchers/switch_config_sections.rb +80 -0
- data/spec/system/rbeapi/api/interfaces_base_spec.rb +32 -3
- data/spec/system/rbeapi/api/interfaces_ethernet_spec.rb +56 -8
- data/spec/system/rbeapi/api/interfaces_portchannel_spec.rb +33 -1
- data/spec/system/rbeapi/api/interfaces_vxlan_spec.rb +27 -0
- data/spec/system/rbeapi/api/ipinterfaces_spec.rb +34 -1
- data/spec/system/rbeapi/api/prefixlists_spec.rb +198 -0
- data/spec/system/rbeapi/api/stp_instances_spec.rb +49 -5
- data/spec/system/rbeapi/api/switchports_spec.rb +15 -9
- data/spec/system/rbeapi/api/vlans_spec.rb +46 -0
- data/spec/unit/rbeapi/api/interfaces/base_spec.rb +1 -1
- data/spec/unit/rbeapi/api/interfaces/ethernet_spec.rb +1 -1
- data/spec/unit/rbeapi/api/interfaces/portchannel_spec.rb +9 -2
- data/spec/unit/rbeapi/api/interfaces/vxlan_spec.rb +1 -1
- data/spec/unit/rbeapi/api/prefixlists/default_spec.rb +202 -0
- data/spec/unit/rbeapi/api/prefixlists/fixture_prefixlists.text +11 -0
- data/spec/unit/rbeapi/api/routemaps/default_spec.rb +5 -0
- data/spec/unit/rbeapi/api/switchports/default_spec.rb +4 -4
- data/spec/unit/rbeapi/api/system/default_spec.rb +5 -0
- data/spec/unit/rbeapi/api/system/fixture_system.text +1 -0
- data/spec/unit/rbeapi/api/vlans/default_spec.rb +30 -0
- data/spec/unit/rbeapi/api/vrrp/default_spec.rb +10 -0
- data/spec/unit/rbeapi/client_spec.rb +42 -0
- data/spec/unit/rbeapi/switchconfig2_spec.rb +119 -0
- data/spec/unit/rbeapi/switchconfig3_spec.rb +125 -0
- data/spec/unit/rbeapi/switchconfig_spec.rb +335 -0
- metadata +21 -7
data/CHANGELOG.md
CHANGED
@@ -1,76 +1,211 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
-
|
14
|
-
|
15
|
-
-
|
16
|
-
-
|
17
|
-
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
-
|
22
|
-
-
|
23
|
-
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
-
|
31
|
-
-
|
32
|
-
-
|
33
|
-
-
|
34
|
-
-
|
35
|
-
-
|
36
|
-
|
37
|
-
|
38
|
-
-
|
39
|
-
-
|
40
|
-
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
-
|
51
|
-
- Add
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
- Add
|
60
|
-
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
-
|
65
|
-
-
|
66
|
-
-
|
67
|
-
-
|
68
|
-
-
|
69
|
-
-
|
70
|
-
-
|
71
|
-
-
|
72
|
-
|
73
|
-
|
74
|
-
## v0.
|
75
|
-
|
76
|
-
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
## [1.0](https://github.com/arista-eosplus/rbeapi/tree/1.0) (2016-09-22)
|
4
|
+
[Full Changelog](https://github.com/arista-eosplus/rbeapi/compare/v0.5.1...1.0)
|
5
|
+
|
6
|
+
**Implemented enhancements:**
|
7
|
+
|
8
|
+
- Need to validate value keyword in set methods when array [\#40](https://github.com/arista-eosplus/rbeapi/issues/40)
|
9
|
+
- Limit rubocop version when running ruby 1.9 [\#125](https://github.com/arista-eosplus/rbeapi/pull/125) ([jerearista](https://github.com/jerearista))
|
10
|
+
|
11
|
+
**Fixed bugs:**
|
12
|
+
|
13
|
+
- the "running\_config" api error [\#127](https://github.com/arista-eosplus/rbeapi/issues/127)
|
14
|
+
- system API may return incorrect value for iprouting when VRF present [\#123](https://github.com/arista-eosplus/rbeapi/issues/123)
|
15
|
+
- SWIX does not uninstall cleanly [\#118](https://github.com/arista-eosplus/rbeapi/issues/118)
|
16
|
+
- vlans API only returns first trunk\_group [\#113](https://github.com/arista-eosplus/rbeapi/issues/113)
|
17
|
+
- Bugfix - system :iprouting only picks up global ip routing, ignoring VRFs [\#124](https://github.com/arista-eosplus/rbeapi/pull/124) ([jerearista](https://github.com/jerearista))
|
18
|
+
|
19
|
+
**Closed issues:**
|
20
|
+
|
21
|
+
- multicast group parsing for vxlan interfaces fails [\#142](https://github.com/arista-eosplus/rbeapi/issues/142)
|
22
|
+
- Should switchconfig inject exit command at end of a section \(child\)? [\#136](https://github.com/arista-eosplus/rbeapi/issues/136)
|
23
|
+
- SwitchConfig parse needs to account for irregular spacing in config banner [\#135](https://github.com/arista-eosplus/rbeapi/issues/135)
|
24
|
+
|
25
|
+
**Merged pull requests:**
|
26
|
+
|
27
|
+
- Add json option to get\_config [\#151](https://github.com/arista-eosplus/rbeapi/pull/151) ([jerearista](https://github.com/jerearista))
|
28
|
+
- Handle more multiline config commands [\#150](https://github.com/arista-eosplus/rbeapi/pull/150) ([jerearista](https://github.com/jerearista))
|
29
|
+
- Ensure get\_config, running\_config, and startup\_config return sane output [\#149](https://github.com/arista-eosplus/rbeapi/pull/149) ([jerearista](https://github.com/jerearista))
|
30
|
+
- Switchconfig: handle non-standard indentation on banners [\#148](https://github.com/arista-eosplus/rbeapi/pull/148) ([jerearista](https://github.com/jerearista))
|
31
|
+
- add spec tests for prefix lists [\#147](https://github.com/arista-eosplus/rbeapi/pull/147) ([mrvinti](https://github.com/mrvinti))
|
32
|
+
- Add switchconfig feature [\#146](https://github.com/arista-eosplus/rbeapi/pull/146) ([jerearista](https://github.com/jerearista))
|
33
|
+
- Fix test issues [\#145](https://github.com/arista-eosplus/rbeapi/pull/145) ([jerearista](https://github.com/jerearista))
|
34
|
+
- fix parse\_instances to return the default instances and add tests [\#144](https://github.com/arista-eosplus/rbeapi/pull/144) ([rknaus](https://github.com/rknaus))
|
35
|
+
- fix issue \#142 - multicast group parsing when not configured [\#143](https://github.com/arista-eosplus/rbeapi/pull/143) ([mrvinti](https://github.com/mrvinti))
|
36
|
+
- add switchport allowed vlan range capability [\#141](https://github.com/arista-eosplus/rbeapi/pull/141) ([rknaus](https://github.com/rknaus))
|
37
|
+
- fix speed functions and add lacp port-priority functions [\#139](https://github.com/arista-eosplus/rbeapi/pull/139) ([rknaus](https://github.com/rknaus))
|
38
|
+
- Fix rpm uninstall issue \#118 [\#134](https://github.com/arista-eosplus/rbeapi/pull/134) ([jerearista](https://github.com/jerearista))
|
39
|
+
- Switchconfig rpms for chef [\#130](https://github.com/arista-eosplus/rbeapi/pull/130) ([jerearista](https://github.com/jerearista))
|
40
|
+
- Switchconfig zap empty lines [\#128](https://github.com/arista-eosplus/rbeapi/pull/128) ([jerearista](https://github.com/jerearista))
|
41
|
+
- Validate array param options [\#126](https://github.com/arista-eosplus/rbeapi/pull/126) ([websitescenes](https://github.com/websitescenes))
|
42
|
+
- Wip load interval v2 [\#122](https://github.com/arista-eosplus/rbeapi/pull/122) ([n1cn0c](https://github.com/n1cn0c))
|
43
|
+
- Created vlans set\_trunk\_groups method. [\#119](https://github.com/arista-eosplus/rbeapi/pull/119) ([devrobo](https://github.com/devrobo))
|
44
|
+
|
45
|
+
## [v0.5.1](https://github.com/arista-eosplus/rbeapi/tree/v0.5.1) (2016-02-16)
|
46
|
+
[Full Changelog](https://github.com/arista-eosplus/rbeapi/compare/v0.5.0...v0.5.1)
|
47
|
+
|
48
|
+
**Implemented enhancements:**
|
49
|
+
|
50
|
+
- get\_connect should raise an error instead of returning nil if no connection is found [\#31](https://github.com/arista-eosplus/rbeapi/issues/31)
|
51
|
+
- Add build badges to the README.md [\#108](https://github.com/arista-eosplus/rbeapi/pull/108) ([jerearista](https://github.com/jerearista))
|
52
|
+
|
53
|
+
**Fixed bugs:**
|
54
|
+
|
55
|
+
- PeerEthernet regex issue [\#109](https://github.com/arista-eosplus/rbeapi/issues/109)
|
56
|
+
|
57
|
+
**Closed issues:**
|
58
|
+
|
59
|
+
- Add support for commands with input [\#100](https://github.com/arista-eosplus/rbeapi/issues/100)
|
60
|
+
- Wildcard connection config gets clobbered [\#86](https://github.com/arista-eosplus/rbeapi/issues/86)
|
61
|
+
|
62
|
+
**Merged pull requests:**
|
63
|
+
|
64
|
+
- Release 0.5.1 to master [\#117](https://github.com/arista-eosplus/rbeapi/pull/117) ([jerearista](https://github.com/jerearista))
|
65
|
+
- Release 0.5.1 [\#116](https://github.com/arista-eosplus/rbeapi/pull/116) ([jerearista](https://github.com/jerearista))
|
66
|
+
- Release 0.5.1 [\#115](https://github.com/arista-eosplus/rbeapi/pull/115) ([jerearista](https://github.com/jerearista))
|
67
|
+
- Only first trunk group was being returned. [\#114](https://github.com/arista-eosplus/rbeapi/pull/114) ([devrobo](https://github.com/devrobo))
|
68
|
+
- Add support for DEFAULT section to eapi config file. [\#111](https://github.com/arista-eosplus/rbeapi/pull/111) ([devrobo](https://github.com/devrobo))
|
69
|
+
- Remove getter for timeouts and use attr\_reader instead. [\#107](https://github.com/arista-eosplus/rbeapi/pull/107) ([websitescenes](https://github.com/websitescenes))
|
70
|
+
- Added doc for trunk groups to get. [\#106](https://github.com/arista-eosplus/rbeapi/pull/106) ([devrobo](https://github.com/devrobo))
|
71
|
+
- Tightening up documentation. [\#105](https://github.com/arista-eosplus/rbeapi/pull/105) ([websitescenes](https://github.com/websitescenes))
|
72
|
+
- Added support for setting system banners. [\#104](https://github.com/arista-eosplus/rbeapi/pull/104) ([devrobo](https://github.com/devrobo))
|
73
|
+
|
74
|
+
## [v0.5.0](https://github.com/arista-eosplus/rbeapi/tree/v0.5.0) (2016-01-12)
|
75
|
+
[Full Changelog](https://github.com/arista-eosplus/rbeapi/compare/v0.4.0...v0.5.0)
|
76
|
+
|
77
|
+
**Implemented enhancements:**
|
78
|
+
|
79
|
+
- Improve VARP and VARP interface parsing [\#79](https://github.com/arista-eosplus/rbeapi/issues/79)
|
80
|
+
- Need system tests for all api modules [\#66](https://github.com/arista-eosplus/rbeapi/issues/66)
|
81
|
+
- rbeapi coding documentation incomplete [\#62](https://github.com/arista-eosplus/rbeapi/issues/62)
|
82
|
+
- switchport api should support trunk groups [\#38](https://github.com/arista-eosplus/rbeapi/issues/38)
|
83
|
+
- Need units tests for framework [\#30](https://github.com/arista-eosplus/rbeapi/issues/30)
|
84
|
+
- Need unit test to verify read and open timeout in eapi conf file override default [\#29](https://github.com/arista-eosplus/rbeapi/issues/29)
|
85
|
+
- Unit tests for switchports [\#94](https://github.com/arista-eosplus/rbeapi/pull/94) ([websitescenes](https://github.com/websitescenes))
|
86
|
+
- Ensure all parse methods are private. [\#93](https://github.com/arista-eosplus/rbeapi/pull/93) ([websitescenes](https://github.com/websitescenes))
|
87
|
+
- test timeout values [\#92](https://github.com/arista-eosplus/rbeapi/pull/92) ([websitescenes](https://github.com/websitescenes))
|
88
|
+
- Relax check on getall entries [\#91](https://github.com/arista-eosplus/rbeapi/pull/91) ([devrobo](https://github.com/devrobo))
|
89
|
+
- Update framework tests [\#90](https://github.com/arista-eosplus/rbeapi/pull/90) ([websitescenes](https://github.com/websitescenes))
|
90
|
+
- Add lacp\_mode option when setting port-channel members. [\#89](https://github.com/arista-eosplus/rbeapi/pull/89) ([devrobo](https://github.com/devrobo))
|
91
|
+
- Added support for trunk groups. [\#88](https://github.com/arista-eosplus/rbeapi/pull/88) ([devrobo](https://github.com/devrobo))
|
92
|
+
- Add basic framework tests. [\#85](https://github.com/arista-eosplus/rbeapi/pull/85) ([websitescenes](https://github.com/websitescenes))
|
93
|
+
- Address code coverage gaps [\#84](https://github.com/arista-eosplus/rbeapi/pull/84) ([websitescenes](https://github.com/websitescenes))
|
94
|
+
|
95
|
+
**Fixed bugs:**
|
96
|
+
|
97
|
+
- failure when eapi.conf is not formatted correctly [\#82](https://github.com/arista-eosplus/rbeapi/issues/82)
|
98
|
+
- Enable password setting in the .eapi.conf file not honored [\#72](https://github.com/arista-eosplus/rbeapi/issues/72)
|
99
|
+
- API interfaces should accept an lacp\_mode to configure for port-channel members [\#58](https://github.com/arista-eosplus/rbeapi/issues/58)
|
100
|
+
- Copy configuration entry before modifying with connection specific info. [\#101](https://github.com/arista-eosplus/rbeapi/pull/101) ([devrobo](https://github.com/devrobo))
|
101
|
+
- Add terminal to configure command to work around AAA issue found in p… [\#99](https://github.com/arista-eosplus/rbeapi/pull/99) ([devrobo](https://github.com/devrobo))
|
102
|
+
- Set enable password for a connection. [\#96](https://github.com/arista-eosplus/rbeapi/pull/96) ([devrobo](https://github.com/devrobo))
|
103
|
+
- Catch errors and syslog them when parsing eapi conf file. [\#95](https://github.com/arista-eosplus/rbeapi/pull/95) ([devrobo](https://github.com/devrobo))
|
104
|
+
- Ensure that nil is returned when you try to get nonexistent username. [\#83](https://github.com/arista-eosplus/rbeapi/pull/83) ([websitescenes](https://github.com/websitescenes))
|
105
|
+
|
106
|
+
**Merged pull requests:**
|
107
|
+
|
108
|
+
- Update documentation [\#97](https://github.com/arista-eosplus/rbeapi/pull/97) ([websitescenes](https://github.com/websitescenes))
|
109
|
+
|
110
|
+
## [v0.4.0](https://github.com/arista-eosplus/rbeapi/tree/v0.4.0) (2015-11-21)
|
111
|
+
[Full Changelog](https://github.com/arista-eosplus/rbeapi/compare/v0.3.0...v0.4.0)
|
112
|
+
|
113
|
+
**Implemented enhancements:**
|
114
|
+
|
115
|
+
- Add users API [\#78](https://github.com/arista-eosplus/rbeapi/issues/78)
|
116
|
+
- Support BGP maximum paths [\#77](https://github.com/arista-eosplus/rbeapi/issues/77)
|
117
|
+
- Feature puppet4 swix [\#74](https://github.com/arista-eosplus/rbeapi/pull/74) ([jerearista](https://github.com/jerearista))
|
118
|
+
- Add argument checking for the track hash. [\#70](https://github.com/arista-eosplus/rbeapi/pull/70) ([devrobo](https://github.com/devrobo))
|
119
|
+
- Fix spec test issue from pull request \#61 [\#69](https://github.com/arista-eosplus/rbeapi/pull/69) ([devrobo](https://github.com/devrobo))
|
120
|
+
- Update RPM packaging to accomodate Puppet 4 AIO agent [\#68](https://github.com/arista-eosplus/rbeapi/pull/68) ([jerearista](https://github.com/jerearista))
|
121
|
+
- Update RPM packaging names, requirements, and paths due to Puppet 4 [\#65](https://github.com/arista-eosplus/rbeapi/pull/65) ([jerearista](https://github.com/jerearista))
|
122
|
+
- Add support for getting and setting maximum paths. [\#52](https://github.com/arista-eosplus/rbeapi/pull/52) ([devrobo](https://github.com/devrobo))
|
123
|
+
|
124
|
+
**Fixed bugs:**
|
125
|
+
|
126
|
+
- api interfaces get\_members\(\) passes format: instead of encoding: to enable\(\) [\#59](https://github.com/arista-eosplus/rbeapi/issues/59)
|
127
|
+
- bgp API should return nil instead of an empty hash [\#50](https://github.com/arista-eosplus/rbeapi/issues/50)
|
128
|
+
- Changed bgp.rb get routine to return nil if the config could not be o… [\#67](https://github.com/arista-eosplus/rbeapi/pull/67) ([devrobo](https://github.com/devrobo))
|
129
|
+
- Correct option to request 'text' results [\#61](https://github.com/arista-eosplus/rbeapi/pull/61) ([jerearista](https://github.com/jerearista))
|
130
|
+
|
131
|
+
**Merged pull requests:**
|
132
|
+
|
133
|
+
- Merge develop to master for Release 0.4.0 [\#81](https://github.com/arista-eosplus/rbeapi/pull/81) ([jerearista](https://github.com/jerearista))
|
134
|
+
- Release 0.4.0 [\#80](https://github.com/arista-eosplus/rbeapi/pull/80) ([jerearista](https://github.com/jerearista))
|
135
|
+
- Update rubocop version and rectify related test failures. [\#76](https://github.com/arista-eosplus/rbeapi/pull/76) ([websitescenes](https://github.com/websitescenes))
|
136
|
+
- Add method to enable ip routing to the system API [\#75](https://github.com/arista-eosplus/rbeapi/pull/75) ([websitescenes](https://github.com/websitescenes))
|
137
|
+
- Added vrrp api module and unit tests. [\#64](https://github.com/arista-eosplus/rbeapi/pull/64) ([devrobo](https://github.com/devrobo))
|
138
|
+
- Adding feature routemap [\#63](https://github.com/arista-eosplus/rbeapi/pull/63) ([websitescenes](https://github.com/websitescenes))
|
139
|
+
- varp and varp interfaces update. [\#60](https://github.com/arista-eosplus/rbeapi/pull/60) ([websitescenes](https://github.com/websitescenes))
|
140
|
+
- Fixed comment for value param for set\_lacp\_timeout method. [\#57](https://github.com/arista-eosplus/rbeapi/pull/57) ([devrobo](https://github.com/devrobo))
|
141
|
+
- Feature user updates [\#56](https://github.com/arista-eosplus/rbeapi/pull/56) ([websitescenes](https://github.com/websitescenes))
|
142
|
+
- Update max\_paths to maximum\_paths and max\_ecmp\_paths to maximum\_ecmp\_… [\#55](https://github.com/arista-eosplus/rbeapi/pull/55) ([websitescenes](https://github.com/websitescenes))
|
143
|
+
- Fixed issues on the new bgp create call. [\#54](https://github.com/arista-eosplus/rbeapi/pull/54) ([devrobo](https://github.com/devrobo))
|
144
|
+
- Added support for getting users information. [\#53](https://github.com/arista-eosplus/rbeapi/pull/53) ([devrobo](https://github.com/devrobo))
|
145
|
+
- add dry-run mode [\#42](https://github.com/arista-eosplus/rbeapi/pull/42) ([kakkotetsu](https://github.com/kakkotetsu))
|
146
|
+
|
147
|
+
## [v0.3.0](https://github.com/arista-eosplus/rbeapi/tree/v0.3.0) (2015-08-24)
|
148
|
+
[Full Changelog](https://github.com/arista-eosplus/rbeapi/compare/v0.2.0...v0.3.0)
|
149
|
+
|
150
|
+
**Fixed bugs:**
|
151
|
+
|
152
|
+
- rbeapi exits if $HOME is not set [\#46](https://github.com/arista-eosplus/rbeapi/issues/46)
|
153
|
+
|
154
|
+
**Merged pull requests:**
|
155
|
+
|
156
|
+
- Release 0.3.0 to master [\#51](https://github.com/arista-eosplus/rbeapi/pull/51) ([jerearista](https://github.com/jerearista))
|
157
|
+
- Release 0.3.0 [\#49](https://github.com/arista-eosplus/rbeapi/pull/49) ([jerearista](https://github.com/jerearista))
|
158
|
+
- Only search home directory if HOME is defined ISSUE \#46 [\#48](https://github.com/arista-eosplus/rbeapi/pull/48) ([devrobo](https://github.com/devrobo))
|
159
|
+
- set\_shutdown needs to negate the enable option. [\#47](https://github.com/arista-eosplus/rbeapi/pull/47) ([devrobo](https://github.com/devrobo))
|
160
|
+
- Feature staticroutes [\#45](https://github.com/arista-eosplus/rbeapi/pull/45) ([jerearista](https://github.com/jerearista))
|
161
|
+
- Broaden the regex matching for portchannel member interfaces [\#44](https://github.com/arista-eosplus/rbeapi/pull/44) ([jerearista](https://github.com/jerearista))
|
162
|
+
- Update rpm requires sections for rbeapi [\#43](https://github.com/arista-eosplus/rbeapi/pull/43) ([jerearista](https://github.com/jerearista))
|
163
|
+
- Added support for BGP along with unit tests. [\#41](https://github.com/arista-eosplus/rbeapi/pull/41) ([devrobo](https://github.com/devrobo))
|
164
|
+
- Eliminate overloading value option in command\_builder. [\#39](https://github.com/arista-eosplus/rbeapi/pull/39) ([devrobo](https://github.com/devrobo))
|
165
|
+
|
166
|
+
## [v0.2.0](https://github.com/arista-eosplus/rbeapi/tree/v0.2.0) (2015-07-08)
|
167
|
+
[Full Changelog](https://github.com/arista-eosplus/rbeapi/compare/v0.1.0...v0.2.0)
|
168
|
+
|
169
|
+
**Implemented enhancements:**
|
170
|
+
|
171
|
+
- Add \[connection:\*\] to eapi.conf syntax [\#18](https://github.com/arista-eosplus/rbeapi/issues/18)
|
172
|
+
- can't rake all\_rpms [\#11](https://github.com/arista-eosplus/rbeapi/issues/11)
|
173
|
+
- add read\_timeout and open\_timeout to client.rb [\#10](https://github.com/arista-eosplus/rbeapi/issues/10)
|
174
|
+
- Add netaddr rubygem rpm [\#35](https://github.com/arista-eosplus/rbeapi/pull/35) ([jerearista](https://github.com/jerearista))
|
175
|
+
- Fix RPM packaging for Ubuntu systems. Fixes \#11 [\#14](https://github.com/arista-eosplus/rbeapi/pull/14) ([jerearista](https://github.com/jerearista))
|
176
|
+
|
177
|
+
**Fixed bugs:**
|
178
|
+
|
179
|
+
- rbeapi swix/rpms fail to install completely on EOS [\#34](https://github.com/arista-eosplus/rbeapi/issues/34)
|
180
|
+
- interfaces API may appear to return duplicate port-channel members on MLAG interfaces [\#16](https://github.com/arista-eosplus/rbeapi/issues/16)
|
181
|
+
- connection profile name is not copied to host attribute [\#6](https://github.com/arista-eosplus/rbeapi/issues/6)
|
182
|
+
- NoMethodError when accessing a vlan-name containing a '-' character [\#5](https://github.com/arista-eosplus/rbeapi/issues/5)
|
183
|
+
|
184
|
+
**Merged pull requests:**
|
185
|
+
|
186
|
+
- Release 0.2.0 to master [\#37](https://github.com/arista-eosplus/rbeapi/pull/37) ([jerearista](https://github.com/jerearista))
|
187
|
+
- Release 0.2.0 version and doc updates [\#36](https://github.com/arista-eosplus/rbeapi/pull/36) ([jerearista](https://github.com/jerearista))
|
188
|
+
- Change class name and hash key names. [\#33](https://github.com/arista-eosplus/rbeapi/pull/33) ([devrobo](https://github.com/devrobo))
|
189
|
+
- name path through if default connection is used [\#32](https://github.com/arista-eosplus/rbeapi/pull/32) ([kakkotetsu](https://github.com/kakkotetsu))
|
190
|
+
- Added API for standard ACLs with unit and system test. [\#28](https://github.com/arista-eosplus/rbeapi/pull/28) ([devrobo](https://github.com/devrobo))
|
191
|
+
- Add \[connection:\*\] to eapi.conf syntax Issue \#18 [\#27](https://github.com/arista-eosplus/rbeapi/pull/27) ([devrobo](https://github.com/devrobo))
|
192
|
+
- Add read\_timeout and open\_timeout to client.rb Issue 10 [\#26](https://github.com/arista-eosplus/rbeapi/pull/26) ([devrobo](https://github.com/devrobo))
|
193
|
+
- Set host key to connection profile name if host key not set. ISSUE 6 [\#25](https://github.com/arista-eosplus/rbeapi/pull/25) ([devrobo](https://github.com/devrobo))
|
194
|
+
- Changed default transport to https to match README.md [\#24](https://github.com/arista-eosplus/rbeapi/pull/24) ([devrobo](https://github.com/devrobo))
|
195
|
+
- Fixes to the rbeabi library [\#23](https://github.com/arista-eosplus/rbeapi/pull/23) ([devrobo](https://github.com/devrobo))
|
196
|
+
- Cleanup spec tests, all tests are passing. [\#21](https://github.com/arista-eosplus/rbeapi/pull/21) ([devrobo](https://github.com/devrobo))
|
197
|
+
- Doc fixes [\#20](https://github.com/arista-eosplus/rbeapi/pull/20) ([devrobo](https://github.com/devrobo))
|
198
|
+
- Addressed RuboCop reported issues. [\#19](https://github.com/arista-eosplus/rbeapi/pull/19) ([devrobo](https://github.com/devrobo))
|
199
|
+
- Fixes \#16 - Change port-channel members regex to anchor on word-boundary. [\#17](https://github.com/arista-eosplus/rbeapi/pull/17) ([jerearista](https://github.com/jerearista))
|
200
|
+
- Rubocop driven cleanup. Spec tests still need to be fixed. [\#12](https://github.com/arista-eosplus/rbeapi/pull/12) ([devrobo](https://github.com/devrobo))
|
201
|
+
- add HTTP read\_timeout [\#9](https://github.com/arista-eosplus/rbeapi/pull/9) ([kakkotetsu](https://github.com/kakkotetsu))
|
202
|
+
- Add support for spanning tree portfast\_type. [\#8](https://github.com/arista-eosplus/rbeapi/pull/8) ([devrobo](https://github.com/devrobo))
|
203
|
+
- Fix typo in set\_flowcontrol method. [\#7](https://github.com/arista-eosplus/rbeapi/pull/7) ([devrobo](https://github.com/devrobo))
|
204
|
+
- Feature - generate RPMs and instructions for SWIX files [\#4](https://github.com/arista-eosplus/rbeapi/pull/4) ([jerearista](https://github.com/jerearista))
|
205
|
+
- Fix a couple typos, minor formatting in README.md [\#3](https://github.com/arista-eosplus/rbeapi/pull/3) ([brandt](https://github.com/brandt))
|
206
|
+
- Fix missing OpenSSL require [\#2](https://github.com/arista-eosplus/rbeapi/pull/2) ([brandt](https://github.com/brandt))
|
207
|
+
|
208
|
+
## [v0.1.0](https://github.com/arista-eosplus/rbeapi/tree/v0.1.0) (2015-02-25)
|
209
|
+
|
210
|
+
|
211
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
data/Gemfile
CHANGED
@@ -1,12 +1,10 @@
|
|
1
1
|
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
2
2
|
|
3
3
|
gem 'inifile'
|
4
|
-
gem 'json'
|
5
4
|
gem 'net_http_unix'
|
6
5
|
gem 'netaddr'
|
7
6
|
|
8
7
|
group :development do
|
9
|
-
gem 'rubocop', '>=0.35.1'
|
10
8
|
gem 'guard'
|
11
9
|
gem 'guard-rspec'
|
12
10
|
gem 'guard-rubocop'
|
@@ -24,10 +22,23 @@ group :development, :test do
|
|
24
22
|
gem 'pry', require: false
|
25
23
|
gem 'pry-doc', require: false
|
26
24
|
gem 'pry-stack_explorer', require: false
|
27
|
-
gem 'rbeapi', '0
|
25
|
+
gem 'rbeapi', '1.0', path: '.'
|
28
26
|
gem 'ci_reporter_rspec', require: false
|
29
27
|
gem 'simplecov-json', require: false
|
30
28
|
gem 'simplecov-rcov', require: false
|
31
29
|
end
|
32
30
|
|
31
|
+
# Rubocop > 0.37 requires a gem that only works with ruby 2.x
|
32
|
+
if RUBY_VERSION.to_f < 2.0
|
33
|
+
gem 'json', '<2.0'
|
34
|
+
group :development, :test do
|
35
|
+
gem 'rubocop', '>=0.35.1', '< 0.38'
|
36
|
+
end
|
37
|
+
else
|
38
|
+
gem 'json'
|
39
|
+
group :development, :test do
|
40
|
+
gem 'rubocop', '>=0.35.1'
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
33
44
|
# vim:ft=ruby
|
data/README.md
CHANGED
@@ -21,16 +21,28 @@ Unit/System spec/coverage: [![Spec Build Status](https://revproxy.arista.com/eos
|
|
21
21
|
|
22
22
|
# Overview
|
23
23
|
|
24
|
-
The Ruby Client for eAPI provides a native Ruby implementation for programming
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
24
|
+
The Ruby Client for eAPI provides a native Ruby implementation for programming
|
25
|
+
Arista EOS network devices using Ruby. The Ruby client provides the ability to
|
26
|
+
build native applications in Ruby that can communicate with EOS either locally
|
27
|
+
via Unix domain sockets (on-box) or remotely over a HTTP/S transport (off-box).
|
28
|
+
It uses a standard INI-style configuration file to specifiy one or more
|
29
|
+
connection profiles.
|
30
|
+
|
31
|
+
The rbeapi implemenation also provides an API layer for building native Ruby
|
32
|
+
objects that allow for configuration and state extraction of EOS nodes. The
|
33
|
+
API layer provides a consistent implementation for working with EOS
|
34
|
+
configuration resources. The implementation of the API layer is highly
|
35
|
+
extensible and can be used as a foundation for building custom data models.
|
36
|
+
|
37
|
+
The libray is freely provided to the open source community for building robust
|
38
|
+
applications using Arista EOS eAPI. Support is provided as best effort through
|
39
|
+
Github iusses.
|
29
40
|
|
30
41
|
## Requirements
|
31
42
|
|
32
43
|
* Arista EOS 4.12 or later
|
33
|
-
* Arista eAPI enabled for at least one transport (see official EOS Config Guide
|
44
|
+
* Arista eAPI enabled for at least one transport (see official EOS Config Guide
|
45
|
+
at arista.com for details)
|
34
46
|
* Ruby 1.9.3 or later
|
35
47
|
|
36
48
|
# Getting Started
|
@@ -152,7 +164,7 @@ node.config('hostname veos01')
|
|
152
164
|
node.config(['interface Ethernet1', 'description foo'])
|
153
165
|
=> [{}, {}]
|
154
166
|
|
155
|
-
# return the running or startup configuration from the node (output omitted for brevity)
|
167
|
+
# return the running or startup configuration from the node as a string (output omitted for brevity)
|
156
168
|
|
157
169
|
node.running_config
|
158
170
|
|
@@ -214,17 +226,18 @@ and uploaded to [RubyGems](https://rubygems.org/).
|
|
214
226
|
```
|
215
227
|
|
216
228
|
* To create an RPM, run ``rake rpm``
|
217
|
-
* To generate a SWIX file for EOS with necessary dependencies, run
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
229
|
+
* To generate a SWIX file for EOS with necessary dependencies, run ``rake
|
230
|
+
all_rpms`` then follow the ``swix create`` instructions, provided by the
|
231
|
+
build. NOTE: [Puppet](https://puppet.com/misc/pe-files) provides a puppet
|
232
|
+
agent SWIX which includes Ruby in /opt/puppet/bin/, or /opt/puppetlabs/bin/,
|
233
|
+
which is different from where you might otherwise install Ruby. If you have
|
234
|
+
installed the puppet-enterprise 3.x SWIX, then you should build and use the
|
235
|
+
``rbeapi-puppet3`` swix, below. If you have installed the puppet-enterprise
|
236
|
+
2015.x SWIX, or higher, (the all-in-one agent) then you should build and use
|
237
|
+
the ``rbeapi-puppet-aio`` swix, below. Chef includes its own Ruby in the
|
238
|
+
omnibus installation package in /opt/chef/bin/. For Chef, use the
|
239
|
+
``rbeapi-chef`` SWIX package. Otherwise, if you have installed at least Ruby
|
240
|
+
1.9.3 in the standard system location, then the ``rbeapi`` SWIX may be used.
|
228
241
|
|
229
242
|
```
|
230
243
|
$ bundle install --path .bundle/gems/
|
@@ -235,24 +248,32 @@ Copy the RPMs to an EOS device then run the 'swix create' command.
|
|
235
248
|
Examples:
|
236
249
|
Puppet Open Source:
|
237
250
|
cd /mnt/flash; \
|
238
|
-
swix create rbeapi-0
|
239
|
-
rubygem-rbeapi-0
|
251
|
+
swix create rbeapi-1.0-1.swix \
|
252
|
+
rubygem-rbeapi-1.0-1.eos4.noarch.rpm \
|
240
253
|
rubygem-inifile-3.0.0-3.eos4.noarch.rpm \
|
241
254
|
rubygem-netaddr-1.5.0-2.eos4.noarch.rpm \
|
242
255
|
rubygem-net_http_unix-0.2.1-3.eos4.noarch.rpm
|
243
256
|
Puppet-enterprise agent (3.x):
|
244
257
|
cd/mnt/flash; \
|
245
|
-
swix create rbeapi-puppet3-0
|
246
|
-
rubygem-rbeapi-puppet3-0
|
258
|
+
swix create rbeapi-puppet3-1.0-1.swix \
|
259
|
+
rubygem-rbeapi-puppet3-1.0-1.eos4.noarch.rpm \
|
247
260
|
rubygem-inifile-puppet3-3.0.0-3.eos4.noarch.rpm \
|
248
261
|
rubygem-netaddr-puppet3-1.5.0-2.eos4.noarch.rpm
|
249
262
|
Puppet-All-in-one agent (2015.x/4.x):
|
250
263
|
cd/mnt/flash; \
|
251
|
-
swix create rbeapi-puppet-aio-0
|
252
|
-
rubygem-rbeapi-puppet-aio-0
|
264
|
+
swix create rbeapi-puppet-aio-1.0-1.swix \
|
265
|
+
rubygem-rbeapi-puppet-aio-1.0-1.eos4.noarch.rpm \
|
253
266
|
rubygem-inifile-puppet-aio-3.0.0-3.eos4.noarch.rpm \
|
254
267
|
rubygem-netaddr-puppet-aio-1.5.0-2.eos4.noarch.rpm \
|
255
268
|
rubygem-net_http_unix-puppet-aio-0.2.1-3.eos4.noarch.rpm
|
269
|
+
|
270
|
+
Chef client:
|
271
|
+
cd /mnt/flash; \
|
272
|
+
swix create rbeapi-chef-1.0-1.swix \
|
273
|
+
rubygem-rbeapi-chef-1.0-1.eos4.noarch.rpm \
|
274
|
+
rubygem-inifile-chef-3.0.0-5.eos4.noarch.rpm \
|
275
|
+
rubygem-netaddr-chef-1.5.1-4.eos4.noarch.rpm \
|
276
|
+
rubygem-net_http_unix-chef-0.2.2-5.eos4.noarch.rpm
|
256
277
|
```
|
257
278
|
|
258
279
|
On EOS:
|
@@ -260,13 +281,13 @@ Copy the RPMs to an EOS device then run the 'swix create' command.
|
|
260
281
|
Arista# copy <URI-to-RPMs> flash:
|
261
282
|
Arista# bash
|
262
283
|
-bash-4.1# cd /mnt/flash/
|
263
|
-
-bash-4.1# swix create rbeapi-puppet3-0
|
264
|
-
rubygem-rbeapi-puppet3-0
|
284
|
+
-bash-4.1# swix create rbeapi-puppet3-1.0-1.swix \
|
285
|
+
rubygem-rbeapi-puppet3-1.0-1.eos4.noarch.rpm \
|
265
286
|
rubygem-inifile-puppet3-3.0.0-1.eos4.noarch.rpm \
|
266
287
|
rubygem-netaddr-puppet3-1.5.0-1.eos4.noarch.rpm
|
267
288
|
-bash-4.1# exit
|
268
|
-
Arista# copy flash:rbeapi-puppet3-0
|
269
|
-
Arista# extension rbeapi-puppet3-0
|
289
|
+
Arista# copy flash:rbeapi-puppet3-1.0-1.swix extension:
|
290
|
+
Arista# extension rbeapi-puppet3-1.0-1.swix
|
270
291
|
Arista# copy installed-extensions boot-extensions
|
271
292
|
```
|
272
293
|
|
@@ -275,7 +296,7 @@ Copy the RPMs to an EOS device then run the 'swix create' command.
|
|
275
296
|
On EOS:
|
276
297
|
```
|
277
298
|
Arista# no extension pe-rbeapi-0.3.0-1.swix
|
278
|
-
Arista# extension rbeapi-puppet3-0
|
299
|
+
Arista# extension rbeapi-puppet3-1.0-1.swix
|
279
300
|
Arista# copy installed-extensions boot-extensions
|
280
301
|
```
|
281
302
|
|
@@ -298,12 +319,27 @@ corresponding test cases otherwise the pull request will be rejected.
|
|
298
319
|
|
299
320
|
Copyright (c) 2016, Arista Networks, Inc. All rights reserved.
|
300
321
|
|
301
|
-
Redistribution and use in source and binary forms, with or without
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
322
|
+
Redistribution and use in source and binary forms, with or without
|
323
|
+
modification, are permitted provided that the following conditions are met:
|
324
|
+
|
325
|
+
Redistributions of source code must retain the above copyright notice, this
|
326
|
+
list of conditions and the following disclaimer.
|
327
|
+
|
328
|
+
Redistributions in binary form must reproduce the above copyright notice, this
|
329
|
+
list of conditions and the following disclaimer in the documentation and/or
|
330
|
+
other materials provided with the distribution.
|
331
|
+
|
332
|
+
Neither the name of Arista Networks nor the names of its contributors may be
|
333
|
+
used to endorse or promote products derived from this software without specific
|
334
|
+
prior written permission.
|
335
|
+
|
336
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
337
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
338
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
339
|
+
DISCLAIMED. IN NO EVENT SHALL ARISTA NETWORKS BE LIABLE FOR ANY DIRECT,
|
340
|
+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
341
|
+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
342
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
343
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
344
|
+
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
345
|
+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|