Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Nov 08 22:05

    Fryguy on master

    Optionally symlink spec/managei… Merge pull request #84 from agr… (compare)

  • Nov 08 22:05
    Fryguy closed #84
  • Nov 08 22:05
    Fryguy labeled #84
  • Nov 08 22:05
    Fryguy milestoned #84
  • Nov 08 22:05
    Fryguy assigned #84
  • Nov 08 13:51
    miq-bot commented #84
  • Nov 08 13:50
    agrare synchronize #84
  • Nov 08 13:39
    agrare edited #84
  • Nov 08 13:37
  • Nov 08 13:28
    agrare opened #84
  • Nov 06 17:47
    simaishi assigned #83
  • Nov 06 17:47
    simaishi milestoned #83
  • Nov 06 17:47
    simaishi labeled #83
  • Nov 06 17:47

    simaishi on ivanchuk

    Test ruby 2.5.5, see: https://g… Merge pull request #83 from d-m… (compare)

  • Nov 06 17:47
    simaishi closed #83
  • Nov 06 16:54
    miq-bot commented #83
  • Nov 06 16:43
    miq-bot edited #83
  • Nov 06 16:42
    d-m-u opened #83
  • Oct 30 15:46
  • Oct 25 17:33
    lpichler milestoned #81
JVue
@JVue
the set_current_group doesn’t appear to have this limitation tho
(the intent was to be able to change the user group regardless of which group is currently selected for them)
Joe VLcek
@jvlcek
@JVue I will investigate
JVue
@JVue
awesome.. thanks @jvlcek
Alberto Bellotti
@abellotti
@himdel re: doc, nothing fancy or automated unfortunately. Manual process of going through PRs in a release and creating one monster PR in docs.
Joe VLcek
@jvlcek
@JVue set_current_group can only be used to set the current group to a group the user already belongs to and set_current_group can only be used by the authenticated user
So you can not use admin to set_current_group for my_happy_user_42
And my_happy_user_42 needs to already belong the group being set at the current group.
JVue
@JVue
yep… got all that.
Joe VLcek
@jvlcek
But href, id and description can each be used to specify the current group for both edit and set_current_group
I put together 6 examples
JVue
@JVue
ok
I hope those help.
JVue
@JVue
yeah - basically we’re having users hit a gateway api that reaches out to miq’s api to do certain functions (using their creds/auth_token)… however this breaks (permission issue) when their current selected group is not set to the proper one. the work around is for them to manually login to miq’s portal and change their current group there, then go back to the api… which isn’t ideal. Hence getting this api to change current group would help tremendously.
i think i have most things working with the resolution earlier… I’ll go thru your examples above as well.
Thanks @jvlcek . much appreciated!!
Joe VLcek
@jvlcek
@JVue If the user’s Groups list contains the group the want to use the API should be usable to set_current_group to the one the user wants.
JVue
@JVue
^yes, all users already have a list of groups that they go between… so the change would just be within those set groups.
Alexander Braverman Masis
@abraverm
tlv
Miha Pleško
@miha-plesko
hi, is it possible to have REST API return additional fields on model's GET?
like GET /api/something/:id currently returns all models attributes, but I want to render additional one
Martin Hradil
@himdel
@miha-plesko ?expand=resources
(you can also add ?expand=resources,foobar if there's a foobar child)
Miha Pleško
@miha-plesko
@himdel I'm implementing a new API call, not invoking existing one
Martin Hradil
@himdel
there's also ?attributes=foo,bar
ok, then no, I think the endpoint should only return the model, and any extra fields need to come from users adding ?attributes=foo,bar to explicitly add the results of foo and bar virtual attributes
(as far as consistency goes at least)
Miha Pleško
@miha-plesko
okay, then I'll add subcollection to it to make it accessible through ?resources, thanks :thumbsup:
Martin Hradil
@himdel
:+1:
Miha Pleško
@miha-plesko
well @himdel but that doesn't work for has_one relation, does it? Because subcollection is designed for has_many
I'm trying to get userid and endpoint url from my model which has one foreign key to Authentication and another to Endpoint https://github.com/ManageIQ/manageiq/blob/master/app/models/firmware_registry.rb#L5-L6
Martin Hradil
@himdel
@miha-plesko it does...
/api/custom_buttons/2?attributes=resource_action does include resource_action
which is
app/models/custom_button.rb
2:  has_one :resource_action, :as => :resource, :dependent => :destroy, :autosave => true
Miha Pleško
@miha-plesko
aah, I was calling it with wrong, thank you
Martin Hradil
@himdel
np :)
ThomasBuchinger
@ThomasBuchinger
Hello, I am trying to implement the new create_automate_from_git endpoint (ManageIQ/manageiq-api#571). But my domains are created as disabled. I guess it is because enabled: false is the default in MiqAeDomain. Any hints? (btw. my code is over here: https://github.com/ThomasBuchinger/miq-flow/blob/feature/api-provider/lib/miq_flow/pluggable/provider_api.rb#L20)
Joe VLcek
@jvlcek
@ThomasBuchinger I’ll take a look.
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