Hello, I'm not familiar with the python-foreman but the Warning just says that the API version you are going to use is v1. However the code should still work as it is just a warning. Are there any other errors? You can switch to version 2 (which is the current default and recommended) using api_version parameter [1]
[1] https://github.com/david-caro/python-foreman/blob/master/foreman/client.py#L554 Martin On Fri, Aug 26, 2016 at 6:56 PM, junaid ali <[email protected]> wrote: > Can some one please tell me how to access foreman using python api > > i just have installed python 3.4 on my system which compatible with > foreman python api > https://pypi.python.org/pypi/python-foreman this one > > and using below code which is defined on > http://pythonhosted.org/python-foreman/basic.html > > >>> from getpass import getpass>>> from foreman.client import Foreman>>> f = > >>> Foreman('http://myforeman.server:3000', ('myuser', getpass())) > > but each time i run my script gave me this error > WARNING:root:Api v1 will not be the default in the next version, if you still > want to use it, change the call to explicitly ask for it. Though we recommend > using the new and improved version 2 > > and This code not works > Your help will be very appreciated > > > thanks > > -- > You received this message because you are subscribed to the Google Groups > "foreman-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "foreman-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
