[Libvirt-cim] [PATCH] [RFC] Enhance handling of association's references
Heidi Eckhart
heidieck at linux.vnet.ibm.com
Tue Nov 27 10:27:21 UTC 2007
Dan Smith wrote:
> HE> return NULL;
> HE> }
> HE> @@ -144,9 +165,6 @@ static CMPIStatus do_assoc(struct std_as
> HE> handler = std_assoc_get_handler(ctx, ref);
> HE> if (handler == NULL) {
> HE> CU_DEBUG("No handler found.");
> HE> - cu_statusf(ctx->brkr, &s,
> HE> - CMPI_RC_ERR_FAILED,
> HE> - "Unable to handle this association");
> HE> goto out;
> HE> }
>
> HE> @@ -243,9 +261,7 @@ static CMPIStatus do_ref(struct std_asso
>
> HE> handler = std_assoc_get_handler(ctx, ref);
> HE> if (handler == NULL) {
> HE> - cu_statusf(ctx->brkr, &s,
> HE> - CMPI_RC_ERR_FAILED,
> HE> - "Unable to handle this association");
> HE> + CU_DEBUG("No handler found.");
> HE> goto out;
> HE> }
>
> Why should we not return error in these cases now? Currently, these
> signal the case of someone trying to do something like:
>
> wbemcli ain -ac Xen_SystemDevice http://...:Xen_MemoryPool
>
> (i.e. resolving a particular association with an invalid reference)
Because this is only a request the provider is not responsible for, but
not an error case. There exists the possibility that another provider is
called by the same request and this on is responsible for this request,
returning valid instances that are revoked, because our provider only
wants to tell "I'm not responsible for this request". The behavior of an
association provider in the case he figures out that he is not
responsible for a certain request is to be "silent". On the other hand -
avoiding such invalid requests is the responsibility of the client.
--
Regards
Heidi Eckhart
Software Engineer
Linux Technology Center - Open Hypervisor
heidieck at 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
More information about the Libvirt-cim
mailing list