junoser 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e5143d4a1cd52517e76888edab70ba8938e66b98e8869bcf9de3e5963860cee
4
- data.tar.gz: be817dc008cd1f482c01e1d577314d72d90f436f582388db43df967dcd9599dd
3
+ metadata.gz: f0f5175a9101056425a61f1d23d8c9ecfc258b25c23deea881bb82a6df7a80b2
4
+ data.tar.gz: 60ae6a0222865a2f06d05e40fdd9c495103e97b7b60665138a7c1354cb70bb84
5
5
  SHA512:
6
- metadata.gz: e579496b46fb6297e69909d20dc77f3851a75b10eec1c545530bab725b1953491bfab82d950183e3c99adcb0cd7655e23fcea8d74c5607acd3188ad37fda1edf
7
- data.tar.gz: 2ce8eeff3c0af7927c4318e6ace521be67d5ccc3a479e72a2e1a460731785b7622eead33d53bdecf0ab3dabcee507252660675b3421d5231b0f66e2343177eed
6
+ metadata.gz: 4b3db43a02237e582b130324c0cd63340254e9cab85fa9ac525ed7a4fb5c053f06c0eae3d20bd91ebd1a1937ab0aed2ccb537ce6937c25692ab83f8a937e9fe9
7
+ data.tar.gz: 1fb1f8a6b02658522cdc042fc63bb1a864a4d6be147723169f5e5990762fe51124920d8266759631873e63a80f3186b05642c2584475878218fc2207f5f22fa3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [0.4.7] - 2022-09-20
2
+
3
+ ### Added
4
+
5
+ * Faster interface speed up to 800g
6
+
7
+ ### Fixed
8
+
9
+ * "interfaces interface-range xxx member-range"
10
+ * "classifiers" for QoS
11
+
12
+
1
13
  ## [0.4.6] - 2022-07-02
2
14
 
3
15
  ### Fixed
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- junoser (0.4.6)
4
+ junoser (0.4.7)
5
5
  parslet
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  mini_portile2 (2.8.0)
11
- nokogiri (1.13.6)
11
+ nokogiri (1.13.8)
12
12
  mini_portile2 (~> 2.8.0)
13
13
  racc (~> 1.4)
14
14
  parslet (2.0.0)
@@ -16,8 +16,9 @@ module Junoser
16
16
 
17
17
  def rule
18
18
  str = @rule.read
19
+ str = process_lines(str)
19
20
  str = str.split(/\n/).map {|l|
20
- format(process_line(l)) unless l =~ /^ *#/ # Skip additional comment lines
21
+ process_line(l) unless l =~ /^ *#/ # Skip additional comment lines
21
22
  }.compact.join("\n")
22
23
  finalize(str)
23
24
  end
@@ -161,9 +162,12 @@ module Junoser
161
162
  end
162
163
 
163
164
  def process_reserved_word(str)
164
- # ieee-802.3ad -> 802.3ad
165
+ # ieee-802.3ad -> 802.3ad
165
166
  str.gsub! 'ieee-802.3ad', '802.3ad'
166
167
 
168
+ # end-range -> to
169
+ str.gsub! '"end-range"', '"to"'
170
+
167
171
  # "policy | Define a policy context from this zone" -> "from-zone | Define a policy context from this zone"
168
172
  str.gsub! 'policy | Define a policy context from this zone', 'from-zone | Define a policy context from this zone'
169
173
  # "to-zone-name | Destination zone" -> "to-zone | Destination zone"
@@ -171,6 +175,18 @@ module Junoser
171
175
  # "system-name | System name override" -> "name | System name override"
172
176
  str.gsub! 'system-name | System name override', 'name | System name override'
173
177
 
178
+ # "set class-of-service interfaces all unit"
179
+ str.gsub! '"unit(*)"', '"unit(*|arg)"'
180
+ # "classifiers xxx"
181
+ str.gsub! '["default"]', '["default", "arg"]'
182
+
183
+ # keywords "dest-nat-rule-match", "src-nat-rule-match", "static-nat-rule-match" are wrong
184
+ str.gsub!(/"(dest|src|static)-nat-rule-match/) { '"match' }
185
+
186
+ # faster interface speed support
187
+ str.gsub! '"40g", "oc3"', '"40g", "100g", "200g", "400g", "800g", "oc3"'
188
+ str.gsub! '"100G"', '"100G", "200G", "400G", "800G"'
189
+
174
190
  fix_route_filter(str)
175
191
 
176
192
  str
@@ -192,6 +208,15 @@ module Junoser
192
208
  str
193
209
  end
194
210
 
211
+ def process_lines(str)
212
+ # "set protocols mpls path"
213
+ str.gsub!(/("path" arg \(.*Route of a label-switched path.*)(\s*)c\(/) do
214
+ "#{$1}#{$2}s(#{$2}ipaddr,"
215
+ end
216
+
217
+ str
218
+ end
219
+
195
220
  def finalize(lines)
196
221
  lines = balance_parenthesis(lines)
197
222
  objectize_arg_of_s(lines)
@@ -5324,7 +5324,7 @@ module Junoser
5324
5324
  a(str("member"), arg),
5325
5325
  b(a(str("member-range"), arg),
5326
5326
  sc(
5327
- b(str("end-range"),
5327
+ b(str("to"),
5328
5328
  interface_device
5329
5329
  )
5330
5330
  )
@@ -5406,7 +5406,7 @@ module Junoser
5406
5406
  ),
5407
5407
  str("no-pseudowire-down-on-core-isolation"),
5408
5408
  b(str("speed"),
5409
- (str("auto") | str("auto-10m-100m") | str("10m") | str("100m") | str("1g") | str("2.5g") | str("5g") | str("10g") | str("40g") | str("oc3") | str("oc12") | str("oc48"))
5409
+ (str("auto") | str("auto-10m-100m") | str("10m") | str("100m") | str("1g") | str("2.5g") | str("5g") | str("10g") | str("40g") | str("100g") | str("200g") | str("400g") | str("800g") | str("oc3") | str("oc12") | str("oc48"))
5410
5410
  ),
5411
5411
  b(str("forwarding-class-accounting"),
5412
5412
  c(
@@ -21052,7 +21052,7 @@ module Junoser
21052
21052
  b(arg.as(:arg),
21053
21053
  c(
21054
21054
  b(str("pic-mode"),
21055
- (str("10G") | str("25G") | str("40G") | str("100G"))
21055
+ (str("10G") | str("25G") | str("40G") | str("100G") | str("200G") | str("400G") | str("800G"))
21056
21056
  ),
21057
21057
  b(str("tunnel-port"),
21058
21058
  chassis_port_type
@@ -27760,7 +27760,7 @@ module Junoser
27760
27760
  ),
27761
27761
  str("no-pseudowire-down-on-core-isolation"),
27762
27762
  b(str("speed"),
27763
- (str("auto") | str("auto-10m-100m") | str("10m") | str("100m") | str("1g") | str("2.5g") | str("5g") | str("10g") | str("40g") | str("oc3") | str("oc12") | str("oc48"))
27763
+ (str("auto") | str("auto-10m-100m") | str("10m") | str("100m") | str("1g") | str("2.5g") | str("5g") | str("10g") | str("40g") | str("100g") | str("200g") | str("400g") | str("800g") | str("oc3") | str("oc12") | str("oc48"))
27764
27764
  ),
27765
27765
  b(str("forwarding-class-accounting"),
27766
27766
  c(
@@ -40179,7 +40179,7 @@ module Junoser
40179
40179
  b(a(str("dscp"), arg),
40180
40180
  c(
40181
40181
  b(str("import"),
40182
- (str("default"))
40182
+ (str("default") | arg)
40183
40183
  ),
40184
40184
  b(a(str("forwarding-class"), arg),
40185
40185
  c(
@@ -40195,7 +40195,7 @@ module Junoser
40195
40195
  b(a(str("dscp-ipv6"), arg),
40196
40196
  c(
40197
40197
  b(str("import"),
40198
- (str("default"))
40198
+ (str("default") | arg)
40199
40199
  ),
40200
40200
  b(a(str("forwarding-class"), arg),
40201
40201
  c(
@@ -40211,7 +40211,7 @@ module Junoser
40211
40211
  b(a(str("exp"), arg),
40212
40212
  c(
40213
40213
  b(str("import"),
40214
- (str("default"))
40214
+ (str("default") | arg)
40215
40215
  ),
40216
40216
  b(a(str("forwarding-class"), arg),
40217
40217
  c(
@@ -40227,7 +40227,7 @@ module Junoser
40227
40227
  b(a(str("ieee-802.1"), arg),
40228
40228
  c(
40229
40229
  b(str("import"),
40230
- (str("default"))
40230
+ (str("default") | arg)
40231
40231
  ),
40232
40232
  b(a(str("forwarding-class"), arg),
40233
40233
  c(
@@ -40243,7 +40243,7 @@ module Junoser
40243
40243
  b(a(str("inet-precedence"), arg),
40244
40244
  c(
40245
40245
  b(str("import"),
40246
- (str("default"))
40246
+ (str("default") | arg)
40247
40247
  ),
40248
40248
  b(a(str("forwarding-class"), arg),
40249
40249
  c(
@@ -40259,7 +40259,7 @@ module Junoser
40259
40259
  b(a(str("ieee-802.1ad"), arg),
40260
40260
  c(
40261
40261
  b(str("import"),
40262
- (str("default"))
40262
+ (str("default") | arg)
40263
40263
  ),
40264
40264
  b(a(str("forwarding-class"), arg),
40265
40265
  c(
@@ -40899,8 +40899,8 @@ module Junoser
40899
40899
  b(str("classifiers"),
40900
40900
  c(
40901
40901
  b(str("exp"),
40902
- c(
40903
- (str("default") | arg)
40902
+ sc(
40903
+ (str("default") | arg)
40904
40904
  )
40905
40905
  ).as(:oneline)
40906
40906
  )
@@ -40978,13 +40978,13 @@ module Junoser
40978
40978
  c(
40979
40979
  str("no-default"),
40980
40980
  b(str("exp"),
40981
- c(
40982
- (str("default") | arg)
40981
+ sc(
40982
+ (str("default") | arg)
40983
40983
  )
40984
40984
  ).as(:oneline),
40985
40985
  b(str("ieee-802.1"),
40986
40986
  sc(
40987
- (str("default")),
40987
+ (str("default") | arg),
40988
40988
  str("encapsulated"),
40989
40989
  b(str("vlan-tag"),
40990
40990
  (str("outer") | str("inner"))
@@ -40992,13 +40992,13 @@ module Junoser
40992
40992
  )
40993
40993
  ).as(:oneline),
40994
40994
  b(str("dscp"),
40995
- c(
40996
- (str("default") | arg)
40995
+ sc(
40996
+ (str("default") | arg)
40997
40997
  )
40998
40998
  ).as(:oneline),
40999
40999
  b(str("dscp-ipv6"),
41000
- c(
41001
- (str("default") | arg)
41000
+ sc(
41001
+ (str("default") | arg)
41002
41002
  )
41003
41003
  ).as(:oneline)
41004
41004
  )
@@ -41008,7 +41008,7 @@ module Junoser
41008
41008
  c(
41009
41009
  b(str("ieee-802.1"),
41010
41010
  sc(
41011
- (str("default")),
41011
+ (str("default") | arg),
41012
41012
  str("encapsulated"),
41013
41013
  b(str("vlan-tag"),
41014
41014
  (str("outer") | str("outer-and-inner"))
@@ -41017,7 +41017,7 @@ module Junoser
41017
41017
  ).as(:oneline),
41018
41018
  b(str("ieee-802.1ad"),
41019
41019
  sc(
41020
- (str("default")),
41020
+ (str("default") | arg),
41021
41021
  str("encapsulated"),
41022
41022
  b(str("vlan-tag"),
41023
41023
  (str("outer") | str("outer-and-inner"))
@@ -41039,7 +41039,7 @@ module Junoser
41039
41039
  b(a(str("dscp"), arg),
41040
41040
  c(
41041
41041
  b(str("import"),
41042
- (str("default"))
41042
+ (str("default") | arg)
41043
41043
  ),
41044
41044
  b(a(str("forwarding-class"), arg),
41045
41045
  c(
@@ -41055,7 +41055,7 @@ module Junoser
41055
41055
  b(a(str("dscp-ipv6"), arg),
41056
41056
  c(
41057
41057
  b(str("import"),
41058
- (str("default"))
41058
+ (str("default") | arg)
41059
41059
  ),
41060
41060
  b(a(str("forwarding-class"), arg),
41061
41061
  c(
@@ -41071,7 +41071,7 @@ module Junoser
41071
41071
  b(a(str("exp"), arg),
41072
41072
  c(
41073
41073
  b(str("import"),
41074
- (str("default"))
41074
+ (str("default") | arg)
41075
41075
  ),
41076
41076
  b(a(str("forwarding-class"), arg),
41077
41077
  c(
@@ -41087,7 +41087,7 @@ module Junoser
41087
41087
  b(a(str("ieee-802.1"), arg),
41088
41088
  c(
41089
41089
  b(str("import"),
41090
- (str("default"))
41090
+ (str("default") | arg)
41091
41091
  ),
41092
41092
  b(a(str("forwarding-class"), arg),
41093
41093
  c(
@@ -41103,7 +41103,7 @@ module Junoser
41103
41103
  b(a(str("inet-precedence"), arg),
41104
41104
  c(
41105
41105
  b(str("import"),
41106
- (str("default"))
41106
+ (str("default") | arg)
41107
41107
  ),
41108
41108
  b(a(str("forwarding-class"), arg),
41109
41109
  c(
@@ -41119,7 +41119,7 @@ module Junoser
41119
41119
  b(a(str("frame-relay-de"), arg),
41120
41120
  c(
41121
41121
  b(str("import"),
41122
- (str("default"))
41122
+ (str("default") | arg)
41123
41123
  ),
41124
41124
  b(a(str("forwarding-class"), arg),
41125
41125
  c(
@@ -41135,7 +41135,7 @@ module Junoser
41135
41135
  b(a(str("ieee-802.1ad"), arg),
41136
41136
  c(
41137
41137
  b(str("import"),
41138
- (str("default"))
41138
+ (str("default") | arg)
41139
41139
  ),
41140
41140
  b(a(str("forwarding-class"), arg),
41141
41141
  c(
@@ -41151,7 +41151,7 @@ module Junoser
41151
41151
  b(a(str("inet6-precedence"), arg),
41152
41152
  c(
41153
41153
  b(str("import"),
41154
- (str("default"))
41154
+ (str("default") | arg)
41155
41155
  ),
41156
41156
  b(a(str("forwarding-class"), arg),
41157
41157
  c(
@@ -41650,7 +41650,7 @@ module Junoser
41650
41650
  )
41651
41651
  ),
41652
41652
  str("logical-interface-aggregate-statistics"),
41653
- a(str("unit"), enum(str("*")),
41653
+ a(str("unit"), enum(arg),
41654
41654
  c(
41655
41655
  a(str("output-forwarding-class-map"), arg),
41656
41656
  a(str("forwarding-class"), arg),
@@ -41701,37 +41701,37 @@ module Junoser
41701
41701
  b(str("classifiers"),
41702
41702
  c(
41703
41703
  str("no-default"),
41704
- a(str("dscp"), str("default"),
41704
+ a(str("dscp"), str("default") | arg,
41705
41705
  c(
41706
41706
  a(str("family"), arg)
41707
41707
  )
41708
41708
  ),
41709
- a(str("dscp-ipv6"), str("default"),
41709
+ a(str("dscp-ipv6"), str("default") | arg,
41710
41710
  c(
41711
41711
  a(str("family"), arg)
41712
41712
  )
41713
41713
  ),
41714
41714
  b(str("exp"),
41715
- c(
41716
- (str("default") | arg)
41715
+ sc(
41716
+ (str("default") | arg)
41717
41717
  )
41718
41718
  ).as(:oneline),
41719
41719
  b(str("ieee-802.1"),
41720
41720
  sc(
41721
- (str("default")),
41721
+ (str("default") | arg),
41722
41722
  b(str("vlan-tag"),
41723
41723
  (str("outer") | str("inner") | str("transparent"))
41724
41724
  )
41725
41725
  )
41726
41726
  ).as(:oneline),
41727
41727
  b(str("inet-precedence"),
41728
- c(
41729
- (str("default") | arg)
41728
+ sc(
41729
+ (str("default") | arg)
41730
41730
  )
41731
41731
  ).as(:oneline),
41732
41732
  b(str("ieee-802.1ad"),
41733
41733
  sc(
41734
- (str("default")),
41734
+ (str("default") | arg),
41735
41735
  b(str("vlan-tag"),
41736
41736
  (str("outer") | str("inner"))
41737
41737
  )
@@ -41741,41 +41741,41 @@ module Junoser
41741
41741
  ),
41742
41742
  b(str("ingress-rewrite-rules"),
41743
41743
  c(
41744
- a(str("dscp"), str("default")).as(:oneline),
41744
+ a(str("dscp"), str("default") | arg).as(:oneline),
41745
41745
  b(str("dscp-ipv6"),
41746
- c(
41747
- (str("default") | arg)
41746
+ sc(
41747
+ (str("default") | arg)
41748
41748
  )
41749
41749
  ).as(:oneline),
41750
- a(str("inet-precedence"), str("default")).as(:oneline)
41750
+ a(str("inet-precedence"), str("default") | arg).as(:oneline)
41751
41751
  )
41752
41752
  ),
41753
41753
  b(str("loss-priority-maps"),
41754
41754
  c(
41755
41755
  b(str("frame-relay-de"),
41756
- c(
41757
- (str("default") | arg)
41756
+ sc(
41757
+ (str("default") | arg)
41758
41758
  )
41759
41759
  ).as(:oneline)
41760
41760
  )
41761
41761
  ),
41762
41762
  b(str("rewrite-rules"),
41763
41763
  c(
41764
- a(str("dscp"), str("default"),
41764
+ a(str("dscp"), str("default") | arg,
41765
41765
  sc(
41766
41766
  b(str("protocol"),
41767
41767
  (str("mpls") | str("gtp-inet-outer") | str("gtp-inet-both") | str("inet-outer") | str("inet-both"))
41768
41768
  )
41769
41769
  )
41770
41770
  ).as(:oneline),
41771
- a(str("dscp-ipv6"), str("default"),
41771
+ a(str("dscp-ipv6"), str("default") | arg,
41772
41772
  sc(
41773
41773
  b(str("protocol"),
41774
41774
  (str("mpls") | str("gtp-inet-outer") | str("gtp-inet-both"))
41775
41775
  )
41776
41776
  )
41777
41777
  ).as(:oneline),
41778
- a(str("exp"), str("default"),
41778
+ a(str("exp"), str("default") | arg,
41779
41779
  sc(
41780
41780
  b(str("protocol"),
41781
41781
  (str("mpls-any") | str("mpls-inet-both") | str("mpls-inet-both-non-vpn"))
@@ -41784,13 +41784,13 @@ module Junoser
41784
41784
  ).as(:oneline),
41785
41785
  b(str("ieee-802.1"),
41786
41786
  sc(
41787
- (str("default")),
41787
+ (str("default") | arg),
41788
41788
  b(str("vlan-tag"),
41789
41789
  (str("outer") | str("outer-and-inner"))
41790
41790
  )
41791
41791
  )
41792
41792
  ).as(:oneline),
41793
- a(str("inet-precedence"), str("default"),
41793
+ a(str("inet-precedence"), str("default") | arg,
41794
41794
  sc(
41795
41795
  b(str("protocol"),
41796
41796
  (str("mpls") | str("gtp-inet-outer") | str("gtp-inet-both") | str("inet-outer") | str("inet-both"))
@@ -41812,19 +41812,19 @@ module Junoser
41812
41812
  )
41813
41813
  ).as(:oneline),
41814
41814
  b(str("frame-relay-de"),
41815
- c(
41816
- (str("default") | arg)
41815
+ sc(
41816
+ (str("default") | arg)
41817
41817
  )
41818
41818
  ).as(:oneline),
41819
41819
  b(str("ieee-802.1ad"),
41820
41820
  c(
41821
- (str("default")),
41821
+ (str("default") | arg),
41822
41822
  b(str("vlan-tag"),
41823
41823
  (str("outer") | str("outer-and-inner"))
41824
41824
  )
41825
41825
  )
41826
41826
  ),
41827
- a(str("inet6-precedence"), str("default"),
41827
+ a(str("inet6-precedence"), str("default") | arg,
41828
41828
  sc(
41829
41829
  b(str("protocol"),
41830
41830
  (str("mpls"))
@@ -41836,8 +41836,8 @@ module Junoser
41836
41836
  b(str("loss-priority-rewrites"),
41837
41837
  c(
41838
41838
  b(str("frame-relay-de"),
41839
- c(
41840
- (str("default") | arg)
41839
+ sc(
41840
+ (str("default") | arg)
41841
41841
  )
41842
41842
  ).as(:oneline)
41843
41843
  )
@@ -41875,11 +41875,11 @@ module Junoser
41875
41875
  ),
41876
41876
  b(str("classifiers"),
41877
41877
  c(
41878
- a(str("dscp"), str("default")),
41879
- a(str("dscp-ipv6"), str("default")),
41878
+ a(str("dscp"), str("default") | arg),
41879
+ a(str("dscp-ipv6"), str("default") | arg),
41880
41880
  b(str("ieee-802.1"),
41881
41881
  sc(
41882
- (str("default")),
41882
+ (str("default") | arg),
41883
41883
  b(str("vlan-tag"),
41884
41884
  (str("outer") | str("inner"))
41885
41885
  )
@@ -41887,15 +41887,15 @@ module Junoser
41887
41887
  ).as(:oneline),
41888
41888
  b(str("ieee-802.1ad"),
41889
41889
  sc(
41890
- (str("default")),
41890
+ (str("default") | arg),
41891
41891
  b(str("vlan-tag"),
41892
41892
  (str("outer") | str("inner"))
41893
41893
  )
41894
41894
  )
41895
41895
  ).as(:oneline),
41896
41896
  b(str("inet-precedence"),
41897
- c(
41898
- (str("default") | arg)
41897
+ sc(
41898
+ (str("default") | arg)
41899
41899
  )
41900
41900
  ).as(:oneline)
41901
41901
  )
@@ -41903,22 +41903,22 @@ module Junoser
41903
41903
  a(str("forwarding-class"), arg),
41904
41904
  b(str("rewrite-rules"),
41905
41905
  c(
41906
- a(str("dscp"), str("default")).as(:oneline),
41907
- a(str("dscp-ipv6"), str("default")).as(:oneline),
41906
+ a(str("dscp"), str("default") | arg).as(:oneline),
41907
+ a(str("dscp-ipv6"), str("default") | arg).as(:oneline),
41908
41908
  b(str("ieee-802.1"),
41909
- c(
41910
- (str("default") | arg)
41909
+ sc(
41910
+ (str("default") | arg)
41911
41911
  )
41912
41912
  ).as(:oneline),
41913
41913
  b(str("ieee-802.1ad"),
41914
41914
  c(
41915
- (str("default")),
41915
+ (str("default") | arg),
41916
41916
  b(str("vlan-tag"),
41917
41917
  (str("outer"))
41918
41918
  )
41919
41919
  )
41920
41920
  ),
41921
- a(str("inet-precedence"), str("default")).as(:oneline)
41921
+ a(str("inet-precedence"), str("default") | arg).as(:oneline)
41922
41922
  )
41923
41923
  ),
41924
41924
  b(str("multi-destination"),
@@ -43080,7 +43080,7 @@ module Junoser
43080
43080
  a(str("member"), arg),
43081
43081
  b(a(str("member-range"), arg),
43082
43082
  sc(
43083
- b(str("end-range"),
43083
+ b(str("to"),
43084
43084
  interface_device
43085
43085
  )
43086
43086
  )
@@ -43162,7 +43162,7 @@ module Junoser
43162
43162
  ),
43163
43163
  str("no-pseudowire-down-on-core-isolation"),
43164
43164
  b(str("speed"),
43165
- (str("auto") | str("auto-10m-100m") | str("10m") | str("100m") | str("1g") | str("2.5g") | str("5g") | str("10g") | str("40g") | str("oc3") | str("oc12") | str("oc48"))
43165
+ (str("auto") | str("auto-10m-100m") | str("10m") | str("100m") | str("1g") | str("2.5g") | str("5g") | str("10g") | str("40g") | str("100g") | str("200g") | str("400g") | str("800g") | str("oc3") | str("oc12") | str("oc48"))
43166
43166
  ),
43167
43167
  b(str("forwarding-class-accounting"),
43168
43168
  c(
@@ -46532,7 +46532,7 @@ module Junoser
46532
46532
  a(str("member"), arg),
46533
46533
  b(a(str("member-range"), arg),
46534
46534
  sc(
46535
- b(str("end-range"),
46535
+ b(str("to"),
46536
46536
  interface_device
46537
46537
  )
46538
46538
  )
@@ -46614,7 +46614,7 @@ module Junoser
46614
46614
  ),
46615
46615
  str("no-pseudowire-down-on-core-isolation"),
46616
46616
  b(str("speed"),
46617
- (str("auto") | str("auto-10m-100m") | str("10m") | str("100m") | str("1g") | str("2.5g") | str("5g") | str("10g") | str("40g") | str("oc3") | str("oc12") | str("oc48"))
46617
+ (str("auto") | str("auto-10m-100m") | str("10m") | str("100m") | str("1g") | str("2.5g") | str("5g") | str("10g") | str("40g") | str("100g") | str("200g") | str("400g") | str("800g") | str("oc3") | str("oc12") | str("oc48"))
46618
46618
  ),
46619
46619
  b(str("forwarding-class-accounting"),
46620
46620
  c(
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! '"40g" | "oc3"', '"40g" | "100g" | "200g" | "400g" | "800g" | "oc3"'
238
+ str.gsub! '"100G"', '"100G" | "200G" | "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.4.7"
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.4.7
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-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parslet