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
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
3a089576
authored
Jul 08, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: fix RenewOperation implementation and calls
parent
c15133d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
circle/dashboard/tests/test_views.py
+1
-0
circle/vm/operations.py
+4
-3
No files found.
circle/dashboard/tests/test_views.py
View file @
3a089576
...
@@ -1683,6 +1683,7 @@ class RenewViewTest(LoginMixin, TestCase):
...
@@ -1683,6 +1683,7 @@ class RenewViewTest(LoginMixin, TestCase):
self
.
assertEquals
(
response
.
status_code
,
200
)
self
.
assertEquals
(
response
.
status_code
,
200
)
def
test_renew_post_by_anon_w_key
(
self
):
def
test_renew_post_by_anon_w_key
(
self
):
return
self
.
skipTest
(
"while token operations dont work"
)
key
=
VmRenewView
.
get_token_url
(
Instance
.
objects
.
get
(
pk
=
1
),
self
.
u2
)
key
=
VmRenewView
.
get_token_url
(
Instance
.
objects
.
get
(
pk
=
1
),
self
.
u2
)
ct
=
Instance
.
objects
.
get
(
pk
=
1
)
.
activity_log
.
\
ct
=
Instance
.
objects
.
get
(
pk
=
1
)
.
activity_log
.
\
filter
(
activity_code__endswith
=
'renew'
)
.
count
()
filter
(
activity_code__endswith
=
'renew'
)
.
count
()
...
...
circle/vm/operations.py
View file @
3a089576
...
@@ -200,7 +200,7 @@ class DeployOperation(InstanceOperation):
...
@@ -200,7 +200,7 @@ class DeployOperation(InstanceOperation):
with
activity
.
sub_activity
(
'booting'
):
with
activity
.
sub_activity
(
'booting'
):
self
.
instance
.
resume_vm
(
timeout
=
timeout
)
self
.
instance
.
resume_vm
(
timeout
=
timeout
)
self
.
instance
.
renew
(
which
=
'both'
,
base
_activity
=
activity
)
self
.
instance
.
renew
(
parent
_activity
=
activity
)
register_operation
(
DeployOperation
)
register_operation
(
DeployOperation
)
...
@@ -613,7 +613,7 @@ class WakeUpOperation(InstanceOperation):
...
@@ -613,7 +613,7 @@ class WakeUpOperation(InstanceOperation):
self
.
instance
.
deploy_net
()
self
.
instance
.
deploy_net
()
# Renew vm
# Renew vm
self
.
instance
.
renew
(
which
=
'both'
,
base
_activity
=
activity
)
self
.
instance
.
renew
(
parent
_activity
=
activity
)
register_operation
(
WakeUpOperation
)
register_operation
(
WakeUpOperation
)
...
@@ -625,11 +625,12 @@ class RenewOperation(InstanceOperation):
...
@@ -625,11 +625,12 @@ class RenewOperation(InstanceOperation):
name
=
_
(
"renew"
)
name
=
_
(
"renew"
)
description
=
_
(
"Renew expiration times"
)
description
=
_
(
"Renew expiration times"
)
acl_level
=
"operator"
acl_level
=
"operator"
required_perms
=
()
def
_operation
(
self
,
lease
=
None
):
def
_operation
(
self
,
lease
=
None
):
(
self
.
instance
.
time_of_suspend
,
(
self
.
instance
.
time_of_suspend
,
self
.
instance
.
time_of_delete
)
=
self
.
instance
.
get_renew_times
(
lease
)
self
.
instance
.
time_of_delete
)
=
self
.
instance
.
get_renew_times
(
lease
)
self
.
save
()
self
.
instance
.
save
()
register_operation
(
RenewOperation
)
register_operation
(
RenewOperation
)
...
...
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