Skip to content

Commit

Permalink
Merge pull request #1239 from jihoon-seo/221024_Modify_serviceType_fi…
Browse files Browse the repository at this point in the history
…eld_value_in_InstallMonAgentReq

Modify 'serviceType' value in InstallMonAgentReq
  • Loading branch information
seokho-son authored Oct 24, 2022
2 parents 05f1210 + 2803e2b commit 5b53b8c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/api/grpc/server/mcis/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/cloud-barista/cb-tumblebug/src/api/grpc/logger"
pb "github.com/cloud-barista/cb-tumblebug/src/api/grpc/protobuf/cbtumblebug"

common "github.com/cloud-barista/cb-tumblebug/src/core/common"
"github.com/cloud-barista/cb-tumblebug/src/core/mcis"
)

Expand All @@ -29,8 +30,8 @@ func (s *MCISService) InstallMonitorAgentToMcis(ctx context.Context, req *pb.Mci
return nil, gc.ConvGrpcStatusErr(err, "", "MCISService.InstallMonitorAgentToMcis()")
}

mcisTmpSystemLabel := mcis.DefaultSystemLabel
content, err := mcis.InstallMonitorAgentToMcis(req.NsId, req.McisId, mcisTmpSystemLabel, &mcisObj)
// mcisTmpSystemLabel := mcis.DefaultSystemLabel
content, err := mcis.InstallMonitorAgentToMcis(req.NsId, req.McisId, common.StrVM, &mcisObj)
if err != nil {
return nil, gc.ConvGrpcStatusErr(err, "", "MCISService.InstallMonitorAgentToMcis()")
}
Expand Down
4 changes: 2 additions & 2 deletions src/api/rest/server/mcis/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func RestPostInstallMonitorAgentToMcis(c echo.Context) error {
return err
}

mcisTmpSystemLabel := mcis.DefaultSystemLabel
content, err := mcis.InstallMonitorAgentToMcis(nsId, mcisId, mcisTmpSystemLabel, req)
// mcisTmpSystemLabel := mcis.DefaultSystemLabel
content, err := mcis.InstallMonitorAgentToMcis(nsId, mcisId, common.StrVM, req)
if err != nil {
common.CBLog.Error(err)
return err
Expand Down
2 changes: 1 addition & 1 deletion src/core/mcis/monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func CallMonitoringAsync(wg *sync.WaitGroup, nsID string, mcisID string, mcisSer
UpdateVmInfo(nsID, mcisID, vmInfoTmp)

if mcisServiceType == "" {
mcisServiceType = "default"
mcisServiceType = common.StrVM
}

url := common.DragonflyRestUrl + cmd
Expand Down
6 changes: 3 additions & 3 deletions src/core/mcis/provisioning.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ func CorePostMcisVm(nsId string, mcisId string, vmInfoData *TbVmInfo) (*TbVmInfo
reqToMon.UserName = "cb-user" // this MCIS user name is temporal code. Need to improve.

fmt.Printf("\n[InstallMonitorAgentToMcis]\n\n")
content, err := InstallMonitorAgentToMcis(nsId, mcisId, mcisTmp.SystemLabel, reqToMon)
content, err := InstallMonitorAgentToMcis(nsId, mcisId, common.StrVM, reqToMon)
if err != nil {
common.CBLog.Error(err)
//mcisTmp.InstallMonAgent = "no"
Expand Down Expand Up @@ -854,7 +854,7 @@ func CreateMcisGroupVm(nsId string, mcisId string, vmRequest *TbVmReq, newSubGro
reqToMon.UserName = "cb-user" // this MCIS user name is temporal code. Need to improve.

fmt.Printf("\n[InstallMonitorAgentToMcis]\n\n")
content, err := InstallMonitorAgentToMcis(nsId, mcisId, mcisTmp.SystemLabel, reqToMon)
content, err := InstallMonitorAgentToMcis(nsId, mcisId, common.StrVM, reqToMon)
if err != nil {
common.CBLog.Error(err)
//mcisTmp.InstallMonAgent = "no"
Expand Down Expand Up @@ -1112,7 +1112,7 @@ func CreateMcis(nsId string, req *TbMcisReq, option string) (*TbMcisInfo, error)
time.Sleep(60 * time.Second)

fmt.Printf("\n[InstallMonitorAgentToMcis]\n\n")
content, err := InstallMonitorAgentToMcis(nsId, mcisId, mcisTmp.SystemLabel, reqToMon)
content, err := InstallMonitorAgentToMcis(nsId, mcisId, common.StrVM, reqToMon)
if err != nil {
common.CBLog.Error(err)
//mcisTmp.InstallMonAgent = "no"
Expand Down

0 comments on commit 5b53b8c

Please sign in to comment.