Commit 58a58267 by tarokkk

fixing syntax in test

parent dff0168f
#!/usr/bin/env python
import libvirt import libvirt
import sys import sys
...@@ -35,7 +36,8 @@ xml_sample = ''' ...@@ -35,7 +36,8 @@ xml_sample = '''
<mac address='02:00:0a:09:01:2d'/> <mac address='02:00:0a:09:01:2d'/>
<model type='virtio'/> <model type='virtio'/>
</interface> </interface>
<graphics type='vnc' listen='0.0.0.0' port='8173' passwd='usxdfmnkfk'/> <graphics type='vnc' listen='0.0.0.0'
port='8173' passwd='usxdfmnkfk'/>
</devices> </devices>
<features> <features>
<acpi/> <acpi/>
...@@ -44,7 +46,7 @@ xml_sample = ''' ...@@ -44,7 +46,7 @@ xml_sample = '''
</domain> </domain>
''' '''
if connection == None: if connection is None:
print "Fail to connect to libvirt daemon." print "Fail to connect to libvirt daemon."
sys.exit(1) sys.exit(1)
try: try:
...@@ -53,4 +55,5 @@ try: ...@@ -53,4 +55,5 @@ try:
connection.defineXML(xml_sample) connection.defineXML(xml_sample)
print connection.listDefinedDomains() print connection.listDefinedDomains()
# conn.undefineXML() # conn.undefineXML()
except:
print "error"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment