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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
17205b94
authored
Aug 08, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: use EnsureAgentMixin in MountStoreOperation
parent
dbc2dbea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
20 deletions
+1
-20
circle/vm/operations.py
+1
-20
No files found.
circle/vm/operations.py
View file @
17205b94
...
...
@@ -941,7 +941,7 @@ class PasswordResetOperation(EnsureAgentMixin, InstanceOperation):
register_operation
(
PasswordResetOperation
)
class
MountStoreOperation
(
InstanceOperation
):
class
MountStoreOperation
(
EnsureAgentMixin
,
InstanceOperation
):
activity_code_suffix
=
'mount_store'
id
=
'mount_store'
name
=
_
(
"mount store"
)
...
...
@@ -952,25 +952,6 @@ class MountStoreOperation(InstanceOperation):
acl_level
=
"owner"
required_perms
=
()
def
check_precond
(
self
):
super
(
MountStoreOperation
,
self
)
.
check_precond
()
if
self
.
instance
.
status
not
in
[
"RUNNING"
]:
raise
self
.
instance
.
WrongStateError
(
self
.
instance
)
try
:
latest_deploy
=
InstanceActivity
.
objects
.
filter
(
instance
=
self
.
instance
,
activity_code
=
"vm.Instance.deploy"
)
.
latest
(
"finished"
)
.
finished
except
InstanceActivity
.
DoesNotExist
:
# no deploy no agent
raise
self
.
instance
.
WrongStateError
(
self
.
instance
)
try
:
InstanceActivity
.
objects
.
filter
(
activity_code
=
"vm.Instance.agent.starting"
,
started__gt
=
latest_deploy
)
.
latest
(
"started"
)
except
InstanceActivity
.
DoesNotExist
:
# no agent no mount
raise
self
.
instance
.
WrongStateError
(
self
.
instance
)
def
check_auth
(
self
,
user
):
super
(
MountStoreOperation
,
self
)
.
check_auth
(
user
)
try
:
...
...
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