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
5f3d506d
authored
Jul 16, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
outsourcing test and adding lookupByName
parent
faaf1293
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
vmdriver.py
+6
-7
No files found.
vmdriver.py
View file @
5f3d506d
...
@@ -54,10 +54,9 @@ class VMDriver:
...
@@ -54,10 +54,9 @@ class VMDriver:
def
list_domains
(
self
):
def
list_domains
(
self
):
return
self
.
connection
.
listDefinedDomains
()
return
self
.
connection
.
listDefinedDomains
()
#Create VM
@req_connection
a
=
vm
.
VMNetwork
(
name
=
"vm-88"
,
mac
=
"02:00:00:00:00:00"
)
def
lookupByName
(
self
,
name
):
b
=
vm
.
VMDisk
(
name
=
"asd"
,
source
=
'/asdasd/adasds/asd'
)
try
:
testvm
=
vm
.
VMInstance
(
name
=
"Thisthename"
,
vcpu
=
"1"
,
self
.
connection
.
lookupByName
(
name
)
memory_max
=
"2048"
,
except
libvirt
.
libvirtError
as
e
:
disk_list
=
[
a
],
logging
.
error
(
e
.
get_error_message
())
network_list
=
[
b
])
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