ManageIQ / manageiq-api-client

Ruby client library to the ManageIQ REST API
MIT License
11 stars 26 forks source link

[RFE] Support custom button actions in API client #83

Open bekasovoleg opened 6 years ago

bekasovoleg commented 6 years ago

I try to call custom button action in remote region, but i have method_missing error

cn = ManageIQ::API::Client.new( :url => url, :miqtoken => region.api_system_auth_token('admin'), :ssl => {:verify => false})
col = cn.public_send(:services)
res = col.find(id)
res.public_send(:my_custom_button, nil)

NoMethodError: undefined method `my_custom_button' for #<ManageIQ::API::Client::Resource::Service:0x000000070c0dd0>

my_custom_button exists and works properly when I call directly

GET /api/services/:id returns my custom button action, but res.actions doesnt return