Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
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
Show 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):
...
@@ -215,6 +215,7 @@ class Compute(Resource):
'occi.compute.hostname'
:
"short_hostname"
,
'occi.compute.hostname'
:
"short_hostname"
,
'occi.compute.speed'
:
"priority"
,
'occi.compute.speed'
:
"priority"
,
'occi.compute.memory'
:
"ram_size"
,
'occi.compute.memory'
:
"ram_size"
,
'occi.core.title'
:
"name"
,
}
}
for
k
,
v
in
translate
.
items
():
for
k
,
v
in
translate
.
items
():
self
.
attrs
[
k
]
=
getattr
(
self
.
instance
,
v
,
None
)
self
.
attrs
[
k
]
=
getattr
(
self
.
instance
,
v
,
None
)
...
@@ -222,6 +223,13 @@ class Compute(Resource):
...
@@ -222,6 +223,13 @@ class Compute(Resource):
priority
=
self
.
instance
.
priority
priority
=
self
.
instance
.
priority
self
.
attrs
[
'occi.compute.speed'
]
=
priority
/
100.0
*
5.0
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
):
def
trigger_action
(
self
,
data
):
method
=
None
method
=
None
action_term
=
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