From ae8e287dd961550c591cde16993a40c5c2aae776 Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Sat, 21 Nov 2020 16:10:38 +0100 Subject: [PATCH] test / restconf /vagrant fixes --- CHANGELOG.md | 22 ++++++++++++++-------- test/test_yang_namespace.sh | 9 ++------- test/vagrant/Makefile.in | 8 +++++--- test/vagrant/vagrant.sh | 1 + 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19c92ed2..c9ec596d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,21 +29,27 @@ ### New features -* Initial NBMA functionality (thanks: @benavrhm): "ds" resource -* Restconf configuration has a new configure model: `clixon-restconf.yang` enabling restconf daemon configuration from datastore instead of from config file. - * Restconf config data, such as addresses, authentication type, etc, is read from the backend datastore instead of the clixon-config file on startup. - * This is enabled by setting `CLIXON_RESTCONF_CONFIG` to true (or start clixon-restconf with `-b`), in which case restconf data can be set in the datastore. - * This only applies to the evhtp restconf daemon, not fcgi/nginx. - * If enabled, most RESTCONF clixon-config options are obsolete +* Restconf configuration has a new configure model: `clixon-restconf.yang` enabling more flexible socket config + * The new restconf config, including addresses, authentication type, is set either in clixon-config local config or in backend datastore (ie running) + * This only applies to the evhtp restconf daemon, not fcgi/nginx, where the nginx config is used. + * The RESTCONF clixon-config options are obsolete * Thanks to Dave Cornejo for the idea - * Example: instead of setting `file` in clixon.xml, set: `arestconf>file` in the running datastore before starting restconf. +* Initial NBMA functionality (thanks: @benavrhm): "ds" resource ### API changes on existing protocol/config features Users may have to change how they access the system * New clixon-config@2020-11-03.yang revision - * Added option: `CLICON_RESTCONF_CONFIG` for reading restconf daemon config frm datastore + * Moved to clixon-restconf.yang and marked as obsolete: + - CLICON_RESTCONF_IPV4_ADDR + - CLICON_RESTCONF_IPV6_ADDR + - CLICON_RESTCONF_HTTP_PORT + - CLICON_RESTCONF_HTTPS_PORT + - CLICON_SSL_SERVER_CERT + - CLICON_SSL_SERVER_KEY + - CLICON_SSL_CA_CERT + * Removed obsolete option CLICON_TRANSACTION_MOD"; ### C/CLI-API changes on existing features diff --git a/test/test_yang_namespace.sh b/test/test_yang_namespace.sh index a2d3b239..83033a11 100755 --- a/test/test_yang_namespace.sh +++ b/test/test_yang_namespace.sh @@ -142,12 +142,7 @@ if [ $BE -ne 0 ]; then err "backend already dead" fi # kill backend - sudo clixon_backend -z -f $cfg - - if [ $? -ne 0 ]; then - err "kill backend" - fi - sudo pkill -u root -f clixon_backend + stop_backend -f $cfg fi -#rm -rf $dir +rm -rf $dir diff --git a/test/vagrant/Makefile.in b/test/vagrant/Makefile.in index a4bc11a5..1682386e 100644 --- a/test/vagrant/Makefile.in +++ b/test/vagrant/Makefile.in @@ -45,9 +45,11 @@ SHELL = /bin/sh # The "site.mk" file if it exists and define the VAGRANTS variables # eg: # VAGRANTS += freebsd/FreeBSD-12.1-STABLE - VAGRANTS = +# evhtp or fcgi +RESTCONF=evhtp + -include site.mk .PHONY: all clean distclean depend install uninstall $(VAGRANTS) destroy @@ -61,9 +63,9 @@ logs: # appear eg as generic/centos8.log $(VAGRANTS): logs ifdef LOGDIR - ./vagrant.sh $@ 2>&1 > "$(LOGDIR)/$(subst /,-,$@).log" + with_restconf=$(RESTCONF) ./vagrant.sh $@ 2>&1 > "$(LOGDIR)/$(subst /,-,$@).$(RESTCONF).log" else - ./vagrant.sh $@ 2>&1 | tee "logs/$(subst /,-,$@).log" + with_restconf=$(RESTCONF) ./vagrant.sh $@ 2>&1 | tee "logs/$(subst /,-,$@).$(RESTCONF).log" endif destroy: diff --git a/test/vagrant/vagrant.sh b/test/vagrant/vagrant.sh index 8f5cd418..080d8168 100755 --- a/test/vagrant/vagrant.sh +++ b/test/vagrant/vagrant.sh @@ -5,6 +5,7 @@ # 3. Compile and install clixon # 4. Run tests # Example run: ./vagrant.sh generic/centos8 2>&1 | tee cilog +# Default runs evhtp (not fcgi) set -eux #