Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Madhu Kanoor
@mkanoor
@ThomasBuchinger thats by design we dont want to import a new domain and enable it automatically. The administrator would have to set the domain to be enabled before they can start start using it.
ThomasBuchinger
@ThomasBuchinger
@mkanoor @jvlcek thanks! Well I am trying to use it in a CI/CD pipeline, so a manual step would be an issue for me... is there a way around it? (ideally one that does not involve ssh to the appliance and execute rails runner, because that is the workaround I hope to replace :) )
ThomasBuchinger
@ThomasBuchinger
Is there any reason, why a (optional) "enabled"-parameter would be a bad idea? I can't find anything in Bugzilla/Github.
Looking at the code, it shouldn't be too complicated to implement ( just add the enabled parameter here ) and I could probalby do it on my own, though I haven't figured out how the UI importer sets the domain to enabled yet
Martin Hradil
@himdel

I haven't figured out how the UI importer sets the domain to enabled yet

@ThomasBuchinger It doesn't, there's a separate toolbar button for enabling a domain.

=> ideally, if we're adding support for enabling domains to the API, it should be a separate action from importing, that way, even the UI can use it

ThomasBuchinger
@ThomasBuchinger
@himdel that is an even better idea. I guess the next step is to open an issue on ManageIQ/manageiq-api? or ManageIQ/manageiq?
Martin Hradil
@himdel
An issue is always good :) I'd say api, since the core already implements it
Miha Pleško
@miha-plesko
hi, were there any recent changes on the api regarding initiated_by parameter when doing POST /requests?
Capture.PNG
Joe VLcek
@jvlcek
@mkanoor and @himdel Thank you for answering the questions from @ThomasBuchinger
@ThomasBuchinger an issue would be great and you could even post a PR if you’d like.
@miha-plesko
curl --user admin:<pw> -k -X GET -H "Accept: application/json" https://${MIQ}/api/requests | jsonpp
Works for me.
@miha-plesko what MiQ version, user? Does the user have a valid role/group?
Miha Pleško
@miha-plesko
@jvlcek i'm on master branch of MIQ using admin user
Joe VLcek
@jvlcek
I’m using master from a week or so ago.
Miha Pleško
@miha-plesko
I think it's this change causing me problems ManageIQ/manageiq#19073
oh, most probably it's just schema migration to apply, lemme try
Joe VLcek
@jvlcek
@miha-plesko could be. My appliance does not have that change, it’s just a tad too old.
Miha Pleško
@miha-plesko
tadaaa it works, thanks for your help
Joe VLcek
@jvlcek
:thumbsup:
ThomasBuchinger
@ThomasBuchinger

@himdel How do you feel about a more generic "edit_attribute"-action, instead of just "set_enabled"?
I have the problem (in a different part of my pipeline), that the last domain to be imported has the highest priority, but I need to insert it between ManageIQ and any custom domains that exist at this point.

This isn't a big pain point for me right now, but it may be useful and shouldn't be a big deal to make it work for multiple attributes. Do you guys have a preference?

Jason Frey
@Fryguy
"edit_attribute" is already a thing via PATCH / PUT
not sure if that particular attribute is patchable though
ThomasBuchinger
@ThomasBuchinger
I am not sure if one would want a generic PATCH function, because I think changing a attribute (most likely) requires additional processing, as the /automate_domains-endpoint isn't backed by a database object, which can be updated automatically. (though I am not that familiar with rails)
Jason Frey
@Fryguy
pretty sure automate_domains is backed by a DB table, but I agree that enabled may not be a simple attribute update (I'd have to check)
Madhu Kanoor
@mkanoor
enabled is a boolean attribute in the MiqAeDomain, but it can only be applied to non system domains like ManageIQ, we don’t want users to disable the ManageIQ domain
Jason Frey
@Fryguy
yeah, but that's easily controllable
you just set a validation in the model
PATCH/PUT doesn't write to the DB directly...it still has to go through model validations and whatnot
ThomasBuchinger
@ThomasBuchinger
you are correct, automate_domains is backed. I'll try to get from being able to read rails code, to writing new rails code on the weekend
Martin Hradil
@himdel

I'd rather see a specific "enable domain" action, instead of a generic "set attribute" in this case.

After all, we're talking about enabling a domain, not about settting domain.enabled=true

(even if that's all that would end up happening)
((at least, to me enabling a domain sounds more like a black box method call than a simple attribute set))
Jason Frey
@Fryguy
I dunno...agree to disagree :)
Martin Hradil
@himdel
yeah, either works :)
ThomasBuchinger
@ThomasBuchinger
so 3 votes for "indifferent"?
Halász Dávid
@skateman
I'm struggling with retrieving a virtual attribute of an expanded subcollection, specifically for tagging, is it even possible?
GET /api/categories?expand=resources,tags&attributes=id,description
into that I'm trying to get in the categorization virtual attribute for eachtag
ThomasBuchinger
@ThomasBuchinger
@skateman Are you looking for this?
 GET /api/tags?expand=resources&attributes=id,name,categorization
{"href":"https://cf.example.com/api/tags/6062","id":"6062","name":"/managed/visibility/all","categorization":{"name":"all","description":"All Groups","category":{"name":"visibility","description":"Visibility"},"display_name":"Visibility: All Groups"}}
Halász Dávid
@skateman
@ThomasBuchinger nope, this would be too easy
I want it through the categories
Eugene Zapolsky
@izapolsk
Hi everybody. remote appliance templates don't have ems_id set in global region appliance. could you please advice what property should I use to get some particular provider's template ?
Eugene Zapolsky
@izapolsk
@all ^^
Jason Frey
@Fryguy
@agrare ?
I can't understand how that wouldn't be replicated
Adam Grare
@agrare
Are they archived? Do they have an ems Id in the remote regions
Gregg Tanzillo
@gtanzillo
@izapolsk The replicated templates should be identical between the lower region and the global
Eugene Zapolsky
@izapolsk
@agrare, sure thing, they have.
@gtanzillo, I'll submit BZ then. thank you