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 934697 Details for
Bug 1115039
[vdsm] libvirtError: argument unsupported: QEMU driver does not support <metadata> element
[?]
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.
i have used in comment 13
testmetadata.py (text/plain), 2.37 KB, created by
Luyao Huang
on 2014-09-05 07:52:12 UTC
(
hide
)
Description:
i have used in comment 13
Filename:
MIME Type:
Creator:
Luyao Huang
Created:
2014-09-05 07:52:12 UTC
Size:
2.37 KB
patch
obsolete
>import libvirt >import sys >import getopt > >def do_get(dom, mtype, uri=None, flags=0): > print dom.metadata(mtype, uri, flags) > >def do_set(dom, mtype, metadata=None, key=None, uri=None, flags=0): > if dom.setMetadata(mtype, metadata, key, uri, flags): > print "Failed to set metadata" > else: > print "Okay" > >def usage(): > print ("python testmetadata.py <-n|--name NAME> <-o|--opt OPERATION> " > "<-t|--type TYPE> [-u|--uri URI] [-k|--key KEY] [-m|--metadata METADATA] " > "[-f|--flags FLAGS]") > print " --name: domainname" > print " --opt: get/set/remove" > print " --type: 0-<description>, 1-<title>, 2-<metadata>" > print " --uri: metadata element uri" > print " --key: metadata element key" > print " --metadata: metadata element xml content" > print " --flags: 0-current, 1-live, 2-config" > >def main(): > try: > opts, args = getopt.getopt(sys.argv[1:], "n:o:t:u:k:m:f:", > ["name", "opt", "type", "uri", > "key", "metadata", "flags"]) > except getopt.GetoptError as err: > print str(err) > usage() > sys.exit(2) > > domname = None > operation = None > mtype = 0 > uri = None > key = None > metadata = None > flags = 0 > > for o, a in opts: > if o in ("-n", "--name"): > domname = a > elif o in ("-o", "--opt"): > operation = a > elif o in ("-t", "--type"): > mtype = int(a) > elif o in ("-u", "--uri"): > uri = a > elif o in ("-k", "--key"): > key = a > elif o in ("-m", "--metadata"): > metadata = a > elif o in ("-f", "--flags"): > flags = int(a) > else: > print "argument error %s" % o > usage() > sys.exit(1) > > conn = libvirt.open(None) > if conn == None: > print "Failed to open connection to the hypervisor" > sys.exit(1) > > try: > dom = conn.lookupByName(domname) > except: > print "Failed to find the domain %s" % domname > sys.exit(1) > > if operation == "get": > do_get(dom, mtype, uri, flags) > elif operation == "set": > do_set(dom, mtype, metadata, key, uri, flags) > elif operation == "remove": > do_set(dom, mtype, None, None, uri, flags) > else: > usage() > >if __name__ == "__main__": > main()
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 1115039
:
913756
|
913757
| 934697