From e65e8d8e82db020c1c62bd8b7242f404a835232a Mon Sep 17 00:00:00 2001 From: akshith-gunasheelan Date: Mon, 21 Oct 2024 11:41:52 +0530 Subject: [PATCH] update lib --- go.mod | 2 +- go.sum | 4 ++-- .../HewlettPackard/oneview-golang/ov/config.go | 13 ++++++++++--- vendor/modules.txt | 2 +- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 8cf142fa..4f9f2c0d 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/HewlettPackard/terraform-provider-oneview go 1.15 require ( - github.com/HewlettPackard/oneview-golang v9.1.0+incompatible + github.com/HewlettPackard/oneview-golang v9.2.0+incompatible github.com/docker/machine v0.16.2 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-getter v1.6.2 // indirect diff --git a/go.sum b/go.sum index 0befbf48..f4905cd4 100644 --- a/go.sum +++ b/go.sum @@ -34,8 +34,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/HewlettPackard/oneview-golang v9.1.0+incompatible h1:7jcscW+AhZgDSOYJxSS5Nr+kf3fGF8GmDUvI3YisA+0= -github.com/HewlettPackard/oneview-golang v9.1.0+incompatible/go.mod h1:GJcjWgNHrKtt2lUl4xcaV3NRiuBlG138DNrFygXj4JE= +github.com/HewlettPackard/oneview-golang v9.2.0+incompatible h1:9vxiL/rpbuuCmd9664nHTv1+ltGGc4CI0Zy52iyqEOQ= +github.com/HewlettPackard/oneview-golang v9.2.0+incompatible/go.mod h1:GJcjWgNHrKtt2lUl4xcaV3NRiuBlG138DNrFygXj4JE= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= diff --git a/vendor/github.com/HewlettPackard/oneview-golang/ov/config.go b/vendor/github.com/HewlettPackard/oneview-golang/ov/config.go index 1fa66660..21af0772 100644 --- a/vendor/github.com/HewlettPackard/oneview-golang/ov/config.go +++ b/vendor/github.com/HewlettPackard/oneview-golang/ov/config.go @@ -93,10 +93,9 @@ type ServerProfileConfig struct { OvTemplatestring string `json:"ov_template"` } -func LoadConfigFile(configFile string) (Configuration, error) { - _, filename, _, _ := runtime.Caller(1) - configFilePath := filepath.Join(filepath.Dir(filename), configFile) +func LoadConfigFilePath(configFilePath string) (Configuration, error) { configF, err := os.Open(configFilePath) + var config Configuration defer configF.Close() if err != nil { @@ -114,4 +113,12 @@ func LoadConfigFile(configFile string) (Configuration, error) { } return config, nil + +} + +func LoadConfigFile(configFile string) (Configuration, error) { + _, filename, _, _ := runtime.Caller(1) + configFilePath := filepath.Join(filepath.Dir(filename), configFile) + + return LoadConfigFilePath(configFilePath) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 7bcc5926..e238ed2b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -8,7 +8,7 @@ cloud.google.com/go/internal/trace cloud.google.com/go/internal/version # cloud.google.com/go/storage v1.10.0 cloud.google.com/go/storage -# github.com/HewlettPackard/oneview-golang v9.1.0+incompatible +# github.com/HewlettPackard/oneview-golang v9.2.0+incompatible ## explicit github.com/HewlettPackard/oneview-golang/liboneview github.com/HewlettPackard/oneview-golang/ov