Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/v4backend #115

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3c46560
v4 compat changes
consolethinks Oct 1, 2024
f44116d
fix tests for v4 changes
consolethinks Oct 2, 2024
62389a4
add response body check to ChechMetadataValidity
consolethinks Oct 2, 2024
1114b60
change local_api_server address to match changes in scicatlive
consolethinks Oct 4, 2024
f7ca9db
v4 changes for ingestion command
consolethinks Oct 4, 2024
d864d4c
fix tests for v4 changes
consolethinks Oct 4, 2024
9d8c99b
v4 fixes for datasetArchiver
consolethinks Oct 4, 2024
2dfb02c
v4 updates for datasetGetProposal command
consolethinks Oct 4, 2024
7dfa34c
fix createJob test for v4 changes
consolethinks Oct 4, 2024
335a371
BE v4 changes
Oct 7, 2024
3831c94
general code cleanup: better error handling, preallocating some slices
consolethinks Oct 8, 2024
4757845
fix auth test
consolethinks Oct 8, 2024
fc006ee
move transferType.go to cliutils
consolethinks Oct 10, 2024
c3b8c15
createJob update to v4 BE
consolethinks Oct 10, 2024
22c6991
fix bearer token mapping to header
consolethinks Oct 10, 2024
919ea52
fix createJob_test for v4 changes
consolethinks Oct 10, 2024
f2c0564
v4 fixes for getProposal
consolethinks Oct 10, 2024
a5c70ba
cleanup and update datasetRetriever for v4
consolethinks Oct 11, 2024
5bbab98
remove unused parameter
consolethinks Oct 11, 2024
3c832ee
small fixes for datasetRetriever
consolethinks Oct 11, 2024
bbd0f58
fix ownerGroup setting when requesting archival jobs
consolethinks Oct 18, 2024
dcb57b2
write test for transfer type
consolethinks Oct 18, 2024
48b81b5
use /users/{id}/userIdentity endpoint
consolethinks Oct 18, 2024
ca8c254
changes to conform with CI checks
consolethinks Oct 18, 2024
adc4cb1
check auth token insertion
consolethinks Oct 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/commands/transferType.go → cmd/cliutils/transferType.go
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package cmd
package cliutils

import (
"fmt"
"strings"
)

type transferType int
type TransferType int

const (
Ssh transferType = iota
Ssh TransferType = iota
Globus
)

func convertToTransferType(input string) (transferType, error) {
func ConvertToTransferType(input string) (TransferType, error) {
minottic marked this conversation as resolved.
Show resolved Hide resolved
input = strings.ToLower(input)
switch input {
case "ssh":
Expand Down
8 changes: 4 additions & 4 deletions cmd/commands/datasetIngestor.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ For Windows you need instead to specify -user username:password on the command l
// TODO: read in CFG!

// transfer type
transferType, err := convertToTransferType(transferTypeFlag)
transferType, err := cliutils.ConvertToTransferType(transferTypeFlag)
if err != nil {
log.Fatalln(err)
}
Expand All @@ -94,9 +94,9 @@ For Windows you need instead to specify -user username:password on the command l
var gConfig cliutils.GlobusConfig

switch transferType {
case Ssh:
case cliutils.Ssh:
transferFiles = cliutils.SshTransfer
case Globus:
case cliutils.Globus:
transferFiles = cliutils.GlobusTransfer
var globusConfigPath string
if cmd.Flags().Lookup("globus-cfg").Changed {
Expand Down Expand Up @@ -521,7 +521,7 @@ For Windows you need instead to specify -user username:password on the command l
log.Printf("Submitting Archive Job for the ingested datasets.\n")
// TODO: change param type from pointer to regular as it is unnecessary
// for it to be passed as pointer
jobId, err := datasetUtils.CreateArchivalJob(client, APIServer, user, archivableDatasetList, &tapecopies)
jobId, err := datasetUtils.CreateArchivalJob(client, APIServer, user, accessGroups, archivableDatasetList, &tapecopies)
consolethinks marked this conversation as resolved.
Show resolved Hide resolved
if err != nil {
color.Set(color.FgRed)
log.Printf("Could not create the archival job for the ingested datasets: %s", err.Error())
Expand Down