if operation == 'add':
        drive_spec.operation = vim.vm.device.VirtualDeviceSpec.Operation.add
    elif operation == 'edit':
        drive_spec.operation = vim.vm.device.VirtualDeviceSpec.Operation.edit