* Optional yangs for testing have been removed from the Clixon repo

* These were included for testing
  * If you want to run the Clixon test suite you need to point `YANGMODELS`, see test/README.md
  * The following configure options have been removed:
    * `configure --with-opt-yang-installdir=DIR`
    * `configure   --enable-optyangs`
  * You may need to specify standard YANGs using configure option `--with-yang-standard-dir=DIR`
* Updated yang ietf models with fetures for tet
* Added option `CLICON_YANG_AUGMENT_ACCEPT_BROKEN` to accept broken yangmodels.
  * This is a debug option for CI testcases where standard YANG models are broken
This commit is contained in:
Olof hagsand 2021-11-27 17:54:56 +01:00
parent bc1f80b28e
commit 339b744835
28 changed files with 191 additions and 183 deletions

View file

@ -39,6 +39,13 @@ MAINTAINER Olof Hagsand <olof@hagsand.se>
# For clixon and cligen
RUN apk add --update git make build-base gcc flex bison curl-dev
# Checkut standard YANG models for tests (note >1G for full repo)
WORKDIR /usr/local/share
RUN mkdir yang; cd yang; git init; git remote add -f origin https://github.com/YangModels/yang; git config core.sparseCheckout true; echo "standard/" >> .git/info/sparse-checkout; echo "experimental/" >> .git/info/sparse-checkout
WORKDIR /usr/local/share/yang
RUN git pull origin master
# Create a directory to hold source-code, dependencies etc
RUN mkdir /clixon
RUN mkdir /clixon/build
@ -59,7 +66,7 @@ WORKDIR /clixon/clixon
COPY clixon .
# Configure, build and install clixon
RUN ./configure --prefix=/clixon/build --with-cligen=/clixon/build --enable-optyangs --without-restconf
RUN ./configure --prefix=/clixon/build --with-cligen=/clixon/build --without-restconf
RUN make
RUN make install
@ -100,6 +107,7 @@ RUN apk add --update sudo curl procps grep make bash # iproute2 # contains ip
RUN adduser -D -H clicon
COPY --from=0 /clixon/build/ /usr/local/
COPY --from=0 /usr/local/share/yang/* /usr/local/share/yang/standard/
# Log to stderr.
CMD /usr/local/bin/startsystem.sh

View file

@ -38,6 +38,13 @@ MAINTAINER Olof Hagsand <olof@hagsand.se>
# For clixon and cligen
RUN apk add --update git make build-base gcc flex bison fcgi-dev curl-dev
# Checkut standard YANG models for tests (note >1G for full repo)
WORKDIR /usr/local/share
RUN mkdir yang; cd yang; git init; git remote add -f origin https://github.com/YangModels/yang; git config core.sparseCheckout true; echo "standard/" >> .git/info/sparse-checkout; echo "experimental/" >> .git/info/sparse-checkout
WORKDIR /usr/local/share/yang
RUN git pull origin master
# Create a directory to hold source-code, dependencies etc
RUN mkdir /clixon
RUN mkdir /clixon/build
@ -63,7 +70,7 @@ RUN adduser -D -H -G www-data www-data
RUN apk add --update nginx
# Configure, build and install clixon
RUN ./configure --prefix=/clixon/build --with-cligen=/clixon/build --enable-optyangs --with-restconf=fcgi
RUN ./configure --prefix=/clixon/build --with-cligen=/clixon/build --with-restconf=fcgi
RUN make
RUN make install
@ -114,6 +121,7 @@ RUN adduser nginx clicon
RUN adduser www-data clicon
COPY --from=0 /clixon/build/ /usr/local/
COPY --from=0 /usr/local/share/yang/* /usr/local/share/yang/standard/
# Manually created
RUN mkdir /www-data

View file

@ -38,15 +38,30 @@ MAINTAINER Olof Hagsand <olof@hagsand.se>
# For clixon and cligen
RUN apk add --update git make build-base gcc flex bison curl-dev
# Create a directory to hold source-code, dependencies etc
RUN mkdir /clixon
# evhtp dependencies
RUN apk add --update libevent libevent-dev
# nghttp2 dependencies
RUN apk add --update nghttp2
# Checkut models
WORKDIR /usr/local/share/
# Checkut standard YANG models for tests (note >1G for full repo)
RUN mkdir yang; cd yang; git init; git remote add -f origin https://github.com/YangModels/yang; git config core.sparseCheckout true; echo "standard/" >> .git/info/sparse-checkout; echo "experimental/" >> .git/info/sparse-checkout
WORKDIR /usr/local/share/yang
RUN git pull origin master
RUN mkdir /usr/local/share/openconfig
WORKDIR /usr/local/share/openconfig
# Checkut Openconfig models for tests
RUN git clone https://github.com/openconfig/public
# Create a directory to hold source-code, dependencies etc
RUN mkdir /clixon
# clone libevhtp
WORKDIR /clixon
@ -79,7 +94,7 @@ WORKDIR /clixon/clixon
COPY clixon .
# Configure, build and install clixon
RUN ./configure --prefix=/clixon/build --with-cligen=/clixon/build --enable-optyangs --with-restconf=native --enable-nghttp2 --enable-evhtp
RUN ./configure --prefix=/clixon/build --with-cligen=/clixon/build --with-restconf=native --enable-nghttp2 --enable-evhtp
RUN make
RUN make install
@ -134,6 +149,9 @@ RUN adduser -D -H clicon
COPY --from=0 /clixon/build/ /usr/local/
COPY --from=0 /usr/local/lib/libevhtp.so* /usr/local/lib/
COPY --from=0 /usr/local/share/yang/* /usr/local/share/yang/standard/
COPY --from=0 /usr/local/share/yang/* /usr/local/share/yang/experimental/
COPY --from=0 /usr/local/share/openconfig/* /usr/local/share/openconfig/
# Manually created
RUN mkdir /www-data

View file

@ -61,9 +61,13 @@ echo "$STORE" > /usr/local/var/example/running_db
cat <<EOF > /usr/local/bin/test/site.sh
# Add your local site specific env variables (or tests) here.
SKIPLIST="test_api.sh test_c++.sh test_install.sh test_privileges.sh test_augment.sh test_choice.sh test_identity.sh test_nacm_datanode_read.sh test_nacm_datanode.sh test_nacm_datanode_write.sh test_nacm_default.sh test_nacm_ext.sh test_nacm_module_read.sh test_nacm_module_write.sh test_nacm_protocol.sh test_nacm.sh test_nacm_recovery.sh test_perf.sh test_perf_state_only.sh test_perf_state.sh test_restconf2.sh test_restconf_err.sh test_restconf_jukebox.sh test_restconf_listkey.sh test_restconf_patch.sh test_restconf.sh test_restconf_startup.sh test_rpc.sh test_ssl_certs.sh test_stream.sh test_submodule.sh test_upgrade_auto.sh test_upgrade_interfaces.sh test_upgrade_repair.sh test_yang_namespace.sh"
#IETFRFC=
# Parse yangmodels from https://github.com/YangModels/yang
YANGMODELS=/usr/local/share/yang
EOF
# Patch yang syntax errors
sed -i s/=\ olt\'/=\ \'olt\'/g /usr/local/share/yang/standard/ieee/published/802.3/ieee802-ethernet-pon.yang
# Workaround for this error output:
# sudo: setrlimit(RLIMIT_CORE): Operation not permitted
echo "Set disable_coredump false" > /etc/sudo.conf

View file

@ -90,9 +90,13 @@ cat <<EOF > /usr/local/bin/test/site.sh
# Add your local site specific env variables (or tests) here.
SKIPLIST="test_api.sh test_client.sh test_c++.sh test_install.sh test_privileges.sh"
RCPROTO=http # Because nginx
#IETFRFC=
# Parse yangmodels from https://github.com/YangModels/yang
YANGMODELS=/usr/local/share/yang
EOF
# Patch yang syntax errors
sed -i s/=\ olt\'/=\ \'olt\'/g /usr/local/share/yang/standard/ieee/published/802.3/ieee802-ethernet-pon.yang
# Workaround for this error output:
# sudo: setrlimit(RLIMIT_CORE): Operation not permitted
echo "Set disable_coredump false" > /etc/sudo.conf

View file

@ -59,9 +59,13 @@ echo "$STORE" > /usr/local/var/example/running_db
cat <<EOF > /usr/local/bin/test/site.sh
# Add your local site specific env variables (or tests) here.
SKIPLIST="test_api.sh test_client.sh test_c++.sh test_install.sh test_privileges.sh"
#IETFRFC=
# Parse yangmodels from https://github.com/YangModels/yang
YANGMODELS=/usr/local/share/yang
EOF
# Patch yang syntax errors
sed -i s/=\ olt\'/=\ \'olt\'/g /usr/local/share/yang/standard/ieee/published/802.3/ieee802-ethernet-pon.yang
# Workaround for this error output:
# sudo: setrlimit(RLIMIT_CORE): Operation not permitted
echo "Set disable_coredump false" > /etc/sudo.conf