def create_vnic_spec(device):
        """
        create device spec for existing device and the mode of edit for the vcenter to update
        :param device:
        :rtype: device spec
        """
        nic_spec = vim.vm.device.VirtualDeviceSpec()
        nic_spec.operation = vim.vm.device.VirtualDeviceSpec.Operation.edit
        nic_spec.device = device
        return nic_spec
def create_vnic_spec ( device ) : nic_spec = vim . vm . device . VirtualDeviceSpec ( ) nic_spec . operation = vim . vm . device . VirtualDeviceSpec . Operation . edit nic_spec . device = device return nic_spec
create device spec for existing device and the mode of edit for the vcenter to update
        :param device:
        :rtype: device spec