manageiq-api
manageiq-api copied to clipboard
[RFE] Enable/Disable automate domains
ManageIQ recently implemented the create_from_git
action on /api/automate_domains
. By default the new domain is set to disabled. This is by design, because there should be an administrator "approving" the domain, by enabling it manually.
However CI/CD pipelines need to enable the new domains automatically.
My particular use case involves generating Automate Domains on the fly, based on pull requests in git. These Domains are pushed to the central git repo as orphaned branch, a call to create_from_git
that imports the domain, before the orphaned branch is cleaned up.
A separate action to set the enabled field in MiqAeDomain would solve that problem
Original RFE: https://github.com/ManageIQ/manageiq-api/issues/354 PR: https://github.com/ManageIQ/manageiq-api/pull/571 My Project: https://github.com/ThomasBuchinger/miq-flow/issues/52 Gitter conversation:
- https://gitter.im/ManageIQ/api?at=5d509e5f4e17537f5215b319
- https://gitter.im/ManageIQ/api?at=5d52b8b39507182477cedd2b
As discussed, in my opinion this should already be possible since it's an attribute and attributes can be modified via PUT/PATCH
if exposed yes, but it is not today. The API needs to be enhanced to support /api/automate_domains updates (post edit action or patch).
From miq_product_features.yml, looks like the user entitlement to be associated with this action would be "miq_ae_domain_edit", so essentially adding:
:post:
- :name: edit
:identifier: miq_ae_domain_edit
in collection & resource actions for automate_domains.
base controller's update methods should handle this fine unless some other checks are needed in the api controller, should be minor.
/cc @mkanoor
I did some testing on my Ivanchuck appliance today. And just adding @abellotti snippet to config/api.yml
does work for me
POST /api/automate_domains/169
{
"action": "edit"
"resource": {
"enabled": true
}
}
In theory you could already patch any attribute over API as it is today:
PATCH /api/automate_domains/169
{
"enabled": true
}
PR resolving this issue by @skateman: https://github.com/ManageIQ/manageiq-api/pull/647
You guys are faster with the implementation, than I am with setting up my development environment Anyway is there anything I can do to get that feature into Ivanchuk down the line? Probably it is best to talk to RedHat support?
Second, I think nobody is currently working on an update to the API reference? I am going to open a PR
@abellotti ^
This issue has been automatically marked as stale because it has not been updated for at least 6 months.
If you can still reproduce this issue on the current release or on master
, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions!
@abellotti has this been addressed? can it be closed?
Not yet, discussions are pending with the related PR https://github.com/ManageIQ/manageiq-api/pull/647 so let's keep this open.
This issue has been automatically marked as stale because it has not been updated for at least 3 months.
If you can still reproduce this issue on the current release or on master
, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.
This issue has been automatically closed because it has not been updated for at least 3 months.
Feel free to reopen this issue if this issue is still valid.
Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.