junoser 0.3.3 → 0.3.4
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 +0 -1
- data/.travis.yml +6 -4
- data/CHANGELOG.md +169 -75
- data/Gemfile.lock +30 -0
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/Rakefile +11 -3
- data/example/vmx-17.2R1.13.rb +42432 -42429
- data/junoser.gemspec +6 -2
- data/lib/junoser/development.rb +1 -0
- data/lib/junoser/display/config_store.rb +15 -15
- data/lib/junoser/display/enumerable.rb +35 -0
- data/lib/junoser/display.rb +3 -0
- data/lib/junoser/js_ruler.rb +334 -0
- data/lib/junoser/parser.rb +315 -308
- data/lib/junoser/ruler.rb +12 -3
- data/lib/junoser/squash.rb +9 -1
- data/lib/junoser/transformer.rb +8 -0
- data/lib/junoser/version.rb +1 -1
- data/lib/junoser/xsd/element.rb +13 -0
- data/lib/junoser/xsd/restriction.rb +9 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8946b872579e3b18abedace1d082a3113b0d0f97ebe5764fd7151480c27f33e5
|
4
|
+
data.tar.gz: b393bce074d91a6efec26fb903d52c216608e446a2f83719b9138807c85f6189
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3b93bd2591a4e70eba6c75741aba8c7b0c26b5e90c573ab3e69c8395eb66ae80526c5f02b16bb6a30d1e31864148564c2115e58a63bb0c28ab4b191bffd5ceb
|
7
|
+
data.tar.gz: a3132d5e32f3e87c78c5db1a9762f106b35bdafb458d3093003e138a5462440a2fa0493de93bc9b618ca961cb60a3d6e1ad0a588d8b6da49fc61fe773696154d
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,172 +1,266 @@
|
|
1
|
-
## 0.3.
|
1
|
+
## [0.3.4] - 2019-02-17
|
2
2
|
|
3
|
-
|
4
|
-
* Accept quoted string for
|
5
|
-
* "snmp location"
|
6
|
-
* "snmp contact"
|
3
|
+
### Added
|
7
4
|
|
8
|
-
|
5
|
+
* Newly supported syntax
|
6
|
+
* protocols bgp minimum-hold-time xxx
|
7
|
+
* system dump-on-panic
|
8
|
+
* chassis fpc x pic x port x number-of-sub-ports x
|
9
|
+
|
10
|
+
|
11
|
+
## [0.3.3] - 2018-10-09
|
12
|
+
|
13
|
+
### Fixed
|
14
|
+
|
15
|
+
* Accept quoted string for
|
16
|
+
* "snmp location"
|
17
|
+
* "snmp contact"
|
18
|
+
|
19
|
+
|
20
|
+
## [0.3.2] - 2018-07-12
|
21
|
+
|
22
|
+
### Fixed
|
23
|
+
|
24
|
+
* Support "system services extension-service request-response grpc clear-text"
|
25
|
+
* Support "system services extension-service request-response grpc skip-authentication"
|
9
26
|
|
10
|
-
* Bug fix
|
11
|
-
* Support "system services extension-service request-response grpc clear-text"
|
12
|
-
* Support "system services extension-service request-response grpc skip-authentication"
|
13
27
|
|
14
|
-
## 0.3.1
|
28
|
+
## [0.3.1] - 2018-03-03
|
29
|
+
|
30
|
+
### Added
|
15
31
|
|
16
32
|
* Introduce a CLI command "junoser-squash"
|
17
|
-
* Bug fix
|
18
|
-
* Support "forwarding-options dhcp-relay server-group group_name x.x.x.x/y"
|
19
33
|
|
20
|
-
|
34
|
+
### Fixed
|
35
|
+
|
36
|
+
* Support "forwarding-options dhcp-relay server-group group_name x.x.x.x/y"
|
37
|
+
|
38
|
+
|
39
|
+
## [0.3.0] - 2017-10-26
|
40
|
+
|
41
|
+
### Changed
|
21
42
|
|
22
43
|
* First release based on JUNOS 17.2R1.13 of vMX
|
23
44
|
|
24
|
-
## 0.2.13 / 2017-10-13
|
25
45
|
|
26
|
-
|
27
|
-
|
46
|
+
## [0.2.13] - 2017-10-13
|
47
|
+
|
48
|
+
### Fixed
|
49
|
+
|
50
|
+
* Support "protocols mpls" commands at "routing-instances" hierarchy
|
51
|
+
|
52
|
+
|
53
|
+
## [0.2.12] - 2017-10-06
|
28
54
|
|
29
|
-
|
55
|
+
### Added
|
30
56
|
|
31
57
|
* Newly supported syntax
|
32
58
|
* class-of-service shared-buffer
|
33
59
|
|
34
|
-
|
60
|
+
|
61
|
+
## [0.2.11] - 2017-09-07
|
62
|
+
|
63
|
+
### Added
|
35
64
|
|
36
65
|
* Newly supported syntax
|
37
66
|
* forwarding-options analyzer
|
38
67
|
* routing-options dynamic-tunnels <name> udp
|
39
68
|
|
40
|
-
## 0.2.10 / 2017-08-22
|
41
69
|
|
42
|
-
|
43
|
-
|
70
|
+
## [0.2.10] - 2017-08-22
|
71
|
+
|
72
|
+
### Fixed
|
73
|
+
|
74
|
+
* routing-options dynamic-tunnels
|
75
|
+
|
44
76
|
|
45
|
-
## 0.2.9
|
77
|
+
## [0.2.9] - 2017-06-09
|
78
|
+
|
79
|
+
### Added
|
46
80
|
|
47
81
|
* Newly supported syntax
|
48
82
|
* protocols sflow
|
49
83
|
|
50
|
-
## 0.2.8 / 2017-05-17
|
51
84
|
|
52
|
-
|
53
|
-
|
85
|
+
## [0.2.8] - 2017-05-17
|
86
|
+
|
87
|
+
### Fixed
|
88
|
+
|
89
|
+
* chassis forwarding-options
|
90
|
+
|
54
91
|
|
55
|
-
## 0.2.7
|
92
|
+
## [0.2.7] - 2017-05-01
|
93
|
+
|
94
|
+
### Added
|
56
95
|
|
57
96
|
* Newly supported syntax
|
58
97
|
* system processes app-engine-virtual-machine-management-service
|
59
98
|
* system processes app-engine-management-service
|
60
99
|
* chassis fpc ? pic ? tunnel-services
|
61
100
|
|
62
|
-
|
101
|
+
|
102
|
+
## [0.2.6] - 2017-04-21
|
103
|
+
|
104
|
+
### Added
|
63
105
|
|
64
106
|
* Newly supported syntax
|
65
107
|
* chassis fpc ? pic ? port ? channel-speed ?
|
66
108
|
|
67
|
-
## 0.2.5
|
109
|
+
## [0.2.5] - 2017-04-18
|
110
|
+
|
111
|
+
### Fixed
|
112
|
+
|
113
|
+
* "deactivate", "inactive: " statement processing
|
68
114
|
|
69
|
-
* Bug fix
|
70
|
-
* "deactivate", "inactive: " statement processing
|
71
115
|
|
72
|
-
## 0.2.4
|
116
|
+
## [0.2.4] - 2017-02-18
|
117
|
+
|
118
|
+
### Added
|
73
119
|
|
74
120
|
* Newly supported syntax
|
75
121
|
* system processes app-engine-virtual-machine-management-service traceoptions
|
76
122
|
* Some platforms expect "system processes dhcp", not "system processes dhcp-service"
|
77
123
|
* "storm-control" under family bridge
|
78
|
-
* Bug fix
|
79
|
-
* Appropriately extract "vlan <vlan-name>"
|
80
124
|
|
81
|
-
|
125
|
+
### Fixed
|
126
|
+
|
127
|
+
* Appropriately extract "vlan <vlan-name>"
|
128
|
+
|
129
|
+
|
130
|
+
## [0.2.3] - 2016-08-28
|
131
|
+
|
132
|
+
### Added
|
82
133
|
|
83
134
|
* Newly supported syntax
|
84
135
|
* chassis fpc N error
|
85
136
|
* forwarding-options sampling family mpls
|
86
137
|
|
87
|
-
|
138
|
+
|
139
|
+
## [0.2.2] - 2016-02-15
|
140
|
+
|
141
|
+
### Added
|
88
142
|
|
89
143
|
* Newly supported syntax
|
90
144
|
* system services ssh
|
91
|
-
* Bug fix
|
92
|
-
* choice syntax
|
93
145
|
|
94
|
-
|
146
|
+
### Fixed
|
147
|
+
|
148
|
+
* choice syntax
|
149
|
+
|
150
|
+
|
151
|
+
## [0.2.1] - 2016-01-15
|
152
|
+
|
153
|
+
### Added
|
95
154
|
|
96
155
|
* Newly supported syntax
|
97
156
|
* services flow-monitoring version9 template
|
98
|
-
* Bug fix
|
99
|
-
* template-name
|
100
157
|
* Start CI
|
101
158
|
|
102
|
-
|
159
|
+
### Fixed
|
160
|
+
|
161
|
+
* template-name
|
162
|
+
|
163
|
+
|
164
|
+
## [0.2.0] - 2015-12-26
|
165
|
+
|
166
|
+
### Added
|
167
|
+
|
168
|
+
* Newly supported syntax
|
169
|
+
* Minimal configuration of MS-PIC/MIC based flow sampling
|
170
|
+
|
171
|
+
### Changed
|
103
172
|
|
104
173
|
* Use "choice" instead of "sequence of choices"
|
105
174
|
* Sequence of choices comes from .xsd for NETCONF.
|
106
175
|
It's required for XML but worthless and time wasting for CLI.
|
107
176
|
* 150% fast!
|
108
177
|
|
109
|
-
|
110
|
-
* 802.3ad
|
111
|
-
* ether-options
|
112
|
-
* storm-control default
|
113
|
-
* vrf-target
|
114
|
-
* maximum-prefix teardown
|
115
|
-
* traceoptions
|
116
|
-
* system syslog archive
|
117
|
-
* system login user
|
118
|
-
* routing-options confederation
|
119
|
-
* hold-time
|
120
|
-
* protocols ospf area x.x.x.x stub default-metric x x
|
121
|
-
* protocols rsvp interface xxx subscription x
|
122
|
-
* traceoptions cspf-link
|
123
|
-
* protocols mpls priority
|
124
|
-
* protocols mpls label-switched-path xxx primary xxx bandwidth xxx
|
125
|
-
* protocols xxx rib-group xxx xxx
|
126
|
-
* protocols mpls path xxx xxx
|
178
|
+
### Fixed
|
127
179
|
|
128
|
-
*
|
129
|
-
|
180
|
+
* 802.3ad
|
181
|
+
* ether-options
|
182
|
+
* storm-control default
|
183
|
+
* vrf-target
|
184
|
+
* maximum-prefix teardown
|
185
|
+
* traceoptions
|
186
|
+
* system syslog archive
|
187
|
+
* system login user
|
188
|
+
* routing-options confederation
|
189
|
+
* hold-time
|
190
|
+
* protocols ospf area x.x.x.x stub default-metric x x
|
191
|
+
* protocols rsvp interface xxx subscription x
|
192
|
+
* traceoptions cspf-link
|
193
|
+
* protocols mpls priority
|
194
|
+
* protocols mpls label-switched-path xxx primary xxx bandwidth xxx
|
195
|
+
* protocols xxx rib-group xxx xxx
|
196
|
+
* protocols mpls path xxx xxx
|
130
197
|
|
131
|
-
## 0.1.6 / 2015-10-31
|
132
198
|
|
133
|
-
|
134
|
-
* route-filter statement should be translated into one-line
|
199
|
+
## [0.1.6] - 2015-10-31
|
135
200
|
|
136
|
-
|
201
|
+
### Fixed
|
137
202
|
|
138
|
-
*
|
139
|
-
* mistakenly processed '{' and '}' in as-path string
|
203
|
+
* route-filter statement should be translated into one-line
|
140
204
|
|
141
|
-
## 0.1.4 / 2015-09-11
|
142
205
|
|
143
|
-
|
144
|
-
* missing community operator in policy-statement didn't fail
|
206
|
+
## [0.1.5] - 2015-09-11
|
145
207
|
|
146
|
-
|
208
|
+
### Fixed
|
209
|
+
|
210
|
+
* mistakenly processed '{' and '}' in as-path string
|
211
|
+
|
212
|
+
|
213
|
+
## [0.1.4] - 2015-09-11
|
214
|
+
|
215
|
+
### Fixed
|
216
|
+
|
217
|
+
* missing community operator in policy-statement didn't fail
|
218
|
+
|
219
|
+
|
220
|
+
## [0.1.3] - 2015-07-26
|
221
|
+
|
222
|
+
### Added
|
147
223
|
|
148
224
|
* Newly supported syntax
|
149
225
|
* "chassis ... sampling-instance"
|
150
226
|
* "forwarding-options sampling instance"
|
151
227
|
* "chassis forwarding-options"
|
152
228
|
* "protocols layer2-control"
|
229
|
+
* Add tests
|
230
|
+
|
231
|
+
### Changed
|
232
|
+
|
153
233
|
* Cosmetic changes on structured config translation
|
234
|
+
|
235
|
+
### Fixed
|
236
|
+
|
154
237
|
* Bug fix
|
155
238
|
* "confederation-as" statement
|
156
239
|
* "next-hop" statement
|
157
240
|
* "junoser -v" didn't work
|
158
241
|
* comment line handling
|
159
|
-
* Add tests
|
160
242
|
|
161
|
-
|
243
|
+
|
244
|
+
## [0.1.2] - 2015-07-14
|
245
|
+
|
246
|
+
### Fixed
|
162
247
|
|
163
248
|
* Bug fix
|
164
249
|
|
165
|
-
|
250
|
+
|
251
|
+
## [0.1.1] - 2015-07-14
|
252
|
+
|
253
|
+
### Changed
|
166
254
|
|
167
255
|
* Now "commit_check" method returns boolean
|
256
|
+
|
257
|
+
### Fixed
|
258
|
+
|
168
259
|
* Bug fixes
|
169
260
|
|
170
|
-
|
261
|
+
|
262
|
+
## [0.1.0] - 2015-07-14
|
263
|
+
|
264
|
+
### Added
|
171
265
|
|
172
266
|
* First release
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
junoser (0.3.4)
|
5
|
+
parslet
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
mini_portile2 (2.4.0)
|
11
|
+
nokogiri (1.10.0)
|
12
|
+
mini_portile2 (~> 2.4.0)
|
13
|
+
parslet (1.8.2)
|
14
|
+
power_assert (1.1.3)
|
15
|
+
rake (10.5.0)
|
16
|
+
test-unit (3.2.9)
|
17
|
+
power_assert
|
18
|
+
|
19
|
+
PLATFORMS
|
20
|
+
ruby
|
21
|
+
|
22
|
+
DEPENDENCIES
|
23
|
+
bundler (~> 2.0)
|
24
|
+
junoser!
|
25
|
+
nokogiri
|
26
|
+
rake (~> 10.0)
|
27
|
+
test-unit
|
28
|
+
|
29
|
+
BUNDLED WITH
|
30
|
+
2.0.1
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -6,7 +6,8 @@ require 'rake/testtask'
|
|
6
6
|
|
7
7
|
xsd_path = File.join(__dir__, 'tmp/junos-system-17.2.xsd')
|
8
8
|
rule_path = File.join(__dir__, 'tmp/rule.rb')
|
9
|
-
|
9
|
+
ruby_parser_path = File.join(__dir__, 'lib/junoser/parser.rb')
|
10
|
+
js_parser_path = File.join(__dir__, 'tmp/schema.js')
|
10
11
|
|
11
12
|
def open_files(input, output, &block)
|
12
13
|
i = open(input)
|
@@ -29,12 +30,19 @@ namespace :build do
|
|
29
30
|
end
|
30
31
|
end
|
31
32
|
|
32
|
-
desc 'Build
|
33
|
+
desc 'Build ruby parser'
|
33
34
|
task(:rule) do
|
34
|
-
open_files(rule_path,
|
35
|
+
open_files(rule_path, ruby_parser_path) do |input, output|
|
35
36
|
output.puts Junoser::Ruler.new(input).to_rule
|
36
37
|
end
|
37
38
|
end
|
39
|
+
|
40
|
+
desc 'Build javascript parser'
|
41
|
+
task(:jsrule) do
|
42
|
+
open_files(rule_path, js_parser_path) do |input, output|
|
43
|
+
output.puts Junoser::JsRuler.new(input).to_rule
|
44
|
+
end
|
45
|
+
end
|
38
46
|
end
|
39
47
|
|
40
48
|
|