Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
58a58267
authored
Jul 16, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing syntax in test
parent
dff0168f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
test.py
+6
-3
No files found.
test.py
View file @
58a58267
#!/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"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment