HewlettPackard / oneview-golang

Golang bindings for OneView api's
Apache License 2.0
27 stars 21 forks source link

Can't use a fully qualified filename to load config #422

Closed pyfontan closed 1 month ago

pyfontan commented 1 month ago

Scenario/Intent

Load a config from a file which is not in the same path that the CLI using oneview-golang.

Environment Details

Steps to Reproduce

Use LoadConfigFile function with a value of configFile parameter equal to /etc/whatever.json

Expected Result

Configuration object loaded from file /etc/whatever.json

Actual Result

Open file error because de LoadConfigFile function prepends the configFile with the path of Caller.

alisha-k-kalladassery commented 1 month ago

Hi @pyfontan

We went through your PR and understood the issue you are facing. But your PR doesn't seem to solve the issue as we tried running it. Please let us know if you need any further help on this.

Thanks, Alisha

pyfontan commented 1 month ago

Hi @alisha-k-kalladassery

I created the new LoadConfigFilePath in order to be able to load a config file with a full path.

I didn't want to break the operation of the initial function LoadConfigFile

Hope it helps. Thanks Pierre-yves

alisha-k-kalladassery commented 1 month ago

Thanks @pyfontan . We checked it and it is working fine. We will approve it and if workflows run fine, We can merge the same.

Thanks Alisha