diff options
author | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2017-07-22 22:31:25 +0900 |
---|---|---|
committer | Yuya Kusakabe <yuya.kusakabe@gmail.com> | 2017-07-22 22:31:25 +0900 |
commit | ef1952b6d89f2326c56932bfc07e19ff7f713a01 (patch) | |
tree | 127561d1a75566c99855a6daf2faea8f55a8cfb0 /spec/bgp4 | |
parent | 2462c51c199bef49b6e3673dfd5d6168983340b9 (diff) | |
download | vyos-integration-test-ef1952b6d89f2326c56932bfc07e19ff7f713a01.tar.gz vyos-integration-test-ef1952b6d89f2326c56932bfc07e19ff7f713a01.zip |
Run script with vyattacfg group
Diffstat (limited to 'spec/bgp4')
-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 |
5 files changed, 22 insertions, 6 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 |