Problem to instantiate host on oVirt with REST API

When I try to instantiate an host to oVirt with Foreman API I pass the
correct compute_resource_id and details for network and volumes variables.
But when I try to POST it Foreman give me this error:

"Unable to save": "Failed to create a compute xxx (oVirt) instance
host_prova.xxx: User is not authorized to perform this action…".

But the user in oVirt creates the host normally, so I tried to create the
host with Foreman GUI but I obtain the same error.
Do you know How can I solve this problem?

Thanks in advance for your support

In addition to what I said inform you that POST method return me 422 http
status.

··· Il giorno giovedì 23 maggio 2013 12:21:07 UTC+2, Euclideo ha scritto: > > When I try to instantiate an host to oVirt with Foreman API I pass the > correct compute_resource_id and details for network and volumes variables. > But when I try to POST it Foreman give me this error: > > "Unable to save": "Failed to create a compute xxx (oVirt) instance > host_prova.xxx: User is not authorized to perform this action...". > > But the user in oVirt creates the host normally, so I tried to create the > host with Foreman GUI but I obtain the same error. > Do you know How can I solve this problem? > > Thanks in advance for your support >

> In addition to what I said inform you that POST method return me 422 http
> status.
>
>
>> When I try to instantiate an host to oVirt with Foreman API I pass the
>> correct compute_resource_id and details for network and volumes variables.
>> But when I try to POST it Foreman give me this error:
>>
>> "Unable to save": "Failed to create a compute xxx (oVirt) instance
>> host_prova.xxx: User is not authorized to perform this action…".
>>
>> But the user in oVirt creates the host normally, so I tried to create the
>> host with Foreman GUI but I obtain the same error.
>> Do you know How can I solve this problem?
>>
>> Thanks in advance for your support
>>
>
which foreman version? did you use /api/hosts or /hosts?

Ohad

··· On Thu, May 23, 2013 at 4:42 PM, Euclideo wrote: > Il giorno giovedì 23 maggio 2013 12:21:07 UTC+2, Euclideo ha scritto:


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks for you response. I use http://foreman.xxx/hosts. Now I don't see
Foreman versione for some problem in the infrastructure area but I think it
is 1.0.1.

··· Il giorno giovedì 23 maggio 2013 15:53:36 UTC+2, ohad ha scritto: > > > > On Thu, May 23, 2013 at 4:42 PM, Euclideo <ivanosi...@gmail.com > > wrote: > >> In addition to what I said inform you that POST method return me 422 >> http status. >> >> Il giorno giovedì 23 maggio 2013 12:21:07 UTC+2, Euclideo ha scritto: >> >>> When I try to instantiate an host to oVirt with Foreman API I pass the >>> correct compute_resource_id and details for network and volumes variables. >>> But when I try to POST it Foreman give me this error: >>> >>> "Unable to save": "Failed to create a compute xxx (oVirt) instance >>> host_prova.xxx: User is not authorized to perform this action...". >>> >>> But the user in oVirt creates the host normally, so I tried to create >>> the host with Foreman GUI but I obtain the same error. >>> Do you know How can I solve this problem? >>> >>> Thanks in advance for your support >>> >> > which foreman version? did you use /api/hosts or /hosts? > > Ohad > >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > >

Please. Do you know why I have this problem

··· Il giorno giovedì 23 maggio 2013 17:37:12 UTC+2, Euclideo ha scritto: > > Thanks for you response. I use http://foreman.xxx/hosts. Now I don't see > Foreman versione for some problem in the infrastructure area but I think it > is 1.0.1. > > Il giorno giovedì 23 maggio 2013 15:53:36 UTC+2, ohad ha scritto: >> >> >> >> On Thu, May 23, 2013 at 4:42 PM, Euclideo wrote: >> >>> In addition to what I said inform you that POST method return me 422 >>> http status. >>> >>> Il giorno giovedì 23 maggio 2013 12:21:07 UTC+2, Euclideo ha scritto: >>> >>>> When I try to instantiate an host to oVirt with Foreman API I pass the >>>> correct compute_resource_id and details for network and volumes variables. >>>> But when I try to POST it Foreman give me this error: >>>> >>>> "Unable to save": "Failed to create a compute xxx (oVirt) instance >>>> host_prova.xxx: User is not authorized to perform this action...". >>>> >>>> But the user in oVirt creates the host normally, so I tried to create >>>> the host with Foreman GUI but I obtain the same error. >>>> Do you know How can I solve this problem? >>>> >>>> Thanks in advance for your support >>>> >>> >> which foreman version? did you use /api/hosts or /hosts? >> >> Ohad >> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Foreman users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to foreman-user...@googlegroups.com. >>> To post to this group, send email to forema...@googlegroups.com. >>> Visit this group at http://groups.google.com/group/foreman-users?hl=en. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >>

I warn you that I solved my problem. Anyway I have an important question
for you. If my user has admin credential in ovirt it can create an host
with simplicity, but if I use an user with less privileges it has some
problems to instantiate an host with Foreman on Ovirt in spite this user
can create a vm in Ovirt without problems. I have noticed that in Ovirt api
to create an host with this kind of user, we need to set an important flag
on true. So my question is: do Foreman use this flag or not? If it is,
Foreman can instantiate vm with Ovirt only with admin credential in Ovirt.

··· Il giorno giovedì 23 maggio 2013 15:53:36 UTC+2, ohad ha scritto: > > > > On Thu, May 23, 2013 at 4:42 PM, Euclideo <ivanosi...@gmail.com > > wrote: > >> In addition to what I said inform you that POST method return me 422 >> http status. >> >> Il giorno giovedì 23 maggio 2013 12:21:07 UTC+2, Euclideo ha scritto: >> >>> When I try to instantiate an host to oVirt with Foreman API I pass the >>> correct compute_resource_id and details for network and volumes variables. >>> But when I try to POST it Foreman give me this error: >>> >>> "Unable to save": "Failed to create a compute xxx (oVirt) instance >>> host_prova.xxx: User is not authorized to perform this action...". >>> >>> But the user in oVirt creates the host normally, so I tried to create >>> the host with Foreman GUI but I obtain the same error. >>> Do you know How can I solve this problem? >>> >>> Thanks in advance for your support >>> >> > which foreman version? did you use /api/hosts or /hosts? > > Ohad > >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-user...@googlegroups.com . >> To post to this group, send email to forema...@googlegroups.com >> . >> Visit this group at http://groups.google.com/group/foreman-users?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > >