Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh-hpe committed Nov 5, 2024
1 parent 09bdd6e commit 8961e26
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions pkg/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,18 @@ type APIClientHandler interface {
// GetSCMVersion returns the SCM version for use when creating the Broker client
GetSCMVersion() int
SetHost(host string)
// GetCMPDetails here the client is the one which has broker host set
GetCMPDetails(ctx context.Context) (models.TFMorpheusDetails, error)
SetCMPMeta(meta interface{}, brokerClient *APIClient, fn SetScmClientToken)
SetCMPVersion(ctx context.Context) (err error)
}

// APIClient manages communication with the GreenLake Private Cloud VMaaS CMP API API v1.0.0
// In most cases there should be only one, shared, APIClient.
type APIClient struct {
cfg *Configuration
cmpVersion int
meta interface{}
tokenFunc SetScmClientToken
BrokerClient *APIClient
cfg *Configuration
cmpVersion int
meta interface{}
tokenFunc SetScmClientToken
}

// defaultTokenFunc will use while defining httpClient. defaultTokenFunc
Expand Down Expand Up @@ -119,11 +118,7 @@ func (c *APIClient) GetCMPDetails(ctx context.Context) (models.TFMorpheusDetails
return cmpBroker.GetMorpheusDetails(ctx)

}
func (c *APIClient) SetCMPMeta(meta interface{}, brokerClient *APIClient, fn SetScmClientToken) {
c.meta = meta
c.tokenFunc = fn
c.BrokerClient = brokerClient
}

func (c *APIClient) SetCMPVersion(ctx context.Context) (err error) {
if c.cmpVersion != 0 {
return nil
Expand Down

0 comments on commit 8961e26

Please sign in to comment.