Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify 'serviceType' value in InstallMonAgentReq #1239

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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