Commit 8e221583 by Őry Máté

add vmdirver.get_num_cores,get_ram_size

parent e2ae4438
celery==3.0.23
decorator==3.4.0
lxml==3.2.3
psutil==1.1.3
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment