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
3f02e6e3
Commit
3f02e6e3
authored
14 years ago
by
Thibault VINCENT
Browse files
Options
Downloads
Patches
Plain Diff
storage: do not convert libvirt values from bytes to gigabytes
parent
c2d1901c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ccnode/interface.py
+6
-6
6 additions, 6 deletions
ccnode/interface.py
ccnode/libvirtwrapper.py
+6
-6
6 additions, 6 deletions
ccnode/libvirtwrapper.py
with
12 additions
and
12 deletions
ccnode/interface.py
+
6
−
6
View file @
3f02e6e3
...
...
@@ -254,29 +254,29 @@ class HVStorage(object):
def
get_pool_total_space
(
self
,
pool
):
'''
Returns the storage capacity of this pool in
giga
bytes
Returns the storage capacity of this pool in bytes
:param pool: the pool to get information from
:type pool: :class:`virStoragePool`
:return: :class:`int` of capacity in
giga
bytes
:return: :class:`int` of capacity in bytes
'''
def
get_pool_available_space
(
self
,
pool
):
'''
Returns available space of this storage pool in
giga
bytes
Returns available space of this storage pool in bytes
:param pool: the pool to get information from
:type pool: :class:`virStoragePool`
:return: :class:`int` of available free space in
giga
bytes
:return: :class:`int` of available free space in bytes
'''
def
get_pool_used_space
(
self
,
pool
):
'''
Returns current storage pool usage in
giga
bytes
Returns current storage pool usage in bytes
:param pool: the pool to get information from
:type pool: :class:`virStoragePool`
:return: :class:`int` of used space in
giga
bytes
:return: :class:`int` of used space in bytes
'''
def
get_volume_path
(
self
,
pool
,
vol_name
):
...
...
This diff is collapsed.
Click to expand it.
ccnode/libvirtwrapper.py
+
6
−
6
View file @
3f02e6e3
...
...
@@ -448,11 +448,11 @@ class LibvirtHVStorage(HVStorage):
def
get_pool_total_space
(
self
,
pool
):
'''
Returns the storage capacity of this pool in
giga
bytes
Returns the storage capacity of this pool in bytes
:param pool: the pool to get information from
:type pool: :class:`virStoragePool`
:return: :class:`int` of capacity in
giga
bytes
:return: :class:`int` of capacity in bytes
'''
try
:
return
pool
.
info
()[
1
]
...
...
@@ -461,11 +461,11 @@ class LibvirtHVStorage(HVStorage):
def
get_pool_available_space
(
self
,
pool
):
'''
Returns available space of this storage pool in
giga
bytes
Returns available space of this storage pool in bytes
:param pool: the pool to get information from
:type pool: :class:`virStoragePool`
:return: :class:`int` of available free space in
giga
bytes
:return: :class:`int` of available free space in bytes
'''
try
:
return
pool
.
info
()[
2
]
...
...
@@ -474,11 +474,11 @@ class LibvirtHVStorage(HVStorage):
def
get_pool_used_space
(
self
,
pool
):
'''
Returns current storage pool usage in
giga
bytes
Returns current storage pool usage in bytes
:param pool: the pool to get information from
:type pool: :class:`virStoragePool`
:return: :class:`int` of used space in
giga
bytes
:return: :class:`int` of used space in bytes
'''
try
:
return
pool
.
info
()[
3
]
...
...
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