def vnic_add_to_vm_task(nicspec, virtual_machine, logger):
        """
        Add new vNIC to VM
        :param nicspec: <vim.vm.device.VirtualDeviceSpec>
        :param virtual_machine:
        :param logger:
        :return:
        """
        if issubclass(type(nicspec), vim.vm.device.VirtualDeviceSpec):
            nicspec.operation = vim.vm.device.VirtualDeviceSpec.Operation.add
            VNicService.vnic_set_connectivity_status(nicspec, True)
            logger.debug(u"Attaching new vNIC '{}' to VM '{}'...".format(nicspec, virtual_machine))
            task = pyVmomiService.vm_reconfig_task(virtual_machine, [nicspec])
            return task
        else:
            logger.warn(u"Cannot attach new vNIC '{}' to VM '{}'".format(nicspec, virtual_machine))
            return None
Add new vNIC to VM
        :param nicspec: <vim.vm.device.VirtualDeviceSpec>
        :param virtual_machine:
        :param logger:
        :return: