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

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

Closed
pyfontan opened this issue Sep 16, 2024 · 3 comments · Fixed by #423
Closed

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

pyfontan opened this issue Sep 16, 2024 · 3 comments · Fixed by #423

Comments

@pyfontan
Copy link

Scenario/Intent

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

Environment Details

  • OneView SDK Version: v9.1.0
  • OneView Appliance Version: 9.00.00-0493574
  • Golang Version: v1.22.1
  • Platform: Ubuntu 24.04

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
Copy link
Collaborator

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
Copy link
Author

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
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants