<br><tt><font size=2>libvirt-cim-bounces@redhat.com wrote on 2008-09-26
02:14:16:<br>
<br>
> >> if ret == PASS and len(hs) == 0:<br>
> >> +        name = 'Linux_ComputerSystem'<br>
> >> +        system = linux_cs<br>
> >> +    if ret == FAIL and len(hs) == 1:<br>
> >> +        name = hostname<br>
> >> +        system = hs[0]<br>
> >> +    if system.CreationClassName != name or system.Name
!= host:<br>
> >> +        logger.error("Exp %s, got
%s" % (name, <br>
> >> system.CreationClassName))<br>
> >> +        logger.error("Exp %s, got
%s" % (host, system.Name))<br>
> >> +        status = FAIL<br>
> >> +    else:<br>
> >> +        logger.info("%s is %s"
% (name, host))<br>
> >> +        status = PASS<br>
> >> +<br>
> >> +    if ret == PASS and len(hs) == 1:<br>
> >> +        if linux_cs.CreationClassName
!= 'Linux_ComputerSystem' \<br>
> >> +           or linux_cs.Name !=
host \<br>
> >> +           or hs[0].CreationClassName
!= hostname\<br>
> >> +           or hs[0].Name != host:<br>
> >> +            logger.error("Exp
Linux_ComputerSystem, got %s" % <br>
> >> linux_cs.CreationClassName)<br>
> >> +            logger.error("Exp
%s, got %s" % (host, linux_cs.Name))<br>
> >> +            logger.error("Exp
%s, got %s" % (hostname, <br>
> >> hs[0].CreationClassName))<br>
> >> +            logger.error("Exp
%s, got %s" % (host, hs[0].Name))<br>
> >> +            status = FAIL<br>
> >>   <br>
> > When sblim-base-provider is installed, I dont think we will have
<br>
> > HostSystem and Linux_ComputerSystem both returning the info.<br>
> > If both of them return values, then in that case the above check
should <br>
> > return a FAIL instead of verifying the values, thoughts ??<br>
> > Also, if my understanding is not complete, atleast the above
checks <br>
> > should be separated.<br>
> <br>
> Agreed.  If ret == PASS and len(hs) == 1, you'll need to return
FAIL. <br>
> Really, this should look like the following:<br>
> <br>
> 1) Call check_sblim()<br>
> 2) Enum HostSystem<br>
> 3) If check SBLIM returns PASS:<br>
>    a) If enum of HostSystem returned an instance, return
FAIL<br>
>    b) Else, the test can return PASS<br>
> <br>
> 4) Else:<br>
>    a) Verify enum of HostSystem returned one instance.  If
len(hs) != 1, <br>
> return FAIL<br>
>    b) Verify the HostSystem attributes - return FAIL if
any of the <br>
> attributes don't match.<br>
> </font></tt>
<br><tt><font size=2>  That sounds good!</font></tt>
<br><tt><font size=2>  #4 patch on the way.</font></tt>
<br>
<br><tt><font size=2>  Thanks!<br>
> -- <br>
> Kaitlin Rupert<br>
> IBM Linux Technology Center<br>
> kaitlin@linux.vnet.ibm.com<br>
> <br>
> _______________________________________________<br>
> Libvirt-cim mailing list<br>
> Libvirt-cim@redhat.com<br>
> https://www.redhat.com/mailman/listinfo/libvirt-cim<br>
</font></tt>