Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 643252 Details for
Bug 875595
Bug related to Rhevm3.0 auto update or refresh !!
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Python script for upload image and add that image to VM .
python script for rhevm .txt (text/plain), 1.82 KB, created by
Romil Gupta
on 2012-11-12 06:29:24 UTC
(
hide
)
Description:
Python script for upload image and add that image to VM .
Filename:
MIME Type:
Creator:
Romil Gupta
Created:
2012-11-12 06:29:24 UTC
Size:
1.82 KB
patch
obsolete
>I upload ISO image using this script upload.py: > >================================================================================== >import os > >os.system('mkdir mount_dir') > >os.system('mount -t nfs 15.15.158.2:/iso/rhevmisonfs mount_dir') > >print 'mounted' >print 'start copying' > >os.system('cp -f CentOS-6.2-x86_64-LiveDVD.iso mount_dir/e3e3b0cd-48a4-4bb8-a75b-07813f2c165e/images/11111111-1111-1111-1111-111111111111/') >print 'file copied' > >os.system('umount -a nfs 15.15.158.2:/iso/rhevmisonfs mount_dir') >print 'unmounted' > >os.system('rmdir mount_dir') >print 'dir removed' > >================================================================================== > >and I created a rhevm_test.py > >api.vms.add(params.VM(name=VM_NAME, memory=2*GB,os=params.OperatingSystem(boot=[params.Boot(dev='cdrom'), params.Boot(dev='hd')]),cluster=api.clusters.get(name='Default'), template=api.templates.get('Blank'))) > print 'VM created' > >domain=api.storagedomains.list() > for d in domain: > print ' domain name : %s ' %d.name > >api.storagedomains.get(name='rhevmiso').update() > >rhevmiso=api.storagedomains.get(name='rhevmiso').files.list() > for iso in rhevmiso: > print ' iso --> %s \n' % iso.name > >image = api.storagedomains.get(name='rhevmiso').files.get(name=' CentOS-6.2-x86_64-LiveDVD.iso ') > print 'image found %s' %image > >api.vms.get(VM_NAME).cdroms.add(params.CdRom(name='cdrom',file=image)) > print 'image added to VM' > >================================================================================== > >now i got the following exception : >image found none > >Note : the reason is image is copied to "rhevmiso" storage domain but it not reflected in RHEVM user interface unless and untill I refresh it ! >whenever listing files in api should force iso-refresh but its not working :(
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 875595
: 643252