Skip to content

Commit

Permalink
Updated Guide with remote path and more instance description
Browse files Browse the repository at this point in the history
  • Loading branch information
kouylekov-usit committed Oct 28, 2024
1 parent fb2fe5c commit 0327b53
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions tsdapiclient/guide.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@
tacl p11 --upload myfile.txt --encrypt
tacl p11 --upload mydirectory --encrypt
When uploading you can specify a remote path to upload to:
tacl p11 --upload myfile.txt --remote-path /path/to/remote
This will create a directory structure in the remote path if it does not exist.
"""

downloads = """
Expand Down Expand Up @@ -101,6 +107,14 @@
tacl p11 --download data.txt --encrypt
When downloading you can specify a remote path to download from:
tacl p11 --download data.txt --remote-path /path/to/remote
This will download the file from the remote path if it exists as well as list remote directories.
tacl p11 --download-list /path/to/remote
"""

automation = f"""
Expand Down Expand Up @@ -146,24 +160,33 @@
The instances are currently only used for uploading data. To upload
data to with an instance, you can use the following command:
tacl p11 --api-key <api_key> --link-id <link_id> (--secret-challenge <secret_challenge>)? --upload myfile
tacl p11 --api-key <api_key> --link-id <link_id> (--secret-challenge <secret_challenge_file>)? --upload myfile
where <link_id> is the link id provided to you by the project owner,
and <secret_challenge> is the secret challenge provided to you by the
project owner. The secret challenge is used to verify that the instance
is the correct one. The link id is used to identify the instance it can
be provided as UUID or a https link. Example of an https link is:
tacl p11 --api-key <api_key> --link-id https://data.tsd.usit.no/i/d3bd40e1-0a15-4575-9745-830ec52a4b3f --upload myfile
tacl p11 --api-key <api_key> --link-id https://data.tsd.usit.no/c/1154a666-4ae3-49e5-b1dd-cf1ea2cc86f9 --secret-challenge --upload myfile
tacl p11 --api-key <api_key> --link-id https://data.tsd.usit.no/i/<uuid> --upload myfile
tacl p11 --api-key <api_key> --link-id https://data.tsd.usit.no/c/<uuid> --secret-challenge @path-to-secret-file --upload myfile
where the 'c' and 'i' are the type of the link. The 'c' for instance
that requires a secret challenge and the 'i' for instance that does not
require a secret challenge. The UUID variant is the same as the https link
but without the https and the domain.
tacl p11 --api-key <api_key> --link-id d3bd40e1-0a15-4575-9745-830ec52a4b3f --upload myfile
tacl p11 --api-key <api_key> --link-id 1154a666-4ae3-49e5-b1dd-cf1ea2cc86f9 --secret-challenge secret --upload myfile
tacl p11 --api-key <api_key> --link-id <uuid> --upload myfile
tacl p11 --api-key <api_key> --link-id <uuid>--secret-challenge @path-to-secret-file --upload myfile
You can also store the instance in a file (only the instance or url no newlines),
and invoke tacl as such:
tacl p11 --link-id @path-to-instance-file --secret @path-to-secret-file --upload myfile
While the secret challenge is optional, it has to provided always as a file to avoid leaking secrets in the shared
machines process. If not provided the secret challenge will be asked for in the terminal.
"""
debugging = f"""
If you are having trouble while running a command, check the version,
Expand Down

0 comments on commit 0327b53

Please sign in to comment.