Romil, On 11/21/2012 03:06 PM, Romil Gupta wrote: > Thanks a lot ! > > *May I know is there any api to check template disk size ??* > > I have a existing template of (disk size 10 GB) ! > > I tried using : > memory =api.templates.get(name='Fedora').memory > print 'memory--->%s' %memory > o/p -->>2GB > cpu=api.templates.get(name='Fedora').cpu.topology.cores > print 'cpu--->%s' %cpu > o/p -->> 1 > > But , if I do > disksize=api.templates.get(name='Fedora').disks.disk.size > print 'disksize --->> %s ' %disksize > exception : > 'TemplateDisks' object has no attribute 'disk'
it's same principal all over the sdk, when you have resource, it has sub-collection/s, to fetch sub-resource from sub-collection, use 'collection.get()' pattern, e.g: template_disks = api.templates.get(name='Fedora').disks disk = template_disks.get(name="my disk") size = disks.get_size() > > I have also checked in gerrit.ovirt.org/ovirt-engine-sdk > <git://gerrit.ovirt.org/ovirt-engine-sdk> but didnt able to find it . > > Help me ! > > Regards, > Romil > > > > > > On Wed, Nov 21, 2012 at 4:37 PM, Michael Pasternak <[email protected] > <mailto:[email protected]>> wrote: > > On 11/21/2012 12:46 PM, Romil Gupta wrote: > > Do we have any ovirt-sdk rpm which contains disk_type attribute and > works correctly with python2.6 ?? > > coz I need to have ( type_ atrtibute) in that ! > > just release 3.2.0.5 > > > > > > > regards, > > Romil > > > > > > On Wed, Nov 21, 2012 at 4:15 PM, Michael Pasternak <[email protected] > <mailto:[email protected]> <mailto:[email protected] > <mailto:[email protected]>>> wrote: > > > > On 11/21/2012 12:39 PM, Romil Gupta wrote: > > > yes ,I am using python 2.6 ! > > > should I install newer version on python? > > > > not sure you can, stay tuned, i'll release new sdk > > during the day. > > > > > I have CentOS release 6.2 (Final) > > > > > > > > > Regards, > > > Romil > > > > > > -- > > > > Michael Pasternak > > RedHat, ENG-Virtualization R&D > > > > > > > > > > -- > > I don't wish to be everything to everyone, but I would like to be > something to someone. > > > -- > > Michael Pasternak > RedHat, ENG-Virtualization R&D > > > > > -- > I don't wish to be everything to everyone, but I would like to be something > to someone. -- Michael Pasternak RedHat, ENG-Virtualization R&D _______________________________________________ Users mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/users

