junoser 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/lib/junoser/cli.rb +14 -2
- data/lib/junoser/js_ruler.rb +6 -0
- data/lib/junoser/parser.rb +2 -11
- data/lib/junoser/ruler.rb +6 -0
- data/lib/junoser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4593e83820c87e14eb51c1bc781a7ef739a30fd81ddbb0438a144b637897d8bc
|
4
|
+
data.tar.gz: 9334a3f8c869085ac0d435f48b0cbc3add246b105f49215d72b355a8d2880dc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7c4846a31f13cb84d6c82d08c6dd07b21cfa4941799bfff38f82e353db29bc8ffb8c8663b7b29cb658bc37eba9b49802d09c15c5c07ada303bdf7fee1654ca8
|
7
|
+
data.tar.gz: 1802d0a8ba430e735d4f5f6c96264adf71396c30010a7fc8d620ad5ccb040b15595bd9e0f88f5db5ccd6c4fc980887d7f25f74a29ff539a0477467b8c4c2ba09
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/junoser/cli.rb
CHANGED
@@ -18,11 +18,23 @@ module Junoser
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def display_set(io_or_string)
|
21
|
-
Junoser::
|
21
|
+
config = Junoser::Input.new(io_or_string).read
|
22
|
+
|
23
|
+
if Junoser::Display.display_set?(config)
|
24
|
+
config
|
25
|
+
else
|
26
|
+
Junoser::Display::Set.new(config).transform
|
27
|
+
end
|
22
28
|
end
|
23
29
|
|
24
30
|
def struct(io_or_string)
|
25
|
-
Junoser::
|
31
|
+
config = Junoser::Input.new(io_or_string).read
|
32
|
+
|
33
|
+
if Junoser::Display.display_set?(config)
|
34
|
+
Junoser::Display::Structure.new(config).transform
|
35
|
+
else
|
36
|
+
config
|
37
|
+
end
|
26
38
|
end
|
27
39
|
|
28
40
|
|
data/lib/junoser/js_ruler.rb
CHANGED
@@ -165,6 +165,12 @@ module Junoser
|
|
165
165
|
def process_reserved_word(str)
|
166
166
|
# ieee-802.3ad -> 802.3ad
|
167
167
|
str.gsub! 'ieee-802.3ad', '802.3ad'
|
168
|
+
|
169
|
+
# "policy | Define a policy context from this zone" -> "from-zone | Define a policy context from this zone"
|
170
|
+
str.gsub! 'policy | Define a policy context from this zone', 'from-zone | Define a policy context from this zone'
|
171
|
+
# "to-zone-name | Destination zone" -> "to-zone | Destination zone"
|
172
|
+
str.gsub! 'to-zone-name | Destination zone', 'to-zone | Destination zone'
|
173
|
+
|
168
174
|
fix_route_filter(str)
|
169
175
|
|
170
176
|
str
|
data/lib/junoser/parser.rb
CHANGED
@@ -2862,7 +2862,6 @@ module Junoser
|
|
2862
2862
|
arg
|
2863
2863
|
)
|
2864
2864
|
).as(:oneline),
|
2865
|
-
|
2866
2865
|
# Ported from vSRX 18.3R1.9
|
2867
2866
|
b(str("security"),
|
2868
2867
|
c(
|
@@ -4891,7 +4890,6 @@ module Junoser
|
|
4891
4890
|
)
|
4892
4891
|
),
|
4893
4892
|
# End of vSRX 18.3R1.9
|
4894
|
-
|
4895
4893
|
b(str("interfaces"),
|
4896
4894
|
c(
|
4897
4895
|
b(a(str("pic-set"), arg),
|
@@ -97908,15 +97906,8 @@ module Junoser
|
|
97908
97906
|
a(str("flag"), enum(str("configuration") | str("routing-socket") | str("compilation") | str("ipc") | str("rules") | str("lookup") | str("all"))).as(:oneline)
|
97909
97907
|
)
|
97910
97908
|
),
|
97911
|
-
b(str("
|
97912
|
-
|
97913
|
-
arg,
|
97914
|
-
a(str("to-zone-name"), arg),
|
97915
|
-
c(
|
97916
|
-
b(str("policy"),
|
97917
|
-
policy_type
|
97918
|
-
)
|
97919
|
-
)
|
97909
|
+
b(s(str("from-zone"), arg, str("to-zone"), arg),
|
97910
|
+
b(str("policy"), policy_type
|
97920
97911
|
)
|
97921
97912
|
),
|
97922
97913
|
b(str("global"),
|
data/lib/junoser/ruler.rb
CHANGED
@@ -161,6 +161,12 @@ module Junoser
|
|
161
161
|
' "path" (quote | arg)'], $1)
|
162
162
|
end
|
163
163
|
|
164
|
+
str.gsub!(/^(\s*)"policy" \(\s*s\(\s*arg,\s*"to-zone-name" arg,\s*c\(\s*"policy" \(\s*policy_type\s*\)\s*\)/) do
|
165
|
+
format(['b(s("from-zone", arg, "to-zone", arg),',
|
166
|
+
' b("policy", policy_type',
|
167
|
+
], $1)
|
168
|
+
end
|
169
|
+
|
164
170
|
str
|
165
171
|
end
|
166
172
|
|
data/lib/junoser/version.rb
CHANGED
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.3.
|
4
|
+
version: 0.3.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shintaro Kojima
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parslet
|