[Libvirt-cim] [PATCH 3 of 6] Add Disk support to SettingsDefineCapabilities. Still lacks a bit of polish (i.e. lack of warning when minimum or default is higher than maximum), but is functional

Dan Smith danms at us.ibm.com
Fri Nov 9 15:34:38 UTC 2007


JG> The way I see it, if I only use a number once, having it as a
JG> define doesn't get me very far, because the define really just
JG> creates a level of "indirection" for whomever decides the value
JG> needs to be changed.  As soon as the number is used twice, you of
JG> course need a define so that nobody has to root out all instances
JG> of the value, but for one-time-use-only values I don't generally
JG> bother with defines.

Well, even if something is only used once, it makes it easier to
change something into a configure option if it already has that layer
of indirection in place.  It also means that someone can easily open
the file, see that the limits are all defined at the top, and not
bother to understand the rest of the function pointer indirection
(which would be harder to follow without context than the #defines
anyway).

The only things that I think make sense to leave buried are things
like increment for NICs, since it's very clear that adding one NIC
will always be the desired granularity, which can't be said for disk
or memory, IMHO.

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20071109/c329e6b7/attachment.sig>


More information about the Libvirt-cim mailing list