From 52e796452dccd3a15301d5945d9641d33abf6843 Mon Sep 17 00:00:00 2001 From: yaacov Date: Tue, 25 Jul 2023 11:40:47 +0300 Subject: [PATCH] Add compatbility ID field for OCP base resource type Signed-off-by: yaacov --- pkg/controller/provider/web/ocp/resource.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/controller/provider/web/ocp/resource.go b/pkg/controller/provider/web/ocp/resource.go index bcdaf2a3d..3661a71e0 100644 --- a/pkg/controller/provider/web/ocp/resource.go +++ b/pkg/controller/provider/web/ocp/resource.go @@ -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,omitempty"` } // Populate the fields with the specified object. @@ -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 }