Skip to content

Commit

Permalink
Merge pull request #55 from spectrocloud/PLT-698
Browse files Browse the repository at this point in the history
PLT-698:Unit test support for edge native
  • Loading branch information
nikchern authored Sep 25, 2023
2 parents 16c6a64 + ee31415 commit b76840d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ type V1Client struct {
CreateOciEcrRegistryFn func(registry *models.V1EcrRegistry) (string, error)
UpdateEcrRegistryFn func(uid string, registry *models.V1EcrRegistry) error
GetOciRegistryFn func(uid string) (*models.V1EcrRegistry, error)

// Edge Native
GetCloudConfigEdgeNativeFn func(uid string, clusterContext string) (*models.V1EdgeNativeCloudConfig, error)
}

func New(hubbleHost, email, password, projectUID, apikey string, transportDebug bool, retryAttempts int) *V1Client {
Expand Down
3 changes: 3 additions & 0 deletions client/cluster_edge_native.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ func (h *V1Client) DeleteMachinePoolEdgeNative(cloudConfigId, machinePoolName, C
}

func (h *V1Client) GetCloudConfigEdgeNative(configUID, ClusterContext string) (*models.V1EdgeNativeCloudConfig, error) {
if h.GetCloudConfigEdgeNativeFn != nil {
return h.GetCloudConfigEdgeNativeFn(configUID, ClusterContext)
}
client, err := h.GetClusterClient()
if err != nil {
return nil, err
Expand Down

0 comments on commit b76840d

Please sign in to comment.