Skip to content

Commit

Permalink
Add compatbility ID field for OCP base resource type
Browse files Browse the repository at this point in the history
Signed-off-by: yaacov <[email protected]>
  • Loading branch information
yaacov committed Jul 25, 2023
1 parent 31953ef commit 3aa535a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/controller/provider/web/ocp/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ type Resource struct {
Name string `json:"name"`
// self link.
SelfLink string `json:"selfLink"`

// self path.
Path string `json:"path,omitempty"`

// forklift ID, for compatability with providers using ID instead of UID
ID string `json:"id"`
}

// Populate the fields with the specified object.
Expand All @@ -26,4 +29,6 @@ func (r *Resource) With(m *model.Base) {
r.Version = m.Version
r.Namespace = m.Namespace
r.Name = m.Name

r.ID = m.UID
}

0 comments on commit 3aa535a

Please sign in to comment.