3 export PATH=$PATH:/etc/sfa
7 # private key to use when creating GID for new slice
8 export TEST_KEY=$CWD/testkey.pkey
10 export TEST_SLICE_GID=$CWD/testslice.gid
11 export TEST_SLICE_RECORD=$CWD/testslice.record
12 export TEST_SLICE_HRN=$SFI_AUTH.testslice
16 echo XXXXX -------------------------------------------------------------------
17 echo XXXXX Removing the test slice. this will cause an error if the slice does
18 echo XXXXX not exist -- this error can be ignored
19 echo XXXXX -------------------------------------------------------------------
21 python $(CWD)/sfi.py remove --type slice $TEST_SLICE_HRN
23 echo XXXXX -------------------------------------------------------------------
24 echo XXXXX Creating a record for the test slice
25 echo XXXXX -------------------------------------------------------------------
27 python $(CWD)/editRecord.py --hrn $TEST_SLICE_HRN --pubkeyfile $TEST_KEY --type slice --addresearcher $SFI_USER --outfile $TEST_SLICE_RECORD
29 echo XXXXX -------------------------------------------------------------------
30 echo XXXXX Adding the test slice, $TEST_SLICE_HRN
31 echo XXXXX -------------------------------------------------------------------
33 python $(CWD)/sfi.py add $TEST_SLICE_RECORD
35 echo XXXXX -------------------------------------------------------------------
36 echo XXXXX The slice should have one researcher, $SFI_USER
37 echo XXXXX -------------------------------------------------------------------
39 python $(CWD)/sfi.py show $TEST_SLICE_HRN
41 echo XXXXX -------------------------------------------------------------------
42 echo XXXXX Adding $TEST_USER_2 to the slice researchers
43 echo XXXXX -------------------------------------------------------------------
45 python $(CWD)/editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --addresearcher $TEST_USER_2
47 echo XXXXX -------------------------------------------------------------------
48 echo XXXXX Updating the slice
49 echo XXXXX -------------------------------------------------------------------
51 python $(CWD)/sfi.py update $TEST_SLICE_RECORD
53 echo XXXXX -------------------------------------------------------------------
54 echo XXXXX The slice record should now have two users: $SFI_USER, $TEST_USER_2
55 echo XXXXX -------------------------------------------------------------------
57 python $(CWD)/sfi.py show $TEST_SLICE_HRN
59 echo XXXXX -------------------------------------------------------------------
60 echo XXXXX Removing $SFI_USER from the slice researchers
61 echo XXXXX -------------------------------------------------------------------
63 python $(CWD)/editRecord.py --infile $TEST_SLICE_RECORD --outfile $TEST_SLICE_RECORD --delresearcher $SFI_USER
65 echo XXXXX -------------------------------------------------------------------
66 echo XXXXX Updating the slice
67 echo XXXXX -------------------------------------------------------------------
69 python $(CWD)/sfi.py update $TEST_SLICE_RECORD
71 echo XXXXX -------------------------------------------------------------------
72 echo XXXXX The slice record should now have one users: $TEST_USER_2
73 echo XXXXX -------------------------------------------------------------------
75 python $(CWD)/sfi.py show $TEST_SLICE_HRN
77 echo XXXXX -------------------------------------------------------------------
78 echo XXXXX Updating the slice
79 echo XXXXX ... this verifies escalation from slice_cred to auth_cred
80 echo XXXXX -------------------------------------------------------------------
82 rm ~/.sfi/slice_testslice.cred
83 python $(CWD)/sfi.py update $TEST_SLICE_RECORD