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
8b6b18e3
authored
Jul 16, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
outsourcing tests
parent
3ad6d364
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
test.py
+18
-2
No files found.
test.py
View file @
8b6b18e3
#!/usr/bin/env python
#!/usr/bin/env python
import
vm
import
vmdriver
import
vmdriver
import
logging
import
logging
from
nose.tools
import
raises
a
=
vm
.
VMNetwork
(
name
=
"vm-88"
,
mac
=
"02:00:00:00:00:00"
)
b
=
vm
.
VMDisk
(
name
=
"asd"
,
source
=
'/asdasd/adasds/asd'
)
testvm
=
vm
.
VMInstance
(
name
=
"Thisthename"
,
vcpu
=
"1"
,
memory_max
=
"2048"
,
disk_list
=
[
a
],
network_list
=
[
b
])
#Enable logging
#
Enable logging
logging
.
basicConfig
(
filename
=
'example.log'
,
level
=
logging
.
DEBUG
)
logging
.
basicConfig
(
filename
=
'example.log'
,
level
=
logging
.
DEBUG
)
vm_driver
=
vmdriver
.
VMDriver
()
vm_driver
=
vmdriver
.
VMDriver
()
vm_driver
.
connect
()
vm_driver
.
connect
()
#vm_driver.vm_define(testvm)
# vm_driver.vm_define(None)
vm_driver
.
lookupByName
(
"asdasd"
)
print
vm_driver
.
list_domains
()
print
vm_driver
.
list_domains
()
vm_driver
.
disconnect
()
vm_driver
.
disconnect
()
vm_driver
.
disconnect
()
vm_driver
.
disconnect
()
@raises
(
AttributeError
)
def
test_vm_create_with_None
():
vm_driver
=
vmdriver
.
VMDriver
()
vm_driver
.
connect
()
vm_driver
.
vm_create
(
None
)
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