X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=cmdline%2FtestUser.sh;h=05f89de63fffdf0bea5b49e142ce32b40f534dc0;hb=82793ddd38efca7fefa11282a70dea7c6201041e;hp=b0d797f386bc53759b4120853693e0caa1b3da3b;hpb=8b97b10f3faa3a45ebe2e85f92edff27afc04e6d;p=sfa.git 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