Re: [PATCH v3 06/18] conf: Rename API's in storage_adapter_conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[...]

>>>>  int
>>>> -virStoragePoolSourceAdapterParseValidate(virStoragePoolDefPtr ret)
>>>> +virStorageAdapterParseValidate(virStoragePoolDefPtr ret)
>>>
>>> This function should take a virStoragePoolSourceAdapterPtr rather than virStoragePoolDefPtr, and the name should just be "virStorageAdapterValidate(), since the parsing is already finished, and this function just validates.
>>>
>> I'd prefer to use virStorageAdapterValidateParse() - as that what it's
>> doing validating that the parse was correct.  So is this is a case where
>> a verb can turn into an adverb?  (it's a grammar question!)
> 
> Yeah, that name makes sense once you explain it. Maybe. Is it really validating that the parse was done correctly? Or is it just validating that the data in the object meets various criteria? Seems like it's the latter. Would you really want to validate the object any differently if it had just been parsed from XML vs. if the object was generated in some other manner? (e.g. some chunk of C code that created the object and filled in attributes programmatically)
> 

Fair enough - I'll just change to Validate, but while working through
merge conflicts in my branch I ran into virDomainDiskDefParseValidate
It's a change that wasn't sent with this series, but I think I know now
where I got the name originally.

John


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux