ManageIQ / ManageIQ/manageiq-api-client
[RFE] Support custom button actions in API client
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 11
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing ManageIQ::API::Client::Resource::Service, its method_missing handling, and the actions response from GET /api/services/:id. Reproduce the custom button call and inspect why res.actions omits it. Done means a returned service resource can invoke the custom action through public_send and exposes it in res.actions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100