Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
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
26d113b3
authored
Sep 03, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
defining virtual machine operations
parent
c4776f8e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
vm/models.py
+24
-8
No files found.
vm/models.py
View file @
26d113b3
...
...
@@ -408,20 +408,36 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
tasks
.
create
.
apply_async
(
instance
,
queue
=
self
.
node
+
".vm"
)
.
get
()
def
stop
(
self
):
# TODO implement
pass
''' Suspend the machine and save it's memory onto disk
TODO: where to save?
'''
manager
.
stop
.
apply_async
(
self
)
def
resume
(
self
):
# TODO implement
pass
''' Resume suspended/stopped machine.
'''
manager
.
resume
.
apply_async
(
self
)
def
poweroff
(
self
):
# TODO implement
pass
''' Power off virtual machine
'''
manager
.
poweroff
.
apply_async
(
self
)
def
recreate
(
self
):
''' Recreate the virtual machine from scratch.
No reschedule.
'''
manager
.
recreate
.
apply_async
(
self
)
def
resubmit
(
self
):
''' Resubmit the virtual machine and reschedule it.
'''
manager
.
resubmit
.
apply_async
(
self
)
def
restart
(
self
):
# TODO implement
pass
''' Restart virtual machine with reset signal.
'''
manager
.
restart
.
apply_async
(
self
)
def
renew
(
self
,
which
=
'both'
):
"""Renew virtual machine instance leases.
...
...
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