Re: [Engine-devel] ovirt on wikipedia
Hi all, Will take care of the Hebrew part. Although I would love to help more, I still need to work on my Spanish :) Muli - Original Message - From: Laszlo Hornyak lhorn...@redhat.com To: engine-devel engine-devel@ovirt.org Sent: Monday, 29 October, 2012 5:40:28 PM Subject: [Engine-devel] ovirt on wikipedia Hi, http://en.wikipedia.org/wiki/OVirt At the moment there are OVirt pages in english, russian and hungarian. Any volunteers to write czech, hebrew, german, spanish, catalan? - just to mention the languages some ovirt-developers speak :-) Laszlo ___ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel ___ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
Re: [Engine-devel] ovirt-sdk at pypi
Hi Toni, do: 1. nics = api.hosts.get(name=xxx).nics 2. nics_arr = nics.list() (change nics_arr as you need, according to __doc__, also see [1]) 3. my_nics = params.HostNics(host_nic=[nics_arr[0],nics_arr[1],...]) or my_nics = params.HostNics(host_nic=nics_arr) 4. nics.setupnetworks(action=params.Action(host_nics=my_nics)) [1] http://wiki.ovirt.org/wiki/SDK#Development_tips On 11/02/2012 11:29 AM, Antoni Segura Puimedon wrote: Hi Michael, One question though, I would like to use the setupNetworks command and the docstring says that I should use params (ovirtsdk.xml.params) and inside those ivars. I don't know how or were these ivars are to be used. Could you point me where I should look at or, alternatively, give me an example? Thanks a lot for this nice api. Best, Toni - Original Message - From: Michael Pasternak mpast...@redhat.com To: engine-devel engine-devel@ovirt.org Cc: us...@ovirt.org Sent: Friday, November 2, 2012 8:44:40 AM Subject: [Engine-devel] ovirt-sdk at pypi From now on latest ovirt-sdk will be available at pypi, for more details see [1]. [1] http://wiki.ovirt.org/wiki/SDK#pypi -- Michael Pasternak RedHat, ENG-Virtualization RD ___ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel -- Michael Pasternak RedHat, ENG-Virtualization RD ___ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
Re: [Engine-devel] ovirt-sdk at pypi
Thanks! - Original Message - From: Michael Pasternak mpast...@redhat.com To: Antoni Segura Puimedon asegu...@redhat.com Cc: engine-devel engine-devel@ovirt.org Sent: Sunday, November 4, 2012 9:12:05 AM Subject: Re: [Engine-devel] ovirt-sdk at pypi Hi Toni, do: 1. nics = api.hosts.get(name=xxx).nics 2. nics_arr = nics.list() (change nics_arr as you need, according to __doc__, also see [1]) 3. my_nics = params.HostNics(host_nic=[nics_arr[0],nics_arr[1],...]) or my_nics = params.HostNics(host_nic=nics_arr) 4. nics.setupnetworks(action=params.Action(host_nics=my_nics)) [1] http://wiki.ovirt.org/wiki/SDK#Development_tips On 11/02/2012 11:29 AM, Antoni Segura Puimedon wrote: Hi Michael, One question though, I would like to use the setupNetworks command and the docstring says that I should use params (ovirtsdk.xml.params) and inside those ivars. I don't know how or were these ivars are to be used. Could you point me where I should look at or, alternatively, give me an example? Thanks a lot for this nice api. Best, Toni - Original Message - From: Michael Pasternak mpast...@redhat.com To: engine-devel engine-devel@ovirt.org Cc: us...@ovirt.org Sent: Friday, November 2, 2012 8:44:40 AM Subject: [Engine-devel] ovirt-sdk at pypi From now on latest ovirt-sdk will be available at pypi, for more details see [1]. [1] http://wiki.ovirt.org/wiki/SDK#pypi -- Michael Pasternak RedHat, ENG-Virtualization RD ___ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel -- Michael Pasternak RedHat, ENG-Virtualization RD ___ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
Re: [Engine-devel] ovirt on wikipedia
Hi, The Hebrew wiki for oVirt can be found in: http://he.wikipedia.org/wiki/OVirt You are more than welcome to make changes/add stuff. Cheers, Muli - Original Message - From: Muli Salem msa...@redhat.com To: Laszlo Hornyak lhorn...@redhat.com Cc: engine-devel engine-devel@ovirt.org Sent: Sunday, 4 November, 2012 9:01:04 AM Subject: Re: [Engine-devel] ovirt on wikipedia Hi all, Will take care of the Hebrew part. Although I would love to help more, I still need to work on my Spanish :) Muli - Original Message - From: Laszlo Hornyak lhorn...@redhat.com To: engine-devel engine-devel@ovirt.org Sent: Monday, 29 October, 2012 5:40:28 PM Subject: [Engine-devel] ovirt on wikipedia Hi, http://en.wikipedia.org/wiki/OVirt At the moment there are OVirt pages in english, russian and hungarian. Any volunteers to write czech, hebrew, german, spanish, catalan? - just to mention the languages some ovirt-developers speak :-) Laszlo ___ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel ___ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
Re: [Engine-devel] [Users] Related to python script for Attach Cd (.iso) to a vm
Hi Romil, In general you can use api guide [1] for this, anyway here is example: 1. create vm ... 2. insert cdrom === vm = api.vms.get(name=myvm) cdrom = vm.cdroms.get(id=----) isofile = params.File(id=myiso.iso) cdrom.set_file(isofile) cdrom.update() 3. change boot order (to boot from cdrom and then from hd) == os=params.OperatingSystem(boot=[params.Boot(dev='cdrom'), params.Boot(dev='hd')], ...) api.vms.add(params.VM(name='myvm2', os=os, cluster=api.clusters.get('mycluster'), template=api.templates.get('mytemplate'))) 4. run vm = ... [1] https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Virtualization/3.1-Beta/html-single/Developer_Guide/index.html#sect-REST_API_Guide-Example-Attach_CDROM On 11/02/2012 09:56 AM, Romil Gupta wrote: Hello , *I want to write a script to attach a '.iso' image to a vm * so ,can you please help me or tell me some api so that i can continue my work !!! I have some '.iso ' file in my storage . script *rhevm_test.py* from ovirtsdk.api import API from ovirtsdk.xml import params import time rhevm_uri = https://rhevm301.xxx.xx.com:8443/api; rhevm_username = ad...@rhevm301.xxx.xx.com mailto:ad...@rhevm301.xxx.xx.com rhevm_password = iso*help api = API(url=rhevm_uri, username=rhevm_username, password=rhevm_password) print Connected to RHEVM Successful MB = 1024*1024 GB = 1024*MB VM_NAME = 'test_vm' DESCRIP = 'testing vm' CLUSTER_NAME = 'Default' STORAGE_NAME = 'rhevmVMdata' domain_name= 'rhevmiso' domain_type = 'ISO' try: api.vms.add(params.VM(name=VM_NAME,description=DESCRIP, memory=2*GB,cluster=api.clusters.get(CLUSTER_NAME), template=api.templates.get('Blank') , cdroms = 'CentOS-6.2-x86_64-LiveCD.iso ')) print 'VM created' api.vms.get(VM_NAME).nics.add(params.NIC(name='nic1', network=params.Network(name='rhevm'), interface='Red Hat VirtIO')) print 'NIC added to VM' api.vms.get(VM_NAME).disks.add(params.Disk(storage_domains=params.StorageDomains(storage_domain=[api.storagedomains.get(STORAGE_NAME)]),size=512*MB,status=None,interface='VirtIO',format='Preallocated',sparse=True,bootable=True)) print 'Disk added to VM' print 'Waiting for VM to reach Down status' while api.vms.get(VM_NAME).status.state != 'down': time.sleep(1) except Exception as e: print 'Failed to create VM with disk and NIC\n%s' % str(e) time.sleep(10) try: if api.vms.get(VM_NAME).status.state != 'up': print 'Starting VM' api.vms.get(VM_NAME).start() print 'Waiting for VM to reach Up status' while api.vms.get(VM_NAME).status.state != 'up': time.sleep(1) else: print 'VM already up' except Exception as e: print 'Failed to Start VM:\n%s' % str(e) and got some exceptions Connected to RHEVM Successful Failed to create VM with disk and NIC 'str' object has no attribute 'export' Failed to Start VM: 'NoneType' object has no attribute 'status' if i remove this cdroms = 'CentOS-6.2-x86_64-LiveCD.iso ' the code will works fine and it will create a vm with blank template w/o any '.iso' attached !! * * * * * * * * *With Regards,* *Romil* ___ Users mailing list us...@ovirt.org http://lists.ovirt.org/mailman/listinfo/users -- Michael Pasternak RedHat, ENG-Virtualization RD ___ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
Re: [Engine-devel] [Users] Related to python script for Attach Cd (.iso) to a vm
On 11/05/2012 07:51 AM, Michael Pasternak wrote: Hi Romil, In general you can use api guide [1] for this, anyway here is example: 1. create vm ... 2. insert cdrom === vm = api.vms.get(name=myvm) cdrom = vm.cdroms.get(id=----) isofile = params.File(id=myiso.iso) cdrom.set_file(isofile) cdrom.update() 3. change boot order (to boot from cdrom and then from hd) == os=params.OperatingSystem(boot=[params.Boot(dev='cdrom'), params.Boot(dev='hd')], ...) api.vms.add(params.VM(name='myvm2', os=os, cluster=api.clusters.get('mycluster'), template=api.templates.get('mytemplate'))) use this ^ example for #1, or update boot order using same semantics on existent vm. 4. run vm = ... [1] https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Virtualization/3.1-Beta/html-single/Developer_Guide/index.html#sect-REST_API_Guide-Example-Attach_CDROM -- Michael Pasternak RedHat, ENG-Virtualization RD ___ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel