Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3a856e25
authored
Mar 20, 2014
by
Guba Sándor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
node: added info property instead of ram, cpu, arch
Need new vmdriver
parent
67324baa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
15 deletions
+6
-15
circle/vm/models/node.py
+6
-15
No files found.
circle/vm/models/node.py
View file @
3a856e25
...
...
@@ -85,13 +85,13 @@ class Node(TimeStampedModel):
@node_available
@method_cache
(
300
)
def
get_
num_cores
(
self
):
"""Number of CPU threads available to the virtual machines.
"""
return
self
.
remote_query
(
vm_tasks
.
get_core_num
,
default
=
0
)
def
get_
info
(
self
):
return
self
.
remote_query
(
vm_tasks
.
get_info
,
default
=
{
'cpu'
:
''
,
'ram'
:
'0'
,
'arch'
:
''
}
)
num_cores
=
property
(
get_num_cores
)
info
=
property
(
get_info
)
STATES
=
{
False
:
{
False
:
(
'OFFLINE'
,
_
(
'offline'
)),
True
:
(
'DISABLED'
,
_
(
'disabled'
))},
...
...
@@ -144,15 +144,6 @@ class Node(TimeStampedModel):
self
.
get_num_cores
(
invalidate_cache
=
True
)
self
.
get_ram_size
(
invalidate_cache
=
True
)
@node_available
@method_cache
(
300
)
def
get_ram_size
(
self
):
"""Bytes of total memory in the node.
"""
return
self
.
remote_query
(
vm_tasks
.
get_ram_size
,
default
=
0
)
ram_size
=
property
(
get_ram_size
)
@property
@node_available
def
ram_size_with_overcommit
(
self
):
...
...
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