#!/bin/sh

# Create a new contexts for the negotiation
./abac_client.py create --cert=emulab.pem --transport=soap \
	--url=https://localhost:8443/axis/services/feddABACPort \
	--file=/usr/local/tomcat5.5/webapps/axis2/WEB-INF/ucla.txt
#	--trace \
./abac_client.py create --cert=emulab.pem --transport=soap \
	--url=https://localhost:8443/axis/services/feddABACPort \
	--file=/usr/local/tomcat5.5/webapps/axis2/WEB-INF/bill.txt
#	--trace \
./abac_client.py create --cert=emulab.pem --transport=soap \
	--url=https://localhost:8443/axis/services/feddABACPort \
	--file=/usr/local/tomcat5.5/webapps/axis2/WEB-INF/alice.txt
#	--trace \
./abac_client.py create --cert=emulab.pem --transport=soap \
	--url=https://localhost:8443/axis/services/feddABACPort \
	--file=/usr/local/tomcat5.5/webapps/axis2/WEB-INF/james.txt
#	--trace \
# Run the negotiation with an access request
#./abac_client.py access --cert=emulab.pem --transport=soap \
#	--trace \
#	--url=http://localhost:8443/axis2/services/feddABACPort \
#	--context_id=0 --goal='GENI:GENI.CTFaccess<<---Alice' 
# Test a two part negoitation
./abac_client.py access --cert=emulab.pem --transport=soap \
	--url=https://localhost:8443/axis/services/feddABACPort \
	--context_id=UCLA --goal='UCLA:GENI.CTFaccess<<---Alice' \
	--srcURL=https://localhost:8443/axis/services/feddABACPort \
	--dstContext=Alice \
	--dstURL=https://localhost:8443/axis/services/feddABACPort
#	--trace \
./abac_client.py access --cert=emulab.pem --transport=soap \
	--url=https://localhost:8443/axis/services/feddABACPort \
	--context_id=UCLA --goal='UCLA:GENI.CTFaccess<<---James' \
	--srcURL=https://localhost:8443/axis/services/feddABACPort \
	--dstContext=James \
	--dstURL=https://localhost:8443/axis/services/feddABACPort
#	--trace \
./abac_client.py access --cert=emulab.pem --transport=soap \
	--url=https://localhost:8443/axis/services/feddABACPort \
	--context_id=UCLA --goal='UCLA:GENI.CTFaccess<<---Bill' \
	--srcURL=https://localhost:8443/axis/services/feddABACPort \
	--dstContext=Bill \
	--dstURL=https://localhost:8443/axis/services/feddABACPort

