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

Unable to list parameters by name - undefined method `each_pair' #22

Open
tetherit opened this issue May 23, 2015 · 2 comments
Open

Unable to list parameters by name - undefined method `each_pair' #22

tetherit opened this issue May 23, 2015 · 2 comments

Comments

@tetherit
Copy link

When I try to list_parameters_of by name, I get this error:

> client.list_parameters_of('federation-upstream', 'monitor', '33ac8c46007794dee1a6')
NoMethodError: undefined method `each_pair' for #<Array:0x0000000153b1e0>
from /var/lib/gems/2.2.0/gems/hashie-3.4.1/lib/hashie/mash.rb:179:in `deep_update'

If I don't list by name, I see the parameters as expected:

> client.list_parameters_of('federation-upstream', 'monitor')
=> [{"value"=>{"uri"=>"amqp://33ac8c46007794dee1a6:[email protected]/monitor", "reconnect-delay"=>30}, "vhost"=>"monitor", "component"=>"federation-upstream", "name"=>"33ac8c46007794dee1a6"}]
@michaelklishin
Copy link
Member

Can you please post the output of the same request with curl? The body seems to be non-standard.

The path is

/api/parameters/#{uri_encode(component)}/#{uri_encode(vhost)}/#{uri_encode(name)}

@tetherit
Copy link
Author

Sure:

$ curl "http://timeline:[email protected]:15672/api/parameters/federation-upstream/monitor/33ac8c46007794dee1a6"
{"value":{"uri":"amqp://33ac8c46007794dee1a6:[email protected]/monitor","reconnect-delay":30},"vhost":"monitor","component":"federation-upstream","name":"33ac8c46007794dee1a6"}

I'm also seeing the same issue with list_policies_of:

> client.list_policies_of('monitor', 'federate-me')
NoMethodError: undefined method `each_pair' for ["vhost", "monitor"]:Array
from /var/lib/gems/2.2.0/gems/hashie-3.4.1/lib/hashie/mash.rb:179:in `deep_update'

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

1 participant