diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bgp4/config.yaml | 12 | ||||
-rw-r--r-- | spec/bgp4/vyos1_script.sh | 4 | ||||
-rw-r--r-- | spec/bgp4/vyos2_script.sh | 4 | ||||
-rw-r--r-- | spec/bgp4/vyos3_script.sh | 4 | ||||
-rw-r--r-- | spec/bgp4/vyos4_script.sh | 4 | ||||
-rw-r--r-- | spec/bgp6/vyos1_script.sh | 4 | ||||
-rw-r--r-- | spec/bgp6/vyos2_script.sh | 4 | ||||
-rw-r--r-- | spec/bgp6/vyos3_script.sh | 4 | ||||
-rw-r--r-- | spec/bgp6/vyos4_script.sh | 4 | ||||
-rw-r--r-- | spec/interface_script.erb | 4 | ||||
-rw-r--r-- | spec/one_node/vyos_script.sh | 4 | ||||
-rw-r--r-- | spec/site_to_site_vpn/config.yaml | 12 | ||||
-rw-r--r-- | spec/site_to_site_vpn/vyos1_script.sh | 4 | ||||
-rw-r--r-- | spec/site_to_site_vpn/vyos2_script.sh | 4 | ||||
-rw-r--r-- | spec/site_to_site_vpn/vyos3_script.sh | 4 | ||||
-rw-r--r-- | spec/site_to_site_vpn/vyos4_script.sh | 4 |
16 files changed, 68 insertions, 12 deletions
diff --git a/spec/bgp4/config.yaml b/spec/bgp4/config.yaml index 01178dc..35406da 100644 --- a/spec/bgp4/config.yaml +++ b/spec/bgp4/config.yaml @@ -1,15 +1,15 @@ --- vyos1: :networks: - net1: "10.0.1.11" - net2: "10.0.2.11" + net1: "10.0.1.11/24" + net2: "10.0.2.11/24" vyos2: :networks: - net1: "10.0.1.12" - net3: "10.0.3.11" + net1: "10.0.1.12/24" + net3: "10.0.3.11/24" vyos3: :networks: - net2: "10.0.2.13" + net2: "10.0.2.13/24" vyos4: :networks: - net3: "10.0.3.14" + net3: "10.0.3.14/24" diff --git a/spec/bgp4/vyos1_script.sh b/spec/bgp4/vyos1_script.sh index 3adbc0f..3767236 100644 --- a/spec/bgp4/vyos1_script.sh +++ b/spec/bgp4/vyos1_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols bgp 65536 neighbor 10.0.1.12 ebgp-multihop 2 diff --git a/spec/bgp4/vyos2_script.sh b/spec/bgp4/vyos2_script.sh index 1be2c7e..7cb0586 100644 --- a/spec/bgp4/vyos2_script.sh +++ b/spec/bgp4/vyos2_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols bgp 65537 neighbor 10.0.1.11 ebgp-multihop 2 diff --git a/spec/bgp4/vyos3_script.sh b/spec/bgp4/vyos3_script.sh index e443225..3db2539 100644 --- a/spec/bgp4/vyos3_script.sh +++ b/spec/bgp4/vyos3_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols static route 10.0.3.0/24 next-hop 10.0.2.11 diff --git a/spec/bgp4/vyos4_script.sh b/spec/bgp4/vyos4_script.sh index ec45e72..df048bb 100644 --- a/spec/bgp4/vyos4_script.sh +++ b/spec/bgp4/vyos4_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols static route 10.0.2.0/24 next-hop 10.0.3.11 diff --git a/spec/bgp6/vyos1_script.sh b/spec/bgp6/vyos1_script.sh index 51dbac9..67e4624 100644 --- a/spec/bgp6/vyos1_script.sh +++ b/spec/bgp6/vyos1_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols bgp 65536 neighbor fd00:5679:4f53:1::c ebgp-multihop 2 diff --git a/spec/bgp6/vyos2_script.sh b/spec/bgp6/vyos2_script.sh index e6c9187..ea4c67c 100644 --- a/spec/bgp6/vyos2_script.sh +++ b/spec/bgp6/vyos2_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols bgp 65537 neighbor fd00:5679:4f53:1::b ebgp-multihop 2 diff --git a/spec/bgp6/vyos3_script.sh b/spec/bgp6/vyos3_script.sh index 1016f55..4fd8d3e 100644 --- a/spec/bgp6/vyos3_script.sh +++ b/spec/bgp6/vyos3_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols static route6 fd00:5679:4f53:3::/64 next-hop fd00:5679:4f53:2::b diff --git a/spec/bgp6/vyos4_script.sh b/spec/bgp6/vyos4_script.sh index 4354cb4..fa1cd7e 100644 --- a/spec/bgp6/vyos4_script.sh +++ b/spec/bgp6/vyos4_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols static route6 fd00:5679:4f53:2::/64 next-hop fd00:5679:4f53:3::b diff --git a/spec/interface_script.erb b/spec/interface_script.erb index d2000e7..1bfda78 100644 --- a/spec/interface_script.erb +++ b/spec/interface_script.erb @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template <% configs[host][:networks].keys.each_with_index do |net, i| %> diff --git a/spec/one_node/vyos_script.sh b/spec/one_node/vyos_script.sh index edb0afe..2caa038 100644 --- a/spec/one_node/vyos_script.sh +++ b/spec/one_node/vyos_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set system time-zone Asia/Tokyo diff --git a/spec/site_to_site_vpn/config.yaml b/spec/site_to_site_vpn/config.yaml index 01178dc..35406da 100644 --- a/spec/site_to_site_vpn/config.yaml +++ b/spec/site_to_site_vpn/config.yaml @@ -1,15 +1,15 @@ --- vyos1: :networks: - net1: "10.0.1.11" - net2: "10.0.2.11" + net1: "10.0.1.11/24" + net2: "10.0.2.11/24" vyos2: :networks: - net1: "10.0.1.12" - net3: "10.0.3.11" + net1: "10.0.1.12/24" + net3: "10.0.3.11/24" vyos3: :networks: - net2: "10.0.2.13" + net2: "10.0.2.13/24" vyos4: :networks: - net3: "10.0.3.14" + net3: "10.0.3.14/24" diff --git a/spec/site_to_site_vpn/vyos1_script.sh b/spec/site_to_site_vpn/vyos1_script.sh index 8033692..32a2395 100644 --- a/spec/site_to_site_vpn/vyos1_script.sh +++ b/spec/site_to_site_vpn/vyos1_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set vpn ipsec ike-group ike-g proposal 1 encryption aes256 diff --git a/spec/site_to_site_vpn/vyos2_script.sh b/spec/site_to_site_vpn/vyos2_script.sh index 2e01140..61bd0df 100644 --- a/spec/site_to_site_vpn/vyos2_script.sh +++ b/spec/site_to_site_vpn/vyos2_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set vpn ipsec ike-group ike-g proposal 1 encryption aes256 diff --git a/spec/site_to_site_vpn/vyos3_script.sh b/spec/site_to_site_vpn/vyos3_script.sh index e443225..3db2539 100644 --- a/spec/site_to_site_vpn/vyos3_script.sh +++ b/spec/site_to_site_vpn/vyos3_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols static route 10.0.3.0/24 next-hop 10.0.2.11 diff --git a/spec/site_to_site_vpn/vyos4_script.sh b/spec/site_to_site_vpn/vyos4_script.sh index ec45e72..df048bb 100644 --- a/spec/site_to_site_vpn/vyos4_script.sh +++ b/spec/site_to_site_vpn/vyos4_script.sh @@ -1,5 +1,9 @@ #!/bin/vbash +if [ "$(id -g -n)" != 'vyattacfg' ] ; then + exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" +fi + source /opt/vyatta/etc/functions/script-template set protocols static route 10.0.2.0/24 next-hop 10.0.3.11 |