Closed avi3tal closed 9 years ago
It also appears in operatingsystem.index and maybe more objects
I can take a look at it could you please send me your 1.7.x.json file ?
sent by email
I was able to reproduce your problem. let me try to solve it.
Found another problematic object: hostgroups.indext() required mandatory puppetclass_id
I tracked it down and discover root cause, also it occurs on older versions of foreman as well (different resource objects). I am working on fix of this issue, and also on tests to avoid regression in future.
@avi3tal I am almost done, I am testing my changes across foreman versions. And I noticed diff between api.json you sent me and the one I downloaded from theforeman.org. some of them are related to compute resources, some of them related to LDAP, and so on which are ok ... but I can find this sample:
"config_templates": {
"api_url": "/api",
"doc_url": "../apidoc/v2/config_templates",
"formats": null,
"full_description": null,
"metadata": null,
"methods": [
{
"apis": [
{
"api_url": "/api/config_templates",
"deprecated": null,
"http_method": "GET",
"short_description": "List provisioning templates"
},
{
"api_url": "/api/operatingsystem/:operatingsystem_id/config_templates",
"deprecated": null,
"http_method": "GET",
"short_description": "List provisioning templates per operating system"
},
which leads to failures ...
where '"api_url": "/api/operatingsystem/:operatingsystem_id/config_templates",' is not valid to me ... there should be "/api/operatingsystems/" instead of "/api/operatingsystem/" .
what do you think about it ? could it be related to some changes you made on your instance ? or bug in foreman ?
Hi Lukas, Thanks for the commitment, I really appreciate it. I haven't done any changes in my environment except upgrading from 1.5 to 1.7.2
Seams like a bug in foreman. Can you reproduce it in your environment? On Mar 1, 2015 5:47 PM, "Lukas Bednar" notifications@github.com wrote:
@avi3tal https://github.com/avi3tal I am almost done, I am testing my changes across foreman versions. And I noticed diff between api.json you sent me and the one I downloaded from theforeman.org. some of them are related to compute resources, some of them related to LDAP, and so on which are ok ... but I can find this sample:
"config_templates": { "api_url": "/api", "doc_url": "../apidoc/v2/config_templates", "formats": null, "full_description": null, "metadata": null, "methods": [ { "apis": [ { "api_url": "/api/config_templates", "deprecated": null, "http_method": "GET", "short_description": "List provisioning templates" }, { "api_url": "/api/operatingsystem/:operatingsystem_id/config_templates", "deprecated": null, "http_method": "GET", "short_description": "List provisioning templates per operating system" },
which leads to failures ...
where '"api_url": "/api/operatingsystem/:operatingsystem_id/config_templates",' is not valid to me ... there should be "/api/operatingsystems/" instead of "/api/operatingsystem/" .
what do you think about it ? could it be related to some changes you made on your instance ? or bug in foreman ?
— Reply to this email directly or view it on GitHub https://github.com/david-caro/python-foreman/issues/26#issuecomment-76602812 .
Actually I don't have running instance of 1.7.2 foreman. so I can not reproduce it. Anyway, I sent pull request https://github.com/david-caro/python-foreman/pull/31 you can try to use it. Please let me know whether it solved your problem.
I'll take a look and update you, Thanks On Mar 3, 2015 10:40 AM, "Lukas Bednar" notifications@github.com wrote:
Actually I don't have running instance of 1.7.2 foreman. so I can not reproduce it. Anyway, I sent pull request #31 https://github.com/david-caro/python-foreman/pull/31 you can try to use it. Please let me know whether it solved your problem.
— Reply to this email directly or view it on GitHub https://github.com/david-caro/python-foreman/issues/26#issuecomment-76906577 .
This should be fixed on #37
Hi, I am using python-foreman version 0.2.2 against Foreman 1.7.2-v2.json
Default environments.index() is mapped to index_puppetclasses instead to /environments/ and actually makes it impossible to list all environments.
See attached bpython output.