Skip to content

Commit

Permalink
rootPath hardcoded remove and interface input value name fix
Browse files Browse the repository at this point in the history
  • Loading branch information
raccoon-mh committed Jan 11, 2024
1 parent bc526ac commit 805d1ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ package AliTestConfig

import (
"io/ioutil"
"os"

alidrv "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/alibaba"
idrv "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/interfaces"
Expand Down Expand Up @@ -66,14 +67,10 @@ type Config struct {
// 환경변수 CBSPIDER_PATH 설정 후 해당 폴더 하위에 /config/config.yaml 파일 생성해야 함.
func ReadConfigFile() Config {
// Set Environment Value of Project Root Path
///////// rootPath := os.Getenv("CBSPIDER_PATH")
//rootpath := "D:/Workspace/mcloud-barista-config"
// /mnt/d/Workspace/mcloud-barista-config/config/config.yaml
///////// cblogger.Debugf("Test Data 설정파일 : [%]", rootPath+"/config/config.yaml")

///////// data, err := ioutil.ReadFile(rootPath + "/config/config.yaml")
data, err := ioutil.ReadFile("/home/ubuntu/workspace/cb-spider/feature_priceInfo_ali_20231204_yhnoh/cloud-control-manager/cloud-driver/drivers/alibaba/main/Sample/config/config.yaml")
//data, err := ioutil.ReadFile("D:/Workspace/mcloud-bar-config/config/config.yaml")
rootPath := os.Getenv("CBSPIDER_PATH")
cblogger.Debugf("Test Data 설정파일 : [%s]", rootPath+"/config/config.yaml")
data, err := ioutil.ReadFile(rootPath + "/config/config.yaml")

if err != nil {
panic(err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ package main
import (
"fmt"
"io/ioutil"
"os"

"github.com/aws/aws-sdk-go/aws/awserr"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@ type PricingPolicyInfo struct {
}

type PriceInfoHandler interface {
ListProductFamily(targetRegion string) ([]string, error)
ListProductFamily(regionName string) ([]string, error)
GetPriceInfo(productFamily string, regionName string, filterList []KeyValue) (string, error) // return string: json format
}

0 comments on commit 805d1ae

Please sign in to comment.