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
Commit
026be873
authored
Aug 11, 2014
by
Őry Máté
Committed by
Bach Dániel
Aug 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: allow suspending diskless vms
parent
a42666e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
circle/vm/models/instance.py
+6
-5
No files found.
circle/vm/models/instance.py
View file @
026be873
...
@@ -487,11 +487,12 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
...
@@ -487,11 +487,12 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
"""
"""
try
:
try
:
datastore
=
self
.
disks
.
all
()[
0
]
.
datastore
datastore
=
self
.
disks
.
all
()[
0
]
.
datastore
except
:
except
IndexError
:
return
None
from
storage.models
import
DataStore
else
:
datastore
=
DataStore
.
objects
.
get
()
path
=
datastore
.
path
+
'/'
+
self
.
vm_name
+
'.dump'
return
{
'datastore'
:
datastore
,
'path'
:
path
}
path
=
datastore
.
path
+
'/'
+
self
.
vm_name
+
'.dump'
return
{
'datastore'
:
datastore
,
'path'
:
path
}
@property
@property
def
primary_host
(
self
):
def
primary_host
(
self
):
...
...
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