[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] Problems in xen_sr_get_physical_size


  • To: xen-api@xxxxxxxxxxxxxxxxxxx
  • From: chetansa <chetan.lists@xxxxxxxxx>
  • Date: Sun, 06 Jan 2008 15:00:30 +0530
  • Delivery-date: Sun, 06 Jan 2008 01:30:50 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:content-type; b=MZKI0MrTdq2VGT7WNECjNWMPmBjdJmJVK/evPfPnMoZD3THyLfppzHNtxLq0ItGS4izW149+jAD9irLXHEbqkUIIQqfIk4EDawZwKZ5zMhnFaovxJQlOWOg305Ns/A10vY/UL8Y+Wavzz3kGqIBBFHAidL6yjEafO3/EaIY+naE=
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

Hi all,
I would like to know if I am doing something wrong in my test code (using libxen). Here is the test code snippet and associated results.

---- Code -----

    xen_sr_set *mySrList;
    xen_sr *mySr;
   
    if (!xen_sr_get_all(session, &mySrList))
    {
        cout<<"Error in xen_sr_get_all"<<endl;
        return 1;
    }
    cout<<"SR array size:"<<(int)mySrList->size<<endl;
   
    mySr = mySrList->contents[0];
   
    char* srname;

    if (!xen_sr_get_type(session, &srname, (mySrList->contents[0])))
    {
        cout<<"Error in xen_sr_get_type"<<endl;
        return 1;
    }
   
    cout<<"SR type:"<<srname<<endl;

    int64_t srno;
   
    if (!xen_sr_get_physical_size(session, &srno, (mySrList->contents[0])))
    {
        cout<<"Error in xen_sr_get_physical_size"<<endl;
        return 1;
    }
   
    cout<<"SR detail:"<<(int)srno<<endl;

---- Results -----

SR array size: 2
SR type: local
Error in xen_sr_get_physical_size

Thanks

Chetan
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.