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
66a9ff8a
authored
Mar 09, 2014
by
Dudás Ádám
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storage: make doc comments' style consistent
parent
709ba370
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
circle/storage/models.py
+14
-7
No files found.
circle/storage/models.py
View file @
66a9ff8a
...
...
@@ -110,12 +110,14 @@ class Disk(AclBase, TimeStampedModel):
@property
def
path
(
self
):
"""Get the path where the files are stored."""
"""The path where the files are stored.
"""
return
join
(
self
.
datastore
.
path
,
self
.
filename
)
@property
def
vm_format
(
self
):
"""Returns the proper file format for different type of images."""
"""Returns the proper file format for different type of images.
"""
return
{
'qcow2-norm'
:
'qcow2'
,
'qcow2-snap'
:
'qcow2'
,
...
...
@@ -126,7 +128,8 @@ class Disk(AclBase, TimeStampedModel):
@property
def
format
(
self
):
"""Returns the proper file format for different type of images."""
"""Returns the proper file format for different types of images.
"""
return
{
'qcow2-norm'
:
'qcow2'
,
'qcow2-snap'
:
'qcow2'
,
...
...
@@ -137,7 +140,8 @@ class Disk(AclBase, TimeStampedModel):
@property
def
device_type
(
self
):
"""Returns the proper device prefix for different file format."""
"""Returns the proper device prefix for different types of images.
"""
return
{
'qcow2-norm'
:
'vd'
,
'qcow2-snap'
:
'vd'
,
...
...
@@ -204,7 +208,8 @@ class Disk(AclBase, TimeStampedModel):
type
=
new_type
)
def
get_vmdisk_desc
(
self
):
"""Serialize disk object to the vmdriver."""
"""Serialize disk object to the vmdriver.
"""
return
{
'source'
:
self
.
path
,
'driver_type'
:
self
.
vm_format
,
...
...
@@ -214,7 +219,8 @@ class Disk(AclBase, TimeStampedModel):
}
def
get_disk_desc
(
self
):
"""Serialize disk object to the storage driver."""
"""Serialize disk object to the storage driver.
"""
return
{
'name'
:
self
.
filename
,
'dir'
:
self
.
datastore
.
path
,
...
...
@@ -225,7 +231,8 @@ class Disk(AclBase, TimeStampedModel):
}
def
get_remote_queue_name
(
self
,
queue_id
=
'storage'
,
check_worker
=
True
):
"""Returns the proper queue name based on the datastore."""
"""Returns the proper queue name based on the datastore.
"""
if
self
.
datastore
:
return
self
.
datastore
.
get_remote_queue_name
(
queue_id
,
check_worker
)
else
:
...
...
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