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
8e221583
authored
Nov 18, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add vmdirver.get_num_cores,get_ram_size
parent
e2ae4438
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletions
+16
-1
requirements/base.txt
+1
-0
vmdriver.py
+15
-1
No files found.
requirements/base.txt
View file @
8e221583
celery==3.0.23
decorator==3.4.0
lxml==3.2.3
psutil==1.1.3
vmdriver.py
View file @
8e221583
...
...
@@ -3,8 +3,12 @@ import libvirt
import
logging
import
os
import
sys
from
vm
import
VMInstance
from
decorator
import
decorator
from
psutil
import
NUM_CPUS
,
virtual_memory
from
vm
import
VMInstance
from
vmcelery
import
celery
,
lib_connection
sys
.
path
.
append
(
os
.
path
.
dirname
(
os
.
path
.
basename
(
__file__
)))
...
...
@@ -492,6 +496,16 @@ def migrate(name, host, live=False):
bandwidth
=
0
)
# return _parse_info(domain.info())
@celery.task
def
ping
():
return
True
@celery.task
def
get_core_num
():
return
NUM_CPUS
@celery.task
def
get_ram_size
():
return
virtual_memory
()
.
total
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