* John Dennis <jdennis(a)redhat.com> [Feb 21. 2013 20:12]:
I've been looking at the Konkret doc and the various OpenLMI
providers and there seems to be an an inherent assumption that
enumerateInstances will be called exactly once.
Huh ?
There are no checks
to see if an instance already exists during the enumeration. I went
to the CMPI spec for a clarification, except it had nothing to say
about this (at least as far I could find).
Well, CMPI only describes the API between the CIMOM and the provider.
The CIM and WBEM standards from
dmtf.org should be consulted here.
My naive assumption for a function with the verb Enumerate in it's
name followed by the noun Instance says you're suppose to return a
list of existing Instances, not create them.
Yes, in principle.
Sometimes its practicable to actually create instances in order to get
their properties and names right. [1]
Also you might be asked
to enumerate those same Instances more than once (i.e. give me a
list of what you've got).
Absolutely. EnumerateInstances should be idempotent.
But it seems like the actual semantics are "create your initial set
of default instances and tell me what they are" Hence it has more to
do with creation than enumeration. Is this correct or do I have a
misunderstanding? Is this actually spelled out someplace? If so can
you point me at that doc?
This is a misunderstanding. However some providers will actually
create instances on the initial call to enumerateInstances for
practical purposes as outlined above.
Hth,
Klaus
[1]
http://martinfowler.com/bliki/TwoHardThings.html
--
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG
Nürnberg)
Maxfeldstraße 5, 90409 Nürnberg, Germany