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

[Tencent] Change All Error Messages to English #1053 #1054

Merged
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
3 changes: 2 additions & 1 deletion cloud-control-manager/cloud-driver/drivers/aws/AwsDriver.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ func getVMClient(connectionInfo idrv.ConnectionInfo) (*ec2.EC2, error) {
//spew.Dump(connectionInfo)

sess, err := session.NewSession(&aws.Config{
Region: aws.String(connectionInfo.RegionInfo.Region),
CredentialsChainVerboseErrors: aws.Bool(true),
Region: aws.String(connectionInfo.RegionInfo.Region),
//Region: aws.String("ap-northeast-2"),
Credentials: credentials.NewStaticCredentials(connectionInfo.CredentialInfo.ClientId, connectionInfo.CredentialInfo.ClientSecret, "")},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,8 @@ func DescribeRegions(client *ec2.EC2, AllRegionsBool bool, regionName string) (*
resp, err := client.DescribeRegions(RegionsInput)
callLogInfo.ElapsedTime = call.Elapsed(callLogStart)
callogger.Info(call.String(callLogInfo))
callogger.Info("########################")
callogger.Info(resp.Regions)

if err != nil {
cblogger.Error(err)
Expand Down Expand Up @@ -762,6 +764,7 @@ func DescribeAvailabilityZones(client *ec2.EC2, AllRegionsBool bool) (*ec2.Descr
respZones, err := client.DescribeAvailabilityZones(ZonesInput)
callLogInfo.ElapsedTime = call.Elapsed(callLogStart)
callogger.Info(call.String(callLogInfo))
callogger.Info(respZones.AvailabilityZones)

if err != nil {
cblogger.Error(err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ type AwsRegionZoneHandler struct {
}

func (regionZoneHandler *AwsRegionZoneHandler) ListRegionZone() ([]*irs.RegionZoneInfo, error) {
responseRegions, err := DescribeRegions(regionZoneHandler.Client, true, "")

responseRegions, err := DescribeRegions(regionZoneHandler.Client, false, "")
if err != nil {
cblogger.Error(err)
return nil, err
Expand All @@ -41,8 +42,10 @@ func (regionZoneHandler *AwsRegionZoneHandler) ListRegionZone() ([]*irs.RegionZo

responseZones, err := DescribeAvailabilityZones(tempclient, true)
if err != nil {
cblogger.Errorf("AuthFailure on [%s]", *region.RegionName)
cblogger.Error(err)
cblogger.Infof("AuthFailure on [%s]", *region.RegionName)
cblogger.Infof(err.Error())
// cblogger.Errorf("AuthFailure on [%s]", *region.RegionName)
// cblogger.Error(err)
} else {
var zoneInfoList []irs.ZoneInfo
for _, zone := range responseZones.AvailabilityZones {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ func getVmClient(connectionInfo idrv.ConnectionInfo) (*cvm.Client, error) {

zoneId := connectionInfo.RegionInfo.Zone
if len(zoneId) < 1 {
cblogger.Error("Connection 정보에 Zone 정보가 없습니다.")
return nil, errors.New("Connection 정보에 Zone 정보가 없습니다")
cblogger.Error("Connection information does not contain Zone information.")
return nil, errors.New("Connection information does not contain Zone information.")
}

credential := common.NewCredential(
Expand Down Expand Up @@ -99,8 +99,8 @@ func getVpcClient(connectionInfo idrv.ConnectionInfo) (*vpc.Client, error) {

zoneId := connectionInfo.RegionInfo.Zone
if len(zoneId) < 1 {
cblogger.Error("Connection 정보에 Zone 정보가 없습니다.")
return nil, errors.New("Connection 정보에 Zone 정보가 없습니다")
cblogger.Error("Connection information does not contain Zone information.")
return nil, errors.New("Connection Connection information does not contain Zone information.")
}

credential := common.NewCredential(
Expand Down Expand Up @@ -130,8 +130,8 @@ func getClbClient(connectionInfo idrv.ConnectionInfo) (*clb.Client, error) {

zoneId := connectionInfo.RegionInfo.Zone
if len(zoneId) < 1 {
cblogger.Error("Connection 정보에 Zone 정보가 없습니다.")
return nil, errors.New("Connection 정보에 Zone 정보가 없습니다")
cblogger.Error("Connection information does not contain Zone information.")
return nil, errors.New("Connection Connection information does not contain Zone information.")
}

credential := common.NewCredential(
Expand Down Expand Up @@ -161,8 +161,8 @@ func getCbsClient(connectionInfo idrv.ConnectionInfo) (*cbs.Client, error) {

zoneId := connectionInfo.RegionInfo.Zone
if len(zoneId) < 1 {
cblogger.Error("Connection 정보에 Zone 정보가 없습니다.")
return nil, errors.New("Connection 정보에 Zone 정보가 없습니다")
cblogger.Error("Connection information does not contain Zone information.")
return nil, errors.New("Connection Connection information does not contain Zone information.")
}

credential := common.NewCredential(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ func (vmHandler *TencentVMHandler) StartVM(vmReqInfo irs.VMReqInfo) (irs.VMInfo,
zoneId := vmHandler.Region.Zone
cblogger.Debugf("Zone : %s", zoneId)
if zoneId == "" {
cblogger.Error("Connection 정보에 Zone 정보가 없습니다.")
return irs.VMInfo{}, errors.New("Connection 정보에 Zone 정보가 없습니다")
cblogger.Error("Connection information does not contain Zone information.")
return irs.VMInfo{}, errors.New("Connection Connection information does not contain Zone information.")
}

//=================================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ type TencentVmSpecHandler struct {
Client *cvm.Client
}

//@TODO : Region : zone id(Region이 아닌 zone id로 조회해야 함.)
// @TODO : Region : zone id(Region이 아닌 zone id로 조회해야 함.)
func (vmSpecHandler *TencentVmSpecHandler) ListVMSpec() ([]*irs.VMSpecInfo, error) {
//cblogger.Infof("ListVMSpec(ZoneId:[%s])", Region)

zoneId := vmSpecHandler.Region.Zone
//zoneId := Region
cblogger.Infof("Session Zone : [%s]", zoneId)
if zoneId == "" {
cblogger.Error("Connection 정보에 Zone 정보가 없습니다.")
return nil, errors.New("Connection 정보에 Zone 정보가 없습니다.")
cblogger.Error("Connection information does not contain Zone information.")
return nil, errors.New("Connection information does not contain Zone information.")
}

callogger := call.GetLogger("HISCALL")
Expand Down Expand Up @@ -83,8 +83,8 @@ func (vmSpecHandler *TencentVmSpecHandler) GetVMSpec(Name string) (irs.VMSpecInf
//zoneId := Region
cblogger.Infof("Session Zone : [%s]", zoneId)
if zoneId == "" {
cblogger.Error("Connection 정보에 Zone 정보가 없습니다.")
return irs.VMSpecInfo{}, errors.New("Connection 정보에 Zone 정보가 없습니다.")
cblogger.Error("Connection information does not contain Zone information.")
return irs.VMSpecInfo{}, errors.New("Connection information does not contain Zone information.")
}

callogger := call.GetLogger("HISCALL")
Expand Down Expand Up @@ -141,8 +141,8 @@ func (vmSpecHandler *TencentVmSpecHandler) ListOrgVMSpec() (string, error) {
//zoneId := Region
cblogger.Infof("Session Zone : [%s]", zoneId)
if zoneId == "" {
cblogger.Error("Connection 정보에 Zone 정보가 없습니다.")
return "", errors.New("Connection 정보에 Zone 정보가 없습니다.")
cblogger.Error("Connection information does not contain Zone information.")
return "", errors.New("Connection information does not contain Zone information.")
}

callogger := call.GetLogger("HISCALL")
Expand Down Expand Up @@ -196,8 +196,8 @@ func (vmSpecHandler *TencentVmSpecHandler) GetOrgVMSpec(Name string) (string, er
//zoneId := Region
cblogger.Infof("Session Zone : [%s]", zoneId)
if zoneId == "" {
cblogger.Error("Connection 정보에 Zone 정보가 없습니다.")
return "", errors.New("Connection 정보에 Zone 정보가 없습니다.")
cblogger.Error("Connection information does not contain Zone information.")
return "", errors.New("Connection information does not contain Zone information.")
}

callogger := call.GetLogger("HISCALL")
Expand Down Expand Up @@ -251,7 +251,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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func (VPCHandler *TencentVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.V
zoneId := VPCHandler.Region.Zone
cblogger.Infof("Zone : %s", zoneId)
if zoneId == "" {
cblogger.Error("Connection 정보에 Zone 정보가 없습니다.")
return irs.VPCInfo{}, errors.New("Connection 정보에 Zone 정보가 없습니다.")
cblogger.Error("Connection information does not contain Zone information.")
return irs.VPCInfo{}, errors.New("Connection information does not contain Zone information.")
}

// logger for HisCall
Expand Down Expand Up @@ -124,7 +124,7 @@ func (VPCHandler *TencentVPCHandler) CreateVPC(vpcReqInfo irs.VPCReqInfo) (irs.V
return retVpcInfo, nil
}

//VPC 정보를 추출함
// VPC 정보를 추출함
func ExtractVpcDescribeInfo(vpcInfo *vpc.Vpc) irs.VPCInfo {
// cblogger.Debug("전달 받은 내용")
// spew.Dump(vpcInfo)
Expand Down Expand Up @@ -394,8 +394,8 @@ func (VPCHandler *TencentVPCHandler) AddSubnet(vpcIID irs.IID, subnetInfo irs.Su
zoneId := VPCHandler.Region.Zone
cblogger.Infof("Zone : %s", zoneId)
if zoneId == "" {
cblogger.Error("Connection 정보에 Zone 정보가 없습니다.")
return irs.VPCInfo{}, errors.New("Connection 정보에 Zone 정보가 없습니다.")
cblogger.Error("Connection information does not contain Zone information.")
return irs.VPCInfo{}, errors.New("Connection information does not contain Zone information.")
}

if subnetInfo.IId.NameId == "" {
Expand Down
Loading