Skip to content

Commit f14e33e

Browse files
committed
fix(ruler): argument of the commands should be regular_expression
1 parent c46a3bd commit f14e33e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/junoser/ruler.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ def process_reserved_element(str)
296296
%[#{$1}#{$2}"enable",#{$2}]
297297
end
298298

299+
# Fix .xsd: arg should be regular_expression
300+
str.gsub!(/^(\s*"(allow|deny)-(commands|configuration)-regexps") arg/) { "#{$1} regular_expression" }
301+
299302
str
300303
end
301304

test/test_valid_statements.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,12 @@ class TestValidStatements < Test::Unit::TestCase
215215
216216
set system services web-management http interface fxp0.0
217217
set system services web-management http port 8080
218+
219+
set system login class foo allow-configuration-regexps "xxx xxx"
220+
set system login class foo allow-commands-regexps "xxx xxx"
221+
set system login class foo deny-commands-regexps "xxx xxx"
222+
set system login class foo allow-configuration-regexps "xxx xxx"
223+
set system login class foo deny-configuration-regexps "xxx xxx"
218224
EOS
219225

220226
config.split("\n").each do |l|

0 commit comments

Comments
 (0)