rewrote component test script to use a ticket to create slice
authorScott Baker <bakers@cs.arizona.edu>
Wed, 12 Nov 2008 19:28:20 +0000 (19:28 +0000)
committerScott Baker <bakers@cs.arizona.edu>
Wed, 12 Nov 2008 19:28:20 +0000 (19:28 +0000)
cmdline/testComponent.sh

index f567495..82e6a12 100644 (file)
@@ -8,39 +8,68 @@ rm -f pltest1.cred
 
 NODE_URL=https://198.0.0.131:12345/
 
+SA_CRED_NAME=rootsa.cred
+
+SLICE_KEY_NAME=testcw
+SLICE_KEY_FN=$SLICE_KEY_NAME.pkey
+
+SLICE_NAME=planetlab.us.pl.testcw
+SLICE_CRED_NAME=testcw.cred
+SLICE_TICKET_NAME=testcw.ticket
+SLICE_GID_NAME=testcw.gid
+
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Getting User Credential
 python ./genicli.py --username test --credfile None --outfile test.cred getCredential user planetlab.us.pl.account_test
 
+echo XXXXX -------------------------------------------------------------------
+echo XXXXX Create a private key
+python ./genicli.py --username $SLICE_KEY_NAME createKey
+
+echo XXXXX -------------------------------------------------------------------
+echo XXXXX Getting SA Credential
+python ./genicli.py --username root --outfile $SA_CRED_NAME getCredential sa planetlab.us.pl
+
+echo XXXXX -------------------------------------------------------------------
+echo XXXXX Create a GID for a slice
+python ./genicli.py --username root --credfile rootsa.cred --outfile $SLICE_GID_NAME createGid $SLICE_NAME None $SLICE_KEY_FN
+
+echo XXXXX -------------------------------------------------------------------
+echo XXXXX If the test slice already exists, Remove the test slice
+python ./genicli.py --username root --credfile $SA_CRED_NAME remove slice $SLICE_NAME
+
+echo XXXXX -------------------------------------------------------------------
+echo XXXXX Register a slice
+python ./genicli.py --username root --credfile $SA_CRED_NAME register slice $SLICE_NAME $SLICE_GID_NAME
+
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Get Slice Credential
-python ./genicli.py --username test --outfile pltest1.cred getCredential slice planetlab.us.pl.test1
+python ./genicli.py --username test --outfile $SLICE_CRED_NAME getCredential slice $SLICE_NAME
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Get a Ticket
-python ./genicli.py --username test --credfile pltest1.cred --outfile pltest1.ticket getTicket planetlab.us.pl.test1
+python ./genicli.py --username test --credfile $SLICE_CRED_NAME --outfile $SLICE_TICKET_NAME getTicket $SLICE_NAME
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Redeem a Ticket
-python ./genicli.py --server $NODE_URL --username test --ticketfile pltest1.ticket redeemTicket
+python ./genicli.py --server $NODE_URL --username test --ticketfile $SLICE_TICKET_NAME redeemTicket
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Stop a Slice
-python ./genicli.py --server $NODE_URL --username test --credfile pltest1.cred stopSlice
+python ./genicli.py --server $NODE_URL --username test --credfile $SLICE_CRED_NAME stopSlice
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Start a Slice
-python ./genicli.py --server $NODE_URL --username test --credfile pltest1.cred startSlice
+python ./genicli.py --server $NODE_URL --username test --credfile $SLICE_CRED_NAME startSlice
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Reset a Slice
-python ./genicli.py --server $NODE_URL --username test --credfile pltest1.cred resetSlice
+python ./genicli.py --server $NODE_URL --username test --credfile $SLICE_CRED_NAME resetSlice
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX Delete a Slice
-python ./genicli.py --server $NODE_URL --username test --credfile pltest1.cred deleteSlice
+python ./genicli.py --server $NODE_URL --username test --credfile $SLICE_CRED_NAME deleteSlice
 
 echo XXXXX -------------------------------------------------------------------
 echo XXXXX List Slices
-python ./genicli.py --server $NODE_URL --username test --credfile pltest1.cred --outfile pltest1.cred listSlices\r
-\r
+python ./genicli.py --server $NODE_URL --username test --credfile $SLICE_CRED_NAME listSlices