Skip to content

Commit

Permalink
Self review
Browse files Browse the repository at this point in the history
Signed-off-by: Dainius Serplis <dserplis@vmware.com>
  • Loading branch information
Didainius committed May 20, 2024
1 parent 457253e commit ff24121
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .changes/v2.25.0/670-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
`GetSolutionAddonByName` for handling Solution Add-Ons [GH-670]
* Added `SolutionAddOn` methods `Update`, `RdeId`, `Delete` to help handling of Solution Landing
Zones [GH-670]
* Added `VDCClient` method `TrustAddOnImageCertificate` to trust certificate if it is not yet
* Added `VCDClient` method `TrustAddOnImageCertificate` to trust certificate if it is not yet
trusted [GH-670]
30 changes: 15 additions & 15 deletions govcd/landing_zone_add_on.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ var slzAddOnRdeType = [3]string{"vmware", "solutions_add_on", "1.0.0"}
// SolutionAddOn is the main structure to handle Solution Add-Ons within Solution Landing Zone. It
// packs parent RDE and Solution Add-On entity itself
type SolutionAddOn struct {
SolutionEntity *types.SolutionAddOn
DefinedEntity *DefinedEntity
vcdClient *VCDClient
SolutionAddOnEntity *types.SolutionAddOn
DefinedEntity *DefinedEntity
vcdClient *VCDClient
}

// SolutionAddOnConfig defines configuration for Solution Add-On creation which is used for
Expand Down Expand Up @@ -169,9 +169,9 @@ func (vcdClient *VCDClient) CreateSolutionAddOn(cfg SolutionAddOnConfig) (*Solut
}

returnType := SolutionAddOn{
SolutionEntity: result,
vcdClient: vcdClient,
DefinedEntity: createdRdeEntity,
SolutionAddOnEntity: result,
vcdClient: vcdClient,
DefinedEntity: createdRdeEntity,
}

return &returnType, nil
Expand All @@ -192,9 +192,9 @@ func (vcdClient *VCDClient) GetAllSolutionAddons(queryParameters url.Values) ([]
}

results[index] = &SolutionAddOn{
vcdClient: vcdClient,
DefinedEntity: rde,
SolutionEntity: addon,
vcdClient: vcdClient,
DefinedEntity: rde,
SolutionAddOnEntity: addon,
}
}

Expand All @@ -217,9 +217,9 @@ func (vcdClient *VCDClient) GetSolutionAddonById(id string) (*SolutionAddOn, err
}

packages := &SolutionAddOn{
SolutionEntity: result,
vcdClient: vcdClient,
DefinedEntity: rde,
SolutionAddOnEntity: result,
vcdClient: vcdClient,
DefinedEntity: rde,
}

return packages, nil
Expand Down Expand Up @@ -260,9 +260,9 @@ func (s *SolutionAddOn) Update(saoCfg *types.SolutionAddOn) (*SolutionAddOn, err
}

packages := SolutionAddOn{
SolutionEntity: result,
vcdClient: s.vcdClient,
DefinedEntity: s.DefinedEntity,
SolutionAddOnEntity: result,
vcdClient: s.vcdClient,
DefinedEntity: s.DefinedEntity,
}

return &packages, nil
Expand Down
1 change: 1 addition & 0 deletions types/v56/slz.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type SolutionLandingZoneVdcChild struct {
Capabilities []string `json:"capabilities"`
}

// SolutionAddOn defines structure of Solution Add-On that is deployed in the Solution Landing Zone
type SolutionAddOn struct {
Eula string `json:"eula"`
Icon string `json:"icon"`
Expand Down

0 comments on commit ff24121

Please sign in to comment.