Skip to content

Commit

Permalink
Merge pull request #121 from dev4unet/bugfix_120
Browse files Browse the repository at this point in the history
Infrastructure Migration API bug fix(issue #120)
  • Loading branch information
yunkon-kim authored Sep 5, 2024
2 parents c03ceee + 671b328 commit e07348a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/core/migration/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/cloud-barista/cm-beetle/pkg/core/common"
"github.com/go-resty/resty/v2"
"github.com/rs/zerolog/log"
"github.com/spf13/viper"
)

//"log"
Expand Down Expand Up @@ -99,11 +100,15 @@ const DefaultSystemLabel string = "Managed by CM-Beetle"
func CreateVMInfra(nsId string, infraModel *mci.TbMciDynamicReq) (mci.TbMciInfo, error) {

client := resty.New()
client.SetBasicAuth("default", "default")
apiUser := viper.GetString("beetle.tumblebug.api.username")
apiPass := viper.GetString("beetle.tumblebug.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 e07348a

Please sign in to comment.