Skip to content

Commit

Permalink
Rename addon name to id to align with ocm api
Browse files Browse the repository at this point in the history
  • Loading branch information
kovayur committed Nov 29, 2023
1 parent 9ad9314 commit 193174d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package dbapi

// AddonInstallation represents the actual information about addons installed on the cluster
type AddonInstallation struct {
Name string
ID string
Version string
SourceImage string
PackageImage string
Expand Down
8 changes: 4 additions & 4 deletions internal/dinosaur/pkg/api/private/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,13 @@ components:
example:
addons:
- packageImage: packageImage
name: name
parametersSHA256Sum: parametersSHA256Sum
id: id
sourceImage: sourceImage
version: version
- packageImage: packageImage
name: name
parametersSHA256Sum: parametersSHA256Sum
id: id
sourceImage: sourceImage
version: version
properties:
Expand Down Expand Up @@ -518,12 +518,12 @@ components:
DataPlaneClusterUpdateStatusRequest_addons:
example:
packageImage: packageImage
name: name
parametersSHA256Sum: parametersSHA256Sum
id: id
sourceImage: sourceImage
version: version
properties:
name:
id:
type: string
version:
type: string
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func ConvertDataPlaneClusterStatus(status private.DataPlaneClusterUpdateStatusRe
var addonInstallations []dbapi.AddonInstallation
for _, addon := range status.Addons {
addonInstallations = append(addonInstallations, dbapi.AddonInstallation{
Name: addon.Name,
ID: addon.Id,
Version: addon.Version,
SourceImage: addon.SourceImage,
PackageImage: addon.PackageImage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func TestDataPlaneClusterStatus(t *testing.T) {
resp, err := privateClient.AgentClustersApi.UpdateAgentClusterStatus(ctx, clusterID, private.DataPlaneClusterUpdateStatusRequest{
Addons: []private.DataPlaneClusterUpdateStatusRequestAddons{
{
Name: "acs-fleetshard",
Id: "acs-fleetshard",
Version: "0.2.0",
SourceImage: "quay.io/osd-addons/acs-fleetshard-index@sha256:71eaaccb4d3962043eac953fb3c19a6cc6a88b18c472dd264efc5eb3da4960ac",
PackageImage: "quay.io/osd-addons/acs-fleetshard-package@sha256:3e4fc039662b876c83dd4b48a9608d6867a12ab4932c5b7297bfbe50ba8ee61c",
Expand All @@ -105,7 +105,7 @@ func TestDataPlaneClusterStatus(t *testing.T) {
Expect(addonInstallations).To(HaveLen(1))

fleetshardAddon := addonInstallations[0]
Expect(fleetshardAddon.Name).To(Equal("acs-fleetshard"))
Expect(fleetshardAddon.ID).To(Equal("acs-fleetshard"))
Expect(fleetshardAddon.Version).To(Equal("0.2.0"))
Expect(fleetshardAddon.SourceImage).To(Equal("quay.io/osd-addons/acs-fleetshard-index@sha256:71eaaccb4d3962043eac953fb3c19a6cc6a88b18c472dd264efc5eb3da4960ac"))
Expect(fleetshardAddon.PackageImage).To(Equal("quay.io/osd-addons/acs-fleetshard-package@sha256:3e4fc039662b876c83dd4b48a9608d6867a12ab4932c5b7297bfbe50ba8ee61c"))
Expand Down
2 changes: 1 addition & 1 deletion openapi/fleet-manager-private.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ components:
items:
type: object
properties:
name:
id:
type: string
version:
type: string
Expand Down

0 comments on commit 193174d

Please sign in to comment.