Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
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
9f0bd886
authored
Nov 03, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
occi: add title and state for compute
parent
ca527975
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
circle/occi/occi.py
+8
-0
No files found.
circle/occi/occi.py
View file @
9f0bd886
...
...
@@ -215,6 +215,7 @@ class Compute(Resource):
'occi.compute.hostname'
:
"short_hostname"
,
'occi.compute.speed'
:
"priority"
,
'occi.compute.memory'
:
"ram_size"
,
'occi.core.title'
:
"name"
,
}
for
k
,
v
in
translate
.
items
():
self
.
attrs
[
k
]
=
getattr
(
self
.
instance
,
v
,
None
)
...
...
@@ -222,6 +223,13 @@ class Compute(Resource):
priority
=
self
.
instance
.
priority
self
.
attrs
[
'occi.compute.speed'
]
=
priority
/
100.0
*
5.0
status
=
{
'RUNNING'
:
"active"
,
'SUSPENDED'
:
"suspended"
,
}
self
.
attrs
[
'occi.compute.state'
]
=
status
.
get
(
self
.
instance
.
status
,
"inactive"
)
def
trigger_action
(
self
,
data
):
method
=
None
action_term
=
None
...
...
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