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
|
|
@ -182,14 +182,14 @@ int clicon_err_fn(const char *fn,
|
||||||
strncpy(clicon_err_reason, msg, ERR_STRLEN-1);
|
strncpy(clicon_err_reason, msg, ERR_STRLEN-1);
|
||||||
|
|
||||||
/* Actually log it */
|
/* Actually log it */
|
||||||
if (errno){
|
if (suberr){
|
||||||
/* Here we could take care of specific errno, like application-defined errors */
|
/* Here we could take care of specific errno, like application-defined errors */
|
||||||
clicon_log(LOG_ERR, "%s: %d: %s: %s: %s",
|
clicon_log(LOG_ERR, "%s: %d: %s: %s: %s",
|
||||||
fn,
|
fn,
|
||||||
line,
|
line,
|
||||||
clicon_strerror(category),
|
clicon_strerror(category),
|
||||||
msg,
|
msg,
|
||||||
errno==XMLPARSE_ERRNO?"XML parse error":strerror(errno));
|
suberr==XMLPARSE_ERRNO?"XML parse error":strerror(suberr));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
clicon_log(LOG_ERR, "%s: %d: %s: %s",
|
clicon_log(LOG_ERR, "%s: %d: %s: %s",
|
||||||
|
|
|
||||||
|
|
@ -927,10 +927,10 @@ yang_parse_module(clicon_handle h,
|
||||||
goto done;
|
goto done;
|
||||||
if (nr == 0){
|
if (nr == 0){
|
||||||
if (revision)
|
if (revision)
|
||||||
clicon_err(OE_YANG, errno, "No yang files found matching \"%s@%s\" in the list of CLICON_YANG_DIRs",
|
clicon_err(OE_YANG, ENOENT, "No1 yang files found matching \"%s@%s\" in the list of CLICON_YANG_DIRs",
|
||||||
module, revision);
|
module, revision);
|
||||||
else
|
else
|
||||||
clicon_err(OE_YANG, errno, "No yang files found matching \"%s\" in the list of CLICON_YANG_DIRs", module);
|
clicon_err(OE_YANG, ENOENT, "No2 yang files found matching \"%s\" in the list of CLICON_YANG_DIRs", module);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
filename = cbuf_get(fbuf);
|
filename = cbuf_get(fbuf);
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,10 @@ fi
|
||||||
# Standard IETF RFC yang files.
|
# Standard IETF RFC yang files.
|
||||||
: ${IETFRFC=../yang/standard}
|
: ${IETFRFC=../yang/standard}
|
||||||
|
|
||||||
|
# Some restconf tests can run IPv6, but its complicated because:
|
||||||
|
# - docker by default does not run IPv6
|
||||||
|
: ${IPv6:=false}
|
||||||
|
|
||||||
# Backend user
|
# Backend user
|
||||||
BUSER=clicon
|
BUSER=clicon
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,12 @@
|
||||||
#OPENCONFIG=/usr/local/share/openconfig/public
|
#OPENCONFIG=/usr/local/share/openconfig/public
|
||||||
#
|
#
|
||||||
# Parse yangmodels from https://github.com/YangModels/yang
|
# 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.
|
# Specify alternative directory for the standard IETF RFC yang files.
|
||||||
#IETFRFC=$YANGMODELS/standard/ietf/RFC
|
#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
|
cfg=$dir/conf.xml
|
||||||
|
|
||||||
# Must explicitly enable IPv6 testing
|
|
||||||
: ${IPv6:=false}
|
|
||||||
|
|
||||||
# Use yang in example
|
|
||||||
|
|
||||||
cat <<EOF > $cfg
|
cat <<EOF > $cfg
|
||||||
<clixon-config xmlns="http://clicon.org/config">
|
<clixon-config xmlns="http://clicon.org/config">
|
||||||
<CLICON_CONFIGFILE>$cfg</CLICON_CONFIGFILE>
|
<CLICON_CONFIGFILE>$cfg</CLICON_CONFIGFILE>
|
||||||
|
|
@ -56,9 +51,15 @@ if [ "${WITH_RESTCONF}" = "evhtp" ]; then
|
||||||
test -d $certdir || mkdir $certdir
|
test -d $certdir || mkdir $certdir
|
||||||
. ./certs.sh
|
. ./certs.sh
|
||||||
cat <<EOF >> $cfg
|
cat <<EOF >> $cfg
|
||||||
<CLICON_SSL_SERVER_CERT>$srvcert</CLICON_SSL_SERVER_CERT>
|
<CLICON_SSL_SERVER_CERT>$srvcert</CLICON_SSL_SERVER_CERT>
|
||||||
<CLICON_SSL_SERVER_KEY>$srvkey</CLICON_SSL_SERVER_KEY>
|
<CLICON_SSL_SERVER_KEY>$srvkey</CLICON_SSL_SERVER_KEY>
|
||||||
<CLICON_SSL_CA_CERT>$srvcert</CLICON_SSL_CA_CERT>
|
<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
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -69,8 +70,9 @@ EOF
|
||||||
# This is a fixed 'state' implemented in routing_backend. It is assumed to be always there
|
# This is a fixed 'state' implemented in routing_backend. It is assumed to be always there
|
||||||
state='{"clixon-example:state":{"op":\["41","42","43"\]}'
|
state='{"clixon-example:state":{"op":\["41","42","43"\]}'
|
||||||
|
|
||||||
# For backend config, create 4 sockets, all combinations IPv4/IPv6 + http/https
|
if $IPv6; then
|
||||||
RESTCONFCONFIG=$(cat <<EOF
|
# For backend config, create 4 sockets, all combinations IPv4/IPv6 + http/https
|
||||||
|
RESTCONFCONFIG=$(cat <<EOF
|
||||||
<restconf xmlns="https://clicon.org/restconf">
|
<restconf xmlns="https://clicon.org/restconf">
|
||||||
<ssl-enable>true</ssl-enable>
|
<ssl-enable>true</ssl-enable>
|
||||||
<auth-type>password</auth-type>
|
<auth-type>password</auth-type>
|
||||||
|
|
@ -78,12 +80,27 @@ RESTCONFCONFIG=$(cat <<EOF
|
||||||
<server-key-path>$srvkey</server-key-path>
|
<server-key-path>$srvkey</server-key-path>
|
||||||
<server-ca-cert-path>$cakey</server-ca-cert-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>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>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>
|
<socket><namespace>default</namespace><address>::</address><port>443</port><ssl>true</ssl></socket>
|
||||||
</restconf>
|
</restconf>
|
||||||
EOF
|
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:
|
# Restconf test routine with arguments:
|
||||||
# 1. proto:http/https
|
# 1. proto:http/https
|
||||||
|
|
|
||||||
|
|
@ -57,8 +57,6 @@ cat <<EOF > $cfg
|
||||||
<CLICON_BACKEND_REGEXP>example_backend.so$</CLICON_BACKEND_REGEXP>
|
<CLICON_BACKEND_REGEXP>example_backend.so$</CLICON_BACKEND_REGEXP>
|
||||||
<CLICON_RESTCONF_DIR>/usr/local/lib/$APPNAME/restconf</CLICON_RESTCONF_DIR>
|
<CLICON_RESTCONF_DIR>/usr/local/lib/$APPNAME/restconf</CLICON_RESTCONF_DIR>
|
||||||
<CLICON_RESTCONF_PRETTY>false</CLICON_RESTCONF_PRETTY>
|
<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_DIR>/usr/local/lib/$APPNAME/cli</CLICON_CLI_DIR>
|
||||||
<CLICON_CLI_MODE>$APPNAME</CLICON_CLI_MODE>
|
<CLICON_CLI_MODE>$APPNAME</CLICON_CLI_MODE>
|
||||||
<CLICON_SOCK>/usr/local/var/$APPNAME/$APPNAME.sock</CLICON_SOCK>
|
<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_CERT>$srvcert</CLICON_SSL_SERVER_CERT>
|
||||||
<CLICON_SSL_SERVER_KEY>$srvkey</CLICON_SSL_SERVER_KEY>
|
<CLICON_SSL_SERVER_KEY>$srvkey</CLICON_SSL_SERVER_KEY>
|
||||||
<CLICON_SSL_CA_CERT>$cacert</CLICON_SSL_CA_CERT>
|
<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>
|
</clixon-config>
|
||||||
EOF
|
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/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.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_DIR>/usr/local/share/clixon</CLICON_YANG_DIR>
|
||||||
<CLICON_YANG_LIST_CHECK>false</CLICON_YANG_LIST_CHECK>
|
<CLICON_YANG_LIST_CHECK>false</CLICON_YANG_LIST_CHECK>
|
||||||
<CLICON_CLISPEC_DIR>/usr/local/lib/$APPNAME/clispec</CLICON_CLISPEC_DIR>
|
<CLICON_CLISPEC_DIR>/usr/local/lib/$APPNAME/clispec</CLICON_CLISPEC_DIR>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue