Skip to content

Commit

Permalink
Infrastructure Migration API bug fix(issue cloud-barista#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev4unet committed Sep 5, 2024
1 parent c03ceee commit 3d1a91b
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions pkg/core/migration/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,20 @@ const DefaultSystemLabel string = "Managed by CM-Beetle"
func CreateVMInfra(nsId string, infraModel *mci.TbMciDynamicReq) (mci.TbMciInfo, error) {

client := resty.New()
client.SetBasicAuth("default", "default")
// client.SetBasicAuth("default", "default")
// apiUser := viper.GetString("beetle.api.username")
// apiPass := viper.GetString("beetle.api.password")
// apiUser := viper.GetString("beetle.tumblebug.api.username")
// apiPass := viper.GetString("beetle.tumblebug.api.password")
apiUser := os.Getenv("BEETLE_API_USERNAME")
apiPass := os.Getenv("BEETLE_API_PASSWORD")
client.SetBasicAuth(apiUser, apiPass)

method := "POST"

// CB-Tumblebug API endpoint
cbTumblebugApiEndpoint := "http://localhost:1323/tumblebug"
//cbTumblebugApiEndpoint := "http://localhost:1323/tumblebug"
cbTumblebugApiEndpoint := common.TumblebugRestUrl
url := cbTumblebugApiEndpoint + fmt.Sprintf("/ns/%s/mciDynamic", nsId)
// url := fmt.Sprintf("%s/ns/{nsId}/mciDynamic%s", cbTumblebugApiEndpoint, idDetails.IdInSp)

Expand Down

0 comments on commit 3d1a91b

Please sign in to comment.