Skip to content

Problem with number values in connection_params #487

Description

@vadimstroganov

Hello!

I have a problem with the connection_params, if I specify values consisting only of numbers.

for-core call coerce_options for connection_params.

coerce_options suggests it takes a Hash and converts all the values to underlying Ruby types. So a username that is only numbers is converted to a number.

After the conversion, the string "12345" is converted to the number 12345. And after that, a request for authentication of OpenStack API is sent.

In this case, OpenStack API in the response body is an empty string.

Then an error occurs. (can't decode JSON; response.body = "")

https://github.com/fog/fog-openstack/blob/master/lib/fog/openstack/auth/token/v3.rb#L58

I already wrote about this here fog/fog-core#247

Probably the best way would be to wrap the parameters after call coerce_options into a string?

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions