Skip to content

Commit

Permalink
Add operators versions
Browse files Browse the repository at this point in the history
  • Loading branch information
rdavid committed Dec 10, 2023
1 parent 2a445a1 commit 19791b4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
11 changes: 10 additions & 1 deletion cmd/tnf/claim/show/csv/csv.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,22 @@ func buildCSV(claimScheme *claim.Schema, cnfType string, catalogMap map[string]c
})
}

opVers := ""
for i, op := range claimScheme.Claim.Configurations.TestOperators {
if i == 0 {
opVers = op.Version
} else {
opVers = opVers + ", " + op.Version
}
}

for testID := range claimScheme.Claim.Results {
// initialize record
record := []string{}
// creates and appends new CSV record
record = append(record,
CNFNameFlag,
"Foobar",
opVers,
testID,
claimScheme.Claim.Results[testID].TestID.Suite,
claimScheme.Claim.Results[testID].CatalogInfo.Description,
Expand Down
7 changes: 7 additions & 0 deletions cmd/tnf/pkg/claim/claim.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,16 @@ type Nodes struct {
CsiDriver interface{} `json:"csiDriver"`
}

type TestOperator struct {
Name string `json:"name"`

Check failure on line 67 in cmd/tnf/pkg/claim/claim.go

View workflow job for this annotation

GitHub Actions / Run Linters and Vet

File is not `gofmt`-ed with `-s` (gofmt)
Namespace string `json:"namespace"`
Version string `json:"version"`
}

type Configurations struct {
Config interface{} `json:"Config"`
AbnormalEvents []interface{} `json:"AbnormalEvents"`
TestOperators []TestOperator `json:"testOperators"`
}

type Schema struct {
Expand Down

0 comments on commit 19791b4

Please sign in to comment.