-
Notifications
You must be signed in to change notification settings - Fork 1
/
utility.go
50 lines (34 loc) · 1.16 KB
/
utility.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package mcis
import (
"context"
"github.com/cloud-barista/poc-cicd-tumblebug/src/api/grpc/logger"
pb "github.com/cloud-barista/poc-cicd-tumblebug/src/api/grpc/protobuf/cbtumblebug"
"github.com/cloud-barista/poc-cicd-tumblebug/src/core/mcis"
)
// ===== [ Constants and Variables ] =====
// ===== [ Types ] =====
// ===== [ Implementations ] =====
// CheckMcis - MCIS 체크
func (s *MCISService) CheckMcis(ctx context.Context, req *pb.TbMcisQryRequest) (*pb.ExistsResponse, error) {
logger := logger.NewLogger()
logger.Debug("calling MCISService.CheckMcis()")
exists, err := mcis.CheckMcis(req.NsId, req.McisId)
if err != nil {
logger.Debug(err)
}
resp := &pb.ExistsResponse{Exists: exists}
return resp, nil
}
// CheckVm - MCIS VM 체크
func (s *MCISService) CheckVm(ctx context.Context, req *pb.TbVmQryRequest) (*pb.ExistsResponse, error) {
logger := logger.NewLogger()
logger.Debug("calling MCISService.CheckVm()")
exists, err := mcis.CheckVm(req.NsId, req.McisId, req.VmId)
if err != nil {
logger.Debug(err)
}
resp := &pb.ExistsResponse{Exists: exists}
return resp, nil
}
// ===== [ Private Functions ] =====
// ===== [ Public Functions ] =====