Extra param in the provider query gives output.

Hi, I am able to get valid output when I query the providers with the fields other than the key fields. For ex: wbemcli ai -ac Xen_SettingsDefineState 'http://root:P@localhost:5988/root/virt:Xen_Processor.CreationClassName="Xen_Processor",SystemName="Domain-0",DeviceID="Domain-0/0",SystemCreationClassName="Xen_ComputerSystem",*virtinvalid="Xen"*' localhost:5988/root/virt:Xen_ProcResourceAllocationSettingData.InstanceID="Domain-0/proc" -Caption -Description -InstanceID="Domain-0/proc" -ElementName -ConfigurationName -ChangeableType -ResourceType=3 -OtherResourceType -ResourceSubType -PoolID -ConsumerVisibility -HostResource -AllocationUnits -VirtualQuantity=16 -Reservation -Limit=0 -Weight=0 -AutomaticAllocation -AutomaticDeallocation -Parent -Connection -Address -MappingBehavior In the above query I supplied invalid parameter *virtinvalid="Xen" *which is not part of the key fields for querying the provider. I think we should be checking our providers to take only the required key fields. Thanks and Regards, Deepti.

Deepti B Kalakeri wrote:
Hi,
I am able to get valid output when I query the providers with the fields other than the key fields.
For ex: wbemcli ai -ac Xen_SettingsDefineState 'http://root:P@localhost:5988/root/virt:Xen_Processor.CreationClassName="Xen_Processor",SystemName="Domain-0",DeviceID="Domain-0/0",SystemCreationClassName="Xen_ComputerSystem",*virtinvalid="Xen"*'
wbemcli allows properties to specified along with the reference for certain queries.
In the above query I supplied invalid parameter *virtinvalid="Xen" *which is not part of the key fields for querying the provider. I think we should be checking our providers to take only the required key fields.
We don't currently support property validation in any of the providers. You can try a similar query with GetInstance: wbemcli gi 'http://root:P@localhost:5988/root/virt:Xen_Processor.CreationClassName="Xen_Processor",SystemName="Domain-0",DeviceID="Domain-0/0",SystemCreationClassName="Xen_ComputerSystem",virtinvalid="Xen"' We should be returning the instance that not only matches the keys specified, but the properties as well. In this case, the query will return an instance even though the virtinvalid property doesn't exist. This is something we'll want to fix in the future. -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com

KR> We should be returning the instance that not only matches the keys KR> specified, but the properties as well. In this case, the query KR> will return an instance even though the virtinvalid property KR> doesn't exist. KR> This is something we'll want to fix in the future. Eh? IMHO, this is not really the job of the providers. We're definitely not equipped to be enforcing schema in the same way that the CIMOM is. I'd say that if the CIMOM isn't going to prevent you from inserting completely invalid keys into a reference, that it doesn't make sense for us to do anything other than ignore them as well. -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com
participants (3)
-
Dan Smith
-
Deepti B Kalakeri
-
Kaitlin Rupert