Disabling IPv6 per default due to failing docker tests
This commit is contained in:
parent
a5d56f1cb7
commit
4eee00101c
7 changed files with 51 additions and 18 deletions
|
|
@ -133,6 +133,10 @@ fi
|
|||
# Standard IETF RFC yang files.
|
||||
: ${IETFRFC=../yang/standard}
|
||||
|
||||
# Some restconf tests can run IPv6, but its complicated because:
|
||||
# - docker by default does not run IPv6
|
||||
: ${IPv6:=false}
|
||||
|
||||
# Backend user
|
||||
BUSER=clicon
|
||||
|
||||
|
|
|
|||
|
|
@ -15,8 +15,12 @@
|
|||
#OPENCONFIG=/usr/local/share/openconfig/public
|
||||
#
|
||||
# Parse yangmodels from https://github.com/YangModels/yang
|
||||
#YANGMODELS=/usr/local/share/yangmodels
|
||||
#YANGMODELS=/usr/local/share/yang
|
||||
#
|
||||
# Specify alternative directory for the standard IETF RFC yang files.
|
||||
#IETFRFC=$YANGMODELS/standard/ietf/RFC
|
||||
|
||||
# Some restconf tests can run IPv6, but its complicated because:
|
||||
# - docker by default does not run IPv6
|
||||
# - for fcgi nginx needs to be configured properly (shouldnt be a problem)
|
||||
#IPv6=false
|
||||
|
|
|
|||
|
|
@ -22,11 +22,6 @@ APPNAME=example
|
|||
|
||||
cfg=$dir/conf.xml
|
||||
|
||||
# Must explicitly enable IPv6 testing
|
||||
: ${IPv6:=false}
|
||||
|
||||
# Use yang in example
|
||||
|
||||
cat <<EOF > $cfg
|
||||
<clixon-config xmlns="http://clicon.org/config">
|
||||
<CLICON_CONFIGFILE>$cfg</CLICON_CONFIGFILE>
|
||||
|
|
@ -56,9 +51,15 @@ if [ "${WITH_RESTCONF}" = "evhtp" ]; then
|
|||
test -d $certdir || mkdir $certdir
|
||||
. ./certs.sh
|
||||
cat <<EOF >> $cfg
|
||||
<CLICON_SSL_SERVER_CERT>$srvcert</CLICON_SSL_SERVER_CERT>
|
||||
<CLICON_SSL_SERVER_KEY>$srvkey</CLICON_SSL_SERVER_KEY>
|
||||
<CLICON_SSL_CA_CERT>$srvcert</CLICON_SSL_CA_CERT>
|
||||
<CLICON_SSL_SERVER_CERT>$srvcert</CLICON_SSL_SERVER_CERT>
|
||||
<CLICON_SSL_SERVER_KEY>$srvkey</CLICON_SSL_SERVER_KEY>
|
||||
<CLICON_SSL_CA_CERT>$srvcert</CLICON_SSL_CA_CERT>
|
||||
EOF
|
||||
fi
|
||||
|
||||
if $IPv6; then
|
||||
cat <<EOF >> $cfg
|
||||
<CLICON_RESTCONF_IPV6_ADDR>::</CLICON_RESTCONF_IPV6_ADDR>
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
|
@ -69,8 +70,9 @@ EOF
|
|||
# This is a fixed 'state' implemented in routing_backend. It is assumed to be always there
|
||||
state='{"clixon-example:state":{"op":\["41","42","43"\]}'
|
||||
|
||||
# For backend config, create 4 sockets, all combinations IPv4/IPv6 + http/https
|
||||
RESTCONFCONFIG=$(cat <<EOF
|
||||
if $IPv6; then
|
||||
# For backend config, create 4 sockets, all combinations IPv4/IPv6 + http/https
|
||||
RESTCONFCONFIG=$(cat <<EOF
|
||||
<restconf xmlns="https://clicon.org/restconf">
|
||||
<ssl-enable>true</ssl-enable>
|
||||
<auth-type>password</auth-type>
|
||||
|
|
@ -78,12 +80,27 @@ RESTCONFCONFIG=$(cat <<EOF
|
|||
<server-key-path>$srvkey</server-key-path>
|
||||
<server-ca-cert-path>$cakey</server-ca-cert-path>
|
||||
<socket><namespace>default</namespace><address>0.0.0.0</address><port>80</port><ssl>false</ssl></socket>
|
||||
<socket><namespace>default</namespace><address>::</address><port>80</port><ssl>false</ssl></socket>
|
||||
<socket><namespace>default</namespace><address>0.0.0.0</address><port>443</port><ssl>true</ssl></socket>
|
||||
<socket><namespace>default</namespace><address>::</address><port>80</port><ssl>false</ssl></socket>
|
||||
<socket><namespace>default</namespace><address>::</address><port>443</port><ssl>true</ssl></socket>
|
||||
</restconf>
|
||||
EOF
|
||||
)
|
||||
else
|
||||
# For backend config, create 4 sockets, all combinations IPv4/IPv6 + http/https
|
||||
RESTCONFCONFIG=$(cat <<EOF
|
||||
<restconf xmlns="https://clicon.org/restconf">
|
||||
<ssl-enable>true</ssl-enable>
|
||||
<auth-type>password</auth-type>
|
||||
<server-cert-path>$srvcert</server-cert-path>
|
||||
<server-key-path>$srvkey</server-key-path>
|
||||
<server-ca-cert-path>$cakey</server-ca-cert-path>
|
||||
<socket><namespace>default</namespace><address>0.0.0.0</address><port>80</port><ssl>false</ssl></socket>
|
||||
<socket><namespace>default</namespace><address>0.0.0.0</address><port>443</port><ssl>true</ssl></socket>
|
||||
</restconf>
|
||||
EOF
|
||||
)
|
||||
fi
|
||||
|
||||
# Restconf test routine with arguments:
|
||||
# 1. proto:http/https
|
||||
|
|
|
|||
|
|
@ -57,8 +57,6 @@ cat <<EOF > $cfg
|
|||
<CLICON_BACKEND_REGEXP>example_backend.so$</CLICON_BACKEND_REGEXP>
|
||||
<CLICON_RESTCONF_DIR>/usr/local/lib/$APPNAME/restconf</CLICON_RESTCONF_DIR>
|
||||
<CLICON_RESTCONF_PRETTY>false</CLICON_RESTCONF_PRETTY>
|
||||
<CLICON_RESTCONF_IPV4_ADDR>127.0.0.1</CLICON_RESTCONF_IPV4_ADDR>
|
||||
<CLICON_RESTCONF_IPV6_ADDR>::1</CLICON_RESTCONF_IPV6_ADDR>
|
||||
<CLICON_CLI_DIR>/usr/local/lib/$APPNAME/cli</CLICON_CLI_DIR>
|
||||
<CLICON_CLI_MODE>$APPNAME</CLICON_CLI_MODE>
|
||||
<CLICON_SOCK>/usr/local/var/$APPNAME/$APPNAME.sock</CLICON_SOCK>
|
||||
|
|
@ -69,6 +67,15 @@ cat <<EOF > $cfg
|
|||
<CLICON_SSL_SERVER_CERT>$srvcert</CLICON_SSL_SERVER_CERT>
|
||||
<CLICON_SSL_SERVER_KEY>$srvkey</CLICON_SSL_SERVER_KEY>
|
||||
<CLICON_SSL_CA_CERT>$cacert</CLICON_SSL_CA_CERT>
|
||||
EOF
|
||||
|
||||
if $IPv6; then
|
||||
cat <<EOF >> $cfg
|
||||
<CLICON_RESTCONF_IPV6_ADDR>::</CLICON_RESTCONF_IPV6_ADDR>
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat <<EOF >> $cfg
|
||||
</clixon-config>
|
||||
EOF
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ cat <<EOF > $cfg
|
|||
<CLICON_YANG_DIR>$YANGMODELS/standard/ieee/draft/802</CLICON_YANG_DIR>
|
||||
<CLICON_YANG_DIR>$YANGMODELS/standard/ieee/draft/802</CLICON_YANG_DIR>
|
||||
<CLICON_YANG_DIR>$YANGMODELS/standard/ieee/published/802.1</CLICON_YANG_DIR>
|
||||
<CLICON_YANG_DIR>$YANGMODELS/standard/ieee/published/802</CLICON_YANG_DIR>
|
||||
<CLICON_YANG_DIR>/usr/local/share/clixon</CLICON_YANG_DIR>
|
||||
<CLICON_YANG_LIST_CHECK>false</CLICON_YANG_LIST_CHECK>
|
||||
<CLICON_CLISPEC_DIR>/usr/local/lib/$APPNAME/clispec</CLICON_CLISPEC_DIR>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue