12b9f5d0189fb3a4d5fe0d6d857d020858976cce
[sfa.git] / cmdline / testUser.sh
1 # Assumptions
2 #    1) PLC Wrapper is up and running
3 #    2) Private key for test user has been copied into $USERNAME.pkey in the
4 #       current directory. (If this private key has a passphrase, remove it by
5 #       doing "ssh-keygen -pf <filename>")
6
7 # The following lines use a test account. The account has a first name of "test"
8 # and a last name of "account". The private key should be in the file test.pkey
9 USERNAME=test
10 PARENT_HRN=planetlab.us.pl
11 USER_HRN=$PARENT_HRN.account_test
12
13 # The following lines use Scott Baker's planetlab account on a live PLC
14 # database. Modify these to use the appropriate values
15 # USERNAME=bakers
16 # PARENT_HRN=planetlab.us.arizona
17 # USER_HRN=$PARENT_HRN.Baker_Scott
18
19 # The following lines use Tony Mack's planetlab account on a live PLC
20 # database (tony: copy your private key to tmack.pkey in the current directory)
21 USERNAME=tmack
22 PARENT_HRN=planetlab.us.princeton
23 USER_HRN=$PARENT_HRN.Mack_Tony
24
25 PRIVKEY_FN=$USERNAME.pkey
26 CRED_FN=$USERNAME.cred
27 CERT_FN=$USERNAME.cert
28
29 rm -f $CRED_FN
30 rm -f $CERT_FN
31
32 echo XXXXX -------------------------------------------------------------------
33 echo XXXXX Getting Credential
34 python ./genicli.py --username $USERNAME --credfile None --outfile $CRED_FN getCredential user $USER_HRN
35
36 echo XXXXX -------------------------------------------------------------------
37 echo XXXXX Resolving Authority
38 python ./genicli.py --username $USERNAME resolve $PARENT_HRN
39
40 echo XXXXX -------------------------------------------------------------------
41 echo XXXXX Resolving Self
42 python ./genicli.py --username $USERNAME resolve $USER_HRN
43
44 echo XXXXX -------------------------------------------------------------------
45 echo XXXXX Update Self
46 python ./genicli.py --username $USERNAME update user $USER_HRN
47