We have 2 get_ip methods, one is old, rusty HostAPI::get_ip(), which we don't want to support and one fresh, shiny, new InterfaceAPI::get_ip() method, which is in fact just renamed InterfaceAPI::get_ip_addr(). This deprecation warning will be shown in both HostAPI::get_ip(), since the issue #144 was filed on removing this method, and in InterfaceAPI::get_ip_addr(), since that is only alias for InterfaceAPI::get_ip() method.

2015-08-24 20:36 GMT+02:00 Jan Tluka <jtluka@redhat.com>:
I think you want to the deprecation warning to get_ip_addr() and not to
the fresh and shiny new get_ip(), correct?

Mon, Aug 24, 2015 at 04:28:31PM CEST, jprochaz@redhat.com wrote:
>Signed-off-by: Jiri Prochazka <jprochaz@redhat.com>
>---
> lnst/Controller/Task.py | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py
>index 4d0908d..2b89d6e 100644
>--- a/lnst/Controller/Task.py
>+++ b/lnst/Controller/Task.py
>@@ -12,6 +12,7 @@ rpazdera@redhat.com (Radek Pazdera)
>
> import hashlib
> import re
>+import logging
> from lnst.Controller.PerfRepo import PerfRepoRESTAPI
> from lnst.Controller.PerfRepo import PerfRepoTestExecution
> from lnst.Controller.PerfRepo import PerfRepoValue
>@@ -285,7 +286,10 @@ class HostAPI(object):
>         iface = self._interfaces[interface_id]
>         return iface.get_hwaddr()
>
>+    # deprecated
>     def get_ip(self, interface_id, addr_number=0):
>+        logging.warning("Deprecated HostAPI method get_ip is used in Python "\
>+                        "task, please, use InterfaceAPI method get_ip instead.")
>         """
>             Returns an IP address of the interface.
>
>--
>2.4.3
>
>_______________________________________________
>LNST-developers mailing list
>LNST-developers@lists.fedorahosted.org
>https://lists.fedorahosted.org/mailman/listinfo/lnst-developers