You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So here are 2 methods of foreman.client.Foreman(), that work incorrect for me: update_hosts hosts.update
It take 2 arguments: host and id. So I'm trying to invoke any of those methods from my code with these 2 args: self.foreman_client.hosts.update(host=host_update_dict, id=1)
And here is the result from the first call:
(server side log)
2017-06-16T00:53:31 [app] [I] Started PUT "/api/hosts/1" for <foreman_ip> at 2017-06-16 00:53:31 +0000
2017-06-16T00:53:31 [app] [I] Processing by Api::V2::HostsController#update as JSON
2017-06-16T00:53:31 [app] [I] Parameters: {"apiv"=>"v2", "id"=>"1", :host=>{}}
The host argument was sent empty for some reason.
And if I add the same LOC right after the first one, it works:
2017-06-16T00:55:25 [app] [I] Started PUT "/api/hosts/1" for <foreman_ip> at 2017-06-16 00:55:25 +0000
2017-06-16T00:55:25 [app] [I] Processing by Api::V2::HostsController#update as JSON
2017-06-16T00:55:25 [app] [I] Parameters: {"apiv"=>"v2", "id"=>"1", :host=>{}}
....................
2017-06-16T00:55:26 [app] [I] Started PUT "/api/hosts/1" for <foreman_ip> at 2017-06-16 00:55:26 +0000
2017-06-16T00:55:26 [app] [I] Processing by Api::V2::HostsController#update as JSON
2017-06-16T00:55:26 [app] [I] Parameters: {"host"=>{"host_parameters_attributes"=>[{"id"=>1, "value"=>"[FILTERED]", "name"=>"option"}]}, "id"=>"1", "apiv"=>"v2"}
And every next the same request will work as well.
Foreman version: 1.14.3
python-foreman: 0.4.19
So in this case, am I doing something wrong or is it a bug?
The text was updated successfully, but these errors were encountered:
That's very interesting... I'll have to take a look. Can you share the code where you use it? even if it's 'anonymized'? That will help troubleshooting :)
So here are 2 methods of
foreman.client.Foreman()
, that work incorrect for me:update_hosts
hosts.update
It take 2 arguments:
host
andid
. So I'm trying to invoke any of those methods from my code with these 2 args:self.foreman_client.hosts.update(host=host_update_dict, id=1)
And here is the result from the first call:
(server side log)
The
host
argument was sent empty for some reason.And if I add the same LOC right after the first one, it works:
(my code)
self.foreman_client.hosts.update(host=host_update_dict, id=1)
self.foreman_client.hosts.update(host=host_update_dict, id=1)
(server side log)
And every next the same request will work as well.
Foreman version:
1.14.3
python-foreman:
0.4.19
So in this case, am I doing something wrong or is it a bug?
The text was updated successfully, but these errors were encountered: