[Libvirt-cim] [PATCH] [TEST] Add check to verify StorageVolume InstanceID

Sharad Mishra snmishra at us.ibm.com
Thu Mar 11 18:29:38 UTC 2010


> Sharad Mishra wrote:
> > # HG changeset patch
> > # User Sharad Mishra <snmishra at us.ibm.com>
> > # Date 1268161766 28800
> > # Node ID 12a2efa271d73ef7ed8d88bb27b39cce2505716a
> > # Parent  3655b03ada11d9e99a1d10b97aaa7cdb737fc493
> > [TEST] Add check to verify StorageVolume InstanceID.
> >
> > This test verifies that the InstanceID of StorageVolume is not
> dependent on the pool path in RASD. Rather it is set by
virStorageVolGetPath.
> >
> > Signed-off-by: Sharad Mishra <snmishra at us.ibm.com>
> >
> > diff -r 3655b03ada11 -r 12a2efa271d7 suites/libvirt-cim/cimtest/
> ResourcePoolConfigurationService/10_create_storagevolume.py
> > --- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/
> 10_create_storagevolume.py   Thu Jan 28 14:00:59 2010 -0800
> > +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/
> 10_create_storagevolume.py   Tue Mar 09 11:09:26 2010 -0800
> > @@ -236,10 +236,15 @@
> >                                                          dp_inst_id,
> >                                                          exp_vol_path)
> >
> > +            if res[1]['Resource']['InstanceID'] != exp_vol_path:
> > +                status = FAIL
> > +            else:
> > +                status = PASS
> >
>
> This check should be done after the call to
> rpcs_conn.CreateResourceInPool() and res[0] != PASS.

Above code lines are after call to CreateResourceInPool and checking for
res[0].

> Also, include some debug messages when the match fails.

Agreed, I will do that in next revision of this patch.

-Sharad

>
> >              ret = cleanup_pool_vol(server, virt, pool_name,
> >                                     clean_pool, exp_vol_path)
> >              if res[0] == PASS and found == 1 and \
> > -               ret == PASS and stovol_status == PASS:
> > +               ret == PASS and stovol_status == PASS and \
> > +               status == PASS:
> >                  status = PASS
> >              else:
> >                  return FAIL
> >
> > _______________________________________________
> > Libvirt-cim mailing list
> > Libvirt-cim at redhat.com
> > https://www.redhat.com/mailman/listinfo/libvirt-cim
> >
>
> --
> Thanks and Regards,
> Deepti B. Kalakeri
> IBM Linux Technology Center
> deeptik at linux.vnet.ibm.com
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20100311/3eea3d0a/attachment.htm>


More information about the Libvirt-cim mailing list