david-caro / python-foreman

Small low level python wrapper around Foreman API
GNU General Public License v2.0
58 stars 37 forks source link

Added the timeout parameter and set_timeout method #24

Closed david-caro closed 9 years ago

david-caro commented 9 years ago

That will let you specify a custom timeout parameter (default 60 seconds) to pass to the underlying requests module.

Fixes issue #16

fpytloun commented 9 years ago

Don't know if it's a good idea to set timeout by default for all requests globally. Foreman request on instance deploy usualy waits for instance to come up and it could take much longer than 1 minute. And it seems it's not possible to make it longer for only one request (for create_hosts). So backward-compatible approach would be adding new option but keeping it disabled at the moment.