Closed fatmcgav closed 8 years ago
Mmm, that means that the json that you get from foreman has a duplicated definition on it (that's a bug in foreman itself usually), you can also send a pull request with the 1.9 definitions (check ~/.python-foreman dir).
It should not be failing anyhow, just showing the warning (you can turn it off tweaking the logging level from python logging mod).
If you send the pull, I'll take a look see if it's really a foreman issue or it's the lib that's not parsing the definitions correctly
@david-caro Hmm, ok...
I've created a gist here: https://gist.github.com/fatmcgav/018a26acdf0aeb99b655 which shows the test script, script output and foreman production.log.
Any pointers appreciated...
Edit: Have just added the 1.9.2-v2.json file to the gist pulled from ~/.python-foreman directory :)
Cheers Gav
Apologies, looks like my Python fu isn't up to scratch atm...
It looks like it is indeed working, I just needed to assign f.index_hosts()
to a variable and print that variable out...
However worth exploring the API error I guess :)
okok, opened the bug in foreman, seems simple enough (and they are very responsive) so it will be fixed soon :), thanks a lot for your help!
When attempting to use against a Foreman 1.9 installation, I'm getting the following error when trying to use
f.index_hosts()
.I'm guessing it's due to there being no definitions in foreman/definitions for Foreman versions > 1.7.2...
If they're easily obtainable then I'll grab them and add them in?
Cheers Gav