Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
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
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,
"""
try
:
datastore
=
self
.
disks
.
all
()[
0
]
.
datastore
except
:
return
None
else
:
path
=
datastore
.
path
+
'/'
+
self
.
vm_name
+
'.dump'
return
{
'datastore'
:
datastore
,
'path'
:
path
}
except
IndexError
:
from
storage.models
import
DataStore
datastore
=
DataStore
.
objects
.
get
()
path
=
datastore
.
path
+
'/'
+
self
.
vm_name
+
'.dump'
return
{
'datastore'
:
datastore
,
'path'
:
path
}
@property
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