Skip to content

Commit

Permalink
Merge pull request #19 from NetApp/integration/main
Browse files Browse the repository at this point in the history
Sync bitbucket and GitHub
  • Loading branch information
wenjun666 authored Dec 2, 2020
2 parents 94b865a + 1e517b1 commit e8f6b27
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
21 changes: 14 additions & 7 deletions cloudmanager/occm_aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ import (

// createUserData the users input for creating a occm
type createUserData struct {
ClientID string `json:"clientId"`
ClientSecret string `json:"clientSecret"`
UUID string `json:"systemId"`
AccountID string `json:"tenancyAccountId"`
Company string `json:"company"`
Name string `json:"instanceName"`
ClientID string `json:"clientId"`
ClientSecret string `json:"clientSecret"`
UUID string `json:"systemId"`
AccountID string `json:"tenancyAccountId"`
Company string `json:"company"`
Name string `json:"instanceName"`
ProxySettings proxySettingsResponse `json:"proxySettings"`
}

type proxySettingsResponse struct {
ProxyURL string `json:"proxyUrl"`
ProxyUserName string `json:"proxyUserName"`
ProxyPassword string `json:"proxyPassword"`
}

// createOCCMDetails the users input for creating a occm
Expand Down Expand Up @@ -169,7 +176,7 @@ func (c *Client) getUserData(registerAgentTOService registerAgentTOServiceReques
c.ClientID = userDataRespone.ClientID
c.AccountID = userDataRespone.AccountID

userData := "{\n\t\"instanceName\": \"" + userDataRespone.Name + "\",\n\t\"company\": \"" + userDataRespone.Company + "\",\n\t\"clientId\": \"" + userDataRespone.ClientID + "\",\n\t\"clientSecret\": \"" + userDataRespone.ClientSecret + "\",\n\t\"systemId\": \"" + userDataRespone.UUID + "\",\n\t\"tenancyAccountId\": \"" + userDataRespone.AccountID + "\"\n}"
userData := "{\n\t\"instanceName\": \"" + userDataRespone.Name + "\",\n\t\"company\": \"" + userDataRespone.Company + "\",\n\t\"clientId\": \"" + userDataRespone.ClientID + "\",\n\t\"clientSecret\": \"" + userDataRespone.ClientSecret + "\",\n\t\"systemId\": \"" + userDataRespone.UUID + "\",\n\t\"tenancyAccountId\": \"" + userDataRespone.AccountID + "\",\n\t\"proxySettings\": {\n\t\"proxyPassword\": \"" + userDataRespone.ProxySettings.ProxyPassword + "\",\n\t\"proxyUserName\": \"" + userDataRespone.ProxySettings.ProxyUserName + "\",\n\t\"proxyUrl\": \"" + userDataRespone.ProxySettings.ProxyURL + "\"\n}\n}"
log.Print("userData ", userData)

return userData, nil
Expand Down
2 changes: 1 addition & 1 deletion cloudmanager/occm_azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (c *Client) getCustomData(registerAgentTOService registerAgentTOServiceRequ
c.ClientID = userDataRespone.ClientID
c.AccountID = userDataRespone.AccountID

userData := "{\n\t\"instanceName\": \"" + userDataRespone.Name + "\",\n\t\"company\": \"" + userDataRespone.Company + "\",\n\t\"clientId\": \"" + userDataRespone.ClientID + "\",\n\t\"clientSecret\": \"" + userDataRespone.ClientSecret + "\",\n\t\"systemId\": \"" + userDataRespone.UUID + "\",\n\t\"tenancyAccountId\": \"" + userDataRespone.AccountID + "\"\n}"
userData := "{\n\t\"instanceName\": \"" + userDataRespone.Name + "\",\n\t\"company\": \"" + userDataRespone.Company + "\",\n\t\"clientId\": \"" + userDataRespone.ClientID + "\",\n\t\"clientSecret\": \"" + userDataRespone.ClientSecret + "\",\n\t\"systemId\": \"" + userDataRespone.UUID + "\",\n\t\"tenancyAccountId\": \"" + userDataRespone.AccountID + "\",\n\t\"proxySettings\": {\n\t\"proxyPassword\": \"" + userDataRespone.ProxySettings.ProxyPassword + "\",\n\t\"proxyUserName\": \"" + userDataRespone.ProxySettings.ProxyUserName + "\",\n\t\"proxyUrl\": \"" + userDataRespone.ProxySettings.ProxyURL + "\"\n}\n}"
log.Print("userData ", userData)

return userData, nil
Expand Down
2 changes: 1 addition & 1 deletion cloudmanager/occm_gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func (c *Client) getCustomDataForGCP(registerAgentTOService registerAgentTOServi
c.ClientID = userDataRespone.ClientID
c.AccountID = userDataRespone.AccountID

userData := fmt.Sprintf(`{"instanceName":"%s","company":"%s","clientId":"%s","clientSecret":"%s","systemId":"%s","tenancyAccountId":"%s"}`, userDataRespone.Name, userDataRespone.Company, userDataRespone.ClientID, userDataRespone.ClientSecret, userDataRespone.UUID, userDataRespone.AccountID)
userData := fmt.Sprintf(`{"instanceName":"%s","company":"%s","clientId":"%s","clientSecret":"%s","systemId":"%s","tenancyAccountId":"%s","proxySettings":{"proxyPassword":"%s","proxyUserName":"%s","proxyUrl":"%s"}}`, userDataRespone.Name, userDataRespone.Company, userDataRespone.ClientID, userDataRespone.ClientSecret, userDataRespone.UUID, userDataRespone.AccountID, userDataRespone.ProxySettings.ProxyPassword, userDataRespone.ProxySettings.ProxyUserName, userDataRespone.ProxySettings.ProxyURL)
log.Print("userData ", userData)

return userData, nil
Expand Down

0 comments on commit e8f6b27

Please sign in to comment.