
Dan Smith wrote:
HE> A CIMOM does not have the possibility to return different return HE> codes, meaning the error for Xen_ComputerSystem and the instances HE> for KVM_ComputerSystem. In the case where one request returned HE> with an error, this one is reported back to the client and all HE> returned instances are revoked.
Ah, okay. It seems a little weird to solve this by not returning failure if you try to enumerate a class that can't possibly exist on a particular system. That's how the providers also behave with the lv_connect() approach. However, I'm not sure there is any reasonable way around this.
The question a client is asking is - are there instances of Xen_ComputerSystems on this machine. If there are none, than a result of 0 instances is valid. If the client is interested in the question "why there are none", then he has to ask the VirtualSystemManagementService, if Xen is running or not. If Xen is not running on this machine, then also here no instance for Xen is returned. Then the client knows, that Xen is not available on this machine and all requests against Xen classes will return 0 instances. If VirtualSystemManagementService returns an instance for Xen, then the client knows, that currently no Xen_ComputerSystems are defined, but he can work on this machine to create one/some Xen instances. So the question for a provider is - are there instances of the class I'm responsible for or not ? This one is answered with yes (returning instances) or no (returning no instances). The reason why there are no instances, is resolved by the client itself with the evaluation of the model for existing and non-existing instances. This means for the provider programmer that he has to tolerate a - at a first view - light-weight error reporting. To answer your question - no, there is no reasonable way around this ;). Its the clients responsibility to traverse and interpret the model and instances. -- Regards Heidi Eckhart Software Engineer Linux Technology Center - Open Hypervisor heidieck@linux.vnet.ibm.com ************************************************** IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Herbert Kircher Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294