-
Notifications
You must be signed in to change notification settings - Fork 16
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
Image Streamer Client cannot be created with the OneView environment variables #183
Comments
@tmiotto , Could not create, because the environment variable is I3S_TOKEN. But now I see that maybe not need this environment variable, and it may just be ONEVIEWSDK_TOKEN. |
👍 Yeah, I think we only need 1 env variable for a token (ONEVIEWSDK_TOKEN) |
So in this case this would not be a bug, but an improvement. You agree? Correct me if I'm wrong. Please. :) |
Yeah. This is where that warning saying that I3S is experimental and subject to change at this point. We can easily change pretty much anything still. I'd label it an improvement and/or unexpected behavior. |
Regarding number 2 okay, it may be an improvement if we would just want to remove the I3S Token. But regarding number 1, if I'm using the ENV variables user and password for OneView why would I now have to do the login and get the token to use in Image Streamer? |
@tmiotto , I think I understood your question. With the change made to the i3s login mode that was recently merged into the master, this is no longer necessary. But this case, the user would have to create the i3s_client instance with the method new_i3s_client of oneview client. So, we can thought in a solution when the user wants uses the enviroments variables with user and password. Could be something like: # on initialize of i3s client
if ENV['ONEVIEWSDK_USER'] && ENV['ONEVIEWSDK_PASSWORD'] && ENV['I3S_URL']
ov_client = Oneview::Client.new
@token = ov_client.token
end |
@aalexmonteiro I see... Well then we would have: ov_client = OneviewSDK::Client.new # Relying on ONEVIEWSDK ENV
i3s_client = ov_client.new_image_streamer_client # Relying on I3S ENV as the expected use case. The one I was talking is: i3s_client = OneviewSDK::ImageStreamer::Client.new # Relying on ONEVIEWSDK and I3S ENV that I'm okay not implementing considering the expected and unexpected use cases would be thoroughly documented in the README, so we won't have users complaining that some other ways to create the client are not working when we are expecting them to not work. |
Scenario/Intent
I want to create my Image Streamer client only using the environment variables:
ENV['ONEVIEWSDK_URL']
,ENV['ONEVIEWSDK_USER']
,ENV['ONEVIEWSDK_PASSWORD']
andENV['I3S_URL']
ENV['ONEVIEWSDK_TOKEN']
andENV['I3S_URL']
but I can't, since it won't parse the OneView environment variables to gather the token.
Environment Details
Steps to Reproduce
ENV['ONEVIEWSDK_URL']
,ENV['ONEVIEWSDK_USER']
,ENV['ONEVIEWSDK_PASSWORD']
andENV['I3S_URL']
to valid values.OneviewSDK::ImageStreamer::Client.new
relying on the Environment variables.ENV['ONEVIEWSDK_TOKEN']
andENV['I3S_URL']
to valid values.OneviewSDK::ImageStreamer::Client.new
relying on the Environment variables.Expected Result
The Image Streamer client should be created succesfully with the environment variables values.
Actual Result
It fails:
The text was updated successfully, but these errors were encountered: