Skip to content

Commit

Permalink
Merge pull request #38 from cristianoveiga/SDB-3310
Browse files Browse the repository at this point in the history
added missing fields to label type
  • Loading branch information
tirthct authored Nov 28, 2022
2 parents 5cd2da4 + c952680 commit 567483d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 18 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.1.2 Nov 28 2022

- Added missing fields to Label type


## 0.1.0 Aug 23 2022

- First release for OCM Support CLI
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.17
require (
github.com/nwidger/jsoncolor v0.3.1
github.com/openshift-online/ocm-cli v0.1.64
github.com/openshift-online/ocm-sdk-go v0.1.286
github.com/openshift-online/ocm-sdk-go v0.1.296
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.4.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,8 @@ github.com/openshift-online/ocm-cli v0.1.64 h1:U/ILl054dNln9Kb/dhZOCgnhYFwfUMHhj
github.com/openshift-online/ocm-cli v0.1.64/go.mod h1:Ccu+zHRdPOHNjHVe+MuD54DTk+ZmqcY1F+waulB8ELA=
github.com/openshift-online/ocm-sdk-go v0.1.219/go.mod h1:uDiBAEupl2F5rkTBFC4y4ZPEV/ku/fFEBHot6OkYL+I=
github.com/openshift-online/ocm-sdk-go v0.1.273/go.mod h1:KYOw8kAKAHyPrJcQoVR82CneQ4ofC02Na4cXXaTq4Nw=
github.com/openshift-online/ocm-sdk-go v0.1.286 h1:PoSFXqRJ4nlpbVbZK77+WiLx9i31oLPQ/3LAtVEu0xw=
github.com/openshift-online/ocm-sdk-go v0.1.286/go.mod h1:KYOw8kAKAHyPrJcQoVR82CneQ4ofC02Na4cXXaTq4Nw=
github.com/openshift-online/ocm-sdk-go v0.1.296 h1:4u5FFRV/X2E6ZwyH/pW6QxclP8GkRh6ODK/Dk8x1QgM=
github.com/openshift-online/ocm-sdk-go v0.1.296/go.mod h1:KYOw8kAKAHyPrJcQoVR82CneQ4ofC02Na4cXXaTq4Nw=
github.com/openshift/rosa v1.1.7/go.mod h1:Ap4vfflxHXfzY0MIt1l9dckwG+DkPUDc/vv1mk1cSCQ=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
Expand Down
2 changes: 1 addition & 1 deletion pkg/info/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
package info

// Version of the ocm-support-cli
const Version = "0.1.1"
const Version = "0.1.2"

var VersionStamp string
38 changes: 24 additions & 14 deletions pkg/label/label.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ import (

type Label struct {
types.Meta
ID string `json:"id"`
CreatedAt time.Time `json:"created_at"`
Key string `json:"key"`
UpdatedAt time.Time `json:"updated_at"`
Value string `json:"value"`
Internal bool `json:"internal"`
HREF string `json:"href"`
ID string `json:"id"`
CreatedAt time.Time `json:"created_at"`
Key string `json:"key"`
UpdatedAt time.Time `json:"updated_at"`
Value string `json:"value"`
Internal bool `json:"internal"`
HREF string `json:"href"`
Type string `json:"type"`
AccountID string `json:"account_id,omitempty"`
SubscriptionID string `json:"subscription_id,omitempty"`
OrganizationID string `json:"organization_id,omitempty"`
ManagedBy string `json:"managed_by,omitempty"`
}

type LabelsList []Label
Expand All @@ -27,13 +32,18 @@ func PresentLabels(labels []*v1.Label) LabelsList {
var labelsList []Label
for _, label := range labels {
lbl := Label{
ID: label.ID(),
CreatedAt: label.CreatedAt(),
Key: label.Key(),
UpdatedAt: label.UpdatedAt(),
Value: label.Value(),
Internal: label.Internal(),
HREF: label.HREF(),
ID: label.ID(),
CreatedAt: label.CreatedAt(),
Key: label.Key(),
UpdatedAt: label.UpdatedAt(),
Value: label.Value(),
Internal: label.Internal(),
HREF: label.HREF(),
Type: label.Type(),
AccountID: label.AccountID(),
SubscriptionID: label.SubscriptionID(),
OrganizationID: label.OrganizationID(),
ManagedBy: label.ManagedBy(),
}
labelsList = append(labelsList, lbl)
}
Expand Down

0 comments on commit 567483d

Please sign in to comment.