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

ILO_SDK::Rest can't properly handle IPv6 addresses #26

Open
vranystepan opened this issue Jun 30, 2017 · 1 comment
Open

ILO_SDK::Rest can't properly handle IPv6 addresses #26

vranystepan opened this issue Jun 30, 2017 · 1 comment

Comments

@vranystepan
Copy link
Contributor

Scenario/Intent

This is natural behaviour or URI library. See following example:

URI("https://[FE80::C800:EFF:FE74:8]").host # => "[FE80::C800:EFF:FE74:8]"
URI("https://[FE80::C800:EFF:FE74:8]").hostname # => "FE80::C800:EFF:FE74:8"

First example does not return valid IPv6 address so it OneviewSDK::Rest can't work properly.
https://github.com/HewlettPackard/ilo-sdk-ruby/blob/master/lib/ilo-sdk/rest.rb#L36

Steps to Reproduce

See Scenario/Intent

Fix?

Replace .host with .hostname (at the moment I can see only one occurrence):
https://github.com/HewlettPackard/ilo-sdk-ruby/blob/master/lib/ilo-sdk/rest.rb#L36

Potential impact

None. FQDNs and IPv4 URIs should be handled same way:

URI("https://oneview.local").hostname # => "oneview.local"
URI("https://oneview.local").host # => "oneview.local"
URI("https://1.2.3.4").hostname # => "1.2.3.4"
URI("https://1.2.3.4").host # => "1.2.3.4"
@jsmartt
Copy link
Contributor

jsmartt commented Jun 30, 2017

👍

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

No branches or pull requests

2 participants