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 926385 Details for
Bug 1129641
Py-sdk commands fail with "RequestError"
[?]
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.
attach_snap_liron.py
attach_snap_liron.py (text/x-python), 1.35 KB, created by
Ori Gofen
on 2014-08-13 12:16:46 UTC
(
hide
)
Description:
attach_snap_liron.py
Filename:
MIME Type:
Creator:
Ori Gofen
Created:
2014-08-13 12:16:46 UTC
Size:
1.35 KB
patch
obsolete
>import ovirtsdk.api >import ovirtsdk.xml >from ovirtsdk.xml import params >import logging > >api = ovirtsdk.api.API( > url="https://10.35.*******/ovirt-engine/api", > username="admin@internal", > password="*******", > insecure=True, > debug=False >) >logging.basicConfig() >log = logging.getLogger() > ># Find the snapshot that contains the disk that we want to backup: >vm = api.vms.get("vm_snapshot") >snaps = vm.snapshots.list(all_content=True) >snap = None >configuration_data = None >for current in snaps: > if current.get_description() == "ds": > snap = current > configuration_data = current.get_initialization().get_configuration().get_data() > log.error(configuration_data) > break > ># Find the disk of that we want to backup: >disks = snap.disks.list() >disk = None >for current in disks: > if current.get_name() == "vm_snapshot_Disk1": > disk = current > > ># newVm = params.VM(name="new", cluster=api.clusters.get(name='Default')) ># newVm.initialization = params.Initialization() ># newVm.initialization.configuration = params.Configuration() ># newVm.initialization.configuration.set_type("ovf") ># newVm.initialization.configuration.set_data(configuration_data) ># my_vm = api.vms.add(newVm) >#Find the backup appliance: >appliance = api.vms.get("ori") > >#Attach the disk to the backup appliance: >appliance.disks.add(disk) > > ># Bye: >api.disconnect()
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 1129641
: 926385