diff --git a/cloud-control-manager/cloud-driver/drivers/tencent/resources/ClusterHandler.go b/cloud-control-manager/cloud-driver/drivers/tencent/resources/ClusterHandler.go index 264e09885..b59a36f65 100644 --- a/cloud-control-manager/cloud-driver/drivers/tencent/resources/ClusterHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/tencent/resources/ClusterHandler.go @@ -287,7 +287,7 @@ func (clusterHandler *TencentClusterHandler) SetNodeGroupAutoScaling(clusterIID calllogger.Error(call.String(callLogInfo)) return false, err } - cblogger.Info(temp.ToJsonString()) + cblogger.Debug(temp.ToJsonString()) calllogger.Info(call.String(callLogInfo)) return true, nil @@ -326,7 +326,7 @@ func (clusterHandler *TencentClusterHandler) ChangeNodeGroupScaling(clusterIID i calllogger.Error(call.String(callLogInfo)) return irs.NodeGroupInfo{}, err } - cblogger.Info(temp.ToJsonString()) + cblogger.Debug(temp.ToJsonString()) calllogger.Info(call.String(callLogInfo)) node_group_info, err := getNodeGroupInfo(clusterHandler.CredentialInfo.ClientId, clusterHandler.CredentialInfo.ClientSecret, clusterHandler.RegionInfo.Region, clusterIID.SystemId, nodeGroupIID.SystemId) @@ -353,7 +353,7 @@ func (clusterHandler *TencentClusterHandler) RemoveNodeGroup(clusterIID irs.IID, calllogger.Error(call.String(callLogInfo)) return false, err } - cblogger.Info(res.ToJsonString()) + cblogger.Debug(res.ToJsonString()) calllogger.Info(call.String(callLogInfo)) return true, nil @@ -373,7 +373,7 @@ func (clusterHandler *TencentClusterHandler) UpgradeCluster(clusterIID irs.IID, calllogger.Error(call.String(callLogInfo)) return irs.ClusterInfo{}, err } - cblogger.Info(res.ToJsonString()) + cblogger.Debug(res.ToJsonString()) calllogger.Info(call.String(callLogInfo)) clusterInfo, err := getClusterInfo(clusterHandler.CredentialInfo.ClientId, clusterHandler.CredentialInfo.ClientSecret, clusterHandler.RegionInfo.Region, clusterIID.SystemId) @@ -539,7 +539,7 @@ func getClusterAccessInfo(access_key string, access_secret string, region_id str res, err := tencent.GetClusterEndpoint(access_key, access_secret, region_id, cluster_id) if err != nil { if strings.Contains(err.Error(), "CLUSTER_IN_ABNORMAL_STAT") || strings.Contains(err.Error(), "CLUSTER_STATE_ERROR") { - cblogger.Info(cluster_id + err.Error()) + cblogger.Error(cluster_id + err.Error()) accessInfo.Endpoint = "Cluster is not ready yet!" } else { err := fmt.Errorf("Failed to Get Cluster Endpoint: %v", err) @@ -556,10 +556,10 @@ func getClusterAccessInfo(access_key string, access_secret string, region_id str _, err := tencent.CreateClusterEndpoint(access_key, access_secret, region_id, cluster_id, security_group_id) if err != nil { if strings.Contains(err.Error(), "CLUSTER_IN_ABNORMAL_STAT") || strings.Contains(err.Error(), "CLUSTER_STATE_ERROR") { - cblogger.Info(cluster_id + err.Error()) + cblogger.Error(cluster_id + err.Error()) accessInfo.Endpoint = "First, add a nodegroup." } else if strings.Contains(err.Error(), "same type task in execution") { - cblogger.Info(cluster_id + err.Error()) + cblogger.Error(cluster_id + err.Error()) accessInfo.Endpoint = "Preparing...." } else { err := fmt.Errorf("Failed to Create Cluster Endpoint: %v", err) @@ -575,7 +575,7 @@ func getClusterAccessInfo(access_key string, access_secret string, region_id str resKubeconfig, err := tencent.GetClusterKubeconfig(access_key, access_secret, region_id, cluster_id) if err != nil { if strings.Contains(err.Error(), "CLUSTER_IN_ABNORMAL_STAT") || strings.Contains(err.Error(), "CLUSTER_STATE_ERROR") { - cblogger.Info(cluster_id + err.Error()) + cblogger.Error(cluster_id + err.Error()) accessInfo.Kubeconfig = "Cluster is not ready yet!" } else { err := fmt.Errorf("Failed to Get Cluster Kubeconfig: %v", err) diff --git a/cloud-control-manager/cloud-driver/drivers/tencent/resources/CommonTencentFunc.go b/cloud-control-manager/cloud-driver/drivers/tencent/resources/CommonTencentFunc.go index be4eed9d7..285c962b0 100644 --- a/cloud-control-manager/cloud-driver/drivers/tencent/resources/CommonTencentFunc.go +++ b/cloud-control-manager/cloud-driver/drivers/tencent/resources/CommonTencentFunc.go @@ -219,8 +219,8 @@ func ConvertKeyValueList(v interface{}) ([]irs.KeyValue, error) { // array에 주어진 string이 있는지 체크 func ContainString(s []string, str string) bool { for _, v := range s { - cblogger.Info(v + " : " + str) - cblogger.Info(v == str) + cblogger.Debug(v + " : " + str) + cblogger.Debug(v == str) if v == str { return true } diff --git a/cloud-control-manager/cloud-driver/drivers/tencent/resources/ImageHandler.go b/cloud-control-manager/cloud-driver/drivers/tencent/resources/ImageHandler.go index c372552ea..ba53909ff 100644 --- a/cloud-control-manager/cloud-driver/drivers/tencent/resources/ImageHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/tencent/resources/ImageHandler.go @@ -30,7 +30,7 @@ type TencentImageHandler struct { // @TODO - 이미지 생성에 따른 구조체 정의 필요 - 현재는 IID뿐이 없어서 이미지 이름으로만 생성하도록 했음.(인스턴스Id가 없어서 에러 발생함.) func (imageHandler *TencentImageHandler) CreateImage(imageReqInfo irs.ImageReqInfo) (irs.ImageInfo, error) { - cblogger.Info(imageReqInfo) + cblogger.Debug(imageReqInfo) callogger := call.GetLogger("HISCALL") callLogInfo := call.CLOUDLOGSCHEMA{ @@ -65,7 +65,7 @@ func (imageHandler *TencentImageHandler) CreateImage(imageReqInfo irs.ImageReqIn cblogger.Error(err) return irs.ImageInfo{}, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -112,7 +112,7 @@ func (imageHandler *TencentImageHandler) ListImage() ([]*irs.ImageInfo, error) { cblogger.Error(err) return nil, err } - //spew.Dump(response) + //cblogger.Debug(response) //cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -123,12 +123,12 @@ func (imageHandler *TencentImageHandler) ListImage() ([]*irs.ImageInfo, error) { imageInfoList = append(imageInfoList, &imageInfo) } - //spew.Dump(imageInfoList) + //cblogger.Debug(imageInfoList) return imageInfoList, nil } func ExtractImageDescribeInfo(image *cvm.Image) irs.ImageInfo { - //spew.Dump(image) + //cblogger.Debug(image) imageInfo := irs.ImageInfo{ //IId: irs.IID{*image.Name, *image.ImageId}, IId: irs.IID{NameId: *image.ImageId, SystemId: *image.ImageId}, @@ -181,7 +181,7 @@ func (imageHandler *TencentImageHandler) GetImage(imageIID irs.IID) (irs.ImageIn return irs.ImageInfo{}, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -222,7 +222,7 @@ func (imageHandler *TencentImageHandler) DeleteImage(imageIID irs.IID) (bool, er cblogger.Error(err) return false, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) diff --git a/cloud-control-manager/cloud-driver/drivers/tencent/resources/KeyPairHandler.go b/cloud-control-manager/cloud-driver/drivers/tencent/resources/KeyPairHandler.go index e9fe56d01..3182f1338 100644 --- a/cloud-control-manager/cloud-driver/drivers/tencent/resources/KeyPairHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/tencent/resources/KeyPairHandler.go @@ -6,7 +6,6 @@ import ( call "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/call-log" idrv "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces" irs "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces/resources" - "github.com/davecgh/go-spew/spew" _ "github.com/davecgh/go-spew/spew" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312" @@ -46,7 +45,7 @@ func (keyPairHandler *TencentKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, erro cblogger.Error(err) return nil, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -55,7 +54,7 @@ func (keyPairHandler *TencentKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, erro if errKeyPair != nil { // 2021-10-27 이슈#480에 의해 Local Key 로직 제거 //cblogger.Infof("[%s] KeyPair는 Local에서 관리하는 대상이 아니기 때문에 Skip합니다.", *pair.KeyName) - cblogger.Info(errKeyPair.Error()) + cblogger.Error(errKeyPair.Error()) //return nil, errKeyPair } else { keyPairList = append(keyPairList, &keyPairInfo) @@ -66,9 +65,9 @@ func (keyPairHandler *TencentKeyPairHandler) ListKey() ([]*irs.KeyPairInfo, erro } // 2021-10-27 이슈#480에 의해 Local Key 로직 제거 -//KeyPair 정보를 추출함 +// KeyPair 정보를 추출함 func ExtractKeyPairDescribeInfo(keyPair *cvm.KeyPair) (irs.KeyPairInfo, error) { - spew.Dump(keyPair) + cblogger.Debug(keyPair) keyPairInfo := irs.KeyPairInfo{ IId: irs.IID{NameId: *keyPair.KeyName, SystemId: *keyPair.KeyId}, //PublicKey: *keyPair.PublicKey, @@ -120,7 +119,7 @@ func ExtractKeyPairDescribeInfo(keyPair *cvm.KeyPair) (irs.KeyPairInfo, error) { } // 2021-10-27 이슈#480에 의해 Local Key 로직 제거 -//KeyPair 생성시 이름은 알파벳, 숫자 또는 밑줄 "_"만 지원 +// KeyPair 생성시 이름은 알파벳, 숫자 또는 밑줄 "_"만 지원 func (keyPairHandler *TencentKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPairReqInfo) (irs.KeyPairInfo, error) { cblogger.Info(keyPairReqInfo) @@ -175,12 +174,12 @@ func (keyPairHandler *TencentKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPai cblogger.Error(err) return irs.KeyPairInfo{}, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) cblogger.Infof("Created [%s]key pair", *response.Response.KeyPair.KeyName) - //spew.Dump(result) + //cblogger.Debug(result) keyPairInfo := irs.KeyPairInfo{ //Name: *result.KeyName, IId: irs.IID{NameId: keyPairReqInfo.IId.NameId, SystemId: *response.Response.KeyPair.KeyId}, @@ -191,7 +190,7 @@ func (keyPairHandler *TencentKeyPairHandler) CreateKey(keyPairReqInfo irs.KeyPai }, } - //spew.Dump(keyPairInfo) + //cblogger.Debug(keyPairInfo) /* 2021-10-27 이슈#480에 의해 Local Key 로직 제거 //============================= @@ -288,7 +287,7 @@ func (keyPairHandler *TencentKeyPairHandler) GetKey(keyIID irs.IID) (irs.KeyPair cblogger.Error(err) return irs.KeyPairInfo{}, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -299,7 +298,7 @@ func (keyPairHandler *TencentKeyPairHandler) GetKey(keyIID irs.IID) (irs.KeyPair return irs.KeyPairInfo{}, errKeyPair } - //spew.Dump(keyPairInfo) + //cblogger.Debug(keyPairInfo) return keyPairInfo, nil } else { return irs.KeyPairInfo{}, errors.New("정보를 찾을 수 없습니다.") @@ -363,7 +362,7 @@ func (keyPairHandler *TencentKeyPairHandler) DeleteKey(keyIID irs.IID) (bool, er cblogger.Error(err) return false, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) diff --git a/cloud-control-manager/cloud-driver/drivers/tencent/resources/MyImageHandler.go b/cloud-control-manager/cloud-driver/drivers/tencent/resources/MyImageHandler.go index a3411196a..a68710473 100644 --- a/cloud-control-manager/cloud-driver/drivers/tencent/resources/MyImageHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/tencent/resources/MyImageHandler.go @@ -7,7 +7,6 @@ import ( call "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/call-log" idrv "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces" irs "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces/resources" - "github.com/davecgh/go-spew/spew" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" //cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312" @@ -113,7 +112,7 @@ func (myImageHandler *TencentMyImageHandler) SnapshotVM(snapshotReqInfo irs.MyIm } calllogger.Info(call.String(hiscallInfo)) - spew.Dump(response) + cblogger.Debug(response) myImageInfo, myImageErr := myImageHandler.GetMyImage(irs.IID{SystemId: *response.Response.ImageId}) if myImageErr != nil { diff --git a/cloud-control-manager/cloud-driver/drivers/tencent/resources/PriceInfoHandler.go b/cloud-control-manager/cloud-driver/drivers/tencent/resources/PriceInfoHandler.go index fb812d493..3c850b98b 100644 --- a/cloud-control-manager/cloud-driver/drivers/tencent/resources/PriceInfoHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/tencent/resources/PriceInfoHandler.go @@ -9,7 +9,6 @@ import ( idrv "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces" irs "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces/resources" - "github.com/davecgh/go-spew/spew" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" cvm "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm/v20170312" ) @@ -406,7 +405,7 @@ func mappingProductInfo(regionName string, i interface{}) irs.ProductInfo { // storage 관련 정보 삭제 return productInfo default: - spew.Dump(v) + cblogger.Debug(v) } return irs.ProductInfo{} @@ -476,7 +475,7 @@ func mappingPricingPolicy(instanceChargeType *string, price any) irs.PricingPoli policyInfo.OfferingClass = strPtrNilCheck(nil) default: - //spew.Dump(objType) + //cblogger.Debug(objType) cblogger.Info("Type doesn't match", reflect.TypeOf(price)) } diff --git a/cloud-control-manager/cloud-driver/drivers/tencent/resources/SecurityHandler.go b/cloud-control-manager/cloud-driver/drivers/tencent/resources/SecurityHandler.go index 2e5d190f2..526ced2e9 100644 --- a/cloud-control-manager/cloud-driver/drivers/tencent/resources/SecurityHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/tencent/resources/SecurityHandler.go @@ -19,7 +19,6 @@ import ( call "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/call-log" idrv "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces" irs "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces/resources" - "github.com/davecgh/go-spew/spew" "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" vpc "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312" ) @@ -99,11 +98,11 @@ func (securityHandler *TencentSecurityHandler) CreateSecurity(securityReqInfo ir callogger.Error(call.String(callLogInfo)) cblogger.Error(err) - spew.Dump(defaultEgressRequest) + cblogger.Debug(defaultEgressRequest) return irs.SecurityInfo{}, err } - //spew.Dump(defaultEgressResponse) + //cblogger.Debug(defaultEgressResponse) cblogger.Debug(defaultEgressResponse.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -148,10 +147,10 @@ func (securityHandler *TencentSecurityHandler) CreateSecurity(securityReqInfo ir callogger.Error(call.String(callLogInfo)) cblogger.Error(err) - spew.Dump(request) + cblogger.Debug(request) return irs.SecurityInfo{}, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -192,7 +191,7 @@ func (securityHandler *TencentSecurityHandler) ListSecurity() ([]*irs.SecurityIn cblogger.Error(err) return nil, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -263,7 +262,7 @@ func (securityHandler *TencentSecurityHandler) GetSecurity(securityIID irs.IID) cblogger.Error(err) return irs.SecurityInfo{}, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -295,7 +294,7 @@ func (securityHandler *TencentSecurityHandler) GetSecurityRuleInfo(securityIID i cblogger.Error(err) return nil, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) var securityRuleInfos []irs.SecurityRuleInfo @@ -400,7 +399,7 @@ func (securityHandler *TencentSecurityHandler) DeleteSecurity(securityIID irs.II cblogger.Error(err) return false, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -497,7 +496,7 @@ func (securityHandler *TencentSecurityHandler) AddRules(securityIID irs.IID, req cblogger.Error(err) return irs.SecurityInfo{}, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(ingressResponse.ToJsonString()) callogger.Info(call.String(callLogInfo)) } @@ -519,7 +518,7 @@ func (securityHandler *TencentSecurityHandler) AddRules(securityIID irs.IID, req cblogger.Error(err) return irs.SecurityInfo{}, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(egressResponse.ToJsonString()) callogger.Info(call.String(callLogInfo)) } @@ -608,7 +607,7 @@ func (securityHandler *TencentSecurityHandler) RemoveRules(securityIID irs.IID, cblogger.Error(err) return false, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(ingressResponse.ToJsonString()) callogger.Info(call.String(callLogInfo)) } @@ -629,7 +628,7 @@ func (securityHandler *TencentSecurityHandler) RemoveRules(securityIID irs.IID, cblogger.Error(err) return false, err } - //spew.Dump(response) + //cblogger.Debug(response) cblogger.Debug(egressResponse.ToJsonString()) callogger.Info(call.String(callLogInfo)) } @@ -686,7 +685,7 @@ func sameRulesCheck(presentSecurityRules *[]irs.SecurityRuleInfo, reqSecurityRul } if action == Add { - cblogger.Info("add") + cblogger.Debug("add") checkResult = append(checkResult, reqRule) } hasFound = true diff --git a/cloud-control-manager/cloud-driver/drivers/tencent/resources/VMHandler.go b/cloud-control-manager/cloud-driver/drivers/tencent/resources/VMHandler.go index a41d2dab8..e5834991a 100644 --- a/cloud-control-manager/cloud-driver/drivers/tencent/resources/VMHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/tencent/resources/VMHandler.go @@ -70,7 +70,7 @@ type TencentVMHandler struct { // VM생성 시 Zone이 필수라서 Credential의 Zone에만 생성함. func (vmHandler *TencentVMHandler) StartVM(vmReqInfo irs.VMReqInfo) (irs.VMInfo, error) { - cblogger.Info(vmReqInfo) + cblogger.Debug(vmReqInfo) zoneId := vmHandler.Region.Zone vpcHandler := TencentVPCHandler{ @@ -374,7 +374,7 @@ func (vmHandler *TencentVMHandler) StartVM(vmReqInfo irs.VMReqInfo) (irs.VMInfo, return irs.VMInfo{}, err } if cblogger.Level.String() == "debug" { - spew.Dump(response) + cblogger.Debug(response) } callogger.Info(call.String(callLogInfo)) cblogger.Debug(response.ToJsonString()) diff --git a/cloud-control-manager/cloud-driver/drivers/tencent/resources/VMSpecHandler.go b/cloud-control-manager/cloud-driver/drivers/tencent/resources/VMSpecHandler.go index f2728e8b8..496c689b5 100644 --- a/cloud-control-manager/cloud-driver/drivers/tencent/resources/VMSpecHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/tencent/resources/VMSpecHandler.go @@ -59,7 +59,7 @@ func (vmSpecHandler *TencentVmSpecHandler) ListVMSpec() ([]*irs.VMSpecInfo, erro return nil, err } - //spew.Dump(response) + //cblogger.Debug(response) //cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -72,7 +72,7 @@ func (vmSpecHandler *TencentVmSpecHandler) ListVMSpec() ([]*irs.VMSpecInfo, erro } cblogger.Debug(vmSpecInfoList) - //spew.Dump(vmSpecInfoList) + //cblogger.Debug(vmSpecInfoList) return vmSpecInfoList, nil } @@ -122,7 +122,7 @@ func (vmSpecHandler *TencentVmSpecHandler) GetVMSpec(Name string) (irs.VMSpecInf return irs.VMSpecInfo{}, err } - //spew.Dump(response) + //cblogger.Debug(response) //cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -176,7 +176,7 @@ func (vmSpecHandler *TencentVmSpecHandler) ListOrgVMSpec() (string, error) { return "", err } - //spew.Dump(response) + //cblogger.Debug(response) // cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -235,7 +235,7 @@ func (vmSpecHandler *TencentVmSpecHandler) GetOrgVMSpec(Name string) (string, er return "", err } - //spew.Dump(response) + //cblogger.Debug(response) //cblogger.Debug(response.ToJsonString()) callogger.Info(call.String(callLogInfo)) @@ -257,7 +257,7 @@ func (vmSpecHandler *TencentVmSpecHandler) GetOrgVMSpec(Name string) (string, er // 인스턴스 스펙 정보를 추출함 func ExtractVMSpecInfo(instanceTypeInfo *cvm.InstanceTypeConfig) irs.VMSpecInfo { cblogger.Debugf("ExtractVMSpecInfo : SpecName:[%s]", *instanceTypeInfo.InstanceType) - //spew.Dump(instanceTypeInfo) + //cblogger.Debug(instanceTypeInfo) vCpuInfo := irs.VCpuInfo{} // gpuInfoList := []irs.GpuInfo{} diff --git a/cloud-control-manager/cloud-driver/drivers/tencent/resources/VPCHandler.go b/cloud-control-manager/cloud-driver/drivers/tencent/resources/VPCHandler.go index 0e1259bcb..354e2a580 100644 --- a/cloud-control-manager/cloud-driver/drivers/tencent/resources/VPCHandler.go +++ b/cloud-control-manager/cloud-driver/drivers/tencent/resources/VPCHandler.go @@ -17,8 +17,6 @@ import ( call "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/call-log" idrv "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces" irs "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces/resources" - "github.com/davecgh/go-spew/spew" - "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common" vpc "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/vpc/v20170312" ) @@ -29,7 +27,7 @@ type TencentVPCHandler struct { } func (VPCHandler *TencentVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.VPCInfo, error) { - cblogger.Info(vpcReqInfo) + cblogger.Debug(vpcReqInfo) //================================================= // 동일 이름 생성 방지 추가(cb-spider 요청 필수 기능) @@ -43,7 +41,7 @@ func (VPCHandler *TencentVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.V return irs.VPCInfo{}, errors.New("A VPC with the name " + vpcReqInfo.IId.NameId + " already exists.") } - zoneId := VPCHandler.Region.Zone// default + zoneId := VPCHandler.Region.Zone // default cblogger.Infof("Zone : %s", zoneId) // if zoneId == "" { // vpc 자체는 region dependency임. // cblogger.Error("Connection information does not contain Zone information.") @@ -74,7 +72,7 @@ func (VPCHandler *TencentVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.V callLogInfo.ElapsedTime = call.Elapsed(callLogStart) cblogger.Debug(response.ToJsonString()) - //spew.Dump(result) + //cblogger.Debug(result) if err != nil { callLogInfo.ErrorMSG = err.Error() callogger.Error(call.String(callLogInfo)) @@ -99,7 +97,7 @@ func (VPCHandler *TencentVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.V if curSubnet.Zone != "" { subnetZoneId = curSubnet.Zone } - + reqSubnet := &vpc.SubnetInput{ CidrBlock: common.StringPtr(curSubnet.IPv4_CIDR), SubnetName: common.StringPtr(curSubnet.IId.NameId), @@ -111,7 +109,7 @@ func (VPCHandler *TencentVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.V responseSubnet, errSubnet := VPCHandler.Client.CreateSubnets(requestSubnet) cblogger.Debug(responseSubnet.ToJsonString()) - //spew.Dump(responseSubnet) + //cblogger.Debug(responseSubnet) if errSubnet != nil { cblogger.Error(errSubnet) return irs.VPCInfo{}, errSubnet @@ -132,7 +130,7 @@ func (VPCHandler *TencentVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.V // VPC 정보를 추출함 func ExtractVpcDescribeInfo(vpcInfo *vpc.Vpc) irs.VPCInfo { // cblogger.Debug("전달 받은 내용") - // spew.Dump(vpcInfo) + // cblogger.Debug(vpcInfo) resVpcInfo := irs.VPCInfo{ //NameId는 사용되지 않기 때문에 전달할 필요가 없지만 Tencent는 Name도 필수로 들어가니 전달함. IId: irs.IID{SystemId: *vpcInfo.VpcId, NameId: *vpcInfo.VpcName}, @@ -163,7 +161,7 @@ func (VPCHandler *TencentVPCHandler) ListVPC() ([]*irs.VPCInfo, error) { callLogInfo.ElapsedTime = call.Elapsed(callLogStart) cblogger.Debug(response.ToJsonString()) - //spew.Dump(result) + //cblogger.Debug(result) if err != nil { callLogInfo.ErrorMSG = err.Error() callogger.Error(call.String(callLogInfo)) @@ -180,7 +178,7 @@ func (VPCHandler *TencentVPCHandler) ListVPC() ([]*irs.VPCInfo, error) { cblogger.Debugf("[%s] VPC 정보 조회 - [%s]", *curVpc.VpcId, *curVpc.VpcName) vpcInfo, vpcErr := VPCHandler.GetVPC(irs.IID{SystemId: *curVpc.VpcId}) // cblogger.Info("==>조회 결과") - // spew.Dump(vpcInfo) + // cblogger.Debug(vpcInfo) if vpcErr != nil { cblogger.Error(vpcErr) return nil, vpcErr @@ -190,7 +188,7 @@ func (VPCHandler *TencentVPCHandler) ListVPC() ([]*irs.VPCInfo, error) { } cblogger.Debugf("Number of Return Results List : [%d]", len(vpcInfoList)) - // spew.Dump(vpcInfoList) + // cblogger.Debug(vpcInfoList) return vpcInfoList, nil } @@ -335,7 +333,7 @@ func (VPCHandler *TencentVPCHandler) ListSubnet(reqVpcId string) ([]irs.SubnetIn // callLogInfo.ElapsedTime = call.Elapsed(callLogStart) //cblogger.Debug(response.ToJsonString()) - spew.Dump(response) + cblogger.Debug(response) if err != nil { // callLogInfo.ErrorMSG = err.Error() // callogger.Error(call.String(callLogInfo)) @@ -377,10 +375,10 @@ func (VPCHandler *TencentVPCHandler) isExistSubnet(reqSubnetNameId string) (bool }, } - //spew.Dump(request) + //cblogger.Debug(request) response, err := VPCHandler.Client.DescribeSubnets(request) //cblogger.Debug("서브넷 실행 결과") - //spew.Dump(response) + //cblogger.Debug(response) if err != nil { cblogger.Error(err) return false, err @@ -448,7 +446,7 @@ func (VPCHandler *TencentVPCHandler) AddSubnet(vpcIID irs.IID, subnetInfo irs.Su callLogInfo.ElapsedTime = call.Elapsed(callLogStart) cblogger.Debug(response.ToJsonString()) - spew.Dump(response) + cblogger.Debug(response) if err != nil { callLogInfo.ErrorMSG = err.Error() callogger.Error(call.String(callLogInfo)) @@ -491,7 +489,7 @@ func (VPCHandler *TencentVPCHandler) RemoveSubnet(vpcIID irs.IID, subnetIID irs. callLogInfo.ElapsedTime = call.Elapsed(callLogStart) cblogger.Debug(response.ToJsonString()) - //spew.Dump(response) + //cblogger.Debug(response) if err != nil { callLogInfo.ErrorMSG = err.Error() callogger.Error(call.String(callLogInfo))