'Get the IPDevice from system which has ip configured.
@param ip: look for the device holding this ip. If this is None,
None is returned.
@type ip: str.'

def get_device_by_ip(self, ip):

    if (not ip):
        return None
    addr = IpAddrCommand(self)
    devices = addr.get_devices_with_ip(to=ip)
    if devices:
        return IPDevice(devices[0]['name'], namespace=self.namespace)
