def map_vnics(vm):
        """
        maps the vnic on the vm by name
        :param vm: virtual machine
        :return: dictionary: {'vnic_name': vnic}
        """
        return {device.deviceInfo.label: device
                for device in vm.config.hardware.device
                if isinstance(device, vim.vm.device.VirtualEthernetCard)}