Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
vmdriver
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
066e15d5
authored
Jul 17, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding more options to test scripts
parent
e43be4ef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
test.py
+13
-5
No files found.
test.py
View file @
066e15d5
...
@@ -4,21 +4,29 @@ import vm
...
@@ -4,21 +4,29 @@ import vm
import
vmdriver
import
vmdriver
import
logging
import
logging
from
nose.tools
import
raises
from
nose.tools
import
raises
graphics
=
{
'type'
:
'vnc'
,
'listen'
:
'0.0.0.0'
,
'port'
:
'6300'
,
'passwd'
:
'asd'
}
a
=
vm
.
VMNetwork
(
name
=
"vm-88"
,
mac
=
"02:00:00:00:00:00"
)
a
=
vm
.
VMNetwork
(
name
=
"vm-88"
,
mac
=
"02:00:00:00:00:00"
)
b
=
vm
.
VMDisk
(
name
=
"asd"
,
source
=
'/asdasd/adasds/asd'
)
b
=
vm
.
VMDisk
(
name
=
"asd"
,
source
=
'/asdasd/adasds/asd'
)
testvm
=
vm
.
VMInstance
(
name
=
"Thisthename"
,
vcpu
=
"1"
,
testvm
=
vm
.
VMInstance
(
name
=
"Thisthename"
,
vcpu
=
"1"
,
memory_max
=
"2048"
,
memory_max
=
"2048"
,
disk_list
=
[
a
],
disk_list
=
[
a
],
network_list
=
[
b
])
network_list
=
[
b
],
graphics
=
graphics
)
# Enable logging
# Enable logging
logging
.
basicConfig
(
filename
=
'example.log'
,
level
=
logging
.
DEBUG
)
logging
.
basicConfig
(
filename
=
'example.log'
,
level
=
logging
.
DEBUG
)
print
testvm
.
dump_xml
()
vm_driver
=
vmdriver
.
VMDriver
()
vm_driver
=
vmdriver
.
VMDriver
()
vm_driver
.
connect
()
vm_driver
.
connect
()
# vm_driver.vm_define(None)
vm_driver
.
vm_define
(
testvm
)
vm_driver
.
lookupByName
(
"asdasd"
)
print
'
%(name)
s defined.'
%
{
'name'
:
testvm
.
name
}
print
vm_driver
.
list_domains
()
for
i
in
vm_driver
.
list_domains
():
vm_driver
.
disconnect
()
print
i
#vm_driver.vm_start(i)
vm_driver
.
vm_undefine
(
i
)
print
'
%(name)
s undefined.'
%
{
'name'
:
i
}
vm_driver
.
disconnect
()
vm_driver
.
disconnect
()
...
...
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