junoser 0.2.0 → 0.2.1
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/.travis.yml +20 -0
- data/CHANGELOG.md +8 -0
- data/README.md +3 -1
- data/example/vsrx-12.1.x47.rb +11 -3
- data/lib/junoser/parser.rb +25 -28
- data/lib/junoser/ruler.rb +1 -1
- data/lib/junoser/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: deb6a3419a73f2f6172eee7ac53e50c47b69388b
|
|
4
|
+
data.tar.gz: 40ef615d8c0dc2415c646c17671fcf3a5192761e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9da9d4a942c98cd0cb6ad59f865ca4024d22c439dc9115d1eddd63b730fb8978ab41b0c1110d0892f311e4c912297d80c125ab8d78006af5ddd50fbcb8d787d6
|
|
7
|
+
data.tar.gz: c295b36c6629206c778e54e78f1b98d369f524f45f8d9393c75de102c152ea94a1092f15300fdf03b1f1edadf2adb1c615d3a581b15f4dabbbc87b5f5a27b3eb
|
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Junoser
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://travis-ci.org/codeout/junoser)
|
|
4
|
+
[](https://codeclimate.com/github/codeout/junoser)
|
|
5
|
+
[](http://inch-ci.org/github/codeout/junoser)
|
|
4
6
|
|
|
5
7
|
Junoser is a JUNOS configuration PEG parser which can be automatically generated from Juniper's netconf.xsd. (XML Schema Definition for NETCONF)
|
|
6
8
|
|
data/example/vsrx-12.1.x47.rb
CHANGED
|
@@ -37690,8 +37690,12 @@ rule(:version9_template) do
|
|
|
37690
37690
|
)
|
|
37691
37691
|
),
|
|
37692
37692
|
c(
|
|
37693
|
-
"mpls-ipv4-template"
|
|
37694
|
-
|
|
37693
|
+
"mpls-ipv4-template" (
|
|
37694
|
+
"label-position" any
|
|
37695
|
+
),
|
|
37696
|
+
"mpls-template" (
|
|
37697
|
+
"label-position" any
|
|
37698
|
+
),
|
|
37695
37699
|
"ipv6-template" (
|
|
37696
37700
|
c(
|
|
37697
37701
|
"nexthop-options"
|
|
@@ -37700,7 +37704,11 @@ rule(:version9_template) do
|
|
|
37700
37704
|
"peer-as-billing-template",
|
|
37701
37705
|
"ipv4-template" (
|
|
37702
37706
|
c(
|
|
37703
|
-
"nexthop-options"
|
|
37707
|
+
"nexthop-options" (
|
|
37708
|
+
"mpls" (
|
|
37709
|
+
"label-position" any
|
|
37710
|
+
)
|
|
37711
|
+
)
|
|
37704
37712
|
)
|
|
37705
37713
|
)
|
|
37706
37714
|
)
|
data/lib/junoser/parser.rb
CHANGED
|
@@ -18281,7 +18281,7 @@ module Junoser
|
|
|
18281
18281
|
c(
|
|
18282
18282
|
b(str("template"),
|
|
18283
18283
|
c(
|
|
18284
|
-
|
|
18284
|
+
arg
|
|
18285
18285
|
)
|
|
18286
18286
|
)
|
|
18287
18287
|
)
|
|
@@ -26811,8 +26811,7 @@ module Junoser
|
|
|
26811
26811
|
a(str("static-lsp"), arg),
|
|
26812
26812
|
b(str("label-switched-path-template"),
|
|
26813
26813
|
c(
|
|
26814
|
-
|
|
26815
|
-
a(str("template-name"), arg),
|
|
26814
|
+
ca(
|
|
26816
26815
|
str("default-template")
|
|
26817
26816
|
)
|
|
26818
26817
|
)
|
|
@@ -26828,8 +26827,7 @@ module Junoser
|
|
|
26828
26827
|
c(
|
|
26829
26828
|
b(str("label-switched-path-template"),
|
|
26830
26829
|
c(
|
|
26831
|
-
|
|
26832
|
-
a(str("template-name"), arg),
|
|
26830
|
+
ca(
|
|
26833
26831
|
str("default-template")
|
|
26834
26832
|
)
|
|
26835
26833
|
)
|
|
@@ -26869,8 +26867,7 @@ module Junoser
|
|
|
26869
26867
|
c(
|
|
26870
26868
|
b(str("label-switched-path-template"),
|
|
26871
26869
|
c(
|
|
26872
|
-
|
|
26873
|
-
a(str("template-name"), arg),
|
|
26870
|
+
ca(
|
|
26874
26871
|
str("default-template")
|
|
26875
26872
|
)
|
|
26876
26873
|
)
|
|
@@ -26885,8 +26882,7 @@ module Junoser
|
|
|
26885
26882
|
a(str("static-lsp"), arg),
|
|
26886
26883
|
b(str("label-switched-path-template"),
|
|
26887
26884
|
c(
|
|
26888
|
-
|
|
26889
|
-
a(str("template-name"), arg),
|
|
26885
|
+
ca(
|
|
26890
26886
|
str("default-template")
|
|
26891
26887
|
)
|
|
26892
26888
|
)
|
|
@@ -26920,8 +26916,7 @@ module Junoser
|
|
|
26920
26916
|
c(
|
|
26921
26917
|
b(str("label-switched-path-template"),
|
|
26922
26918
|
c(
|
|
26923
|
-
|
|
26924
|
-
a(str("template-name"), arg),
|
|
26919
|
+
ca(
|
|
26925
26920
|
str("default-template")
|
|
26926
26921
|
)
|
|
26927
26922
|
)
|
|
@@ -26936,8 +26931,7 @@ module Junoser
|
|
|
26936
26931
|
a(str("static-lsp"), arg),
|
|
26937
26932
|
b(str("label-switched-path-template"),
|
|
26938
26933
|
c(
|
|
26939
|
-
|
|
26940
|
-
a(str("template-name"), arg),
|
|
26934
|
+
ca(
|
|
26941
26935
|
str("default-template")
|
|
26942
26936
|
)
|
|
26943
26937
|
)
|
|
@@ -26971,8 +26965,7 @@ module Junoser
|
|
|
26971
26965
|
c(
|
|
26972
26966
|
b(str("label-switched-path-template"),
|
|
26973
26967
|
c(
|
|
26974
|
-
|
|
26975
|
-
a(str("template-name"), arg),
|
|
26968
|
+
ca(
|
|
26976
26969
|
str("default-template")
|
|
26977
26970
|
)
|
|
26978
26971
|
)
|
|
@@ -26987,8 +26980,7 @@ module Junoser
|
|
|
26987
26980
|
a(str("static-lsp"), arg),
|
|
26988
26981
|
b(str("label-switched-path-template"),
|
|
26989
26982
|
c(
|
|
26990
|
-
|
|
26991
|
-
a(str("template-name"), arg),
|
|
26983
|
+
ca(
|
|
26992
26984
|
str("default-template")
|
|
26993
26985
|
)
|
|
26994
26986
|
)
|
|
@@ -27017,8 +27009,7 @@ module Junoser
|
|
|
27017
27009
|
c(
|
|
27018
27010
|
b(str("label-switched-path-template"),
|
|
27019
27011
|
c(
|
|
27020
|
-
|
|
27021
|
-
a(str("template-name"), arg),
|
|
27012
|
+
ca(
|
|
27022
27013
|
str("default-template")
|
|
27023
27014
|
)
|
|
27024
27015
|
)
|
|
@@ -27033,8 +27024,7 @@ module Junoser
|
|
|
27033
27024
|
a(str("static-lsp"), arg),
|
|
27034
27025
|
b(str("label-switched-path-template"),
|
|
27035
27026
|
c(
|
|
27036
|
-
|
|
27037
|
-
a(str("template-name"), arg),
|
|
27027
|
+
ca(
|
|
27038
27028
|
str("default-template")
|
|
27039
27029
|
)
|
|
27040
27030
|
)
|
|
@@ -29573,8 +29563,7 @@ module Junoser
|
|
|
29573
29563
|
c(
|
|
29574
29564
|
b(str("label-switched-path-template"),
|
|
29575
29565
|
c(
|
|
29576
|
-
|
|
29577
|
-
a(str("template-name"), arg),
|
|
29566
|
+
ca(
|
|
29578
29567
|
str("default-template")
|
|
29579
29568
|
)
|
|
29580
29569
|
)
|
|
@@ -34787,7 +34776,7 @@ module Junoser
|
|
|
34787
34776
|
c(
|
|
34788
34777
|
b(str("template"),
|
|
34789
34778
|
c(
|
|
34790
|
-
|
|
34779
|
+
arg
|
|
34791
34780
|
)
|
|
34792
34781
|
)
|
|
34793
34782
|
)
|
|
@@ -34863,7 +34852,7 @@ module Junoser
|
|
|
34863
34852
|
c(
|
|
34864
34853
|
b(str("template"),
|
|
34865
34854
|
c(
|
|
34866
|
-
|
|
34855
|
+
arg
|
|
34867
34856
|
)
|
|
34868
34857
|
)
|
|
34869
34858
|
)
|
|
@@ -37447,8 +37436,12 @@ module Junoser
|
|
|
37447
37436
|
)
|
|
37448
37437
|
),
|
|
37449
37438
|
c(
|
|
37450
|
-
str("mpls-ipv4-template"),
|
|
37451
|
-
|
|
37439
|
+
b(str("mpls-ipv4-template"),
|
|
37440
|
+
a(str("label-position"), any)
|
|
37441
|
+
),
|
|
37442
|
+
b(str("mpls-template"),
|
|
37443
|
+
a(str("label-position"), any)
|
|
37444
|
+
),
|
|
37452
37445
|
b(str("ipv6-template"),
|
|
37453
37446
|
c(
|
|
37454
37447
|
str("nexthop-options")
|
|
@@ -37457,7 +37450,11 @@ module Junoser
|
|
|
37457
37450
|
str("peer-as-billing-template"),
|
|
37458
37451
|
b(str("ipv4-template"),
|
|
37459
37452
|
c(
|
|
37460
|
-
str("nexthop-options")
|
|
37453
|
+
b(str("nexthop-options"),
|
|
37454
|
+
b(str("mpls"),
|
|
37455
|
+
a(str("label-position"), any)
|
|
37456
|
+
)
|
|
37457
|
+
)
|
|
37461
37458
|
)
|
|
37462
37459
|
)
|
|
37463
37460
|
)
|
data/lib/junoser/ruler.rb
CHANGED
|
@@ -39,7 +39,7 @@ module Junoser
|
|
|
39
39
|
def process_reserved_element(str)
|
|
40
40
|
str.gsub! /"\$\S+"/, 'arg'
|
|
41
41
|
|
|
42
|
-
%w[as-number confederation-as metric-value limit-threshold filename filter-name class-name classifier-name link-subscription per-traffic-class-bandwidth].each do |key|
|
|
42
|
+
%w[as-number confederation-as metric-value limit-threshold filename filter-name class-name classifier-name link-subscription per-traffic-class-bandwidth template-name].each do |key|
|
|
43
43
|
str.gsub! %["#{key}" arg], 'arg'
|
|
44
44
|
end
|
|
45
45
|
|
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.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shintaro Kojima
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-01-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: parslet
|
|
@@ -103,6 +103,7 @@ extensions: []
|
|
|
103
103
|
extra_rdoc_files: []
|
|
104
104
|
files:
|
|
105
105
|
- ".gitignore"
|
|
106
|
+
- ".travis.yml"
|
|
106
107
|
- CHANGELOG.md
|
|
107
108
|
- Gemfile
|
|
108
109
|
- LICENSE.txt
|
|
@@ -153,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
153
154
|
version: '0'
|
|
154
155
|
requirements: []
|
|
155
156
|
rubyforge_project:
|
|
156
|
-
rubygems_version: 2.
|
|
157
|
+
rubygems_version: 2.5.1
|
|
157
158
|
signing_key:
|
|
158
159
|
specification_version: 4
|
|
159
160
|
summary: PEG parser for JUNOS configuration.
|