Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-node
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
cc-node
Commits
ddb77017
Commit
ddb77017
authored
13 years ago
by
Thibault VINCENT
Browse files
Options
Downloads
Patches
Plain Diff
fix: reporting wrong memory amount for xen host
parent
49ae4517
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ccnode/xen.py
+3
-5
3 additions, 5 deletions
ccnode/xen.py
with
3 additions
and
5 deletions
ccnode/xen.py
+
3
−
5
View file @
ddb77017
# -*- coding: utf-8 -*-
from
libvirtwrapper
import
LibvirtHypervisor
from
libvirtwrapper
import
LibvirtHypervisor
,
MEGABYTE_DIV
class
XenHypervisor
(
LibvirtHypervisor
):
...
...
@@ -30,13 +30,11 @@ class XenHypervisor(LibvirtHypervisor):
def
get_mem
(
self
):
'''
'''
# real machine memory is the max allocatable size of the Dom0
mem
=
None
try
:
dom0
=
self
.
_lvcon_handle
.
lookupByID
(
0
)
data
=
dom0
.
info
()[
1
]
data
=
self
.
_lvcon_handle
.
getInfo
()[
1
]
if
data
:
mem
=
data
mem
=
data
*
MEGABYTE_DIV
except
:
pass
return
mem
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment