1 # The following lines use the root account of the MyPLC. This assumes that the
2 # Administrator_Default has a private key that is located in the file
3 # root.pkey in the current directory.
5 PARENT_HRN=planetlab.us.pl
6 USER_HRN=$PARENT_HRN.Administrator_Default
8 # The following lines use Tony Mack's planetlab account on a live PLC
9 # database (tony: copy your private key to tmack.pkey in the current directory)
11 #PARENT_HRN=planetlab.us.princeton
12 #USER_HRN=$PARENT_HRN.Mack_Tony
14 TEST_USER_HRN=$PARENT_HRN.testuser
15 TEST_SLICE_HRN=$PARENT_HRN.testslice1
16 TEST_NODE_HRN=$PARENT_HRN.testnode1
18 TEST_NODE_IP=198.0.0.133
26 echo XXXXX -------------------------------------------------------------------
27 echo XXXXX Getting Self Credential
28 python ./genicli.py --username $USERNAME --credfile None --outfile root.cred getCredential user $USER_HRN
30 echo XXXXX -------------------------------------------------------------------
31 echo XXXXX Resolving Self
32 python ./genicli.py --username $USERNAME resolve $USER_HRN
34 echo XXXXX -------------------------------------------------------------------
35 echo XXXXX Getting SA Credential
36 python ./genicli.py --username $USERNAME --outfile rootsa.cred getCredential sa $PARENT_HRN
38 echo XXXXX -------------------------------------------------------------------
39 echo XXXXX List records in an authority
40 python ./genicli.py --username $USERNAME --credfile rootsa.cred list
42 echo XXXXX -------------------------------------------------------------------
43 echo XXXXX Create a private key
44 python ./genicli.py --username testkey createKey
46 echo XXXXX -------------------------------------------------------------------
47 echo XXXXX Create a GID for a user
48 python ./genicli.py --username $USERNAME --credfile rootsa.cred --outfile testuser.gid createGid $TEST_USER_HRN None testkey.pkey
50 echo XXXXX -------------------------------------------------------------------
51 echo XXXXX Create a GID for a slice
52 python ./genicli.py --username $USERNAME --credfile rootsa.cred --outfile testslice.gid createGid $TEST_SLICE_HRN None testkey.pkey
54 echo XXXXX -------------------------------------------------------------------
55 echo XXXXX Create a GID for a node
56 python ./genicli.py --username $USERNAME --credfile rootsa.cred --outfile testnode.gid createGid $TEST_NODE_HRN None testkey.pkey
58 echo XXXXX -------------------------------------------------------------------
59 echo XXXXX Register a user
60 python ./genicli.py --username $USERNAME --credfile rootsa.cred --email test1234@test.com register user $TEST_USER_HRN testuser.gid
62 echo XXXXX -------------------------------------------------------------------
63 echo XXXXX Resolve the test user
64 python ./genicli.py --username $USERNAME --credfile rootsa.cred resolve $TEST_USER_HRN
66 echo XXXXX -------------------------------------------------------------------
67 echo XXXXX Register a slice
68 python ./genicli.py --username $USERNAME --credfile rootsa.cred register slice $TEST_SLICE_HRN testslice.gid
70 echo XXXXX -------------------------------------------------------------------
71 echo XXXXX Resolve the test slice
72 python ./genicli.py --username $USERNAME --credfile rootsa.cred resolve $TEST_SLICE_HRN
74 echo XXXXX -------------------------------------------------------------------
75 echo XXXXX Register a node
76 python ./genicli.py --username $USERNAME --credfile rootsa.cred --ip $TEST_NODE_IP --dns testnode1.lan register node $TEST_NODE_HRN testnode.gid
78 echo XXXXX -------------------------------------------------------------------
79 echo XXXXX Resolve the test node
80 python ./genicli.py --username $USERNAME --credfile rootsa.cred resolve $TEST_NODE_HRN
82 echo XXXXX -------------------------------------------------------------------
83 echo XXXXX Remove the test node
84 python ./genicli.py --username $USERNAME --credfile rootsa.cred remove node $TEST_NODE_HRN
86 echo XXXXX -------------------------------------------------------------------
87 echo XXXXX Remove the test slice
88 python ./genicli.py --username $USERNAME --credfile rootsa.cred remove slice $TEST_SLICE_HRN
90 echo XXXXX -------------------------------------------------------------------
91 echo XXXXX Remove a user
92 python ./genicli.py --username $USERNAME --credfile rootsa.cred remove user $TEST_USER_HRN