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
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):
...
@@ -408,20 +408,36 @@ class Instance(BaseResourceConfigModel, TimeStampedModel):
tasks
.
create
.
apply_async
(
instance
,
queue
=
self
.
node
+
".vm"
)
.
get
()
tasks
.
create
.
apply_async
(
instance
,
queue
=
self
.
node
+
".vm"
)
.
get
()
def
stop
(
self
):
def
stop
(
self
):
# TODO implement
''' Suspend the machine and save it's memory onto disk
pass
TODO: where to save?
'''
manager
.
stop
.
apply_async
(
self
)
def
resume
(
self
):
def
resume
(
self
):
# TODO implement
''' Resume suspended/stopped machine.
pass
'''
manager
.
resume
.
apply_async
(
self
)
def
poweroff
(
self
):
def
poweroff
(
self
):
# TODO implement
''' Power off virtual machine
pass
'''
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
):
def
restart
(
self
):
# TODO implement
''' Restart virtual machine with reset signal.
pass
'''
manager
.
restart
.
apply_async
(
self
)
def
renew
(
self
,
which
=
'both'
):
def
renew
(
self
,
which
=
'both'
):
"""Renew virtual machine instance leases.
"""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