From: Scott Baker Date: Thu, 20 Nov 2008 12:13:33 +0000 (+0000) Subject: use of shell variables, and inline instructions for setting up script X-Git-Tag: sfa-0.9-0@14641~806 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=82793ddd38efca7fefa11282a70dea7c6201041e use of shell variables, and inline instructions for setting up script --- diff --git a/cmdline/testUser.sh b/cmdline/testUser.sh index b0d797f3..05f89de6 100755 --- a/cmdline/testUser.sh +++ b/cmdline/testUser.sh @@ -1,20 +1,47 @@ -rm -f test.cred -rm -f test.cert +# Assumptions +# 1) PLC Wrapper is up and running +# 2) Private key for test user has been copied into $USERNAME.pkey in the +# current directory. (If this private key has a passphrase, remove it by +# doing "ssh-keygen -pf ") + +# The following lines use a test account. The account has a first name of "test" +# and a last name of "account". The private key should be in the file test.pkey +USERNAME=test +PARENT_HRN=planetlab.us.pl +USER_HRN=$PARENT_HRN.account_test + +# The following lines use Scott Baker's planetlab account on a live PLC +# database. Modify these to use the appropriate values +# USERNAME=bakers +# PARENT_HRN=planetlab.us.arizona +# USER_HRN=$PARENT_HRN.Baker_Scott + +# The following lines use Tony Mack's planetlab account on a live PLC +# database (tony: copy your private key to tmack.pkey in the current directory) +# USERNAME=tmack +# PARENT_HRN=planetlab.us.princeton +# USER_HRN=$PARENT_HRN.Mack_Tony + +PRIVKEY_FN=$USERNAME.pkey +CRED_FN=$USERNAME.cred +CERTN_FN=$USERNAME.cert + +rm -f $CRED_FN +rm -f $CERT_FN echo XXXXX ------------------------------------------------------------------- echo XXXXX Getting Credential -python ./genicli.py --username test --credfile None --outfile test.cred getCredential user planetlab.us.pl.account_test +python ./genicli.py --username $USERNAME --credfile None --outfile $CRED_FN getCredential user $USER_HRN + +echo XXXXX ------------------------------------------------------------------- +echo XXXXX Resolving Authority +python ./genicli.py --username $USERNAME resolve $PARENT_HRN echo XXXXX ------------------------------------------------------------------- echo XXXXX Resolving Self -python ./genicli.py --username test resolve planetlab.us.pl.account_test +python ./genicli.py --username $USERNAME resolve $USER_HRN echo XXXXX ------------------------------------------------------------------- echo XXXXX Update Self -python ./genicli.py --username test update user planetlab.us.pl.account_test +python ./genicli.py --username $USERNAME update user $USER_HRN -# XXX - this fails because 'list' is an operation for authorities, and our -# credential is a user credential -#echo XXXXX ------------------------------------------------------------------- -#echo XXXXX List records in an authority -#python ./genicli.py --username test list