def get_ip_from_vm(self, vm=None, vm_name=None, slice_name=None, project=None):
                if not vm: 
                        vms = VirtualMachine.objects.filter(name=vm_name, sliceName=slice_name, projectName=project)
                        for vm in vms:
                                
                                if vm.name == vm_name:
                                        break;
                        return "None" 
                ifaces = vm.getNetworkInterfaces()
                for iface in ifaces:
                        if iface.isMgmt:
                            return iface.ip4s.all()[0].ip #IP
                return "None"
dataset/ETHPy150Open fp7-ofelia/ocf/vt_manager/src/python/vt_manager/communication/sfa/drivers/VTShell.py/VTShell.get_ip_from_vm/original