[ovirt-users] Re: AffinityGroup API

2018-11-28 Thread Schreuders, Cliffe
Thank you! This has solved the issue. Just to note that we make use of the oVirt API extensively, and until now having filter=true hasn't stopped us from managing snapshots, nics, disks, starting/stoping VMs, getting consoles, etc, etc, so it does seem to be somewhat inconsistent behaviour. Perhap

[ovirt-users] Re: AffinityGroup API

2018-11-28 Thread Schreuders, Cliffe
Hi Ondra, Thanks. Here is a sample script that illustrates the problem. The same error occurs when adding a VM to an existing affinity group. Sample code: require 'ovirtsdk4' conn_attr = {} conn_attr[:url] = 'https:///ovirt-engine/api' conn_attr[:username] = '' conn_attr[:password] = 'X

[ovirt-users] Re: AffinityGroup API

2018-11-27 Thread Staniforth, Paul
The user also has AffinityGroupManager role for the cluster this role has permission Manipulate Affinity Groups. It is the same account that works when using the python SDK 2018-11-27 11:36:50,791Z INFO [org.ovirt.engine.core.bll.aaa.CreateUserSessionCommand] (default task-5237) [b225cdb] Run

[ovirt-users] Re: AffinityGroup API

2018-11-27 Thread Ondra Machacek
So both of the user's roles are administrative, so please try to remove following line in your script: > conn_attr[:headers] = {'Filter' => true } This should be used only with roles which are not administrative, like UserVmManager, etc. On 11/27/18 1:21 PM, Staniforth, Paul wrote: The user a

[ovirt-users] Re: AffinityGroup API

2018-11-27 Thread Ondra Machacek
Can you please share the script? And also what's the permission of the user you are executing the script. When see error 'User is not authorized to perform the action', we print in engine.log, what's exactly wrong meaning we print what permissions the user is missing in order to execute that acti

[ovirt-users] Re: AffinityGroup API

2018-11-26 Thread Staniforth, Paul
Hi Andrej I believe they are using 4.2.5 they get a permission error although they can use the python SDK with the same account. Paul S. From: Ondra Machacek Sent: 26 November 2018 11:41 To: Staniforth, Paul Cc: Andrej Krejcir; users Subject: Re: [ovirt-

[ovirt-users] Re: AffinityGroup API

2018-11-26 Thread Ondra Machacek
What version of the SDK do you use? I can see it's supported in latest version. On 11/26/18 11:13 AM, Andrej Krejcir wrote: Hi, I don't know much about ruby SDK. I think the SDKs for various languages are generated from the API specification. Ondra, is this a bug in ruby SDK? Andrej On Fri,

[ovirt-users] Re: AffinityGroup API

2018-11-26 Thread Andrej Krejcir
Hi, I don't know much about ruby SDK. I think the SDKs for various languages are generated from the API specification. Ondra, is this a bug in ruby SDK? Andrej On Fri, 23 Nov 2018 at 18:06, Staniforth, Paul < p.stanifo...@leedsbeckett.ac.uk> wrote: > Hello Andrej, > > Als

[ovirt-users] Re: AffinityGroup API

2018-11-24 Thread Staniforth, Paul
Hello Andrej, Also the Affinity Groups apparently aren't available in the Ruby SDK should I add this to the bug report? Thanks, Paul S. From: Andrej Krejcir Sent: 21 November 2018 13:32 To: Staniforth, Paul Cc: users Subject

[ovirt-users] Re: AffinityGroup API

2018-11-21 Thread Staniforth, Paul
Thanks Andrej I've opened a bug Regards, Paul S. From: Andrej Krejcir Sent: 21 November 2018 13:32 To: Staniforth, Paul Cc: users Subject: Re: [ovirt-users] AffinityGroup API Hi, Yes, the AffinityGroupHosts is missing. Can you please open a b

[ovirt-users] Re: AffinityGroup API

2018-11-21 Thread Andrej Krejcir
Hi, Yes, the AffinityGroupHosts is missing. Can you please open a bug[1] so we can add it? As a workaround, the hosts can be modified by PUT request to the AffinityGroup endpoint directly, for example: PUT /ovirt-engine/api/clusters/1234/affinitygroups/5678 However