Skip to content

Commit

Permalink
Merge 60a4c92 into 4be7b45
Browse files Browse the repository at this point in the history
  • Loading branch information
at88mph committed Mar 4, 2020
2 parents 4be7b45 + 60a4c92 commit 43687f2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
22 changes: 21 additions & 1 deletion vos/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,20 @@ and use

``python setup.py install --user``

The CADC services use ``https`` for all HTTP communication. Sometimes, this requires the ``requests`` library to explicitly
trust the server certificate. Simply set the ``REQUESTS_CA_BUNDLE`` environment variable to the appropriate trusted CA
bundle on your operating system. On most Linux systems, this will be ``/etc/ssl/certs/ca-certificates.crt``:

``$ REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.ca vcp ...``

Tutorial
--------

1. Get a `CANFAR
account <http://www.canfar.phys.uvic.ca/canfar/auth/request.html>`__
2. Install the vos package.
3. Retrieve a X509/SSL certificate using the ``getCert``
script installed as part of the ``cadcutils`` package that is automatically installed wiht vos.
script installed as part of the ``cadcutils`` package that is automatically installed with vos.
4. Example Usage.

1. Commandline usage:
Expand All @@ -83,6 +89,20 @@ Tutorial
client = vos.Client()
client.listdir('vos:jkavelaars')


Experimental
------------

The ``vcp`` and ``vrm`` commands can be used with the new CADC Storage Inventory system. This is used for developers wanting
to use the new system that is not yet public. Activating it requires the use of the ``--resource-id`` switch.

1. Example Usage:

1. Command line:

- ``$ vcp --resource-id ivo://cadc.nrc.ca/minoc /tmp/* cadc:MYBUCKET/``
- ``$ vrm --resource-id ivo://cadc.nrc.ca/minoc cadc:MYBUCKET/myfile.fits cadc:MYBUCKET/anotherfile.fits``

Development
-----------

Expand Down
13 changes: 1 addition & 12 deletions vos/test/scripts/vospace-storage-inventory-client-atest.tcsh
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,13 @@ set SET_SITE_1_RESOURCE_ID = " --resource-id ${SITE_1_RESOURCE_ID}"
set THIS_DIR = `dirname $0`
set THIS_DIR = `cd $THIS_DIR && pwd`

# Username / password for getting tokens
echo "Enter credentials for a VOSpace account in which we will perform tests."
echo -n "CADC Username: "
set username = $<
echo -n "Password: "
stty -echo
set password = $<
echo
stty echo

set DIFFCMD = "diff -q"

set RMCMD = "vrm ${DEBUG_FLAG} ${SET_SITE_1_RESOURCE_ID}"
set CPCMD = "vcp ${DEBUG_FLAG} ${SET_SITE_1_RESOURCE_ID}"
set RMDIRCMD = "vrmdir ${DEBUG_FLAG}"

set CERT = " --cert=$CERTFILE"
set TOKEN = "--token ${TOKEN}"

# using a test dir makes it easier to cleanup a bunch of old/failed tests
set ROOT = "cadc:"
Expand All @@ -78,7 +67,7 @@ echo

echo "-----------"
echo -n "Copy file to existing container and non-existent data node "
$CPCMD ${TOKEN} $THIS_DIR/something.png ${CONTAINER}/something.png || echo " [FAIL]" && exit -1
$CPCMD ${CERT} $THIS_DIR/something.png ${CONTAINER}/something.png || echo " [FAIL]" && exit -1
echo " [OK]"

# echo "-----------"
Expand Down

0 comments on commit 43687f2

Please sign in to comment.