Author: richter Date: Mon May 23 15:27:57 2011 New Revision: 2583 Log: testbed interface: add 'update' action, to be used instead of deploy the update action installs hipl, pisa and the configuration files on the testbed nodes Added: trunk/tools/testbed/plugins/actions/update/ trunk/tools/testbed/plugins/actions/update/node_hook trunk/tools/testbed/plugins/classes/generic/update trunk/tools/testbed/plugins/classes/hipl/update trunk/tools/testbed/plugins/classes/pisa/update Added: trunk/tools/testbed/plugins/actions/update/node_hook ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/tools/testbed/plugins/actions/update/node_hook Mon May 23 15:27:57 2011 (r2583) @@ -0,0 +1,10 @@ +#!/bin/sh + +echo "updating $NODE " +for CLASS in $(cat $BUILD_PATH/${NODE}_classes); do + CLASS_PATH="$TESTBED_PATH/plugins/classes/$CLASS" + if [ -d "$CLASS_PATH" ]; then + [ -f "$CLASS_PATH/$ACTION" ] && . $CLASS_PATH/$ACTION && ${ACTION}_$CLASS + fi +done +echo " ... done" Added: trunk/tools/testbed/plugins/classes/generic/update ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/tools/testbed/plugins/classes/generic/update Mon May 23 15:27:57 2011 (r2583) @@ -0,0 +1,6 @@ +#!/bin/sh + +update_generic(){ + echo "updating generic files" + pisa-testbed $NODE install "$BIN_PATH/$FULL_NAME.tar.gz" -c "tar -C / -xzf" +} Added: trunk/tools/testbed/plugins/classes/hipl/update ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/tools/testbed/plugins/classes/hipl/update Mon May 23 15:27:57 2011 (r2583) @@ -0,0 +1,24 @@ +#!/bin/sh + +update_hipl(){ + echo "updating hipl" + # collect all classes of nodes that have the hipl class + cat "$BUILD_PATH/$NODE"_classes | while read PKG_CLASS ; do + case $PKG_CLASS in + debian|ubuntu_live) + echo "installing hipl deb" + pisa-testbed $NODE install $(ls -t $HIPL_PATH/../hipl-doc*.deb | head -1) -c "dpkg -i" + pisa-testbed $NODE install $(ls -t $HIPL_PATH/../hipl-daemon*.deb | head -1) -c "dpkg -i" +# pisa-testbed $NODE install $(ls -t $HIPL_PATH/../hipl-firewall*.deb | head -1) -c "dpkg -i" + ;; + opkg|openwrt) + echo "installing hipl ipk" + pisa-testbed $NODE install $(ls -t $OPENWRT_PATH/bin/ar71xx/packages/hipl-common*.ipk | head -1) -c "opkg install" + pisa-testbed $NODE install $(ls -t $OPENWRT_PATH/bin/ar71xx/packages/hipl-hipd*.ipk | head -1) -c "opkg install" +# pisa-testbed $NODE install $(ls -t $OPENWRT_PATH/bin/ar71xx/packages/hipl-hipfw*.ipk | head -1) -c "opkg install" + pisa-testbed $NODE run "/etc/init.d/hipd stop" + pisa-testbed $NODE run "/etc/init.d/hipd start" + ;; + esac + done +} Added: trunk/tools/testbed/plugins/classes/pisa/update ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/tools/testbed/plugins/classes/pisa/update Mon May 23 15:27:57 2011 (r2583) @@ -0,0 +1,24 @@ +#!/bin/sh + +update_pisa(){ + echo "updating pisa" + # collect all classes of nodes that have the hipl class + cat "$BUILD_PATH/$NODE"_classes | while read PKG_CLASS ; do + case $PKG_CLASS in + debian|ubuntu_live) + echo "installing hipl deb" + pisa-testbed $NODE install $(ls -t $BIN_PATH/pisa-lib*.deb | head -1) -c "dpkg -i" + pisa-testbed $NODE install $(ls -t $BIN_PATH/pisa-mobile-guest*.deb | head -1) -c "dpkg -i" +# pisa-testbed $NODE install $(ls -t $BIN_PATH/pisa-trust-point*.deb | head -1) -c "dpkg -i" +# pisa-testbed $NODE install $(ls -t $BIN_PATH/pisa-community-operator*.deb | head -1) -c "dpkg -i" + ;; + opkg|openwrt) + echo "installing hipl ipk" + pisa-testbed $NODE install $(ls -t $OPENWRT_PATH/bin/ar71xx/packages/libpisa*.ipk | head -1) -c "opkg install" + pisa-testbed $NODE install $(ls -t $OPENWRT_PATH/bin/ar71xx/packages/pisa-mobile-guest*.ipk | head -1) -c "opkg install" + pisa-testbed $NODE run "/etc/init.d/pisacd stop" + pisa-testbed $NODE run "/etc/init.d/pisacd start" + ;; + esac + done +} -- This is the pisa developer mailing list. Please also subscribe to the main pisa list at: //www.freelists.org/list/pisa