junoser 0.4.6 → 0.5.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/lib/junoser/ruler.rb CHANGED
@@ -180,6 +180,9 @@ module Junoser
180
180
  # Fix .xsd: "icmpv6" is also acceptable
181
181
  str.gsub! '"icmp6" |', '"icmp6" | "icmpv6" |'
182
182
 
183
+ # Fix .xsd: "end-range" of "member-range"
184
+ str.gsub! '"end-range"', '"to"'
185
+
183
186
  #
184
187
  # Fix .xsd: "arg" is missing
185
188
  #
@@ -197,12 +200,11 @@ module Junoser
197
200
  # Fix .xsd: "ieee-802.3ad" is invalid
198
201
  str.gsub! '"ieee-802.3ad"', '"802.3ad"'
199
202
 
200
- # Fix .xsd: "class-of-service interfaces all unit * classifiers exp foo"
201
- str.gsub!(/^(\s*)sc\(\s*\("default"\)\s*\)/) do
202
- format(['c(',
203
- ' ("default" | arg)',
204
- ')'], $1)
205
- end
203
+ # Fix .xsd: "classifiers"
204
+ str.gsub! '("default")', '("default" | arg)'
205
+
206
+ # Fix .xsd: "class-of-service interfaces xxx unit x"
207
+ str.gsub! '"*"', 'arg'
206
208
 
207
209
  # Fix .xsd: "from-zone" arg is also required
208
210
  str.gsub!(/^(\s*)"policy" \(\s*s\(\s*arg,\s*"to-zone-name" arg,\s*c\(\s*"policy" \(\s*policy_type\s*\)\s*\)/) do
@@ -231,6 +233,10 @@ module Junoser
231
233
  "#{$1}\"teardown\" arg #{$2},\n#{$1}\"teardown\""
232
234
  end
233
235
 
236
+ # Fix .xsd: faster interface speed support
237
+ str.gsub! '"400g" | "oc', '"400g" | "800g" | "oc'
238
+ str.gsub! '"400G"', '"400G" | "800G"'
239
+
234
240
  str
235
241
  end
236
242
 
@@ -1,3 +1,3 @@
1
1
  module Junoser
2
- VERSION = "0.4.6"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: junoser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.6
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shintaro Kojima
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-02 00:00:00.000000000 Z
11
+ date: 2022-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet
@@ -104,6 +104,7 @@ files:
104
104
  - example/get-schema.xml
105
105
  - example/junos-18.1R3-S9.rb
106
106
  - example/mx-19.3R3-S1.3.rb
107
+ - example/mx-21.2R3-S2.9.rb
107
108
  - example/vmx-17.2R1.13.rb
108
109
  - example/vsrx-12.1.x47.rb
109
110
  - example/vsrx-18.3R1.9.rb