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
f9a92907
authored
Oct 22, 2013
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage, vm: fix activity context implementations
parent
d110a9d1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
circle/storage/models.py
+3
-3
circle/vm/models.py
+4
-4
No files found.
circle/storage/models.py
View file @
f9a92907
...
@@ -130,7 +130,7 @@ class Disk(TimeStampedModel):
...
@@ -130,7 +130,7 @@ class Disk(TimeStampedModel):
'driver_type'
:
self
.
format
,
'driver_type'
:
self
.
format
,
'driver_cache'
:
'default'
,
'driver_cache'
:
'default'
,
'target_device'
:
self
.
device_type
+
self
.
dev_num
,
'target_device'
:
self
.
device_type
+
self
.
dev_num
,
'disk_device'
:
'cdrom'
if
self
.
type
==
'iso'
else
'disk'
'disk_device'
:
'cdrom'
if
self
.
type
==
'iso'
else
'disk'
}
}
def
get_disk_desc
(
self
):
def
get_disk_desc
(
self
):
...
@@ -267,10 +267,10 @@ class DiskActivity(ActivityModel):
...
@@ -267,10 +267,10 @@ class DiskActivity(ActivityModel):
@contextmanager
@contextmanager
def
sub_activity
(
self
,
code_suffix
,
task_uuid
=
None
):
def
sub_activity
(
self
,
code_suffix
,
task_uuid
=
None
):
act
=
self
.
create_sub
(
code_suffix
,
task_uuid
)
act
=
self
.
create_sub
(
code_suffix
,
task_uuid
)
activitycontextimpl
(
act
)
return
activitycontextimpl
(
act
)
@contextmanager
@contextmanager
def
disk_activity
(
code_suffix
,
instance
,
task_uuid
=
None
,
user
=
None
):
def
disk_activity
(
code_suffix
,
instance
,
task_uuid
=
None
,
user
=
None
):
act
=
DiskActivity
.
create
(
code_suffix
,
instance
,
task_uuid
,
user
)
act
=
DiskActivity
.
create
(
code_suffix
,
instance
,
task_uuid
,
user
)
activitycontextimpl
(
act
)
return
activitycontextimpl
(
act
)
circle/vm/models.py
View file @
f9a92907
...
@@ -126,13 +126,13 @@ class NodeActivity(ActivityModel):
...
@@ -126,13 +126,13 @@ class NodeActivity(ActivityModel):
@contextmanager
@contextmanager
def
sub_activity
(
self
,
code_suffix
,
task_uuid
=
None
):
def
sub_activity
(
self
,
code_suffix
,
task_uuid
=
None
):
act
=
self
.
create_sub
(
code_suffix
,
task_uuid
)
act
=
self
.
create_sub
(
code_suffix
,
task_uuid
)
activitycontextimpl
(
act
)
return
activitycontextimpl
(
act
)
@contextmanager
@contextmanager
def
node_activity
(
code_suffix
,
node
,
task_uuid
=
None
,
user
=
None
):
def
node_activity
(
code_suffix
,
node
,
task_uuid
=
None
,
user
=
None
):
act
=
InstanceActivity
.
create
(
code_suffix
,
node
,
task_uuid
,
user
)
act
=
InstanceActivity
.
create
(
code_suffix
,
node
,
task_uuid
,
user
)
activitycontextimpl
(
act
)
return
activitycontextimpl
(
act
)
class
Lease
(
Model
):
class
Lease
(
Model
):
...
@@ -764,13 +764,13 @@ class InstanceActivity(ActivityModel):
...
@@ -764,13 +764,13 @@ class InstanceActivity(ActivityModel):
@contextmanager
@contextmanager
def
sub_activity
(
self
,
code_suffix
,
task_uuid
=
None
):
def
sub_activity
(
self
,
code_suffix
,
task_uuid
=
None
):
act
=
self
.
create_sub
(
code_suffix
,
task_uuid
)
act
=
self
.
create_sub
(
code_suffix
,
task_uuid
)
activitycontextimpl
(
act
)
return
activitycontextimpl
(
act
)
@contextmanager
@contextmanager
def
instance_activity
(
code_suffix
,
instance
,
task_uuid
=
None
,
user
=
None
):
def
instance_activity
(
code_suffix
,
instance
,
task_uuid
=
None
,
user
=
None
):
act
=
InstanceActivity
.
create
(
code_suffix
,
instance
,
task_uuid
,
user
)
act
=
InstanceActivity
.
create
(
code_suffix
,
instance
,
task_uuid
,
user
)
activitycontextimpl
(
act
)
return
activitycontextimpl
(
act
)
class
Interface
(
Model
):
class
Interface
(
Model
):
...
...
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