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
Hide 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:
def
list_domains
(
self
):
return
self
.
connection
.
listDefinedDomains
()
#Create VM
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
])
@req_connection
def
lookupByName
(
self
,
name
):
try
:
self
.
connection
.
lookupByName
(
name
)
except
libvirt
.
libvirtError
as
e
:
logging
.
error
(
e
.
get_error_message
())
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