added url for plc wrapper
[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 # The following URL is the URL of the plc wrapper. 
30
31 PLC_URL=https://localhost:12345/
32
33 # PLC_URL=https://198.0.0.132:12345/
34
35 rm -f $CRED_FN
36 rm -f $CERT_FN
37
38 echo XXXXX -------------------------------------------------------------------
39 echo XXXXX Getting Credential
40 python ./genicli.py --server $PLC_URL --username $USERNAME --credfile None --outfile $CRED_FN getCredential user $USER_HRN
41
42 echo XXXXX -------------------------------------------------------------------
43 echo XXXXX Resolving Authority
44 python ./genicli.py --server $PLC_URL --username $USERNAME resolve $PARENT_HRN
45
46 echo XXXXX -------------------------------------------------------------------
47 echo XXXXX Resolving Self
48 python ./genicli.py --server $PLC_URL --username $USERNAME resolve $USER_HRN
49
50 echo XXXXX -------------------------------------------------------------------
51 echo XXXXX Update Self
52 python ./genicli.py --server $PLC_URL --username $USERNAME update user $USER_HRN
53